diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ee241331..11ccd1c7 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,32 +1,29 @@ lockVersion: 2.0.0 id: 1732900d-e173-47c1-a90d-d45182eb35d9 management: - docChecksum: addaf2dfdac23cef2e234b64492b9c90 - docVersion: 0.0.3 + docChecksum: 2a6e4c8f6e1fedff5a37da76411f22df + docVersion: 1.1.1 speakeasyVersion: 1.615.2 generationVersion: 2.698.4 - releaseVersion: 0.18.0 - configChecksum: 334e78bbbc1d2066c9f2041346a79b94 + releaseVersion: 0.19.1 + configChecksum: 62d759c5f60b90b5bf0da4b94b9dd29d repoURL: https://github.com/LukeHagar/plexjava.git published: true features: java: + acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 + additionalProperties: 0.0.1 constsAndDefaults: 0.1.1 core: 3.47.2 - deprecations: 2.81.1 downloadStreams: 0.1.1 - enums: 2.81.2 - errors: 0.5.0 - flattening: 2.81.1 + examples: 2.81.6 globalSecurity: 2.83.1 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 globalServerURLs: 2.82.2 - methodServerURLs: 2.82.1 + globals: 2.82.2 nameOverrides: 2.81.3 - nullables: 0.1.0 - openEnums: 0.2.0 sdkHooks: 1.1.0 unions: 0.0.6 uploadStreams: 0.1.0 @@ -34,935 +31,826 @@ generatedFiles: - .gitattributes - USAGE.md - build.gradle - - docs/models/errors/AddPlaylistContentsBadRequest.md - - docs/models/errors/AddPlaylistContentsErrors.md - - docs/models/errors/AddPlaylistContentsPlaylistsErrors.md - - docs/models/errors/AddPlaylistContentsUnauthorized.md - - docs/models/errors/ApplyUpdatesBadRequest.md - - docs/models/errors/ApplyUpdatesErrors.md - - docs/models/errors/ApplyUpdatesUnauthorized.md - - docs/models/errors/ApplyUpdatesUpdaterErrors.md - - docs/models/errors/CancelServerActivitiesActivitiesErrors.md - - docs/models/errors/CancelServerActivitiesBadRequest.md - - docs/models/errors/CancelServerActivitiesErrors.md - - docs/models/errors/CancelServerActivitiesUnauthorized.md - - docs/models/errors/CheckForUpdatesBadRequest.md - - docs/models/errors/CheckForUpdatesErrors.md - - docs/models/errors/CheckForUpdatesUnauthorized.md - - docs/models/errors/CheckForUpdatesUpdaterErrors.md - - docs/models/errors/ClearPlaylistContentsBadRequest.md - - docs/models/errors/ClearPlaylistContentsErrors.md - - docs/models/errors/ClearPlaylistContentsPlaylistsErrors.md - - docs/models/errors/ClearPlaylistContentsUnauthorized.md - - docs/models/errors/CreatePlaylistBadRequest.md - - docs/models/errors/CreatePlaylistErrors.md - - docs/models/errors/CreatePlaylistPlaylistsErrors.md - - docs/models/errors/CreatePlaylistUnauthorized.md - - docs/models/errors/DeleteLibraryBadRequest.md - - docs/models/errors/DeleteLibraryErrors.md - - docs/models/errors/DeleteLibraryLibraryErrors.md - - docs/models/errors/DeleteLibraryUnauthorized.md - - docs/models/errors/DeletePlaylistBadRequest.md - - docs/models/errors/DeletePlaylistErrors.md - - docs/models/errors/DeletePlaylistPlaylistsErrors.md - - docs/models/errors/DeletePlaylistUnauthorized.md - - docs/models/errors/EnablePaperTrailBadRequest.md - - docs/models/errors/EnablePaperTrailErrors.md - - docs/models/errors/EnablePaperTrailLogErrors.md - - docs/models/errors/EnablePaperTrailUnauthorized.md - - docs/models/errors/Errors.md - - docs/models/errors/GetActorsLibraryBadRequest.md - - docs/models/errors/GetActorsLibraryErrors.md - - docs/models/errors/GetActorsLibraryLibraryErrors.md - - docs/models/errors/GetActorsLibraryUnauthorized.md - - docs/models/errors/GetAllLibrariesBadRequest.md - - docs/models/errors/GetAllLibrariesErrors.md - - docs/models/errors/GetAllLibrariesLibraryErrors.md - - docs/models/errors/GetAllLibrariesUnauthorized.md - - docs/models/errors/GetAvailableClientsBadRequest.md - - docs/models/errors/GetAvailableClientsErrors.md - - docs/models/errors/GetAvailableClientsServerErrors.md - - docs/models/errors/GetAvailableClientsUnauthorized.md - - docs/models/errors/GetBandwidthStatisticsBadRequest.md - - docs/models/errors/GetBandwidthStatisticsErrors.md - - docs/models/errors/GetBandwidthStatisticsStatisticsErrors.md - - docs/models/errors/GetBandwidthStatisticsUnauthorized.md - - docs/models/errors/GetBannerImageBadRequest.md - - docs/models/errors/GetBannerImageErrors.md - - docs/models/errors/GetBannerImageMediaErrors.md - - docs/models/errors/GetBannerImageUnauthorized.md - - docs/models/errors/GetButlerTasksBadRequest.md - - docs/models/errors/GetButlerTasksButlerErrors.md - - docs/models/errors/GetButlerTasksErrors.md - - docs/models/errors/GetButlerTasksUnauthorized.md - - docs/models/errors/GetCompanionsDataBadRequest.md - - docs/models/errors/GetCompanionsDataErrors.md - - docs/models/errors/GetCompanionsDataPlexErrors.md - - docs/models/errors/GetCompanionsDataUnauthorized.md - - docs/models/errors/GetCountriesLibraryBadRequest.md - - docs/models/errors/GetCountriesLibraryErrors.md - - docs/models/errors/GetCountriesLibraryLibraryErrors.md - - docs/models/errors/GetCountriesLibraryUnauthorized.md - - docs/models/errors/GetDevicesBadRequest.md - - docs/models/errors/GetDevicesErrors.md - - docs/models/errors/GetDevicesServerErrors.md - - docs/models/errors/GetDevicesUnauthorized.md - - docs/models/errors/GetFileHashBadRequest.md - - docs/models/errors/GetFileHashErrors.md - - docs/models/errors/GetFileHashLibraryErrors.md - - docs/models/errors/GetFileHashUnauthorized.md - - docs/models/errors/GetGenresLibraryBadRequest.md - - docs/models/errors/GetGenresLibraryErrors.md - - docs/models/errors/GetGenresLibraryLibraryErrors.md - - docs/models/errors/GetGenresLibraryUnauthorized.md - - docs/models/errors/GetGeoDataBadRequest.md - - docs/models/errors/GetGeoDataErrors.md - - docs/models/errors/GetGeoDataPlexErrors.md - - docs/models/errors/GetGeoDataUnauthorized.md - - docs/models/errors/GetGlobalHubsBadRequest.md - - docs/models/errors/GetGlobalHubsErrors.md - - docs/models/errors/GetGlobalHubsHubsErrors.md - - docs/models/errors/GetGlobalHubsUnauthorized.md - - docs/models/errors/GetHomeDataBadRequest.md - - docs/models/errors/GetHomeDataErrors.md - - docs/models/errors/GetHomeDataPlexErrors.md - - docs/models/errors/GetHomeDataUnauthorized.md - - docs/models/errors/GetLibraryDetailsBadRequest.md - - docs/models/errors/GetLibraryDetailsErrors.md - - docs/models/errors/GetLibraryDetailsLibraryErrors.md - - docs/models/errors/GetLibraryDetailsUnauthorized.md - - docs/models/errors/GetLibraryHubsBadRequest.md - - docs/models/errors/GetLibraryHubsErrors.md - - docs/models/errors/GetLibraryHubsHubsErrors.md - - docs/models/errors/GetLibraryHubsUnauthorized.md - - docs/models/errors/GetLibraryItemsBadRequest.md - - docs/models/errors/GetLibraryItemsErrors.md - - docs/models/errors/GetLibraryItemsLibraryErrors.md - - docs/models/errors/GetLibraryItemsUnauthorized.md - - docs/models/errors/GetLibrarySectionsAllBadRequest.md - - docs/models/errors/GetLibrarySectionsAllErrors.md - - docs/models/errors/GetLibrarySectionsAllLibraryErrors.md - - docs/models/errors/GetLibrarySectionsAllUnauthorized.md - - docs/models/errors/GetMediaMetaDataBadRequest.md - - docs/models/errors/GetMediaMetaDataErrors.md - - docs/models/errors/GetMediaMetaDataLibraryErrors.md - - docs/models/errors/GetMediaMetaDataUnauthorized.md - - docs/models/errors/GetMediaProvidersBadRequest.md - - docs/models/errors/GetMediaProvidersErrors.md - - docs/models/errors/GetMediaProvidersServerErrors.md - - docs/models/errors/GetMediaProvidersUnauthorized.md - - docs/models/errors/GetMetadataChildrenBadRequest.md - - docs/models/errors/GetMetadataChildrenErrors.md - - docs/models/errors/GetMetadataChildrenLibraryErrors.md - - docs/models/errors/GetMetadataChildrenUnauthorized.md - - docs/models/errors/GetMyPlexAccountBadRequest.md - - docs/models/errors/GetMyPlexAccountErrors.md - - docs/models/errors/GetMyPlexAccountServerErrors.md - - docs/models/errors/GetMyPlexAccountUnauthorized.md - - docs/models/errors/GetPinBadRequest.md - - docs/models/errors/GetPinErrors.md - - docs/models/errors/GetPlaylistBadRequest.md - - docs/models/errors/GetPlaylistContentsBadRequest.md - - docs/models/errors/GetPlaylistContentsErrors.md - - docs/models/errors/GetPlaylistContentsPlaylistsErrors.md - - docs/models/errors/GetPlaylistContentsUnauthorized.md - - docs/models/errors/GetPlaylistErrors.md - - docs/models/errors/GetPlaylistPlaylistsErrors.md - - docs/models/errors/GetPlaylistUnauthorized.md - - docs/models/errors/GetPlaylistsBadRequest.md - - docs/models/errors/GetPlaylistsErrors.md - - docs/models/errors/GetPlaylistsPlaylistsErrors.md - - docs/models/errors/GetPlaylistsUnauthorized.md - - docs/models/errors/GetRecentlyAddedLibraryBadRequest.md - - docs/models/errors/GetRecentlyAddedLibraryErrors.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 - - docs/models/errors/GetRefreshLibraryMetadataUnauthorized.md - - docs/models/errors/GetResizedPhotoBadRequest.md - - docs/models/errors/GetResizedPhotoErrors.md - - docs/models/errors/GetResizedPhotoServerErrors.md - - docs/models/errors/GetResizedPhotoUnauthorized.md - - docs/models/errors/GetResourcesStatisticsBadRequest.md - - docs/models/errors/GetResourcesStatisticsErrors.md - - docs/models/errors/GetResourcesStatisticsStatisticsErrors.md - - docs/models/errors/GetResourcesStatisticsUnauthorized.md - - docs/models/errors/GetSearchAllLibrariesBadRequest.md - - docs/models/errors/GetSearchAllLibrariesErrors.md - - docs/models/errors/GetSearchAllLibrariesLibraryErrors.md - - docs/models/errors/GetSearchAllLibrariesUnauthorized.md - - docs/models/errors/GetSearchLibraryBadRequest.md - - docs/models/errors/GetSearchLibraryErrors.md - - docs/models/errors/GetSearchLibraryLibraryErrors.md - - docs/models/errors/GetSearchLibraryUnauthorized.md - - docs/models/errors/GetSearchResultsBadRequest.md - - docs/models/errors/GetSearchResultsErrors.md - - docs/models/errors/GetSearchResultsSearchErrors.md - - docs/models/errors/GetSearchResultsUnauthorized.md - - docs/models/errors/GetServerActivitiesActivitiesErrors.md - - docs/models/errors/GetServerActivitiesBadRequest.md - - docs/models/errors/GetServerActivitiesErrors.md - - docs/models/errors/GetServerActivitiesUnauthorized.md - - docs/models/errors/GetServerCapabilitiesBadRequest.md - - docs/models/errors/GetServerCapabilitiesErrors.md - - docs/models/errors/GetServerCapabilitiesUnauthorized.md - - docs/models/errors/GetServerIdentityRequestTimeout.md - - docs/models/errors/GetServerListBadRequest.md - - docs/models/errors/GetServerListErrors.md - - docs/models/errors/GetServerListServerErrors.md - - docs/models/errors/GetServerListUnauthorized.md - - docs/models/errors/GetServerPreferencesBadRequest.md - - docs/models/errors/GetServerPreferencesErrors.md - - docs/models/errors/GetServerPreferencesServerErrors.md - - docs/models/errors/GetServerPreferencesUnauthorized.md - - docs/models/errors/GetServerResourcesBadRequest.md - - docs/models/errors/GetServerResourcesErrors.md - - docs/models/errors/GetServerResourcesPlexErrors.md - - docs/models/errors/GetServerResourcesUnauthorized.md - - docs/models/errors/GetSessionHistoryBadRequest.md - - docs/models/errors/GetSessionHistoryErrors.md - - docs/models/errors/GetSessionHistorySessionsErrors.md - - docs/models/errors/GetSessionHistoryUnauthorized.md - - docs/models/errors/GetSessionsBadRequest.md - - docs/models/errors/GetSessionsErrors.md - - docs/models/errors/GetSessionsSessionsErrors.md - - docs/models/errors/GetSessionsUnauthorized.md - - docs/models/errors/GetSourceConnectionInformationAuthenticationErrors.md - - docs/models/errors/GetSourceConnectionInformationBadRequest.md - - docs/models/errors/GetSourceConnectionInformationErrors.md - - docs/models/errors/GetSourceConnectionInformationUnauthorized.md - - docs/models/errors/GetStatisticsBadRequest.md - - docs/models/errors/GetStatisticsErrors.md - - docs/models/errors/GetStatisticsStatisticsErrors.md - - docs/models/errors/GetStatisticsUnauthorized.md - - docs/models/errors/GetThumbImageBadRequest.md - - docs/models/errors/GetThumbImageErrors.md - - docs/models/errors/GetThumbImageMediaErrors.md - - docs/models/errors/GetThumbImageUnauthorized.md - - docs/models/errors/GetTimelineBadRequest.md - - docs/models/errors/GetTimelineErrors.md - - docs/models/errors/GetTimelineUnauthorized.md - - docs/models/errors/GetTimelineVideoErrors.md - - docs/models/errors/GetTokenByPinIdBadRequest.md - - docs/models/errors/GetTokenByPinIdErrors.md - - docs/models/errors/GetTokenByPinIdPlexErrors.md - - docs/models/errors/GetTokenByPinIdResponseBody.md - - docs/models/errors/GetTokenDetailsAuthenticationErrors.md - - docs/models/errors/GetTokenDetailsBadRequest.md - - docs/models/errors/GetTokenDetailsErrors.md - - docs/models/errors/GetTokenDetailsUnauthorized.md - - docs/models/errors/GetTopWatchedContentBadRequest.md - - docs/models/errors/GetTopWatchedContentErrors.md - - docs/models/errors/GetTopWatchedContentLibraryErrors.md - - docs/models/errors/GetTopWatchedContentUnauthorized.md - - docs/models/errors/GetTranscodeSessionsBadRequest.md - - docs/models/errors/GetTranscodeSessionsErrors.md - - docs/models/errors/GetTranscodeSessionsSessionsErrors.md - - docs/models/errors/GetTranscodeSessionsUnauthorized.md - - docs/models/errors/GetTransientTokenAuthenticationErrors.md - - docs/models/errors/GetTransientTokenBadRequest.md - - docs/models/errors/GetTransientTokenErrors.md - - docs/models/errors/GetTransientTokenUnauthorized.md - - docs/models/errors/GetUpdateStatusBadRequest.md - - docs/models/errors/GetUpdateStatusErrors.md - - docs/models/errors/GetUpdateStatusUnauthorized.md - - docs/models/errors/GetUpdateStatusUpdaterErrors.md - - docs/models/errors/GetUserFriendsBadRequest.md - - docs/models/errors/GetUserFriendsErrors.md - - docs/models/errors/GetUserFriendsPlexErrors.md - - docs/models/errors/GetUserFriendsUnauthorized.md - - docs/models/errors/GetUsersBadRequest.md - - docs/models/errors/GetUsersErrors.md - - docs/models/errors/GetUsersUnauthorized.md - - docs/models/errors/GetUsersUsersErrors.md - - docs/models/errors/GetWatchListBadRequest.md - - docs/models/errors/GetWatchListErrors.md - - docs/models/errors/GetWatchListUnauthorized.md - - docs/models/errors/GetWatchListWatchlistErrors.md - - docs/models/errors/LogLineBadRequest.md - - docs/models/errors/LogLineErrors.md - - docs/models/errors/LogLineLogErrors.md - - docs/models/errors/LogLineUnauthorized.md - - docs/models/errors/LogMultiLineBadRequest.md - - docs/models/errors/LogMultiLineErrors.md - - docs/models/errors/LogMultiLineLogErrors.md - - docs/models/errors/LogMultiLineUnauthorized.md - - docs/models/errors/MarkPlayedBadRequest.md - - docs/models/errors/MarkPlayedErrors.md - - docs/models/errors/MarkPlayedMediaErrors.md - - docs/models/errors/MarkPlayedUnauthorized.md - - docs/models/errors/MarkUnplayedBadRequest.md - - docs/models/errors/MarkUnplayedErrors.md - - docs/models/errors/MarkUnplayedMediaErrors.md - - docs/models/errors/MarkUnplayedUnauthorized.md - - docs/models/errors/PerformSearchBadRequest.md - - docs/models/errors/PerformSearchErrors.md - - docs/models/errors/PerformSearchSearchErrors.md - - docs/models/errors/PerformSearchUnauthorized.md - - docs/models/errors/PerformVoiceSearchBadRequest.md - - docs/models/errors/PerformVoiceSearchErrors.md - - docs/models/errors/PerformVoiceSearchSearchErrors.md - - docs/models/errors/PerformVoiceSearchUnauthorized.md - - docs/models/errors/PostUsersSignInDataAuthenticationErrors.md - - docs/models/errors/PostUsersSignInDataBadRequest.md - - docs/models/errors/PostUsersSignInDataErrors.md - - docs/models/errors/PostUsersSignInDataUnauthorized.md - - docs/models/errors/StartAllTasksBadRequest.md - - docs/models/errors/StartAllTasksButlerErrors.md - - docs/models/errors/StartAllTasksErrors.md - - docs/models/errors/StartAllTasksUnauthorized.md - - docs/models/errors/StartTaskBadRequest.md - - docs/models/errors/StartTaskButlerErrors.md - - docs/models/errors/StartTaskErrors.md - - docs/models/errors/StartTaskUnauthorized.md - - docs/models/errors/StartUniversalTranscodeBadRequest.md - - docs/models/errors/StartUniversalTranscodeErrors.md - - docs/models/errors/StartUniversalTranscodeUnauthorized.md - - docs/models/errors/StartUniversalTranscodeVideoErrors.md - - docs/models/errors/StopAllTasksBadRequest.md - - docs/models/errors/StopAllTasksButlerErrors.md - - docs/models/errors/StopAllTasksErrors.md - - docs/models/errors/StopAllTasksUnauthorized.md - - docs/models/errors/StopTaskBadRequest.md - - docs/models/errors/StopTaskButlerErrors.md - - docs/models/errors/StopTaskErrors.md - - docs/models/errors/StopTaskUnauthorized.md - - docs/models/errors/StopTranscodeSessionBadRequest.md - - docs/models/errors/StopTranscodeSessionErrors.md - - docs/models/errors/StopTranscodeSessionSessionsErrors.md - - docs/models/errors/StopTranscodeSessionUnauthorized.md - - docs/models/errors/UpdatePlayProgressBadRequest.md - - docs/models/errors/UpdatePlayProgressErrors.md - - docs/models/errors/UpdatePlayProgressMediaErrors.md - - docs/models/errors/UpdatePlayProgressUnauthorized.md - - docs/models/errors/UpdatePlaylistBadRequest.md - - docs/models/errors/UpdatePlaylistErrors.md - - docs/models/errors/UpdatePlaylistPlaylistsErrors.md - - docs/models/errors/UpdatePlaylistUnauthorized.md - - docs/models/errors/UploadPlaylistBadRequest.md - - docs/models/errors/UploadPlaylistErrors.md - - docs/models/errors/UploadPlaylistPlaylistsErrors.md - - docs/models/errors/UploadPlaylistUnauthorized.md - docs/models/operations/Account.md - docs/models/operations/Action.md - - docs/models/operations/ActiveDirection.md - docs/models/operations/Activity.md - - docs/models/operations/AddPlaylistContentsMediaContainer.md - - docs/models/operations/AddPlaylistContentsMetadata.md - - docs/models/operations/AddPlaylistContentsRequest.md - - docs/models/operations/AddPlaylistContentsResponse.md - - docs/models/operations/AddPlaylistContentsResponseBody.md - - docs/models/operations/AllLibraries.md - - docs/models/operations/AllowCameraUpload.md - - docs/models/operations/AllowChannels.md - - docs/models/operations/AllowSubtitleAdmin.md - - docs/models/operations/AllowSync.md - - docs/models/operations/AllowTuners.md + - docs/models/operations/AddCollectionItemsRequest.md + - docs/models/operations/AddCollectionItemsResponse.md + - docs/models/operations/AddDeviceRequest.md + - docs/models/operations/AddDeviceResponse.md + - docs/models/operations/AddDeviceToDVRDVR.md + - docs/models/operations/AddDeviceToDVRDVRsMediaContainer.md + - docs/models/operations/AddDeviceToDVRMediaContainer.md + - docs/models/operations/AddDeviceToDVRRequest.md + - docs/models/operations/AddDeviceToDVRResponse.md + - docs/models/operations/AddDeviceToDVRResponseBody.md + - docs/models/operations/AddDownloadQueueItemsMediaContainer.md + - docs/models/operations/AddDownloadQueueItemsRequest.md + - docs/models/operations/AddDownloadQueueItemsResponse.md + - docs/models/operations/AddDownloadQueueItemsResponseBody.md + - docs/models/operations/AddExtrasRequest.md + - docs/models/operations/AddExtrasResponse.md + - docs/models/operations/AddLineupDVR.md + - docs/models/operations/AddLineupDVRsMediaContainer.md + - docs/models/operations/AddLineupMediaContainer.md + - docs/models/operations/AddLineupRequest.md + - docs/models/operations/AddLineupResponse.md + - docs/models/operations/AddLineupResponseBody.md + - docs/models/operations/AddPlaylistItemsRequest.md + - docs/models/operations/AddPlaylistItemsResponse.md + - docs/models/operations/AddProviderRequest.md + - docs/models/operations/AddProviderResponse.md + - docs/models/operations/AddSectionRequest.md + - docs/models/operations/AddSectionResponse.md + - docs/models/operations/AddSubtitlesRequest.md + - docs/models/operations/AddSubtitlesResponse.md + - docs/models/operations/AddToPlayQueueRequest.md + - docs/models/operations/AddToPlayQueueResponse.md + - docs/models/operations/AddedQueueItems.md + - docs/models/operations/AdvancedSubtitles.md + - docs/models/operations/AnalyzeMetadataRequest.md + - docs/models/operations/AnalyzeMetadataResponse.md - docs/models/operations/ApplyUpdatesRequest.md - docs/models/operations/ApplyUpdatesResponse.md + - docs/models/operations/Args.md - docs/models/operations/Attributes.md - - docs/models/operations/AutoSelectSubtitle.md - - docs/models/operations/Billing.md + - docs/models/operations/AutocompleteRequest.md + - docs/models/operations/AutocompleteResponse.md + - docs/models/operations/Bandwidth.md + - docs/models/operations/Bandwidths.md - docs/models/operations/ButlerTask.md - docs/models/operations/ButlerTasks.md - - docs/models/operations/CancelServerActivitiesRequest.md - - docs/models/operations/CancelServerActivitiesResponse.md - - docs/models/operations/Chapter.md - - docs/models/operations/CheckForUpdatesRequest.md - - docs/models/operations/CheckForUpdatesResponse.md - - docs/models/operations/ClearPlaylistContentsRequest.md - - docs/models/operations/ClearPlaylistContentsResponse.md - - docs/models/operations/Collection.md - - docs/models/operations/Connections.md - - docs/models/operations/Context.md + - docs/models/operations/CancelActivityRequest.md + - docs/models/operations/CancelActivityResponse.md + - docs/models/operations/CancelGrabRequest.md + - docs/models/operations/CancelGrabResponse.md + - docs/models/operations/CancelRefreshRequest.md + - docs/models/operations/CancelRefreshResponse.md + - docs/models/operations/ChannelMapping.md + - docs/models/operations/ChannelMappingByKey.md + - docs/models/operations/CheckUpdatesRequest.md + - docs/models/operations/CheckUpdatesResponse.md + - docs/models/operations/ChromaSubsampling.md + - docs/models/operations/CleanBundlesResponse.md + - docs/models/operations/ClearPlayQueueRequest.md + - docs/models/operations/ClearPlayQueueResponse.md + - docs/models/operations/ClearPlaylistItemsRequest.md + - docs/models/operations/ClearPlaylistItemsResponse.md + - docs/models/operations/ComputeChannelMapChannelMapping.md + - docs/models/operations/ComputeChannelMapMediaContainer.md + - docs/models/operations/ComputeChannelMapRequest.md + - docs/models/operations/ComputeChannelMapResponse.md + - docs/models/operations/ComputeChannelMapResponseBody.md + - docs/models/operations/ConnectWebSocketRequest.md + - docs/models/operations/ConnectWebSocketResponse.md + - docs/models/operations/Connection.md - docs/models/operations/Country.md - - docs/models/operations/CreatePlaylistMediaContainer.md - - docs/models/operations/CreatePlaylistMetadata.md - - docs/models/operations/CreatePlaylistQueryParamType.md + - docs/models/operations/CreateCollectionRequest.md + - docs/models/operations/CreateCollectionResponse.md + - docs/models/operations/CreateCustomHubRequest.md + - docs/models/operations/CreateCustomHubResponse.md + - docs/models/operations/CreateDVRRequest.md + - docs/models/operations/CreateDVRResponse.md + - docs/models/operations/CreateDownloadQueueMediaContainer.md + - docs/models/operations/CreateDownloadQueueResponse.md + - docs/models/operations/CreateDownloadQueueResponseBody.md + - docs/models/operations/CreateMarkerMediaContainer.md + - docs/models/operations/CreateMarkerRequest.md + - docs/models/operations/CreateMarkerResponse.md + - docs/models/operations/CreateMarkerResponseBody.md + - docs/models/operations/CreateMarkerType.md + - docs/models/operations/CreatePlayQueueMediaContainer.md + - docs/models/operations/CreatePlayQueueRequest.md + - docs/models/operations/CreatePlayQueueResponse.md + - docs/models/operations/CreatePlayQueueResponseBody.md - docs/models/operations/CreatePlaylistRequest.md - docs/models/operations/CreatePlaylistResponse.md - - docs/models/operations/CreatePlaylistResponseBody.md - - docs/models/operations/DefaultDirection.md - - docs/models/operations/DefaultSubtitleAccessibility.md - - docs/models/operations/DefaultSubtitleForced.md - - docs/models/operations/DeleteLibraryRequest.md - - docs/models/operations/DeleteLibraryResponse.md + - docs/models/operations/CreateSubscriptionMediaContainer.md + - docs/models/operations/CreateSubscriptionQueryParamPrefs.md + - docs/models/operations/CreateSubscriptionRequest.md + - docs/models/operations/CreateSubscriptionResponse.md + - docs/models/operations/CreateSubscriptionResponseBody.md + - docs/models/operations/DecisionResult.md + - docs/models/operations/DeleteCachesResponse.md + - docs/models/operations/DeleteCollectionItemRequest.md + - docs/models/operations/DeleteCollectionItemResponse.md + - docs/models/operations/DeleteCollectionRequest.md + - docs/models/operations/DeleteCollectionResponse.md + - docs/models/operations/DeleteCustomHubRequest.md + - docs/models/operations/DeleteCustomHubResponse.md + - docs/models/operations/DeleteDVRRequest.md + - docs/models/operations/DeleteDVRResponse.md + - docs/models/operations/DeleteHistoryRequest.md + - docs/models/operations/DeleteHistoryResponse.md + - docs/models/operations/DeleteIndexesRequest.md + - docs/models/operations/DeleteIndexesResponse.md + - docs/models/operations/DeleteIntrosRequest.md + - docs/models/operations/DeleteIntrosResponse.md + - docs/models/operations/DeleteLibrarySectionRequest.md + - docs/models/operations/DeleteLibrarySectionResponse.md + - docs/models/operations/DeleteLineupDVR.md + - docs/models/operations/DeleteLineupDVRsMediaContainer.md + - docs/models/operations/DeleteLineupMediaContainer.md + - docs/models/operations/DeleteLineupRequest.md + - docs/models/operations/DeleteLineupResponse.md + - docs/models/operations/DeleteLineupResponseBody.md + - docs/models/operations/DeleteMarkerRequest.md + - docs/models/operations/DeleteMarkerResponse.md + - docs/models/operations/DeleteMediaItemRequest.md + - docs/models/operations/DeleteMediaItemResponse.md + - docs/models/operations/DeleteMediaProviderRequest.md + - docs/models/operations/DeleteMediaProviderResponse.md + - docs/models/operations/DeleteMetadataItemRequest.md + - docs/models/operations/DeleteMetadataItemResponse.md + - docs/models/operations/DeletePlayQueueItemRequest.md + - docs/models/operations/DeletePlayQueueItemResponse.md + - docs/models/operations/DeletePlaylistItemRequest.md + - docs/models/operations/DeletePlaylistItemResponse.md - docs/models/operations/DeletePlaylistRequest.md - docs/models/operations/DeletePlaylistResponse.md + - docs/models/operations/DeleteStreamRequest.md + - docs/models/operations/DeleteStreamResponse.md + - docs/models/operations/DeleteSubscriptionRequest.md + - docs/models/operations/DeleteSubscriptionResponse.md + - docs/models/operations/DetectAdsRequest.md + - docs/models/operations/DetectAdsResponse.md + - docs/models/operations/DetectCreditsRequest.md + - docs/models/operations/DetectCreditsResponse.md + - docs/models/operations/DetectIntrosRequest.md + - docs/models/operations/DetectIntrosResponse.md + - docs/models/operations/DetectVoiceActivityRequest.md + - docs/models/operations/DetectVoiceActivityResponse.md - docs/models/operations/Device.md - - docs/models/operations/Director.md + - docs/models/operations/DeviceChannel.md - docs/models/operations/Directory.md - - docs/models/operations/Download.md - - docs/models/operations/EnablePaperTrailResponse.md - - docs/models/operations/Extras.md + - docs/models/operations/DiscoverDevicesResponse.md + - docs/models/operations/DownloadQueue.md + - docs/models/operations/DownloadQueueItem.md + - docs/models/operations/Dvr.md + - docs/models/operations/EditMarkerRequest.md + - docs/models/operations/EditMarkerResponse.md + - docs/models/operations/EditMetadataItemRequest.md + - docs/models/operations/EditMetadataItemResponse.md + - docs/models/operations/EditSectionQueryParamPrefs.md + - docs/models/operations/EditSectionRequest.md + - docs/models/operations/EditSectionResponse.md + - docs/models/operations/EditSubscriptionPreferencesQueryParamPrefs.md + - docs/models/operations/EditSubscriptionPreferencesRequest.md + - docs/models/operations/EditSubscriptionPreferencesResponse.md + - docs/models/operations/Element.md + - docs/models/operations/EmptyTrashRequest.md + - docs/models/operations/EmptyTrashResponse.md + - docs/models/operations/EnablePapertrailRequest.md + - docs/models/operations/EnablePapertrailResponse.md + - docs/models/operations/Extension.md - docs/models/operations/Feature.md - - docs/models/operations/Field.md - - docs/models/operations/FieldType.md - - docs/models/operations/Filter.md - - docs/models/operations/FlattenSeasons.md - - docs/models/operations/Force.md - - docs/models/operations/Friend.md - - docs/models/operations/Genre.md - - docs/models/operations/GeoData.md - - docs/models/operations/GetActorsLibraryDirectory.md - - docs/models/operations/GetActorsLibraryMediaContainer.md - - docs/models/operations/GetActorsLibraryQueryParamType.md - - docs/models/operations/GetActorsLibraryRequest.md - - docs/models/operations/GetActorsLibraryResponse.md - - docs/models/operations/GetActorsLibraryResponseBody.md - - docs/models/operations/GetAllLibrariesDirectory.md - - docs/models/operations/GetAllLibrariesLocation.md - - docs/models/operations/GetAllLibrariesMediaContainer.md - - docs/models/operations/GetAllLibrariesResponse.md - - docs/models/operations/GetAllLibrariesResponseBody.md - - docs/models/operations/GetAllLibrariesType.md - - docs/models/operations/GetAvailableClientsMediaContainer.md - - docs/models/operations/GetAvailableClientsResponse.md - - docs/models/operations/GetAvailableClientsResponseBody.md - - docs/models/operations/GetBandwidthStatisticsAccount.md - - docs/models/operations/GetBandwidthStatisticsDevice.md - - docs/models/operations/GetBandwidthStatisticsMediaContainer.md - - docs/models/operations/GetBandwidthStatisticsRequest.md - - docs/models/operations/GetBandwidthStatisticsResponse.md - - docs/models/operations/GetBandwidthStatisticsResponseBody.md - - docs/models/operations/GetBannerImageRequest.md - - docs/models/operations/GetBannerImageResponse.md - - docs/models/operations/GetButlerTasksResponse.md - - docs/models/operations/GetButlerTasksResponseBody.md - - docs/models/operations/GetCompanionsDataResponse.md - - docs/models/operations/GetCountriesLibraryDirectory.md - - docs/models/operations/GetCountriesLibraryMediaContainer.md - - docs/models/operations/GetCountriesLibraryQueryParamType.md - - docs/models/operations/GetCountriesLibraryRequest.md - - docs/models/operations/GetCountriesLibraryResponse.md - - docs/models/operations/GetCountriesLibraryResponseBody.md - - docs/models/operations/GetDevicesMediaContainer.md - - docs/models/operations/GetDevicesResponse.md - - docs/models/operations/GetDevicesResponseBody.md - - docs/models/operations/GetFileHashRequest.md - - docs/models/operations/GetFileHashResponse.md - - docs/models/operations/GetGenresLibraryDirectory.md - - docs/models/operations/GetGenresLibraryMediaContainer.md - - docs/models/operations/GetGenresLibraryQueryParamType.md - - docs/models/operations/GetGenresLibraryRequest.md - - docs/models/operations/GetGenresLibraryResponse.md - - docs/models/operations/GetGenresLibraryResponseBody.md - - docs/models/operations/GetGeoDataGeoData.md - - docs/models/operations/GetGeoDataResponse.md - - docs/models/operations/GetGlobalHubsMediaContainer.md - - docs/models/operations/GetGlobalHubsMetadata.md - - docs/models/operations/GetGlobalHubsRequest.md - - docs/models/operations/GetGlobalHubsResponse.md - - docs/models/operations/GetGlobalHubsResponseBody.md - - 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/Flavor.md + - docs/models/operations/Format.md + - docs/models/operations/GenerateThumbsRequest.md + - docs/models/operations/GenerateThumbsResponse.md + - docs/models/operations/GetAlbumsRequest.md + - docs/models/operations/GetAlbumsResponse.md + - docs/models/operations/GetAllHubsMediaContainer.md + - docs/models/operations/GetAllHubsRequest.md + - docs/models/operations/GetAllHubsResponse.md + - docs/models/operations/GetAllHubsResponseBody.md + - docs/models/operations/GetAllItemLeavesRequest.md + - docs/models/operations/GetAllItemLeavesResponse.md + - docs/models/operations/GetAllLanguagesMediaContainer.md + - docs/models/operations/GetAllLanguagesResponse.md + - docs/models/operations/GetAllLanguagesResponseBody.md + - docs/models/operations/GetAllLeavesRequest.md + - docs/models/operations/GetAllLeavesResponse.md + - docs/models/operations/GetAllPreferencesResponse.md + - docs/models/operations/GetAllSubscriptionsRequest.md + - docs/models/operations/GetAllSubscriptionsResponse.md + - docs/models/operations/GetArtsRequest.md + - docs/models/operations/GetArtsResponse.md + - docs/models/operations/GetAugmentationStatusRequest.md + - docs/models/operations/GetAugmentationStatusResponse.md + - docs/models/operations/GetAvailableGrabbersMediaContainer.md + - docs/models/operations/GetAvailableGrabbersRequest.md + - docs/models/operations/GetAvailableGrabbersResponse.md + - docs/models/operations/GetAvailableGrabbersResponseBody.md + - docs/models/operations/GetAvailableSortsMediaContainer.md + - docs/models/operations/GetAvailableSortsRequest.md + - docs/models/operations/GetAvailableSortsResponse.md + - docs/models/operations/GetAvailableSortsResponseBody.md + - docs/models/operations/GetBackgroundTasksMediaContainer.md + - docs/models/operations/GetBackgroundTasksResponse.md + - docs/models/operations/GetBackgroundTasksResponseBody.md + - docs/models/operations/GetBackgroundTasksType.md + - docs/models/operations/GetCategoriesRequest.md + - docs/models/operations/GetCategoriesResponse.md + - docs/models/operations/GetChannelsMediaContainer.md + - docs/models/operations/GetChannelsRequest.md + - docs/models/operations/GetChannelsResponse.md + - docs/models/operations/GetChannelsResponseBody.md + - docs/models/operations/GetChapterImageRequest.md + - docs/models/operations/GetChapterImageResponse.md + - docs/models/operations/GetClusterRequest.md + - docs/models/operations/GetClusterResponse.md + - docs/models/operations/GetCollectionImageRequest.md + - docs/models/operations/GetCollectionImageResponse.md + - docs/models/operations/GetCollectionItemsRequest.md + - docs/models/operations/GetCollectionItemsResponse.md + - docs/models/operations/GetCollectionsRequest.md + - docs/models/operations/GetCollectionsResponse.md + - docs/models/operations/GetColorsMediaContainer.md + - docs/models/operations/GetColorsRequest.md + - docs/models/operations/GetColorsResponse.md + - docs/models/operations/GetColorsResponseBody.md + - docs/models/operations/GetCommonRequest.md + - docs/models/operations/GetCommonResponse.md + - docs/models/operations/GetContinueWatchingMediaContainer.md + - docs/models/operations/GetContinueWatchingRequest.md + - docs/models/operations/GetContinueWatchingResponse.md + - docs/models/operations/GetContinueWatchingResponseBody.md + - docs/models/operations/GetCountriesLineupsRequest.md + - docs/models/operations/GetCountriesLineupsResponse.md + - docs/models/operations/GetCountriesMediaContainer.md + - docs/models/operations/GetCountriesResponse.md + - docs/models/operations/GetCountriesResponseBody.md + - docs/models/operations/GetCountryRegionsCountry.md + - docs/models/operations/GetCountryRegionsMediaContainer.md + - docs/models/operations/GetCountryRegionsRequest.md + - docs/models/operations/GetCountryRegionsResponse.md + - docs/models/operations/GetCountryRegionsResponseBody.md + - docs/models/operations/GetDVRDVR.md + - docs/models/operations/GetDVRDVRsMediaContainer.md + - docs/models/operations/GetDVRMediaContainer.md + - docs/models/operations/GetDVRRequest.md + - docs/models/operations/GetDVRResponse.md + - docs/models/operations/GetDVRResponseBody.md + - docs/models/operations/GetDeviceDetailsRequest.md + - docs/models/operations/GetDeviceDetailsResponse.md + - docs/models/operations/GetDevicesChannelsMediaContainer.md + - docs/models/operations/GetDevicesChannelsRequest.md + - docs/models/operations/GetDevicesChannelsResponse.md + - docs/models/operations/GetDevicesChannelsResponseBody.md + - docs/models/operations/GetDownloadQueueDownloadQueue.md + - docs/models/operations/GetDownloadQueueItemsDecisionResult.md + - docs/models/operations/GetDownloadQueueItemsDownloadQueueItem.md + - docs/models/operations/GetDownloadQueueItemsMediaContainer.md + - docs/models/operations/GetDownloadQueueItemsRequest.md + - docs/models/operations/GetDownloadQueueItemsResponse.md + - docs/models/operations/GetDownloadQueueItemsResponseBody.md + - docs/models/operations/GetDownloadQueueItemsStatus.md + - docs/models/operations/GetDownloadQueueItemsTranscode.md + - docs/models/operations/GetDownloadQueueMediaContainer.md + - docs/models/operations/GetDownloadQueueMediaRequest.md + - docs/models/operations/GetDownloadQueueMediaResponse.md + - docs/models/operations/GetDownloadQueueRequest.md + - docs/models/operations/GetDownloadQueueResponse.md + - docs/models/operations/GetDownloadQueueResponseBody.md + - docs/models/operations/GetDownloadQueueStatus.md + - docs/models/operations/GetExtrasRequest.md + - docs/models/operations/GetExtrasResponse.md + - docs/models/operations/GetFileRequest.md + - docs/models/operations/GetFileResponse.md + - docs/models/operations/GetFirstCharactersDirectory.md + - docs/models/operations/GetFirstCharactersMediaContainer.md + - docs/models/operations/GetFirstCharactersRequest.md + - docs/models/operations/GetFirstCharactersResponse.md + - docs/models/operations/GetFirstCharactersResponseBody.md + - docs/models/operations/GetFoldersDirectory.md + - docs/models/operations/GetFoldersMediaContainer.md + - docs/models/operations/GetFoldersRequest.md + - docs/models/operations/GetFoldersResponse.md + - docs/models/operations/GetFoldersResponseBody.md + - docs/models/operations/GetHistoryItemRequest.md + - docs/models/operations/GetHistoryItemResponse.md + - docs/models/operations/GetHubItemsRequest.md + - docs/models/operations/GetHubItemsResponse.md + - docs/models/operations/GetHubItemsResponseBody.md + - docs/models/operations/GetIdentityMediaContainer.md + - docs/models/operations/GetIdentityResponse.md + - docs/models/operations/GetIdentityResponseBody.md + - docs/models/operations/GetImageFromBifRequest.md + - docs/models/operations/GetImageFromBifResponse.md + - docs/models/operations/GetImageRequest.md + - docs/models/operations/GetImageResponse.md + - docs/models/operations/GetItemArtworkPathParamElement.md + - docs/models/operations/GetItemArtworkRequest.md + - docs/models/operations/GetItemArtworkResponse.md + - docs/models/operations/GetItemDecisionRequest.md + - docs/models/operations/GetItemDecisionResponse.md + - docs/models/operations/GetItemTreeRequest.md + - docs/models/operations/GetItemTreeResponse.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 - - docs/models/operations/GetLibraryHubsGenre.md - - docs/models/operations/GetLibraryHubsHub.md - - docs/models/operations/GetLibraryHubsMedia.md - - docs/models/operations/GetLibraryHubsMediaContainer.md - - docs/models/operations/GetLibraryHubsMetadata.md - - docs/models/operations/GetLibraryHubsPart.md - - docs/models/operations/GetLibraryHubsRequest.md - - docs/models/operations/GetLibraryHubsResponse.md - - 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/GetLibraryItemsGenre.md - - docs/models/operations/GetLibraryItemsGuids.md - - docs/models/operations/GetLibraryItemsHasThumbnail.md - - docs/models/operations/GetLibraryItemsImage.md - - docs/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.md - - docs/models/operations/GetLibraryItemsLibraryResponseType.md - - docs/models/operations/GetLibraryItemsLibraryType.md - - docs/models/operations/GetLibraryItemsLocation.md - - docs/models/operations/GetLibraryItemsMedia.md - - docs/models/operations/GetLibraryItemsMediaContainer.md - - docs/models/operations/GetLibraryItemsMeta.md - - docs/models/operations/GetLibraryItemsMetadata.md - - docs/models/operations/GetLibraryItemsOperator.md - - docs/models/operations/GetLibraryItemsOptimizedForStreaming.md - - docs/models/operations/GetLibraryItemsOptimizedForStreaming1.md - - docs/models/operations/GetLibraryItemsPart.md - - docs/models/operations/GetLibraryItemsProducer.md - - docs/models/operations/GetLibraryItemsQueryParamIncludeMeta.md - - docs/models/operations/GetLibraryItemsQueryParamType.md - docs/models/operations/GetLibraryItemsRequest.md - docs/models/operations/GetLibraryItemsResponse.md - - docs/models/operations/GetLibraryItemsResponseBody.md - - docs/models/operations/GetLibraryItemsRole.md - - docs/models/operations/GetLibraryItemsSimilar.md - - docs/models/operations/GetLibraryItemsSort.md - - docs/models/operations/GetLibraryItemsType.md - - docs/models/operations/GetLibraryItemsUltraBlurColors.md - - docs/models/operations/GetLibraryItemsWriter.md - - docs/models/operations/GetLibrarySectionsAllActiveDirection.md - - docs/models/operations/GetLibrarySectionsAllCollection.md - - docs/models/operations/GetLibrarySectionsAllCountry.md - - docs/models/operations/GetLibrarySectionsAllDefaultDirection.md - - docs/models/operations/GetLibrarySectionsAllDirector.md - - docs/models/operations/GetLibrarySectionsAllField.md - - docs/models/operations/GetLibrarySectionsAllFieldType.md - - docs/models/operations/GetLibrarySectionsAllFilter.md - - docs/models/operations/GetLibrarySectionsAllGenre.md - - docs/models/operations/GetLibrarySectionsAllGuids.md - - docs/models/operations/GetLibrarySectionsAllHasThumbnail.md - - docs/models/operations/GetLibrarySectionsAllImage.md - - docs/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.md - - docs/models/operations/GetLibrarySectionsAllLibraryResponseType.md - - docs/models/operations/GetLibrarySectionsAllLibraryType.md - - docs/models/operations/GetLibrarySectionsAllMedia.md - - docs/models/operations/GetLibrarySectionsAllMediaContainer.md - - docs/models/operations/GetLibrarySectionsAllMeta.md - - docs/models/operations/GetLibrarySectionsAllMetadata.md - - docs/models/operations/GetLibrarySectionsAllOperator.md - - docs/models/operations/GetLibrarySectionsAllOptimizedForStreaming.md - - docs/models/operations/GetLibrarySectionsAllOptimizedForStreaming1.md - - docs/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.md - - docs/models/operations/GetLibrarySectionsAllPart.md - - docs/models/operations/GetLibrarySectionsAllQueryParamIncludeMeta.md - - docs/models/operations/GetLibrarySectionsAllQueryParamType.md - - docs/models/operations/GetLibrarySectionsAllRequest.md - - docs/models/operations/GetLibrarySectionsAllResponse.md - - docs/models/operations/GetLibrarySectionsAllResponseBody.md - - docs/models/operations/GetLibrarySectionsAllRole.md - - docs/models/operations/GetLibrarySectionsAllSort.md - - docs/models/operations/GetLibrarySectionsAllStream.md - - docs/models/operations/GetLibrarySectionsAllType.md - - docs/models/operations/GetLibrarySectionsAllUltraBlurColors.md - - docs/models/operations/GetLibrarySectionsAllWriter.md - - docs/models/operations/GetMediaArtsMediaContainer.md - - docs/models/operations/GetMediaArtsMetadata.md - - docs/models/operations/GetMediaArtsRequest.md - - docs/models/operations/GetMediaArtsResponse.md - - docs/models/operations/GetMediaArtsResponseBody.md - - docs/models/operations/GetMediaMetaDataAttributes.md - - docs/models/operations/GetMediaMetaDataChapter.md - - docs/models/operations/GetMediaMetaDataCountry.md - - docs/models/operations/GetMediaMetaDataDirector.md - - docs/models/operations/GetMediaMetaDataExtras.md - - docs/models/operations/GetMediaMetaDataGenre.md - - docs/models/operations/GetMediaMetaDataGuids.md - - docs/models/operations/GetMediaMetaDataHasThumbnail.md - - docs/models/operations/GetMediaMetaDataImage.md - - docs/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md - - docs/models/operations/GetMediaMetaDataLibraryType.md - - docs/models/operations/GetMediaMetaDataLocation.md - - docs/models/operations/GetMediaMetaDataMarker.md - - docs/models/operations/GetMediaMetaDataMedia.md - - docs/models/operations/GetMediaMetaDataMediaContainer.md - - docs/models/operations/GetMediaMetaDataMetadata.md - - docs/models/operations/GetMediaMetaDataOptimizedForStreaming.md - - docs/models/operations/GetMediaMetaDataOptimizedForStreaming1.md - - docs/models/operations/GetMediaMetaDataOptimizedForStreamingLibrary1.md - - docs/models/operations/GetMediaMetaDataPart.md - - docs/models/operations/GetMediaMetaDataProducer.md - - docs/models/operations/GetMediaMetaDataRatings.md - - docs/models/operations/GetMediaMetaDataRequest.md - - docs/models/operations/GetMediaMetaDataResponse.md - - docs/models/operations/GetMediaMetaDataResponseBody.md - - docs/models/operations/GetMediaMetaDataRole.md - - docs/models/operations/GetMediaMetaDataSimilar.md - - docs/models/operations/GetMediaMetaDataStream.md - - docs/models/operations/GetMediaMetaDataType.md - - docs/models/operations/GetMediaMetaDataUltraBlurColors.md - - docs/models/operations/GetMediaMetaDataWriter.md - - docs/models/operations/GetMediaPostersMediaContainer.md - - docs/models/operations/GetMediaPostersMetadata.md - - docs/models/operations/GetMediaPostersRequest.md - - docs/models/operations/GetMediaPostersResponse.md - - docs/models/operations/GetMediaPostersResponseBody.md - - docs/models/operations/GetMediaProvidersDirectory.md - - docs/models/operations/GetMediaProvidersMediaContainer.md - - docs/models/operations/GetMediaProvidersRequest.md - - docs/models/operations/GetMediaProvidersResponse.md - - docs/models/operations/GetMediaProvidersResponseBody.md - - docs/models/operations/GetMetadataChildrenDirectory.md - - docs/models/operations/GetMetadataChildrenMediaContainer.md - - docs/models/operations/GetMetadataChildrenMetadata.md - - docs/models/operations/GetMetadataChildrenRequest.md - - docs/models/operations/GetMetadataChildrenResponse.md - - docs/models/operations/GetMetadataChildrenResponseBody.md - - docs/models/operations/GetMyPlexAccountResponse.md - - docs/models/operations/GetMyPlexAccountResponseBody.md - - docs/models/operations/GetPinAuthPinContainer.md - - docs/models/operations/GetPinRequest.md - - docs/models/operations/GetPinResponse.md - - docs/models/operations/GetPlaylistContentsCountry.md - - docs/models/operations/GetPlaylistContentsDirector.md - - docs/models/operations/GetPlaylistContentsGenre.md - - docs/models/operations/GetPlaylistContentsMedia.md - - docs/models/operations/GetPlaylistContentsMediaContainer.md - - docs/models/operations/GetPlaylistContentsMetadata.md - - docs/models/operations/GetPlaylistContentsPart.md - - docs/models/operations/GetPlaylistContentsQueryParamType.md - - docs/models/operations/GetPlaylistContentsRequest.md - - docs/models/operations/GetPlaylistContentsResponse.md - - docs/models/operations/GetPlaylistContentsResponseBody.md - - docs/models/operations/GetPlaylistContentsRole.md - - docs/models/operations/GetPlaylistContentsWriter.md - - docs/models/operations/GetPlaylistMediaContainer.md - - docs/models/operations/GetPlaylistMetadata.md + - docs/models/operations/GetLibraryMatchesRequest.md + - docs/models/operations/GetLibraryMatchesResponse.md + - docs/models/operations/GetLineupChannelsMediaContainer.md + - docs/models/operations/GetLineupChannelsRequest.md + - docs/models/operations/GetLineupChannelsResponse.md + - docs/models/operations/GetLineupChannelsResponseBody.md + - docs/models/operations/GetLineupRequest.md + - docs/models/operations/GetLineupResponse.md + - docs/models/operations/GetLiveTVSessionRequest.md + - docs/models/operations/GetLiveTVSessionResponse.md + - docs/models/operations/GetMediaPartRequest.md + - docs/models/operations/GetMediaPartResponse.md + - docs/models/operations/GetMetadataHubsRequest.md + - docs/models/operations/GetMetadataHubsResponse.md + - docs/models/operations/GetMetadataItemRequest.md + - docs/models/operations/GetMetadataItemResponse.md + - docs/models/operations/GetNotificationsRequest.md + - docs/models/operations/GetNotificationsResponse.md + - docs/models/operations/GetPartIndexRequest.md + - docs/models/operations/GetPartIndexResponse.md + - docs/models/operations/GetPersonMediaContainer.md + - docs/models/operations/GetPersonRequest.md + - docs/models/operations/GetPersonResponse.md + - docs/models/operations/GetPersonResponseBody.md + - docs/models/operations/GetPlayQueueRequest.md + - docs/models/operations/GetPlayQueueResponse.md + - docs/models/operations/GetPlaylistGeneratorDevice.md + - docs/models/operations/GetPlaylistGeneratorItemsMediaContainer.md + - docs/models/operations/GetPlaylistGeneratorItemsMetadata.md + - docs/models/operations/GetPlaylistGeneratorItemsRequest.md + - docs/models/operations/GetPlaylistGeneratorItemsResponse.md + - docs/models/operations/GetPlaylistGeneratorItemsResponseBody.md + - docs/models/operations/GetPlaylistGeneratorLocation.md + - docs/models/operations/GetPlaylistGeneratorMediaContainer.md + - docs/models/operations/GetPlaylistGeneratorRequest.md + - docs/models/operations/GetPlaylistGeneratorResponse.md + - docs/models/operations/GetPlaylistGeneratorResponseBody.md + - docs/models/operations/GetPlaylistGeneratorScope.md + - docs/models/operations/GetPlaylistGeneratorState.md + - docs/models/operations/GetPlaylistGeneratorStatus.md + - docs/models/operations/GetPlaylistGeneratorSubtitles.md + - docs/models/operations/GetPlaylistGeneratorType.md + - docs/models/operations/GetPlaylistGeneratorsMediaContainer.md + - docs/models/operations/GetPlaylistGeneratorsRequest.md + - docs/models/operations/GetPlaylistGeneratorsResponse.md + - docs/models/operations/GetPlaylistGeneratorsResponseBody.md + - docs/models/operations/GetPlaylistGeneratorsType.md + - docs/models/operations/GetPlaylistItemsRequest.md + - docs/models/operations/GetPlaylistItemsResponse.md - docs/models/operations/GetPlaylistRequest.md - docs/models/operations/GetPlaylistResponse.md - - docs/models/operations/GetPlaylistResponseBody.md - - docs/models/operations/GetPlaylistsMediaContainer.md - - docs/models/operations/GetPlaylistsMetadata.md - - 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/GetRecentlyAddedOptimizedForStreaming.md - - docs/models/operations/GetRecentlyAddedOptimizedForStreaming1.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 - - docs/models/operations/GetResizedPhotoResponse.md - - docs/models/operations/GetResourcesStatisticsMediaContainer.md - - docs/models/operations/GetResourcesStatisticsRequest.md - - docs/models/operations/GetResourcesStatisticsResponse.md - - docs/models/operations/GetResourcesStatisticsResponseBody.md - - docs/models/operations/GetSearchAllLibrariesCountry.md - - docs/models/operations/GetSearchAllLibrariesDirector.md - - docs/models/operations/GetSearchAllLibrariesDirectory.md - - docs/models/operations/GetSearchAllLibrariesFlattenSeasons.md - - docs/models/operations/GetSearchAllLibrariesGenre.md - - docs/models/operations/GetSearchAllLibrariesGuids.md - - docs/models/operations/GetSearchAllLibrariesHasThumbnail.md - - docs/models/operations/GetSearchAllLibrariesImage.md - - docs/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.md - - docs/models/operations/GetSearchAllLibrariesLibraryType.md - - docs/models/operations/GetSearchAllLibrariesLocation.md - - docs/models/operations/GetSearchAllLibrariesMedia.md - - docs/models/operations/GetSearchAllLibrariesMediaContainer.md - - docs/models/operations/GetSearchAllLibrariesMetadata.md - - docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming.md - - docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.md - - docs/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.md - - docs/models/operations/GetSearchAllLibrariesPart.md - - docs/models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.md - - docs/models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.md - - docs/models/operations/GetSearchAllLibrariesRequest.md - - docs/models/operations/GetSearchAllLibrariesResponse.md - - docs/models/operations/GetSearchAllLibrariesResponseBody.md - - docs/models/operations/GetSearchAllLibrariesRole.md - - docs/models/operations/GetSearchAllLibrariesShowOrdering.md - - docs/models/operations/GetSearchAllLibrariesType.md - - docs/models/operations/GetSearchAllLibrariesUltraBlurColors.md - - docs/models/operations/GetSearchAllLibrariesWriter.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 - - docs/models/operations/GetSearchResultsCountry.md - - docs/models/operations/GetSearchResultsDirector.md - - docs/models/operations/GetSearchResultsGenre.md - - docs/models/operations/GetSearchResultsMedia.md - - docs/models/operations/GetSearchResultsMediaContainer.md - - docs/models/operations/GetSearchResultsMetadata.md - - docs/models/operations/GetSearchResultsPart.md - - docs/models/operations/GetSearchResultsRequest.md - - docs/models/operations/GetSearchResultsResponse.md - - docs/models/operations/GetSearchResultsResponseBody.md - - docs/models/operations/GetSearchResultsRole.md - - docs/models/operations/GetSearchResultsWriter.md - - docs/models/operations/GetServerActivitiesMediaContainer.md - - docs/models/operations/GetServerActivitiesResponse.md - - docs/models/operations/GetServerActivitiesResponseBody.md - - docs/models/operations/GetServerCapabilitiesResponse.md - - docs/models/operations/GetServerCapabilitiesResponseBody.md - - docs/models/operations/GetServerIdentityMediaContainer.md - - docs/models/operations/GetServerIdentityResponse.md - - docs/models/operations/GetServerIdentityResponseBody.md - - docs/models/operations/GetServerListMediaContainer.md - - docs/models/operations/GetServerListResponse.md - - docs/models/operations/GetServerListResponseBody.md - - docs/models/operations/GetServerListServer.md - - docs/models/operations/GetServerPreferencesMediaContainer.md - - docs/models/operations/GetServerPreferencesResponse.md - - docs/models/operations/GetServerPreferencesResponseBody.md - - docs/models/operations/GetServerResourcesRequest.md - - docs/models/operations/GetServerResourcesResponse.md - - docs/models/operations/GetSessionHistoryMediaContainer.md - - docs/models/operations/GetSessionHistoryMetadata.md - - docs/models/operations/GetSessionHistoryRequest.md - - docs/models/operations/GetSessionHistoryResponse.md - - docs/models/operations/GetSessionHistoryResponseBody.md - - docs/models/operations/GetSessionsMedia.md - - docs/models/operations/GetSessionsMediaContainer.md - - docs/models/operations/GetSessionsMetadata.md - - docs/models/operations/GetSessionsPart.md + - docs/models/operations/GetPostplayHubsRequest.md + - docs/models/operations/GetPostplayHubsResponse.md + - docs/models/operations/GetPreferenceRequest.md + - docs/models/operations/GetPreferenceResponse.md + - docs/models/operations/GetPromotedHubsMediaContainer.md + - docs/models/operations/GetPromotedHubsRequest.md + - docs/models/operations/GetPromotedHubsResponse.md + - docs/models/operations/GetPromotedHubsResponseBody.md + - docs/models/operations/GetRandomArtworkRequest.md + - docs/models/operations/GetRandomArtworkResponse.md + - docs/models/operations/GetRelatedHubsRequest.md + - docs/models/operations/GetRelatedHubsResponse.md + - docs/models/operations/GetRelatedItemsMediaContainer.md + - docs/models/operations/GetRelatedItemsRequest.md + - docs/models/operations/GetRelatedItemsResponse.md + - docs/models/operations/GetRelatedItemsResponseBody.md + - docs/models/operations/GetScheduledRecordingsMediaContainer.md + - docs/models/operations/GetScheduledRecordingsResponse.md + - docs/models/operations/GetScheduledRecordingsResponseBody.md + - docs/models/operations/GetSectionFiltersMediaContainer.md + - docs/models/operations/GetSectionFiltersRequest.md + - docs/models/operations/GetSectionFiltersResponse.md + - docs/models/operations/GetSectionFiltersResponseBody.md + - docs/models/operations/GetSectionHubsMediaContainer.md + - docs/models/operations/GetSectionHubsRequest.md + - docs/models/operations/GetSectionHubsResponse.md + - docs/models/operations/GetSectionHubsResponseBody.md + - docs/models/operations/GetSectionImageRequest.md + - docs/models/operations/GetSectionImageResponse.md + - docs/models/operations/GetSectionPreferencesRequest.md + - docs/models/operations/GetSectionPreferencesResponse.md + - docs/models/operations/GetSectionsMediaContainer.md + - docs/models/operations/GetSectionsPrefsRequest.md + - docs/models/operations/GetSectionsPrefsResponse.md + - docs/models/operations/GetSectionsResponse.md + - docs/models/operations/GetSectionsResponseBody.md + - docs/models/operations/GetServerInfoRequest.md + - docs/models/operations/GetServerInfoResponse.md + - docs/models/operations/GetSessionPlaylistIndexRequest.md + - docs/models/operations/GetSessionPlaylistIndexResponse.md + - docs/models/operations/GetSessionSegmentRequest.md + - docs/models/operations/GetSessionSegmentResponse.md - docs/models/operations/GetSessionsResponse.md - - docs/models/operations/GetSessionsResponseBody.md - - docs/models/operations/GetSessionsStream.md - - docs/models/operations/GetSessionsUser.md + - docs/models/operations/GetSonicPathRequest.md + - docs/models/operations/GetSonicPathResponse.md + - docs/models/operations/GetSonicallySimilarRequest.md + - docs/models/operations/GetSonicallySimilarResponse.md + - docs/models/operations/GetSourceConnectionInformationMediaContainer.md - docs/models/operations/GetSourceConnectionInformationRequest.md - docs/models/operations/GetSourceConnectionInformationResponse.md - - docs/models/operations/GetStatisticsDevice.md - - docs/models/operations/GetStatisticsMediaContainer.md - - docs/models/operations/GetStatisticsRequest.md - - docs/models/operations/GetStatisticsResponse.md - - docs/models/operations/GetStatisticsResponseBody.md - - docs/models/operations/GetThumbImageRequest.md - - docs/models/operations/GetThumbImageResponse.md - - docs/models/operations/GetTimelineRequest.md - - docs/models/operations/GetTimelineResponse.md - - docs/models/operations/GetTokenByPinIdAuthPinContainer.md - - docs/models/operations/GetTokenByPinIdGeoData.md - - docs/models/operations/GetTokenByPinIdRequest.md - - docs/models/operations/GetTokenByPinIdResponse.md - - docs/models/operations/GetTokenDetailsAuthenticationResponseStatus.md - - docs/models/operations/GetTokenDetailsAuthenticationStatus.md - - docs/models/operations/GetTokenDetailsResponse.md - - docs/models/operations/GetTokenDetailsStatus.md - - docs/models/operations/GetTokenDetailsSubscription.md - - docs/models/operations/GetTokenDetailsUserPlexAccount.md - - docs/models/operations/GetTopWatchedContentCountry.md - - docs/models/operations/GetTopWatchedContentGenre.md - - docs/models/operations/GetTopWatchedContentGuids.md - - docs/models/operations/GetTopWatchedContentMediaContainer.md - - docs/models/operations/GetTopWatchedContentMetadata.md - - docs/models/operations/GetTopWatchedContentQueryParamIncludeGuids.md - - docs/models/operations/GetTopWatchedContentQueryParamType.md - - docs/models/operations/GetTopWatchedContentRequest.md - - docs/models/operations/GetTopWatchedContentResponse.md - - docs/models/operations/GetTopWatchedContentResponseBody.md - - docs/models/operations/GetTopWatchedContentRole.md - - docs/models/operations/GetTopWatchedContentUser.md - - docs/models/operations/GetTranscodeSessionsMediaContainer.md - - docs/models/operations/GetTranscodeSessionsResponse.md - - docs/models/operations/GetTranscodeSessionsResponseBody.md - - docs/models/operations/GetTransientTokenQueryParamType.md + - docs/models/operations/GetSourceConnectionInformationResponseBody.md + - docs/models/operations/GetStreamLevelsLevel.md + - docs/models/operations/GetStreamLevelsMediaContainer.md + - docs/models/operations/GetStreamLevelsRequest.md + - docs/models/operations/GetStreamLevelsResponse.md + - docs/models/operations/GetStreamLevelsResponseBody.md + - docs/models/operations/GetStreamLoudnessRequest.md + - docs/models/operations/GetStreamLoudnessResponse.md + - docs/models/operations/GetStreamRequest.md + - docs/models/operations/GetStreamResponse.md + - docs/models/operations/GetSubscriptionRequest.md + - docs/models/operations/GetSubscriptionResponse.md + - docs/models/operations/GetTagsMediaContainer.md + - docs/models/operations/GetTagsRequest.md + - docs/models/operations/GetTagsResponse.md + - docs/models/operations/GetTagsResponseBody.md + - docs/models/operations/GetTasksResponse.md + - docs/models/operations/GetTasksResponseBody.md + - docs/models/operations/GetTemplateMediaContainer.md + - docs/models/operations/GetTemplateRequest.md + - docs/models/operations/GetTemplateResponse.md + - docs/models/operations/GetTemplateResponseBody.md + - docs/models/operations/GetThumbRequest.md + - docs/models/operations/GetThumbResponse.md + - docs/models/operations/GetTransientTokenMediaContainer.md - docs/models/operations/GetTransientTokenRequest.md - docs/models/operations/GetTransientTokenResponse.md - - docs/models/operations/GetUpdateStatusMediaContainer.md - - docs/models/operations/GetUpdateStatusResponse.md - - docs/models/operations/GetUpdateStatusResponseBody.md - - docs/models/operations/GetUserFriendsResponse.md - - docs/models/operations/GetUsersMediaContainer.md - - docs/models/operations/GetUsersRequest.md - - docs/models/operations/GetUsersResponse.md - - docs/models/operations/GetUsersResponseBody.md - - docs/models/operations/GetUsersServer.md - - docs/models/operations/GetWatchListRequest.md - - docs/models/operations/GetWatchListResponse.md - - docs/models/operations/GetWatchListResponseBody.md - - docs/models/operations/Guids.md - - docs/models/operations/HasThumbnail.md - - docs/models/operations/Hidden.md - - docs/models/operations/Home.md + - docs/models/operations/GetTransientTokenResponseBody.md + - docs/models/operations/GetUpdatesStatusMediaContainer.md + - docs/models/operations/GetUpdatesStatusResponse.md + - docs/models/operations/GetUpdatesStatusResponseBody.md + - docs/models/operations/GetUpdatesStatusState.md + - docs/models/operations/Hints.md + - docs/models/operations/HomeVisibility.md - docs/models/operations/Hub.md - - docs/models/operations/Image.md - - docs/models/operations/IncludeAdvanced.md - - docs/models/operations/IncludeCollections.md - - docs/models/operations/IncludeDetails.md - - docs/models/operations/IncludeExternalMedia.md - - docs/models/operations/IncludeGuids.md - - docs/models/operations/IncludeHttps.md - - docs/models/operations/IncludeIPv6.md - - docs/models/operations/IncludeMeta.md - - docs/models/operations/IncludeRelay.md - - docs/models/operations/InternalPaymentMethod.md + - docs/models/operations/Index.md + - docs/models/operations/IngestTransientItemRequest.md + - docs/models/operations/IngestTransientItemResponse.md + - docs/models/operations/Item.md + - docs/models/operations/Language.md - docs/models/operations/Level.md - - docs/models/operations/Libtype.md + - docs/models/operations/Lineup.md + - docs/models/operations/LineupType.md + - docs/models/operations/ListActivitiesMediaContainer.md + - docs/models/operations/ListActivitiesResponse.md + - docs/models/operations/ListActivitiesResponseBody.md + - docs/models/operations/ListContentRequest.md + - docs/models/operations/ListContentResponse.md + - docs/models/operations/ListDVRsDVRsMediaContainer.md + - docs/models/operations/ListDVRsMediaContainer.md + - docs/models/operations/ListDVRsResponse.md + - docs/models/operations/ListDVRsResponseBody.md + - docs/models/operations/ListDevicesResponse.md + - docs/models/operations/ListDownloadQueueItemsMediaContainer.md + - docs/models/operations/ListDownloadQueueItemsRequest.md + - docs/models/operations/ListDownloadQueueItemsResponse.md + - docs/models/operations/ListDownloadQueueItemsResponseBody.md + - docs/models/operations/ListDownloadQueueItemsStatus.md + - docs/models/operations/ListHubsMediaContainer.md + - docs/models/operations/ListHubsRequest.md + - docs/models/operations/ListHubsResponse.md + - docs/models/operations/ListHubsResponseBody.md + - docs/models/operations/ListLineupsRequest.md + - docs/models/operations/ListLineupsResponse.md + - docs/models/operations/ListMatchesRequest.md + - docs/models/operations/ListMatchesResponse.md + - docs/models/operations/ListMomentsRequest.md + - docs/models/operations/ListMomentsResponse.md + - docs/models/operations/ListPersonMediaRequest.md + - docs/models/operations/ListPersonMediaResponse.md + - docs/models/operations/ListPlaybackHistoryMediaContainer.md + - docs/models/operations/ListPlaybackHistoryMetadata.md + - docs/models/operations/ListPlaybackHistoryRequest.md + - docs/models/operations/ListPlaybackHistoryResponse.md + - docs/models/operations/ListPlaybackHistoryResponseBody.md + - docs/models/operations/ListPlaylistsRequest.md + - docs/models/operations/ListPlaylistsResponse.md + - docs/models/operations/ListProvidersMediaContainer.md + - docs/models/operations/ListProvidersResponse.md + - docs/models/operations/ListProvidersResponseBody.md + - docs/models/operations/ListSessionsMediaContainer.md + - docs/models/operations/ListSessionsResponse.md + - docs/models/operations/ListSessionsResponseBody.md + - docs/models/operations/ListSimilarRequest.md + - docs/models/operations/ListSimilarResponse.md + - docs/models/operations/ListSonicallySimilarRequest.md + - docs/models/operations/ListSonicallySimilarResponse.md + - docs/models/operations/ListTopUsersMediaContainer.md + - docs/models/operations/ListTopUsersRequest.md + - docs/models/operations/ListTopUsersResponse.md + - docs/models/operations/ListTopUsersResponseBody.md - docs/models/operations/Location.md - - docs/models/operations/LogLineRequest.md - - docs/models/operations/LogLineResponse.md - - docs/models/operations/LogMultiLineResponse.md - - docs/models/operations/MailingListStatus.md + - docs/models/operations/MakeDecisionRequest.md + - docs/models/operations/MakeDecisionResponse.md - docs/models/operations/MarkPlayedRequest.md - docs/models/operations/MarkPlayedResponse.md - - docs/models/operations/MarkUnplayedRequest.md - - docs/models/operations/MarkUnplayedResponse.md - - docs/models/operations/Marker.md - - docs/models/operations/Media.md + - docs/models/operations/MatchItemRequest.md + - docs/models/operations/MatchItemResponse.md - docs/models/operations/MediaContainer.md - - docs/models/operations/MediaProvider.md - - docs/models/operations/MediaReviewsVisibility.md - - docs/models/operations/Meta.md + - docs/models/operations/MediaGrabber.md + - docs/models/operations/MediaSettings.md + - docs/models/operations/MediaSubscription.md + - docs/models/operations/MergeItemsRequest.md + - docs/models/operations/MergeItemsResponse.md - docs/models/operations/Metadata.md - - docs/models/operations/MinSize.md - - docs/models/operations/MyPlex.md - - docs/models/operations/One.md - - docs/models/operations/OnlyTransient.md - - docs/models/operations/Operator.md - - docs/models/operations/OptimizedForStreaming.md - - docs/models/operations/OptimizedForStreaming1.md - - docs/models/operations/Owned.md - - docs/models/operations/Part.md - - docs/models/operations/PastSubscription.md - - docs/models/operations/PathParamTaskName.md - - docs/models/operations/Pending.md - - docs/models/operations/PerformSearchRequest.md - - docs/models/operations/PerformSearchResponse.md - - docs/models/operations/PerformVoiceSearchRequest.md - - docs/models/operations/PerformVoiceSearchResponse.md - - docs/models/operations/Pivot.md - - docs/models/operations/Player.md + - docs/models/operations/ModifyDeviceMediaContainer.md + - docs/models/operations/ModifyDeviceRequest.md + - docs/models/operations/ModifyDeviceResponse.md + - docs/models/operations/ModifyDeviceResponseBody.md + - docs/models/operations/MoveCollectionItemRequest.md + - docs/models/operations/MoveCollectionItemResponse.md + - docs/models/operations/MoveHubRequest.md + - docs/models/operations/MoveHubResponse.md + - docs/models/operations/MovePlayQueueItemRequest.md + - docs/models/operations/MovePlayQueueItemResponse.md + - docs/models/operations/MovePlaylistItemRequest.md + - docs/models/operations/MovePlaylistItemResponse.md + - docs/models/operations/OptimizeDatabaseRequest.md + - docs/models/operations/OptimizeDatabaseResponse.md + - docs/models/operations/Params.md + - docs/models/operations/PathParamElement.md + - docs/models/operations/PathParamIndex.md + - docs/models/operations/PathParamTask.md + - docs/models/operations/PlayQueueGenerator.md - docs/models/operations/PlaylistType.md - - docs/models/operations/PlexDevice.md - - docs/models/operations/PostMediaArtsRequest.md - - docs/models/operations/PostMediaArtsResponse.md - - docs/models/operations/PostMediaPosterRequest.md - - docs/models/operations/PostMediaPosterResponse.md - - docs/models/operations/PostUsersSignInDataAuthenticationResponseStatus.md - - docs/models/operations/PostUsersSignInDataAuthenticationStatus.md - - docs/models/operations/PostUsersSignInDataAuthenticationSubscription.md - - docs/models/operations/PostUsersSignInDataAutoSelectSubtitle.md - - docs/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.md - - docs/models/operations/PostUsersSignInDataDefaultSubtitleForced.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 - - docs/models/operations/PostUsersSignInDataState.md - - docs/models/operations/PostUsersSignInDataStatus.md - - docs/models/operations/PostUsersSignInDataSubscription.md - - docs/models/operations/PostUsersSignInDataUserPlexAccount.md - - docs/models/operations/PostUsersSignInDataUserProfile.md - - docs/models/operations/PostUsersSignInDataWatchedIndicator.md - - docs/models/operations/Producer.md - - docs/models/operations/Protected.md + - docs/models/operations/Policy.md + - docs/models/operations/Prefs.md + - docs/models/operations/ProcessSubscriptionsResponse.md + - docs/models/operations/ProcessingState.md + - docs/models/operations/ProcessingStateContext.md - docs/models/operations/Protocol.md - - docs/models/operations/Provider.md - - docs/models/operations/QueryParamFilter.md - - docs/models/operations/QueryParamForce.md - - docs/models/operations/QueryParamIncludeCollections.md - - docs/models/operations/QueryParamIncludeExternalMedia.md - - docs/models/operations/QueryParamIncludeGuids.md - - docs/models/operations/QueryParamIncludeMeta.md - - docs/models/operations/QueryParamOnlyTransient.md - - docs/models/operations/QueryParamSmart.md + - docs/models/operations/QueryParamArgs.md + - docs/models/operations/QueryParamAttributes.md + - docs/models/operations/QueryParamLocation.md + - docs/models/operations/QueryParamPrefs.md + - docs/models/operations/QueryParamProtocol.md + - docs/models/operations/QueryParamSubtitles.md - docs/models/operations/QueryParamType.md - - docs/models/operations/Rating.md - - docs/models/operations/Ratings.md + - docs/models/operations/RecommendationsVisibility.md + - docs/models/operations/RefreshItemsMetadataRequest.md + - docs/models/operations/RefreshItemsMetadataResponse.md + - docs/models/operations/RefreshPlaylistRequest.md + - docs/models/operations/RefreshPlaylistResponse.md + - docs/models/operations/RefreshProvidersResponse.md + - docs/models/operations/RefreshSectionRequest.md + - docs/models/operations/RefreshSectionResponse.md + - docs/models/operations/RefreshSectionsMetadataRequest.md + - docs/models/operations/RefreshSectionsMetadataResponse.md - docs/models/operations/Release.md - - docs/models/operations/ResponseBody.md - - docs/models/operations/Restricted.md - - docs/models/operations/Role.md + - docs/models/operations/ReloadGuideRequest.md + - docs/models/operations/ReloadGuideResponse.md + - docs/models/operations/RemoveDeviceFromDVRDVR.md + - docs/models/operations/RemoveDeviceFromDVRDVRsMediaContainer.md + - docs/models/operations/RemoveDeviceFromDVRMediaContainer.md + - docs/models/operations/RemoveDeviceFromDVRRequest.md + - docs/models/operations/RemoveDeviceFromDVRResponse.md + - docs/models/operations/RemoveDeviceFromDVRResponseBody.md + - docs/models/operations/RemoveDeviceMediaContainer.md + - docs/models/operations/RemoveDeviceRequest.md + - docs/models/operations/RemoveDeviceResponse.md + - docs/models/operations/RemoveDeviceResponseBody.md + - docs/models/operations/RemoveDownloadQueueItemsRequest.md + - docs/models/operations/RemoveDownloadQueueItemsResponse.md + - docs/models/operations/ReorderSubscriptionRequest.md + - docs/models/operations/ReorderSubscriptionResponse.md + - docs/models/operations/ReportRequest.md + - docs/models/operations/ReportResponse.md + - docs/models/operations/ReportResponseBody.md + - docs/models/operations/ResetPlayQueueRequest.md + - docs/models/operations/ResetPlayQueueResponse.md + - docs/models/operations/ResetSectionDefaultsRequest.md + - docs/models/operations/ResetSectionDefaultsResponse.md + - docs/models/operations/RestartProcessingDownloadQueueItemsRequest.md + - docs/models/operations/RestartProcessingDownloadQueueItemsResponse.md + - docs/models/operations/ScanRequest.md + - docs/models/operations/ScanResponse.md - docs/models/operations/Scope.md - - docs/models/operations/SearchResult.md - - docs/models/operations/SearchTypes.md - - docs/models/operations/Server.md - - docs/models/operations/Services.md - - docs/models/operations/Session.md - - docs/models/operations/Setting.md - - docs/models/operations/SharedServers.md - - docs/models/operations/SharedSources.md - - docs/models/operations/ShowOrdering.md - - docs/models/operations/Similar.md - - docs/models/operations/Skip.md - - docs/models/operations/Smart.md - - docs/models/operations/Sort.md - - docs/models/operations/StartAllTasksResponse.md + - docs/models/operations/SearchHubsMediaContainer.md + - docs/models/operations/SearchHubsRequest.md + - docs/models/operations/SearchHubsResponse.md + - docs/models/operations/SearchHubsResponseBody.md + - docs/models/operations/SetChannelmapRequest.md + - docs/models/operations/SetChannelmapResponse.md + - docs/models/operations/SetDVRPreferencesDVR.md + - docs/models/operations/SetDVRPreferencesDVRsMediaContainer.md + - docs/models/operations/SetDVRPreferencesMediaContainer.md + - docs/models/operations/SetDVRPreferencesRequest.md + - docs/models/operations/SetDVRPreferencesResponse.md + - docs/models/operations/SetDVRPreferencesResponseBody.md + - docs/models/operations/SetDevicePreferencesRequest.md + - docs/models/operations/SetDevicePreferencesResponse.md + - docs/models/operations/SetItemArtworkRequest.md + - docs/models/operations/SetItemArtworkResponse.md + - docs/models/operations/SetItemPreferencesRequest.md + - docs/models/operations/SetItemPreferencesResponse.md + - docs/models/operations/SetPreferencesRequest.md + - docs/models/operations/SetPreferencesResponse.md + - docs/models/operations/SetRatingRequest.md + - docs/models/operations/SetRatingResponse.md + - docs/models/operations/SetSectionPreferencesQueryParamPrefs.md + - docs/models/operations/SetSectionPreferencesRequest.md + - docs/models/operations/SetSectionPreferencesResponse.md + - docs/models/operations/SetStreamOffsetRequest.md + - docs/models/operations/SetStreamOffsetResponse.md + - docs/models/operations/SetStreamSelectionRequest.md + - docs/models/operations/SetStreamSelectionResponse.md + - docs/models/operations/ShuffleRequest.md + - docs/models/operations/ShuffleResponse.md + - docs/models/operations/SplitItemRequest.md + - docs/models/operations/SplitItemResponse.md + - docs/models/operations/StartAnalysisRequest.md + - docs/models/operations/StartAnalysisResponse.md + - docs/models/operations/StartBifGenerationRequest.md + - docs/models/operations/StartBifGenerationResponse.md - docs/models/operations/StartTaskRequest.md - docs/models/operations/StartTaskResponse.md - - docs/models/operations/StartUniversalTranscodeRequest.md - - docs/models/operations/StartUniversalTranscodeResponse.md + - docs/models/operations/StartTasksResponse.md + - docs/models/operations/StartTranscodeSessionQueryParamLocation.md + - docs/models/operations/StartTranscodeSessionQueryParamProtocol.md + - docs/models/operations/StartTranscodeSessionQueryParamSubtitles.md + - docs/models/operations/StartTranscodeSessionRequest.md + - docs/models/operations/StartTranscodeSessionResponse.md - docs/models/operations/State.md - - docs/models/operations/StatisticsBandwidth.md - - docs/models/operations/StatisticsMedia.md - - docs/models/operations/StatisticsResources.md - docs/models/operations/Status.md - - docs/models/operations/StopAllTasksResponse.md + - docs/models/operations/StopAllRefreshesResponse.md + - docs/models/operations/StopDVRReloadRequest.md + - docs/models/operations/StopDVRReloadResponse.md + - docs/models/operations/StopScanRequest.md + - docs/models/operations/StopScanResponse.md - docs/models/operations/StopTaskRequest.md - docs/models/operations/StopTaskResponse.md - - docs/models/operations/StopTranscodeSessionRequest.md - - docs/models/operations/StopTranscodeSessionResponse.md - - docs/models/operations/Stream.md - - docs/models/operations/Subscription.md - - docs/models/operations/Tag.md - - docs/models/operations/TaskName.md - - docs/models/operations/Tonight.md - - docs/models/operations/TranscodeSession.md - - docs/models/operations/Trials.md + - docs/models/operations/StopTasksResponse.md + - docs/models/operations/SubscriptionTemplate.md + - docs/models/operations/Subtitles.md + - docs/models/operations/Task.md + - docs/models/operations/TerminateSessionRequest.md + - docs/models/operations/TerminateSessionResponse.md + - docs/models/operations/Transcode.md + - docs/models/operations/TranscodeImageRequest.md + - docs/models/operations/TranscodeImageResponse.md + - docs/models/operations/TranscodeJob.md + - docs/models/operations/TranscodeSubtitlesRequest.md + - docs/models/operations/TranscodeSubtitlesResponse.md + - docs/models/operations/TriggerFallbackRequest.md + - docs/models/operations/TriggerFallbackResponse.md + - docs/models/operations/TuneChannelRequest.md + - docs/models/operations/TuneChannelResponse.md - docs/models/operations/Type.md - docs/models/operations/UltraBlurColors.md - - docs/models/operations/UpdatePlayProgressRequest.md - - docs/models/operations/UpdatePlayProgressResponse.md + - docs/models/operations/UnmatchRequest.md + - docs/models/operations/UnmatchResponse.md + - docs/models/operations/UnscrobbleRequest.md + - docs/models/operations/UnscrobbleResponse.md + - docs/models/operations/UnshuffleRequest.md + - docs/models/operations/UnshuffleResponse.md + - docs/models/operations/UpdateHubVisibilityRequest.md + - docs/models/operations/UpdateHubVisibilityResponse.md + - docs/models/operations/UpdateItemArtworkRequest.md + - docs/models/operations/UpdateItemArtworkResponse.md + - docs/models/operations/UpdateItemsRequest.md + - docs/models/operations/UpdateItemsResponse.md - docs/models/operations/UpdatePlaylistRequest.md - docs/models/operations/UpdatePlaylistResponse.md - docs/models/operations/UploadPlaylistRequest.md - docs/models/operations/UploadPlaylistResponse.md - - docs/models/operations/Upscale.md - - docs/models/operations/User.md - - docs/models/operations/UserProfile.md - - docs/models/operations/WatchedIndicator.md - - docs/models/operations/Writer.md + - docs/models/operations/VoiceSearchHubsMediaContainer.md + - docs/models/operations/VoiceSearchHubsRequest.md + - docs/models/operations/VoiceSearchHubsResponse.md + - docs/models/operations/VoiceSearchHubsResponseBody.md + - docs/models/operations/WriteLogResponse.md + - docs/models/operations/WriteMessageRequest.md + - docs/models/operations/WriteMessageResponse.md + - docs/models/shared/Accepts.md + - docs/models/shared/AdvancedSubtitles.md + - docs/models/shared/AiringsType.md + - docs/models/shared/BoolInt.md + - docs/models/shared/Channel.md + - docs/models/shared/ChannelMapping.md + - docs/models/shared/Composite.md + - docs/models/shared/CompositeMedia.md + - docs/models/shared/Crop.md + - docs/models/shared/Decision.md + - docs/models/shared/Default.md + - docs/models/shared/DefaultDirection.md + - docs/models/shared/Device.md + - docs/models/shared/Directory.md + - docs/models/shared/Dvr.md + - docs/models/shared/DvrRequestHandlerSlashGetResponses200.md + - docs/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainer.md + - docs/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer.md + - docs/models/shared/Filter.md + - docs/models/shared/FilterPivot.md + - docs/models/shared/Format.md + - docs/models/shared/GetResponses200.md + - docs/models/shared/GetResponses200Hub.md + - docs/models/shared/GetResponses200MediaContainer.md + - docs/models/shared/HistoryAllGetResponses200.md + - docs/models/shared/HistoryAllGetResponses200MediaContainer.md + - docs/models/shared/HistoryAllGetResponses200Metadata.md + - docs/models/shared/HomeVisibility.md + - docs/models/shared/Hub.md + - docs/models/shared/Image.md + - docs/models/shared/ImageType.md + - docs/models/shared/Items.md + - docs/models/shared/LibrarySection.md + - docs/models/shared/LibrarySectionLocation.md + - docs/models/shared/Lineup.md + - docs/models/shared/LineupType.md + - docs/models/shared/Location.md + - docs/models/shared/Media.md + - docs/models/shared/MediaContainer.md + - docs/models/shared/MediaContainerWithArtwork.md + - docs/models/shared/MediaContainerWithArtworkMediaContainer.md + - docs/models/shared/MediaContainerWithArtworkMetadata.md + - docs/models/shared/MediaContainerWithArtworkType.md + - docs/models/shared/MediaContainerWithDecision.md + - docs/models/shared/MediaContainerWithDecisionDecision.md + - docs/models/shared/MediaContainerWithDecisionLocation.md + - docs/models/shared/MediaContainerWithDecisionMedia.md + - docs/models/shared/MediaContainerWithDecisionMediaContainer.md + - docs/models/shared/MediaContainerWithDecisionMetadata.md + - docs/models/shared/MediaContainerWithDecisionPart.md + - docs/models/shared/MediaContainerWithDecisionStream.md + - docs/models/shared/MediaContainerWithDevice.md + - docs/models/shared/MediaContainerWithDeviceDevice.md + - docs/models/shared/MediaContainerWithDeviceMediaContainer.md + - docs/models/shared/MediaContainerWithDirectory.md + - docs/models/shared/MediaContainerWithDirectoryMediaContainer.md + - docs/models/shared/MediaContainerWithHubs.md + - docs/models/shared/MediaContainerWithHubsMediaContainer.md + - docs/models/shared/MediaContainerWithLineup.md + - docs/models/shared/MediaContainerWithLineupMediaContainer.md + - docs/models/shared/MediaContainerWithMetadata.md + - docs/models/shared/MediaContainerWithMetadataMediaContainer.md + - docs/models/shared/MediaContainerWithNestedMetadata.md + - docs/models/shared/MediaContainerWithNestedMetadataMediaContainer.md + - docs/models/shared/MediaContainerWithPlaylistMetadata.md + - docs/models/shared/MediaContainerWithPlaylistMetadataMediaContainer.md + - docs/models/shared/MediaContainerWithPlaylistMetadataMetadata.md + - docs/models/shared/MediaContainerWithSettings.md + - docs/models/shared/MediaContainerWithSettingsMediaContainer.md + - docs/models/shared/MediaContainerWithSubscription.md + - docs/models/shared/MediaContainerWithSubscriptionMediaContainer.md + - docs/models/shared/MediaGrabOperation.md + - docs/models/shared/MediaQuery.md + - docs/models/shared/MediaSubscription.md + - docs/models/shared/Metadata.md + - docs/models/shared/MetadataItem.md + - docs/models/shared/Part.md + - docs/models/shared/Pivot.md + - docs/models/shared/Player.md + - docs/models/shared/PlaylistType.md + - docs/models/shared/PostResponses200.md + - docs/models/shared/PostResponses200MediaContainer.md + - docs/models/shared/PostResponses200Type.md + - docs/models/shared/Protocol.md + - docs/models/shared/RecommendationsVisibility.md + - docs/models/shared/RequestHandlerSlashGetResponses200.md + - docs/models/shared/RequestHandlerSlashGetResponses200Directory.md + - docs/models/shared/RequestHandlerSlashGetResponses200MediaContainer.md - docs/models/shared/Security.md + - docs/models/shared/Session.md + - docs/models/shared/SessionLocation.md + - docs/models/shared/Setting.md + - docs/models/shared/SlashGetResponses200.md + - docs/models/shared/SlashGetResponses200MediaContainer.md + - docs/models/shared/Sort.md + - docs/models/shared/SortDefault.md + - docs/models/shared/SortPivot.md + - docs/models/shared/Status.md + - docs/models/shared/Stream.md + - docs/models/shared/Subtitles.md + - docs/models/shared/Tag.md + - docs/models/shared/TranscodeSession.md + - docs/models/shared/TranscodeType.md + - docs/models/shared/Type.md + - docs/models/shared/User.md + - docs/models/shared/Value.md - docs/sdks/activities/README.md - - docs/sdks/authentication/README.md - docs/sdks/butler/README.md + - docs/sdks/collections/README.md + - docs/sdks/content/README.md + - docs/sdks/devices/README.md + - docs/sdks/downloadqueue/README.md + - docs/sdks/dvrs/README.md + - docs/sdks/epg/README.md + - docs/sdks/events/README.md + - docs/sdks/general/README.md - docs/sdks/hubs/README.md - docs/sdks/library/README.md + - docs/sdks/librarycollections/README.md + - docs/sdks/libraryplaylists/README.md + - docs/sdks/livetv/README.md - docs/sdks/log/README.md - - docs/sdks/media/README.md - - docs/sdks/playlists/README.md - - docs/sdks/plex/README.md + - docs/sdks/playlist/README.md + - docs/sdks/playqueue/README.md - docs/sdks/plexapi/README.md + - docs/sdks/preferences/README.md + - docs/sdks/provider/README.md + - docs/sdks/rate/README.md - docs/sdks/search/README.md - - docs/sdks/server/README.md - - docs/sdks/sessions/README.md - - docs/sdks/statistics/README.md + - docs/sdks/status/README.md + - docs/sdks/subscriptions/README.md + - docs/sdks/timeline/README.md + - docs/sdks/transcoder/README.md + - docs/sdks/ultrablur/README.md - docs/sdks/updater/README.md - - docs/sdks/users/README.md - - docs/sdks/video/README.md - - docs/sdks/watchlist/README.md - docs/utils/Blob.md - gradle.properties - gradle/wrapper/gradle-wrapper.jar @@ -972,1449 +860,1803 @@ generatedFiles: - settings.gradle - src/main/java/dev/plexapi/sdk/Activities.java - src/main/java/dev/plexapi/sdk/AsyncActivities.java - - src/main/java/dev/plexapi/sdk/AsyncAuthentication.java - src/main/java/dev/plexapi/sdk/AsyncButler.java + - src/main/java/dev/plexapi/sdk/AsyncCollections.java + - src/main/java/dev/plexapi/sdk/AsyncContent.java + - src/main/java/dev/plexapi/sdk/AsyncDVRs.java + - src/main/java/dev/plexapi/sdk/AsyncDevices.java + - src/main/java/dev/plexapi/sdk/AsyncDownloadQueue.java + - src/main/java/dev/plexapi/sdk/AsyncEpg.java + - src/main/java/dev/plexapi/sdk/AsyncEvents.java + - src/main/java/dev/plexapi/sdk/AsyncGeneral.java - src/main/java/dev/plexapi/sdk/AsyncHubs.java - src/main/java/dev/plexapi/sdk/AsyncLibrary.java + - src/main/java/dev/plexapi/sdk/AsyncLibraryCollections.java + - src/main/java/dev/plexapi/sdk/AsyncLibraryPlaylists.java + - src/main/java/dev/plexapi/sdk/AsyncLiveTV.java - src/main/java/dev/plexapi/sdk/AsyncLog.java - - src/main/java/dev/plexapi/sdk/AsyncMedia.java - - src/main/java/dev/plexapi/sdk/AsyncPlaylists.java - - src/main/java/dev/plexapi/sdk/AsyncPlex.java + - src/main/java/dev/plexapi/sdk/AsyncPlayQueue.java + - src/main/java/dev/plexapi/sdk/AsyncPlaylist.java - src/main/java/dev/plexapi/sdk/AsyncPlexAPI.java + - src/main/java/dev/plexapi/sdk/AsyncPreferences.java + - src/main/java/dev/plexapi/sdk/AsyncProvider.java + - src/main/java/dev/plexapi/sdk/AsyncRate.java - src/main/java/dev/plexapi/sdk/AsyncSearch.java - - src/main/java/dev/plexapi/sdk/AsyncServer.java - - src/main/java/dev/plexapi/sdk/AsyncSessions.java - - src/main/java/dev/plexapi/sdk/AsyncStatistics.java + - src/main/java/dev/plexapi/sdk/AsyncStatus.java + - src/main/java/dev/plexapi/sdk/AsyncSubscriptions.java + - src/main/java/dev/plexapi/sdk/AsyncTimeline.java + - src/main/java/dev/plexapi/sdk/AsyncTranscoder.java + - src/main/java/dev/plexapi/sdk/AsyncUltraBlur.java - src/main/java/dev/plexapi/sdk/AsyncUpdater.java - - src/main/java/dev/plexapi/sdk/AsyncUsers.java - - src/main/java/dev/plexapi/sdk/AsyncVideo.java - - src/main/java/dev/plexapi/sdk/AsyncWatchlist.java - - src/main/java/dev/plexapi/sdk/Authentication.java - src/main/java/dev/plexapi/sdk/Butler.java + - src/main/java/dev/plexapi/sdk/Collections.java + - src/main/java/dev/plexapi/sdk/Content.java + - src/main/java/dev/plexapi/sdk/DVRs.java + - src/main/java/dev/plexapi/sdk/Devices.java + - src/main/java/dev/plexapi/sdk/DownloadQueue.java + - src/main/java/dev/plexapi/sdk/Epg.java + - src/main/java/dev/plexapi/sdk/Events.java + - src/main/java/dev/plexapi/sdk/General.java - src/main/java/dev/plexapi/sdk/Hubs.java - src/main/java/dev/plexapi/sdk/Library.java + - src/main/java/dev/plexapi/sdk/LibraryCollections.java + - src/main/java/dev/plexapi/sdk/LibraryPlaylists.java + - src/main/java/dev/plexapi/sdk/LiveTV.java - src/main/java/dev/plexapi/sdk/Log.java - - src/main/java/dev/plexapi/sdk/Media.java - - src/main/java/dev/plexapi/sdk/Playlists.java - - src/main/java/dev/plexapi/sdk/Plex.java + - src/main/java/dev/plexapi/sdk/PlayQueue.java + - src/main/java/dev/plexapi/sdk/Playlist.java - src/main/java/dev/plexapi/sdk/PlexAPI.java + - src/main/java/dev/plexapi/sdk/Preferences.java + - src/main/java/dev/plexapi/sdk/Provider.java + - src/main/java/dev/plexapi/sdk/Rate.java - src/main/java/dev/plexapi/sdk/SDKConfiguration.java - src/main/java/dev/plexapi/sdk/Search.java - src/main/java/dev/plexapi/sdk/SecuritySource.java - - src/main/java/dev/plexapi/sdk/Server.java - - src/main/java/dev/plexapi/sdk/Sessions.java - - src/main/java/dev/plexapi/sdk/Statistics.java + - src/main/java/dev/plexapi/sdk/Status.java + - src/main/java/dev/plexapi/sdk/Subscriptions.java + - src/main/java/dev/plexapi/sdk/Timeline.java + - src/main/java/dev/plexapi/sdk/Transcoder.java + - src/main/java/dev/plexapi/sdk/UltraBlur.java - src/main/java/dev/plexapi/sdk/Updater.java - - src/main/java/dev/plexapi/sdk/Users.java - - src/main/java/dev/plexapi/sdk/Video.java - - src/main/java/dev/plexapi/sdk/Watchlist.java - - src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsPlaylistsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUpdaterErrors.java - src/main/java/dev/plexapi/sdk/models/errors/AuthException.java - - src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesActivitiesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUpdaterErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsPlaylistsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistPlaylistsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistPlaylistsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailLogErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/Errors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsServerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsStatisticsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageMediaErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksButlerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataPlexErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetDevicesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetDevicesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetDevicesServerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetDevicesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetFileHashBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetFileHashErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetFileHashLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetFileHashUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataPlexErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsHubsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataPlexErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsHubsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersServerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountServerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPinBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPinErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsPlaylistsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistPlaylistsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsBadRequest.java - - 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/GetRecentlyAddedLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryErrors.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 - - src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoServerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsStatisticsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsSearchErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesActivitiesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerIdentityRequestTimeout.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerListBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerListErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerListServerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerListUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesServerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesPlexErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistorySessionsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSessionsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSessionsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSessionsSessionsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSessionsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationAuthenticationErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsStatisticsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageMediaErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTimelineBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTimelineErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTimelineUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTimelineVideoErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdPlexErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdResponseBody.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsAuthenticationErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsSessionsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenAuthenticationErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUpdaterErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsPlexErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUsersBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUsersErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUsersUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetUsersUsersErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetWatchListBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetWatchListErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetWatchListUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetWatchListWatchlistErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/LogLineBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/LogLineErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/LogLineLogErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/LogLineUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineLogErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedMediaErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedMediaErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/PerformSearchBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/PerformSearchErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/PerformSearchSearchErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/PerformSearchUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchSearchErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataAuthenticationErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataUnauthorized.java - src/main/java/dev/plexapi/sdk/models/errors/SDKError.java - - src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksButlerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/StartTaskBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/StartTaskButlerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StartTaskErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StartTaskUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeVideoErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksButlerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/StopTaskBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/StopTaskButlerErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StopTaskErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StopTaskUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionSessionsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionUnauthorized.java - src/main/java/dev/plexapi/sdk/models/errors/UncheckedSDKError.java - - src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressMediaErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistPlaylistsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistPlaylistsErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/AddPlaylistContentsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/AddPlaylistContentsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/ApplyUpdatesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/ApplyUpdatesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/CancelServerActivitiesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/CancelServerActivitiesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/CheckForUpdatesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/CheckForUpdatesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/ClearPlaylistContentsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/ClearPlaylistContentsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/CreatePlaylistBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/CreatePlaylistUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/DeleteLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/DeleteLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/DeletePlaylistBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/DeletePlaylistUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/EnablePaperTrailBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/EnablePaperTrailUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetActorsLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetActorsLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetAllLibrariesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetAllLibrariesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetAvailableClientsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetAvailableClientsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetBandwidthStatisticsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetBandwidthStatisticsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetBannerImageBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetBannerImageUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetButlerTasksBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetButlerTasksUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetCompanionsDataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetCompanionsDataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetCountriesLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetCountriesLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetDevicesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetDevicesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetFileHashBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetFileHashUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetGenresLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetGenresLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetGeoDataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetGeoDataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetGlobalHubsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetGlobalHubsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetHomeDataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetHomeDataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryDetailsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryDetailsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryHubsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryHubsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryItemsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryItemsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetLibrarySectionsAllBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetLibrarySectionsAllUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaMetaDataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaMetaDataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaProvidersBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaProvidersUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetMetadataChildrenBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetMetadataChildrenUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetMyPlexAccountBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetMyPlexAccountUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetPinBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistContentsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistContentsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetRecentlyAddedLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetRecentlyAddedLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetRefreshLibraryMetadataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetRefreshLibraryMetadataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetResizedPhotoBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetResizedPhotoUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetResourcesStatisticsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetResourcesStatisticsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchAllLibrariesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchAllLibrariesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchLibraryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchLibraryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchResultsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchResultsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerActivitiesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerActivitiesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerCapabilitiesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerCapabilitiesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerIdentityRequestTimeout.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerListBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerListUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerPreferencesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerPreferencesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerResourcesBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetServerResourcesUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionHistoryBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionHistoryUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSourceConnectionInformationBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetSourceConnectionInformationUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetStatisticsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetStatisticsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetThumbImageBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetThumbImageUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTimelineBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTimelineUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenByPinIdBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenByPinIdResponseBody.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenDetailsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenDetailsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTopWatchedContentBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTopWatchedContentUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTranscodeSessionsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTranscodeSessionsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTransientTokenBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetTransientTokenUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetUpdateStatusBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetUpdateStatusUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetUserFriendsBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetUserFriendsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetUsersBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetUsersUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetWatchListBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/GetWatchListUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/LogLineBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/LogLineUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/LogMultiLineBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/LogMultiLineUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/MarkPlayedBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/MarkPlayedUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/MarkUnplayedBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/MarkUnplayedUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/PerformSearchBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/PerformSearchUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/PerformVoiceSearchBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/PerformVoiceSearchUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/PostUsersSignInDataBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/PostUsersSignInDataUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StartAllTasksBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StartAllTasksUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StartTaskBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StartTaskUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StartUniversalTranscodeBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StartUniversalTranscodeUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StopAllTasksBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StopAllTasksUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StopTaskBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StopTaskUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StopTranscodeSessionBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/StopTranscodeSessionUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlayProgressBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlayProgressUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlaylistBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlaylistUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/async/UploadPlaylistBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/async/UploadPlaylistUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/operations//async/AddPlaylistContentsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddCollectionItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddDeviceRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddDeviceToDVRRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddDownloadQueueItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddExtrasRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddLineupRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddPlaylistItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddProviderRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddSectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddSubtitlesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AddToPlayQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AnalyzeMetadataRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/ApplyUpdatesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/CancelServerActivitiesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/CheckForUpdatesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/ClearPlaylistContentsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/AutocompleteRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CancelActivityRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CancelGrabRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CancelRefreshRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CheckUpdatesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CleanBundlesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ClearPlayQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ClearPlaylistItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ComputeChannelMapRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ConnectWebSocketRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CreateCollectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CreateCustomHubRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CreateDVRRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CreateDownloadQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CreateMarkerRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CreatePlayQueueRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/CreatePlaylistRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteLibraryRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/CreateSubscriptionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteCachesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteCollectionItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteCollectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteCustomHubRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteDVRRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteHistoryRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteIndexesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteIntrosRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteLibrarySectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteLineupRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteMarkerRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteMediaItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteMediaProviderRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteMetadataItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeletePlayQueueItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeletePlaylistItemRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/DeletePlaylistRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/EnablePaperTrailRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetActorsLibraryRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetAllLibrariesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetAvailableClientsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetBandwidthStatisticsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetBannerImageRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetButlerTasksRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetCompanionsDataRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetCountriesLibraryRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetDevicesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetFileHashRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetGenresLibraryRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetGeoDataRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetGlobalHubsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetHomeDataRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteStreamRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DeleteSubscriptionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DetectAdsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DetectCreditsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DetectIntrosRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DetectVoiceActivityRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/DiscoverDevicesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/EditMarkerRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/EditMetadataItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/EditSectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/EditSubscriptionPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/EmptyTrashRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/EnablePapertrailRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GenerateThumbsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetAlbumsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetAllHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetAllItemLeavesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetAllLanguagesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetAllLeavesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetAllPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetAllSubscriptionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetArtsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetAugmentationStatusRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetAvailableGrabbersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetAvailableSortsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetBackgroundTasksRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetCategoriesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetChannelsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetChapterImageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetClusterRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetCollectionImageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetCollectionItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetCollectionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetColorsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetCommonRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetContinueWatchingRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetCountriesLineupsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetCountriesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetCountryRegionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetDVRRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetDeviceDetailsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetDevicesChannelsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetDownloadQueueItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetDownloadQueueMediaRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetDownloadQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetExtrasRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetFileRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetFirstCharactersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetFoldersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetHistoryItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetHubItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetIdentityRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetImageFromBifRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetImageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetItemArtworkRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetItemDecisionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetItemTreeRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/GetLibraryDetailsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetLibraryHubsRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/GetLibraryItemsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetLibrarySectionsAllRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetMediaArtsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetMediaMetaDataRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetMediaPostersRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetMediaProvidersRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetMetadataChildrenRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetMyPlexAccountRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetPinRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetPlaylistContentsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetLibraryMatchesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetLineupChannelsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetLineupRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetLiveTVSessionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetMediaPartRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetMetadataHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetMetadataItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetNotificationsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetPartIndexRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetPersonRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetPlayQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetPlaylistGeneratorItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetPlaylistGeneratorRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetPlaylistGeneratorsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetPlaylistItemsRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/GetPlaylistRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetPlaylistsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetRecentlyAddedLibraryRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetRecentlyAddedRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetRefreshLibraryMetadataRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetResizedPhotoRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetResourcesStatisticsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetSearchAllLibrariesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetSearchLibraryRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetSearchResultsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetServerActivitiesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetServerCapabilitiesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetServerIdentityRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetServerListRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetServerPreferencesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetServerResourcesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetSessionHistoryRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetPostplayHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetPreferenceRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetPromotedHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetRandomArtworkRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetRelatedHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetRelatedItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetScheduledRecordingsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSectionFiltersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSectionHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSectionImageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSectionPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSectionsPrefsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSectionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetServerInfoRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSessionPlaylistIndexRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSessionSegmentRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/GetSessionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSonicPathRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSonicallySimilarRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/GetSourceConnectionInformationRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetStatisticsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetThumbImageRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetTimelineRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetTokenByPinIdRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetTokenDetailsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetTopWatchedContentRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetTranscodeSessionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetStreamLevelsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetStreamLoudnessRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetStreamRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetSubscriptionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetTagsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetTasksRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetTemplateRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetThumbRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/GetTransientTokenRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetUpdateStatusRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetUserFriendsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetUsersRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/GetWatchListRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/LogLineRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/LogMultiLineRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/GetUpdatesStatusRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/IngestTransientItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListActivitiesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListContentRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListDVRsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListDevicesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListDownloadQueueItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListLineupsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListMatchesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListMomentsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListPersonMediaRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListPlaybackHistoryRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListPlaylistsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListProvidersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListSessionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListSimilarRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListSonicallySimilarRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ListTopUsersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/MakeDecisionRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/MarkPlayedRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/MarkUnplayedRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/PerformSearchRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/PerformVoiceSearchRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/PostMediaArtsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/PostMediaPosterRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/PostUsersSignInDataRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/StartAllTasksRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/MatchItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/MergeItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ModifyDeviceRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/MoveCollectionItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/MoveHubRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/MovePlayQueueItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/MovePlaylistItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/OptimizeDatabaseRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ProcessSubscriptionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/RefreshItemsMetadataRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/RefreshPlaylistRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/RefreshProvidersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/RefreshSectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/RefreshSectionsMetadataRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ReloadGuideRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/RemoveDeviceFromDVRRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/RemoveDeviceRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/RemoveDownloadQueueItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ReorderSubscriptionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ReportRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ResetPlayQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ResetSectionDefaultsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/RestartProcessingDownloadQueueItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ScanRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SearchHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SetChannelmapRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SetDVRPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SetDevicePreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SetItemArtworkRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SetItemPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SetPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SetRatingRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SetSectionPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SetStreamOffsetRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SetStreamSelectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/ShuffleRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/SplitItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/StartAnalysisRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/StartBifGenerationRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/StartTaskRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/StartUniversalTranscodeRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/StopAllTasksRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/StartTasksRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/StartTranscodeSessionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/StopAllRefreshesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/StopDVRReloadRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/StopScanRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/StopTaskRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/StopTranscodeSessionRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations//async/UpdatePlayProgressRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/StopTasksRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/TerminateSessionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/TranscodeImageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/TranscodeSubtitlesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/TriggerFallbackRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/TuneChannelRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/UnmatchRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/UnscrobbleRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/UnshuffleRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/UpdateHubVisibilityRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/UpdateItemArtworkRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/UpdateItemsRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/UpdatePlaylistRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations//async/UploadPlaylistRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/VoiceSearchHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/WriteLogRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations//async/WriteMessageRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/Account.java - src/main/java/dev/plexapi/sdk/models/operations/Action.java - - src/main/java/dev/plexapi/sdk/models/operations/ActiveDirection.java - src/main/java/dev/plexapi/sdk/models/operations/Activity.java - - src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/AllLibraries.java - - src/main/java/dev/plexapi/sdk/models/operations/AllowCameraUpload.java - - src/main/java/dev/plexapi/sdk/models/operations/AllowChannels.java - - src/main/java/dev/plexapi/sdk/models/operations/AllowSubtitleAdmin.java - - src/main/java/dev/plexapi/sdk/models/operations/AllowSync.java - - src/main/java/dev/plexapi/sdk/models/operations/AllowTuners.java + - src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDeviceRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDeviceRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDeviceResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRDVR.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRDVRsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/AddExtrasRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddExtrasRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddExtrasResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddLineupDVR.java + - src/main/java/dev/plexapi/sdk/models/operations/AddLineupDVRsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/AddLineupMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/AddLineupRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddLineupRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddLineupResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddLineupResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddProviderRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddProviderRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddProviderResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddSectionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddSectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddSectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/AddedQueueItems.java + - src/main/java/dev/plexapi/sdk/models/operations/AdvancedSubtitles.java + - src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataResponse.java - src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesRequest.java - src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/Args.java - src/main/java/dev/plexapi/sdk/models/operations/Attributes.java - - src/main/java/dev/plexapi/sdk/models/operations/AutoSelectSubtitle.java - - src/main/java/dev/plexapi/sdk/models/operations/Billing.java + - src/main/java/dev/plexapi/sdk/models/operations/AutocompleteRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/AutocompleteRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/AutocompleteResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/Bandwidth.java + - src/main/java/dev/plexapi/sdk/models/operations/Bandwidths.java - src/main/java/dev/plexapi/sdk/models/operations/ButlerTask.java - src/main/java/dev/plexapi/sdk/models/operations/ButlerTasks.java - - src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/Chapter.java - - src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/Collection.java - - src/main/java/dev/plexapi/sdk/models/operations/Connections.java - - src/main/java/dev/plexapi/sdk/models/operations/Context.java + - src/main/java/dev/plexapi/sdk/models/operations/CancelActivityRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/CancelActivityRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CancelActivityResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/CancelGrabRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/CancelGrabRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CancelGrabResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ChannelMapping.java + - src/main/java/dev/plexapi/sdk/models/operations/ChannelMappingByKey.java + - src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ChromaSubsampling.java + - src/main/java/dev/plexapi/sdk/models/operations/CleanBundlesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CleanBundlesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapChannelMapping.java + - src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/Connection.java - src/main/java/dev/plexapi/sdk/models/operations/Country.java - - src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistQueryParamType.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateDVRRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateDVRRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateDVRResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerType.java + - src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueResponseBody.java - src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistRequest.java - src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/DefaultDirection.java - - src/main/java/dev/plexapi/sdk/models/operations/DefaultSubtitleAccessibility.java - - src/main/java/dev/plexapi/sdk/models/operations/DefaultSubtitleForced.java - - src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionQueryParamPrefs.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/DecisionResult.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCachesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCachesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupDVR.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupDVRsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemResponse.java - src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistRequest.java - src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectAdsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectAdsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectAdsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityResponse.java - src/main/java/dev/plexapi/sdk/models/operations/Device.java - - src/main/java/dev/plexapi/sdk/models/operations/Director.java + - src/main/java/dev/plexapi/sdk/models/operations/DeviceChannel.java - src/main/java/dev/plexapi/sdk/models/operations/Directory.java - - src/main/java/dev/plexapi/sdk/models/operations/Download.java - - src/main/java/dev/plexapi/sdk/models/operations/EnablePaperTrailRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/EnablePaperTrailResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/Extras.java + - src/main/java/dev/plexapi/sdk/models/operations/DiscoverDevicesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/DiscoverDevicesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/DownloadQueue.java + - src/main/java/dev/plexapi/sdk/models/operations/DownloadQueueItem.java + - src/main/java/dev/plexapi/sdk/models/operations/Dvr.java + - src/main/java/dev/plexapi/sdk/models/operations/EditMarkerRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/EditMarkerRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/EditMarkerResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/EditSectionQueryParamPrefs.java + - src/main/java/dev/plexapi/sdk/models/operations/EditSectionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/EditSectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/EditSectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesQueryParamPrefs.java + - src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/Element.java + - src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/Extension.java - src/main/java/dev/plexapi/sdk/models/operations/Feature.java - - src/main/java/dev/plexapi/sdk/models/operations/Field.java - - src/main/java/dev/plexapi/sdk/models/operations/FieldType.java - - src/main/java/dev/plexapi/sdk/models/operations/Filter.java - - src/main/java/dev/plexapi/sdk/models/operations/FlattenSeasons.java - - src/main/java/dev/plexapi/sdk/models/operations/Force.java - - src/main/java/dev/plexapi/sdk/models/operations/Friend.java - - src/main/java/dev/plexapi/sdk/models/operations/Genre.java - - src/main/java/dev/plexapi/sdk/models/operations/GeoData.java - - src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryDirectory.java - - src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryQueryParamType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesLocation.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsAccount.java - - src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsDevice.java - - src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetCompanionsDataRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetCompanionsDataResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryDirectory.java - - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryQueryParamType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetDevicesMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetDevicesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetDevicesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetDevicesResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetFileHashRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetFileHashRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetFileHashResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryDirectory.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryQueryParamType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataGeoData.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataRequestBuilder.java - - 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/Flavor.java + - src/main/java/dev/plexapi/sdk/models/operations/Format.java + - src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetArtsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetArtsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetArtsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksType.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetChannelsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetChannelsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetChannelsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetChannelsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetChannelsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetClusterRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetClusterRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetClusterResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetColorsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetColorsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetColorsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetColorsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetColorsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCommonRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCommonRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCommonResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountriesResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsCountry.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDVRDVR.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDVRDVRsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDVRMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDVRRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDVRRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDVRResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDVRResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueDownloadQueue.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsDecisionResult.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsDownloadQueueItem.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsStatus.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsTranscode.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueStatus.java + - src/main/java/dev/plexapi/sdk/models/operations/GetExtrasRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetExtrasRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetExtrasResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFileRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFileRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFileResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersDirectory.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFoldersDirectory.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFoldersMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFoldersRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFoldersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFoldersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetFoldersResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetIdentityMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetIdentityRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetIdentityResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetIdentityResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetImageRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetImageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetImageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkPathParamElement.java + - src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeResponse.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 - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsGenre.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsHub.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsPart.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsResponse.java - - 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/GetLibraryItemsGenre.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGuids.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponseType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLocation.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.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/GetLibraryItemsOptimizedForStreaming1.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsProducer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamIncludeMeta.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamType.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRequest.java - 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/GetLibraryItemsSimilar.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSort.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/GetLibrarySectionsAllActiveDirection.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllCollection.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllCountry.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllDefaultDirection.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllDirector.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllField.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllFieldType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllFilter.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllGenre.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllGuids.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllHasThumbnail.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllImage.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllLibraryResponseType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllLibraryType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMeta.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOperator.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming1.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllPart.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllQueryParamIncludeMeta.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllQueryParamType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRole.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllSort.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStream.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllUltraBlurColors.java - - src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllWriter.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataAttributes.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataChapter.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataCountry.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataDirector.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataExtras.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGenre.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGuids.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataHasThumbnail.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataImage.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLibraryType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLocation.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMarker.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreaming.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreaming1.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreamingLibrary1.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataPart.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataProducer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRatings.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRole.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataSimilar.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStream.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataUltraBlurColors.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataWriter.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersDirectory.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenDirectory.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPinAuthPinContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPinRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPinResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsCountry.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsDirector.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsGenre.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsPart.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsQueryParamType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRole.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsWriter.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistMetadata.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLineupRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLineupRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLineupResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPersonMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPersonRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPersonRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPersonResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPersonResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorDevice.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsMetadata.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorLocation.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorScope.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorState.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorStatus.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorSubtitles.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorType.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsType.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsResponse.java - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistRequest.java - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsRequest.java - - 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/GetRecentlyAddedOptimizedForStreaming.java - - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOptimizedForStreaming1.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 - - src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCountry.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirector.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirectory.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesFlattenSeasons.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGenre.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGuids.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesHasThumbnail.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesImage.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLibraryType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLocation.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesPart.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRole.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesShowOrdering.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesUltraBlurColors.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesWriter.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 - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsCountry.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsDirector.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsGenre.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsPart.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRole.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsWriter.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerListMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerListRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerListResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerListResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerListServer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionsPart.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSectionsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentResponse.java - src/main/java/dev/plexapi/sdk/models/operations/GetSessionsRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetSessionsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionsStream.java - - src/main/java/dev/plexapi/sdk/models/operations/GetSessionsUser.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationMediaContainer.java - src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationRequest.java - src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsDevice.java - - src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTimelineRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTimelineRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTimelineResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdAuthPinContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdGeoData.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationResponseStatus.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationStatus.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsStatus.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsSubscription.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsUserPlexAccount.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentCountry.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentGenre.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentGuids.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentMetadata.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentQueryParamIncludeGuids.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentQueryParamType.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRole.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentUser.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenQueryParamType.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsLevel.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetStreamResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTagsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTagsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTagsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTagsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTagsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTasksRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTasksResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTemplateMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTemplateRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTemplateRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTemplateResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTemplateResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetThumbRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetThumbRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetThumbResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenMediaContainer.java - src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenRequest.java - src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUserFriendsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUserFriendsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUsersMediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUsersRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUsersRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUsersResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUsersResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/GetUsersServer.java - - src/main/java/dev/plexapi/sdk/models/operations/GetWatchListRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/GetWatchListRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/GetWatchListResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/GetWatchListResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/Guids.java - - src/main/java/dev/plexapi/sdk/models/operations/HasThumbnail.java - - src/main/java/dev/plexapi/sdk/models/operations/Hidden.java - - src/main/java/dev/plexapi/sdk/models/operations/Home.java + - src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusState.java + - src/main/java/dev/plexapi/sdk/models/operations/Hints.java + - src/main/java/dev/plexapi/sdk/models/operations/HomeVisibility.java - src/main/java/dev/plexapi/sdk/models/operations/Hub.java - - src/main/java/dev/plexapi/sdk/models/operations/Image.java - - src/main/java/dev/plexapi/sdk/models/operations/IncludeAdvanced.java - - src/main/java/dev/plexapi/sdk/models/operations/IncludeCollections.java - - src/main/java/dev/plexapi/sdk/models/operations/IncludeDetails.java - - src/main/java/dev/plexapi/sdk/models/operations/IncludeExternalMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/IncludeGuids.java - - src/main/java/dev/plexapi/sdk/models/operations/IncludeHttps.java - - src/main/java/dev/plexapi/sdk/models/operations/IncludeIPv6.java - - src/main/java/dev/plexapi/sdk/models/operations/IncludeMeta.java - - 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/Index.java + - src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/Item.java + - src/main/java/dev/plexapi/sdk/models/operations/Language.java - src/main/java/dev/plexapi/sdk/models/operations/Level.java - - src/main/java/dev/plexapi/sdk/models/operations/Libtype.java + - src/main/java/dev/plexapi/sdk/models/operations/Lineup.java + - src/main/java/dev/plexapi/sdk/models/operations/LineupType.java + - src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/ListContentRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListContentRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListContentResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDVRsDVRsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDVRsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDVRsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDVRsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDVRsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDevicesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDevicesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsStatus.java + - src/main/java/dev/plexapi/sdk/models/operations/ListHubsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ListHubsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListHubsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/ListLineupsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListLineupsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListLineupsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListMatchesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListMatchesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListMatchesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListMomentsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListMomentsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListMomentsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryMetadata.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListProvidersMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ListProvidersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListProvidersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListProvidersResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/ListSessionsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ListSessionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListSessionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListSessionsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/ListSimilarRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListSimilarRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListSimilarResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersResponseBody.java - src/main/java/dev/plexapi/sdk/models/operations/Location.java - - src/main/java/dev/plexapi/sdk/models/operations/LogLineRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/LogLineRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/LogLineResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/LogMultiLineRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/LogMultiLineResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/MailingListStatus.java + - src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionResponse.java - src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedRequest.java - src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/Marker.java - - src/main/java/dev/plexapi/sdk/models/operations/Media.java + - src/main/java/dev/plexapi/sdk/models/operations/MatchItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/MatchItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/MatchItemResponse.java - src/main/java/dev/plexapi/sdk/models/operations/MediaContainer.java - - src/main/java/dev/plexapi/sdk/models/operations/MediaProvider.java - - src/main/java/dev/plexapi/sdk/models/operations/MediaReviewsVisibility.java - - src/main/java/dev/plexapi/sdk/models/operations/Meta.java + - src/main/java/dev/plexapi/sdk/models/operations/MediaGrabber.java + - src/main/java/dev/plexapi/sdk/models/operations/MediaSettings.java + - src/main/java/dev/plexapi/sdk/models/operations/MediaSubscription.java + - src/main/java/dev/plexapi/sdk/models/operations/MergeItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/MergeItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/MergeItemsResponse.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/One.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/OptimizedForStreaming1.java - - src/main/java/dev/plexapi/sdk/models/operations/Owned.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 - - src/main/java/dev/plexapi/sdk/models/operations/Pending.java - - src/main/java/dev/plexapi/sdk/models/operations/PerformSearchRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/PerformSearchRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/PerformSearchResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/Pivot.java - - src/main/java/dev/plexapi/sdk/models/operations/Player.java + - src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/MoveHubRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/MoveHubRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/MoveHubResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/Params.java + - src/main/java/dev/plexapi/sdk/models/operations/PathParamElement.java + - src/main/java/dev/plexapi/sdk/models/operations/PathParamIndex.java + - src/main/java/dev/plexapi/sdk/models/operations/PathParamTask.java + - src/main/java/dev/plexapi/sdk/models/operations/PlayQueueGenerator.java - src/main/java/dev/plexapi/sdk/models/operations/PlaylistType.java - - src/main/java/dev/plexapi/sdk/models/operations/PlexDevice.java - - src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationResponseStatus.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationStatus.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationSubscription.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAutoSelectSubtitle.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataDefaultSubtitleForced.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 - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataServices.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataState.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataStatus.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataSubscription.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserPlexAccount.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserProfile.java - - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataWatchedIndicator.java - - src/main/java/dev/plexapi/sdk/models/operations/Producer.java - - src/main/java/dev/plexapi/sdk/models/operations/Protected.java + - src/main/java/dev/plexapi/sdk/models/operations/Policy.java + - src/main/java/dev/plexapi/sdk/models/operations/Prefs.java + - src/main/java/dev/plexapi/sdk/models/operations/ProcessSubscriptionsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ProcessSubscriptionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ProcessingState.java + - src/main/java/dev/plexapi/sdk/models/operations/ProcessingStateContext.java - src/main/java/dev/plexapi/sdk/models/operations/Protocol.java - - 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/QueryParamIncludeCollections.java - - src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeExternalMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeGuids.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/QueryParamArgs.java + - src/main/java/dev/plexapi/sdk/models/operations/QueryParamAttributes.java + - src/main/java/dev/plexapi/sdk/models/operations/QueryParamLocation.java + - src/main/java/dev/plexapi/sdk/models/operations/QueryParamPrefs.java + - src/main/java/dev/plexapi/sdk/models/operations/QueryParamProtocol.java + - src/main/java/dev/plexapi/sdk/models/operations/QueryParamSubtitles.java - src/main/java/dev/plexapi/sdk/models/operations/QueryParamType.java - - src/main/java/dev/plexapi/sdk/models/operations/Rating.java - - src/main/java/dev/plexapi/sdk/models/operations/Ratings.java + - src/main/java/dev/plexapi/sdk/models/operations/RecommendationsVisibility.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshProvidersRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshProvidersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataResponse.java - src/main/java/dev/plexapi/sdk/models/operations/Release.java - - src/main/java/dev/plexapi/sdk/models/operations/ResponseBody.java - - src/main/java/dev/plexapi/sdk/models/operations/Restricted.java - - src/main/java/dev/plexapi/sdk/models/operations/Role.java + - src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRDVR.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRDVRsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ReportRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ReportRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ReportResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ReportResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ScanRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ScanRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ScanResponse.java - src/main/java/dev/plexapi/sdk/models/operations/Scope.java - - src/main/java/dev/plexapi/sdk/models/operations/SearchResult.java - - src/main/java/dev/plexapi/sdk/models/operations/SearchTypes.java - - src/main/java/dev/plexapi/sdk/models/operations/Server.java - - src/main/java/dev/plexapi/sdk/models/operations/Services.java - - src/main/java/dev/plexapi/sdk/models/operations/Session.java - - src/main/java/dev/plexapi/sdk/models/operations/Setting.java - - src/main/java/dev/plexapi/sdk/models/operations/SharedServers.java - - src/main/java/dev/plexapi/sdk/models/operations/SharedSources.java - - src/main/java/dev/plexapi/sdk/models/operations/ShowOrdering.java - - src/main/java/dev/plexapi/sdk/models/operations/Similar.java - - src/main/java/dev/plexapi/sdk/models/operations/Skip.java - - src/main/java/dev/plexapi/sdk/models/operations/Smart.java - - src/main/java/dev/plexapi/sdk/models/operations/Sort.java - - src/main/java/dev/plexapi/sdk/models/operations/StartAllTasksRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/StartAllTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SearchHubsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/SearchHubsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SearchHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SearchHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SearchHubsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesDVR.java + - src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesDVRsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SetRatingRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SetRatingRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SetRatingResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesQueryParamPrefs.java + - src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/ShuffleRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/ShuffleRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/ShuffleResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SplitItemRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/SplitItemRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/SplitItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationResponse.java - src/main/java/dev/plexapi/sdk/models/operations/StartTaskRequest.java - src/main/java/dev/plexapi/sdk/models/operations/StartTaskRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/StartTaskResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/StartTasksRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/StartTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamLocation.java + - src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamProtocol.java + - src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamSubtitles.java + - src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionResponse.java - src/main/java/dev/plexapi/sdk/models/operations/State.java - - src/main/java/dev/plexapi/sdk/models/operations/StatisticsBandwidth.java - - src/main/java/dev/plexapi/sdk/models/operations/StatisticsMedia.java - - src/main/java/dev/plexapi/sdk/models/operations/StatisticsResources.java - src/main/java/dev/plexapi/sdk/models/operations/Status.java - - src/main/java/dev/plexapi/sdk/models/operations/StopAllTasksRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/StopAllTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/StopAllRefreshesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/StopAllRefreshesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/StopScanRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/StopScanRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/StopScanResponse.java - src/main/java/dev/plexapi/sdk/models/operations/StopTaskRequest.java - src/main/java/dev/plexapi/sdk/models/operations/StopTaskRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/StopTaskResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/Stream.java - - src/main/java/dev/plexapi/sdk/models/operations/Subscription.java - - src/main/java/dev/plexapi/sdk/models/operations/Tag.java - - src/main/java/dev/plexapi/sdk/models/operations/TaskName.java - - src/main/java/dev/plexapi/sdk/models/operations/Tonight.java - - src/main/java/dev/plexapi/sdk/models/operations/TranscodeSession.java - - src/main/java/dev/plexapi/sdk/models/operations/Trials.java + - src/main/java/dev/plexapi/sdk/models/operations/StopTasksRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/StopTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/SubscriptionTemplate.java + - src/main/java/dev/plexapi/sdk/models/operations/Subtitles.java + - src/main/java/dev/plexapi/sdk/models/operations/Task.java + - src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/Transcode.java + - src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/TranscodeJob.java + - src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/TuneChannelRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/TuneChannelRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/TuneChannelResponse.java - src/main/java/dev/plexapi/sdk/models/operations/Type.java - src/main/java/dev/plexapi/sdk/models/operations/UltraBlurColors.java - - src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressRequest.java - - src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressRequestBuilder.java - - src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/UnmatchRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/UnmatchRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/UnmatchResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/UnshuffleRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/UnshuffleRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/UnshuffleResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsResponse.java - src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistRequest.java - src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistResponse.java - src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistRequest.java - src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/Upscale.java - - src/main/java/dev/plexapi/sdk/models/operations/User.java - - src/main/java/dev/plexapi/sdk/models/operations/UserProfile.java - - src/main/java/dev/plexapi/sdk/models/operations/WatchedIndicator.java - - src/main/java/dev/plexapi/sdk/models/operations/Writer.java - - src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistContentsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/WriteLogRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/WriteLogResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/WriteMessageRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/WriteMessageRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/WriteMessageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddCollectionItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceToDVRResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddDownloadQueueItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddExtrasResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddLineupResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddProviderResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddSectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddSubtitlesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AddToPlayQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AnalyzeMetadataResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/ApplyUpdatesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/CancelServerActivitiesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/CheckForUpdatesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistContentsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/AutocompleteResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CancelActivityResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CancelGrabResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CancelRefreshResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CheckUpdatesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CleanBundlesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlayQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ComputeChannelMapResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ConnectWebSocketResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CreateCollectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CreateCustomHubResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CreateDVRResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CreateDownloadQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CreateMarkerResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlayQueueResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlaylistResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibraryResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/CreateSubscriptionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCachesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCustomHubResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteDVRResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteHistoryResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIndexesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIntrosResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibrarySectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLineupResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMarkerResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaProviderResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMetadataItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlayQueueItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistItemResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/EnablePaperTrailResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetActorsLibraryResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLibrariesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableClientsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetBandwidthStatisticsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetBannerImageResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetButlerTasksResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetCompanionsDataResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLibraryResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetFileHashResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetGenresLibraryResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetGeoDataResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetGlobalHubsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetHomeDataResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteStreamResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DeleteSubscriptionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DetectAdsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DetectCreditsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DetectIntrosResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DetectVoiceActivityResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/DiscoverDevicesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/EditMarkerResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/EditMetadataItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/EditSectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/EditSubscriptionPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/EmptyTrashResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/EnablePapertrailResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GenerateThumbsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetAlbumsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetAllHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetAllItemLeavesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLanguagesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLeavesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetAllPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetAllSubscriptionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetArtsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetAugmentationStatusResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableGrabbersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableSortsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetBackgroundTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetCategoriesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetChannelsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetChapterImageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetClusterResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionImageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetColorsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetCommonResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetContinueWatchingResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLineupsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetCountryRegionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetDVRResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetDeviceDetailsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesChannelsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueMediaResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetExtrasResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetFileResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetFirstCharactersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetFoldersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetHistoryItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetHubItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetIdentityResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetImageFromBifResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetImageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetItemArtworkResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetItemDecisionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetItemTreeResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryDetailsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryHubsResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryItemsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetLibrarySectionsAllResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaArtsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaMetaDataResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPostersResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaProvidersResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataChildrenResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetMyPlexAccountResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetPinResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistContentsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryMatchesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupChannelsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetLiveTVSessionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPartResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetNotificationsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetPartIndexResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetPersonResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetPlayQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistItemsResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedLibraryResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetRefreshLibraryMetadataResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetResizedPhotoResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetResourcesStatisticsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchAllLibrariesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchLibraryResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchResultsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetServerActivitiesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetServerCapabilitiesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetServerIdentityResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetServerListResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetServerPreferencesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetServerResourcesResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionHistoryResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetPostplayHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetPreferenceResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetPromotedHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetRandomArtworkResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetScheduledRecordingsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionFiltersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionImageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsPrefsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetServerInfoResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionPlaylistIndexResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionSegmentResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicPathResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicallySimilarResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/GetSourceConnectionInformationResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetStatisticsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbImageResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetTimelineResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenByPinIdResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenDetailsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetTopWatchedContentResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetTranscodeSessionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLevelsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLoudnessResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetSubscriptionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetTagsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetTemplateResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/GetTransientTokenResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdateStatusResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetUserFriendsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetUsersResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/GetWatchListResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/LogLineResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/LogMultiLineResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdatesStatusResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/IngestTransientItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListActivitiesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListContentResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListDVRsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListDevicesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListDownloadQueueItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListLineupsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListMatchesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListMomentsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListPersonMediaResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaybackHistoryResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaylistsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListProvidersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListSessionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListSimilarResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListSonicallySimilarResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ListTopUsersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/MakeDecisionResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/MarkPlayedResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/MarkUnplayedResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/PerformSearchResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/PerformVoiceSearchResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaArtsResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaPosterResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/PostUsersSignInDataResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/StartAllTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/MatchItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/MergeItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ModifyDeviceResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/MoveCollectionItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/MoveHubResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/MovePlayQueueItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/MovePlaylistItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/OptimizeDatabaseResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ProcessSubscriptionsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/RefreshItemsMetadataResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/RefreshPlaylistResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/RefreshProvidersResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionsMetadataResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ReloadGuideResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceFromDVRResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDownloadQueueItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ReorderSubscriptionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ReportResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ResetPlayQueueResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ResetSectionDefaultsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/RestartProcessingDownloadQueueItemsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ScanResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SearchHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SetChannelmapResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SetDVRPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SetDevicePreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SetItemArtworkResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SetItemPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SetPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SetRatingResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SetSectionPreferencesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamOffsetResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamSelectionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/ShuffleResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/SplitItemResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/StartAnalysisResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/StartBifGenerationResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/StartTaskResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/StartUniversalTranscodeResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/StopAllTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/StartTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/StartTranscodeSessionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/StopAllRefreshesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/StopDVRReloadResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/StopScanResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/StopTaskResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/StopTranscodeSessionResponse.java - - src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlayProgressResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/StopTasksResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/TerminateSessionResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeImageResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeSubtitlesResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/TriggerFallbackResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/TuneChannelResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/UnmatchResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/UnscrobbleResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/UnshuffleResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/UpdateHubVisibilityResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemArtworkResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemsResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlaylistResponse.java - src/main/java/dev/plexapi/sdk/models/operations/async/UploadPlaylistResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/VoiceSearchHubsResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/WriteLogResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/async/WriteMessageResponse.java + - src/main/java/dev/plexapi/sdk/models/shared/Accepts.java + - src/main/java/dev/plexapi/sdk/models/shared/AdvancedSubtitles.java + - src/main/java/dev/plexapi/sdk/models/shared/AiringsType.java + - src/main/java/dev/plexapi/sdk/models/shared/BoolInt.java + - src/main/java/dev/plexapi/sdk/models/shared/Channel.java + - src/main/java/dev/plexapi/sdk/models/shared/ChannelMapping.java + - src/main/java/dev/plexapi/sdk/models/shared/Composite.java + - src/main/java/dev/plexapi/sdk/models/shared/CompositeMedia.java + - src/main/java/dev/plexapi/sdk/models/shared/Crop.java + - src/main/java/dev/plexapi/sdk/models/shared/Decision.java + - src/main/java/dev/plexapi/sdk/models/shared/Default.java + - src/main/java/dev/plexapi/sdk/models/shared/DefaultDirection.java + - src/main/java/dev/plexapi/sdk/models/shared/Device.java + - src/main/java/dev/plexapi/sdk/models/shared/Directory.java + - src/main/java/dev/plexapi/sdk/models/shared/Dvr.java + - src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200.java + - src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/Filter.java + - src/main/java/dev/plexapi/sdk/models/shared/FilterPivot.java + - src/main/java/dev/plexapi/sdk/models/shared/Format.java + - src/main/java/dev/plexapi/sdk/models/shared/GetResponses200.java + - src/main/java/dev/plexapi/sdk/models/shared/GetResponses200Hub.java + - src/main/java/dev/plexapi/sdk/models/shared/GetResponses200MediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200.java + - src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200MediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200Metadata.java + - src/main/java/dev/plexapi/sdk/models/shared/HomeVisibility.java + - src/main/java/dev/plexapi/sdk/models/shared/Hub.java + - src/main/java/dev/plexapi/sdk/models/shared/Image.java + - src/main/java/dev/plexapi/sdk/models/shared/ImageType.java + - src/main/java/dev/plexapi/sdk/models/shared/Items.java + - src/main/java/dev/plexapi/sdk/models/shared/LibrarySection.java + - src/main/java/dev/plexapi/sdk/models/shared/LibrarySectionLocation.java + - src/main/java/dev/plexapi/sdk/models/shared/Lineup.java + - src/main/java/dev/plexapi/sdk/models/shared/LineupType.java + - src/main/java/dev/plexapi/sdk/models/shared/Location.java + - src/main/java/dev/plexapi/sdk/models/shared/Media.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtwork.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkMetadata.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkType.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecision.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionDecision.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionLocation.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMedia.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMetadata.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionPart.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionStream.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDevice.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDeviceDevice.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDeviceMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDirectory.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDirectoryMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithHubs.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithHubsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithLineup.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithLineupMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithMetadata.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithMetadataMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithNestedMetadata.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithNestedMetadataMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadata.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadataMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadataMetadata.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSettings.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSettingsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSubscription.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSubscriptionMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaGrabOperation.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaQuery.java + - src/main/java/dev/plexapi/sdk/models/shared/MediaSubscription.java + - src/main/java/dev/plexapi/sdk/models/shared/Metadata.java + - src/main/java/dev/plexapi/sdk/models/shared/MetadataItem.java + - src/main/java/dev/plexapi/sdk/models/shared/Part.java + - src/main/java/dev/plexapi/sdk/models/shared/Pivot.java + - src/main/java/dev/plexapi/sdk/models/shared/Player.java + - src/main/java/dev/plexapi/sdk/models/shared/PlaylistType.java + - src/main/java/dev/plexapi/sdk/models/shared/PostResponses200.java + - src/main/java/dev/plexapi/sdk/models/shared/PostResponses200MediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/PostResponses200Type.java + - src/main/java/dev/plexapi/sdk/models/shared/Protocol.java + - src/main/java/dev/plexapi/sdk/models/shared/RecommendationsVisibility.java + - src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200.java + - src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200Directory.java + - src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200MediaContainer.java - src/main/java/dev/plexapi/sdk/models/shared/Security.java - - src/main/java/dev/plexapi/sdk/operations/AddPlaylistContents.java + - src/main/java/dev/plexapi/sdk/models/shared/Session.java + - src/main/java/dev/plexapi/sdk/models/shared/SessionLocation.java + - src/main/java/dev/plexapi/sdk/models/shared/Setting.java + - src/main/java/dev/plexapi/sdk/models/shared/SlashGetResponses200.java + - src/main/java/dev/plexapi/sdk/models/shared/SlashGetResponses200MediaContainer.java + - src/main/java/dev/plexapi/sdk/models/shared/Sort.java + - src/main/java/dev/plexapi/sdk/models/shared/SortDefault.java + - src/main/java/dev/plexapi/sdk/models/shared/SortPivot.java + - src/main/java/dev/plexapi/sdk/models/shared/Status.java + - src/main/java/dev/plexapi/sdk/models/shared/Stream.java + - src/main/java/dev/plexapi/sdk/models/shared/Subtitles.java + - src/main/java/dev/plexapi/sdk/models/shared/Tag.java + - src/main/java/dev/plexapi/sdk/models/shared/TranscodeSession.java + - src/main/java/dev/plexapi/sdk/models/shared/TranscodeType.java + - src/main/java/dev/plexapi/sdk/models/shared/Type.java + - src/main/java/dev/plexapi/sdk/models/shared/User.java + - src/main/java/dev/plexapi/sdk/models/shared/Value.java + - src/main/java/dev/plexapi/sdk/operations/AddCollectionItems.java + - src/main/java/dev/plexapi/sdk/operations/AddDevice.java + - src/main/java/dev/plexapi/sdk/operations/AddDeviceToDVR.java + - src/main/java/dev/plexapi/sdk/operations/AddDownloadQueueItems.java + - src/main/java/dev/plexapi/sdk/operations/AddExtras.java + - src/main/java/dev/plexapi/sdk/operations/AddLineup.java + - src/main/java/dev/plexapi/sdk/operations/AddPlaylistItems.java + - src/main/java/dev/plexapi/sdk/operations/AddProvider.java + - src/main/java/dev/plexapi/sdk/operations/AddSection.java + - src/main/java/dev/plexapi/sdk/operations/AddSubtitles.java + - src/main/java/dev/plexapi/sdk/operations/AddToPlayQueue.java + - src/main/java/dev/plexapi/sdk/operations/AnalyzeMetadata.java - src/main/java/dev/plexapi/sdk/operations/ApplyUpdates.java - - src/main/java/dev/plexapi/sdk/operations/CancelServerActivities.java - - src/main/java/dev/plexapi/sdk/operations/CheckForUpdates.java - - src/main/java/dev/plexapi/sdk/operations/ClearPlaylistContents.java + - src/main/java/dev/plexapi/sdk/operations/Autocomplete.java + - src/main/java/dev/plexapi/sdk/operations/CancelActivity.java + - src/main/java/dev/plexapi/sdk/operations/CancelGrab.java + - src/main/java/dev/plexapi/sdk/operations/CancelRefresh.java + - src/main/java/dev/plexapi/sdk/operations/CheckUpdates.java + - src/main/java/dev/plexapi/sdk/operations/CleanBundles.java + - src/main/java/dev/plexapi/sdk/operations/ClearPlayQueue.java + - src/main/java/dev/plexapi/sdk/operations/ClearPlaylistItems.java + - src/main/java/dev/plexapi/sdk/operations/ComputeChannelMap.java + - src/main/java/dev/plexapi/sdk/operations/ConnectWebSocket.java + - src/main/java/dev/plexapi/sdk/operations/CreateCollection.java + - src/main/java/dev/plexapi/sdk/operations/CreateCustomHub.java + - src/main/java/dev/plexapi/sdk/operations/CreateDVR.java + - src/main/java/dev/plexapi/sdk/operations/CreateDownloadQueue.java + - src/main/java/dev/plexapi/sdk/operations/CreateMarker.java + - src/main/java/dev/plexapi/sdk/operations/CreatePlayQueue.java - src/main/java/dev/plexapi/sdk/operations/CreatePlaylist.java - - src/main/java/dev/plexapi/sdk/operations/DeleteLibrary.java + - src/main/java/dev/plexapi/sdk/operations/CreateSubscription.java + - src/main/java/dev/plexapi/sdk/operations/DeleteCaches.java + - src/main/java/dev/plexapi/sdk/operations/DeleteCollection.java + - src/main/java/dev/plexapi/sdk/operations/DeleteCollectionItem.java + - src/main/java/dev/plexapi/sdk/operations/DeleteCustomHub.java + - src/main/java/dev/plexapi/sdk/operations/DeleteDVR.java + - src/main/java/dev/plexapi/sdk/operations/DeleteHistory.java + - src/main/java/dev/plexapi/sdk/operations/DeleteIndexes.java + - src/main/java/dev/plexapi/sdk/operations/DeleteIntros.java + - src/main/java/dev/plexapi/sdk/operations/DeleteLibrarySection.java + - src/main/java/dev/plexapi/sdk/operations/DeleteLineup.java + - src/main/java/dev/plexapi/sdk/operations/DeleteMarker.java + - src/main/java/dev/plexapi/sdk/operations/DeleteMediaItem.java + - src/main/java/dev/plexapi/sdk/operations/DeleteMediaProvider.java + - src/main/java/dev/plexapi/sdk/operations/DeleteMetadataItem.java + - src/main/java/dev/plexapi/sdk/operations/DeletePlayQueueItem.java - src/main/java/dev/plexapi/sdk/operations/DeletePlaylist.java - - src/main/java/dev/plexapi/sdk/operations/EnablePaperTrail.java - - src/main/java/dev/plexapi/sdk/operations/GetActorsLibrary.java - - src/main/java/dev/plexapi/sdk/operations/GetAllLibraries.java - - src/main/java/dev/plexapi/sdk/operations/GetAvailableClients.java - - src/main/java/dev/plexapi/sdk/operations/GetBandwidthStatistics.java - - src/main/java/dev/plexapi/sdk/operations/GetBannerImage.java - - src/main/java/dev/plexapi/sdk/operations/GetButlerTasks.java - - src/main/java/dev/plexapi/sdk/operations/GetCompanionsData.java - - src/main/java/dev/plexapi/sdk/operations/GetCountriesLibrary.java - - src/main/java/dev/plexapi/sdk/operations/GetDevices.java - - src/main/java/dev/plexapi/sdk/operations/GetFileHash.java - - src/main/java/dev/plexapi/sdk/operations/GetGenresLibrary.java - - src/main/java/dev/plexapi/sdk/operations/GetGeoData.java - - src/main/java/dev/plexapi/sdk/operations/GetGlobalHubs.java - - src/main/java/dev/plexapi/sdk/operations/GetHomeData.java + - src/main/java/dev/plexapi/sdk/operations/DeletePlaylistItem.java + - src/main/java/dev/plexapi/sdk/operations/DeleteStream.java + - src/main/java/dev/plexapi/sdk/operations/DeleteSubscription.java + - src/main/java/dev/plexapi/sdk/operations/DetectAds.java + - src/main/java/dev/plexapi/sdk/operations/DetectCredits.java + - src/main/java/dev/plexapi/sdk/operations/DetectIntros.java + - src/main/java/dev/plexapi/sdk/operations/DetectVoiceActivity.java + - src/main/java/dev/plexapi/sdk/operations/DiscoverDevices.java + - src/main/java/dev/plexapi/sdk/operations/EditMarker.java + - src/main/java/dev/plexapi/sdk/operations/EditMetadataItem.java + - src/main/java/dev/plexapi/sdk/operations/EditSection.java + - src/main/java/dev/plexapi/sdk/operations/EditSubscriptionPreferences.java + - src/main/java/dev/plexapi/sdk/operations/EmptyTrash.java + - src/main/java/dev/plexapi/sdk/operations/EnablePapertrail.java + - src/main/java/dev/plexapi/sdk/operations/GenerateThumbs.java + - src/main/java/dev/plexapi/sdk/operations/GetAlbums.java + - src/main/java/dev/plexapi/sdk/operations/GetAllHubs.java + - src/main/java/dev/plexapi/sdk/operations/GetAllItemLeaves.java + - src/main/java/dev/plexapi/sdk/operations/GetAllLanguages.java + - src/main/java/dev/plexapi/sdk/operations/GetAllLeaves.java + - src/main/java/dev/plexapi/sdk/operations/GetAllPreferences.java + - src/main/java/dev/plexapi/sdk/operations/GetAllSubscriptions.java + - src/main/java/dev/plexapi/sdk/operations/GetArts.java + - src/main/java/dev/plexapi/sdk/operations/GetAugmentationStatus.java + - src/main/java/dev/plexapi/sdk/operations/GetAvailableGrabbers.java + - src/main/java/dev/plexapi/sdk/operations/GetAvailableSorts.java + - src/main/java/dev/plexapi/sdk/operations/GetBackgroundTasks.java + - src/main/java/dev/plexapi/sdk/operations/GetCategories.java + - src/main/java/dev/plexapi/sdk/operations/GetChannels.java + - src/main/java/dev/plexapi/sdk/operations/GetChapterImage.java + - src/main/java/dev/plexapi/sdk/operations/GetCluster.java + - src/main/java/dev/plexapi/sdk/operations/GetCollectionImage.java + - src/main/java/dev/plexapi/sdk/operations/GetCollectionItems.java + - src/main/java/dev/plexapi/sdk/operations/GetCollections.java + - src/main/java/dev/plexapi/sdk/operations/GetColors.java + - src/main/java/dev/plexapi/sdk/operations/GetCommon.java + - src/main/java/dev/plexapi/sdk/operations/GetContinueWatching.java + - src/main/java/dev/plexapi/sdk/operations/GetCountries.java + - src/main/java/dev/plexapi/sdk/operations/GetCountriesLineups.java + - src/main/java/dev/plexapi/sdk/operations/GetCountryRegions.java + - src/main/java/dev/plexapi/sdk/operations/GetDVR.java + - src/main/java/dev/plexapi/sdk/operations/GetDeviceDetails.java + - src/main/java/dev/plexapi/sdk/operations/GetDevicesChannels.java + - src/main/java/dev/plexapi/sdk/operations/GetDownloadQueue.java + - src/main/java/dev/plexapi/sdk/operations/GetDownloadQueueItems.java + - src/main/java/dev/plexapi/sdk/operations/GetDownloadQueueMedia.java + - src/main/java/dev/plexapi/sdk/operations/GetExtras.java + - src/main/java/dev/plexapi/sdk/operations/GetFile.java + - src/main/java/dev/plexapi/sdk/operations/GetFirstCharacters.java + - src/main/java/dev/plexapi/sdk/operations/GetFolders.java + - src/main/java/dev/plexapi/sdk/operations/GetHistoryItem.java + - src/main/java/dev/plexapi/sdk/operations/GetHubItems.java + - src/main/java/dev/plexapi/sdk/operations/GetIdentity.java + - src/main/java/dev/plexapi/sdk/operations/GetImage.java + - src/main/java/dev/plexapi/sdk/operations/GetImageFromBif.java + - src/main/java/dev/plexapi/sdk/operations/GetItemArtwork.java + - src/main/java/dev/plexapi/sdk/operations/GetItemDecision.java + - src/main/java/dev/plexapi/sdk/operations/GetItemTree.java - src/main/java/dev/plexapi/sdk/operations/GetLibraryDetails.java - - src/main/java/dev/plexapi/sdk/operations/GetLibraryHubs.java - src/main/java/dev/plexapi/sdk/operations/GetLibraryItems.java - - src/main/java/dev/plexapi/sdk/operations/GetLibrarySectionsAll.java - - src/main/java/dev/plexapi/sdk/operations/GetMediaArts.java - - src/main/java/dev/plexapi/sdk/operations/GetMediaMetaData.java - - src/main/java/dev/plexapi/sdk/operations/GetMediaPosters.java - - src/main/java/dev/plexapi/sdk/operations/GetMediaProviders.java - - src/main/java/dev/plexapi/sdk/operations/GetMetadataChildren.java - - src/main/java/dev/plexapi/sdk/operations/GetMyPlexAccount.java - - src/main/java/dev/plexapi/sdk/operations/GetPin.java + - src/main/java/dev/plexapi/sdk/operations/GetLibraryMatches.java + - src/main/java/dev/plexapi/sdk/operations/GetLineup.java + - src/main/java/dev/plexapi/sdk/operations/GetLineupChannels.java + - src/main/java/dev/plexapi/sdk/operations/GetLiveTVSession.java + - src/main/java/dev/plexapi/sdk/operations/GetMediaPart.java + - src/main/java/dev/plexapi/sdk/operations/GetMetadataHubs.java + - src/main/java/dev/plexapi/sdk/operations/GetMetadataItem.java + - src/main/java/dev/plexapi/sdk/operations/GetNotifications.java + - src/main/java/dev/plexapi/sdk/operations/GetPartIndex.java + - src/main/java/dev/plexapi/sdk/operations/GetPerson.java + - src/main/java/dev/plexapi/sdk/operations/GetPlayQueue.java - src/main/java/dev/plexapi/sdk/operations/GetPlaylist.java - - src/main/java/dev/plexapi/sdk/operations/GetPlaylistContents.java - - src/main/java/dev/plexapi/sdk/operations/GetPlaylists.java - - src/main/java/dev/plexapi/sdk/operations/GetRecentlyAdded.java - - src/main/java/dev/plexapi/sdk/operations/GetRecentlyAddedLibrary.java - - src/main/java/dev/plexapi/sdk/operations/GetRefreshLibraryMetadata.java - - src/main/java/dev/plexapi/sdk/operations/GetResizedPhoto.java - - src/main/java/dev/plexapi/sdk/operations/GetResourcesStatistics.java - - src/main/java/dev/plexapi/sdk/operations/GetSearchAllLibraries.java - - src/main/java/dev/plexapi/sdk/operations/GetSearchLibrary.java - - src/main/java/dev/plexapi/sdk/operations/GetSearchResults.java - - src/main/java/dev/plexapi/sdk/operations/GetServerActivities.java - - src/main/java/dev/plexapi/sdk/operations/GetServerCapabilities.java - - src/main/java/dev/plexapi/sdk/operations/GetServerIdentity.java - - src/main/java/dev/plexapi/sdk/operations/GetServerList.java - - src/main/java/dev/plexapi/sdk/operations/GetServerPreferences.java - - src/main/java/dev/plexapi/sdk/operations/GetServerResources.java - - src/main/java/dev/plexapi/sdk/operations/GetSessionHistory.java + - src/main/java/dev/plexapi/sdk/operations/GetPlaylistGenerator.java + - src/main/java/dev/plexapi/sdk/operations/GetPlaylistGeneratorItems.java + - src/main/java/dev/plexapi/sdk/operations/GetPlaylistGenerators.java + - src/main/java/dev/plexapi/sdk/operations/GetPlaylistItems.java + - src/main/java/dev/plexapi/sdk/operations/GetPostplayHubs.java + - src/main/java/dev/plexapi/sdk/operations/GetPreference.java + - src/main/java/dev/plexapi/sdk/operations/GetPromotedHubs.java + - src/main/java/dev/plexapi/sdk/operations/GetRandomArtwork.java + - src/main/java/dev/plexapi/sdk/operations/GetRelatedHubs.java + - src/main/java/dev/plexapi/sdk/operations/GetRelatedItems.java + - src/main/java/dev/plexapi/sdk/operations/GetScheduledRecordings.java + - src/main/java/dev/plexapi/sdk/operations/GetSectionFilters.java + - src/main/java/dev/plexapi/sdk/operations/GetSectionHubs.java + - src/main/java/dev/plexapi/sdk/operations/GetSectionImage.java + - src/main/java/dev/plexapi/sdk/operations/GetSectionPreferences.java + - src/main/java/dev/plexapi/sdk/operations/GetSections.java + - src/main/java/dev/plexapi/sdk/operations/GetSectionsPrefs.java + - src/main/java/dev/plexapi/sdk/operations/GetServerInfo.java + - src/main/java/dev/plexapi/sdk/operations/GetSessionPlaylistIndex.java + - src/main/java/dev/plexapi/sdk/operations/GetSessionSegment.java - src/main/java/dev/plexapi/sdk/operations/GetSessions.java + - src/main/java/dev/plexapi/sdk/operations/GetSonicPath.java + - src/main/java/dev/plexapi/sdk/operations/GetSonicallySimilar.java - src/main/java/dev/plexapi/sdk/operations/GetSourceConnectionInformation.java - - src/main/java/dev/plexapi/sdk/operations/GetStatistics.java - - src/main/java/dev/plexapi/sdk/operations/GetThumbImage.java - - src/main/java/dev/plexapi/sdk/operations/GetTimeline.java - - src/main/java/dev/plexapi/sdk/operations/GetTokenByPinId.java - - src/main/java/dev/plexapi/sdk/operations/GetTokenDetails.java - - src/main/java/dev/plexapi/sdk/operations/GetTopWatchedContent.java - - src/main/java/dev/plexapi/sdk/operations/GetTranscodeSessions.java + - src/main/java/dev/plexapi/sdk/operations/GetStream.java + - src/main/java/dev/plexapi/sdk/operations/GetStreamLevels.java + - src/main/java/dev/plexapi/sdk/operations/GetStreamLoudness.java + - src/main/java/dev/plexapi/sdk/operations/GetSubscription.java + - src/main/java/dev/plexapi/sdk/operations/GetTags.java + - src/main/java/dev/plexapi/sdk/operations/GetTasks.java + - src/main/java/dev/plexapi/sdk/operations/GetTemplate.java + - src/main/java/dev/plexapi/sdk/operations/GetThumb.java - src/main/java/dev/plexapi/sdk/operations/GetTransientToken.java - - src/main/java/dev/plexapi/sdk/operations/GetUpdateStatus.java - - src/main/java/dev/plexapi/sdk/operations/GetUserFriends.java - - src/main/java/dev/plexapi/sdk/operations/GetUsers.java - - src/main/java/dev/plexapi/sdk/operations/GetWatchList.java - - src/main/java/dev/plexapi/sdk/operations/LogLine.java - - src/main/java/dev/plexapi/sdk/operations/LogMultiLine.java + - src/main/java/dev/plexapi/sdk/operations/GetUpdatesStatus.java + - src/main/java/dev/plexapi/sdk/operations/IngestTransientItem.java + - src/main/java/dev/plexapi/sdk/operations/ListActivities.java + - src/main/java/dev/plexapi/sdk/operations/ListContent.java + - src/main/java/dev/plexapi/sdk/operations/ListDVRs.java + - src/main/java/dev/plexapi/sdk/operations/ListDevices.java + - src/main/java/dev/plexapi/sdk/operations/ListDownloadQueueItems.java + - src/main/java/dev/plexapi/sdk/operations/ListHubs.java + - src/main/java/dev/plexapi/sdk/operations/ListLineups.java + - src/main/java/dev/plexapi/sdk/operations/ListMatches.java + - src/main/java/dev/plexapi/sdk/operations/ListMoments.java + - src/main/java/dev/plexapi/sdk/operations/ListPersonMedia.java + - src/main/java/dev/plexapi/sdk/operations/ListPlaybackHistory.java + - src/main/java/dev/plexapi/sdk/operations/ListPlaylists.java + - src/main/java/dev/plexapi/sdk/operations/ListProviders.java + - src/main/java/dev/plexapi/sdk/operations/ListSessions.java + - src/main/java/dev/plexapi/sdk/operations/ListSimilar.java + - src/main/java/dev/plexapi/sdk/operations/ListSonicallySimilar.java + - src/main/java/dev/plexapi/sdk/operations/ListTopUsers.java + - src/main/java/dev/plexapi/sdk/operations/MakeDecision.java - src/main/java/dev/plexapi/sdk/operations/MarkPlayed.java - - src/main/java/dev/plexapi/sdk/operations/MarkUnplayed.java + - src/main/java/dev/plexapi/sdk/operations/MatchItem.java + - src/main/java/dev/plexapi/sdk/operations/MergeItems.java + - src/main/java/dev/plexapi/sdk/operations/ModifyDevice.java + - src/main/java/dev/plexapi/sdk/operations/MoveCollectionItem.java + - src/main/java/dev/plexapi/sdk/operations/MoveHub.java + - src/main/java/dev/plexapi/sdk/operations/MovePlayQueueItem.java + - src/main/java/dev/plexapi/sdk/operations/MovePlaylistItem.java - src/main/java/dev/plexapi/sdk/operations/Operations.java - - src/main/java/dev/plexapi/sdk/operations/PerformSearch.java - - src/main/java/dev/plexapi/sdk/operations/PerformVoiceSearch.java - - src/main/java/dev/plexapi/sdk/operations/PostMediaArts.java - - src/main/java/dev/plexapi/sdk/operations/PostMediaPoster.java - - src/main/java/dev/plexapi/sdk/operations/PostUsersSignInData.java - - src/main/java/dev/plexapi/sdk/operations/StartAllTasks.java + - src/main/java/dev/plexapi/sdk/operations/OptimizeDatabase.java + - src/main/java/dev/plexapi/sdk/operations/ProcessSubscriptions.java + - src/main/java/dev/plexapi/sdk/operations/RefreshItemsMetadata.java + - src/main/java/dev/plexapi/sdk/operations/RefreshPlaylist.java + - src/main/java/dev/plexapi/sdk/operations/RefreshProviders.java + - src/main/java/dev/plexapi/sdk/operations/RefreshSection.java + - src/main/java/dev/plexapi/sdk/operations/RefreshSectionsMetadata.java + - src/main/java/dev/plexapi/sdk/operations/ReloadGuide.java + - src/main/java/dev/plexapi/sdk/operations/RemoveDevice.java + - src/main/java/dev/plexapi/sdk/operations/RemoveDeviceFromDVR.java + - src/main/java/dev/plexapi/sdk/operations/RemoveDownloadQueueItems.java + - src/main/java/dev/plexapi/sdk/operations/ReorderSubscription.java + - src/main/java/dev/plexapi/sdk/operations/Report.java + - src/main/java/dev/plexapi/sdk/operations/ResetPlayQueue.java + - src/main/java/dev/plexapi/sdk/operations/ResetSectionDefaults.java + - src/main/java/dev/plexapi/sdk/operations/RestartProcessingDownloadQueueItems.java + - src/main/java/dev/plexapi/sdk/operations/Scan.java + - src/main/java/dev/plexapi/sdk/operations/SearchHubs.java + - src/main/java/dev/plexapi/sdk/operations/SetChannelmap.java + - src/main/java/dev/plexapi/sdk/operations/SetDVRPreferences.java + - src/main/java/dev/plexapi/sdk/operations/SetDevicePreferences.java + - src/main/java/dev/plexapi/sdk/operations/SetItemArtwork.java + - src/main/java/dev/plexapi/sdk/operations/SetItemPreferences.java + - src/main/java/dev/plexapi/sdk/operations/SetPreferences.java + - src/main/java/dev/plexapi/sdk/operations/SetRating.java + - src/main/java/dev/plexapi/sdk/operations/SetSectionPreferences.java + - src/main/java/dev/plexapi/sdk/operations/SetStreamOffset.java + - src/main/java/dev/plexapi/sdk/operations/SetStreamSelection.java + - src/main/java/dev/plexapi/sdk/operations/Shuffle.java + - src/main/java/dev/plexapi/sdk/operations/SplitItem.java + - src/main/java/dev/plexapi/sdk/operations/StartAnalysis.java + - src/main/java/dev/plexapi/sdk/operations/StartBifGeneration.java - src/main/java/dev/plexapi/sdk/operations/StartTask.java - - src/main/java/dev/plexapi/sdk/operations/StartUniversalTranscode.java - - src/main/java/dev/plexapi/sdk/operations/StopAllTasks.java + - src/main/java/dev/plexapi/sdk/operations/StartTasks.java + - src/main/java/dev/plexapi/sdk/operations/StartTranscodeSession.java + - src/main/java/dev/plexapi/sdk/operations/StopAllRefreshes.java + - src/main/java/dev/plexapi/sdk/operations/StopDVRReload.java + - src/main/java/dev/plexapi/sdk/operations/StopScan.java - src/main/java/dev/plexapi/sdk/operations/StopTask.java - - src/main/java/dev/plexapi/sdk/operations/StopTranscodeSession.java - - src/main/java/dev/plexapi/sdk/operations/UpdatePlayProgress.java + - src/main/java/dev/plexapi/sdk/operations/StopTasks.java + - src/main/java/dev/plexapi/sdk/operations/TerminateSession.java + - src/main/java/dev/plexapi/sdk/operations/TranscodeImage.java + - src/main/java/dev/plexapi/sdk/operations/TranscodeSubtitles.java + - src/main/java/dev/plexapi/sdk/operations/TriggerFallback.java + - src/main/java/dev/plexapi/sdk/operations/TuneChannel.java + - src/main/java/dev/plexapi/sdk/operations/Unmatch.java + - src/main/java/dev/plexapi/sdk/operations/Unscrobble.java + - src/main/java/dev/plexapi/sdk/operations/Unshuffle.java + - src/main/java/dev/plexapi/sdk/operations/UpdateHubVisibility.java + - src/main/java/dev/plexapi/sdk/operations/UpdateItemArtwork.java + - src/main/java/dev/plexapi/sdk/operations/UpdateItems.java - src/main/java/dev/plexapi/sdk/operations/UpdatePlaylist.java - src/main/java/dev/plexapi/sdk/operations/UploadPlaylist.java + - src/main/java/dev/plexapi/sdk/operations/VoiceSearchHubs.java + - src/main/java/dev/plexapi/sdk/operations/WriteLog.java + - src/main/java/dev/plexapi/sdk/operations/WriteMessage.java - src/main/java/dev/plexapi/sdk/utils/AsyncHook.java - src/main/java/dev/plexapi/sdk/utils/AsyncHooks.java - src/main/java/dev/plexapi/sdk/utils/AsyncResponse.java @@ -2572,6 +2814,19 @@ examples: parameters: query: key: 59398 + identifier: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -2790,6 +3045,19 @@ examples: parameters: path: taskName: "RefreshPeriodicMetadata" + task: "RefreshLocalMedia" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -2800,6 +3068,19 @@ examples: parameters: path: taskName: "CleanOldCacheFiles" + task: "CleanOldBundles" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -3366,9 +3647,21 @@ examples: type: "audio" smart: 1 uri: "https://short-term-disconnection.name/" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "200": - application/json: {"MediaContainer": {"size": 7, "Metadata": [{"ratingKey": "96", "key": "/playlists/96/items", "guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", "type": "playlist", "title": "A Great Playlist", "summary": "What a great playlist", "smart": false, "playlistType": "video", "icon": "playlist://image.smart", "viewCount": 1, "lastViewedAt": 1705719589, "leafCount": 1, "addedAt": 1705719589, "updatedAt": 1705724593, "composite": "/playlists/96/composite/1705724593", "duration": 141000}]}} + application/json: {"MediaContainer": {"Metadata": [{"composite": "/playlists/96/composite/1705724593", "duration": 141000, "key": "/playlists/96/items", "leafCount": 1, "playlistType": "video", "smart": false, "title": "A Great Playlist", "type": "playlist", "addedAt": 1705719589, "lastViewedAt": 1705719589, "ratingKey": "96", "summary": "What a great playlist", "updatedAt": 1705724593, "viewCount": 1, "guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", "icon": "playlist://image.smart"}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": @@ -3387,9 +3680,22 @@ examples: parameters: path: playlistID: 8419.53 + playlistId: 841953 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "200": - application/json: {"MediaContainer": {"size": 1, "Metadata": [{"content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", "ratingKey": "95", "key": "/playlists/95/items", "guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", "type": "playlist", "title": "Smart Movie Playlist", "summary": "", "smart": true, "playlistType": "video", "composite": "/playlists/95/composite/1705717387", "icon": "playlist://image.smart", "duration": 282000, "leafCount": 2, "addedAt": 1705716493, "updatedAt": 1705717387}]}} + application/json: {"MediaContainer": {"Metadata": [{"composite": "/playlists/95/composite/1705717387", "duration": 282000, "key": "/playlists/95/items", "leafCount": 2, "playlistType": "video", "smart": true, "title": "Smart Movie Playlist", "type": "playlist", "addedAt": 1705716493, "ratingKey": "95", "summary": "", "updatedAt": 1705717387, "content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", "guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", "icon": "playlist://image.smart"}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": @@ -3399,6 +3705,19 @@ examples: parameters: path: playlistID: 3432.93 + playlistId: 343293 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -3409,6 +3728,19 @@ examples: parameters: path: playlistID: 1579.66 + playlistId: 157966 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -3460,6 +3792,18 @@ examples: path: "/home/barkley/playlist.m3u" force: 1 sectionID: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -3471,21 +3815,50 @@ examples: query: type: "delegation" scope: "all" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "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}]} + "200": + application/json: {} getSourceConnectionInformation: speakeasy-default-get-source-connection-information: parameters: query: source: "server://client-identifier" + refresh: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "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}]} + "200": + application/json: {} getTokenDetails: speakeasy-default-get-token-details: responses: @@ -3603,7 +3976,7 @@ examples: speakeasy-default-get-sessions: responses: "200": - application/json: {"MediaContainer": {"size": 1, "Metadata": [{"addedAt": 1705543312, "art": "/library/metadata/39904/art/1705310687", "duration": 186240, "grandparentArt": "/library/metadata/39904/art/1705310687", "grandparentGuid": "plex://artist/5d07bbfd403c6402904a6480", "grandparentKey": "/library/metadata/39904", "grandparentRatingKey": "39904", "grandparentThumb": "/library/metadata/39904/thumb/1705310687", "grandparentTitle": "Green Day", "guid": "plex://track/6535834f71f22f36f71a8e8f", "index": 1, "key": "/library/metadata/67085", "librarySectionID": "3", "librarySectionKey": "/library/sections/3", "librarySectionTitle": "Music", "musicAnalysisVersion": "1", "originalTitle": "The American Dream Is Killing Me", "parentGuid": "plex://album/65394d6d472b8ab03ef47f12", "parentIndex": 1, "parentKey": "/library/metadata/67084", "parentRatingKey": "67084", "parentStudio": "Reprise Records", "parentThumb": "/library/metadata/67084/thumb/1705543314", "parentTitle": "Saviors", "parentYear": 2024, "ratingCount": 45885, "ratingKey": "67085", "sessionKey": "203", "thumb": "/library/metadata/67084/thumb/1705543314", "title": "The American Dream Is Killing Me", "titleSort": "American Dream Is Killing Me", "type": "track", "updatedAt": 1705543314, "viewOffset": 1000, "Media": [{"audioChannels": 2, "audioCodec": "flac", "bitrate": 1014, "container": "flac", "duration": 186240, "id": "130355", "selected": true, "Part": [{"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}]}], "User": {"id": "1", "thumb": "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", "title": "Blindkitty38"}, "Player": {"address": "10.10.10.171", "machineIdentifier": "3tsdzir85m2onc3qyr255aq1", "model": "standalone", "platform": "windows", "platformVersion": "10.0.22621", "product": "Plex for Windows", "profile": "Plex Desktop", "remotePublicAddress": "68.248.140.20", "state": "playing", "title": "DESKTOP-BL80MTD", "version": "1.85.0.4071-21128b56", "local": true, "relayed": false, "secure": true, "userID": 1}, "Session": {"id": "93h7e00ncblxncqw9lkfaoxi", "bandwidth": 1050, "location": "lan"}}]}} + application/json: {"MediaContainer": {"Metadata": [{"title": "The American Dream Is Killing Me", "type": "track", "addedAt": 1705543312, "art": "/library/metadata/39904/art/1705310687", "duration": 186240, "grandparentArt": "/library/metadata/39904/art/1705310687", "grandparentKey": "/library/metadata/39904", "grandparentRatingKey": "39904", "grandparentThumb": "/library/metadata/39904/thumb/1705310687", "grandparentTitle": "Green Day", "index": 1, "key": "/library/metadata/67085", "Media": [{"audioChannels": 2, "audioCodec": "flac", "bitrate": 1014, "container": "flac", "duration": 186240, "id": 130355, "Part": [{"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "id": 130625, "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "Stream": [{"audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "codec": "flac", "displayTitle": "FLAC (Stereo)", "id": 352487, "index": 0, "samplingRate": 44100, "selected": true, "streamType": 2, "albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "channels": 2, "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "location": "direct"}], "hasThumbnail": "1", "decision": "directplay", "selected": true}], "selected": true}], "originalTitle": "The American Dream Is Killing Me", "parentIndex": 1, "parentKey": "/library/metadata/67084", "parentRatingKey": "67084", "parentThumb": "/library/metadata/67084/thumb/1705543314", "parentTitle": "Saviors", "ratingCount": 45885, "ratingKey": "67085", "thumb": "/library/metadata/67084/thumb/1705543314", "titleSort": "American Dream Is Killing Me", "updatedAt": 1705543314, "viewOffset": 1000, "grandparentGuid": "plex://artist/5d07bbfd403c6402904a6480", "guid": "plex://track/6535834f71f22f36f71a8e8f", "librarySectionID": "3", "librarySectionKey": "/library/sections/3", "librarySectionTitle": "Music", "musicAnalysisVersion": "1", "parentGuid": "plex://album/65394d6d472b8ab03ef47f12", "parentStudio": "Reprise Records", "parentYear": 2024, "sessionKey": "203", "User": {"id": "1", "thumb": "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", "title": "Blindkitty38"}, "Player": {"address": "10.10.10.171", "machineIdentifier": "3tsdzir85m2onc3qyr255aq1", "model": "standalone", "platform": "windows", "platformVersion": "10.0.22621", "product": "Plex for Windows", "profile": "Plex Desktop", "remotePublicAddress": "68.248.140.20", "state": "playing", "title": "DESKTOP-BL80MTD", "version": "1.85.0.4071-21128b56", "local": true, "relayed": false, "secure": true, "userID": 1}, "Session": {"id": "93h7e00ncblxncqw9lkfaoxi", "bandwidth": 1050, "location": "lan"}}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": @@ -3767,6 +4140,18 @@ examples: query: tonight: 1 skip: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -3819,5 +4204,4200 @@ examples: application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} + getServerInfo: + speakeasy-default-get-server-info: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getIdentity: + speakeasy-default-get-identity: + responses: + "200": + application/json: {} + getNotifications: + speakeasy-default-get-notifications: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/octet-stream: "x-file: example.file" + connectWebSocket: + speakeasy-default-connect-web-socket: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/octet-stream: "x-file: example.file" + getAllPreferences: + speakeasy-default-get-all-preferences: + responses: + "200": + application/json: {} + setPreferences: + speakeasy-default-set-preferences: + parameters: + query: + prefs: {} + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getPreference: + speakeasy-default-get-preference: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + setRating: + speakeasy-default-set-rating: + parameters: + query: + identifier: "" + key: "" + rating: 8722.46 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + report: + speakeasy-default-report: + parameters: + query: + key: "/foo" + ratingKey: "xyz" + state: "playing" + playQueueItemID: "123" + time: 0 + duration: 10000 + continuing: 1 + updated: 14200000 + offline: 1 + timeToFirstFrame: 1000 + timeStalled: 1000 + bandwidth: 100 + bufferedTime: 100 + bufferedSize: 1024 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"livetv": 7, "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", "musicAnalysis": 2, "myPlexMappingState": "mapped", "myPlexSigninState": "ok", "offlineTranscode": 1}} + unscrobble: + speakeasy-default-unscrobble: + parameters: + query: + identifier: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listActivities: + speakeasy-default-list-activities: + responses: + "200": + application/json: {} + cancelActivity: + speakeasy-default-cancel-activity: + parameters: + path: + activityId: "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + stopTasks: {} + getTasks: + speakeasy-default-get-tasks: + responses: + "200": + application/json: {} + startTasks: {} + createDownloadQueue: + speakeasy-default-create-download-queue: + responses: + "200": + application/json: {} + getDownloadQueue: + speakeasy-default-get-download-queue: + parameters: + path: + queueId: 922802 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + addDownloadQueueItems: + speakeasy-default-add-download-queue-items: + parameters: + path: + queueId: 984925 + query: + keys: ["/library/metadata/3", "/library/metadata/6"] + advancedSubtitles: "burn" + audioBoost: 50 + audioChannelCount: 5 + autoAdjustQuality: 1 + autoAdjustSubtitle: 1 + directPlay: 1 + directStream: 1 + directStreamAudio: 1 + disableResolutionRotation: 1 + hasMDE: 1 + location: "wan" + mediaBufferSize: 102400 + mediaIndex: 0 + musicBitrate: 5000 + offset: 90.5 + partIndex: 0 + path: "/library/metadata/151671" + peakBitrate: 12000 + photoResolution: "1080x1080" + protocol: "dash" + secondsPerSegment: 5 + subtitleSize: 50 + subtitles: "segmented" + videoBitrate: 12000 + videoQuality: 50 + videoResolution: "1080x1080" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + listDownloadQueueItems: + speakeasy-default-list-download-queue-items: + parameters: + path: + queueId: 524138 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getItemDecision: + speakeasy-default-get-item-decision: + parameters: + path: + queueId: 231605 + itemId: 32 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getDownloadQueueMedia: + speakeasy-default-get-download-queue-media: + parameters: + path: + queueId: 663184 + itemId: 32 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + removeDownloadQueueItems: + speakeasy-default-remove-download-queue-items: + parameters: + path: + queueId: 946275 + itemId: [32, 345, 23] + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getDownloadQueueItems: + speakeasy-default-get-download-queue-items: + parameters: + path: + queueId: 809886 + itemId: [32, 345, 23] + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + restartProcessingDownloadQueueItems: + speakeasy-default-restart-processing-download-queue-items: + parameters: + path: + queueId: 713001 + itemId: [32, 345, 23] + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAllHubs: + speakeasy-default-get-all-hubs: + parameters: + query: + onlyTransient: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getContinueWatching: + speakeasy-default-get-continue-watching: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getHubItems: + speakeasy-default-get-hub-items: + parameters: + query: + identifier: ["", "", ""] + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getPromotedHubs: + speakeasy-default-get-promoted-hubs: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getMetadataHubs: + speakeasy-default-get-metadata-hubs: + parameters: + path: + metadataId: 605482 + query: + onlyTransient: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getPostplayHubs: + speakeasy-default-get-postplay-hubs: + parameters: + path: + metadataId: 441419 + query: + onlyTransient: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getRelatedHubs: + speakeasy-default-get-related-hubs: + parameters: + path: + metadataId: 8858 + query: + onlyTransient: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getSectionHubs: + speakeasy-default-get-section-hubs: + parameters: + path: + sectionId: 336924 + query: + onlyTransient: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + resetSectionDefaults: + speakeasy-default-reset-section-defaults: + parameters: + path: + sectionId: 383022 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listHubs: + speakeasy-default-list-hubs: + parameters: + path: + sectionId: 442546 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + createCustomHub: + speakeasy-default-create-custom-hub: + parameters: + path: + sectionId: 869922 + query: + metadataItemId: 703843 + promotedToRecommended: 1 + promotedToOwnHome: 1 + promotedToSharedHome: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + moveHub: + speakeasy-default-move-hub: + parameters: + path: + sectionId: 755710 + query: + identifier: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteCustomHub: + speakeasy-default-delete-custom-hub: + parameters: + path: + sectionId: 625677 + identifier: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + updateHubVisibility: + speakeasy-default-update-hub-visibility: + parameters: + path: + sectionId: 341650 + identifier: "" + query: + promotedToRecommended: 1 + promotedToOwnHome: 1 + promotedToSharedHome: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + searchHubs: + speakeasy-default-search-hubs: + parameters: + query: + query: "" + sectionId: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + voiceSearchHubs: + speakeasy-default-voice-search-hubs: + parameters: + query: + query: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getLibraryItems: + speakeasy-default-get-library-items: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + deleteCaches: {} + cleanBundles: {} + ingestTransientItem: + speakeasy-default-ingest-transient-item: + parameters: + query: + url: "file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv" + virtualFilePath: "/Avatar.mkv" + computeHashes: 1 + ingestNonMatches: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getLibraryMatches: + speakeasy-default-get-library-matches: + parameters: + query: + includeFullMetadata: 1 + includeAncestorMetadata: 1 + includeAlternateMetadataSources: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + optimizeDatabase: + speakeasy-default-optimize-database: + parameters: + query: + async: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getRandomArtwork: + speakeasy-default-get-random-artwork: + parameters: + query: + sections: [5, 6] + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getSections: + speakeasy-default-get-sections: + responses: + "200": + application/json: {} + addSection: + speakeasy-default-add-section: + parameters: + query: + name: "" + type: 39544 + agent: "" + language: "" + locations: ["O:\\fatboy\\Media\\Ripped\\Music", "O:\\fatboy\\Media\\My Music"] + prefs: {} + relative: 1 + importFromiTunes: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Directory": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + stopAllRefreshes: + speakeasy-default-stop-all-refreshes: + responses: + "200": + application/json: {"MediaContainer": {"livetv": 7, "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", "musicAnalysis": 2, "myPlexMappingState": "mapped", "myPlexSigninState": "ok", "offlineTranscode": 1}} + getSectionsPrefs: + speakeasy-default-get-sections-prefs: + parameters: + query: + type: 460221 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"livetv": 7, "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", "musicAnalysis": 2, "myPlexMappingState": "mapped", "myPlexSigninState": "ok", "offlineTranscode": 1}} + refreshSectionsMetadata: + speakeasy-default-refresh-sections-metadata: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getTags: + speakeasy-default-get-tags: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteMetadataItem: + speakeasy-default-delete-metadata-item: + parameters: + path: + ids: "" + query: + proxy: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + editMetadataItem: + speakeasy-default-edit-metadata-item: + parameters: + path: + ids: ["", ""] + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + detectAds: + speakeasy-default-detect-ads: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAllItemLeaves: + speakeasy-default-get-all-item-leaves: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + analyzeMetadata: + speakeasy-default-analyze-metadata: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + generateThumbs: + speakeasy-default-generate-thumbs: + parameters: + path: + ids: "" + query: + force: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + detectCredits: + speakeasy-default-detect-credits: + parameters: + path: + ids: "" + query: + force: 1 + manual: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getExtras: + speakeasy-default-get-extras: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + addExtras: + speakeasy-default-add-extras: + parameters: + path: + ids: "" + query: + url: "https://super-mortise.biz/" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getFile: + speakeasy-default-get-file: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + audio/mpeg3: "x-file: example.file" + image/jpeg: "x-file: example.file" + startBifGeneration: + speakeasy-default-start-bif-generation: + parameters: + path: + ids: "" + query: + force: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + detectIntros: + speakeasy-default-detect-intros: + parameters: + path: + ids: "" + query: + force: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + createMarker: + speakeasy-default-create-marker: + parameters: + path: + ids: "" + query: + type: 248391 + startTimeOffset: 535191 + attributes: {} + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + matchItem: + speakeasy-default-match-item: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listMatches: + speakeasy-default-list-matches: + parameters: + path: + ids: "" + query: + manual: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + mergeItems: + speakeasy-default-merge-items: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listSonicallySimilar: + speakeasy-default-list-sonically-similar: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + setItemPreferences: + speakeasy-default-set-item-preferences: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + refreshItemsMetadata: + speakeasy-default-refresh-items-metadata: + parameters: + path: + ids: "" + query: + markUpdated: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getRelatedItems: + speakeasy-default-get-related-items: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + listSimilar: + speakeasy-default-list-similar: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + splitItem: + speakeasy-default-split-item: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + addSubtitles: + speakeasy-default-add-subtitles: + parameters: + path: + ids: "" + query: + forced: 1 + hearingImpaired: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getItemTree: + speakeasy-default-get-item-tree: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MetadataItem": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "MetadataItem": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}]}} + unmatch: + speakeasy-default-unmatch: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listTopUsers: + speakeasy-default-list-top-users: + parameters: + path: + ids: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + detectVoiceActivity: + speakeasy-default-detect-voice-activity: + parameters: + path: + ids: "" + query: + force: 1 + manual: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAugmentationStatus: + speakeasy-default-get-augmentation-status: + parameters: + path: + augmentationId: "" + query: + wait: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + setStreamSelection: + speakeasy-default-set-stream-selection: + parameters: + path: + partId: 360489 + query: + allParts: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getPerson: + speakeasy-default-get-person: + parameters: + path: + personId: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Directory": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}} + listPersonMedia: + speakeasy-default-list-person-media: + parameters: + path: + personId: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + deleteLibrarySection: + speakeasy-default-delete-library-section: + parameters: + path: + sectionId: "" + query: + async: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getLibraryDetails: + speakeasy-default-get-library-details: + parameters: + path: + sectionId: "" + query: + includeDetails: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Directory": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + editSection: + speakeasy-default-edit-section: + parameters: + path: + sectionId: "" + query: + agent: "" + locations: ["O:\\fatboy\\Media\\Ripped\\Music", "O:\\fatboy\\Media\\My Music"] + prefs: {} + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + updateItems: + speakeasy-default-update-items: + parameters: + path: + sectionId: "" + query: + field.locked: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + startAnalysis: + speakeasy-default-start-analysis: + parameters: + path: + sectionId: 158829 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + autocomplete: + speakeasy-default-autocomplete: + parameters: + path: + sectionId: 942007 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getCollections: + speakeasy-default-get-collections: + parameters: + path: + sectionId: 348838 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getCommon: + speakeasy-default-get-common: + parameters: + path: + sectionId: 298154 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + emptyTrash: + speakeasy-default-empty-trash: + parameters: + path: + sectionId: 30052 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getSectionFilters: + speakeasy-default-get-section-filters: + parameters: + path: + sectionId: 380557 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getFirstCharacters: + speakeasy-default-get-first-characters: + parameters: + path: + sectionId: 3947 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteIndexes: + speakeasy-default-delete-indexes: + parameters: + path: + sectionId: 588437 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + deleteIntros: + speakeasy-default-delete-intros: + parameters: + path: + sectionId: 498656 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getSectionPreferences: + speakeasy-default-get-section-preferences: + parameters: + path: + sectionId: 754869 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + setSectionPreferences: + speakeasy-default-set-section-preferences: + parameters: + path: + sectionId: 349936 + query: + prefs: {} + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + cancelRefresh: + speakeasy-default-cancel-refresh: + parameters: + path: + sectionId: 326852 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + refreshSection: + speakeasy-default-refresh-section: + parameters: + path: + sectionId: 450300 + query: + force: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAvailableSorts: + speakeasy-default-get-available-sorts: + parameters: + path: + sectionId: 212498 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getStreamLevels: + speakeasy-default-get-stream-levels: + parameters: + path: + streamId: 447611 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getStreamLoudness: + speakeasy-default-get-stream-loudness: + parameters: + path: + streamId: 277271 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + text/plain: "" + getChapterImage: + speakeasy-default-get-chapter-image: + parameters: + path: + mediaId: 892563 + chapter: 48348 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + image/jpeg: "x-file: example.file" + setItemArtwork: + speakeasy-default-set-item-artwork: + parameters: + path: + ids: "" + element: "banner" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + updateItemArtwork: + speakeasy-default-update-item-artwork: + parameters: + path: + ids: "" + element: "clearLogo" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + deleteMarker: + speakeasy-default-delete-marker: + parameters: + path: + ids: "" + marker: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + editMarker: + speakeasy-default-edit-marker: + parameters: + path: + ids: "" + marker: "" + query: + type: 884347 + startTimeOffset: 517251 + attributes: {} + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteMediaItem: + speakeasy-default-delete-media-item: + parameters: + path: + ids: "" + mediaItem: "" + query: + proxy: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getPartIndex: + speakeasy-default-get-part-index: + parameters: + path: + partId: 724750 + index: "sd" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/octet-stream: "x-file: example.file" + deleteCollection: + speakeasy-default-delete-collection: + parameters: + path: + sectionId: 283619 + collectionId: 680895 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getSectionImage: + speakeasy-default-get-section-image: + parameters: + path: + sectionId: 925611 + updatedAt: 117413 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + deleteStream: + speakeasy-default-delete-stream: + parameters: + path: + streamId: 841510 + ext: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getStream: + speakeasy-default-get-stream: + parameters: + path: + streamId: 314506 + ext: "" + query: + autoAdjustSubtitle: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + setStreamOffset: + speakeasy-default-set-stream-offset: + parameters: + path: + streamId: 606295 + ext: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getItemArtwork: + speakeasy-default-get-item-artwork: + parameters: + path: + ids: "" + element: "poster" + timestamp: 999555 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + audio/mpeg3: "x-file: example.file" + image/jpeg: "x-file: example.file" + getMediaPart: + speakeasy-default-get-media-part: + parameters: + path: + partId: 877105 + changestamp: 970622 + filename: "example.file" + query: + download: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getImageFromBif: + speakeasy-default-get-image-from-bif: + parameters: + path: + partId: 304273 + index: "sd" + offset: 939569 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + image/jpeg: "x-file: example.file" + createCollection: + speakeasy-default-create-collection: + parameters: + query: + sectionId: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + listDVRs: + speakeasy-default-list-DV-rs: + responses: + "200": + application/json: {} + createDVR: + speakeasy-default-create-DVR: + parameters: + query: + lineup: "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT" + device: ["device[]=device://tv.plex.grabbers.hdhomerun/1053C0CA"] + language: "eng" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteDVR: + speakeasy-default-delete-DVR: + parameters: + path: + dvrId: 855088 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getDVR: + speakeasy-default-get-DVR: + parameters: + path: + dvrId: 973518 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteLineup: + speakeasy-default-delete-lineup: + parameters: + path: + dvrId: 454470 + query: + lineup: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + addLineup: + speakeasy-default-add-lineup: + parameters: + path: + dvrId: 945235 + query: + lineup: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + setDVRPreferences: + speakeasy-default-set-DVR-preferences: + parameters: + path: + dvrId: 116357 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + stopDVRReload: + speakeasy-default-stop-DVR-reload: + parameters: + path: + dvrId: 348053 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + reloadGuide: + speakeasy-default-reload-guide: + parameters: + path: + dvrId: 140753 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + tuneChannel: + speakeasy-default-tune-channel: + parameters: + path: + dvrId: 834281 + channel: "2.1" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + removeDeviceFromDVR: + speakeasy-default-remove-device-from-DVR: + parameters: + path: + dvrId: 945416 + deviceId: 260761 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + addDeviceToDVR: + speakeasy-default-add-device-to-DVR: + parameters: + path: + dvrId: 334755 + deviceId: 852930 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + computeChannelMap: + speakeasy-default-compute-channel-map: + parameters: + query: + device: "" + lineup: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getChannels: + speakeasy-default-get-channels: + parameters: + query: + lineup: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getCountries: + speakeasy-default-get-countries: + responses: + "200": + application/json: {} + getAllLanguages: + speakeasy-default-get-all-languages: + responses: + "200": + application/json: {} + getLineup: + speakeasy-default-get-lineup: + parameters: + query: + device: "" + lineupGroup: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getLineupChannels: + speakeasy-default-get-lineup-channels: + parameters: + query: + lineup: ["", ""] + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getCountriesLineups: + speakeasy-default-get-countries-lineups: + parameters: + path: + country: "Malawi" + epgId: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getCountryRegions: + speakeasy-default-get-country-regions: + parameters: + path: + country: "Morocco" + epgId: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + listLineups: + speakeasy-default-list-lineups: + parameters: + path: + country: "Vanuatu" + epgId: "" + region: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getLiveTVSession: + speakeasy-default-get-live-TV-session: + parameters: + path: + sessionId: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getSessionPlaylistIndex: + speakeasy-default-get-session-playlist-index: + parameters: + path: + sessionId: "" + consumerId: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getSessionSegment: + speakeasy-default-get-session-segment: + parameters: + path: + sessionId: "" + consumerId: "" + segmentId: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + writeLog: + speakeasy-default-write-log: + requestBody: + text/plain: "x-file: example.file" + writeMessage: + speakeasy-default-write-message: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + enablePapertrail: + speakeasy-default-enable-papertrail: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAvailableGrabbers: + speakeasy-default-get-available-grabbers: + parameters: + query: + protocol: "livetv" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + listDevices: + speakeasy-default-list-devices: + responses: + "200": + application/json: {} + addDevice: + speakeasy-default-add-device: + parameters: + query: + uri: "http://10.0.0.5" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + discoverDevices: + speakeasy-default-discover-devices: + responses: + "200": + application/json: {} + removeDevice: + speakeasy-default-remove-device: + parameters: + path: + deviceId: 685908 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getDeviceDetails: + speakeasy-default-get-device-details: + parameters: + path: + deviceId: 170949 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + modifyDevice: + speakeasy-default-modify-device: + parameters: + path: + deviceId: 879135 + query: + enabled: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + setChannelmap: + speakeasy-default-set-channelmap: + parameters: + path: + deviceId: 937661 + query: + channelMapping: {} + channelMappingByKey: {} + channelsEnabled: ["46.1,44.1,45.1"] + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getDevicesChannels: + speakeasy-default-get-devices-channels: + parameters: + path: + deviceId: 517209 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + setDevicePreferences: + speakeasy-default-set-device-preferences: + parameters: + path: + deviceId: 420973 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + stopScan: + speakeasy-default-stop-scan: + parameters: + path: + deviceId: 576494 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + scan: + speakeasy-default-scan: + parameters: + path: + deviceId: 57391 + query: + source: "Cable" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getThumb: + speakeasy-default-get-thumb: + parameters: + path: + deviceId: 960617 + version: 1025 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listProviders: + speakeasy-default-list-providers: + responses: + "200": + application/json: {"MediaContainer": {"livetv": 7, "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", "musicAnalysis": 2, "myPlexMappingState": "mapped", "myPlexSigninState": "ok", "offlineTranscode": 1}} + addProvider: + speakeasy-default-add-provider: + parameters: + query: + url: "https://steep-obedience.name/" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + refreshProviders: {} + deleteMediaProvider: + speakeasy-default-delete-media-provider: + parameters: + path: + provider: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAllSubscriptions: + speakeasy-default-get-all-subscriptions: + parameters: + query: + includeGrabs: 1 + includeStorage: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MediaSubscription": [{"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}} + createSubscription: + speakeasy-default-create-subscription: + parameters: + query: + targetLibrarySectionID: 1 + targetSectionLocationID: 3 + type: 2 + hints: {} + prefs: {} + params: {} + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MediaSubscription": [{"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}} + processSubscriptions: {} + getScheduledRecordings: + speakeasy-default-get-scheduled-recordings: + responses: + "200": + application/json: {"MediaContainer": {"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}} + getTemplate: + speakeasy-default-get-template: + parameters: + query: + guid: "plex://episode/5fc70265c40548002d539d23" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"SubscriptionTemplate": [{"MediaSubscription": [{"title": "This Episode", "MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}]}} + cancelGrab: + speakeasy-default-cancel-grab: + parameters: + path: + operationId: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + deleteSubscription: + speakeasy-default-delete-subscription: + parameters: + path: + subscriptionId: 974618 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getSubscription: + speakeasy-default-get-subscription: + parameters: + path: + subscriptionId: 186713 + query: + includeGrabs: 1 + includeStorage: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MediaSubscription": [{"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}} + editSubscriptionPreferences: + speakeasy-default-edit-subscription-preferences: + parameters: + path: + subscriptionId: 673918 + query: + prefs: {} + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MediaSubscription": [{"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}} + reorderSubscription: + speakeasy-default-reorder-subscription: + parameters: + path: + subscriptionId: 440634 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MediaSubscription": [{"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}} + transcodeImage: + speakeasy-default-transcode-image: + parameters: + query: + url: "/library/metadata/265/thumb/1715112705" + background: "#ff5522" + upscale: 1 + minSize: 1 + rotate: 1 + blendColor: "#ff5522" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + image/jpeg: "x-file: example.file" + image/png: "x-file: example.file" + image/x-portable-pixmap: "x-file: example.file" + makeDecision: + speakeasy-default-make-decision: + parameters: + path: + transcodeType: "music" + query: + advancedSubtitles: "burn" + audioBoost: 50 + audioChannelCount: 5 + autoAdjustQuality: 1 + autoAdjustSubtitle: 1 + directPlay: 1 + directStream: 1 + directStreamAudio: 1 + disableResolutionRotation: 1 + hasMDE: 1 + location: "wan" + mediaBufferSize: 102400 + mediaIndex: 0 + musicBitrate: 5000 + offset: 90.5 + partIndex: 0 + path: "/library/metadata/151671" + peakBitrate: 12000 + photoResolution: "1080x1080" + protocol: "dash" + secondsPerSegment: 5 + subtitleSize: 50 + subtitles: "none" + videoBitrate: 12000 + videoQuality: 50 + videoResolution: "1080x1080" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + X-Plex-Client-Profile-Extra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)" + X-Plex-Client-Profile-Name: "generic" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + triggerFallback: + speakeasy-default-trigger-fallback: + parameters: + path: + transcodeType: "audio" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + transcodeSubtitles: + speakeasy-default-transcode-subtitles: + parameters: + path: + transcodeType: "audio" + query: + advancedSubtitles: "burn" + audioBoost: 50 + audioChannelCount: 5 + autoAdjustQuality: 1 + autoAdjustSubtitle: 1 + directPlay: 1 + directStream: 1 + directStreamAudio: 1 + disableResolutionRotation: 1 + hasMDE: 1 + location: "wan" + mediaBufferSize: 102400 + mediaIndex: 0 + musicBitrate: 5000 + offset: 90.5 + partIndex: 0 + path: "/library/metadata/151671" + peakBitrate: 12000 + photoResolution: "1080x1080" + protocol: "dash" + secondsPerSegment: 5 + subtitleSize: 50 + subtitles: "embedded" + videoBitrate: 12000 + videoQuality: 50 + videoResolution: "1080x1080" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + X-Plex-Client-Profile-Extra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)" + X-Plex-Client-Profile-Name: "generic" + startTranscodeSession: + speakeasy-default-start-transcode-session: + parameters: + path: + transcodeType: "music" + extension: "mpd" + query: + advancedSubtitles: "burn" + audioBoost: 50 + audioChannelCount: 5 + autoAdjustQuality: 1 + autoAdjustSubtitle: 1 + directPlay: 1 + directStream: 1 + directStreamAudio: 1 + disableResolutionRotation: 1 + hasMDE: 1 + location: "wan" + mediaBufferSize: 102400 + mediaIndex: 0 + musicBitrate: 5000 + offset: 90.5 + partIndex: 0 + path: "/library/metadata/151671" + peakBitrate: 12000 + photoResolution: "1080x1080" + protocol: "dash" + secondsPerSegment: 5 + subtitleSize: 50 + subtitles: "none" + videoBitrate: 12000 + videoQuality: 50 + videoResolution: "1080x1080" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + X-Plex-Client-Profile-Extra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)" + X-Plex-Client-Profile-Name: "generic" + responses: + "200": + video/x-matroska: "x-file: example.file" + listPlaylists: + speakeasy-default-list-playlists: + parameters: + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getPlaylistItems: + speakeasy-default-get-playlist-items: + parameters: + path: + playlistId: 118195 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getPlaylistGenerators: + speakeasy-default-get-playlist-generators: + parameters: + path: + playlistId: 162342 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + clearPlaylistItems: + speakeasy-default-clear-playlist-items: + parameters: + path: + playlistId: 552140 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + addPlaylistItems: + speakeasy-default-add-playlist-items: + parameters: + path: + playlistId: 533723 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + deletePlaylistItem: + speakeasy-default-delete-playlist-item: + parameters: + path: + playlistId: 981646 + generatorId: 194010 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getPlaylistGenerator: + speakeasy-default-get-playlist-generator: + parameters: + path: + playlistId: 744880 + generatorId: 322168 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getPlaylistGeneratorItems: + speakeasy-default-get-playlist-generator-items: + parameters: + path: + playlistId: 77230 + generatorId: 979714 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}} + movePlaylistItem: + speakeasy-default-move-playlist-item: + parameters: + path: + playlistId: 940298 + playlistItemId: 375626 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + refreshPlaylist: + speakeasy-default-refresh-playlist: + parameters: + path: + playlistId: 895314 + generatorId: 629742 + metadataId: 724422 + action: "disable" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + createPlayQueue: + speakeasy-default-create-play-queue: + parameters: + query: + type: "audio" + shuffle: 1 + repeat: 1 + continuous: 1 + recursive: 1 + onDeck: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getPlayQueue: + speakeasy-default-get-play-queue: + parameters: + path: + playQueueId: 210646 + query: + own: 1 + includeBefore: 1 + includeAfter: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + addToPlayQueue: + speakeasy-default-add-to-play-queue: + parameters: + path: + playQueueId: 919248 + query: + next: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + clearPlayQueue: + speakeasy-default-clear-play-queue: + parameters: + path: + playQueueId: 86357 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + resetPlayQueue: + speakeasy-default-reset-play-queue: + parameters: + path: + playQueueId: 581891 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + shuffle: + speakeasy-default-shuffle: + parameters: + path: + playQueueId: 316150 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + unshuffle: + speakeasy-default-unshuffle: + parameters: + path: + playQueueId: 484388 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + deletePlayQueueItem: + speakeasy-default-delete-play-queue-item: + parameters: + path: + playQueueId: 285738 + playQueueItemId: 464354 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + movePlayQueueItem: + speakeasy-default-move-play-queue-item: + parameters: + path: + playQueueId: 31341 + playQueueItemId: 495865 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getColors: + speakeasy-default-get-colors: + parameters: + query: + url: "/library/metadata/217745/art/1718931408" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getImage: + speakeasy-default-get-image: + parameters: + query: + topLeft: "3f280a" + topRight: "6b4713" + bottomRight: "0f2a43" + bottomLeft: "1c425d" + width: 1920 + height: 1080 + noise: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + image/png: "x-file: example.file" + listSessions: + speakeasy-default-list-sessions: + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getBackgroundTasks: + speakeasy-default-get-background-tasks: + responses: + "200": + application/json: {} + listPlaybackHistory: + speakeasy-default-list-playback-history: + parameters: + query: + sort: ["viewedAt:desc,accountID"] + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + terminateSession: + speakeasy-default-terminate-session: + parameters: + query: + sessionId: "cdefghijklmnopqrstuvwxyz" + reason: "Stop Playing" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + deleteHistory: + speakeasy-default-delete-history: + parameters: + path: + historyId: 953579 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getHistoryItem: + speakeasy-default-get-history-item: + parameters: + path: + historyId: 832213 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + checkUpdates: + speakeasy-default-check-updates: + parameters: + query: + download: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getUpdatesStatus: + speakeasy-default-get-updates-status: + responses: + "200": + application/json: {} + getCollectionItems: + speakeasy-default-get-collection-items: + parameters: + path: + collectionId: 314585 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getMetadataItem: + speakeasy-default-get-metadata-item: + parameters: + path: + ids: [] + query: + asyncCheckFiles: 1 + asyncRefreshLocalMediaAgent: 1 + asyncRefreshAnalysis: 1 + checkFiles: 1 + skipRefresh: 1 + checkFileAvailability: 1 + asyncAugmentMetadata: 1 + augmentCount: 1 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getAlbums: + speakeasy-default-get-albums: + parameters: + path: + sectionId: 817133 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + listContent: + speakeasy-default-list-content: + parameters: + path: + sectionId: "" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getAllLeaves: + speakeasy-default-get-all-leaves: + parameters: + path: + sectionId: 633197 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getArts: + speakeasy-default-get-arts: + parameters: + path: + sectionId: 859200 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getCategories: + speakeasy-default-get-categories: + parameters: + path: + sectionId: 21841 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getCluster: + speakeasy-default-get-cluster: + parameters: + path: + sectionId: 138560 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getSonicPath: + speakeasy-default-get-sonic-path: + parameters: + path: + sectionId: 914549 + query: + startID: 629990 + endID: 687740 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getFolders: + speakeasy-default-get-folders: + parameters: + path: + sectionId: 892532 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + listMoments: + speakeasy-default-list-moments: + parameters: + path: + sectionId: 403239 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getSonicallySimilar: + speakeasy-default-get-sonically-similar: + parameters: + path: + sectionId: 525956 + query: + values: [] + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getCollectionImage: + speakeasy-default-get-collection-image: + parameters: + path: + collectionId: 474227 + updatedAt: 759379 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + image/jpeg: "x-file: example.file" + addCollectionItems: + speakeasy-default-add-collection-items: + parameters: + path: + collectionId: 338144 + query: + uri: "https://expensive-bakeware.com" + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + deleteCollectionItem: + speakeasy-default-delete-collection-item: + parameters: + path: + collectionId: 320928 + itemId: 406983 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + moveCollectionItem: + speakeasy-default-move-collection-item: + parameters: + path: + collectionId: 239532 + itemId: 513864 + header: + accepts: "application/xml" + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Java SDK Changes Detected:\n* `plex-api.butler.startTask()`: \n * `request` **Changed** **Breaking** :warning:\n * `error` **Changed** **Breaking** :warning:\n* `plex-api.butler.stopTask()`: \n * `request` **Changed** **Breaking** :warning:\n * `error` **Changed** **Breaking** :warning:\n* `plex-api.updater.applyUpdates()`: \n * `request` **Changed** **Breaking** :warning:\n * `error` **Changed** **Breaking** :warning:\n* `plex-api.general.getServerInfo()`: **Added**\n* `plex-api.general.getIdentity()`: **Added**\n* `plex-api.general.getSourceConnectionInformation()`: **Added**\n* `plex-api.general.getTransientToken()`: **Added**\n* `plex-api.events.getNotifications()`: **Added**\n* `plex-api.events.connectWebSocket()`: **Added**\n* `plex-api.preferences.getAllPreferences()`: **Added**\n* `plex-api.preferences.setPreferences()`: **Added**\n* `plex-api.preferences.getPreference()`: **Added**\n* `plex-api.rate.setRating()`: **Added**\n* `plex-api.timeline.markPlayed()`: **Added**\n* `plex-api.timeline.report()`: **Added**\n* `plex-api.timeline.unscrobble()`: **Added**\n* `plex-api.activities.listActivities()`: **Added**\n* `plex-api.activities.cancelActivity()`: **Added**\n* `plex-api.butler.stopTasks()`: **Added**\n* `plex-api.butler.getTasks()`: **Added**\n* `plex-api.butler.startTasks()`: **Added**\n* `plex-api.downloadQueue.createDownloadQueue()`: **Added**\n* `plex-api.downloadQueue.getDownloadQueue()`: **Added**\n* `plex-api.downloadQueue.addDownloadQueueItems()`: **Added**\n* `plex-api.downloadQueue.listDownloadQueueItems()`: **Added**\n* `plex-api.downloadQueue.getItemDecision()`: **Added**\n* `plex-api.downloadQueue.getDownloadQueueMedia()`: **Added**\n* `plex-api.downloadQueue.removeDownloadQueueItems()`: **Added**\n* `plex-api.downloadQueue.getDownloadQueueItems()`: **Added**\n* `plex-api.downloadQueue.restartProcessingDownloadQueueItems()`: **Added**\n* `plex-api.hubs.getAllHubs()`: **Added**\n* `plex-api.hubs.getContinueWatching()`: **Added**\n* `plex-api.hubs.getHubItems()`: **Added**\n* `plex-api.hubs.getPromotedHubs()`: **Added**\n* `plex-api.hubs.getMetadataHubs()`: **Added**\n* `plex-api.hubs.getPostplayHubs()`: **Added**\n* `plex-api.hubs.getRelatedHubs()`: **Added**\n* `plex-api.hubs.getSectionHubs()`: **Added**\n* `plex-api.hubs.resetSectionDefaults()`: **Added**\n* `plex-api.hubs.listHubs()`: **Added**\n* `plex-api.hubs.createCustomHub()`: **Added**\n* `plex-api.hubs.moveHub()`: **Added**\n* `plex-api.hubs.deleteCustomHub()`: **Added**\n* `plex-api.hubs.updateHubVisibility()`: **Added**\n* `plex-api.search.searchHubs()`: **Added**\n* `plex-api.search.voiceSearchHubs()`: **Added**\n* `plex-api.library.getLibraryItems()`: **Added**\n* `plex-api.library.deleteCaches()`: **Added**\n* `plex-api.library.cleanBundles()`: **Added**\n* `plex-api.library.ingestTransientItem()`: **Added**\n* `plex-api.library.getLibraryMatches()`: **Added**\n* `plex-api.library.optimizeDatabase()`: **Added**\n* `plex-api.library.getRandomArtwork()`: **Added**\n* `plex-api.library.getSections()`: **Added**\n* `plex-api.library.addSection()`: **Added**\n* `plex-api.library.stopAllRefreshes()`: **Added**\n* `plex-api.library.getSectionsPrefs()`: **Added**\n* `plex-api.library.refreshSectionsMetadata()`: **Added**\n* `plex-api.library.getTags()`: **Added**\n* `plex-api.library.deleteMetadataItem()`: **Added**\n* `plex-api.library.editMetadataItem()`: **Added**\n* `plex-api.library.detectAds()`: **Added**\n* `plex-api.library.getAllItemLeaves()`: **Added**\n* `plex-api.library.analyzeMetadata()`: **Added**\n* `plex-api.library.generateThumbs()`: **Added**\n* `plex-api.library.detectCredits()`: **Added**\n* `plex-api.library.getExtras()`: **Added**\n* `plex-api.library.addExtras()`: **Added**\n* `plex-api.library.getFile()`: **Added**\n* `plex-api.library.startBifGeneration()`: **Added**\n* `plex-api.library.detectIntros()`: **Added**\n* `plex-api.library.createMarker()`: **Added**\n* `plex-api.library.matchItem()`: **Added**\n* `plex-api.library.listMatches()`: **Added**\n* `plex-api.library.mergeItems()`: **Added**\n* `plex-api.library.listSonicallySimilar()`: **Added**\n* `plex-api.library.setItemPreferences()`: **Added**\n* `plex-api.library.refreshItemsMetadata()`: **Added**\n* `plex-api.library.getRelatedItems()`: **Added**\n* `plex-api.library.listSimilar()`: **Added**\n* `plex-api.library.splitItem()`: **Added**\n* `plex-api.library.addSubtitles()`: **Added**\n* `plex-api.library.getItemTree()`: **Added**\n* `plex-api.library.unmatch()`: **Added**\n* `plex-api.library.listTopUsers()`: **Added**\n* `plex-api.library.detectVoiceActivity()`: **Added**\n* `plex-api.library.getAugmentationStatus()`: **Added**\n* `plex-api.library.setStreamSelection()`: **Added**\n* `plex-api.library.getPerson()`: **Added**\n* `plex-api.library.listPersonMedia()`: **Added**\n* `plex-api.library.deleteLibrarySection()`: **Added**\n* `plex-api.library.getLibraryDetails()`: **Added**\n* `plex-api.library.editSection()`: **Added**\n* `plex-api.library.updateItems()`: **Added**\n* `plex-api.library.startAnalysis()`: **Added**\n* `plex-api.library.autocomplete()`: **Added**\n* `plex-api.library.getCollections()`: **Added**\n* `plex-api.library.getCommon()`: **Added**\n* `plex-api.library.emptyTrash()`: **Added**\n* `plex-api.library.getSectionFilters()`: **Added**\n* `plex-api.library.getFirstCharacters()`: **Added**\n* `plex-api.library.deleteIndexes()`: **Added**\n* `plex-api.library.deleteIntros()`: **Added**\n* `plex-api.library.getSectionPreferences()`: **Added**\n* `plex-api.library.setSectionPreferences()`: **Added**\n* `plex-api.library.cancelRefresh()`: **Added**\n* `plex-api.library.refreshSection()`: **Added**\n* `plex-api.library.getAvailableSorts()`: **Added**\n* `plex-api.library.getStreamLevels()`: **Added**\n* `plex-api.library.getStreamLoudness()`: **Added**\n* `plex-api.library.getChapterImage()`: **Added**\n* `plex-api.library.setItemArtwork()`: **Added**\n* `plex-api.library.updateItemArtwork()`: **Added**\n* `plex-api.library.deleteMarker()`: **Added**\n* `plex-api.library.editMarker()`: **Added**\n* `plex-api.library.deleteMediaItem()`: **Added**\n* `plex-api.library.getPartIndex()`: **Added**\n* `plex-api.library.deleteCollection()`: **Added**\n* `plex-api.library.getSectionImage()`: **Added**\n* `plex-api.library.deleteStream()`: **Added**\n* `plex-api.library.getStream()`: **Added**\n* `plex-api.library.setStreamOffset()`: **Added**\n* `plex-api.library.getItemArtwork()`: **Added**\n* `plex-api.library.getMediaPart()`: **Added**\n* `plex-api.library.getImageFromBif()`: **Added**\n* `plex-api.collections.createCollection()`: **Added**\n* `plex-api.dvRs.listDvRs()`: **Added**\n* `plex-api.dvRs.createDvr()`: **Added**\n* `plex-api.dvRs.deleteDvr()`: **Added**\n* `plex-api.dvRs.getDvr()`: **Added**\n* `plex-api.dvRs.deleteLineup()`: **Added**\n* `plex-api.dvRs.addLineup()`: **Added**\n* `plex-api.dvRs.setDvrPreferences()`: **Added**\n* `plex-api.dvRs.stopDvrReload()`: **Added**\n* `plex-api.dvRs.reloadGuide()`: **Added**\n* `plex-api.dvRs.tuneChannel()`: **Added**\n* `plex-api.dvRs.removeDeviceFromDvr()`: **Added**\n* `plex-api.dvRs.addDeviceToDvr()`: **Added**\n* `plex-api.epg.computeChannelMap()`: **Added**\n* `plex-api.epg.getChannels()`: **Added**\n* `plex-api.epg.getCountries()`: **Added**\n* `plex-api.epg.getAllLanguages()`: **Added**\n* `plex-api.epg.getLineup()`: **Added**\n* `plex-api.epg.getLineupChannels()`: **Added**\n* `plex-api.epg.getCountriesLineups()`: **Added**\n* `plex-api.epg.getCountryRegions()`: **Added**\n* `plex-api.epg.listLineups()`: **Added**\n* `plex-api.liveTv.getSessions()`: **Added**\n* `plex-api.liveTv.getLiveTvSession()`: **Added**\n* `plex-api.liveTv.getSessionPlaylistIndex()`: **Added**\n* `plex-api.liveTv.getSessionSegment()`: **Added**\n* `plex-api.log.writeLog()`: **Added**\n* `plex-api.log.writeMessage()`: **Added**\n* `plex-api.log.enablePapertrail()`: **Added**\n* `plex-api.devices.getAvailableGrabbers()`: **Added**\n* `plex-api.devices.listDevices()`: **Added**\n* `plex-api.devices.addDevice()`: **Added**\n* `plex-api.devices.discoverDevices()`: **Added**\n* `plex-api.devices.removeDevice()`: **Added**\n* `plex-api.devices.getDeviceDetails()`: **Added**\n* `plex-api.devices.modifyDevice()`: **Added**\n* `plex-api.devices.setChannelmap()`: **Added**\n* `plex-api.devices.getDevicesChannels()`: **Added**\n* `plex-api.devices.setDevicePreferences()`: **Added**\n* `plex-api.devices.stopScan()`: **Added**\n* `plex-api.devices.scan()`: **Added**\n* `plex-api.devices.getThumb()`: **Added**\n* `plex-api.provider.listProviders()`: **Added**\n* `plex-api.provider.addProvider()`: **Added**\n* `plex-api.provider.refreshProviders()`: **Added**\n* `plex-api.provider.deleteMediaProvider()`: **Added**\n* `plex-api.subscriptions.getAllSubscriptions()`: **Added**\n* `plex-api.subscriptions.createSubscription()`: **Added**\n* `plex-api.subscriptions.processSubscriptions()`: **Added**\n* `plex-api.subscriptions.getScheduledRecordings()`: **Added**\n* `plex-api.subscriptions.getTemplate()`: **Added**\n* `plex-api.subscriptions.cancelGrab()`: **Added**\n* `plex-api.subscriptions.deleteSubscription()`: **Added**\n* `plex-api.subscriptions.getSubscription()`: **Added**\n* `plex-api.subscriptions.editSubscriptionPreferences()`: **Added**\n* `plex-api.subscriptions.reorderSubscription()`: **Added**\n* `plex-api.transcoder.transcodeImage()`: **Added**\n* `plex-api.transcoder.makeDecision()`: **Added**\n* `plex-api.transcoder.triggerFallback()`: **Added**\n* `plex-api.transcoder.transcodeSubtitles()`: **Added**\n* `plex-api.transcoder.startTranscodeSession()`: **Added**\n* `plex-api.playlist.listPlaylists()`: **Added**\n* `plex-api.playlist.getPlaylist()`: **Added**\n* `plex-api.playlist.getPlaylistItems()`: **Added**\n* `plex-api.libraryPlaylists.createPlaylist()`: **Added**\n* `plex-api.libraryPlaylists.uploadPlaylist()`: **Added**\n* `plex-api.libraryPlaylists.deletePlaylist()`: **Added**\n* `plex-api.libraryPlaylists.updatePlaylist()`: **Added**\n* `plex-api.libraryPlaylists.getPlaylistGenerators()`: **Added**\n* `plex-api.libraryPlaylists.clearPlaylistItems()`: **Added**\n* `plex-api.libraryPlaylists.addPlaylistItems()`: **Added**\n* `plex-api.libraryPlaylists.deletePlaylistItem()`: **Added**\n* `plex-api.libraryPlaylists.getPlaylistGenerator()`: **Added**\n* `plex-api.libraryPlaylists.getPlaylistGeneratorItems()`: **Added**\n* `plex-api.libraryPlaylists.movePlaylistItem()`: **Added**\n* `plex-api.libraryPlaylists.refreshPlaylist()`: **Added**\n* `plex-api.playQueue.createPlayQueue()`: **Added**\n* `plex-api.playQueue.getPlayQueue()`: **Added**\n* `plex-api.playQueue.addToPlayQueue()`: **Added**\n* `plex-api.playQueue.clearPlayQueue()`: **Added**\n* `plex-api.playQueue.resetPlayQueue()`: **Added**\n* `plex-api.playQueue.shuffle()`: **Added**\n* `plex-api.playQueue.unshuffle()`: **Added**\n* `plex-api.playQueue.deletePlayQueueItem()`: **Added**\n* `plex-api.playQueue.movePlayQueueItem()`: **Added**\n* `plex-api.ultraBlur.getColors()`: **Added**\n* `plex-api.ultraBlur.getImage()`: **Added**\n* `plex-api.status.listSessions()`: **Added**\n* `plex-api.status.getBackgroundTasks()`: **Added**\n* `plex-api.status.listPlaybackHistory()`: **Added**\n* `plex-api.status.terminateSession()`: **Added**\n* `plex-api.status.deleteHistory()`: **Added**\n* `plex-api.status.getHistoryItem()`: **Added**\n* `plex-api.updater.checkUpdates()`: **Added**\n* `plex-api.updater.getUpdatesStatus()`: **Added**\n* `plex-api.content.getCollectionItems()`: **Added**\n* `plex-api.content.getMetadataItem()`: **Added**\n* `plex-api.content.getAlbums()`: **Added**\n* `plex-api.content.listContent()`: **Added**\n* `plex-api.content.getAllLeaves()`: **Added**\n* `plex-api.content.getArts()`: **Added**\n* `plex-api.content.getCategories()`: **Added**\n* `plex-api.content.getCluster()`: **Added**\n* `plex-api.content.getSonicPath()`: **Added**\n* `plex-api.content.getFolders()`: **Added**\n* `plex-api.content.listMoments()`: **Added**\n* `plex-api.content.getSonicallySimilar()`: **Added**\n* `plex-api.content.getCollectionImage()`: **Added**\n* `plex-api.libraryCollections.addCollectionItems()`: **Added**\n* `plex-api.libraryCollections.deleteCollectionItem()`: **Added**\n* `plex-api.libraryCollections.moveCollectionItem()`: **Added**\n* `plex-api.server.getServerCapabilities()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getServerPreferences()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getAvailableClients()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getDevices()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getServerIdentity()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getMyPlexAccount()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getResizedPhoto()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getMediaProviders()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getServerList()`: **Deleted** **Breaking** :warning:\n* `plex-api.media.markPlayed()`: **Deleted** **Breaking** :warning:\n* `plex-api.media.markUnplayed()`: **Deleted** **Breaking** :warning:\n* `plex-api.media.updatePlayProgress()`: **Deleted** **Breaking** :warning:\n* `plex-api.media.getBannerImage()`: **Deleted** **Breaking** :warning:\n* `plex-api.media.getThumbImage()`: **Deleted** **Breaking** :warning:\n* `plex-api.video.getTimeline()`: **Deleted** **Breaking** :warning:\n* `plex-api.video.startUniversalTranscode()`: **Deleted** **Breaking** :warning:\n* `plex-api.activities.getServerActivities()`: **Deleted** **Breaking** :warning:\n* `plex-api.activities.cancelServerActivities()`: **Deleted** **Breaking** :warning:\n* `plex-api.butler.getButlerTasks()`: **Deleted** **Breaking** :warning:\n* `plex-api.butler.startAllTasks()`: **Deleted** **Breaking** :warning:\n* `plex-api.butler.stopAllTasks()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getCompanionsData()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getUserFriends()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getGeoData()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getHomeData()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getServerResources()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getPin()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getTokenByPinId()`: **Deleted** **Breaking** :warning:\n* `plex-api.hubs.getGlobalHubs()`: **Deleted** **Breaking** :warning:\n* `plex-api.hubs.getRecentlyAdded()`: **Deleted** **Breaking** :warning:\n* `plex-api.hubs.getLibraryHubs()`: **Deleted** **Breaking** :warning:\n* `plex-api.search.performSearch()`: **Deleted** **Breaking** :warning:\n* `plex-api.search.performVoiceSearch()`: **Deleted** **Breaking** :warning:\n* `plex-api.search.getSearchResults()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getFileHash()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getRecentlyAddedLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getAllLibraries()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getLibraryDetails()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.deleteLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getLibraryItems()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getLibrarySectionsAll()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getRefreshLibraryMetadata()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getSearchLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getGenresLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getCountriesLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getActorsLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getSearchAllLibraries()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getMediaMetaData()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getMediaArts()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.postMediaArts()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getMediaPosters()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.postMediaPoster()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getMetadataChildren()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getTopWatchedContent()`: **Deleted** **Breaking** :warning:\n* `plex-api.watchlist.getWatchList()`: **Deleted** **Breaking** :warning:\n* `plex-api.log.logLine()`: **Deleted** **Breaking** :warning:\n* `plex-api.log.logMultiLine()`: **Deleted** **Breaking** :warning:\n* `plex-api.log.enablePaperTrail()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.createPlaylist()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.getPlaylists()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.getPlaylist()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.deletePlaylist()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.updatePlaylist()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.getPlaylistContents()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.clearPlaylistContents()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.addPlaylistContents()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.uploadPlaylist()`: **Deleted** **Breaking** :warning:\n* `plex-api.authentication.getTransientToken()`: **Deleted** **Breaking** :warning:\n* `plex-api.authentication.getSourceConnectionInformation()`: **Deleted** **Breaking** :warning:\n* `plex-api.authentication.getTokenDetails()`: **Deleted** **Breaking** :warning:\n* `plex-api.authentication.postUsersSignInData()`: **Deleted** **Breaking** :warning:\n* `plex-api.statistics.getStatistics()`: **Deleted** **Breaking** :warning:\n* `plex-api.statistics.getResourcesStatistics()`: **Deleted** **Breaking** :warning:\n* `plex-api.statistics.getBandwidthStatistics()`: **Deleted** **Breaking** :warning:\n* `plex-api.sessions.getSessions()`: **Deleted** **Breaking** :warning:\n* `plex-api.sessions.getSessionHistory()`: **Deleted** **Breaking** :warning:\n* `plex-api.sessions.getTranscodeSessions()`: **Deleted** **Breaking** :warning:\n* `plex-api.sessions.stopTranscodeSession()`: **Deleted** **Breaking** :warning:\n* `plex-api.updater.getUpdateStatus()`: **Deleted** **Breaking** :warning:\n* `plex-api.updater.checkForUpdates()`: **Deleted** **Breaking** :warning:\n* `plex-api.users.getUsers()`: **Deleted** **Breaking** :warning:\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d74752e3..10fb88c5 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -22,7 +22,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.18.0 + version: 0.19.1 additionalDependencies: [] additionalPlugins: [] artifactID: plexapi @@ -36,6 +36,7 @@ java: enableCustomCodeRegions: false enableStreamingUploads: false flattenGlobalSecurity: true + generateSpringBootStarter: true githubURL: github.com/LukeHagar/plexjava groupID: dev.plexapi imports: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 672395e6..4b566fe4 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -8,26 +8,29 @@ sources: - latest plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:5125adfea1b0daea399c6ecf755e32795de6b4131465ae6a1f32ad73b3bc7787 - sourceBlobDigest: sha256:95cea18b6e5f7d76d35db0aba5bcb59e72cf204451a2b09a99be0e3e9ec1f4c0 + sourceRevisionDigest: sha256:bc60551015634fd59475cf17983ca3aedcab591426d526ab1e3634b1feedaec1 + sourceBlobDigest: sha256:fc8cd5343a94564b646830738f38e065d61e2ea63e4a1383ce07533586889950 tags: - latest - - speakeasy-sdk-regen-1757982495 + - speakeasy-sdk-regen-1760251795 + - 1.1.1 targets: plexjava: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:5125adfea1b0daea399c6ecf755e32795de6b4131465ae6a1f32ad73b3bc7787 - sourceBlobDigest: sha256:95cea18b6e5f7d76d35db0aba5bcb59e72cf204451a2b09a99be0e3e9ec1f4c0 + sourceRevisionDigest: sha256:bc60551015634fd59475cf17983ca3aedcab591426d526ab1e3634b1feedaec1 + sourceBlobDigest: sha256:fc8cd5343a94564b646830738f38e065d61e2ea63e4a1383ce07533586889950 codeSamplesNamespace: code-samples-java-plexjava - codeSamplesRevisionDigest: sha256:8b12917dc69cedbce837d23b4200b61d0bcb2984e40cd44ce83aac6211a8f206 + codeSamplesRevisionDigest: sha256:b2a3306d8dbea9843d858a4e35373df6988c2c0cf53086ae4cd2072c2c8ffb06 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest sources: plexapi: inputs: - - location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main + - location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/plex-api-spec.yaml + registry: + location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi targets: plexjava: target: java diff --git a/README.md b/README.md index 10d97eb7..d5679878 100644 --- a/README.md +++ b/README.md @@ -11,41 +11,13 @@ ## Summary -Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server -# Plex Media Server OpenAPI Specification - -An Open Source OpenAPI Specification for Plex Media Server - -Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/) - -## Documentation - -[API Documentation](https://plexapi.dev) - -## SDKs - -The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec). - -| Language | Repository | Releases | Other | -| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- | -| Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - | -| JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - | -| Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) | -| Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - | -| Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - | -| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - | -| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - | -| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | - ## Table of Contents * [plexapi](#plexapi) -* [Plex Media Server OpenAPI Specification](#plex-media-server-openapi-specification) - * [Documentation](#documentation) - * [SDKs](#sdks) * [SDK Installation](#sdk-installation) * [SDK Example Usage](#sdk-example-usage) * [Available Resources and Operations](#available-resources-and-operations) @@ -71,7 +43,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'dev.plexapi:plexapi:0.18.0' +implementation 'dev.plexapi:plexapi:0.19.1' ``` Maven: @@ -79,7 +51,7 @@ Maven: dev.plexapi plexapi - 0.18.0 + 0.19.1 ``` @@ -107,23 +79,66 @@ gradlew.bat publishToMavenLocal -Pskip.signing package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.*; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + StartTranscodeSessionRequest req = StartTranscodeSessionRequest.builder() + .transcodeType(TranscodeType.MUSIC) + .extension(Extension.MPD) + .advancedSubtitles(AdvancedSubtitles.BURN) + .audioBoost(50L) + .audioChannelCount(5L) + .autoAdjustQuality(BoolInt.ONE) + .autoAdjustSubtitle(BoolInt.ONE) + .directPlay(BoolInt.ONE) + .directStream(BoolInt.ONE) + .directStreamAudio(BoolInt.ONE) + .disableResolutionRotation(BoolInt.ONE) + .hasMDE(BoolInt.ONE) + .location(StartTranscodeSessionQueryParamLocation.WAN) + .mediaBufferSize(102400L) + .mediaIndex(0L) + .musicBitrate(5000L) + .offset(90.5) + .partIndex(0L) + .path("/library/metadata/151671") + .peakBitrate(12000L) + .photoResolution("1080x1080") + .protocol(StartTranscodeSessionQueryParamProtocol.DASH) + .secondsPerSegment(5L) + .subtitleSize(50L) + .videoBitrate(12000L) + .videoQuality(50L) + .videoResolution("1080x1080") + .xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)") + .xPlexClientProfileName("generic") + .build(); + + StartTranscodeSessionResponse res = sdk.transcoder().startTranscodeSession() + .request(req) .call(); - if (res.object().isPresent()) { + if (res.responseStream().isPresent()) { // handle response } } @@ -136,7 +151,9 @@ package hello.world; import dev.plexapi.sdk.AsyncPlexAPI; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.operations.async.GetServerCapabilitiesResponse; +import dev.plexapi.sdk.models.operations.GetServerInfoRequest; +import dev.plexapi.sdk.models.operations.async.GetServerInfoResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.util.concurrent.CompletableFuture; public class Application { @@ -144,15 +161,30 @@ public class Application { public static void main(String[] args) { AsyncPlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build() .async(); - CompletableFuture resFut = sdk.server().getServerCapabilities() + GetServerInfoRequest req = GetServerInfoRequest.builder() + .build(); + + CompletableFuture resFut = sdk.general().getServerInfo() + .request(req) .call(); resFut.thenAccept(res -> { - if (res.object().isPresent()) { + if (res.mediaContainerWithDirectory().isPresent()) { // handle response } }); @@ -171,139 +203,324 @@ public class Application { ### [activities()](docs/sdks/activities/README.md) -* [getServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities -* [cancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities - -### [authentication()](docs/sdks/authentication/README.md) - -* [getTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token -* [getSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information -* [getTokenDetails](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details -* [postUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data +* [listActivities](docs/sdks/activities/README.md#listactivities) - Get all activities +* [cancelActivity](docs/sdks/activities/README.md#cancelactivity) - Cancel a running activity ### [butler()](docs/sdks/butler/README.md) -* [getButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks -* [startAllTasks](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks -* [stopAllTasks](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks -* [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task +* [stopTasks](docs/sdks/butler/README.md#stoptasks) - Stop all Butler tasks +* [getTasks](docs/sdks/butler/README.md#gettasks) - Get all Butler tasks +* [startTasks](docs/sdks/butler/README.md#starttasks) - Start all Butler tasks * [stopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task +* [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task + +### [collections()](docs/sdks/collections/README.md) + +* [createCollection](docs/sdks/collections/README.md#createcollection) - Create collection + +### [content()](docs/sdks/content/README.md) + +* [getCollectionItems](docs/sdks/content/README.md#getcollectionitems) - Get items in a collection +* [getMetadataItem](docs/sdks/content/README.md#getmetadataitem) - Get a metadata item +* [getAlbums](docs/sdks/content/README.md#getalbums) - Set section albums +* [listContent](docs/sdks/content/README.md#listcontent) - Get items in the section +* [getAllLeaves](docs/sdks/content/README.md#getallleaves) - Set section leaves +* [getArts](docs/sdks/content/README.md#getarts) - Set section artwork +* [getCategories](docs/sdks/content/README.md#getcategories) - Set section categories +* [getCluster](docs/sdks/content/README.md#getcluster) - Set section clusters +* [getSonicPath](docs/sdks/content/README.md#getsonicpath) - Similar tracks to transition from one to another +* [getFolders](docs/sdks/content/README.md#getfolders) - Get all folder locations +* [listMoments](docs/sdks/content/README.md#listmoments) - Set section moments +* [getSonicallySimilar](docs/sdks/content/README.md#getsonicallysimilar) - The nearest audio tracks +* [getCollectionImage](docs/sdks/content/README.md#getcollectionimage) - Get a collection's image + +### [devices()](docs/sdks/devices/README.md) + +* [getAvailableGrabbers](docs/sdks/devices/README.md#getavailablegrabbers) - Get available grabbers +* [listDevices](docs/sdks/devices/README.md#listdevices) - Get all devices +* [addDevice](docs/sdks/devices/README.md#adddevice) - Add a device +* [discoverDevices](docs/sdks/devices/README.md#discoverdevices) - Tell grabbers to discover devices +* [removeDevice](docs/sdks/devices/README.md#removedevice) - Remove a device +* [getDeviceDetails](docs/sdks/devices/README.md#getdevicedetails) - Get device details +* [modifyDevice](docs/sdks/devices/README.md#modifydevice) - Enable or disable a device +* [setChannelmap](docs/sdks/devices/README.md#setchannelmap) - Set a device's channel mapping +* [getDevicesChannels](docs/sdks/devices/README.md#getdeviceschannels) - Get a device's channels +* [setDevicePreferences](docs/sdks/devices/README.md#setdevicepreferences) - Set device preferences +* [stopScan](docs/sdks/devices/README.md#stopscan) - Tell a device to stop scanning for channels +* [scan](docs/sdks/devices/README.md#scan) - Tell a device to scan for channels +* [getThumb](docs/sdks/devices/README.md#getthumb) - Get device thumb + +### [downloadQueue()](docs/sdks/downloadqueue/README.md) + +* [createDownloadQueue](docs/sdks/downloadqueue/README.md#createdownloadqueue) - Create download queue +* [getDownloadQueue](docs/sdks/downloadqueue/README.md#getdownloadqueue) - Get a download queue +* [addDownloadQueueItems](docs/sdks/downloadqueue/README.md#adddownloadqueueitems) - Add to download queue +* [listDownloadQueueItems](docs/sdks/downloadqueue/README.md#listdownloadqueueitems) - Get download queue items +* [getItemDecision](docs/sdks/downloadqueue/README.md#getitemdecision) - Grab download queue item decision +* [getDownloadQueueMedia](docs/sdks/downloadqueue/README.md#getdownloadqueuemedia) - Grab download queue media +* [removeDownloadQueueItems](docs/sdks/downloadqueue/README.md#removedownloadqueueitems) - Delete download queue items +* [getDownloadQueueItems](docs/sdks/downloadqueue/README.md#getdownloadqueueitems) - Get download queue items +* [restartProcessingDownloadQueueItems](docs/sdks/downloadqueue/README.md#restartprocessingdownloadqueueitems) - Restart processing of items from the decision + +### [dvRs()](docs/sdks/dvrs/README.md) + +* [listDVRs](docs/sdks/dvrs/README.md#listdvrs) - Get DVRs +* [createDVR](docs/sdks/dvrs/README.md#createdvr) - Create a DVR +* [deleteDVR](docs/sdks/dvrs/README.md#deletedvr) - Delete a single DVR +* [getDVR](docs/sdks/dvrs/README.md#getdvr) - Get a single DVR +* [deleteLineup](docs/sdks/dvrs/README.md#deletelineup) - Delete a DVR Lineup +* [addLineup](docs/sdks/dvrs/README.md#addlineup) - Add a DVR Lineup +* [setDVRPreferences](docs/sdks/dvrs/README.md#setdvrpreferences) - Set DVR preferences +* [stopDVRReload](docs/sdks/dvrs/README.md#stopdvrreload) - Tell a DVR to stop reloading program guide +* [reloadGuide](docs/sdks/dvrs/README.md#reloadguide) - Tell a DVR to reload program guide +* [tuneChannel](docs/sdks/dvrs/README.md#tunechannel) - Tune a channel on a DVR +* [removeDeviceFromDVR](docs/sdks/dvrs/README.md#removedevicefromdvr) - Remove a device from an existing DVR +* [addDeviceToDVR](docs/sdks/dvrs/README.md#adddevicetodvr) - Add a device to an existing DVR + +### [epg()](docs/sdks/epg/README.md) + +* [computeChannelMap](docs/sdks/epg/README.md#computechannelmap) - Compute the best channel map +* [getChannels](docs/sdks/epg/README.md#getchannels) - Get channels for a lineup +* [getCountries](docs/sdks/epg/README.md#getcountries) - Get all countries +* [getAllLanguages](docs/sdks/epg/README.md#getalllanguages) - Get all languages +* [getLineup](docs/sdks/epg/README.md#getlineup) - Compute the best lineup +* [getLineupChannels](docs/sdks/epg/README.md#getlineupchannels) - Get the channels for mulitple lineups +* [getCountriesLineups](docs/sdks/epg/README.md#getcountrieslineups) - Get lineups for a country via postal code +* [getCountryRegions](docs/sdks/epg/README.md#getcountryregions) - Get regions for a country +* [listLineups](docs/sdks/epg/README.md#listlineups) - Get lineups for a region + +### [events()](docs/sdks/events/README.md) + +* [getNotifications](docs/sdks/events/README.md#getnotifications) - Connect to Eventsource +* [connectWebSocket](docs/sdks/events/README.md#connectwebsocket) - Connect to WebSocket + +### [general()](docs/sdks/general/README.md) + +* [getServerInfo](docs/sdks/general/README.md#getserverinfo) - Get PMS info +* [getIdentity](docs/sdks/general/README.md#getidentity) - Get PMS identity +* [getSourceConnectionInformation](docs/sdks/general/README.md#getsourceconnectioninformation) - Get Source Connection Information +* [getTransientToken](docs/sdks/general/README.md#gettransienttoken) - Get Transient Tokens ### [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 +* [getAllHubs](docs/sdks/hubs/README.md#getallhubs) - Get global hubs +* [getContinueWatching](docs/sdks/hubs/README.md#getcontinuewatching) - Get the continue watching hub +* [getHubItems](docs/sdks/hubs/README.md#gethubitems) - Get a hub's items +* [getPromotedHubs](docs/sdks/hubs/README.md#getpromotedhubs) - Get the hubs which are promoted +* [getMetadataHubs](docs/sdks/hubs/README.md#getmetadatahubs) - Get hubs for section by metadata item +* [getPostplayHubs](docs/sdks/hubs/README.md#getpostplayhubs) - Get postplay hubs +* [getRelatedHubs](docs/sdks/hubs/README.md#getrelatedhubs) - Get related hubs +* [getSectionHubs](docs/sdks/hubs/README.md#getsectionhubs) - Get section hubs +* [resetSectionDefaults](docs/sdks/hubs/README.md#resetsectiondefaults) - Reset hubs to defaults +* [listHubs](docs/sdks/hubs/README.md#listhubs) - Get hubs +* [createCustomHub](docs/sdks/hubs/README.md#createcustomhub) - Create a custom hub +* [moveHub](docs/sdks/hubs/README.md#movehub) - Move Hub +* [deleteCustomHub](docs/sdks/hubs/README.md#deletecustomhub) - Delete a custom hub +* [updateHubVisibility](docs/sdks/hubs/README.md#updatehubvisibility) - Change hub visibility ### [library()](docs/sdks/library/README.md) -* [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value -* [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 -* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items -* [getLibrarySectionsAll](docs/sdks/library/README.md#getlibrarysectionsall) - Get Library section media by tag ALL -* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library -* [getSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library -* [getGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media -* [getCountriesLibrary](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media -* [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media -* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries -* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata -* [getMediaArts](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork -* [postMediaArts](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork -* [getMediaPosters](docs/sdks/library/README.md#getmediaposters) - Get Media Posters -* [postMediaPoster](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster -* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children -* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content +* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get all items in library +* [deleteCaches](docs/sdks/library/README.md#deletecaches) - Delete library caches +* [cleanBundles](docs/sdks/library/README.md#cleanbundles) - Clean bundles +* [ingestTransientItem](docs/sdks/library/README.md#ingesttransientitem) - Ingest a transient item +* [getLibraryMatches](docs/sdks/library/README.md#getlibrarymatches) - Get library matches +* [optimizeDatabase](docs/sdks/library/README.md#optimizedatabase) - Optimize the Database +* [getRandomArtwork](docs/sdks/library/README.md#getrandomartwork) - Get random artwork +* [getSections](docs/sdks/library/README.md#getsections) - Get library sections (main Media Provider Only) +* [addSection](docs/sdks/library/README.md#addsection) - Add a library section +* [stopAllRefreshes](docs/sdks/library/README.md#stopallrefreshes) - Stop refresh +* [getSectionsPrefs](docs/sdks/library/README.md#getsectionsprefs) - Get section prefs +* [refreshSectionsMetadata](docs/sdks/library/README.md#refreshsectionsmetadata) - Refresh all sections +* [getTags](docs/sdks/library/README.md#gettags) - Get all library tags of a type +* [deleteMetadataItem](docs/sdks/library/README.md#deletemetadataitem) - Delete a metadata item +* [editMetadataItem](docs/sdks/library/README.md#editmetadataitem) - Edit a metadata item +* [detectAds](docs/sdks/library/README.md#detectads) - Ad-detect an item +* [getAllItemLeaves](docs/sdks/library/README.md#getallitemleaves) - Get the leaves of an item +* [analyzeMetadata](docs/sdks/library/README.md#analyzemetadata) - Analyze an item +* [generateThumbs](docs/sdks/library/README.md#generatethumbs) - Generate thumbs of chapters for an item +* [detectCredits](docs/sdks/library/README.md#detectcredits) - Credit detect a metadata item +* [getExtras](docs/sdks/library/README.md#getextras) - Get an item's extras +* [addExtras](docs/sdks/library/README.md#addextras) - Add to an item's extras +* [getFile](docs/sdks/library/README.md#getfile) - Get a file from a metadata or media bundle +* [startBifGeneration](docs/sdks/library/README.md#startbifgeneration) - Start BIF generation of an item +* [detectIntros](docs/sdks/library/README.md#detectintros) - Intro detect an item +* [createMarker](docs/sdks/library/README.md#createmarker) - Create a marker +* [matchItem](docs/sdks/library/README.md#matchitem) - Match a metadata item +* [listMatches](docs/sdks/library/README.md#listmatches) - Get metadata matches for an item +* [mergeItems](docs/sdks/library/README.md#mergeitems) - Merge a metadata item +* [listSonicallySimilar](docs/sdks/library/README.md#listsonicallysimilar) - Get nearest tracks to metadata item +* [setItemPreferences](docs/sdks/library/README.md#setitempreferences) - Set metadata preferences +* [refreshItemsMetadata](docs/sdks/library/README.md#refreshitemsmetadata) - Refresh a metadata item +* [getRelatedItems](docs/sdks/library/README.md#getrelateditems) - Get related items +* [listSimilar](docs/sdks/library/README.md#listsimilar) - Get similar items +* [splitItem](docs/sdks/library/README.md#splititem) - Split a metadata item +* [addSubtitles](docs/sdks/library/README.md#addsubtitles) - Add subtitles +* [getItemTree](docs/sdks/library/README.md#getitemtree) - Get metadata items as a tree +* [unmatch](docs/sdks/library/README.md#unmatch) - Unmatch a metadata item +* [listTopUsers](docs/sdks/library/README.md#listtopusers) - Get metadata top users +* [detectVoiceActivity](docs/sdks/library/README.md#detectvoiceactivity) - Detect voice activity +* [getAugmentationStatus](docs/sdks/library/README.md#getaugmentationstatus) - Get augmentation status +* [setStreamSelection](docs/sdks/library/README.md#setstreamselection) - Set stream selection +* [getPerson](docs/sdks/library/README.md#getperson) - Get person details +* [listPersonMedia](docs/sdks/library/README.md#listpersonmedia) - Get media for a person +* [deleteLibrarySection](docs/sdks/library/README.md#deletelibrarysection) - Delete a library section +* [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get a library section by id +* [editSection](docs/sdks/library/README.md#editsection) - Edit a library section +* [updateItems](docs/sdks/library/README.md#updateitems) - Set the fields of the filtered items +* [startAnalysis](docs/sdks/library/README.md#startanalysis) - Analyze a section +* [autocomplete](docs/sdks/library/README.md#autocomplete) - Get autocompletions for search +* [getCollections](docs/sdks/library/README.md#getcollections) - Get collections in a section +* [getCommon](docs/sdks/library/README.md#getcommon) - Get common fields for items +* [emptyTrash](docs/sdks/library/README.md#emptytrash) - Empty section trash +* [getSectionFilters](docs/sdks/library/README.md#getsectionfilters) - Get section filters +* [getFirstCharacters](docs/sdks/library/README.md#getfirstcharacters) - Get list of first characters +* [deleteIndexes](docs/sdks/library/README.md#deleteindexes) - Delete section indexes +* [deleteIntros](docs/sdks/library/README.md#deleteintros) - Delete section intro markers +* [getSectionPreferences](docs/sdks/library/README.md#getsectionpreferences) - Get section prefs +* [setSectionPreferences](docs/sdks/library/README.md#setsectionpreferences) - Set section prefs +* [cancelRefresh](docs/sdks/library/README.md#cancelrefresh) - Cancel section refresh +* [refreshSection](docs/sdks/library/README.md#refreshsection) - Refresh section +* [getAvailableSorts](docs/sdks/library/README.md#getavailablesorts) - Get a section sorts +* [getStreamLevels](docs/sdks/library/README.md#getstreamlevels) - Get loudness about a stream in json +* [getStreamLoudness](docs/sdks/library/README.md#getstreamloudness) - Get loudness about a stream +* [getChapterImage](docs/sdks/library/README.md#getchapterimage) - Get a chapter image +* [setItemArtwork](docs/sdks/library/README.md#setitemartwork) - Set an item's artwork, theme, etc +* [updateItemArtwork](docs/sdks/library/README.md#updateitemartwork) - Set an item's artwork, theme, etc +* [deleteMarker](docs/sdks/library/README.md#deletemarker) - Delete a marker +* [editMarker](docs/sdks/library/README.md#editmarker) - Edit a marker +* [deleteMediaItem](docs/sdks/library/README.md#deletemediaitem) - Delete a media item +* [getPartIndex](docs/sdks/library/README.md#getpartindex) - Get BIF index for a part +* [deleteCollection](docs/sdks/library/README.md#deletecollection) - Delete a collection +* [getSectionImage](docs/sdks/library/README.md#getsectionimage) - Get a section composite image +* [deleteStream](docs/sdks/library/README.md#deletestream) - Delete a stream +* [getStream](docs/sdks/library/README.md#getstream) - Get a stream +* [setStreamOffset](docs/sdks/library/README.md#setstreamoffset) - Set a stream offset +* [getItemArtwork](docs/sdks/library/README.md#getitemartwork) - Get an item's artwork, theme, etc +* [getMediaPart](docs/sdks/library/README.md#getmediapart) - Get a media part +* [getImageFromBif](docs/sdks/library/README.md#getimagefrombif) - Get an image from part BIF + +### [libraryCollections()](docs/sdks/librarycollections/README.md) + +* [addCollectionItems](docs/sdks/librarycollections/README.md#addcollectionitems) - Add items to a collection +* [deleteCollectionItem](docs/sdks/librarycollections/README.md#deletecollectionitem) - Delete an item from a collection +* [moveCollectionItem](docs/sdks/librarycollections/README.md#movecollectionitem) - Reorder an item in the collection + +### [libraryPlaylists()](docs/sdks/libraryplaylists/README.md) + +* [createPlaylist](docs/sdks/libraryplaylists/README.md#createplaylist) - Create a Playlist +* [uploadPlaylist](docs/sdks/libraryplaylists/README.md#uploadplaylist) - Upload +* [deletePlaylist](docs/sdks/libraryplaylists/README.md#deleteplaylist) - Delete a Playlist +* [updatePlaylist](docs/sdks/libraryplaylists/README.md#updateplaylist) - Editing a Playlist +* [getPlaylistGenerators](docs/sdks/libraryplaylists/README.md#getplaylistgenerators) - Get a playlist's generators +* [clearPlaylistItems](docs/sdks/libraryplaylists/README.md#clearplaylistitems) - Clearing a playlist +* [addPlaylistItems](docs/sdks/libraryplaylists/README.md#addplaylistitems) - Adding to a Playlist +* [deletePlaylistItem](docs/sdks/libraryplaylists/README.md#deleteplaylistitem) - Delete a Generator +* [getPlaylistGenerator](docs/sdks/libraryplaylists/README.md#getplaylistgenerator) - Get a playlist generator +* [getPlaylistGeneratorItems](docs/sdks/libraryplaylists/README.md#getplaylistgeneratoritems) - Get a playlist generator's items +* [movePlaylistItem](docs/sdks/libraryplaylists/README.md#moveplaylistitem) - Moving items in a playlist +* [refreshPlaylist](docs/sdks/libraryplaylists/README.md#refreshplaylist) - Reprocess a generator + +### [liveTV()](docs/sdks/livetv/README.md) + +* [getSessions](docs/sdks/livetv/README.md#getsessions) - Get all sessions +* [getLiveTVSession](docs/sdks/livetv/README.md#getlivetvsession) - Get a single session +* [getSessionPlaylistIndex](docs/sdks/livetv/README.md#getsessionplaylistindex) - Get a session playlist index +* [getSessionSegment](docs/sdks/livetv/README.md#getsessionsegment) - Get a single session segment ### [log()](docs/sdks/log/README.md) -* [logLine](docs/sdks/log/README.md#logline) - Logging a single line message. -* [logMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message -* [enablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail +* [writeLog](docs/sdks/log/README.md#writelog) - Logging a multi-line message to the Plex Media Server log +* [writeMessage](docs/sdks/log/README.md#writemessage) - Logging a single-line message to the Plex Media Server log +* [enablePapertrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail -### [media()](docs/sdks/media/README.md) +### [playlist()](docs/sdks/playlist/README.md) -* [markPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played -* [markUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed -* [updatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress -* [getBannerImage](docs/sdks/media/README.md#getbannerimage) - Get Banner Image -* [getThumbImage](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image +* [listPlaylists](docs/sdks/playlist/README.md#listplaylists) - List playlists +* [getPlaylist](docs/sdks/playlist/README.md#getplaylist) - Retrieve Playlist +* [getPlaylistItems](docs/sdks/playlist/README.md#getplaylistitems) - Retrieve Playlist Contents -### [playlists()](docs/sdks/playlists/README.md) +### [playQueue()](docs/sdks/playqueue/README.md) -* [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist -* [getPlaylists](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists -* [getPlaylist](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist -* [deletePlaylist](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist -* [updatePlaylist](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist -* [getPlaylistContents](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents -* [clearPlaylistContents](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents -* [addPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist -* [uploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist +* [createPlayQueue](docs/sdks/playqueue/README.md#createplayqueue) - Create a play queue +* [getPlayQueue](docs/sdks/playqueue/README.md#getplayqueue) - Retrieve a play queue +* [addToPlayQueue](docs/sdks/playqueue/README.md#addtoplayqueue) - Add a generator or playlist to a play queue +* [clearPlayQueue](docs/sdks/playqueue/README.md#clearplayqueue) - Clear a play queue +* [resetPlayQueue](docs/sdks/playqueue/README.md#resetplayqueue) - Reset a play queue +* [shuffle](docs/sdks/playqueue/README.md#shuffle) - Shuffle a play queue +* [unshuffle](docs/sdks/playqueue/README.md#unshuffle) - Unshuffle a play queue +* [deletePlayQueueItem](docs/sdks/playqueue/README.md#deleteplayqueueitem) - Delete an item from a play queue +* [movePlayQueueItem](docs/sdks/playqueue/README.md#moveplayqueueitem) - Move an item in a play queue -### [plex()](docs/sdks/plex/README.md) -* [getCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data -* [getUserFriends](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in -* [getGeoData](docs/sdks/plex/README.md#getgeodata) - Get Geo Data -* [getHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data -* [getServerResources](docs/sdks/plex/README.md#getserverresources) - Get Server Resources -* [getPin](docs/sdks/plex/README.md#getpin) - Get a Pin -* [getTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId +### [preferences()](docs/sdks/preferences/README.md) +* [getAllPreferences](docs/sdks/preferences/README.md#getallpreferences) - Get all preferences +* [setPreferences](docs/sdks/preferences/README.md#setpreferences) - Set preferences +* [getPreference](docs/sdks/preferences/README.md#getpreference) - Get a preferences + +### [provider()](docs/sdks/provider/README.md) + +* [listProviders](docs/sdks/provider/README.md#listproviders) - Get the list of available media providers +* [addProvider](docs/sdks/provider/README.md#addprovider) - Add a media provider +* [refreshProviders](docs/sdks/provider/README.md#refreshproviders) - Refresh media providers +* [deleteMediaProvider](docs/sdks/provider/README.md#deletemediaprovider) - Delete a media provider + +### [rate()](docs/sdks/rate/README.md) + +* [setRating](docs/sdks/rate/README.md#setrating) - Rate an item ### [search()](docs/sdks/search/README.md) -* [performSearch](docs/sdks/search/README.md#performsearch) - Perform a search -* [performVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search -* [getSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results +* [searchHubs](docs/sdks/search/README.md#searchhubs) - Search Hub +* [voiceSearchHubs](docs/sdks/search/README.md#voicesearchhubs) - Voice Search Hub -### [server()](docs/sdks/server/README.md) +### [status()](docs/sdks/status/README.md) -* [getServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities -* [getServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences -* [getAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients -* [getDevices](docs/sdks/server/README.md#getdevices) - Get Devices -* [getServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity -* [getMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account -* [getResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo -* [getMediaProviders](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers -* [getServerList](docs/sdks/server/README.md#getserverlist) - Get Server List +* [listSessions](docs/sdks/status/README.md#listsessions) - List Sessions +* [getBackgroundTasks](docs/sdks/status/README.md#getbackgroundtasks) - Get background tasks +* [listPlaybackHistory](docs/sdks/status/README.md#listplaybackhistory) - List Playback History +* [terminateSession](docs/sdks/status/README.md#terminatesession) - Terminate a session +* [deleteHistory](docs/sdks/status/README.md#deletehistory) - Delete Single History Item +* [getHistoryItem](docs/sdks/status/README.md#gethistoryitem) - Get Single History Item -### [sessions()](docs/sdks/sessions/README.md) +### [subscriptions()](docs/sdks/subscriptions/README.md) -* [getSessions](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions -* [getSessionHistory](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History -* [getTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions -* [stopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session +* [getAllSubscriptions](docs/sdks/subscriptions/README.md#getallsubscriptions) - Get all subscriptions +* [createSubscription](docs/sdks/subscriptions/README.md#createsubscription) - Create a subscription +* [processSubscriptions](docs/sdks/subscriptions/README.md#processsubscriptions) - Process all subscriptions +* [getScheduledRecordings](docs/sdks/subscriptions/README.md#getscheduledrecordings) - Get all scheduled recordings +* [getTemplate](docs/sdks/subscriptions/README.md#gettemplate) - Get the subscription template +* [cancelGrab](docs/sdks/subscriptions/README.md#cancelgrab) - Cancel an existing grab +* [deleteSubscription](docs/sdks/subscriptions/README.md#deletesubscription) - Delete a subscription +* [getSubscription](docs/sdks/subscriptions/README.md#getsubscription) - Get a single subscription +* [editSubscriptionPreferences](docs/sdks/subscriptions/README.md#editsubscriptionpreferences) - Edit a subscription +* [reorderSubscription](docs/sdks/subscriptions/README.md#reordersubscription) - Re-order a subscription -### [statistics()](docs/sdks/statistics/README.md) +### [timeline()](docs/sdks/timeline/README.md) -* [getStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics -* [getResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics -* [getBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics +* [markPlayed](docs/sdks/timeline/README.md#markplayed) - Mark an item as played +* [report](docs/sdks/timeline/README.md#report) - Report media timeline +* [unscrobble](docs/sdks/timeline/README.md#unscrobble) - Mark an item as unplayed + +### [transcoder()](docs/sdks/transcoder/README.md) + +* [transcodeImage](docs/sdks/transcoder/README.md#transcodeimage) - Transcode an image +* [makeDecision](docs/sdks/transcoder/README.md#makedecision) - Make a decision on media playback +* [triggerFallback](docs/sdks/transcoder/README.md#triggerfallback) - Manually trigger a transcoder fallback +* [transcodeSubtitles](docs/sdks/transcoder/README.md#transcodesubtitles) - Transcode subtitles +* [startTranscodeSession](docs/sdks/transcoder/README.md#starttranscodesession) - Start A Transcoding Session + +### [ultraBlur()](docs/sdks/ultrablur/README.md) + +* [getColors](docs/sdks/ultrablur/README.md#getcolors) - Get UltraBlur Colors +* [getImage](docs/sdks/ultrablur/README.md#getimage) - Get UltraBlur Image ### [updater()](docs/sdks/updater/README.md) -* [getUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates -* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates -* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates - -### [users()](docs/sdks/users/README.md) - -* [getUsers](docs/sdks/users/README.md#getusers) - Get list of all connected users - -### [video()](docs/sdks/video/README.md) - -* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item -* [startUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode - -### [watchlist()](docs/sdks/watchlist/README.md) - -* [getWatchList](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist +* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Applying updates +* [checkUpdates](docs/sdks/updater/README.md#checkupdates) - Checking for updates +* [getUpdatesStatus](docs/sdks/updater/README.md#getupdatesstatus) - Querying status of updates @@ -313,13 +530,11 @@ public class Application { Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception. -By default, an API error will throw a `models/errors/SDKError` exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `getServerCapabilities` method throws the following exceptions: +By default, an API error will throw a `models/errors/SDKError` exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `getServerInfo` method throws the following exceptions: -| Error Type | Status Code | Content Type | -| ----------------------------------------------- | ----------- | ---------------- | -| models/errors/GetServerCapabilitiesBadRequest | 400 | application/json | -| models/errors/GetServerCapabilitiesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ----------- | ------------ | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ### Example @@ -327,23 +542,38 @@ By default, an API error will throw a `models/errors/SDKError` exception. When c package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; +import dev.plexapi.sdk.models.operations.GetServerInfoRequest; +import dev.plexapi.sdk.models.operations.GetServerInfoResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + GetServerInfoRequest req = GetServerInfoRequest.builder() + .build(); + + GetServerInfoResponse res = sdk.general().getServerInfo() + .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithDirectory().isPresent()) { // handle response } } @@ -354,15 +584,26 @@ public class Application { ## Server Selection -### Server Variables +### Select Server by Index -The default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following builder methods are available when initializing the SDK client instance: +You can override the default server globally using the `.serverIndex(int serverIdx)` builder method when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: -| Variable | BuilderMethod | Supported Values | Default | Description | -| ---------- | ----------------------------------- | -------------------------- | --------------- | ---------------------------------------------- | -| `protocol` | `protocol(ServerProtocol protocol)` | - `"http"`
- `"https"` | `"https"` | The protocol to use for the server connection | -| `ip` | `ip(String ip)` | java.lang.String | `"10.10.10.47"` | The IP address or hostname of your Plex Server | -| `port` | `port(String port)` | java.lang.String | `"32400"` | The port of your Plex Server | +| # | Server | Variables | Description | +| --- | ---------------------------------------------------------- | -------------------------------------------- | ----------- | +| 0 | `https://{IP-description}.{identifier}.plex.direct:{port}` | `identifier`
`IP-description`
`port` | | +| 1 | `{protocol}://{host}:{port}` | `protocol`
`host`
`port` | | +| 2 | `https://{server_url}` | `server_url` | | + +If the selected server has variables, you may override its default values using the associated builder method(s): + +| Variable | BuilderMethod | Default | Description | +| ---------------- | ------------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `identifier` | `identifier(String identifier)` | `"0123456789abcdef0123456789abcdef"` | The unique identifier of this particular PMS | +| `IP-description` | `ipDescription(String ipDescription)` | `"1-2-3-4"` | A `-` separated string of the IPv4 or IPv6 address components | +| `port` | `port(String port)` | `"32400"` | The Port number configured on the PMS. Typically (`32400`).
If using a reverse proxy, this would be the port number configured on the proxy.
| +| `protocol` | `protocol(String protocol)` | `"http"` | The network protocol to use. Typically (`http` or `https`) | +| `host` | `host(String host)` | `"localhost"` | The Host of the PMS.
If using on a local network, this is the internal IP address of the server hosting the PMS.
If using on an external network, this is the external IP address for your network, and requires port forwarding.
If using a reverse proxy, this would be the external DNS domain for your network, and requires the proxy handle port forwarding.
| +| `server_url` | `serverUrl(String serverUrl)` | `"http://localhost:32400"` | The full manual URL to access the PMS | #### Example @@ -370,27 +611,42 @@ The default server `{protocol}://{ip}:{port}` contains variables and is set to ` package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.SDK.Builder.ServerProtocol; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; +import dev.plexapi.sdk.models.operations.GetServerInfoRequest; +import dev.plexapi.sdk.models.operations.GetServerInfoResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .protocol(ServerProtocol.HTTPS) - .ip("4982:bc2a:b4f8:efb5:2394:5bc3:ab4f:0e6d") - .port("44765") - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .serverIndex(1) + .protocol("") + .host("electric-excess.name") + .port("36393") + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + GetServerInfoRequest req = GetServerInfoRequest.builder() + .build(); + + GetServerInfoResponse res = sdk.general().getServerInfo() + .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithDirectory().isPresent()) { // handle response } } @@ -399,60 +655,44 @@ public class Application { ### Override Server URL Per-Client -The default server can be overridden globally using the `.serverURL(String serverUrl)` builder method when initializing the SDK client instance. For example: +The default server can also be overridden globally using the `.serverURL(String serverUrl)` builder method when initializing the SDK client instance. For example: ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; +import dev.plexapi.sdk.models.operations.GetServerInfoRequest; +import dev.plexapi.sdk.models.operations.GetServerInfoResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .serverURL("https://10.10.10.47:32400") - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .serverURL("https://http://localhost:32400") + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + GetServerInfoRequest req = GetServerInfoRequest.builder() + .build(); + + GetServerInfoResponse res = sdk.general().getServerInfo() + .request(req) .call(); - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Override Server URL Per-Operation - -The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example: -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest; -import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized; -import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetCompanionsDataResponse res = sdk.plex().getCompanionsData() - .serverURL("https://plex.tv/api/v2") - .call(); - - if (res.responseBodies().isPresent()) { + if (res.mediaContainerWithDirectory().isPresent()) { // handle response } } @@ -533,32 +773,47 @@ Async support is available for: This SDK supports the following security scheme globally: -| Name | Type | Scheme | -| ------------- | ------ | ------- | -| `accessToken` | apiKey | API key | +| Name | Type | Scheme | +| ------- | ------ | ------- | +| `token` | apiKey | API key | -To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example: +To authenticate with the API the `token` parameter must be set when initializing the SDK client instance. For example: ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; +import dev.plexapi.sdk.models.operations.GetServerInfoRequest; +import dev.plexapi.sdk.models.operations.GetServerInfoResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") .build(); - GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + GetServerInfoRequest req = GetServerInfoRequest.builder() + .build(); + + GetServerInfoResponse res = sdk.general().getServerInfo() + .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithDirectory().isPresent()) { // handle response } } diff --git a/RELEASES.md b/RELEASES.md index c2a2643b..5554e02f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -378,4 +378,14 @@ Based on: ### Generated - [java v0.18.0] . ### Releases -- [Maven Central v0.18.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.18.0 - . \ No newline at end of file +- [Maven Central v0.18.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.18.0 - . + +## 2025-10-12 06:49:36 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.615.2 (2.698.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.19.1] . +### Releases +- [Maven Central v0.19.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.19.1 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index de3fe3a7..9d060b0d 100644 --- a/USAGE.md +++ b/USAGE.md @@ -3,23 +3,66 @@ package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.*; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + StartTranscodeSessionRequest req = StartTranscodeSessionRequest.builder() + .transcodeType(TranscodeType.MUSIC) + .extension(Extension.MPD) + .advancedSubtitles(AdvancedSubtitles.BURN) + .audioBoost(50L) + .audioChannelCount(5L) + .autoAdjustQuality(BoolInt.ONE) + .autoAdjustSubtitle(BoolInt.ONE) + .directPlay(BoolInt.ONE) + .directStream(BoolInt.ONE) + .directStreamAudio(BoolInt.ONE) + .disableResolutionRotation(BoolInt.ONE) + .hasMDE(BoolInt.ONE) + .location(StartTranscodeSessionQueryParamLocation.WAN) + .mediaBufferSize(102400L) + .mediaIndex(0L) + .musicBitrate(5000L) + .offset(90.5) + .partIndex(0L) + .path("/library/metadata/151671") + .peakBitrate(12000L) + .photoResolution("1080x1080") + .protocol(StartTranscodeSessionQueryParamProtocol.DASH) + .secondsPerSegment(5L) + .subtitleSize(50L) + .videoBitrate(12000L) + .videoQuality(50L) + .videoResolution("1080x1080") + .xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)") + .xPlexClientProfileName("generic") + .build(); + + StartTranscodeSessionResponse res = sdk.transcoder().startTranscodeSession() + .request(req) .call(); - if (res.object().isPresent()) { + if (res.responseStream().isPresent()) { // handle response } } diff --git a/build.gradle b/build.gradle index 46ecae10..8bfa93d3 100644 --- a/build.gradle +++ b/build.gradle @@ -105,7 +105,7 @@ publishing { // https://github.com/gradle/gradle/issues/18619 groupId = "dev.plexapi" artifactId = "plexapi" - version = "0.18.0" + version = "0.19.1" from components.java diff --git a/codeSamples.yaml b/codeSamples.yaml index d5ad6584..30047487 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -12,23 +12,83 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest; - import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; - import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; + import dev.plexapi.sdk.models.operations.GetServerInfoRequest; + import dev.plexapi.sdk.models.operations.GetServerInfoResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() + GetServerInfoRequest req = GetServerInfoRequest.builder() + .build(); + + GetServerInfoResponse res = sdk.general().getServerInfo() + .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithDirectory().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/:/eventsource/notifications"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetNotificationsRequest; + import dev.plexapi.sdk.models.operations.GetNotificationsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetNotificationsRequest req = GetNotificationsRequest.builder() + .build(); + + GetNotificationsResponse res = sdk.events().getNotifications() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { // handle response } } @@ -42,20 +102,256 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest; - import dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized; - import dev.plexapi.sdk.models.operations.GetServerPreferencesResponse; + import dev.plexapi.sdk.models.operations.GetAllPreferencesResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerPreferencesBadRequest, GetServerPreferencesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetServerPreferencesResponse res = sdk.server().getServerPreferences() + GetAllPreferencesResponse res = sdk.preferences().getAllPreferences() + .call(); + + if (res.mediaContainerWithSettings().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/:/prefs"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetPreferencesRequest req = SetPreferencesRequest.builder() + .prefs(Prefs.builder() + .build()) + .build(); + + SetPreferencesResponse res = sdk.preferences().setPreferences() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/:/prefs/get"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetPreferenceRequest; + import dev.plexapi.sdk.models.operations.GetPreferenceResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPreferenceRequest req = GetPreferenceRequest.builder() + .build(); + + GetPreferenceResponse res = sdk.preferences().getPreference() + .request(req) + .call(); + + if (res.mediaContainerWithSettings().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/:/rate"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.SetRatingRequest; + import dev.plexapi.sdk.models.operations.SetRatingResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetRatingRequest req = SetRatingRequest.builder() + .identifier("") + .key("") + .rating(8722.46) + .build(); + + SetRatingResponse res = sdk.rate().setRating() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/:/scrobble"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.MarkPlayedRequest; + import dev.plexapi.sdk.models.operations.MarkPlayedResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MarkPlayedRequest req = MarkPlayedRequest.builder() + .identifier("") + .build(); + + MarkPlayedResponse res = sdk.timeline().markPlayed() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/:/timeline"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ReportRequest req = ReportRequest.builder() + .key("/foo") + .ratingKey("xyz") + .state(State.PLAYING) + .playQueueItemID("123") + .time(0L) + .duration(10000L) + .continuing(BoolInt.ONE) + .updated(14200000L) + .offline(BoolInt.ONE) + .timeToFirstFrame(1000L) + .timeStalled(1000L) + .bandwidth(100L) + .bufferedTime(100L) + .bufferedSize(1024L) + .build(); + + ReportResponse res = sdk.timeline().report() + .request(req) .call(); if (res.object().isPresent()) { @@ -63,7 +359,7 @@ actions: } } } - - target: $["paths"]["/:/progress"]["post"] + - target: $["paths"]["/:/unscrobble"]["put"] update: x-codeSamples: - lang: java @@ -72,100 +368,42 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest; - import dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized; - import dev.plexapi.sdk.models.operations.UpdatePlayProgressResponse; + import dev.plexapi.sdk.models.operations.UnscrobbleRequest; + import dev.plexapi.sdk.models.operations.UnscrobbleResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws UpdatePlayProgressBadRequest, UpdatePlayProgressUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - UpdatePlayProgressResponse res = sdk.media().updatePlayProgress() - .key("") - .time(90000d) - .state("played") - .call(); - - // handle response - } - } - - target: $["paths"]["/:/scrobble"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.MarkPlayedBadRequest; - import dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized; - import dev.plexapi.sdk.models.operations.MarkPlayedResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws MarkPlayedBadRequest, MarkPlayedUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - MarkPlayedResponse res = sdk.media().markPlayed() - .key(59398d) - .call(); - - // handle response - } - } - - target: $["paths"]["/:/timeline"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetTimelineBadRequest; - import dev.plexapi.sdk.models.errors.GetTimelineUnauthorized; - import dev.plexapi.sdk.models.operations.*; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetTimelineBadRequest, GetTimelineUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetTimelineRequest req = GetTimelineRequest.builder() - .ratingKey(23409d) - .key("/library/metadata/23409") - .state(State.PLAYING) - .hasMDE(1d) - .time(2000d) - .duration(10000d) - .context("home:hub.continueWatching") - .playQueueItemID(1d) - .playBackTime(2000d) - .row(1d) + UnscrobbleRequest req = UnscrobbleRequest.builder() + .identifier("") .build(); - GetTimelineResponse res = sdk.video().getTimeline() + UnscrobbleResponse res = sdk.timeline().unscrobble() .request(req) .call(); // handle response } } - - target: $["paths"]["/:/unscrobble"]["get"] + - target: $["paths"]["/:/websocket/notifications"]["get"] update: x-codeSamples: - lang: java @@ -174,24 +412,40 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.MarkUnplayedBadRequest; - import dev.plexapi.sdk.models.errors.MarkUnplayedUnauthorized; - import dev.plexapi.sdk.models.operations.MarkUnplayedResponse; + import dev.plexapi.sdk.models.operations.ConnectWebSocketRequest; + import dev.plexapi.sdk.models.operations.ConnectWebSocketResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws MarkUnplayedBadRequest, MarkUnplayedUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - MarkUnplayedResponse res = sdk.media().markUnplayed() - .key(59398d) + ConnectWebSocketRequest req = ConnectWebSocketRequest.builder() + .build(); + + ConnectWebSocketResponse res = sdk.events().connectWebSocket() + .request(req) .call(); - // handle response + if (res.responseStream().isPresent()) { + // handle response + } } } - target: $["paths"]["/activities"]["get"] @@ -203,20 +457,18 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetServerActivitiesBadRequest; - import dev.plexapi.sdk.models.errors.GetServerActivitiesUnauthorized; - import dev.plexapi.sdk.models.operations.GetServerActivitiesResponse; + import dev.plexapi.sdk.models.operations.ListActivitiesResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerActivitiesBadRequest, GetServerActivitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetServerActivitiesResponse res = sdk.activities().getServerActivities() + ListActivitiesResponse res = sdk.activities().listActivities() .call(); if (res.object().isPresent()) { @@ -224,7 +476,7 @@ actions: } } } - - target: $["paths"]["/activities/{activityUUID}"]["delete"] + - target: $["paths"]["/activities/{activityId}"]["delete"] update: x-codeSamples: - lang: java @@ -233,21 +485,36 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest; - import dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized; - import dev.plexapi.sdk.models.operations.CancelServerActivitiesResponse; + import dev.plexapi.sdk.models.operations.CancelActivityRequest; + import dev.plexapi.sdk.models.operations.CancelActivityResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws CancelServerActivitiesBadRequest, CancelServerActivitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities() - .activityUUID("25b71ed5-0f9d-461c-baa7-d404e9e10d3e") + CancelActivityRequest req = CancelActivityRequest.builder() + .activityId("d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e") + .build(); + + CancelActivityResponse res = sdk.activities().cancelActivity() + .request(req) .call(); // handle response @@ -262,20 +529,18 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.StopAllTasksBadRequest; - import dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized; - import dev.plexapi.sdk.models.operations.StopAllTasksResponse; + import dev.plexapi.sdk.models.operations.StopTasksResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws StopAllTasksBadRequest, StopAllTasksUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - StopAllTasksResponse res = sdk.butler().stopAllTasks() + StopTasksResponse res = sdk.butler().stopTasks() .call(); // handle response @@ -290,20 +555,18 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetButlerTasksBadRequest; - import dev.plexapi.sdk.models.errors.GetButlerTasksUnauthorized; - import dev.plexapi.sdk.models.operations.GetButlerTasksResponse; + import dev.plexapi.sdk.models.operations.GetTasksResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetButlerTasksBadRequest, GetButlerTasksUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetButlerTasksResponse res = sdk.butler().getButlerTasks() + GetTasksResponse res = sdk.butler().getTasks() .call(); if (res.object().isPresent()) { @@ -320,26 +583,24 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.StartAllTasksBadRequest; - import dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized; - import dev.plexapi.sdk.models.operations.StartAllTasksResponse; + import dev.plexapi.sdk.models.operations.StartTasksResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws StartAllTasksBadRequest, StartAllTasksUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - StartAllTasksResponse res = sdk.butler().startAllTasks() + StartTasksResponse res = sdk.butler().startTasks() .call(); // handle response } } - - target: $["paths"]["/butler/{taskName}"]["delete"] + - target: $["paths"]["/butler/{task}"]["delete"] update: x-codeSamples: - lang: java @@ -348,28 +609,41 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.StopTaskBadRequest; - import dev.plexapi.sdk.models.errors.StopTaskUnauthorized; - import dev.plexapi.sdk.models.operations.PathParamTaskName; - import dev.plexapi.sdk.models.operations.StopTaskResponse; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws StopTaskBadRequest, StopTaskUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); + StopTaskRequest req = StopTaskRequest.builder() + .task(Task.CLEAN_OLD_BUNDLES) + .build(); + StopTaskResponse res = sdk.butler().stopTask() - .taskName(PathParamTaskName.CLEAN_OLD_CACHE_FILES) + .request(req) .call(); // handle response } } - - target: $["paths"]["/butler/{taskName}"]["post"] + - target: $["paths"]["/butler/{task}"]["post"] update: x-codeSamples: - lang: java @@ -378,28 +652,41 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.StartTaskBadRequest; - import dev.plexapi.sdk.models.errors.StartTaskUnauthorized; - import dev.plexapi.sdk.models.operations.StartTaskResponse; - import dev.plexapi.sdk.models.operations.TaskName; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws StartTaskBadRequest, StartTaskUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); + StartTaskRequest req = StartTaskRequest.builder() + .task(PathParamTask.REFRESH_LOCAL_MEDIA) + .build(); + StartTaskResponse res = sdk.butler().startTask() - .taskName(TaskName.REFRESH_PERIODIC_METADATA) + .request(req) .call(); // handle response } } - - target: $["paths"]["/clients"]["get"] + - target: $["paths"]["/downloadQueue"]["post"] update: x-codeSamples: - lang: java @@ -408,20 +695,18 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest; - import dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized; - import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse; + import dev.plexapi.sdk.models.operations.CreateDownloadQueueResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetAvailableClientsBadRequest, GetAvailableClientsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetAvailableClientsResponse res = sdk.server().getAvailableClients() + CreateDownloadQueueResponse res = sdk.downloadQueue().createDownloadQueue() .call(); if (res.object().isPresent()) { @@ -429,7 +714,7 @@ actions: } } } - - target: $["paths"]["/companions"]["get"] + - target: $["paths"]["/downloadQueue/{queueId}"]["get"] update: x-codeSamples: - lang: java @@ -438,50 +723,36 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest; - import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized; - import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse; + import dev.plexapi.sdk.models.operations.GetDownloadQueueRequest; + import dev.plexapi.sdk.models.operations.GetDownloadQueueResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetCompanionsDataResponse res = sdk.plex().getCompanionsData() - .call(); + GetDownloadQueueRequest req = GetDownloadQueueRequest.builder() + .queueId(922802L) + .build(); - if (res.responseBodies().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/devices"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetDevicesBadRequest; - import dev.plexapi.sdk.models.errors.GetDevicesUnauthorized; - import dev.plexapi.sdk.models.operations.GetDevicesResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetDevicesBadRequest, GetDevicesUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetDevicesResponse res = sdk.server().getDevices() + GetDownloadQueueResponse res = sdk.downloadQueue().getDownloadQueue() + .request(req) .call(); if (res.object().isPresent()) { @@ -489,7 +760,7 @@ actions: } } } - - target: $["paths"]["/friends"]["get"] + - target: $["paths"]["/downloadQueue/{queueId}/add"]["post"] update: x-codeSamples: - lang: java @@ -498,79 +769,65 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetUserFriendsBadRequest; - import dev.plexapi.sdk.models.errors.GetUserFriendsUnauthorized; - import dev.plexapi.sdk.models.operations.GetUserFriendsResponse; + import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsRequest; + import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsResponse; + import dev.plexapi.sdk.models.shared.*; import java.lang.Exception; + import java.util.List; public class Application { - public static void main(String[] args) throws GetUserFriendsBadRequest, GetUserFriendsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetUserFriendsResponse res = sdk.plex().getUserFriends() - .call(); + AddDownloadQueueItemsRequest req = AddDownloadQueueItemsRequest.builder() + .queueId(984925L) + .keys(List.of( + "/library/metadata/3", + "/library/metadata/6")) + .advancedSubtitles(AdvancedSubtitles.BURN) + .audioBoost(50L) + .audioChannelCount(5L) + .autoAdjustQuality(BoolInt.ONE) + .autoAdjustSubtitle(BoolInt.ONE) + .directPlay(BoolInt.ONE) + .directStream(BoolInt.ONE) + .directStreamAudio(BoolInt.ONE) + .disableResolutionRotation(BoolInt.ONE) + .hasMDE(BoolInt.ONE) + .location(Location.WAN) + .mediaBufferSize(102400L) + .mediaIndex(0L) + .musicBitrate(5000L) + .offset(90.5) + .partIndex(0L) + .path("/library/metadata/151671") + .peakBitrate(12000L) + .photoResolution("1080x1080") + .protocol(Protocol.DASH) + .secondsPerSegment(5L) + .subtitleSize(50L) + .videoBitrate(12000L) + .videoQuality(50L) + .videoResolution("1080x1080") + .build(); - if (res.friends().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/geoip"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetGeoDataBadRequest; - import dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized; - import dev.plexapi.sdk.models.operations.GetGeoDataResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetGeoDataBadRequest, GetGeoDataUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .build(); - - GetGeoDataResponse res = sdk.plex().getGeoData() - .call(); - - if (res.geoData().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/home"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetHomeDataBadRequest; - import dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized; - import dev.plexapi.sdk.models.operations.GetHomeDataResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetHomeDataBadRequest, GetHomeDataUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetHomeDataResponse res = sdk.plex().getHomeData() + AddDownloadQueueItemsResponse res = sdk.downloadQueue().addDownloadQueueItems() + .request(req) .call(); if (res.object().isPresent()) { @@ -578,6 +835,293 @@ actions: } } } + - target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/decision"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetItemDecisionRequest; + import dev.plexapi.sdk.models.operations.GetItemDecisionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetItemDecisionRequest req = GetItemDecisionRequest.builder() + .queueId(231605L) + .itemId(32L) + .build(); + + GetItemDecisionResponse res = sdk.downloadQueue().getItemDecision() + .request(req) + .call(); + + if (res.mediaContainerWithDecision().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/media"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaRequest; + import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDownloadQueueMediaRequest req = GetDownloadQueueMediaRequest.builder() + .queueId(663184L) + .itemId(32L) + .build(); + + GetDownloadQueueMediaResponse res = sdk.downloadQueue().getDownloadQueueMedia() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/downloadQueue/{queueId}/items"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsRequest; + import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListDownloadQueueItemsRequest req = ListDownloadQueueItemsRequest.builder() + .queueId(524138L) + .build(); + + ListDownloadQueueItemsResponse res = sdk.downloadQueue().listDownloadQueueItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsRequest; + import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RemoveDownloadQueueItemsRequest req = RemoveDownloadQueueItemsRequest.builder() + .queueId(946275L) + .itemId(List.of( + 32L, + 345L, + 23L)) + .build(); + + RemoveDownloadQueueItemsResponse res = sdk.downloadQueue().removeDownloadQueueItems() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsRequest; + import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDownloadQueueItemsRequest req = GetDownloadQueueItemsRequest.builder() + .queueId(809886L) + .itemId(List.of( + 32L, + 345L, + 23L)) + .build(); + + GetDownloadQueueItemsResponse res = sdk.downloadQueue().getDownloadQueueItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}/restart"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsRequest; + import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RestartProcessingDownloadQueueItemsRequest req = RestartProcessingDownloadQueueItemsRequest.builder() + .queueId(713001L) + .itemId(List.of( + 32L, + 345L, + 23L)) + .build(); + + RestartProcessingDownloadQueueItemsResponse res = sdk.downloadQueue().restartProcessingDownloadQueueItems() + .request(req) + .call(); + + // handle response + } + } - target: $["paths"]["/hubs"]["get"] update: x-codeSamples: @@ -587,20 +1131,37 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest; - import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized; - import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse; + import dev.plexapi.sdk.models.operations.GetAllHubsRequest; + import dev.plexapi.sdk.models.operations.GetAllHubsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetGlobalHubsBadRequest, GetGlobalHubsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs() + GetAllHubsRequest req = GetAllHubsRequest.builder() + .onlyTransient(BoolInt.ONE) + .build(); + + GetAllHubsResponse res = sdk.hubs().getAllHubs() + .request(req) .call(); if (res.object().isPresent()) { @@ -608,7 +1169,7 @@ actions: } } } - - target: $["paths"]["/hubs/home/recentlyAdded"]["get"] + - target: $["paths"]["/hubs/continueWatching"]["get"] update: x-codeSamples: - lang: java @@ -617,7 +1178,9 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.operations.GetContinueWatchingRequest; + import dev.plexapi.sdk.models.operations.GetContinueWatchingResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { @@ -625,17 +1188,263 @@ actions: public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetRecentlyAddedRequest req = GetRecentlyAddedRequest.builder() - .contentDirectoryID(39486L) - .type(Type.TvShow) - .sectionID(2L) - .includeMeta(IncludeMeta.Enable) + GetContinueWatchingRequest req = GetContinueWatchingRequest.builder() .build(); - GetRecentlyAddedResponse res = sdk.hubs().getRecentlyAdded() + GetContinueWatchingResponse res = sdk.hubs().getContinueWatching() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/hubs/items"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetHubItemsRequest; + import dev.plexapi.sdk.models.operations.GetHubItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetHubItemsRequest req = GetHubItemsRequest.builder() + .identifier(List.of( + "", + "", + "")) + .build(); + + GetHubItemsResponse res = sdk.hubs().getHubItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/hubs/metadata/{metadataId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetMetadataHubsRequest; + import dev.plexapi.sdk.models.operations.GetMetadataHubsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetMetadataHubsRequest req = GetMetadataHubsRequest.builder() + .metadataId(605482L) + .onlyTransient(BoolInt.ONE) + .build(); + + GetMetadataHubsResponse res = sdk.hubs().getMetadataHubs() + .request(req) + .call(); + + if (res.mediaContainerWithHubs().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/hubs/metadata/{metadataId}/postplay"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetPostplayHubsRequest; + import dev.plexapi.sdk.models.operations.GetPostplayHubsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPostplayHubsRequest req = GetPostplayHubsRequest.builder() + .metadataId(441419L) + .onlyTransient(BoolInt.ONE) + .build(); + + GetPostplayHubsResponse res = sdk.hubs().getPostplayHubs() + .request(req) + .call(); + + if (res.mediaContainerWithHubs().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/hubs/metadata/{metadataId}/related"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetRelatedHubsRequest; + import dev.plexapi.sdk.models.operations.GetRelatedHubsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetRelatedHubsRequest req = GetRelatedHubsRequest.builder() + .metadataId(8858L) + .onlyTransient(BoolInt.ONE) + .build(); + + GetRelatedHubsResponse res = sdk.hubs().getRelatedHubs() + .request(req) + .call(); + + if (res.mediaContainerWithHubs().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/hubs/promoted"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetPromotedHubsRequest; + import dev.plexapi.sdk.models.operations.GetPromotedHubsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPromotedHubsRequest req = GetPromotedHubsRequest.builder() + .build(); + + GetPromotedHubsResponse res = sdk.hubs().getPromotedHubs() .request(req) .call(); @@ -653,25 +1462,42 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.PerformSearchBadRequest; - import dev.plexapi.sdk.models.errors.PerformSearchUnauthorized; - import dev.plexapi.sdk.models.operations.PerformSearchResponse; + import dev.plexapi.sdk.models.operations.SearchHubsRequest; + import dev.plexapi.sdk.models.operations.SearchHubsResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws PerformSearchBadRequest, PerformSearchUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - PerformSearchResponse res = sdk.search().performSearch() - .query("arnold") - .limit(5d) + SearchHubsRequest req = SearchHubsRequest.builder() + .query("") + .sectionId(1L) + .build(); + + SearchHubsResponse res = sdk.search().searchHubs() + .request(req) .call(); - // handle response + if (res.object().isPresent()) { + // handle response + } } } - target: $["paths"]["/hubs/search/voice"]["get"] @@ -683,25 +1509,41 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.PerformVoiceSearchBadRequest; - import dev.plexapi.sdk.models.errors.PerformVoiceSearchUnauthorized; - import dev.plexapi.sdk.models.operations.PerformVoiceSearchResponse; + import dev.plexapi.sdk.models.operations.VoiceSearchHubsRequest; + import dev.plexapi.sdk.models.operations.VoiceSearchHubsResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws PerformVoiceSearchBadRequest, PerformVoiceSearchUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - PerformVoiceSearchResponse res = sdk.search().performVoiceSearch() - .query("dead+poop") - .limit(5d) + VoiceSearchHubsRequest req = VoiceSearchHubsRequest.builder() + .query("") + .build(); + + VoiceSearchHubsResponse res = sdk.search().voiceSearchHubs() + .request(req) .call(); - // handle response + if (res.object().isPresent()) { + // handle response + } } } - target: $["paths"]["/hubs/sections/{sectionId}"]["get"] @@ -713,21 +1555,38 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest; - import dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized; - import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse; + import dev.plexapi.sdk.models.operations.GetSectionHubsRequest; + import dev.plexapi.sdk.models.operations.GetSectionHubsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetLibraryHubsBadRequest, GetLibraryHubsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs() - .sectionId(492.74) + GetSectionHubsRequest req = GetSectionHubsRequest.builder() + .sectionId(336924L) + .onlyTransient(BoolInt.ONE) + .build(); + + GetSectionHubsResponse res = sdk.hubs().getSectionHubs() + .request(req) .call(); if (res.object().isPresent()) { @@ -735,6 +1594,286 @@ actions: } } } + - target: $["paths"]["/hubs/sections/{sectionId}/manage"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ResetSectionDefaultsRequest; + import dev.plexapi.sdk.models.operations.ResetSectionDefaultsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ResetSectionDefaultsRequest req = ResetSectionDefaultsRequest.builder() + .sectionId(383022L) + .build(); + + ResetSectionDefaultsResponse res = sdk.hubs().resetSectionDefaults() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/hubs/sections/{sectionId}/manage"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListHubsRequest; + import dev.plexapi.sdk.models.operations.ListHubsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListHubsRequest req = ListHubsRequest.builder() + .sectionId(442546L) + .build(); + + ListHubsResponse res = sdk.hubs().listHubs() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/hubs/sections/{sectionId}/manage"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.CreateCustomHubRequest; + import dev.plexapi.sdk.models.operations.CreateCustomHubResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateCustomHubRequest req = CreateCustomHubRequest.builder() + .sectionId(869922L) + .metadataItemId(703843L) + .promotedToRecommended(BoolInt.ONE) + .promotedToOwnHome(BoolInt.ONE) + .promotedToSharedHome(BoolInt.ONE) + .build(); + + CreateCustomHubResponse res = sdk.hubs().createCustomHub() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/hubs/sections/{sectionId}/manage/move"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.MoveHubRequest; + import dev.plexapi.sdk.models.operations.MoveHubResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MoveHubRequest req = MoveHubRequest.builder() + .sectionId(755710L) + .identifier("") + .build(); + + MoveHubResponse res = sdk.hubs().moveHub() + .request(req) + .call(); + + if (res.getResponses200().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteCustomHubRequest; + import dev.plexapi.sdk.models.operations.DeleteCustomHubResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteCustomHubRequest req = DeleteCustomHubRequest.builder() + .sectionId(625677L) + .identifier("") + .build(); + + DeleteCustomHubResponse res = sdk.hubs().deleteCustomHub() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.UpdateHubVisibilityRequest; + import dev.plexapi.sdk.models.operations.UpdateHubVisibilityResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UpdateHubVisibilityRequest req = UpdateHubVisibilityRequest.builder() + .sectionId(341650L) + .identifier("") + .promotedToRecommended(BoolInt.ONE) + .promotedToOwnHome(BoolInt.ONE) + .promotedToSharedHome(BoolInt.ONE) + .build(); + + UpdateHubVisibilityResponse res = sdk.hubs().updateHubVisibility() + .request(req) + .call(); + + // handle response + } + } - target: $["paths"]["/identity"]["get"] update: x-codeSamples: @@ -744,145 +1883,7 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout; - import dev.plexapi.sdk.models.operations.GetServerIdentityResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetServerIdentityRequestTimeout, Exception { - - PlexAPI sdk = PlexAPI.builder() - .build(); - - GetServerIdentityResponse res = sdk.server().getServerIdentity() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/all/top"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetTopWatchedContentBadRequest; - import dev.plexapi.sdk.models.errors.GetTopWatchedContentUnauthorized; - import dev.plexapi.sdk.models.operations.*; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetTopWatchedContentBadRequest, GetTopWatchedContentUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent() - .type(GetTopWatchedContentQueryParamType.TvShow) - .includeGuids(GetTopWatchedContentQueryParamIncludeGuids.Enable) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/hashes"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetFileHashBadRequest; - import dev.plexapi.sdk.models.errors.GetFileHashUnauthorized; - import dev.plexapi.sdk.models.operations.GetFileHashResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetFileHashBadRequest, GetFileHashUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetFileHashResponse res = sdk.library().getFileHash() - .url("file://C:\\Image.png&type=13") - .call(); - - // handle response - } - } - - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetMediaMetaDataBadRequest; - import dev.plexapi.sdk.models.errors.GetMediaMetaDataUnauthorized; - import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequest; - import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetMediaMetaDataBadRequest, GetMediaMetaDataUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetMediaMetaDataRequest req = GetMediaMetaDataRequest.builder() - .ratingKey("21119,21617") - .includeConcerts(true) - .includeExtras(true) - .includeOnDeck(true) - .includePopularLeaves(true) - .includePreferences(true) - .includeReviews(true) - .includeChapters(true) - .includeStations(true) - .includeExternalMedia(true) - .asyncAugmentMetadata(true) - .asyncCheckFiles(true) - .asyncRefreshAnalysis(true) - .asyncRefreshLocalMediaAgent(true) - .build(); - - GetMediaMetaDataResponse res = sdk.library().getMediaMetaData() - .request(req) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/metadata/{ratingKey}/arts"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.operations.GetMediaArtsResponse; + import dev.plexapi.sdk.models.operations.GetIdentityResponse; import java.lang.Exception; public class Application { @@ -890,11 +1891,9 @@ actions: public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) .build(); - GetMediaArtsResponse res = sdk.library().getMediaArts() - .ratingKey(16099L) + GetIdentityResponse res = sdk.general().getIdentity() .call(); if (res.object().isPresent()) { @@ -902,7 +1901,7 @@ actions: } } } - - target: $["paths"]["/library/metadata/{ratingKey}/arts"]["post"] + - target: $["paths"]["/library/all"]["get"] update: x-codeSamples: - lang: java @@ -911,7 +1910,9 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.operations.PostMediaArtsResponse; + import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest; + import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { @@ -919,651 +1920,33 @@ actions: public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - PostMediaArtsResponse res = sdk.library().postMediaArts() - .ratingKey(2268L) - .url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b") - .call(); - - } - } - - target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetBannerImageBadRequest; - import dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized; - import dev.plexapi.sdk.models.operations.GetBannerImageRequest; - import dev.plexapi.sdk.models.operations.GetBannerImageResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetBannerImageBadRequest, GetBannerImageUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetBannerImageRequest req = GetBannerImageRequest.builder() - .ratingKey(9518L) - .width(396L) - .height(396L) - .minSize(1L) - .upscale(1L) - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .build(); - - GetBannerImageResponse res = sdk.media().getBannerImage() - .request(req) - .call(); - - if (res.responseStream().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest; - import dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized; - import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetMetadataChildrenBadRequest, GetMetadataChildrenUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetMetadataChildrenResponse res = sdk.library().getMetadataChildren() - .ratingKey(2403.67) - .includeElements("Stream") - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/metadata/{ratingKey}/posters"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.operations.GetMediaPostersResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetMediaPostersResponse res = sdk.library().getMediaPosters() - .ratingKey(16099L) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/metadata/{ratingKey}/posters"]["post"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.operations.PostMediaPosterResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - PostMediaPosterResponse res = sdk.library().postMediaPoster() - .ratingKey(2268L) - .url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b") - .call(); - - } - } - - target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetThumbImageBadRequest; - import dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized; - import dev.plexapi.sdk.models.operations.GetThumbImageRequest; - import dev.plexapi.sdk.models.operations.GetThumbImageResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetThumbImageBadRequest, GetThumbImageUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetThumbImageRequest req = GetThumbImageRequest.builder() - .ratingKey(9518L) - .width(396L) - .height(396L) - .minSize(1L) - .upscale(1L) - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .build(); - - GetThumbImageResponse res = sdk.media().getThumbImage() - .request(req) - .call(); - - if (res.responseStream().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/recentlyAdded"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryBadRequest; - import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryUnauthorized; - import dev.plexapi.sdk.models.operations.*; - import java.lang.Exception; - import java.util.List; - - public class Application { - - public static void main(String[] args) throws GetRecentlyAddedLibraryBadRequest, GetRecentlyAddedLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - 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) - .build(); - - GetRecentlyAddedLibraryResponse res = sdk.library().getRecentlyAddedLibrary() - .request(req) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/search"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetSearchAllLibrariesBadRequest; - import dev.plexapi.sdk.models.errors.GetSearchAllLibrariesUnauthorized; - import dev.plexapi.sdk.models.operations.*; - import java.lang.Exception; - import java.util.List; - - public class Application { - - public static void main(String[] args) throws GetSearchAllLibrariesBadRequest, GetSearchAllLibrariesUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetSearchAllLibrariesRequest req = GetSearchAllLibrariesRequest.builder() - .query("") - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .searchTypes(List.of( - SearchTypes.PEOPLE)) - .includeCollections(GetSearchAllLibrariesQueryParamIncludeCollections.Enable) - .includeExternalMedia(GetSearchAllLibrariesQueryParamIncludeExternalMedia.Enable) - .build(); - - GetSearchAllLibrariesResponse res = sdk.library().getSearchAllLibraries() - .request(req) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/sections"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest; - import dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized; - import dev.plexapi.sdk.models.operations.GetAllLibrariesResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetAllLibrariesBadRequest, GetAllLibrariesUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetAllLibrariesResponse res = sdk.library().getAllLibraries() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/sections/watchlist/{filter}"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetWatchListBadRequest; - import dev.plexapi.sdk.models.errors.GetWatchListUnauthorized; - import dev.plexapi.sdk.models.operations.*; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetWatchListBadRequest, GetWatchListUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetWatchListRequest req = GetWatchListRequest.builder() - .filter(Filter.RELEASED) - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .build(); - - GetWatchListResponse res = sdk.watchlist().getWatchList() - .request(req) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/sections/{sectionKey}"]["delete"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest; - import dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized; - import dev.plexapi.sdk.models.operations.DeleteLibraryResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws DeleteLibraryBadRequest, DeleteLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - DeleteLibraryResponse res = sdk.library().deleteLibrary() - .sectionKey(9518) - .call(); - - // handle response - } - } - - target: $["paths"]["/library/sections/{sectionKey}"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest; - import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized; - import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse; - import dev.plexapi.sdk.models.operations.IncludeDetails; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetLibraryDetailsBadRequest, GetLibraryDetailsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetLibraryDetailsResponse res = sdk.library().getLibraryDetails() - .includeDetails(IncludeDetails.ZERO) - .sectionKey(9518) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/sections/{sectionKey}/actor"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetActorsLibraryBadRequest; - import dev.plexapi.sdk.models.errors.GetActorsLibraryUnauthorized; - import dev.plexapi.sdk.models.operations.GetActorsLibraryQueryParamType; - import dev.plexapi.sdk.models.operations.GetActorsLibraryResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetActorsLibraryBadRequest, GetActorsLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetActorsLibraryResponse res = sdk.library().getActorsLibrary() - .sectionKey(9518) - .type(GetActorsLibraryQueryParamType.TvShow) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/sections/{sectionKey}/all"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetLibrarySectionsAllBadRequest; - import dev.plexapi.sdk.models.errors.GetLibrarySectionsAllUnauthorized; - import dev.plexapi.sdk.models.operations.*; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetLibrarySectionsAllBadRequest, GetLibrarySectionsAllUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetLibrarySectionsAllRequest req = GetLibrarySectionsAllRequest.builder() - .sectionKey(9518) - .type(GetLibrarySectionsAllQueryParamType.TvShow) - .includeMeta(GetLibrarySectionsAllQueryParamIncludeMeta.Enable) - .includeGuids(QueryParamIncludeGuids.Enable) - .includeAdvanced(IncludeAdvanced.Enable) - .includeCollections(QueryParamIncludeCollections.Enable) - .includeExternalMedia(QueryParamIncludeExternalMedia.Enable) - .build(); - - GetLibrarySectionsAllResponse res = sdk.library().getLibrarySectionsAll() - .request(req) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/sections/{sectionKey}/country"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetCountriesLibraryBadRequest; - import dev.plexapi.sdk.models.errors.GetCountriesLibraryUnauthorized; - import dev.plexapi.sdk.models.operations.GetCountriesLibraryQueryParamType; - import dev.plexapi.sdk.models.operations.GetCountriesLibraryResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetCountriesLibraryBadRequest, GetCountriesLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetCountriesLibraryResponse res = sdk.library().getCountriesLibrary() - .sectionKey(9518) - .type(GetCountriesLibraryQueryParamType.TvShow) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/sections/{sectionKey}/genre"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetGenresLibraryBadRequest; - import dev.plexapi.sdk.models.errors.GetGenresLibraryUnauthorized; - import dev.plexapi.sdk.models.operations.GetGenresLibraryQueryParamType; - import dev.plexapi.sdk.models.operations.GetGenresLibraryResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetGenresLibraryBadRequest, GetGenresLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetGenresLibraryResponse res = sdk.library().getGenresLibrary() - .sectionKey(9518) - .type(GetGenresLibraryQueryParamType.TvShow) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/sections/{sectionKey}/refresh"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest; - import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized; - import dev.plexapi.sdk.models.operations.Force; - import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetRefreshLibraryMetadataBadRequest, GetRefreshLibraryMetadataUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata() - .force(Force.ZERO) - .sectionKey(9518) - .call(); - - // handle response - } - } - - target: $["paths"]["/library/sections/{sectionKey}/search"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - 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 java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetSearchLibraryBadRequest, GetSearchLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetSearchLibraryResponse res = sdk.library().getSearchLibrary() - .sectionKey(9518) - .type(GetSearchLibraryQueryParamType.TvShow) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/library/sections/{sectionKey}/{tag}"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - 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.*; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetLibraryItemsBadRequest, GetLibraryItemsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); GetLibraryItemsRequest req = GetLibraryItemsRequest.builder() - .tag(Tag.NEWEST) - .type(GetLibraryItemsQueryParamType.TvShow) - .sectionKey(9518) - .includeGuids(IncludeGuids.Enable) - .includeMeta(GetLibraryItemsQueryParamIncludeMeta.Enable) .build(); GetLibraryItemsResponse res = sdk.library().getLibraryItems() .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithMetadata().isPresent()) { // handle response } } } - - target: $["paths"]["/log"]["get"] + - target: $["paths"]["/library/caches"]["delete"] update: x-codeSamples: - lang: java @@ -1572,24 +1955,5459 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.LogLineBadRequest; - import dev.plexapi.sdk.models.errors.LogLineUnauthorized; - import dev.plexapi.sdk.models.operations.Level; - import dev.plexapi.sdk.models.operations.LogLineResponse; + import dev.plexapi.sdk.models.operations.DeleteCachesResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws LogLineBadRequest, LogLineUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - LogLineResponse res = sdk.log().logLine() - .level(Level.THREE) - .message("Test log message") - .source("Postman") + DeleteCachesResponse res = sdk.library().deleteCaches() + .call(); + + // handle response + } + } + - target: $["paths"]["/library/clean/bundles"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.CleanBundlesResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CleanBundlesResponse res = sdk.library().cleanBundles() + .call(); + + // handle response + } + } + - target: $["paths"]["/library/collections"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.CreateCollectionRequest; + import dev.plexapi.sdk.models.operations.CreateCollectionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateCollectionRequest req = CreateCollectionRequest.builder() + .sectionId("") + .build(); + + CreateCollectionResponse res = sdk.collections().createCollection() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/collections/{collectionId}/composite/{updatedAt}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetCollectionImageRequest; + import dev.plexapi.sdk.models.operations.GetCollectionImageResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCollectionImageRequest req = GetCollectionImageRequest.builder() + .collectionId(474227L) + .updatedAt(759379L) + .build(); + + GetCollectionImageResponse res = sdk.content().getCollectionImage() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/collections/{collectionId}/items"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetCollectionItemsRequest; + import dev.plexapi.sdk.models.operations.GetCollectionItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCollectionItemsRequest req = GetCollectionItemsRequest.builder() + .collectionId(314585L) + .build(); + + GetCollectionItemsResponse res = sdk.content().getCollectionItems() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/collections/{collectionId}/items"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.AddCollectionItemsRequest; + import dev.plexapi.sdk.models.operations.AddCollectionItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddCollectionItemsRequest req = AddCollectionItemsRequest.builder() + .collectionId(338144L) + .uri("https://expensive-bakeware.com") + .build(); + + AddCollectionItemsResponse res = sdk.libraryCollections().addCollectionItems() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/collections/{collectionId}/items/{itemId}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteCollectionItemRequest; + import dev.plexapi.sdk.models.operations.DeleteCollectionItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteCollectionItemRequest req = DeleteCollectionItemRequest.builder() + .collectionId(320928L) + .itemId(406983L) + .build(); + + DeleteCollectionItemResponse res = sdk.libraryCollections().deleteCollectionItem() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/collections/{collectionId}/items/{itemId}/move"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.MoveCollectionItemRequest; + import dev.plexapi.sdk.models.operations.MoveCollectionItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MoveCollectionItemRequest req = MoveCollectionItemRequest.builder() + .collectionId(239532L) + .itemId(513864L) + .build(); + + MoveCollectionItemResponse res = sdk.libraryCollections().moveCollectionItem() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/file"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.IngestTransientItemRequest; + import dev.plexapi.sdk.models.operations.IngestTransientItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + IngestTransientItemRequest req = IngestTransientItemRequest.builder() + .url("file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv") + .virtualFilePath("/Avatar.mkv") + .computeHashes(BoolInt.ONE) + .ingestNonMatches(BoolInt.ONE) + .build(); + + IngestTransientItemResponse res = sdk.library().ingestTransientItem() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/matches"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetLibraryMatchesRequest; + import dev.plexapi.sdk.models.operations.GetLibraryMatchesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetLibraryMatchesRequest req = GetLibraryMatchesRequest.builder() + .includeFullMetadata(BoolInt.ONE) + .includeAncestorMetadata(BoolInt.ONE) + .includeAlternateMetadataSources(BoolInt.ONE) + .build(); + + GetLibraryMatchesResponse res = sdk.library().getLibraryMatches() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/media/{mediaId}/chapterImages/{chapter}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetChapterImageRequest; + import dev.plexapi.sdk.models.operations.GetChapterImageResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetChapterImageRequest req = GetChapterImageRequest.builder() + .mediaId(892563L) + .chapter(48348L) + .build(); + + GetChapterImageResponse res = sdk.library().getChapterImage() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/augmentations/{augmentationId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetAugmentationStatusRequest; + import dev.plexapi.sdk.models.operations.GetAugmentationStatusResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAugmentationStatusRequest req = GetAugmentationStatusRequest.builder() + .augmentationId("") + .wait_(BoolInt.ONE) + .build(); + + GetAugmentationStatusResponse res = sdk.library().getAugmentationStatus() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteMetadataItemRequest; + import dev.plexapi.sdk.models.operations.DeleteMetadataItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteMetadataItemRequest req = DeleteMetadataItemRequest.builder() + .ids("") + .proxy(BoolInt.ONE) + .build(); + + DeleteMetadataItemResponse res = sdk.library().deleteMetadataItem() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetMetadataItemRequest; + import dev.plexapi.sdk.models.operations.GetMetadataItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetMetadataItemRequest req = GetMetadataItemRequest.builder() + .ids(List.of()) + .asyncCheckFiles(BoolInt.ONE) + .asyncRefreshLocalMediaAgent(BoolInt.ONE) + .asyncRefreshAnalysis(BoolInt.ONE) + .checkFiles(BoolInt.ONE) + .skipRefresh(BoolInt.ONE) + .checkFileAvailability(BoolInt.ONE) + .asyncAugmentMetadata(BoolInt.ONE) + .augmentCount(BoolInt.ONE) + .build(); + + GetMetadataItemResponse res = sdk.content().getMetadataItem() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.EditMetadataItemRequest; + import dev.plexapi.sdk.models.operations.EditMetadataItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EditMetadataItemRequest req = EditMetadataItemRequest.builder() + .ids(List.of( + "", + "")) + .build(); + + EditMetadataItemResponse res = sdk.library().editMetadataItem() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/addetect"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DetectAdsRequest; + import dev.plexapi.sdk.models.operations.DetectAdsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DetectAdsRequest req = DetectAdsRequest.builder() + .ids("") + .build(); + + DetectAdsResponse res = sdk.library().detectAds() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/allLeaves"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetAllItemLeavesRequest; + import dev.plexapi.sdk.models.operations.GetAllItemLeavesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAllItemLeavesRequest req = GetAllItemLeavesRequest.builder() + .ids("") + .build(); + + GetAllItemLeavesResponse res = sdk.library().getAllItemLeaves() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/analyze"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.AnalyzeMetadataRequest; + import dev.plexapi.sdk.models.operations.AnalyzeMetadataResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AnalyzeMetadataRequest req = AnalyzeMetadataRequest.builder() + .ids("") + .build(); + + AnalyzeMetadataResponse res = sdk.library().analyzeMetadata() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/chapterThumbs"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GenerateThumbsRequest; + import dev.plexapi.sdk.models.operations.GenerateThumbsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GenerateThumbsRequest req = GenerateThumbsRequest.builder() + .ids("") + .force(BoolInt.ONE) + .build(); + + GenerateThumbsResponse res = sdk.library().generateThumbs() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/credits"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DetectCreditsRequest; + import dev.plexapi.sdk.models.operations.DetectCreditsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DetectCreditsRequest req = DetectCreditsRequest.builder() + .ids("") + .force(BoolInt.ONE) + .manual(BoolInt.ONE) + .build(); + + DetectCreditsResponse res = sdk.library().detectCredits() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/extras"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetExtrasRequest; + import dev.plexapi.sdk.models.operations.GetExtrasResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetExtrasRequest req = GetExtrasRequest.builder() + .ids("") + .build(); + + GetExtrasResponse res = sdk.library().getExtras() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/extras"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.AddExtrasRequest; + import dev.plexapi.sdk.models.operations.AddExtrasResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddExtrasRequest req = AddExtrasRequest.builder() + .ids("") + .url("https://super-mortise.biz/") + .build(); + + AddExtrasResponse res = sdk.library().addExtras() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/file"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetFileRequest; + import dev.plexapi.sdk.models.operations.GetFileResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetFileRequest req = GetFileRequest.builder() + .ids("") + .build(); + + GetFileResponse res = sdk.library().getFile() + .request(req) + .call(); + + if (res.twoHundredAudioMpeg3ResponseStream().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/index"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.StartBifGenerationRequest; + import dev.plexapi.sdk.models.operations.StartBifGenerationResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StartBifGenerationRequest req = StartBifGenerationRequest.builder() + .ids("") + .force(BoolInt.ONE) + .build(); + + StartBifGenerationResponse res = sdk.library().startBifGeneration() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/intro"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DetectIntrosRequest; + import dev.plexapi.sdk.models.operations.DetectIntrosResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DetectIntrosRequest req = DetectIntrosRequest.builder() + .ids("") + .force(BoolInt.ONE) + .build(); + + DetectIntrosResponse res = sdk.library().detectIntros() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/marker"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateMarkerRequest req = CreateMarkerRequest.builder() + .ids("") + .type(248391L) + .startTimeOffset(535191L) + .attributes(Attributes.builder() + .build()) + .build(); + + CreateMarkerResponse res = sdk.library().createMarker() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteMarkerRequest; + import dev.plexapi.sdk.models.operations.DeleteMarkerResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteMarkerRequest req = DeleteMarkerRequest.builder() + .ids("") + .marker("") + .build(); + + DeleteMarkerResponse res = sdk.library().deleteMarker() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EditMarkerRequest req = EditMarkerRequest.builder() + .ids("") + .marker("") + .type(884347L) + .startTimeOffset(517251L) + .attributes(QueryParamAttributes.builder() + .build()) + .build(); + + EditMarkerResponse res = sdk.library().editMarker() + .request(req) + .call(); + + if (res.postResponses200().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/match"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.MatchItemRequest; + import dev.plexapi.sdk.models.operations.MatchItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MatchItemRequest req = MatchItemRequest.builder() + .ids("") + .build(); + + MatchItemResponse res = sdk.library().matchItem() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/matches"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListMatchesRequest; + import dev.plexapi.sdk.models.operations.ListMatchesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListMatchesRequest req = ListMatchesRequest.builder() + .ids("") + .manual(BoolInt.ONE) + .build(); + + ListMatchesResponse res = sdk.library().listMatches() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/media/{mediaItem}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteMediaItemRequest; + import dev.plexapi.sdk.models.operations.DeleteMediaItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteMediaItemRequest req = DeleteMediaItemRequest.builder() + .ids("") + .mediaItem("") + .proxy(BoolInt.ONE) + .build(); + + DeleteMediaItemResponse res = sdk.library().deleteMediaItem() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/merge"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.MergeItemsRequest; + import dev.plexapi.sdk.models.operations.MergeItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MergeItemsRequest req = MergeItemsRequest.builder() + .idsPathParameter("") + .idsQueryParameter(List.of( + "<", + "v", + "a", + "l", + "u", + "e", + ">")) + .build(); + + MergeItemsResponse res = sdk.library().mergeItems() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/nearest"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListSonicallySimilarRequest; + import dev.plexapi.sdk.models.operations.ListSonicallySimilarResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListSonicallySimilarRequest req = ListSonicallySimilarRequest.builder() + .ids("") + .build(); + + ListSonicallySimilarResponse res = sdk.library().listSonicallySimilar() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/prefs"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.SetItemPreferencesRequest; + import dev.plexapi.sdk.models.operations.SetItemPreferencesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetItemPreferencesRequest req = SetItemPreferencesRequest.builder() + .ids("") + .build(); + + SetItemPreferencesResponse res = sdk.library().setItemPreferences() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/refresh"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.RefreshItemsMetadataRequest; + import dev.plexapi.sdk.models.operations.RefreshItemsMetadataResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RefreshItemsMetadataRequest req = RefreshItemsMetadataRequest.builder() + .ids("") + .markUpdated(BoolInt.ONE) + .build(); + + RefreshItemsMetadataResponse res = sdk.library().refreshItemsMetadata() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/related"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetRelatedItemsRequest; + import dev.plexapi.sdk.models.operations.GetRelatedItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetRelatedItemsRequest req = GetRelatedItemsRequest.builder() + .ids("") + .build(); + + GetRelatedItemsResponse res = sdk.library().getRelatedItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/similar"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListSimilarRequest; + import dev.plexapi.sdk.models.operations.ListSimilarResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListSimilarRequest req = ListSimilarRequest.builder() + .ids("") + .build(); + + ListSimilarResponse res = sdk.library().listSimilar() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/split"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.SplitItemRequest; + import dev.plexapi.sdk.models.operations.SplitItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SplitItemRequest req = SplitItemRequest.builder() + .ids("") + .build(); + + SplitItemResponse res = sdk.library().splitItem() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/subtitles"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.AddSubtitlesRequest; + import dev.plexapi.sdk.models.operations.AddSubtitlesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddSubtitlesRequest req = AddSubtitlesRequest.builder() + .ids("") + .forced(BoolInt.ONE) + .hearingImpaired(BoolInt.ONE) + .build(); + + AddSubtitlesResponse res = sdk.library().addSubtitles() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/tree"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetItemTreeRequest; + import dev.plexapi.sdk.models.operations.GetItemTreeResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetItemTreeRequest req = GetItemTreeRequest.builder() + .ids("") + .build(); + + GetItemTreeResponse res = sdk.library().getItemTree() + .request(req) + .call(); + + if (res.mediaContainerWithNestedMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/unmatch"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.UnmatchRequest; + import dev.plexapi.sdk.models.operations.UnmatchResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UnmatchRequest req = UnmatchRequest.builder() + .ids("") + .build(); + + UnmatchResponse res = sdk.library().unmatch() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/users/top"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListTopUsersRequest; + import dev.plexapi.sdk.models.operations.ListTopUsersResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListTopUsersRequest req = ListTopUsersRequest.builder() + .ids("") + .build(); + + ListTopUsersResponse res = sdk.library().listTopUsers() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/metadata/{ids}/voiceActivity"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DetectVoiceActivityRequest; + import dev.plexapi.sdk.models.operations.DetectVoiceActivityResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DetectVoiceActivityRequest req = DetectVoiceActivityRequest.builder() + .ids("") + .force(BoolInt.ONE) + .manual(BoolInt.ONE) + .build(); + + DetectVoiceActivityResponse res = sdk.library().detectVoiceActivity() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/{element}"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetItemArtworkRequest req = SetItemArtworkRequest.builder() + .ids("") + .element(Element.BANNER) + .build(); + + SetItemArtworkResponse res = sdk.library().setItemArtwork() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/{element}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UpdateItemArtworkRequest req = UpdateItemArtworkRequest.builder() + .ids("") + .element(PathParamElement.CLEAR_LOGO) + .build(); + + UpdateItemArtworkResponse res = sdk.library().updateItemArtwork() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/metadata/{ids}/{element}/{timestamp}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetItemArtworkRequest req = GetItemArtworkRequest.builder() + .ids("") + .element(GetItemArtworkPathParamElement.POSTER) + .timestamp(999555L) + .build(); + + GetItemArtworkResponse res = sdk.library().getItemArtwork() + .request(req) + .call(); + + if (res.twoHundredAudioMpeg3ResponseStream().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/optimize"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.OptimizeDatabaseRequest; + import dev.plexapi.sdk.models.operations.OptimizeDatabaseResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + OptimizeDatabaseRequest req = OptimizeDatabaseRequest.builder() + .async(BoolInt.ONE) + .build(); + + OptimizeDatabaseResponse res = sdk.library().optimizeDatabase() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/parts/{partId}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.SetStreamSelectionRequest; + import dev.plexapi.sdk.models.operations.SetStreamSelectionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetStreamSelectionRequest req = SetStreamSelectionRequest.builder() + .partId(360489L) + .allParts(BoolInt.ONE) + .build(); + + SetStreamSelectionResponse res = sdk.library().setStreamSelection() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/parts/{partId}/indexes/{index}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPartIndexRequest req = GetPartIndexRequest.builder() + .partId(724750L) + .index(Index.SD) + .build(); + + GetPartIndexResponse res = sdk.library().getPartIndex() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/parts/{partId}/indexes/{index}/{offset}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetImageFromBifRequest req = GetImageFromBifRequest.builder() + .partId(304273L) + .index(PathParamIndex.SD) + .offset(939569L) + .build(); + + GetImageFromBifResponse res = sdk.library().getImageFromBif() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/parts/{partId}/{changestamp}/{filename}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetMediaPartRequest; + import dev.plexapi.sdk.models.operations.GetMediaPartResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetMediaPartRequest req = GetMediaPartRequest.builder() + .partId(877105L) + .changestamp(970622L) + .filename("example.file") + .download(BoolInt.ONE) + .build(); + + GetMediaPartResponse res = sdk.library().getMediaPart() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/people/{personId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetPersonRequest; + import dev.plexapi.sdk.models.operations.GetPersonResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPersonRequest req = GetPersonRequest.builder() + .personId("") + .build(); + + GetPersonResponse res = sdk.library().getPerson() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/people/{personId}/media"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListPersonMediaRequest; + import dev.plexapi.sdk.models.operations.ListPersonMediaResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListPersonMediaRequest req = ListPersonMediaRequest.builder() + .personId("") + .build(); + + ListPersonMediaResponse res = sdk.library().listPersonMedia() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/randomArtwork"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetRandomArtworkRequest; + import dev.plexapi.sdk.models.operations.GetRandomArtworkResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetRandomArtworkRequest req = GetRandomArtworkRequest.builder() + .sections(List.of( + 5L, + 6L)) + .build(); + + GetRandomArtworkResponse res = sdk.library().getRandomArtwork() + .request(req) + .call(); + + if (res.mediaContainerWithArtwork().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/all"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSectionsResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSectionsResponse res = sdk.library().getSections() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/all"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddSectionRequest req = AddSectionRequest.builder() + .name("") + .type(39544L) + .agent("") + .language("") + .locations(List.of( + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music")) + .prefs(QueryParamPrefs.builder() + .build()) + .relative(BoolInt.ONE) + .importFromiTunes(BoolInt.ONE) + .build(); + + AddSectionResponse res = sdk.library().addSection() + .request(req) + .call(); + + if (res.slashGetResponses200().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/all/refresh"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.StopAllRefreshesResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StopAllRefreshesResponse res = sdk.library().stopAllRefreshes() + .call(); + + if (res.requestHandlerSlashGetResponses200().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/prefs"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSectionsPrefsRequest; + import dev.plexapi.sdk.models.operations.GetSectionsPrefsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSectionsPrefsRequest req = GetSectionsPrefsRequest.builder() + .type(460221L) + .build(); + + GetSectionsPrefsResponse res = sdk.library().getSectionsPrefs() + .request(req) + .call(); + + if (res.requestHandlerSlashGetResponses200().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/refresh"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataRequest; + import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RefreshSectionsMetadataRequest req = RefreshSectionsMetadataRequest.builder() + .build(); + + RefreshSectionsMetadataResponse res = sdk.library().refreshSectionsMetadata() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteLibrarySectionRequest; + import dev.plexapi.sdk.models.operations.DeleteLibrarySectionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteLibrarySectionRequest req = DeleteLibrarySectionRequest.builder() + .sectionId("") + .async(BoolInt.ONE) + .build(); + + DeleteLibrarySectionResponse res = sdk.library().deleteLibrarySection() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetLibraryDetailsRequest; + import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetLibraryDetailsRequest req = GetLibraryDetailsRequest.builder() + .sectionId("") + .includeDetails(BoolInt.ONE) + .build(); + + GetLibraryDetailsResponse res = sdk.library().getLibraryDetails() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EditSectionRequest req = EditSectionRequest.builder() + .sectionId("") + .agent("") + .locations(List.of( + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music")) + .prefs(EditSectionQueryParamPrefs.builder() + .build()) + .build(); + + EditSectionResponse res = sdk.library().editSection() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/albums"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetAlbumsRequest; + import dev.plexapi.sdk.models.operations.GetAlbumsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAlbumsRequest req = GetAlbumsRequest.builder() + .sectionId(817133L) + .build(); + + GetAlbumsResponse res = sdk.content().getAlbums() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/all"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListContentRequest; + import dev.plexapi.sdk.models.operations.ListContentResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListContentRequest req = ListContentRequest.builder() + .sectionId("") + .build(); + + ListContentResponse res = sdk.content().listContent() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/all"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.UpdateItemsRequest; + import dev.plexapi.sdk.models.operations.UpdateItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UpdateItemsRequest req = UpdateItemsRequest.builder() + .sectionId("") + .fieldLocked(BoolInt.ONE) + .build(); + + UpdateItemsResponse res = sdk.library().updateItems() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/allLeaves"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetAllLeavesRequest; + import dev.plexapi.sdk.models.operations.GetAllLeavesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAllLeavesRequest req = GetAllLeavesRequest.builder() + .sectionId(633197L) + .build(); + + GetAllLeavesResponse res = sdk.content().getAllLeaves() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/analyze"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.StartAnalysisRequest; + import dev.plexapi.sdk.models.operations.StartAnalysisResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StartAnalysisRequest req = StartAnalysisRequest.builder() + .sectionId(158829L) + .build(); + + StartAnalysisResponse res = sdk.library().startAnalysis() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/arts"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetArtsRequest; + import dev.plexapi.sdk.models.operations.GetArtsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetArtsRequest req = GetArtsRequest.builder() + .sectionId(859200L) + .build(); + + GetArtsResponse res = sdk.content().getArts() + .request(req) + .call(); + + if (res.mediaContainerWithArtwork().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/autocomplete"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.AutocompleteRequest; + import dev.plexapi.sdk.models.operations.AutocompleteResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AutocompleteRequest req = AutocompleteRequest.builder() + .sectionId(942007L) + .build(); + + AutocompleteResponse res = sdk.library().autocomplete() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/categories"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetCategoriesRequest; + import dev.plexapi.sdk.models.operations.GetCategoriesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCategoriesRequest req = GetCategoriesRequest.builder() + .sectionId(21841L) + .build(); + + GetCategoriesResponse res = sdk.content().getCategories() + .request(req) + .call(); + + if (res.mediaContainerWithArtwork().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/cluster"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetClusterRequest; + import dev.plexapi.sdk.models.operations.GetClusterResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetClusterRequest req = GetClusterRequest.builder() + .sectionId(138560L) + .build(); + + GetClusterResponse res = sdk.content().getCluster() + .request(req) + .call(); + + if (res.mediaContainerWithArtwork().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/collection/{collectionId}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteCollectionRequest; + import dev.plexapi.sdk.models.operations.DeleteCollectionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteCollectionRequest req = DeleteCollectionRequest.builder() + .sectionId(283619L) + .collectionId(680895L) + .build(); + + DeleteCollectionResponse res = sdk.library().deleteCollection() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/collections"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetCollectionsRequest; + import dev.plexapi.sdk.models.operations.GetCollectionsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCollectionsRequest req = GetCollectionsRequest.builder() + .sectionId(348838L) + .build(); + + GetCollectionsResponse res = sdk.library().getCollections() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/common"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetCommonRequest; + import dev.plexapi.sdk.models.operations.GetCommonResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCommonRequest req = GetCommonRequest.builder() + .sectionId(298154L) + .build(); + + GetCommonResponse res = sdk.library().getCommon() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/composite/{updatedAt}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSectionImageRequest; + import dev.plexapi.sdk.models.operations.GetSectionImageResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSectionImageRequest req = GetSectionImageRequest.builder() + .sectionId(925611L) + .updatedAt(117413L) + .build(); + + GetSectionImageResponse res = sdk.library().getSectionImage() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/computePath"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSonicPathRequest; + import dev.plexapi.sdk.models.operations.GetSonicPathResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSonicPathRequest req = GetSonicPathRequest.builder() + .sectionId(914549L) + .startID(629990L) + .endID(687740L) + .build(); + + GetSonicPathResponse res = sdk.content().getSonicPath() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/emptyTrash"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.EmptyTrashRequest; + import dev.plexapi.sdk.models.operations.EmptyTrashResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EmptyTrashRequest req = EmptyTrashRequest.builder() + .sectionId(30052L) + .build(); + + EmptyTrashResponse res = sdk.library().emptyTrash() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/filters"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSectionFiltersRequest; + import dev.plexapi.sdk.models.operations.GetSectionFiltersResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSectionFiltersRequest req = GetSectionFiltersRequest.builder() + .sectionId(380557L) + .build(); + + GetSectionFiltersResponse res = sdk.library().getSectionFilters() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/firstCharacters"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetFirstCharactersRequest; + import dev.plexapi.sdk.models.operations.GetFirstCharactersResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetFirstCharactersRequest req = GetFirstCharactersRequest.builder() + .sectionId(3947L) + .build(); + + GetFirstCharactersResponse res = sdk.library().getFirstCharacters() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/indexes"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteIndexesRequest; + import dev.plexapi.sdk.models.operations.DeleteIndexesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteIndexesRequest req = DeleteIndexesRequest.builder() + .sectionId(588437L) + .build(); + + DeleteIndexesResponse res = sdk.library().deleteIndexes() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/intros"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteIntrosRequest; + import dev.plexapi.sdk.models.operations.DeleteIntrosResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteIntrosRequest req = DeleteIntrosRequest.builder() + .sectionId(498656L) + .build(); + + DeleteIntrosResponse res = sdk.library().deleteIntros() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/location"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetFoldersRequest; + import dev.plexapi.sdk.models.operations.GetFoldersResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetFoldersRequest req = GetFoldersRequest.builder() + .sectionId(892532L) + .build(); + + GetFoldersResponse res = sdk.content().getFolders() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/moment"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListMomentsRequest; + import dev.plexapi.sdk.models.operations.ListMomentsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListMomentsRequest req = ListMomentsRequest.builder() + .sectionId(403239L) + .build(); + + ListMomentsResponse res = sdk.content().listMoments() + .request(req) + .call(); + + if (res.mediaContainerWithArtwork().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/nearest"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSonicallySimilarRequest; + import dev.plexapi.sdk.models.operations.GetSonicallySimilarResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSonicallySimilarRequest req = GetSonicallySimilarRequest.builder() + .sectionId(525956L) + .values(List.of()) + .build(); + + GetSonicallySimilarResponse res = sdk.content().getSonicallySimilar() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/prefs"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSectionPreferencesRequest; + import dev.plexapi.sdk.models.operations.GetSectionPreferencesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSectionPreferencesRequest req = GetSectionPreferencesRequest.builder() + .sectionId(754869L) + .build(); + + GetSectionPreferencesResponse res = sdk.library().getSectionPreferences() + .request(req) + .call(); + + if (res.mediaContainerWithSettings().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/sections/{sectionId}/prefs"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetSectionPreferencesRequest req = SetSectionPreferencesRequest.builder() + .sectionId(349936L) + .prefs(SetSectionPreferencesQueryParamPrefs.builder() + .build()) + .build(); + + SetSectionPreferencesResponse res = sdk.library().setSectionPreferences() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/refresh"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.CancelRefreshRequest; + import dev.plexapi.sdk.models.operations.CancelRefreshResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CancelRefreshRequest req = CancelRefreshRequest.builder() + .sectionId(326852L) + .build(); + + CancelRefreshResponse res = sdk.library().cancelRefresh() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/refresh"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.RefreshSectionRequest; + import dev.plexapi.sdk.models.operations.RefreshSectionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RefreshSectionRequest req = RefreshSectionRequest.builder() + .sectionId(450300L) + .force(BoolInt.ONE) + .build(); + + RefreshSectionResponse res = sdk.library().refreshSection() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/sections/{sectionId}/sorts"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetAvailableSortsRequest; + import dev.plexapi.sdk.models.operations.GetAvailableSortsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAvailableSortsRequest req = GetAvailableSortsRequest.builder() + .sectionId(212498L) + .build(); + + GetAvailableSortsResponse res = sdk.library().getAvailableSorts() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/streams/{streamId}.{ext}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteStreamRequest; + import dev.plexapi.sdk.models.operations.DeleteStreamResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteStreamRequest req = DeleteStreamRequest.builder() + .streamId(841510L) + .ext("") + .build(); + + DeleteStreamResponse res = sdk.library().deleteStream() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/streams/{streamId}.{ext}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetStreamRequest; + import dev.plexapi.sdk.models.operations.GetStreamResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetStreamRequest req = GetStreamRequest.builder() + .streamId(314506L) + .ext("") + .autoAdjustSubtitle(BoolInt.ONE) + .build(); + + GetStreamResponse res = sdk.library().getStream() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/streams/{streamId}.{ext}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.SetStreamOffsetRequest; + import dev.plexapi.sdk.models.operations.SetStreamOffsetResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetStreamOffsetRequest req = SetStreamOffsetRequest.builder() + .streamId(606295L) + .ext("") + .build(); + + SetStreamOffsetResponse res = sdk.library().setStreamOffset() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/library/streams/{streamId}/levels"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetStreamLevelsRequest; + import dev.plexapi.sdk.models.operations.GetStreamLevelsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetStreamLevelsRequest req = GetStreamLevelsRequest.builder() + .streamId(447611L) + .build(); + + GetStreamLevelsResponse res = sdk.library().getStreamLevels() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/streams/{streamId}/loudness"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetStreamLoudnessRequest; + import dev.plexapi.sdk.models.operations.GetStreamLoudnessResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetStreamLoudnessRequest req = GetStreamLoudnessRequest.builder() + .streamId(277271L) + .build(); + + GetStreamLoudnessResponse res = sdk.library().getStreamLoudness() + .request(req) + .call(); + + if (res.res().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/library/tags"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetTagsRequest; + import dev.plexapi.sdk.models.operations.GetTagsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetTagsRequest req = GetTagsRequest.builder() + .build(); + + GetTagsResponse res = sdk.library().getTags() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/dvrs"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListDVRsResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListDVRsResponse res = sdk.dvRs().listDVRs() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/dvrs"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.CreateDVRRequest; + import dev.plexapi.sdk.models.operations.CreateDVRResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateDVRRequest req = CreateDVRRequest.builder() + .lineup("lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT") + .deviceQueryParameter(List.of( + "d", + "e", + "v", + "i", + "c", + "e", + "[", + "]", + "=", + "d", + "e", + "v", + "i", + "c", + "e", + ":", + "/", + "/", + "t", + "v", + ".", + "p", + "l", + "e", + "x", + ".", + "g", + "r", + "a", + "b", + "b", + "e", + "r", + "s", + ".", + "h", + "d", + "h", + "o", + "m", + "e", + "r", + "u", + "n", + "/", + "1", + "0", + "5", + "3", + "C", + "0", + "C", + "A")) + .language("eng") + .build(); + + CreateDVRResponse res = sdk.dvRs().createDVR() + .request(req) + .call(); + + if (res.dvrRequestHandlerSlashGetResponses200().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/dvrs/{dvrId}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteDVRRequest; + import dev.plexapi.sdk.models.operations.DeleteDVRResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteDVRRequest req = DeleteDVRRequest.builder() + .dvrId(855088L) + .build(); + + DeleteDVRResponse res = sdk.dvRs().deleteDVR() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/livetv/dvrs/{dvrId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetDVRRequest; + import dev.plexapi.sdk.models.operations.GetDVRResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDVRRequest req = GetDVRRequest.builder() + .dvrId(973518L) + .build(); + + GetDVRResponse res = sdk.dvRs().getDVR() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/dvrs/{dvrId}/channels/{channel}/tune"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.TuneChannelRequest; + import dev.plexapi.sdk.models.operations.TuneChannelResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + TuneChannelRequest req = TuneChannelRequest.builder() + .dvrId(834281L) + .channel("2.1") + .build(); + + TuneChannelResponse res = sdk.dvRs().tuneChannel() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRRequest; + import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RemoveDeviceFromDVRRequest req = RemoveDeviceFromDVRRequest.builder() + .dvrId(945416L) + .deviceId(260761L) + .build(); + + RemoveDeviceFromDVRResponse res = sdk.dvRs().removeDeviceFromDVR() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.AddDeviceToDVRRequest; + import dev.plexapi.sdk.models.operations.AddDeviceToDVRResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddDeviceToDVRRequest req = AddDeviceToDVRRequest.builder() + .dvrId(334755L) + .deviceId(852930L) + .build(); + + AddDeviceToDVRResponse res = sdk.dvRs().addDeviceToDVR() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteLineupRequest; + import dev.plexapi.sdk.models.operations.DeleteLineupResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteLineupRequest req = DeleteLineupRequest.builder() + .dvrId(454470L) + .lineup("") + .build(); + + DeleteLineupResponse res = sdk.dvRs().deleteLineup() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.AddLineupRequest; + import dev.plexapi.sdk.models.operations.AddLineupResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddLineupRequest req = AddLineupRequest.builder() + .dvrId(945235L) + .lineup("") + .build(); + + AddLineupResponse res = sdk.dvRs().addLineup() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/dvrs/{dvrId}/prefs"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.SetDVRPreferencesRequest; + import dev.plexapi.sdk.models.operations.SetDVRPreferencesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetDVRPreferencesRequest req = SetDVRPreferencesRequest.builder() + .dvrId(116357L) + .build(); + + SetDVRPreferencesResponse res = sdk.dvRs().setDVRPreferences() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.StopDVRReloadRequest; + import dev.plexapi.sdk.models.operations.StopDVRReloadResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StopDVRReloadRequest req = StopDVRReloadRequest.builder() + .dvrId(348053L) + .build(); + + StopDVRReloadResponse res = sdk.dvRs().stopDVRReload() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ReloadGuideRequest; + import dev.plexapi.sdk.models.operations.ReloadGuideResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ReloadGuideRequest req = ReloadGuideRequest.builder() + .dvrId(140753L) + .build(); + + ReloadGuideResponse res = sdk.dvRs().reloadGuide() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/livetv/epg/channelmap"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ComputeChannelMapRequest; + import dev.plexapi.sdk.models.operations.ComputeChannelMapResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ComputeChannelMapRequest req = ComputeChannelMapRequest.builder() + .deviceQueryParameter("") + .lineup("") + .build(); + + ComputeChannelMapResponse res = sdk.epg().computeChannelMap() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/epg/channels"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetChannelsRequest; + import dev.plexapi.sdk.models.operations.GetChannelsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetChannelsRequest req = GetChannelsRequest.builder() + .lineup("") + .build(); + + GetChannelsResponse res = sdk.epg().getChannels() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/epg/countries"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetCountriesResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCountriesResponse res = sdk.epg().getCountries() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/lineups"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetCountriesLineupsRequest; + import dev.plexapi.sdk.models.operations.GetCountriesLineupsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCountriesLineupsRequest req = GetCountriesLineupsRequest.builder() + .country("Malawi") + .epgId("") + .build(); + + GetCountriesLineupsResponse res = sdk.epg().getCountriesLineups() + .request(req) + .call(); + + if (res.mediaContainerWithLineup().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetCountryRegionsRequest; + import dev.plexapi.sdk.models.operations.GetCountryRegionsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCountryRegionsRequest req = GetCountryRegionsRequest.builder() + .country("Morocco") + .epgId("") + .build(); + + GetCountryRegionsResponse res = sdk.epg().getCountryRegions() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions/{region}/lineups"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListLineupsRequest; + import dev.plexapi.sdk.models.operations.ListLineupsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListLineupsRequest req = ListLineupsRequest.builder() + .country("Vanuatu") + .epgId("") + .region("") + .build(); + + ListLineupsResponse res = sdk.epg().listLineups() + .request(req) + .call(); + + if (res.mediaContainerWithLineup().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/epg/languages"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetAllLanguagesResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAllLanguagesResponse res = sdk.epg().getAllLanguages() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/epg/lineup"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetLineupRequest; + import dev.plexapi.sdk.models.operations.GetLineupResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetLineupRequest req = GetLineupRequest.builder() + .deviceQueryParameter("") + .lineupGroup("") + .build(); + + GetLineupResponse res = sdk.epg().getLineup() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/livetv/epg/lineupchannels"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetLineupChannelsRequest; + import dev.plexapi.sdk.models.operations.GetLineupChannelsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetLineupChannelsRequest req = GetLineupChannelsRequest.builder() + .lineup(List.of( + "", + "")) + .build(); + + GetLineupChannelsResponse res = sdk.epg().getLineupChannels() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/sessions"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSessionsResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSessionsResponse res = sdk.liveTV().getSessions() + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/sessions/{sessionId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetLiveTVSessionRequest; + import dev.plexapi.sdk.models.operations.GetLiveTVSessionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetLiveTVSessionRequest req = GetLiveTVSessionRequest.builder() + .sessionId("") + .build(); + + GetLiveTVSessionResponse res = sdk.liveTV().getLiveTVSession() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/index.m3u8"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexRequest; + import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSessionPlaylistIndexRequest req = GetSessionPlaylistIndexRequest.builder() + .sessionId("") + .consumerId("") + .build(); + + GetSessionPlaylistIndexResponse res = sdk.liveTV().getSessionPlaylistIndex() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/{segmentId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSessionSegmentRequest; + import dev.plexapi.sdk.models.operations.GetSessionSegmentResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSessionSegmentRequest req = GetSessionSegmentRequest.builder() + .sessionId("") + .consumerId("") + .segmentId("") + .build(); + + GetSessionSegmentResponse res = sdk.liveTV().getSessionSegment() + .request(req) .call(); // handle response @@ -1604,30 +7422,28 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.LogMultiLineBadRequest; - import dev.plexapi.sdk.models.errors.LogMultiLineUnauthorized; - import dev.plexapi.sdk.models.operations.LogMultiLineResponse; + import dev.plexapi.sdk.models.operations.WriteLogResponse; + import dev.plexapi.sdk.utils.Utils; + import java.io.FileInputStream; import java.lang.Exception; - import java.lang.String; public class Application { - public static void main(String[] args) throws LogMultiLineBadRequest, LogMultiLineUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman"; + byte[] req = Utils.readBytesAndClose(new FileInputStream("example.file")); - LogMultiLineResponse res = sdk.log().logMultiLine() + WriteLogResponse res = sdk.log().writeLog() .request(req) .call(); - // handle response } } - - target: $["paths"]["/log/networked"]["get"] + - target: $["paths"]["/log"]["put"] update: x-codeSamples: - lang: java @@ -1636,20 +7452,703 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest; - import dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized; - import dev.plexapi.sdk.models.operations.EnablePaperTrailResponse; + import dev.plexapi.sdk.models.operations.WriteMessageRequest; + import dev.plexapi.sdk.models.operations.WriteMessageResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws EnablePaperTrailBadRequest, EnablePaperTrailUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - EnablePaperTrailResponse res = sdk.log().enablePaperTrail() + WriteMessageRequest req = WriteMessageRequest.builder() + .build(); + + WriteMessageResponse res = sdk.log().writeMessage() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/log/networked"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.EnablePapertrailRequest; + import dev.plexapi.sdk.models.operations.EnablePapertrailResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EnablePapertrailRequest req = EnablePapertrailRequest.builder() + .build(); + + EnablePapertrailResponse res = sdk.log().enablePapertrail() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/media/grabbers"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetAvailableGrabbersRequest; + import dev.plexapi.sdk.models.operations.GetAvailableGrabbersResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAvailableGrabbersRequest req = GetAvailableGrabbersRequest.builder() + .protocol("livetv") + .build(); + + GetAvailableGrabbersResponse res = sdk.devices().getAvailableGrabbers() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ListDevicesResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListDevicesResponse res = sdk.devices().listDevices() + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.AddDeviceRequest; + import dev.plexapi.sdk.models.operations.AddDeviceResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddDeviceRequest req = AddDeviceRequest.builder() + .uri("http://10.0.0.5") + .build(); + + AddDeviceResponse res = sdk.devices().addDevice() + .request(req) + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices/discover"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DiscoverDevicesResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DiscoverDevicesResponse res = sdk.devices().discoverDevices() + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices/{deviceId}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.RemoveDeviceRequest; + import dev.plexapi.sdk.models.operations.RemoveDeviceResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RemoveDeviceRequest req = RemoveDeviceRequest.builder() + .deviceId(685908L) + .build(); + + RemoveDeviceResponse res = sdk.devices().removeDevice() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices/{deviceId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetDeviceDetailsRequest; + import dev.plexapi.sdk.models.operations.GetDeviceDetailsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDeviceDetailsRequest req = GetDeviceDetailsRequest.builder() + .deviceId(170949L) + .build(); + + GetDeviceDetailsResponse res = sdk.devices().getDeviceDetails() + .request(req) + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices/{deviceId}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ModifyDeviceRequest; + import dev.plexapi.sdk.models.operations.ModifyDeviceResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ModifyDeviceRequest req = ModifyDeviceRequest.builder() + .deviceId(879135L) + .enabled(BoolInt.ONE) + .build(); + + ModifyDeviceResponse res = sdk.devices().modifyDevice() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices/{deviceId}/channelmap"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + import java.util.List; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetChannelmapRequest req = SetChannelmapRequest.builder() + .deviceId(937661L) + .channelMapping(ChannelMapping.builder() + .build()) + .channelMappingByKey(ChannelMappingByKey.builder() + .build()) + .channelsEnabled(List.of( + "4", + "6", + ".", + "1", + ",", + "4", + "4", + ".", + "1", + ",", + "4", + "5", + ".", + "1")) + .build(); + + SetChannelmapResponse res = sdk.devices().setChannelmap() + .request(req) + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices/{deviceId}/channels"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetDevicesChannelsRequest; + import dev.plexapi.sdk.models.operations.GetDevicesChannelsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDevicesChannelsRequest req = GetDevicesChannelsRequest.builder() + .deviceId(517209L) + .build(); + + GetDevicesChannelsResponse res = sdk.devices().getDevicesChannels() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices/{deviceId}/prefs"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.SetDevicePreferencesRequest; + import dev.plexapi.sdk.models.operations.SetDevicePreferencesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetDevicePreferencesRequest req = SetDevicePreferencesRequest.builder() + .deviceId(420973L) + .build(); + + SetDevicePreferencesResponse res = sdk.devices().setDevicePreferences() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.StopScanRequest; + import dev.plexapi.sdk.models.operations.StopScanResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StopScanRequest req = StopScanRequest.builder() + .deviceId(576494L) + .build(); + + StopScanResponse res = sdk.devices().stopScan() + .request(req) + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ScanRequest; + import dev.plexapi.sdk.models.operations.ScanResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ScanRequest req = ScanRequest.builder() + .deviceId(57391L) + .source("Cable") + .build(); + + ScanResponse res = sdk.devices().scan() + .request(req) + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/grabbers/devices/{deviceId}/thumb/{version}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetThumbRequest; + import dev.plexapi.sdk.models.operations.GetThumbResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetThumbRequest req = GetThumbRequest.builder() + .deviceId(960617L) + .versionPathParameter(1025L) + .build(); + + GetThumbResponse res = sdk.devices().getThumb() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/media/grabbers/operations/{operationId}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.CancelGrabRequest; + import dev.plexapi.sdk.models.operations.CancelGrabResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CancelGrabRequest req = CancelGrabRequest.builder() + .operationId("") + .build(); + + CancelGrabResponse res = sdk.subscriptions().cancelGrab() + .request(req) .call(); // handle response @@ -1664,21 +8163,18 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest; - import dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized; - import dev.plexapi.sdk.models.operations.GetMediaProvidersResponse; + import dev.plexapi.sdk.models.operations.ListProvidersResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetMediaProvidersBadRequest, GetMediaProvidersUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetMediaProvidersResponse res = sdk.server().getMediaProviders() - .xPlexToken("CV5xoxjTpFKUzBTShsaf") + ListProvidersResponse res = sdk.provider().listProviders() .call(); if (res.object().isPresent()) { @@ -1686,7 +8182,7 @@ actions: } } } - - target: $["paths"]["/myplex/account"]["get"] + - target: $["paths"]["/media/providers"]["post"] update: x-codeSamples: - lang: java @@ -1695,20 +8191,205 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest; - import dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized; - import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponse; + import dev.plexapi.sdk.models.operations.AddProviderRequest; + import dev.plexapi.sdk.models.operations.AddProviderResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetMyPlexAccountBadRequest, GetMyPlexAccountUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount() + AddProviderRequest req = AddProviderRequest.builder() + .url("https://steep-obedience.name/") + .build(); + + AddProviderResponse res = sdk.provider().addProvider() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/media/providers/refresh"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.RefreshProvidersResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RefreshProvidersResponse res = sdk.provider().refreshProviders() + .call(); + + // handle response + } + } + - target: $["paths"]["/media/providers/{provider}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteMediaProviderRequest; + import dev.plexapi.sdk.models.operations.DeleteMediaProviderResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteMediaProviderRequest req = DeleteMediaProviderRequest.builder() + .provider("") + .build(); + + DeleteMediaProviderResponse res = sdk.provider().deleteMediaProvider() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/media/subscriptions"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetAllSubscriptionsRequest; + import dev.plexapi.sdk.models.operations.GetAllSubscriptionsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAllSubscriptionsRequest req = GetAllSubscriptionsRequest.builder() + .includeGrabs(BoolInt.ONE) + .includeStorage(BoolInt.ONE) + .build(); + + GetAllSubscriptionsResponse res = sdk.subscriptions().getAllSubscriptions() + .request(req) + .call(); + + if (res.mediaContainerWithSubscription().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/subscriptions"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateSubscriptionRequest req = CreateSubscriptionRequest.builder() + .targetLibrarySectionID(1L) + .targetSectionLocationID(3L) + .type(2L) + .hints(Hints.builder() + .build()) + .prefs(CreateSubscriptionQueryParamPrefs.builder() + .build()) + .params(Params.builder() + .build()) + .build(); + + CreateSubscriptionResponse res = sdk.subscriptions().createSubscription() + .request(req) .call(); if (res.object().isPresent()) { @@ -1716,6 +8397,292 @@ actions: } } } + - target: $["paths"]["/media/subscriptions/process"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ProcessSubscriptionsResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ProcessSubscriptionsResponse res = sdk.subscriptions().processSubscriptions() + .call(); + + // handle response + } + } + - target: $["paths"]["/media/subscriptions/scheduled"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetScheduledRecordingsResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetScheduledRecordingsResponse res = sdk.subscriptions().getScheduledRecordings() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/subscriptions/template"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetTemplateRequest; + import dev.plexapi.sdk.models.operations.GetTemplateResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetTemplateRequest req = GetTemplateRequest.builder() + .guid("plex://episode/5fc70265c40548002d539d23") + .build(); + + GetTemplateResponse res = sdk.subscriptions().getTemplate() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/subscriptions/{subscriptionId}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeleteSubscriptionRequest; + import dev.plexapi.sdk.models.operations.DeleteSubscriptionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteSubscriptionRequest req = DeleteSubscriptionRequest.builder() + .subscriptionId(974618L) + .build(); + + DeleteSubscriptionResponse res = sdk.subscriptions().deleteSubscription() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/media/subscriptions/{subscriptionId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetSubscriptionRequest; + import dev.plexapi.sdk.models.operations.GetSubscriptionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSubscriptionRequest req = GetSubscriptionRequest.builder() + .subscriptionId(186713L) + .includeGrabs(BoolInt.ONE) + .includeStorage(BoolInt.ONE) + .build(); + + GetSubscriptionResponse res = sdk.subscriptions().getSubscription() + .request(req) + .call(); + + if (res.mediaContainerWithSubscription().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/subscriptions/{subscriptionId}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EditSubscriptionPreferencesRequest req = EditSubscriptionPreferencesRequest.builder() + .subscriptionId(673918L) + .prefs(EditSubscriptionPreferencesQueryParamPrefs.builder() + .build()) + .build(); + + EditSubscriptionPreferencesResponse res = sdk.subscriptions().editSubscriptionPreferences() + .request(req) + .call(); + + if (res.mediaContainerWithSubscription().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/media/subscriptions/{subscriptionId}/move"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ReorderSubscriptionRequest; + import dev.plexapi.sdk.models.operations.ReorderSubscriptionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ReorderSubscriptionRequest req = ReorderSubscriptionRequest.builder() + .subscriptionId(440634L) + .build(); + + ReorderSubscriptionResponse res = sdk.subscriptions().reorderSubscription() + .request(req) + .call(); + + if (res.mediaContainerWithSubscription().isPresent()) { + // handle response + } + } + } - target: $["paths"]["/photo/:/transcode"]["get"] update: x-codeSamples: @@ -1725,75 +8692,50 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest; - import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized; - import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.operations.TranscodeImageRequest; + import dev.plexapi.sdk.models.operations.TranscodeImageResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetResizedPhotoBadRequest, GetResizedPhotoUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetResizedPhotoRequest req = GetResizedPhotoRequest.builder() - .width(110d) - .height(165d) - .opacity(100L) - .blur(0d) - .minSize(MinSize.ZERO) - .upscale(Upscale.ZERO) - .url("/library/metadata/49564/thumb/1654258204") - .build(); - - GetResizedPhotoResponse res = sdk.server().getResizedPhoto() - .request(req) - .call(); - - // handle response - } - } - - target: $["paths"]["/pins"]["post"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetPinBadRequest; - import dev.plexapi.sdk.models.operations.GetPinRequest; - import dev.plexapi.sdk.models.operations.GetPinResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetPinBadRequest, Exception { - - PlexAPI sdk = PlexAPI.builder() - .build(); - - GetPinRequest req = GetPinRequest.builder() - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .clientName("Plex for Roku") - .deviceNickname("Roku 3") - .clientVersion("2.4.1") + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + TranscodeImageRequest req = TranscodeImageRequest.builder() + .url("/library/metadata/265/thumb/1715112705") + .background("#ff5522") + .upscale(BoolInt.ONE) + .minSize(BoolInt.ONE) + .rotate(BoolInt.ONE) + .blendColor("#ff5522") .build(); - GetPinResponse res = sdk.plex().getPin() + TranscodeImageResponse res = sdk.transcoder().transcodeImage() .request(req) .call(); - if (res.authPinContainer().isPresent()) { + if (res.twoHundredImageJpegResponseStream().isPresent()) { // handle response } } } - - target: $["paths"]["/pins/{pinID}"]["get"] + - target: $["paths"]["/playQueues"]["post"] update: x-codeSamples: - lang: java @@ -1802,33 +8744,420 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest; - import dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody; - import dev.plexapi.sdk.models.operations.GetTokenByPinIdRequest; - import dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetTokenByPinIdBadRequest, GetTokenByPinIdResponseBody, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetTokenByPinIdRequest req = GetTokenByPinIdRequest.builder() - .pinID(232248L) - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .clientName("Plex for Roku") - .deviceNickname("Roku 3") - .clientVersion("2.4.1") - .platform("Roku") + CreatePlayQueueRequest req = CreatePlayQueueRequest.builder() + .type(Type.AUDIO) + .shuffle(BoolInt.ONE) + .repeat(BoolInt.ONE) + .continuous(BoolInt.ONE) + .recursive(BoolInt.ONE) + .onDeck(BoolInt.ONE) .build(); - GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId() + CreatePlayQueueResponse res = sdk.playQueue().createPlayQueue() .request(req) .call(); - if (res.authPinContainer().isPresent()) { + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playQueues/{playQueueId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetPlayQueueRequest; + import dev.plexapi.sdk.models.operations.GetPlayQueueResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPlayQueueRequest req = GetPlayQueueRequest.builder() + .playQueueId(210646L) + .own(BoolInt.ONE) + .includeBefore(BoolInt.ONE) + .includeAfter(BoolInt.ONE) + .build(); + + GetPlayQueueResponse res = sdk.playQueue().getPlayQueue() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playQueues/{playQueueId}"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.AddToPlayQueueRequest; + import dev.plexapi.sdk.models.operations.AddToPlayQueueResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddToPlayQueueRequest req = AddToPlayQueueRequest.builder() + .playQueueId(919248L) + .next(BoolInt.ONE) + .build(); + + AddToPlayQueueResponse res = sdk.playQueue().addToPlayQueue() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playQueues/{playQueueId}/items"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ClearPlayQueueRequest; + import dev.plexapi.sdk.models.operations.ClearPlayQueueResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ClearPlayQueueRequest req = ClearPlayQueueRequest.builder() + .playQueueId(86357L) + .build(); + + ClearPlayQueueResponse res = sdk.playQueue().clearPlayQueue() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeletePlayQueueItemRequest; + import dev.plexapi.sdk.models.operations.DeletePlayQueueItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeletePlayQueueItemRequest req = DeletePlayQueueItemRequest.builder() + .playQueueId(285738L) + .playQueueItemId(464354L) + .build(); + + DeletePlayQueueItemResponse res = sdk.playQueue().deletePlayQueueItem() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}/move"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.MovePlayQueueItemRequest; + import dev.plexapi.sdk.models.operations.MovePlayQueueItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MovePlayQueueItemRequest req = MovePlayQueueItemRequest.builder() + .playQueueId(31341L) + .playQueueItemId(495865L) + .build(); + + MovePlayQueueItemResponse res = sdk.playQueue().movePlayQueueItem() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playQueues/{playQueueId}/reset"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ResetPlayQueueRequest; + import dev.plexapi.sdk.models.operations.ResetPlayQueueResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ResetPlayQueueRequest req = ResetPlayQueueRequest.builder() + .playQueueId(581891L) + .build(); + + ResetPlayQueueResponse res = sdk.playQueue().resetPlayQueue() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playQueues/{playQueueId}/shuffle"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.ShuffleRequest; + import dev.plexapi.sdk.models.operations.ShuffleResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ShuffleRequest req = ShuffleRequest.builder() + .playQueueId(316150L) + .build(); + + ShuffleResponse res = sdk.playQueue().shuffle() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playQueues/{playQueueId}/unshuffle"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.UnshuffleRequest; + import dev.plexapi.sdk.models.operations.UnshuffleResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UnshuffleRequest req = UnshuffleRequest.builder() + .playQueueId(484388L) + .build(); + + UnshuffleResponse res = sdk.playQueue().unshuffle() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { // handle response } } @@ -1842,23 +9171,38 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest; - import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized; - import dev.plexapi.sdk.models.operations.GetPlaylistsResponse; + import dev.plexapi.sdk.models.operations.ListPlaylistsRequest; + import dev.plexapi.sdk.models.operations.ListPlaylistsResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetPlaylistsBadRequest, GetPlaylistsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetPlaylistsResponse res = sdk.playlists().getPlaylists() + ListPlaylistsRequest req = ListPlaylistsRequest.builder() + .build(); + + ListPlaylistsResponse res = sdk.playlist().listPlaylists() + .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { // handle response } } @@ -1872,31 +9216,38 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest; - import dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized; - import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.operations.CreatePlaylistRequest; + import dev.plexapi.sdk.models.operations.CreatePlaylistResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws CreatePlaylistBadRequest, CreatePlaylistUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); CreatePlaylistRequest req = CreatePlaylistRequest.builder() - .title("") - .type(CreatePlaylistQueryParamType.AUDIO) - .smart(Smart.ONE) - .uri("https://short-term-disconnection.name/") .build(); - CreatePlaylistResponse res = sdk.playlists().createPlaylist() + CreatePlaylistResponse res = sdk.libraryPlaylists().createPlaylist() .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { // handle response } } @@ -1910,30 +9261,44 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.UploadPlaylistBadRequest; - import dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized; - import dev.plexapi.sdk.models.operations.QueryParamForce; + import dev.plexapi.sdk.models.operations.UploadPlaylistRequest; import dev.plexapi.sdk.models.operations.UploadPlaylistResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws UploadPlaylistBadRequest, UploadPlaylistUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - UploadPlaylistResponse res = sdk.playlists().uploadPlaylist() + UploadPlaylistRequest req = UploadPlaylistRequest.builder() .path("/home/barkley/playlist.m3u") - .force(QueryParamForce.ONE) - .sectionID(1L) + .force(BoolInt.ONE) + .build(); + + UploadPlaylistResponse res = sdk.libraryPlaylists().uploadPlaylist() + .request(req) .call(); // handle response } } - - target: $["paths"]["/playlists/{playlistID}"]["delete"] + - target: $["paths"]["/playlists/{playlistId}"]["delete"] update: x-codeSamples: - lang: java @@ -1942,27 +9307,42 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.DeletePlaylistBadRequest; - import dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized; + import dev.plexapi.sdk.models.operations.DeletePlaylistRequest; import dev.plexapi.sdk.models.operations.DeletePlaylistResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws DeletePlaylistBadRequest, DeletePlaylistUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - DeletePlaylistResponse res = sdk.playlists().deletePlaylist() - .playlistID(3432.93) + DeletePlaylistRequest req = DeletePlaylistRequest.builder() + .playlistId(343293L) + .build(); + + DeletePlaylistResponse res = sdk.libraryPlaylists().deletePlaylist() + .request(req) .call(); // handle response } } - - target: $["paths"]["/playlists/{playlistID}"]["get"] + - target: $["paths"]["/playlists/{playlistId}"]["get"] update: x-codeSamples: - lang: java @@ -1971,29 +9351,44 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetPlaylistBadRequest; - import dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized; + import dev.plexapi.sdk.models.operations.GetPlaylistRequest; import dev.plexapi.sdk.models.operations.GetPlaylistResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetPlaylistBadRequest, GetPlaylistUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetPlaylistResponse res = sdk.playlists().getPlaylist() - .playlistID(8419.53) + GetPlaylistRequest req = GetPlaylistRequest.builder() + .playlistId(841953L) + .build(); + + GetPlaylistResponse res = sdk.playlist().getPlaylist() + .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { // handle response } } } - - target: $["paths"]["/playlists/{playlistID}"]["put"] + - target: $["paths"]["/playlists/{playlistId}"]["put"] update: x-codeSamples: - lang: java @@ -2002,27 +9397,42 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.UpdatePlaylistBadRequest; - import dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized; + import dev.plexapi.sdk.models.operations.UpdatePlaylistRequest; import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws UpdatePlaylistBadRequest, UpdatePlaylistUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - UpdatePlaylistResponse res = sdk.playlists().updatePlaylist() - .playlistID(1579.66) + UpdatePlaylistRequest req = UpdatePlaylistRequest.builder() + .playlistId(157966L) + .build(); + + UpdatePlaylistResponse res = sdk.libraryPlaylists().updatePlaylist() + .request(req) .call(); // handle response } } - - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] + - target: $["paths"]["/playlists/{playlistId}/generators"]["get"] update: x-codeSamples: - lang: java @@ -2031,52 +9441,36 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.ClearPlaylistContentsBadRequest; - import dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized; - import dev.plexapi.sdk.models.operations.ClearPlaylistContentsResponse; + import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsRequest; + import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws ClearPlaylistContentsBadRequest, ClearPlaylistContentsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents() - .playlistID(4137.37) - .call(); + GetPlaylistGeneratorsRequest req = GetPlaylistGeneratorsRequest.builder() + .playlistId(162342L) + .build(); - // handle response - } - } - - target: $["paths"]["/playlists/{playlistID}/items"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetPlaylistContentsBadRequest; - import dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized; - import dev.plexapi.sdk.models.operations.GetPlaylistContentsQueryParamType; - import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetPlaylistContentsBadRequest, GetPlaylistContentsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents() - .playlistID(5535.42) - .type(GetPlaylistContentsQueryParamType.TvShow) + GetPlaylistGeneratorsResponse res = sdk.libraryPlaylists().getPlaylistGenerators() + .request(req) .call(); if (res.object().isPresent()) { @@ -2084,7 +9478,7 @@ actions: } } } - - target: $["paths"]["/playlists/{playlistID}/items"]["put"] + - target: $["paths"]["/playlists/{playlistId}/items"]["delete"] update: x-codeSamples: - lang: java @@ -2093,23 +9487,222 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.AddPlaylistContentsBadRequest; - import dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized; - import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse; + import dev.plexapi.sdk.models.operations.ClearPlaylistItemsRequest; + import dev.plexapi.sdk.models.operations.ClearPlaylistItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws AddPlaylistContentsBadRequest, AddPlaylistContentsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents() - .playlistID(7013.44) - .uri("server://12345/com.plexapp.plugins.library/library/metadata/1") - .playQueueID(123d) + ClearPlaylistItemsRequest req = ClearPlaylistItemsRequest.builder() + .playlistId(552140L) + .build(); + + ClearPlaylistItemsResponse res = sdk.libraryPlaylists().clearPlaylistItems() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playlists/{playlistId}/items"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetPlaylistItemsRequest; + import dev.plexapi.sdk.models.operations.GetPlaylistItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPlaylistItemsRequest req = GetPlaylistItemsRequest.builder() + .playlistId(118195L) + .build(); + + GetPlaylistItemsResponse res = sdk.playlist().getPlaylistItems() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playlists/{playlistId}/items"]["put"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.AddPlaylistItemsRequest; + import dev.plexapi.sdk.models.operations.AddPlaylistItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddPlaylistItemsRequest req = AddPlaylistItemsRequest.builder() + .playlistId(533723L) + .build(); + + AddPlaylistItemsResponse res = sdk.libraryPlaylists().addPlaylistItems() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["delete"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.DeletePlaylistItemRequest; + import dev.plexapi.sdk.models.operations.DeletePlaylistItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeletePlaylistItemRequest req = DeletePlaylistItemRequest.builder() + .playlistId(981646L) + .generatorId(194010L) + .build(); + + DeletePlaylistItemResponse res = sdk.libraryPlaylists().deletePlaylistItem() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorRequest; + import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPlaylistGeneratorRequest req = GetPlaylistGeneratorRequest.builder() + .playlistId(744880L) + .generatorId(322168L) + .build(); + + GetPlaylistGeneratorResponse res = sdk.libraryPlaylists().getPlaylistGenerator() + .request(req) .call(); if (res.object().isPresent()) { @@ -2117,7 +9710,54 @@ actions: } } } - - target: $["paths"]["/resources"]["get"] + - target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/items"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsRequest; + import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPlaylistGeneratorItemsRequest req = GetPlaylistGeneratorItemsRequest.builder() + .playlistId(77230L) + .generatorId(979714L) + .build(); + + GetPlaylistGeneratorItemsResponse res = sdk.libraryPlaylists().getPlaylistGeneratorItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/{metadataId}/{action}"]["put"] update: x-codeSamples: - lang: java @@ -2126,32 +9766,44 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest; - import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized; import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerResourcesBadRequest, GetServerResourcesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetServerResourcesResponse res = sdk.plex().getServerResources() - .includeHttps(IncludeHttps.Enable) - .includeRelay(IncludeRelay.Enable) - .includeIPv6(IncludeIPv6.Enable) - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") + RefreshPlaylistRequest req = RefreshPlaylistRequest.builder() + .playlistId(895314L) + .generatorId(629742L) + .metadataId(724422L) + .action(Action.DISABLE) + .build(); + + RefreshPlaylistResponse res = sdk.libraryPlaylists().refreshPlaylist() + .request(req) .call(); - if (res.plexDevices().isPresent()) { - // handle response - } + // handle response } } - - target: $["paths"]["/search"]["get"] + - target: $["paths"]["/playlists/{playlistId}/items/{playlistItemId}/move"]["put"] update: x-codeSamples: - lang: java @@ -2160,24 +9812,40 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest; - import dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized; - import dev.plexapi.sdk.models.operations.GetSearchResultsResponse; + import dev.plexapi.sdk.models.operations.MovePlaylistItemRequest; + import dev.plexapi.sdk.models.operations.MovePlaylistItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetSearchResultsBadRequest, GetSearchResultsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetSearchResultsResponse res = sdk.search().getSearchResults() - .query("110") + MovePlaylistItemRequest req = MovePlaylistItemRequest.builder() + .playlistId(940298L) + .playlistItemId(375626L) + .build(); + + MovePlaylistItemResponse res = sdk.libraryPlaylists().movePlaylistItem() + .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { // handle response } } @@ -2191,27 +9859,46 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationBadRequest; - import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized; + import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequest; import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetSourceConnectionInformationBadRequest, GetSourceConnectionInformationUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation() - .source("server://client-identifier") + GetSourceConnectionInformationRequest req = GetSourceConnectionInformationRequest.builder() + .source("") + .refresh(BoolInt.ONE) + .build(); + + GetSourceConnectionInformationResponse res = sdk.general().getSourceConnectionInformation() + .request(req) .call(); - // handle response + if (res.object().isPresent()) { + // handle response + } } } - - target: $["paths"]["/security/token"]["get"] + - target: $["paths"]["/security/token"]["post"] update: x-codeSamples: - lang: java @@ -2220,50 +9907,36 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest; - import dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized; import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetTransientTokenBadRequest, GetTransientTokenUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetTransientTokenResponse res = sdk.authentication().getTransientToken() - .type(GetTransientTokenQueryParamType.DELEGATION) + GetTransientTokenRequest req = GetTransientTokenRequest.builder() + .type(QueryParamType.DELEGATION) .scope(Scope.ALL) - .call(); + .build(); - // handle response - } - } - - target: $["paths"]["/servers"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetServerListBadRequest; - import dev.plexapi.sdk.models.errors.GetServerListUnauthorized; - import dev.plexapi.sdk.models.operations.GetServerListResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetServerListBadRequest, GetServerListUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetServerListResponse res = sdk.server().getServerList() + GetTransientTokenResponse res = sdk.general().getTransientToken() + .request(req) .call(); if (res.object().isPresent()) { @@ -2271,7 +9944,7 @@ actions: } } } - - target: $["paths"]["/statistics/bandwidth"]["get"] + - target: $["paths"]["/services/ultrablur/colors"]["get"] update: x-codeSamples: - lang: java @@ -2280,21 +9953,36 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest; - import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized; - import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponse; + import dev.plexapi.sdk.models.operations.GetColorsRequest; + import dev.plexapi.sdk.models.operations.GetColorsResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetBandwidthStatisticsBadRequest, GetBandwidthStatisticsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics() - .timespan(4L) + GetColorsRequest req = GetColorsRequest.builder() + .url("/library/metadata/217745/art/1718931408") + .build(); + + GetColorsResponse res = sdk.ultraBlur().getColors() + .request(req) .call(); if (res.object().isPresent()) { @@ -2302,7 +9990,7 @@ actions: } } } - - target: $["paths"]["/statistics/media"]["get"] + - target: $["paths"]["/services/ultrablur/image"]["get"] update: x-codeSamples: - lang: java @@ -2311,55 +9999,46 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetStatisticsBadRequest; - import dev.plexapi.sdk.models.errors.GetStatisticsUnauthorized; - import dev.plexapi.sdk.models.operations.GetStatisticsResponse; + import dev.plexapi.sdk.models.operations.GetImageRequest; + import dev.plexapi.sdk.models.operations.GetImageResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetStatisticsBadRequest, GetStatisticsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetStatisticsResponse res = sdk.statistics().getStatistics() - .timespan(4L) + GetImageRequest req = GetImageRequest.builder() + .topLeft("3f280a") + .topRight("6b4713") + .bottomRight("0f2a43") + .bottomLeft("1c425d") + .width(1920L) + .height(1080L) + .noise(BoolInt.ONE) + .build(); + + GetImageResponse res = sdk.ultraBlur().getImage() + .request(req) .call(); - if (res.object().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/statistics/resources"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest; - import dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized; - import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetResourcesStatisticsBadRequest, GetResourcesStatisticsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics() - .timespan(4L) - .call(); - - if (res.object().isPresent()) { + if (res.responseStream().isPresent()) { // handle response } } @@ -2373,20 +10052,46 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetSessionsBadRequest; - import dev.plexapi.sdk.models.errors.GetSessionsUnauthorized; - import dev.plexapi.sdk.models.operations.GetSessionsResponse; + import dev.plexapi.sdk.models.operations.ListSessionsResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetSessionsBadRequest, GetSessionsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetSessionsResponse res = sdk.sessions().getSessions() + ListSessionsResponse res = sdk.status().listSessions() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/status/sessions/background"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.GetBackgroundTasksResponse; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetBackgroundTasksResponse res = sdk.status().getBackgroundTasks() .call(); if (res.object().isPresent()) { @@ -2403,26 +10108,60 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetSessionHistoryBadRequest; - import dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized; - import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse; - import dev.plexapi.sdk.models.operations.QueryParamFilter; + import dev.plexapi.sdk.models.operations.ListPlaybackHistoryRequest; + import dev.plexapi.sdk.models.operations.ListPlaybackHistoryResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; + import java.util.List; public class Application { - public static void main(String[] args) throws GetSessionHistoryBadRequest, GetSessionHistoryUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() - .sort("viewedAt:desc") - .accountId(1L) - .filter(QueryParamFilter.builder() - .build()) - .librarySectionID(12L) + ListPlaybackHistoryRequest req = ListPlaybackHistoryRequest.builder() + .sort(List.of( + "v", + "i", + "e", + "w", + "e", + "d", + "A", + "t", + ":", + "d", + "e", + "s", + "c", + ",", + "a", + "c", + "c", + "o", + "u", + "n", + "t", + "I", + "D")) + .build(); + + ListPlaybackHistoryResponse res = sdk.status().listPlaybackHistory() + .request(req) .call(); if (res.object().isPresent()) { @@ -2430,7 +10169,7 @@ actions: } } } - - target: $["paths"]["/transcode/sessions"]["get"] + - target: $["paths"]["/status/sessions/history/{historyId}"]["delete"] update: x-codeSamples: - lang: java @@ -2439,28 +10178,44 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetTranscodeSessionsBadRequest; - import dev.plexapi.sdk.models.errors.GetTranscodeSessionsUnauthorized; - import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponse; + import dev.plexapi.sdk.models.operations.DeleteHistoryRequest; + import dev.plexapi.sdk.models.operations.DeleteHistoryResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetTranscodeSessionsBadRequest, GetTranscodeSessionsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions() + DeleteHistoryRequest req = DeleteHistoryRequest.builder() + .historyId(953579L) + .build(); + + DeleteHistoryResponse res = sdk.status().deleteHistory() + .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainer().isPresent()) { // handle response } } } - - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] + - target: $["paths"]["/status/sessions/history/{historyId}"]["get"] update: x-codeSamples: - lang: java @@ -2469,21 +10224,83 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest; - import dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized; - import dev.plexapi.sdk.models.operations.StopTranscodeSessionResponse; + import dev.plexapi.sdk.models.operations.GetHistoryItemRequest; + import dev.plexapi.sdk.models.operations.GetHistoryItemResponse; + import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws StopTranscodeSessionBadRequest, StopTranscodeSessionUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession() - .sessionKey("zz7llzqlx8w9vnrsbnwhbmep") + GetHistoryItemRequest req = GetHistoryItemRequest.builder() + .historyId(832213L) + .build(); + + GetHistoryItemResponse res = sdk.status().getHistoryItem() + .request(req) + .call(); + + if (res.historyAllGetResponses200().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/status/sessions/terminate"]["post"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.TerminateSessionRequest; + import dev.plexapi.sdk.models.operations.TerminateSessionResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + TerminateSessionRequest req = TerminateSessionRequest.builder() + .sessionId("cdefghijklmnopqrstuvwxyz") + .reason("Stop Playing") + .build(); + + TerminateSessionResponse res = sdk.status().terminateSession() + .request(req) .call(); // handle response @@ -2498,22 +10315,38 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest; - import dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized; - import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.operations.ApplyUpdatesRequest; + import dev.plexapi.sdk.models.operations.ApplyUpdatesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws ApplyUpdatesBadRequest, ApplyUpdatesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); + ApplyUpdatesRequest req = ApplyUpdatesRequest.builder() + .tonight(BoolInt.ONE) + .skip(BoolInt.ONE) + .build(); + ApplyUpdatesResponse res = sdk.updater().applyUpdates() - .tonight(Tonight.ONE) - .skip(Skip.ONE) + .request(req) .call(); // handle response @@ -2528,22 +10361,37 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.CheckForUpdatesBadRequest; - import dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized; - import dev.plexapi.sdk.models.operations.CheckForUpdatesResponse; - import dev.plexapi.sdk.models.operations.Download; + import dev.plexapi.sdk.models.operations.CheckUpdatesRequest; + import dev.plexapi.sdk.models.operations.CheckUpdatesResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws CheckForUpdatesBadRequest, CheckForUpdatesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - CheckForUpdatesResponse res = sdk.updater().checkForUpdates() - .download(Download.ONE) + CheckUpdatesRequest req = CheckUpdatesRequest.builder() + .download(BoolInt.ONE) + .build(); + + CheckUpdatesResponse res = sdk.updater().checkUpdates() + .request(req) .call(); // handle response @@ -2558,20 +10406,18 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetUpdateStatusBadRequest; - import dev.plexapi.sdk.models.errors.GetUpdateStatusUnauthorized; - import dev.plexapi.sdk.models.operations.GetUpdateStatusResponse; + import dev.plexapi.sdk.models.operations.GetUpdatesStatusResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetUpdateStatusBadRequest, GetUpdateStatusUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetUpdateStatusResponse res = sdk.updater().getUpdateStatus() + GetUpdatesStatusResponse res = sdk.updater().getUpdatesStatus() .call(); if (res.object().isPresent()) { @@ -2579,7 +10425,7 @@ actions: } } } - - target: $["paths"]["/user"]["get"] + - target: $["paths"]["/{transcodeType}/:/transcode/universal/decision"]["get"] update: x-codeSamples: - lang: java @@ -2588,118 +10434,70 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest; - import dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized; - import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetTokenDetailsBadRequest, GetTokenDetailsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetTokenDetailsResponse res = sdk.authentication().getTokenDetails() - .call(); - - if (res.userPlexAccount().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/users"]["get"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - package hello.world; - - import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.GetUsersBadRequest; - import dev.plexapi.sdk.models.errors.GetUsersUnauthorized; - import dev.plexapi.sdk.models.operations.GetUsersRequest; - import dev.plexapi.sdk.models.operations.GetUsersResponse; - import java.lang.Exception; - - public class Application { - - public static void main(String[] args) throws GetUsersBadRequest, GetUsersUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .build(); - - GetUsersRequest req = GetUsersRequest.builder() - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .clientName("Plex for Roku") - .deviceNickname("Roku 3") - .deviceName("Chrome") - .deviceScreenResolution("1487x1165,2560x1440") - .clientVersion("2.4.1") - .platform("Roku") - .clientFeatures("external-media,indirect-media,hub-style-list") - .model("4200X") - .xPlexSessionId("97e136ef-4ddd-4ff3-89a7-a5820c96c2ca") - .xPlexLanguage("en") - .platformVersion("4.3 build 1057") - .build(); - - GetUsersResponse res = sdk.users().getUsers() - .request(req) - .call(); - - if (res.body().isPresent()) { - // handle response - } - } - } - - target: $["paths"]["/users/signin"]["post"] - update: - x-codeSamples: - - lang: java - label: PlexJava - source: |- - 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.*; + import dev.plexapi.sdk.models.shared.*; import java.lang.Exception; public class Application { - public static void main(String[] args) throws PostUsersSignInDataBadRequest, PostUsersSignInDataUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - PostUsersSignInDataRequest req = PostUsersSignInDataRequest.builder() - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .clientName("Plex for Roku") - .deviceNickname("Roku 3") - .clientVersion("2.4.1") - .platform("Roku") - .requestBody(PostUsersSignInDataRequestBody.builder() - .login("username@email.com") - .password("password123") - .verificationCode("123456") - .build()) + MakeDecisionRequest req = MakeDecisionRequest.builder() + .transcodeType(TranscodeType.MUSIC) + .advancedSubtitles(AdvancedSubtitles.BURN) + .audioBoost(50L) + .audioChannelCount(5L) + .autoAdjustQuality(BoolInt.ONE) + .autoAdjustSubtitle(BoolInt.ONE) + .directPlay(BoolInt.ONE) + .directStream(BoolInt.ONE) + .directStreamAudio(BoolInt.ONE) + .disableResolutionRotation(BoolInt.ONE) + .hasMDE(BoolInt.ONE) + .location(Location.WAN) + .mediaBufferSize(102400L) + .mediaIndex(0L) + .musicBitrate(5000L) + .offset(90.5) + .partIndex(0L) + .path("/library/metadata/151671") + .peakBitrate(12000L) + .photoResolution("1080x1080") + .protocol(Protocol.DASH) + .secondsPerSegment(5L) + .subtitleSize(50L) + .videoBitrate(12000L) + .videoQuality(50L) + .videoResolution("1080x1080") + .xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)") + .xPlexClientProfileName("generic") .build(); - PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData() + MakeDecisionResponse res = sdk.transcoder().makeDecision() .request(req) .call(); - if (res.userPlexAccount().isPresent()) { + if (res.mediaContainerWithDecision().isPresent()) { // handle response } } } - - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] + - target: $["paths"]["/{transcodeType}/:/transcode/universal/fallback"]["post"] update: x-codeSamples: - lang: java @@ -2708,40 +10506,179 @@ actions: package hello.world; import dev.plexapi.sdk.PlexAPI; - import dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest; - import dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized; - import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest; - import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse; + import dev.plexapi.sdk.models.operations.TriggerFallbackRequest; + import dev.plexapi.sdk.models.operations.TriggerFallbackResponse; + import dev.plexapi.sdk.models.shared.Accepts; + import dev.plexapi.sdk.models.shared.TranscodeType; import java.lang.Exception; public class Application { - public static void main(String[] args) throws StartUniversalTranscodeBadRequest, StartUniversalTranscodeUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder() - .hasMDE(1d) - .path("/library/metadata/23409") - .mediaIndex(0d) - .partIndex(0d) - .protocol("hls") - .fastSeek(0d) - .directPlay(0d) - .directStream(0d) - .subtitleSize(100d) - .subtites("burn") - .audioBoost(100d) - .location("lan") - .mediaBufferSize(102400d) - .session("zvcage8b7rkioqcm8f4uns4c") - .addDebugOverlay(0d) - .autoAdjustQuality(0d) + TriggerFallbackRequest req = TriggerFallbackRequest.builder() + .transcodeType(TranscodeType.AUDIO) .build(); - StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode() + TriggerFallbackResponse res = sdk.transcoder().triggerFallback() + .request(req) + .call(); + + // handle response + } + } + - target: $["paths"]["/{transcodeType}/:/transcode/universal/start.{extension}"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.*; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StartTranscodeSessionRequest req = StartTranscodeSessionRequest.builder() + .transcodeType(TranscodeType.MUSIC) + .extension(Extension.MPD) + .advancedSubtitles(AdvancedSubtitles.BURN) + .audioBoost(50L) + .audioChannelCount(5L) + .autoAdjustQuality(BoolInt.ONE) + .autoAdjustSubtitle(BoolInt.ONE) + .directPlay(BoolInt.ONE) + .directStream(BoolInt.ONE) + .directStreamAudio(BoolInt.ONE) + .disableResolutionRotation(BoolInt.ONE) + .hasMDE(BoolInt.ONE) + .location(StartTranscodeSessionQueryParamLocation.WAN) + .mediaBufferSize(102400L) + .mediaIndex(0L) + .musicBitrate(5000L) + .offset(90.5) + .partIndex(0L) + .path("/library/metadata/151671") + .peakBitrate(12000L) + .photoResolution("1080x1080") + .protocol(StartTranscodeSessionQueryParamProtocol.DASH) + .secondsPerSegment(5L) + .subtitleSize(50L) + .videoBitrate(12000L) + .videoQuality(50L) + .videoResolution("1080x1080") + .xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)") + .xPlexClientProfileName("generic") + .build(); + + StartTranscodeSessionResponse res = sdk.transcoder().startTranscodeSession() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/{transcodeType}/:/transcode/universal/subtitles"]["get"] + update: + x-codeSamples: + - lang: java + label: PlexJava + source: |- + package hello.world; + + import dev.plexapi.sdk.PlexAPI; + import dev.plexapi.sdk.models.operations.*; + import dev.plexapi.sdk.models.shared.*; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + TranscodeSubtitlesRequest req = TranscodeSubtitlesRequest.builder() + .transcodeType(TranscodeType.AUDIO) + .advancedSubtitles(AdvancedSubtitles.BURN) + .audioBoost(50L) + .audioChannelCount(5L) + .autoAdjustQuality(BoolInt.ONE) + .autoAdjustSubtitle(BoolInt.ONE) + .directPlay(BoolInt.ONE) + .directStream(BoolInt.ONE) + .directStreamAudio(BoolInt.ONE) + .disableResolutionRotation(BoolInt.ONE) + .hasMDE(BoolInt.ONE) + .location(QueryParamLocation.WAN) + .mediaBufferSize(102400L) + .mediaIndex(0L) + .musicBitrate(5000L) + .offset(90.5) + .partIndex(0L) + .path("/library/metadata/151671") + .peakBitrate(12000L) + .photoResolution("1080x1080") + .protocol(QueryParamProtocol.DASH) + .secondsPerSegment(5L) + .subtitleSize(50L) + .videoBitrate(12000L) + .videoQuality(50L) + .videoResolution("1080x1080") + .xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)") + .xPlexClientProfileName("generic") + .build(); + + TranscodeSubtitlesResponse res = sdk.transcoder().transcodeSubtitles() .request(req) .call(); diff --git a/docs/models/errors/AddPlaylistContentsBadRequest.md b/docs/models/errors/AddPlaylistContentsBadRequest.md deleted file mode 100644 index 684ee9ee..00000000 --- a/docs/models/errors/AddPlaylistContentsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddPlaylistContentsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[AddPlaylistContentsErrors](../../models/errors/AddPlaylistContentsErrors.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/errors/AddPlaylistContentsErrors.md b/docs/models/errors/AddPlaylistContentsErrors.md deleted file mode 100644 index 916531a4..00000000 --- a/docs/models/errors/AddPlaylistContentsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# AddPlaylistContentsErrors - - -## 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/AddPlaylistContentsPlaylistsErrors.md b/docs/models/errors/AddPlaylistContentsPlaylistsErrors.md deleted file mode 100644 index 252b3bf2..00000000 --- a/docs/models/errors/AddPlaylistContentsPlaylistsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# AddPlaylistContentsPlaylistsErrors - - -## 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/AddPlaylistContentsUnauthorized.md b/docs/models/errors/AddPlaylistContentsUnauthorized.md deleted file mode 100644 index 7ba3628e..00000000 --- a/docs/models/errors/AddPlaylistContentsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddPlaylistContentsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[AddPlaylistContentsPlaylistsErrors](../../models/errors/AddPlaylistContentsPlaylistsErrors.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/errors/ApplyUpdatesBadRequest.md b/docs/models/errors/ApplyUpdatesBadRequest.md deleted file mode 100644 index e61ef3f6..00000000 --- a/docs/models/errors/ApplyUpdatesBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApplyUpdatesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[ApplyUpdatesErrors](../../models/errors/ApplyUpdatesErrors.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/errors/ApplyUpdatesErrors.md b/docs/models/errors/ApplyUpdatesErrors.md deleted file mode 100644 index 3cfe18de..00000000 --- a/docs/models/errors/ApplyUpdatesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# ApplyUpdatesErrors - - -## 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/ApplyUpdatesUnauthorized.md b/docs/models/errors/ApplyUpdatesUnauthorized.md deleted file mode 100644 index 3bb1fffb..00000000 --- a/docs/models/errors/ApplyUpdatesUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApplyUpdatesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[ApplyUpdatesUpdaterErrors](../../models/errors/ApplyUpdatesUpdaterErrors.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/errors/ApplyUpdatesUpdaterErrors.md b/docs/models/errors/ApplyUpdatesUpdaterErrors.md deleted file mode 100644 index 5ba16432..00000000 --- a/docs/models/errors/ApplyUpdatesUpdaterErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# ApplyUpdatesUpdaterErrors - - -## 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/CancelServerActivitiesActivitiesErrors.md b/docs/models/errors/CancelServerActivitiesActivitiesErrors.md deleted file mode 100644 index 5daba45c..00000000 --- a/docs/models/errors/CancelServerActivitiesActivitiesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# CancelServerActivitiesActivitiesErrors - - -## 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/CancelServerActivitiesBadRequest.md b/docs/models/errors/CancelServerActivitiesBadRequest.md deleted file mode 100644 index 740db374..00000000 --- a/docs/models/errors/CancelServerActivitiesBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CancelServerActivitiesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[CancelServerActivitiesErrors](../../models/errors/CancelServerActivitiesErrors.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/errors/CancelServerActivitiesErrors.md b/docs/models/errors/CancelServerActivitiesErrors.md deleted file mode 100644 index 56aa9775..00000000 --- a/docs/models/errors/CancelServerActivitiesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# CancelServerActivitiesErrors - - -## 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/CancelServerActivitiesUnauthorized.md b/docs/models/errors/CancelServerActivitiesUnauthorized.md deleted file mode 100644 index ba71e3db..00000000 --- a/docs/models/errors/CancelServerActivitiesUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# CancelServerActivitiesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[CancelServerActivitiesActivitiesErrors](../../models/errors/CancelServerActivitiesActivitiesErrors.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/errors/CheckForUpdatesBadRequest.md b/docs/models/errors/CheckForUpdatesBadRequest.md deleted file mode 100644 index d187ddeb..00000000 --- a/docs/models/errors/CheckForUpdatesBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CheckForUpdatesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[CheckForUpdatesErrors](../../models/errors/CheckForUpdatesErrors.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/errors/CheckForUpdatesErrors.md b/docs/models/errors/CheckForUpdatesErrors.md deleted file mode 100644 index 392b7820..00000000 --- a/docs/models/errors/CheckForUpdatesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# CheckForUpdatesErrors - - -## 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/CheckForUpdatesUnauthorized.md b/docs/models/errors/CheckForUpdatesUnauthorized.md deleted file mode 100644 index 682c345f..00000000 --- a/docs/models/errors/CheckForUpdatesUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# CheckForUpdatesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[CheckForUpdatesUpdaterErrors](../../models/errors/CheckForUpdatesUpdaterErrors.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/errors/CheckForUpdatesUpdaterErrors.md b/docs/models/errors/CheckForUpdatesUpdaterErrors.md deleted file mode 100644 index e33dbe5e..00000000 --- a/docs/models/errors/CheckForUpdatesUpdaterErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# CheckForUpdatesUpdaterErrors - - -## 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/ClearPlaylistContentsBadRequest.md b/docs/models/errors/ClearPlaylistContentsBadRequest.md deleted file mode 100644 index 429958e6..00000000 --- a/docs/models/errors/ClearPlaylistContentsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ClearPlaylistContentsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[ClearPlaylistContentsErrors](../../models/errors/ClearPlaylistContentsErrors.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/errors/ClearPlaylistContentsErrors.md b/docs/models/errors/ClearPlaylistContentsErrors.md deleted file mode 100644 index e938956e..00000000 --- a/docs/models/errors/ClearPlaylistContentsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClearPlaylistContentsErrors - - -## 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/ClearPlaylistContentsPlaylistsErrors.md b/docs/models/errors/ClearPlaylistContentsPlaylistsErrors.md deleted file mode 100644 index 679bf168..00000000 --- a/docs/models/errors/ClearPlaylistContentsPlaylistsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClearPlaylistContentsPlaylistsErrors - - -## 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/ClearPlaylistContentsUnauthorized.md b/docs/models/errors/ClearPlaylistContentsUnauthorized.md deleted file mode 100644 index f64f06d7..00000000 --- a/docs/models/errors/ClearPlaylistContentsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# ClearPlaylistContentsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[ClearPlaylistContentsPlaylistsErrors](../../models/errors/ClearPlaylistContentsPlaylistsErrors.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/errors/CreatePlaylistBadRequest.md b/docs/models/errors/CreatePlaylistBadRequest.md deleted file mode 100644 index de015bec..00000000 --- a/docs/models/errors/CreatePlaylistBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreatePlaylistBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[CreatePlaylistErrors](../../models/errors/CreatePlaylistErrors.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/errors/CreatePlaylistErrors.md b/docs/models/errors/CreatePlaylistErrors.md deleted file mode 100644 index 87645d0f..00000000 --- a/docs/models/errors/CreatePlaylistErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreatePlaylistErrors - - -## 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/CreatePlaylistPlaylistsErrors.md b/docs/models/errors/CreatePlaylistPlaylistsErrors.md deleted file mode 100644 index f05b71b7..00000000 --- a/docs/models/errors/CreatePlaylistPlaylistsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreatePlaylistPlaylistsErrors - - -## 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/CreatePlaylistUnauthorized.md b/docs/models/errors/CreatePlaylistUnauthorized.md deleted file mode 100644 index c6979e93..00000000 --- a/docs/models/errors/CreatePlaylistUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreatePlaylistUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[CreatePlaylistPlaylistsErrors](../../models/errors/CreatePlaylistPlaylistsErrors.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/errors/DeleteLibraryBadRequest.md b/docs/models/errors/DeleteLibraryBadRequest.md deleted file mode 100644 index eb3e9195..00000000 --- a/docs/models/errors/DeleteLibraryBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[DeleteLibraryErrors](../../models/errors/DeleteLibraryErrors.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/errors/DeleteLibraryErrors.md b/docs/models/errors/DeleteLibraryErrors.md deleted file mode 100644 index 7c98d989..00000000 --- a/docs/models/errors/DeleteLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# DeleteLibraryErrors - - -## 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/DeleteLibraryLibraryErrors.md b/docs/models/errors/DeleteLibraryLibraryErrors.md deleted file mode 100644 index 5acad497..00000000 --- a/docs/models/errors/DeleteLibraryLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# DeleteLibraryLibraryErrors - - -## 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/DeleteLibraryUnauthorized.md b/docs/models/errors/DeleteLibraryUnauthorized.md deleted file mode 100644 index 623b1c5b..00000000 --- a/docs/models/errors/DeleteLibraryUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[DeleteLibraryLibraryErrors](../../models/errors/DeleteLibraryLibraryErrors.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/errors/DeletePlaylistBadRequest.md b/docs/models/errors/DeletePlaylistBadRequest.md deleted file mode 100644 index 97635f71..00000000 --- a/docs/models/errors/DeletePlaylistBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeletePlaylistBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[DeletePlaylistErrors](../../models/errors/DeletePlaylistErrors.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/errors/DeletePlaylistErrors.md b/docs/models/errors/DeletePlaylistErrors.md deleted file mode 100644 index cf4f24da..00000000 --- a/docs/models/errors/DeletePlaylistErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# DeletePlaylistErrors - - -## 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/DeletePlaylistPlaylistsErrors.md b/docs/models/errors/DeletePlaylistPlaylistsErrors.md deleted file mode 100644 index 16837338..00000000 --- a/docs/models/errors/DeletePlaylistPlaylistsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# DeletePlaylistPlaylistsErrors - - -## 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/DeletePlaylistUnauthorized.md b/docs/models/errors/DeletePlaylistUnauthorized.md deleted file mode 100644 index e4caa586..00000000 --- a/docs/models/errors/DeletePlaylistUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeletePlaylistUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[DeletePlaylistPlaylistsErrors](../../models/errors/DeletePlaylistPlaylistsErrors.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/errors/EnablePaperTrailBadRequest.md b/docs/models/errors/EnablePaperTrailBadRequest.md deleted file mode 100644 index b61bc472..00000000 --- a/docs/models/errors/EnablePaperTrailBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnablePaperTrailBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[EnablePaperTrailErrors](../../models/errors/EnablePaperTrailErrors.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/errors/EnablePaperTrailErrors.md b/docs/models/errors/EnablePaperTrailErrors.md deleted file mode 100644 index 04156206..00000000 --- a/docs/models/errors/EnablePaperTrailErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# EnablePaperTrailErrors - - -## 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/EnablePaperTrailLogErrors.md b/docs/models/errors/EnablePaperTrailLogErrors.md deleted file mode 100644 index 6d3b21e9..00000000 --- a/docs/models/errors/EnablePaperTrailLogErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# EnablePaperTrailLogErrors - - -## 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/EnablePaperTrailUnauthorized.md b/docs/models/errors/EnablePaperTrailUnauthorized.md deleted file mode 100644 index 3bd2d9f4..00000000 --- a/docs/models/errors/EnablePaperTrailUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnablePaperTrailUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[EnablePaperTrailLogErrors](../../models/errors/EnablePaperTrailLogErrors.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/errors/Errors.md b/docs/models/errors/Errors.md deleted file mode 100644 index 5b010b69..00000000 --- a/docs/models/errors/Errors.md +++ /dev/null @@ -1,10 +0,0 @@ -# Errors - - -## 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/GetActorsLibraryBadRequest.md b/docs/models/errors/GetActorsLibraryBadRequest.md deleted file mode 100644 index 637a541e..00000000 --- a/docs/models/errors/GetActorsLibraryBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetActorsLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetActorsLibraryErrors](../../models/errors/GetActorsLibraryErrors.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/errors/GetActorsLibraryErrors.md b/docs/models/errors/GetActorsLibraryErrors.md deleted file mode 100644 index 5488ebc8..00000000 --- a/docs/models/errors/GetActorsLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetActorsLibraryErrors - - -## 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/GetActorsLibraryLibraryErrors.md b/docs/models/errors/GetActorsLibraryLibraryErrors.md deleted file mode 100644 index fa178e44..00000000 --- a/docs/models/errors/GetActorsLibraryLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetActorsLibraryLibraryErrors - - -## 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/GetActorsLibraryUnauthorized.md b/docs/models/errors/GetActorsLibraryUnauthorized.md deleted file mode 100644 index 99a5336e..00000000 --- a/docs/models/errors/GetActorsLibraryUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetActorsLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetActorsLibraryLibraryErrors](../../models/errors/GetActorsLibraryLibraryErrors.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/errors/GetAllLibrariesBadRequest.md b/docs/models/errors/GetAllLibrariesBadRequest.md deleted file mode 100644 index 51e29ca4..00000000 --- a/docs/models/errors/GetAllLibrariesBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAllLibrariesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetAllLibrariesErrors](../../models/errors/GetAllLibrariesErrors.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/errors/GetAllLibrariesErrors.md b/docs/models/errors/GetAllLibrariesErrors.md deleted file mode 100644 index 4a3f65ce..00000000 --- a/docs/models/errors/GetAllLibrariesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAllLibrariesErrors - - -## 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/GetAllLibrariesLibraryErrors.md b/docs/models/errors/GetAllLibrariesLibraryErrors.md deleted file mode 100644 index 3c2e5d30..00000000 --- a/docs/models/errors/GetAllLibrariesLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAllLibrariesLibraryErrors - - -## 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/GetAllLibrariesUnauthorized.md b/docs/models/errors/GetAllLibrariesUnauthorized.md deleted file mode 100644 index 976463d7..00000000 --- a/docs/models/errors/GetAllLibrariesUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAllLibrariesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetAllLibrariesLibraryErrors](../../models/errors/GetAllLibrariesLibraryErrors.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/errors/GetAvailableClientsBadRequest.md b/docs/models/errors/GetAvailableClientsBadRequest.md deleted file mode 100644 index 0d92c76d..00000000 --- a/docs/models/errors/GetAvailableClientsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAvailableClientsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetAvailableClientsErrors](../../models/errors/GetAvailableClientsErrors.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/errors/GetAvailableClientsErrors.md b/docs/models/errors/GetAvailableClientsErrors.md deleted file mode 100644 index f57a90fb..00000000 --- a/docs/models/errors/GetAvailableClientsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAvailableClientsErrors - - -## 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/GetAvailableClientsServerErrors.md b/docs/models/errors/GetAvailableClientsServerErrors.md deleted file mode 100644 index 5583879f..00000000 --- a/docs/models/errors/GetAvailableClientsServerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAvailableClientsServerErrors - - -## 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/GetAvailableClientsUnauthorized.md b/docs/models/errors/GetAvailableClientsUnauthorized.md deleted file mode 100644 index 9e3f36b2..00000000 --- a/docs/models/errors/GetAvailableClientsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAvailableClientsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetAvailableClientsServerErrors](../../models/errors/GetAvailableClientsServerErrors.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/errors/GetBandwidthStatisticsBadRequest.md b/docs/models/errors/GetBandwidthStatisticsBadRequest.md deleted file mode 100644 index bdbf58fc..00000000 --- a/docs/models/errors/GetBandwidthStatisticsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetBandwidthStatisticsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetBandwidthStatisticsErrors](../../models/errors/GetBandwidthStatisticsErrors.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/errors/GetBandwidthStatisticsErrors.md b/docs/models/errors/GetBandwidthStatisticsErrors.md deleted file mode 100644 index bbc69145..00000000 --- a/docs/models/errors/GetBandwidthStatisticsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetBandwidthStatisticsErrors - - -## 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/GetBandwidthStatisticsStatisticsErrors.md b/docs/models/errors/GetBandwidthStatisticsStatisticsErrors.md deleted file mode 100644 index 0fa693dc..00000000 --- a/docs/models/errors/GetBandwidthStatisticsStatisticsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetBandwidthStatisticsStatisticsErrors - - -## 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/GetBandwidthStatisticsUnauthorized.md b/docs/models/errors/GetBandwidthStatisticsUnauthorized.md deleted file mode 100644 index 65767fb1..00000000 --- a/docs/models/errors/GetBandwidthStatisticsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetBandwidthStatisticsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetBandwidthStatisticsStatisticsErrors](../../models/errors/GetBandwidthStatisticsStatisticsErrors.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/errors/GetBannerImageBadRequest.md b/docs/models/errors/GetBannerImageBadRequest.md deleted file mode 100644 index dcd2672e..00000000 --- a/docs/models/errors/GetBannerImageBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetBannerImageBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetBannerImageErrors](../../models/errors/GetBannerImageErrors.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/errors/GetBannerImageErrors.md b/docs/models/errors/GetBannerImageErrors.md deleted file mode 100644 index c28dfe14..00000000 --- a/docs/models/errors/GetBannerImageErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetBannerImageErrors - - -## 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/GetBannerImageMediaErrors.md b/docs/models/errors/GetBannerImageMediaErrors.md deleted file mode 100644 index 4e0d2386..00000000 --- a/docs/models/errors/GetBannerImageMediaErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetBannerImageMediaErrors - - -## 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/GetBannerImageUnauthorized.md b/docs/models/errors/GetBannerImageUnauthorized.md deleted file mode 100644 index dcc13586..00000000 --- a/docs/models/errors/GetBannerImageUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetBannerImageUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetBannerImageMediaErrors](../../models/errors/GetBannerImageMediaErrors.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/errors/GetButlerTasksBadRequest.md b/docs/models/errors/GetButlerTasksBadRequest.md deleted file mode 100644 index 949555a5..00000000 --- a/docs/models/errors/GetButlerTasksBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetButlerTasksBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetButlerTasksErrors](../../models/errors/GetButlerTasksErrors.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/errors/GetButlerTasksButlerErrors.md b/docs/models/errors/GetButlerTasksButlerErrors.md deleted file mode 100644 index c0cda7a2..00000000 --- a/docs/models/errors/GetButlerTasksButlerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetButlerTasksButlerErrors - - -## 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/GetButlerTasksErrors.md b/docs/models/errors/GetButlerTasksErrors.md deleted file mode 100644 index df5e016c..00000000 --- a/docs/models/errors/GetButlerTasksErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetButlerTasksErrors - - -## 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/GetButlerTasksUnauthorized.md b/docs/models/errors/GetButlerTasksUnauthorized.md deleted file mode 100644 index 043a772a..00000000 --- a/docs/models/errors/GetButlerTasksUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetButlerTasksUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetButlerTasksButlerErrors](../../models/errors/GetButlerTasksButlerErrors.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/errors/GetCompanionsDataBadRequest.md b/docs/models/errors/GetCompanionsDataBadRequest.md deleted file mode 100644 index 31c65648..00000000 --- a/docs/models/errors/GetCompanionsDataBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetCompanionsDataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetCompanionsDataErrors](../../models/errors/GetCompanionsDataErrors.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/errors/GetCompanionsDataErrors.md b/docs/models/errors/GetCompanionsDataErrors.md deleted file mode 100644 index 118f401e..00000000 --- a/docs/models/errors/GetCompanionsDataErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetCompanionsDataErrors - - -## 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/GetCompanionsDataPlexErrors.md b/docs/models/errors/GetCompanionsDataPlexErrors.md deleted file mode 100644 index 882225f4..00000000 --- a/docs/models/errors/GetCompanionsDataPlexErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetCompanionsDataPlexErrors - - -## 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/GetCompanionsDataUnauthorized.md b/docs/models/errors/GetCompanionsDataUnauthorized.md deleted file mode 100644 index 3911dfee..00000000 --- a/docs/models/errors/GetCompanionsDataUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetCompanionsDataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetCompanionsDataPlexErrors](../../models/errors/GetCompanionsDataPlexErrors.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/errors/GetCountriesLibraryBadRequest.md b/docs/models/errors/GetCountriesLibraryBadRequest.md deleted file mode 100644 index 99066fa6..00000000 --- a/docs/models/errors/GetCountriesLibraryBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetCountriesLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetCountriesLibraryErrors](../../models/errors/GetCountriesLibraryErrors.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/errors/GetCountriesLibraryErrors.md b/docs/models/errors/GetCountriesLibraryErrors.md deleted file mode 100644 index fc28903c..00000000 --- a/docs/models/errors/GetCountriesLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetCountriesLibraryErrors - - -## 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/GetCountriesLibraryLibraryErrors.md b/docs/models/errors/GetCountriesLibraryLibraryErrors.md deleted file mode 100644 index fc95fe1d..00000000 --- a/docs/models/errors/GetCountriesLibraryLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetCountriesLibraryLibraryErrors - - -## 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/GetCountriesLibraryUnauthorized.md b/docs/models/errors/GetCountriesLibraryUnauthorized.md deleted file mode 100644 index fa45f531..00000000 --- a/docs/models/errors/GetCountriesLibraryUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetCountriesLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetCountriesLibraryLibraryErrors](../../models/errors/GetCountriesLibraryLibraryErrors.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/errors/GetDevicesBadRequest.md b/docs/models/errors/GetDevicesBadRequest.md deleted file mode 100644 index d2cda149..00000000 --- a/docs/models/errors/GetDevicesBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetDevicesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetDevicesErrors](../../models/errors/GetDevicesErrors.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/errors/GetDevicesErrors.md b/docs/models/errors/GetDevicesErrors.md deleted file mode 100644 index d42ada9a..00000000 --- a/docs/models/errors/GetDevicesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetDevicesErrors - - -## 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/GetDevicesServerErrors.md b/docs/models/errors/GetDevicesServerErrors.md deleted file mode 100644 index c2f00e7f..00000000 --- a/docs/models/errors/GetDevicesServerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetDevicesServerErrors - - -## 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/GetDevicesUnauthorized.md b/docs/models/errors/GetDevicesUnauthorized.md deleted file mode 100644 index 996c070c..00000000 --- a/docs/models/errors/GetDevicesUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetDevicesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetDevicesServerErrors](../../models/errors/GetDevicesServerErrors.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/errors/GetFileHashBadRequest.md b/docs/models/errors/GetFileHashBadRequest.md deleted file mode 100644 index ee7becb6..00000000 --- a/docs/models/errors/GetFileHashBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetFileHashBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetFileHashErrors](../../models/errors/GetFileHashErrors.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/errors/GetFileHashErrors.md b/docs/models/errors/GetFileHashErrors.md deleted file mode 100644 index 5ede5c3c..00000000 --- a/docs/models/errors/GetFileHashErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetFileHashErrors - - -## 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/GetFileHashLibraryErrors.md b/docs/models/errors/GetFileHashLibraryErrors.md deleted file mode 100644 index b1709748..00000000 --- a/docs/models/errors/GetFileHashLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetFileHashLibraryErrors - - -## 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/GetFileHashUnauthorized.md b/docs/models/errors/GetFileHashUnauthorized.md deleted file mode 100644 index 6b5be876..00000000 --- a/docs/models/errors/GetFileHashUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetFileHashUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetFileHashLibraryErrors](../../models/errors/GetFileHashLibraryErrors.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/errors/GetGenresLibraryBadRequest.md b/docs/models/errors/GetGenresLibraryBadRequest.md deleted file mode 100644 index cd173fbf..00000000 --- a/docs/models/errors/GetGenresLibraryBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGenresLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetGenresLibraryErrors](../../models/errors/GetGenresLibraryErrors.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/errors/GetGenresLibraryErrors.md b/docs/models/errors/GetGenresLibraryErrors.md deleted file mode 100644 index 0d945204..00000000 --- a/docs/models/errors/GetGenresLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetGenresLibraryErrors - - -## 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/GetGenresLibraryLibraryErrors.md b/docs/models/errors/GetGenresLibraryLibraryErrors.md deleted file mode 100644 index 98b4b797..00000000 --- a/docs/models/errors/GetGenresLibraryLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetGenresLibraryLibraryErrors - - -## 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/GetGenresLibraryUnauthorized.md b/docs/models/errors/GetGenresLibraryUnauthorized.md deleted file mode 100644 index e126b79c..00000000 --- a/docs/models/errors/GetGenresLibraryUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGenresLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetGenresLibraryLibraryErrors](../../models/errors/GetGenresLibraryLibraryErrors.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/errors/GetGeoDataBadRequest.md b/docs/models/errors/GetGeoDataBadRequest.md deleted file mode 100644 index 24f2c0b7..00000000 --- a/docs/models/errors/GetGeoDataBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGeoDataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetGeoDataErrors](../../models/errors/GetGeoDataErrors.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/errors/GetGeoDataErrors.md b/docs/models/errors/GetGeoDataErrors.md deleted file mode 100644 index 9a29e4b5..00000000 --- a/docs/models/errors/GetGeoDataErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetGeoDataErrors - - -## 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/GetGeoDataPlexErrors.md b/docs/models/errors/GetGeoDataPlexErrors.md deleted file mode 100644 index 011cf987..00000000 --- a/docs/models/errors/GetGeoDataPlexErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetGeoDataPlexErrors - - -## 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/GetGeoDataUnauthorized.md b/docs/models/errors/GetGeoDataUnauthorized.md deleted file mode 100644 index b75b33ce..00000000 --- a/docs/models/errors/GetGeoDataUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGeoDataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetGeoDataPlexErrors](../../models/errors/GetGeoDataPlexErrors.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/errors/GetGlobalHubsBadRequest.md b/docs/models/errors/GetGlobalHubsBadRequest.md deleted file mode 100644 index 3bff1e04..00000000 --- a/docs/models/errors/GetGlobalHubsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGlobalHubsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetGlobalHubsErrors](../../models/errors/GetGlobalHubsErrors.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/errors/GetGlobalHubsErrors.md b/docs/models/errors/GetGlobalHubsErrors.md deleted file mode 100644 index c550b024..00000000 --- a/docs/models/errors/GetGlobalHubsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetGlobalHubsErrors - - -## 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/GetGlobalHubsHubsErrors.md b/docs/models/errors/GetGlobalHubsHubsErrors.md deleted file mode 100644 index 37828e3d..00000000 --- a/docs/models/errors/GetGlobalHubsHubsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetGlobalHubsHubsErrors - - -## 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/GetGlobalHubsUnauthorized.md b/docs/models/errors/GetGlobalHubsUnauthorized.md deleted file mode 100644 index 0bd7f803..00000000 --- a/docs/models/errors/GetGlobalHubsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGlobalHubsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetGlobalHubsHubsErrors](../../models/errors/GetGlobalHubsHubsErrors.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/errors/GetHomeDataBadRequest.md b/docs/models/errors/GetHomeDataBadRequest.md deleted file mode 100644 index 7b5d117d..00000000 --- a/docs/models/errors/GetHomeDataBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetHomeDataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetHomeDataErrors](../../models/errors/GetHomeDataErrors.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/errors/GetHomeDataErrors.md b/docs/models/errors/GetHomeDataErrors.md deleted file mode 100644 index 2ee6c59f..00000000 --- a/docs/models/errors/GetHomeDataErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetHomeDataErrors - - -## 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/GetHomeDataPlexErrors.md b/docs/models/errors/GetHomeDataPlexErrors.md deleted file mode 100644 index 5ececbf0..00000000 --- a/docs/models/errors/GetHomeDataPlexErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetHomeDataPlexErrors - - -## 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/GetHomeDataUnauthorized.md b/docs/models/errors/GetHomeDataUnauthorized.md deleted file mode 100644 index 71f10448..00000000 --- a/docs/models/errors/GetHomeDataUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetHomeDataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetHomeDataPlexErrors](../../models/errors/GetHomeDataPlexErrors.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/errors/GetLibraryDetailsBadRequest.md b/docs/models/errors/GetLibraryDetailsBadRequest.md deleted file mode 100644 index ef392e35..00000000 --- a/docs/models/errors/GetLibraryDetailsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryDetailsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetLibraryDetailsErrors](../../models/errors/GetLibraryDetailsErrors.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/errors/GetLibraryDetailsErrors.md b/docs/models/errors/GetLibraryDetailsErrors.md deleted file mode 100644 index f715a133..00000000 --- a/docs/models/errors/GetLibraryDetailsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryDetailsErrors - - -## 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/GetLibraryDetailsLibraryErrors.md b/docs/models/errors/GetLibraryDetailsLibraryErrors.md deleted file mode 100644 index 1734ff6f..00000000 --- a/docs/models/errors/GetLibraryDetailsLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryDetailsLibraryErrors - - -## 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/GetLibraryDetailsUnauthorized.md b/docs/models/errors/GetLibraryDetailsUnauthorized.md deleted file mode 100644 index 44249ff7..00000000 --- a/docs/models/errors/GetLibraryDetailsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryDetailsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetLibraryDetailsLibraryErrors](../../models/errors/GetLibraryDetailsLibraryErrors.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/errors/GetLibraryHubsBadRequest.md b/docs/models/errors/GetLibraryHubsBadRequest.md deleted file mode 100644 index 17a70f2a..00000000 --- a/docs/models/errors/GetLibraryHubsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryHubsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetLibraryHubsErrors](../../models/errors/GetLibraryHubsErrors.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/errors/GetLibraryHubsErrors.md b/docs/models/errors/GetLibraryHubsErrors.md deleted file mode 100644 index c3210bd7..00000000 --- a/docs/models/errors/GetLibraryHubsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryHubsErrors - - -## 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/GetLibraryHubsHubsErrors.md b/docs/models/errors/GetLibraryHubsHubsErrors.md deleted file mode 100644 index 5be4a73e..00000000 --- a/docs/models/errors/GetLibraryHubsHubsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryHubsHubsErrors - - -## 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/GetLibraryHubsUnauthorized.md b/docs/models/errors/GetLibraryHubsUnauthorized.md deleted file mode 100644 index 611050c8..00000000 --- a/docs/models/errors/GetLibraryHubsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryHubsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetLibraryHubsHubsErrors](../../models/errors/GetLibraryHubsHubsErrors.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/errors/GetLibraryItemsBadRequest.md b/docs/models/errors/GetLibraryItemsBadRequest.md deleted file mode 100644 index 3018a61d..00000000 --- a/docs/models/errors/GetLibraryItemsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryItemsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetLibraryItemsErrors](../../models/errors/GetLibraryItemsErrors.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/errors/GetLibraryItemsErrors.md b/docs/models/errors/GetLibraryItemsErrors.md deleted file mode 100644 index 7f703dc9..00000000 --- a/docs/models/errors/GetLibraryItemsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryItemsErrors - - -## 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/GetLibraryItemsLibraryErrors.md b/docs/models/errors/GetLibraryItemsLibraryErrors.md deleted file mode 100644 index 99d6936e..00000000 --- a/docs/models/errors/GetLibraryItemsLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryItemsLibraryErrors - - -## 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/GetLibraryItemsUnauthorized.md b/docs/models/errors/GetLibraryItemsUnauthorized.md deleted file mode 100644 index 35d8ed1b..00000000 --- a/docs/models/errors/GetLibraryItemsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryItemsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetLibraryItemsLibraryErrors](../../models/errors/GetLibraryItemsLibraryErrors.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/errors/GetLibrarySectionsAllBadRequest.md b/docs/models/errors/GetLibrarySectionsAllBadRequest.md deleted file mode 100644 index 2ff2f522..00000000 --- a/docs/models/errors/GetLibrarySectionsAllBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibrarySectionsAllBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetLibrarySectionsAllErrors](../../models/errors/GetLibrarySectionsAllErrors.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/errors/GetLibrarySectionsAllErrors.md b/docs/models/errors/GetLibrarySectionsAllErrors.md deleted file mode 100644 index 2b172586..00000000 --- a/docs/models/errors/GetLibrarySectionsAllErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibrarySectionsAllErrors - - -## 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/GetLibrarySectionsAllLibraryErrors.md b/docs/models/errors/GetLibrarySectionsAllLibraryErrors.md deleted file mode 100644 index 6a1714a5..00000000 --- a/docs/models/errors/GetLibrarySectionsAllLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibrarySectionsAllLibraryErrors - - -## 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/GetLibrarySectionsAllUnauthorized.md b/docs/models/errors/GetLibrarySectionsAllUnauthorized.md deleted file mode 100644 index abb2353f..00000000 --- a/docs/models/errors/GetLibrarySectionsAllUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibrarySectionsAllUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetLibrarySectionsAllLibraryErrors](../../models/errors/GetLibrarySectionsAllLibraryErrors.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/errors/GetMediaMetaDataBadRequest.md b/docs/models/errors/GetMediaMetaDataBadRequest.md deleted file mode 100644 index 8880470d..00000000 --- a/docs/models/errors/GetMediaMetaDataBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaMetaDataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetMediaMetaDataErrors](../../models/errors/GetMediaMetaDataErrors.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/errors/GetMediaMetaDataErrors.md b/docs/models/errors/GetMediaMetaDataErrors.md deleted file mode 100644 index 13275f41..00000000 --- a/docs/models/errors/GetMediaMetaDataErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaMetaDataErrors - - -## 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/GetMediaMetaDataLibraryErrors.md b/docs/models/errors/GetMediaMetaDataLibraryErrors.md deleted file mode 100644 index d67b12b9..00000000 --- a/docs/models/errors/GetMediaMetaDataLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaMetaDataLibraryErrors - - -## 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/GetMediaMetaDataUnauthorized.md b/docs/models/errors/GetMediaMetaDataUnauthorized.md deleted file mode 100644 index bd7ff981..00000000 --- a/docs/models/errors/GetMediaMetaDataUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaMetaDataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetMediaMetaDataLibraryErrors](../../models/errors/GetMediaMetaDataLibraryErrors.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/errors/GetMediaProvidersBadRequest.md b/docs/models/errors/GetMediaProvidersBadRequest.md deleted file mode 100644 index 9d37cbfc..00000000 --- a/docs/models/errors/GetMediaProvidersBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaProvidersBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetMediaProvidersErrors](../../models/errors/GetMediaProvidersErrors.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/errors/GetMediaProvidersErrors.md b/docs/models/errors/GetMediaProvidersErrors.md deleted file mode 100644 index 39f77733..00000000 --- a/docs/models/errors/GetMediaProvidersErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaProvidersErrors - - -## 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/GetMediaProvidersServerErrors.md b/docs/models/errors/GetMediaProvidersServerErrors.md deleted file mode 100644 index 884a7343..00000000 --- a/docs/models/errors/GetMediaProvidersServerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaProvidersServerErrors - - -## 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/GetMediaProvidersUnauthorized.md b/docs/models/errors/GetMediaProvidersUnauthorized.md deleted file mode 100644 index 7966e91c..00000000 --- a/docs/models/errors/GetMediaProvidersUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaProvidersUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetMediaProvidersServerErrors](../../models/errors/GetMediaProvidersServerErrors.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/errors/GetMetadataChildrenBadRequest.md b/docs/models/errors/GetMetadataChildrenBadRequest.md deleted file mode 100644 index b7a3a188..00000000 --- a/docs/models/errors/GetMetadataChildrenBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMetadataChildrenBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetMetadataChildrenErrors](../../models/errors/GetMetadataChildrenErrors.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/errors/GetMetadataChildrenErrors.md b/docs/models/errors/GetMetadataChildrenErrors.md deleted file mode 100644 index e9555532..00000000 --- a/docs/models/errors/GetMetadataChildrenErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMetadataChildrenErrors - - -## 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/GetMetadataChildrenLibraryErrors.md b/docs/models/errors/GetMetadataChildrenLibraryErrors.md deleted file mode 100644 index 2e12cf45..00000000 --- a/docs/models/errors/GetMetadataChildrenLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMetadataChildrenLibraryErrors - - -## 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/GetMetadataChildrenUnauthorized.md b/docs/models/errors/GetMetadataChildrenUnauthorized.md deleted file mode 100644 index b85e97cb..00000000 --- a/docs/models/errors/GetMetadataChildrenUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMetadataChildrenUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetMetadataChildrenLibraryErrors](../../models/errors/GetMetadataChildrenLibraryErrors.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/errors/GetMyPlexAccountBadRequest.md b/docs/models/errors/GetMyPlexAccountBadRequest.md deleted file mode 100644 index 37d97972..00000000 --- a/docs/models/errors/GetMyPlexAccountBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMyPlexAccountBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetMyPlexAccountErrors](../../models/errors/GetMyPlexAccountErrors.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/errors/GetMyPlexAccountErrors.md b/docs/models/errors/GetMyPlexAccountErrors.md deleted file mode 100644 index 56b0e012..00000000 --- a/docs/models/errors/GetMyPlexAccountErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMyPlexAccountErrors - - -## 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/GetMyPlexAccountServerErrors.md b/docs/models/errors/GetMyPlexAccountServerErrors.md deleted file mode 100644 index d24dee12..00000000 --- a/docs/models/errors/GetMyPlexAccountServerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMyPlexAccountServerErrors - - -## 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/GetMyPlexAccountUnauthorized.md b/docs/models/errors/GetMyPlexAccountUnauthorized.md deleted file mode 100644 index 995f1f32..00000000 --- a/docs/models/errors/GetMyPlexAccountUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMyPlexAccountUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetMyPlexAccountServerErrors](../../models/errors/GetMyPlexAccountServerErrors.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/errors/GetPinBadRequest.md b/docs/models/errors/GetPinBadRequest.md deleted file mode 100644 index 098f242d..00000000 --- a/docs/models/errors/GetPinBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPinBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetPinErrors](../../models/errors/GetPinErrors.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/errors/GetPinErrors.md b/docs/models/errors/GetPinErrors.md deleted file mode 100644 index dd57468d..00000000 --- a/docs/models/errors/GetPinErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPinErrors - - -## 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/GetPlaylistBadRequest.md b/docs/models/errors/GetPlaylistBadRequest.md deleted file mode 100644 index de3bff2e..00000000 --- a/docs/models/errors/GetPlaylistBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPlaylistBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetPlaylistErrors](../../models/errors/GetPlaylistErrors.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/errors/GetPlaylistContentsBadRequest.md b/docs/models/errors/GetPlaylistContentsBadRequest.md deleted file mode 100644 index 71d3e1dc..00000000 --- a/docs/models/errors/GetPlaylistContentsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPlaylistContentsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetPlaylistContentsErrors](../../models/errors/GetPlaylistContentsErrors.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/errors/GetPlaylistContentsErrors.md b/docs/models/errors/GetPlaylistContentsErrors.md deleted file mode 100644 index c71333b6..00000000 --- a/docs/models/errors/GetPlaylistContentsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistContentsErrors - - -## 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/GetPlaylistContentsPlaylistsErrors.md b/docs/models/errors/GetPlaylistContentsPlaylistsErrors.md deleted file mode 100644 index 6ff23bbd..00000000 --- a/docs/models/errors/GetPlaylistContentsPlaylistsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistContentsPlaylistsErrors - - -## 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/GetPlaylistContentsUnauthorized.md b/docs/models/errors/GetPlaylistContentsUnauthorized.md deleted file mode 100644 index 74063100..00000000 --- a/docs/models/errors/GetPlaylistContentsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPlaylistContentsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetPlaylistContentsPlaylistsErrors](../../models/errors/GetPlaylistContentsPlaylistsErrors.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/errors/GetPlaylistErrors.md b/docs/models/errors/GetPlaylistErrors.md deleted file mode 100644 index 8d07653b..00000000 --- a/docs/models/errors/GetPlaylistErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistErrors - - -## 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/GetPlaylistPlaylistsErrors.md b/docs/models/errors/GetPlaylistPlaylistsErrors.md deleted file mode 100644 index 1e2011e7..00000000 --- a/docs/models/errors/GetPlaylistPlaylistsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistPlaylistsErrors - - -## 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/GetPlaylistUnauthorized.md b/docs/models/errors/GetPlaylistUnauthorized.md deleted file mode 100644 index 7b3a6f5a..00000000 --- a/docs/models/errors/GetPlaylistUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPlaylistUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetPlaylistPlaylistsErrors](../../models/errors/GetPlaylistPlaylistsErrors.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/errors/GetPlaylistsBadRequest.md b/docs/models/errors/GetPlaylistsBadRequest.md deleted file mode 100644 index c79df6f4..00000000 --- a/docs/models/errors/GetPlaylistsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPlaylistsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetPlaylistsErrors](../../models/errors/GetPlaylistsErrors.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/errors/GetPlaylistsErrors.md b/docs/models/errors/GetPlaylistsErrors.md deleted file mode 100644 index 5fb0306c..00000000 --- a/docs/models/errors/GetPlaylistsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistsErrors - - -## 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/GetPlaylistsPlaylistsErrors.md b/docs/models/errors/GetPlaylistsPlaylistsErrors.md deleted file mode 100644 index 2834703a..00000000 --- a/docs/models/errors/GetPlaylistsPlaylistsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistsPlaylistsErrors - - -## 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/GetPlaylistsUnauthorized.md b/docs/models/errors/GetPlaylistsUnauthorized.md deleted file mode 100644 index e16c1087..00000000 --- a/docs/models/errors/GetPlaylistsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPlaylistsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetPlaylistsPlaylistsErrors](../../models/errors/GetPlaylistsPlaylistsErrors.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/errors/GetRecentlyAddedLibraryBadRequest.md b/docs/models/errors/GetRecentlyAddedLibraryBadRequest.md deleted file mode 100644 index 5950525a..00000000 --- a/docs/models/errors/GetRecentlyAddedLibraryBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetRecentlyAddedLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetRecentlyAddedLibraryErrors](../../models/errors/GetRecentlyAddedLibraryErrors.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/errors/GetRecentlyAddedLibraryErrors.md b/docs/models/errors/GetRecentlyAddedLibraryErrors.md deleted file mode 100644 index 88575d38..00000000 --- a/docs/models/errors/GetRecentlyAddedLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetRecentlyAddedLibraryErrors - - -## 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/GetRecentlyAddedLibraryLibraryErrors.md b/docs/models/errors/GetRecentlyAddedLibraryLibraryErrors.md deleted file mode 100644 index b7590da2..00000000 --- a/docs/models/errors/GetRecentlyAddedLibraryLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/GetRecentlyAddedLibraryUnauthorized.md b/docs/models/errors/GetRecentlyAddedLibraryUnauthorized.md deleted file mode 100644 index 0079161d..00000000 --- a/docs/models/errors/GetRecentlyAddedLibraryUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetRecentlyAddedLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `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/errors/GetRefreshLibraryMetadataBadRequest.md b/docs/models/errors/GetRefreshLibraryMetadataBadRequest.md deleted file mode 100644 index bcb179c9..00000000 --- a/docs/models/errors/GetRefreshLibraryMetadataBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetRefreshLibraryMetadataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetRefreshLibraryMetadataErrors](../../models/errors/GetRefreshLibraryMetadataErrors.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/errors/GetRefreshLibraryMetadataErrors.md b/docs/models/errors/GetRefreshLibraryMetadataErrors.md deleted file mode 100644 index 1cde9be8..00000000 --- a/docs/models/errors/GetRefreshLibraryMetadataErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetRefreshLibraryMetadataErrors - - -## 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/GetRefreshLibraryMetadataLibraryErrors.md b/docs/models/errors/GetRefreshLibraryMetadataLibraryErrors.md deleted file mode 100644 index 26e6fc86..00000000 --- a/docs/models/errors/GetRefreshLibraryMetadataLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetRefreshLibraryMetadataLibraryErrors - - -## 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/GetRefreshLibraryMetadataUnauthorized.md b/docs/models/errors/GetRefreshLibraryMetadataUnauthorized.md deleted file mode 100644 index 2b030095..00000000 --- a/docs/models/errors/GetRefreshLibraryMetadataUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetRefreshLibraryMetadataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetRefreshLibraryMetadataLibraryErrors](../../models/errors/GetRefreshLibraryMetadataLibraryErrors.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/errors/GetResizedPhotoBadRequest.md b/docs/models/errors/GetResizedPhotoBadRequest.md deleted file mode 100644 index 6e13e5dd..00000000 --- a/docs/models/errors/GetResizedPhotoBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetResizedPhotoBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetResizedPhotoErrors](../../models/errors/GetResizedPhotoErrors.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/errors/GetResizedPhotoErrors.md b/docs/models/errors/GetResizedPhotoErrors.md deleted file mode 100644 index c7c2542c..00000000 --- a/docs/models/errors/GetResizedPhotoErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetResizedPhotoErrors - - -## 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/GetResizedPhotoServerErrors.md b/docs/models/errors/GetResizedPhotoServerErrors.md deleted file mode 100644 index 8ca86bde..00000000 --- a/docs/models/errors/GetResizedPhotoServerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetResizedPhotoServerErrors - - -## 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/GetResizedPhotoUnauthorized.md b/docs/models/errors/GetResizedPhotoUnauthorized.md deleted file mode 100644 index d824488b..00000000 --- a/docs/models/errors/GetResizedPhotoUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetResizedPhotoUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetResizedPhotoServerErrors](../../models/errors/GetResizedPhotoServerErrors.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/errors/GetResourcesStatisticsBadRequest.md b/docs/models/errors/GetResourcesStatisticsBadRequest.md deleted file mode 100644 index a89571e2..00000000 --- a/docs/models/errors/GetResourcesStatisticsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetResourcesStatisticsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetResourcesStatisticsErrors](../../models/errors/GetResourcesStatisticsErrors.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/errors/GetResourcesStatisticsErrors.md b/docs/models/errors/GetResourcesStatisticsErrors.md deleted file mode 100644 index dbb29061..00000000 --- a/docs/models/errors/GetResourcesStatisticsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetResourcesStatisticsErrors - - -## 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/GetResourcesStatisticsStatisticsErrors.md b/docs/models/errors/GetResourcesStatisticsStatisticsErrors.md deleted file mode 100644 index 6a8ee8cc..00000000 --- a/docs/models/errors/GetResourcesStatisticsStatisticsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetResourcesStatisticsStatisticsErrors - - -## 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/GetResourcesStatisticsUnauthorized.md b/docs/models/errors/GetResourcesStatisticsUnauthorized.md deleted file mode 100644 index f6befbef..00000000 --- a/docs/models/errors/GetResourcesStatisticsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetResourcesStatisticsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetResourcesStatisticsStatisticsErrors](../../models/errors/GetResourcesStatisticsStatisticsErrors.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/errors/GetSearchAllLibrariesBadRequest.md b/docs/models/errors/GetSearchAllLibrariesBadRequest.md deleted file mode 100644 index 802a883c..00000000 --- a/docs/models/errors/GetSearchAllLibrariesBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchAllLibrariesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSearchAllLibrariesErrors](../../models/errors/GetSearchAllLibrariesErrors.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/errors/GetSearchAllLibrariesErrors.md b/docs/models/errors/GetSearchAllLibrariesErrors.md deleted file mode 100644 index 4b640934..00000000 --- a/docs/models/errors/GetSearchAllLibrariesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchAllLibrariesErrors - - -## 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/GetSearchAllLibrariesLibraryErrors.md b/docs/models/errors/GetSearchAllLibrariesLibraryErrors.md deleted file mode 100644 index 1db3cae9..00000000 --- a/docs/models/errors/GetSearchAllLibrariesLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchAllLibrariesLibraryErrors - - -## 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/GetSearchAllLibrariesUnauthorized.md b/docs/models/errors/GetSearchAllLibrariesUnauthorized.md deleted file mode 100644 index 40698e9d..00000000 --- a/docs/models/errors/GetSearchAllLibrariesUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchAllLibrariesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSearchAllLibrariesLibraryErrors](../../models/errors/GetSearchAllLibrariesLibraryErrors.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/errors/GetSearchLibraryBadRequest.md b/docs/models/errors/GetSearchLibraryBadRequest.md deleted file mode 100644 index c1b7342c..00000000 --- a/docs/models/errors/GetSearchLibraryBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSearchLibraryErrors](../../models/errors/GetSearchLibraryErrors.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/errors/GetSearchLibraryErrors.md b/docs/models/errors/GetSearchLibraryErrors.md deleted file mode 100644 index 46fb8f53..00000000 --- a/docs/models/errors/GetSearchLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchLibraryErrors - - -## 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/GetSearchLibraryLibraryErrors.md b/docs/models/errors/GetSearchLibraryLibraryErrors.md deleted file mode 100644 index 283a4e3b..00000000 --- a/docs/models/errors/GetSearchLibraryLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchLibraryLibraryErrors - - -## 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/GetSearchLibraryUnauthorized.md b/docs/models/errors/GetSearchLibraryUnauthorized.md deleted file mode 100644 index 1bc10c4f..00000000 --- a/docs/models/errors/GetSearchLibraryUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSearchLibraryLibraryErrors](../../models/errors/GetSearchLibraryLibraryErrors.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/errors/GetSearchResultsBadRequest.md b/docs/models/errors/GetSearchResultsBadRequest.md deleted file mode 100644 index 0ce17c84..00000000 --- a/docs/models/errors/GetSearchResultsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchResultsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSearchResultsErrors](../../models/errors/GetSearchResultsErrors.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/errors/GetSearchResultsErrors.md b/docs/models/errors/GetSearchResultsErrors.md deleted file mode 100644 index 86075242..00000000 --- a/docs/models/errors/GetSearchResultsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchResultsErrors - - -## 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/GetSearchResultsSearchErrors.md b/docs/models/errors/GetSearchResultsSearchErrors.md deleted file mode 100644 index 750b7a27..00000000 --- a/docs/models/errors/GetSearchResultsSearchErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchResultsSearchErrors - - -## 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/GetSearchResultsUnauthorized.md b/docs/models/errors/GetSearchResultsUnauthorized.md deleted file mode 100644 index 18fdaa52..00000000 --- a/docs/models/errors/GetSearchResultsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchResultsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSearchResultsSearchErrors](../../models/errors/GetSearchResultsSearchErrors.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/errors/GetServerActivitiesActivitiesErrors.md b/docs/models/errors/GetServerActivitiesActivitiesErrors.md deleted file mode 100644 index 7280f3ae..00000000 --- a/docs/models/errors/GetServerActivitiesActivitiesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerActivitiesActivitiesErrors - - -## 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/GetServerActivitiesBadRequest.md b/docs/models/errors/GetServerActivitiesBadRequest.md deleted file mode 100644 index 4426ff02..00000000 --- a/docs/models/errors/GetServerActivitiesBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerActivitiesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetServerActivitiesErrors](../../models/errors/GetServerActivitiesErrors.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/errors/GetServerActivitiesErrors.md b/docs/models/errors/GetServerActivitiesErrors.md deleted file mode 100644 index ea20ce07..00000000 --- a/docs/models/errors/GetServerActivitiesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerActivitiesErrors - - -## 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/GetServerActivitiesUnauthorized.md b/docs/models/errors/GetServerActivitiesUnauthorized.md deleted file mode 100644 index 00fa5b4b..00000000 --- a/docs/models/errors/GetServerActivitiesUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerActivitiesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetServerActivitiesActivitiesErrors](../../models/errors/GetServerActivitiesActivitiesErrors.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/errors/GetServerCapabilitiesBadRequest.md b/docs/models/errors/GetServerCapabilitiesBadRequest.md deleted file mode 100644 index 74d1f3b0..00000000 --- a/docs/models/errors/GetServerCapabilitiesBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerCapabilitiesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[Errors](../../models/errors/Errors.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/errors/GetServerCapabilitiesErrors.md b/docs/models/errors/GetServerCapabilitiesErrors.md deleted file mode 100644 index d1def08f..00000000 --- a/docs/models/errors/GetServerCapabilitiesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerCapabilitiesErrors - - -## 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/GetServerCapabilitiesUnauthorized.md b/docs/models/errors/GetServerCapabilitiesUnauthorized.md deleted file mode 100644 index af172822..00000000 --- a/docs/models/errors/GetServerCapabilitiesUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerCapabilitiesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetServerCapabilitiesErrors](../../models/errors/GetServerCapabilitiesErrors.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/errors/GetServerIdentityRequestTimeout.md b/docs/models/errors/GetServerIdentityRequestTimeout.md deleted file mode 100644 index 9878df55..00000000 --- a/docs/models/errors/GetServerIdentityRequestTimeout.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetServerIdentityRequestTimeout - -Request Timeout - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `code` | *Optional\* | :heavy_minus_sign: | N/A | 408 | -| `message` | *Optional\* | :heavy_minus_sign: | N/A | The server timed out waiting for the request. | -| `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/errors/GetServerListBadRequest.md b/docs/models/errors/GetServerListBadRequest.md deleted file mode 100644 index a374e49d..00000000 --- a/docs/models/errors/GetServerListBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerListBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetServerListErrors](../../models/errors/GetServerListErrors.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/errors/GetServerListErrors.md b/docs/models/errors/GetServerListErrors.md deleted file mode 100644 index 8d2707ec..00000000 --- a/docs/models/errors/GetServerListErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerListErrors - - -## 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/GetServerListServerErrors.md b/docs/models/errors/GetServerListServerErrors.md deleted file mode 100644 index 2355317f..00000000 --- a/docs/models/errors/GetServerListServerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerListServerErrors - - -## 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/GetServerListUnauthorized.md b/docs/models/errors/GetServerListUnauthorized.md deleted file mode 100644 index a2f0e2af..00000000 --- a/docs/models/errors/GetServerListUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerListUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetServerListServerErrors](../../models/errors/GetServerListServerErrors.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/errors/GetServerPreferencesBadRequest.md b/docs/models/errors/GetServerPreferencesBadRequest.md deleted file mode 100644 index 88fe67c1..00000000 --- a/docs/models/errors/GetServerPreferencesBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerPreferencesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetServerPreferencesErrors](../../models/errors/GetServerPreferencesErrors.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/errors/GetServerPreferencesErrors.md b/docs/models/errors/GetServerPreferencesErrors.md deleted file mode 100644 index 2b1baa99..00000000 --- a/docs/models/errors/GetServerPreferencesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerPreferencesErrors - - -## 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/GetServerPreferencesServerErrors.md b/docs/models/errors/GetServerPreferencesServerErrors.md deleted file mode 100644 index c9cadede..00000000 --- a/docs/models/errors/GetServerPreferencesServerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerPreferencesServerErrors - - -## 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/GetServerPreferencesUnauthorized.md b/docs/models/errors/GetServerPreferencesUnauthorized.md deleted file mode 100644 index d2920ac0..00000000 --- a/docs/models/errors/GetServerPreferencesUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerPreferencesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetServerPreferencesServerErrors](../../models/errors/GetServerPreferencesServerErrors.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/errors/GetServerResourcesBadRequest.md b/docs/models/errors/GetServerResourcesBadRequest.md deleted file mode 100644 index ea85d567..00000000 --- a/docs/models/errors/GetServerResourcesBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerResourcesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetServerResourcesErrors](../../models/errors/GetServerResourcesErrors.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/errors/GetServerResourcesErrors.md b/docs/models/errors/GetServerResourcesErrors.md deleted file mode 100644 index 2fe93c7f..00000000 --- a/docs/models/errors/GetServerResourcesErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerResourcesErrors - - -## 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/GetServerResourcesPlexErrors.md b/docs/models/errors/GetServerResourcesPlexErrors.md deleted file mode 100644 index da014a68..00000000 --- a/docs/models/errors/GetServerResourcesPlexErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerResourcesPlexErrors - - -## 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/GetServerResourcesUnauthorized.md b/docs/models/errors/GetServerResourcesUnauthorized.md deleted file mode 100644 index 4a828424..00000000 --- a/docs/models/errors/GetServerResourcesUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerResourcesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetServerResourcesPlexErrors](../../models/errors/GetServerResourcesPlexErrors.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/errors/GetSessionHistoryBadRequest.md b/docs/models/errors/GetSessionHistoryBadRequest.md deleted file mode 100644 index 29caffa5..00000000 --- a/docs/models/errors/GetSessionHistoryBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSessionHistoryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSessionHistoryErrors](../../models/errors/GetSessionHistoryErrors.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/errors/GetSessionHistoryErrors.md b/docs/models/errors/GetSessionHistoryErrors.md deleted file mode 100644 index c5d3b9a5..00000000 --- a/docs/models/errors/GetSessionHistoryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSessionHistoryErrors - - -## 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/GetSessionHistorySessionsErrors.md b/docs/models/errors/GetSessionHistorySessionsErrors.md deleted file mode 100644 index 3655f964..00000000 --- a/docs/models/errors/GetSessionHistorySessionsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSessionHistorySessionsErrors - - -## 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/GetSessionHistoryUnauthorized.md b/docs/models/errors/GetSessionHistoryUnauthorized.md deleted file mode 100644 index 65033633..00000000 --- a/docs/models/errors/GetSessionHistoryUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSessionHistoryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSessionHistorySessionsErrors](../../models/errors/GetSessionHistorySessionsErrors.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/errors/GetSessionsBadRequest.md b/docs/models/errors/GetSessionsBadRequest.md deleted file mode 100644 index 2718d055..00000000 --- a/docs/models/errors/GetSessionsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSessionsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSessionsErrors](../../models/errors/GetSessionsErrors.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/errors/GetSessionsErrors.md b/docs/models/errors/GetSessionsErrors.md deleted file mode 100644 index 98cc5d49..00000000 --- a/docs/models/errors/GetSessionsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSessionsErrors - - -## 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/GetSessionsSessionsErrors.md b/docs/models/errors/GetSessionsSessionsErrors.md deleted file mode 100644 index 33d924dd..00000000 --- a/docs/models/errors/GetSessionsSessionsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSessionsSessionsErrors - - -## 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/GetSessionsUnauthorized.md b/docs/models/errors/GetSessionsUnauthorized.md deleted file mode 100644 index ceb68ee6..00000000 --- a/docs/models/errors/GetSessionsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSessionsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSessionsSessionsErrors](../../models/errors/GetSessionsSessionsErrors.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/errors/GetSourceConnectionInformationAuthenticationErrors.md b/docs/models/errors/GetSourceConnectionInformationAuthenticationErrors.md deleted file mode 100644 index b79bdd98..00000000 --- a/docs/models/errors/GetSourceConnectionInformationAuthenticationErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSourceConnectionInformationAuthenticationErrors - - -## 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/GetSourceConnectionInformationBadRequest.md b/docs/models/errors/GetSourceConnectionInformationBadRequest.md deleted file mode 100644 index e9d48568..00000000 --- a/docs/models/errors/GetSourceConnectionInformationBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSourceConnectionInformationBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSourceConnectionInformationErrors](../../models/errors/GetSourceConnectionInformationErrors.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/errors/GetSourceConnectionInformationErrors.md b/docs/models/errors/GetSourceConnectionInformationErrors.md deleted file mode 100644 index ba0b7786..00000000 --- a/docs/models/errors/GetSourceConnectionInformationErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSourceConnectionInformationErrors - - -## 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/GetSourceConnectionInformationUnauthorized.md b/docs/models/errors/GetSourceConnectionInformationUnauthorized.md deleted file mode 100644 index 6bc58500..00000000 --- a/docs/models/errors/GetSourceConnectionInformationUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSourceConnectionInformationUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetSourceConnectionInformationAuthenticationErrors](../../models/errors/GetSourceConnectionInformationAuthenticationErrors.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/errors/GetStatisticsBadRequest.md b/docs/models/errors/GetStatisticsBadRequest.md deleted file mode 100644 index 8d831e9a..00000000 --- a/docs/models/errors/GetStatisticsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetStatisticsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetStatisticsErrors](../../models/errors/GetStatisticsErrors.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/errors/GetStatisticsErrors.md b/docs/models/errors/GetStatisticsErrors.md deleted file mode 100644 index 03d3c8be..00000000 --- a/docs/models/errors/GetStatisticsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetStatisticsErrors - - -## 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/GetStatisticsStatisticsErrors.md b/docs/models/errors/GetStatisticsStatisticsErrors.md deleted file mode 100644 index 37b6baa3..00000000 --- a/docs/models/errors/GetStatisticsStatisticsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetStatisticsStatisticsErrors - - -## 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/GetStatisticsUnauthorized.md b/docs/models/errors/GetStatisticsUnauthorized.md deleted file mode 100644 index 73d4d5af..00000000 --- a/docs/models/errors/GetStatisticsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetStatisticsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetStatisticsStatisticsErrors](../../models/errors/GetStatisticsStatisticsErrors.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/errors/GetThumbImageBadRequest.md b/docs/models/errors/GetThumbImageBadRequest.md deleted file mode 100644 index a602bf25..00000000 --- a/docs/models/errors/GetThumbImageBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetThumbImageBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetThumbImageErrors](../../models/errors/GetThumbImageErrors.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/errors/GetThumbImageErrors.md b/docs/models/errors/GetThumbImageErrors.md deleted file mode 100644 index 3f65d0a2..00000000 --- a/docs/models/errors/GetThumbImageErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetThumbImageErrors - - -## 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/GetThumbImageMediaErrors.md b/docs/models/errors/GetThumbImageMediaErrors.md deleted file mode 100644 index 65afba96..00000000 --- a/docs/models/errors/GetThumbImageMediaErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetThumbImageMediaErrors - - -## 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/GetThumbImageUnauthorized.md b/docs/models/errors/GetThumbImageUnauthorized.md deleted file mode 100644 index dfe05b5e..00000000 --- a/docs/models/errors/GetThumbImageUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetThumbImageUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetThumbImageMediaErrors](../../models/errors/GetThumbImageMediaErrors.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/errors/GetTimelineBadRequest.md b/docs/models/errors/GetTimelineBadRequest.md deleted file mode 100644 index 57ec7d4f..00000000 --- a/docs/models/errors/GetTimelineBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTimelineBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTimelineErrors](../../models/errors/GetTimelineErrors.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/errors/GetTimelineErrors.md b/docs/models/errors/GetTimelineErrors.md deleted file mode 100644 index b091947b..00000000 --- a/docs/models/errors/GetTimelineErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTimelineErrors - - -## 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/GetTimelineUnauthorized.md b/docs/models/errors/GetTimelineUnauthorized.md deleted file mode 100644 index 6b0a2ab2..00000000 --- a/docs/models/errors/GetTimelineUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTimelineUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTimelineVideoErrors](../../models/errors/GetTimelineVideoErrors.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/errors/GetTimelineVideoErrors.md b/docs/models/errors/GetTimelineVideoErrors.md deleted file mode 100644 index 09c1ee60..00000000 --- a/docs/models/errors/GetTimelineVideoErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTimelineVideoErrors - - -## 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/GetTokenByPinIdBadRequest.md b/docs/models/errors/GetTokenByPinIdBadRequest.md deleted file mode 100644 index 5706bed6..00000000 --- a/docs/models/errors/GetTokenByPinIdBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTokenByPinIdBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTokenByPinIdErrors](../../models/errors/GetTokenByPinIdErrors.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/errors/GetTokenByPinIdErrors.md b/docs/models/errors/GetTokenByPinIdErrors.md deleted file mode 100644 index 48cfd9b1..00000000 --- a/docs/models/errors/GetTokenByPinIdErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTokenByPinIdErrors - - -## 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/GetTokenByPinIdPlexErrors.md b/docs/models/errors/GetTokenByPinIdPlexErrors.md deleted file mode 100644 index d61cfd82..00000000 --- a/docs/models/errors/GetTokenByPinIdPlexErrors.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTokenByPinIdPlexErrors - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `code` | *Optional\* | :heavy_minus_sign: | N/A | 1020 | -| `message` | *Optional\* | :heavy_minus_sign: | N/A | Code not found or expired | \ No newline at end of file diff --git a/docs/models/errors/GetTokenByPinIdResponseBody.md b/docs/models/errors/GetTokenByPinIdResponseBody.md deleted file mode 100644 index 76956d93..00000000 --- a/docs/models/errors/GetTokenByPinIdResponseBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTokenByPinIdResponseBody - -Not Found or Expired - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTokenByPinIdPlexErrors](../../models/errors/GetTokenByPinIdPlexErrors.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/errors/GetTokenDetailsAuthenticationErrors.md b/docs/models/errors/GetTokenDetailsAuthenticationErrors.md deleted file mode 100644 index 6fad3f42..00000000 --- a/docs/models/errors/GetTokenDetailsAuthenticationErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTokenDetailsAuthenticationErrors - - -## 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/GetTokenDetailsBadRequest.md b/docs/models/errors/GetTokenDetailsBadRequest.md deleted file mode 100644 index 7606704d..00000000 --- a/docs/models/errors/GetTokenDetailsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTokenDetailsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTokenDetailsErrors](../../models/errors/GetTokenDetailsErrors.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/errors/GetTokenDetailsErrors.md b/docs/models/errors/GetTokenDetailsErrors.md deleted file mode 100644 index af0dce4b..00000000 --- a/docs/models/errors/GetTokenDetailsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTokenDetailsErrors - - -## 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/GetTokenDetailsUnauthorized.md b/docs/models/errors/GetTokenDetailsUnauthorized.md deleted file mode 100644 index d63632f5..00000000 --- a/docs/models/errors/GetTokenDetailsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTokenDetailsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTokenDetailsAuthenticationErrors](../../models/errors/GetTokenDetailsAuthenticationErrors.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/errors/GetTopWatchedContentBadRequest.md b/docs/models/errors/GetTopWatchedContentBadRequest.md deleted file mode 100644 index 17b1300d..00000000 --- a/docs/models/errors/GetTopWatchedContentBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTopWatchedContentBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTopWatchedContentErrors](../../models/errors/GetTopWatchedContentErrors.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/errors/GetTopWatchedContentErrors.md b/docs/models/errors/GetTopWatchedContentErrors.md deleted file mode 100644 index 02e3700b..00000000 --- a/docs/models/errors/GetTopWatchedContentErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTopWatchedContentErrors - - -## 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/GetTopWatchedContentLibraryErrors.md b/docs/models/errors/GetTopWatchedContentLibraryErrors.md deleted file mode 100644 index 09ed83c1..00000000 --- a/docs/models/errors/GetTopWatchedContentLibraryErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTopWatchedContentLibraryErrors - - -## 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/GetTopWatchedContentUnauthorized.md b/docs/models/errors/GetTopWatchedContentUnauthorized.md deleted file mode 100644 index 04421a4c..00000000 --- a/docs/models/errors/GetTopWatchedContentUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTopWatchedContentUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTopWatchedContentLibraryErrors](../../models/errors/GetTopWatchedContentLibraryErrors.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/errors/GetTranscodeSessionsBadRequest.md b/docs/models/errors/GetTranscodeSessionsBadRequest.md deleted file mode 100644 index 63949f4a..00000000 --- a/docs/models/errors/GetTranscodeSessionsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTranscodeSessionsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTranscodeSessionsErrors](../../models/errors/GetTranscodeSessionsErrors.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/errors/GetTranscodeSessionsErrors.md b/docs/models/errors/GetTranscodeSessionsErrors.md deleted file mode 100644 index 618e7344..00000000 --- a/docs/models/errors/GetTranscodeSessionsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTranscodeSessionsErrors - - -## 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/GetTranscodeSessionsSessionsErrors.md b/docs/models/errors/GetTranscodeSessionsSessionsErrors.md deleted file mode 100644 index fd5078ab..00000000 --- a/docs/models/errors/GetTranscodeSessionsSessionsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTranscodeSessionsSessionsErrors - - -## 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/GetTranscodeSessionsUnauthorized.md b/docs/models/errors/GetTranscodeSessionsUnauthorized.md deleted file mode 100644 index 59e2bd97..00000000 --- a/docs/models/errors/GetTranscodeSessionsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTranscodeSessionsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTranscodeSessionsSessionsErrors](../../models/errors/GetTranscodeSessionsSessionsErrors.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/errors/GetTransientTokenAuthenticationErrors.md b/docs/models/errors/GetTransientTokenAuthenticationErrors.md deleted file mode 100644 index 52f12a69..00000000 --- a/docs/models/errors/GetTransientTokenAuthenticationErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTransientTokenAuthenticationErrors - - -## 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/GetTransientTokenBadRequest.md b/docs/models/errors/GetTransientTokenBadRequest.md deleted file mode 100644 index dd663a63..00000000 --- a/docs/models/errors/GetTransientTokenBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTransientTokenBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTransientTokenErrors](../../models/errors/GetTransientTokenErrors.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/errors/GetTransientTokenErrors.md b/docs/models/errors/GetTransientTokenErrors.md deleted file mode 100644 index 7e4a3d63..00000000 --- a/docs/models/errors/GetTransientTokenErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTransientTokenErrors - - -## 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/GetTransientTokenUnauthorized.md b/docs/models/errors/GetTransientTokenUnauthorized.md deleted file mode 100644 index 8b8ee5e6..00000000 --- a/docs/models/errors/GetTransientTokenUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTransientTokenUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetTransientTokenAuthenticationErrors](../../models/errors/GetTransientTokenAuthenticationErrors.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/errors/GetUpdateStatusBadRequest.md b/docs/models/errors/GetUpdateStatusBadRequest.md deleted file mode 100644 index 6a0a8ad1..00000000 --- a/docs/models/errors/GetUpdateStatusBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUpdateStatusBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetUpdateStatusErrors](../../models/errors/GetUpdateStatusErrors.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/errors/GetUpdateStatusErrors.md b/docs/models/errors/GetUpdateStatusErrors.md deleted file mode 100644 index ededa42b..00000000 --- a/docs/models/errors/GetUpdateStatusErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetUpdateStatusErrors - - -## 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/GetUpdateStatusUnauthorized.md b/docs/models/errors/GetUpdateStatusUnauthorized.md deleted file mode 100644 index 6e4ce0d0..00000000 --- a/docs/models/errors/GetUpdateStatusUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUpdateStatusUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetUpdateStatusUpdaterErrors](../../models/errors/GetUpdateStatusUpdaterErrors.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/errors/GetUpdateStatusUpdaterErrors.md b/docs/models/errors/GetUpdateStatusUpdaterErrors.md deleted file mode 100644 index 54fd8957..00000000 --- a/docs/models/errors/GetUpdateStatusUpdaterErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetUpdateStatusUpdaterErrors - - -## 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/GetUserFriendsBadRequest.md b/docs/models/errors/GetUserFriendsBadRequest.md deleted file mode 100644 index c8c931c5..00000000 --- a/docs/models/errors/GetUserFriendsBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUserFriendsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetUserFriendsErrors](../../models/errors/GetUserFriendsErrors.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/errors/GetUserFriendsErrors.md b/docs/models/errors/GetUserFriendsErrors.md deleted file mode 100644 index 3797fe1f..00000000 --- a/docs/models/errors/GetUserFriendsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetUserFriendsErrors - - -## 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/GetUserFriendsPlexErrors.md b/docs/models/errors/GetUserFriendsPlexErrors.md deleted file mode 100644 index 855cb2af..00000000 --- a/docs/models/errors/GetUserFriendsPlexErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetUserFriendsPlexErrors - - -## 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/GetUserFriendsUnauthorized.md b/docs/models/errors/GetUserFriendsUnauthorized.md deleted file mode 100644 index 1b4f9063..00000000 --- a/docs/models/errors/GetUserFriendsUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUserFriendsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetUserFriendsPlexErrors](../../models/errors/GetUserFriendsPlexErrors.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/errors/GetUsersBadRequest.md b/docs/models/errors/GetUsersBadRequest.md deleted file mode 100644 index b1212684..00000000 --- a/docs/models/errors/GetUsersBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUsersBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetUsersErrors](../../models/errors/GetUsersErrors.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/errors/GetUsersErrors.md b/docs/models/errors/GetUsersErrors.md deleted file mode 100644 index 95b00857..00000000 --- a/docs/models/errors/GetUsersErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetUsersErrors - - -## 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/GetUsersUnauthorized.md b/docs/models/errors/GetUsersUnauthorized.md deleted file mode 100644 index 3c154d28..00000000 --- a/docs/models/errors/GetUsersUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUsersUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetUsersUsersErrors](../../models/errors/GetUsersUsersErrors.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/errors/GetUsersUsersErrors.md b/docs/models/errors/GetUsersUsersErrors.md deleted file mode 100644 index 695bfc36..00000000 --- a/docs/models/errors/GetUsersUsersErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetUsersUsersErrors - - -## 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/GetWatchListBadRequest.md b/docs/models/errors/GetWatchListBadRequest.md deleted file mode 100644 index b2fb74c1..00000000 --- a/docs/models/errors/GetWatchListBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetWatchListBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetWatchListErrors](../../models/errors/GetWatchListErrors.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/errors/GetWatchListErrors.md b/docs/models/errors/GetWatchListErrors.md deleted file mode 100644 index e83535ee..00000000 --- a/docs/models/errors/GetWatchListErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetWatchListErrors - - -## 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/GetWatchListUnauthorized.md b/docs/models/errors/GetWatchListUnauthorized.md deleted file mode 100644 index 16a23fd6..00000000 --- a/docs/models/errors/GetWatchListUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetWatchListUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[GetWatchListWatchlistErrors](../../models/errors/GetWatchListWatchlistErrors.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/errors/GetWatchListWatchlistErrors.md b/docs/models/errors/GetWatchListWatchlistErrors.md deleted file mode 100644 index 2a3e000c..00000000 --- a/docs/models/errors/GetWatchListWatchlistErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetWatchListWatchlistErrors - - -## 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/LogLineBadRequest.md b/docs/models/errors/LogLineBadRequest.md deleted file mode 100644 index 9169c16e..00000000 --- a/docs/models/errors/LogLineBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# LogLineBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[LogLineErrors](../../models/errors/LogLineErrors.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/errors/LogLineErrors.md b/docs/models/errors/LogLineErrors.md deleted file mode 100644 index 078d5451..00000000 --- a/docs/models/errors/LogLineErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# LogLineErrors - - -## 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/LogLineLogErrors.md b/docs/models/errors/LogLineLogErrors.md deleted file mode 100644 index c0363610..00000000 --- a/docs/models/errors/LogLineLogErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# LogLineLogErrors - - -## 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/LogLineUnauthorized.md b/docs/models/errors/LogLineUnauthorized.md deleted file mode 100644 index b38c2a21..00000000 --- a/docs/models/errors/LogLineUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# LogLineUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[LogLineLogErrors](../../models/errors/LogLineLogErrors.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/errors/LogMultiLineBadRequest.md b/docs/models/errors/LogMultiLineBadRequest.md deleted file mode 100644 index 42b91c57..00000000 --- a/docs/models/errors/LogMultiLineBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# LogMultiLineBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[LogMultiLineErrors](../../models/errors/LogMultiLineErrors.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/errors/LogMultiLineErrors.md b/docs/models/errors/LogMultiLineErrors.md deleted file mode 100644 index 43e310bf..00000000 --- a/docs/models/errors/LogMultiLineErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# LogMultiLineErrors - - -## 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/LogMultiLineLogErrors.md b/docs/models/errors/LogMultiLineLogErrors.md deleted file mode 100644 index f0be4edc..00000000 --- a/docs/models/errors/LogMultiLineLogErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# LogMultiLineLogErrors - - -## 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/LogMultiLineUnauthorized.md b/docs/models/errors/LogMultiLineUnauthorized.md deleted file mode 100644 index bdddfa1b..00000000 --- a/docs/models/errors/LogMultiLineUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# LogMultiLineUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[LogMultiLineLogErrors](../../models/errors/LogMultiLineLogErrors.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/errors/MarkPlayedBadRequest.md b/docs/models/errors/MarkPlayedBadRequest.md deleted file mode 100644 index 57e97be5..00000000 --- a/docs/models/errors/MarkPlayedBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkPlayedBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[MarkPlayedErrors](../../models/errors/MarkPlayedErrors.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/errors/MarkPlayedErrors.md b/docs/models/errors/MarkPlayedErrors.md deleted file mode 100644 index a07cbba7..00000000 --- a/docs/models/errors/MarkPlayedErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarkPlayedErrors - - -## 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/MarkPlayedMediaErrors.md b/docs/models/errors/MarkPlayedMediaErrors.md deleted file mode 100644 index 7cc96200..00000000 --- a/docs/models/errors/MarkPlayedMediaErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarkPlayedMediaErrors - - -## 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/MarkPlayedUnauthorized.md b/docs/models/errors/MarkPlayedUnauthorized.md deleted file mode 100644 index e0472702..00000000 --- a/docs/models/errors/MarkPlayedUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkPlayedUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[MarkPlayedMediaErrors](../../models/errors/MarkPlayedMediaErrors.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/errors/MarkUnplayedBadRequest.md b/docs/models/errors/MarkUnplayedBadRequest.md deleted file mode 100644 index bf3ebb53..00000000 --- a/docs/models/errors/MarkUnplayedBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkUnplayedBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[MarkUnplayedErrors](../../models/errors/MarkUnplayedErrors.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/errors/MarkUnplayedErrors.md b/docs/models/errors/MarkUnplayedErrors.md deleted file mode 100644 index 7974453d..00000000 --- a/docs/models/errors/MarkUnplayedErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarkUnplayedErrors - - -## 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/MarkUnplayedMediaErrors.md b/docs/models/errors/MarkUnplayedMediaErrors.md deleted file mode 100644 index 6429e9cf..00000000 --- a/docs/models/errors/MarkUnplayedMediaErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarkUnplayedMediaErrors - - -## 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/MarkUnplayedUnauthorized.md b/docs/models/errors/MarkUnplayedUnauthorized.md deleted file mode 100644 index 0376b5b2..00000000 --- a/docs/models/errors/MarkUnplayedUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkUnplayedUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[MarkUnplayedMediaErrors](../../models/errors/MarkUnplayedMediaErrors.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/errors/PerformSearchBadRequest.md b/docs/models/errors/PerformSearchBadRequest.md deleted file mode 100644 index 0324ed89..00000000 --- a/docs/models/errors/PerformSearchBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PerformSearchBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[PerformSearchErrors](../../models/errors/PerformSearchErrors.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/errors/PerformSearchErrors.md b/docs/models/errors/PerformSearchErrors.md deleted file mode 100644 index a5fe3f5a..00000000 --- a/docs/models/errors/PerformSearchErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# PerformSearchErrors - - -## 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/PerformSearchSearchErrors.md b/docs/models/errors/PerformSearchSearchErrors.md deleted file mode 100644 index cf04767b..00000000 --- a/docs/models/errors/PerformSearchSearchErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# PerformSearchSearchErrors - - -## 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/PerformSearchUnauthorized.md b/docs/models/errors/PerformSearchUnauthorized.md deleted file mode 100644 index 80e864c3..00000000 --- a/docs/models/errors/PerformSearchUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# PerformSearchUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[PerformSearchSearchErrors](../../models/errors/PerformSearchSearchErrors.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/errors/PerformVoiceSearchBadRequest.md b/docs/models/errors/PerformVoiceSearchBadRequest.md deleted file mode 100644 index 2714a778..00000000 --- a/docs/models/errors/PerformVoiceSearchBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PerformVoiceSearchBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[PerformVoiceSearchErrors](../../models/errors/PerformVoiceSearchErrors.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/errors/PerformVoiceSearchErrors.md b/docs/models/errors/PerformVoiceSearchErrors.md deleted file mode 100644 index 2ddd8d0c..00000000 --- a/docs/models/errors/PerformVoiceSearchErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# PerformVoiceSearchErrors - - -## 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/PerformVoiceSearchSearchErrors.md b/docs/models/errors/PerformVoiceSearchSearchErrors.md deleted file mode 100644 index 37437cc7..00000000 --- a/docs/models/errors/PerformVoiceSearchSearchErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# PerformVoiceSearchSearchErrors - - -## 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/PerformVoiceSearchUnauthorized.md b/docs/models/errors/PerformVoiceSearchUnauthorized.md deleted file mode 100644 index 477ca384..00000000 --- a/docs/models/errors/PerformVoiceSearchUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# PerformVoiceSearchUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[PerformVoiceSearchSearchErrors](../../models/errors/PerformVoiceSearchSearchErrors.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/errors/PostUsersSignInDataAuthenticationErrors.md b/docs/models/errors/PostUsersSignInDataAuthenticationErrors.md deleted file mode 100644 index cf4726d7..00000000 --- a/docs/models/errors/PostUsersSignInDataAuthenticationErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# PostUsersSignInDataAuthenticationErrors - - -## 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/PostUsersSignInDataBadRequest.md b/docs/models/errors/PostUsersSignInDataBadRequest.md deleted file mode 100644 index b9cc25b0..00000000 --- a/docs/models/errors/PostUsersSignInDataBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[PostUsersSignInDataErrors](../../models/errors/PostUsersSignInDataErrors.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/errors/PostUsersSignInDataErrors.md b/docs/models/errors/PostUsersSignInDataErrors.md deleted file mode 100644 index 4c661888..00000000 --- a/docs/models/errors/PostUsersSignInDataErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# PostUsersSignInDataErrors - - -## 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/PostUsersSignInDataUnauthorized.md b/docs/models/errors/PostUsersSignInDataUnauthorized.md deleted file mode 100644 index 20384591..00000000 --- a/docs/models/errors/PostUsersSignInDataUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[PostUsersSignInDataAuthenticationErrors](../../models/errors/PostUsersSignInDataAuthenticationErrors.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/errors/StartAllTasksBadRequest.md b/docs/models/errors/StartAllTasksBadRequest.md deleted file mode 100644 index 6d0ef47c..00000000 --- a/docs/models/errors/StartAllTasksBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StartAllTasksBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StartAllTasksErrors](../../models/errors/StartAllTasksErrors.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/errors/StartAllTasksButlerErrors.md b/docs/models/errors/StartAllTasksButlerErrors.md deleted file mode 100644 index ec7b093f..00000000 --- a/docs/models/errors/StartAllTasksButlerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartAllTasksButlerErrors - - -## 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/StartAllTasksErrors.md b/docs/models/errors/StartAllTasksErrors.md deleted file mode 100644 index da86f57a..00000000 --- a/docs/models/errors/StartAllTasksErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartAllTasksErrors - - -## 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/StartAllTasksUnauthorized.md b/docs/models/errors/StartAllTasksUnauthorized.md deleted file mode 100644 index 8cd8cc62..00000000 --- a/docs/models/errors/StartAllTasksUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# StartAllTasksUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StartAllTasksButlerErrors](../../models/errors/StartAllTasksButlerErrors.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/errors/StartTaskBadRequest.md b/docs/models/errors/StartTaskBadRequest.md deleted file mode 100644 index cd10734d..00000000 --- a/docs/models/errors/StartTaskBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StartTaskBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StartTaskErrors](../../models/errors/StartTaskErrors.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/errors/StartTaskButlerErrors.md b/docs/models/errors/StartTaskButlerErrors.md deleted file mode 100644 index 4239f8ed..00000000 --- a/docs/models/errors/StartTaskButlerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartTaskButlerErrors - - -## 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/StartTaskErrors.md b/docs/models/errors/StartTaskErrors.md deleted file mode 100644 index 7cfeb4a5..00000000 --- a/docs/models/errors/StartTaskErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartTaskErrors - - -## 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/StartTaskUnauthorized.md b/docs/models/errors/StartTaskUnauthorized.md deleted file mode 100644 index 4766ca75..00000000 --- a/docs/models/errors/StartTaskUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# StartTaskUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StartTaskButlerErrors](../../models/errors/StartTaskButlerErrors.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/errors/StartUniversalTranscodeBadRequest.md b/docs/models/errors/StartUniversalTranscodeBadRequest.md deleted file mode 100644 index a659bef2..00000000 --- a/docs/models/errors/StartUniversalTranscodeBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StartUniversalTranscodeBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StartUniversalTranscodeErrors](../../models/errors/StartUniversalTranscodeErrors.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/errors/StartUniversalTranscodeErrors.md b/docs/models/errors/StartUniversalTranscodeErrors.md deleted file mode 100644 index f66b107e..00000000 --- a/docs/models/errors/StartUniversalTranscodeErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartUniversalTranscodeErrors - - -## 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/StartUniversalTranscodeUnauthorized.md b/docs/models/errors/StartUniversalTranscodeUnauthorized.md deleted file mode 100644 index f16d0820..00000000 --- a/docs/models/errors/StartUniversalTranscodeUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# StartUniversalTranscodeUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StartUniversalTranscodeVideoErrors](../../models/errors/StartUniversalTranscodeVideoErrors.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/errors/StartUniversalTranscodeVideoErrors.md b/docs/models/errors/StartUniversalTranscodeVideoErrors.md deleted file mode 100644 index 4fabd51a..00000000 --- a/docs/models/errors/StartUniversalTranscodeVideoErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartUniversalTranscodeVideoErrors - - -## 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/StopAllTasksBadRequest.md b/docs/models/errors/StopAllTasksBadRequest.md deleted file mode 100644 index 95cce4c1..00000000 --- a/docs/models/errors/StopAllTasksBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StopAllTasksBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StopAllTasksErrors](../../models/errors/StopAllTasksErrors.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/errors/StopAllTasksButlerErrors.md b/docs/models/errors/StopAllTasksButlerErrors.md deleted file mode 100644 index ba040ee7..00000000 --- a/docs/models/errors/StopAllTasksButlerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopAllTasksButlerErrors - - -## 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/StopAllTasksErrors.md b/docs/models/errors/StopAllTasksErrors.md deleted file mode 100644 index 69d66df5..00000000 --- a/docs/models/errors/StopAllTasksErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopAllTasksErrors - - -## 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/StopAllTasksUnauthorized.md b/docs/models/errors/StopAllTasksUnauthorized.md deleted file mode 100644 index c63df42e..00000000 --- a/docs/models/errors/StopAllTasksUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# StopAllTasksUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StopAllTasksButlerErrors](../../models/errors/StopAllTasksButlerErrors.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/errors/StopTaskBadRequest.md b/docs/models/errors/StopTaskBadRequest.md deleted file mode 100644 index b956e7f4..00000000 --- a/docs/models/errors/StopTaskBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StopTaskBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StopTaskErrors](../../models/errors/StopTaskErrors.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/errors/StopTaskButlerErrors.md b/docs/models/errors/StopTaskButlerErrors.md deleted file mode 100644 index 96eb90b9..00000000 --- a/docs/models/errors/StopTaskButlerErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopTaskButlerErrors - - -## 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/StopTaskErrors.md b/docs/models/errors/StopTaskErrors.md deleted file mode 100644 index 38d1f76a..00000000 --- a/docs/models/errors/StopTaskErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopTaskErrors - - -## 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/StopTaskUnauthorized.md b/docs/models/errors/StopTaskUnauthorized.md deleted file mode 100644 index b695c538..00000000 --- a/docs/models/errors/StopTaskUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# StopTaskUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StopTaskButlerErrors](../../models/errors/StopTaskButlerErrors.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/errors/StopTranscodeSessionBadRequest.md b/docs/models/errors/StopTranscodeSessionBadRequest.md deleted file mode 100644 index 6bd7471c..00000000 --- a/docs/models/errors/StopTranscodeSessionBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StopTranscodeSessionBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StopTranscodeSessionErrors](../../models/errors/StopTranscodeSessionErrors.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/errors/StopTranscodeSessionErrors.md b/docs/models/errors/StopTranscodeSessionErrors.md deleted file mode 100644 index b64510cd..00000000 --- a/docs/models/errors/StopTranscodeSessionErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopTranscodeSessionErrors - - -## 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/StopTranscodeSessionSessionsErrors.md b/docs/models/errors/StopTranscodeSessionSessionsErrors.md deleted file mode 100644 index 3a03d0d3..00000000 --- a/docs/models/errors/StopTranscodeSessionSessionsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopTranscodeSessionSessionsErrors - - -## 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/StopTranscodeSessionUnauthorized.md b/docs/models/errors/StopTranscodeSessionUnauthorized.md deleted file mode 100644 index 7d4a3702..00000000 --- a/docs/models/errors/StopTranscodeSessionUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# StopTranscodeSessionUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[StopTranscodeSessionSessionsErrors](../../models/errors/StopTranscodeSessionSessionsErrors.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/errors/UpdatePlayProgressBadRequest.md b/docs/models/errors/UpdatePlayProgressBadRequest.md deleted file mode 100644 index 84c046f8..00000000 --- a/docs/models/errors/UpdatePlayProgressBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdatePlayProgressBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[UpdatePlayProgressErrors](../../models/errors/UpdatePlayProgressErrors.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/errors/UpdatePlayProgressErrors.md b/docs/models/errors/UpdatePlayProgressErrors.md deleted file mode 100644 index 2ce83f17..00000000 --- a/docs/models/errors/UpdatePlayProgressErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdatePlayProgressErrors - - -## 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/UpdatePlayProgressMediaErrors.md b/docs/models/errors/UpdatePlayProgressMediaErrors.md deleted file mode 100644 index c4b41b48..00000000 --- a/docs/models/errors/UpdatePlayProgressMediaErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdatePlayProgressMediaErrors - - -## 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/UpdatePlayProgressUnauthorized.md b/docs/models/errors/UpdatePlayProgressUnauthorized.md deleted file mode 100644 index 34edbdcd..00000000 --- a/docs/models/errors/UpdatePlayProgressUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdatePlayProgressUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[UpdatePlayProgressMediaErrors](../../models/errors/UpdatePlayProgressMediaErrors.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/errors/UpdatePlaylistBadRequest.md b/docs/models/errors/UpdatePlaylistBadRequest.md deleted file mode 100644 index 1f7bf6bb..00000000 --- a/docs/models/errors/UpdatePlaylistBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdatePlaylistBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[UpdatePlaylistErrors](../../models/errors/UpdatePlaylistErrors.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/errors/UpdatePlaylistErrors.md b/docs/models/errors/UpdatePlaylistErrors.md deleted file mode 100644 index 01743dfa..00000000 --- a/docs/models/errors/UpdatePlaylistErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdatePlaylistErrors - - -## 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/UpdatePlaylistPlaylistsErrors.md b/docs/models/errors/UpdatePlaylistPlaylistsErrors.md deleted file mode 100644 index 7dd8daed..00000000 --- a/docs/models/errors/UpdatePlaylistPlaylistsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdatePlaylistPlaylistsErrors - - -## 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/UpdatePlaylistUnauthorized.md b/docs/models/errors/UpdatePlaylistUnauthorized.md deleted file mode 100644 index 5aee2551..00000000 --- a/docs/models/errors/UpdatePlaylistUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdatePlaylistUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[UpdatePlaylistPlaylistsErrors](../../models/errors/UpdatePlaylistPlaylistsErrors.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/errors/UploadPlaylistBadRequest.md b/docs/models/errors/UploadPlaylistBadRequest.md deleted file mode 100644 index 3166acbd..00000000 --- a/docs/models/errors/UploadPlaylistBadRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UploadPlaylistBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[UploadPlaylistErrors](../../models/errors/UploadPlaylistErrors.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/errors/UploadPlaylistErrors.md b/docs/models/errors/UploadPlaylistErrors.md deleted file mode 100644 index 385aaf15..00000000 --- a/docs/models/errors/UploadPlaylistErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# UploadPlaylistErrors - - -## 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/UploadPlaylistPlaylistsErrors.md b/docs/models/errors/UploadPlaylistPlaylistsErrors.md deleted file mode 100644 index ddbacdc1..00000000 --- a/docs/models/errors/UploadPlaylistPlaylistsErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# UploadPlaylistPlaylistsErrors - - -## 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/UploadPlaylistUnauthorized.md b/docs/models/errors/UploadPlaylistUnauthorized.md deleted file mode 100644 index 8d46c189..00000000 --- a/docs/models/errors/UploadPlaylistUnauthorized.md +++ /dev/null @@ -1,11 +0,0 @@ -# UploadPlaylistUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `errors` | List\<[UploadPlaylistPlaylistsErrors](../../models/errors/UploadPlaylistPlaylistsErrors.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/Account.md b/docs/models/operations/Account.md index 27f715e7..12fee5cd 100644 --- a/docs/models/operations/Account.md +++ b/docs/models/operations/Account.md @@ -3,13 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 238960586 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /accounts/238960586 | -| `name` | *Optional\* | :heavy_minus_sign: | N/A | Diane | -| `defaultAudioLanguage` | *Optional\* | :heavy_minus_sign: | N/A | en | -| `autoSelectAudio` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `defaultSubtitleLanguage` | *Optional\* | :heavy_minus_sign: | N/A | en | -| `subtitleMode` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `globalViewCount` | *Optional\* | :heavy_minus_sign: | N/A | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Action.md b/docs/models/operations/Action.md index b1ae3281..495ab7e2 100644 --- a/docs/models/operations/Action.md +++ b/docs/models/operations/Action.md @@ -1,9 +1,12 @@ # Action +The action to perform for this item on this optimizer queue -## Fields -| Field | Type | Required | Description | Example | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `id` | *String* | :heavy_check_mark: | N/A | addToContinueWatching | -| `key` | *String* | :heavy_check_mark: | N/A | /actions/addToContinueWatching | \ No newline at end of file +## Values + +| Name | Value | +| ----------- | ----------- | +| `REPROCESS` | reprocess | +| `DISABLE` | disable | +| `ENABLE` | enable | \ No newline at end of file diff --git a/docs/models/operations/ActiveDirection.md b/docs/models/operations/ActiveDirection.md deleted file mode 100644 index 0b96d972..00000000 --- a/docs/models/operations/ActiveDirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActiveDirection - -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/Activity.md b/docs/models/operations/Activity.md index f95adbd4..3738d1f0 100644 --- a/docs/models/operations/Activity.md +++ b/docs/models/operations/Activity.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | -| `cancellable` | *Optional\* | :heavy_minus_sign: | N/A | -| `userID` | *Optional\* | :heavy_minus_sign: | N/A | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | -| `subtitle` | *Optional\* | :heavy_minus_sign: | N/A | -| `progress` | *Optional\* | :heavy_minus_sign: | N/A | -| `context` | [Optional\](../../models/operations/Context.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `cancellable` | *Optional\* | :heavy_minus_sign: | Indicates whether this activity can be cancelled | +| `context` | Map\ | :heavy_minus_sign: | An object with additional values | +| `progress` | *Optional\* | :heavy_minus_sign: | A progress percentage. A value of -1 means the progress is indeterminate | +| `response` | Map\ | :heavy_minus_sign: | An object with the response to the async opperation | +| `subtitle` | *Optional\* | :heavy_minus_sign: | A user-friendly sub-title for this activity | +| `title` | *Optional\* | :heavy_minus_sign: | A user-friendly title for this activity | +| `type` | *Optional\* | :heavy_minus_sign: | The type of activity | +| `userID` | *Optional\* | :heavy_minus_sign: | The user this activity belongs to | +| `uuid` | *Optional\* | :heavy_minus_sign: | The ID of the activity | \ No newline at end of file diff --git a/docs/models/operations/AddCollectionItemsRequest.md b/docs/models/operations/AddCollectionItemsRequest.md new file mode 100644 index 00000000..430bace6 --- /dev/null +++ b/docs/models/operations/AddCollectionItemsRequest.md @@ -0,0 +1,20 @@ +# AddCollectionItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `collectionId` | *long* | :heavy_check_mark: | The collection id | | +| `uri` | *String* | :heavy_check_mark: | The URI describing the items to add to this collection | | \ No newline at end of file diff --git a/docs/models/operations/AddCollectionItemsResponse.md b/docs/models/operations/AddCollectionItemsResponse.md new file mode 100644 index 00000000..afb2fb35 --- /dev/null +++ b/docs/models/operations/AddCollectionItemsResponse.md @@ -0,0 +1,11 @@ +# AddCollectionItemsResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/AddDeviceRequest.md b/docs/models/operations/AddDeviceRequest.md new file mode 100644 index 00000000..58b4917c --- /dev/null +++ b/docs/models/operations/AddDeviceRequest.md @@ -0,0 +1,19 @@ +# AddDeviceRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `uri` | *Optional\* | :heavy_minus_sign: | The URI of the device. | http://10.0.0.5 | \ No newline at end of file diff --git a/docs/models/operations/AddDeviceResponse.md b/docs/models/operations/AddDeviceResponse.md new file mode 100644 index 00000000..a9b35f1d --- /dev/null +++ b/docs/models/operations/AddDeviceResponse.md @@ -0,0 +1,11 @@ +# AddDeviceResponse + + +## 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 | +| `mediaContainerWithDevice` | [Optional\](../../models/shared/MediaContainerWithDevice.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/AddDeviceToDVRDVR.md b/docs/models/operations/AddDeviceToDVRDVR.md new file mode 100644 index 00000000..b3dbf59b --- /dev/null +++ b/docs/models/operations/AddDeviceToDVRDVR.md @@ -0,0 +1,12 @@ +# AddDeviceToDVRDVR + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `device` | List\<[Device](../../models/shared/Device.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | +| `lineup` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddDeviceToDVRDVRsMediaContainer.md b/docs/models/operations/AddDeviceToDVRDVRsMediaContainer.md new file mode 100644 index 00000000..1e19a3c5 --- /dev/null +++ b/docs/models/operations/AddDeviceToDVRDVRsMediaContainer.md @@ -0,0 +1,17 @@ +# AddDeviceToDVRDVRsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *Optional\* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/models/operations/AddDeviceToDVRMediaContainer.md b/docs/models/operations/AddDeviceToDVRMediaContainer.md new file mode 100644 index 00000000..cd4573f3 --- /dev/null +++ b/docs/models/operations/AddDeviceToDVRMediaContainer.md @@ -0,0 +1,9 @@ +# AddDeviceToDVRMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/AddDeviceToDVRDVRsMediaContainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | List\<[AddDeviceToDVRDVR](../../models/operations/AddDeviceToDVRDVR.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddDeviceToDVRRequest.md b/docs/models/operations/AddDeviceToDVRRequest.md new file mode 100644 index 00000000..df4e45ec --- /dev/null +++ b/docs/models/operations/AddDeviceToDVRRequest.md @@ -0,0 +1,20 @@ +# AddDeviceToDVRRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *long* | :heavy_check_mark: | The ID of the DVR. | | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device to add. | | \ No newline at end of file diff --git a/docs/models/operations/AddDeviceToDVRResponse.md b/docs/models/operations/AddDeviceToDVRResponse.md new file mode 100644 index 00000000..24965b5d --- /dev/null +++ b/docs/models/operations/AddDeviceToDVRResponse.md @@ -0,0 +1,12 @@ +# AddDeviceToDVRResponse + + +## 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/AddDeviceToDVRResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddDeviceToDVRResponseBody.md b/docs/models/operations/AddDeviceToDVRResponseBody.md new file mode 100644 index 00000000..23993d1a --- /dev/null +++ b/docs/models/operations/AddDeviceToDVRResponseBody.md @@ -0,0 +1,10 @@ +# AddDeviceToDVRResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/AddDeviceToDVRMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddDownloadQueueItemsMediaContainer.md b/docs/models/operations/AddDownloadQueueItemsMediaContainer.md new file mode 100644 index 00000000..98749f63 --- /dev/null +++ b/docs/models/operations/AddDownloadQueueItemsMediaContainer.md @@ -0,0 +1,17 @@ +# AddDownloadQueueItemsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `addedQueueItems` | List\<[AddedQueueItems](../../models/operations/AddedQueueItems.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddDownloadQueueItemsRequest.md b/docs/models/operations/AddDownloadQueueItemsRequest.md new file mode 100644 index 00000000..978f5cda --- /dev/null +++ b/docs/models/operations/AddDownloadQueueItemsRequest.md @@ -0,0 +1,46 @@ +# AddDownloadQueueItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *long* | :heavy_check_mark: | The queue id | | +| `keys` | List\<*String*> | :heavy_check_mark: | Keys to add | [
"/library/metadata/3",
"/library/metadata/6"
] | +| `advancedSubtitles` | [Optional\](../../models/shared/AdvancedSubtitles.md) | :heavy_minus_sign: | Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost
| burn | +| `audioBoost` | *Optional\* | :heavy_minus_sign: | Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) | 50 | +| `audioChannelCount` | *Optional\* | :heavy_minus_sign: | Target video number of audio channels. | 5 | +| `autoAdjustQuality` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports ABR. | 1 | +| `autoAdjustSubtitle` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates if the server should adjust subtitles based on Voice Activity Data. | 1 | +| `directPlay` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct playing the indicated content. | 1 | +| `directStream` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the video of the indicated content. | 1 | +| `directStreamAudio` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the audio of the indicated content. | 1 | +| `disableResolutionRotation` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates if resolution should be adjusted for orientation. | 1 | +| `hasMDE` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 | 1 | +| `location` | [Optional\](../../models/shared/Location.md) | :heavy_minus_sign: | Network type of the client, can be used to help determine target bitrate. | wan | +| `mediaBufferSize` | *Optional\* | :heavy_minus_sign: | Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. | 102400 | +| `mediaIndex` | *Optional\* | :heavy_minus_sign: | Index of the media to transcode. -1 or not specified indicates let the server choose. | 0 | +| `musicBitrate` | *Optional\* | :heavy_minus_sign: | Target bitrate for audio only files (in kbps, used to transcode). | 5000 | +| `offset` | *Optional\* | :heavy_minus_sign: | Offset from the start of the media (in seconds). | 90.5 | +| `partIndex` | *Optional\* | :heavy_minus_sign: | Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode | 0 | +| `path` | *Optional\* | :heavy_minus_sign: | Internal PMS path of the media to transcode. | /library/metadata/151671 | +| `peakBitrate` | *Optional\* | :heavy_minus_sign: | Maximum bitrate (in kbps) to use in ABR. | 12000 | +| `photoResolution` | *Optional\* | :heavy_minus_sign: | Target photo resolution. | 1080x1080 | +| `protocol` | [Optional\](../../models/shared/Protocol.md) | :heavy_minus_sign: | Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022)
| dash | +| `secondsPerSegment` | *Optional\* | :heavy_minus_sign: | Number of seconds to include in each transcoded segment | 5 | +| `subtitleSize` | *Optional\* | :heavy_minus_sign: | Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) | 50 | +| `subtitles` | [Optional\](../../models/shared/Subtitles.md) | :heavy_minus_sign: | Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream
| Burn | +| `videoBitrate` | *Optional\* | :heavy_minus_sign: | Target video bitrate (in kbps). | 12000 | +| `videoQuality` | *Optional\* | :heavy_minus_sign: | Target photo quality. | 50 | +| `videoResolution` | *Optional\* | :heavy_minus_sign: | Target maximum video resolution. | 1080x1080 | \ No newline at end of file diff --git a/docs/models/operations/AddDownloadQueueItemsResponse.md b/docs/models/operations/AddDownloadQueueItemsResponse.md new file mode 100644 index 00000000..7503d4cf --- /dev/null +++ b/docs/models/operations/AddDownloadQueueItemsResponse.md @@ -0,0 +1,11 @@ +# AddDownloadQueueItemsResponse + + +## 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/AddDownloadQueueItemsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/AddDownloadQueueItemsResponseBody.md b/docs/models/operations/AddDownloadQueueItemsResponseBody.md new file mode 100644 index 00000000..608ff7f1 --- /dev/null +++ b/docs/models/operations/AddDownloadQueueItemsResponseBody.md @@ -0,0 +1,10 @@ +# AddDownloadQueueItemsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/AddDownloadQueueItemsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddExtrasRequest.md b/docs/models/operations/AddExtrasRequest.md new file mode 100644 index 00000000..23ef710b --- /dev/null +++ b/docs/models/operations/AddExtrasRequest.md @@ -0,0 +1,22 @@ +# AddExtrasRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `extraType` | *Optional\* | :heavy_minus_sign: | The metadata type of the extra | | +| `url` | *String* | :heavy_check_mark: | The URL of the extra | | +| `title` | *Optional\* | :heavy_minus_sign: | The title to filter by or assign | | \ No newline at end of file diff --git a/docs/models/operations/AddExtrasResponse.md b/docs/models/operations/AddExtrasResponse.md new file mode 100644 index 00000000..ed4dd912 --- /dev/null +++ b/docs/models/operations/AddExtrasResponse.md @@ -0,0 +1,10 @@ +# AddExtrasResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/AddLineupDVR.md b/docs/models/operations/AddLineupDVR.md new file mode 100644 index 00000000..12a9fb46 --- /dev/null +++ b/docs/models/operations/AddLineupDVR.md @@ -0,0 +1,12 @@ +# AddLineupDVR + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `device` | List\<[Device](../../models/shared/Device.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | +| `lineup` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddLineupDVRsMediaContainer.md b/docs/models/operations/AddLineupDVRsMediaContainer.md new file mode 100644 index 00000000..0a412e8a --- /dev/null +++ b/docs/models/operations/AddLineupDVRsMediaContainer.md @@ -0,0 +1,17 @@ +# AddLineupDVRsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *Optional\* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/models/operations/AddLineupMediaContainer.md b/docs/models/operations/AddLineupMediaContainer.md new file mode 100644 index 00000000..c83cb9fe --- /dev/null +++ b/docs/models/operations/AddLineupMediaContainer.md @@ -0,0 +1,9 @@ +# AddLineupMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/AddLineupDVRsMediaContainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | List\<[AddLineupDVR](../../models/operations/AddLineupDVR.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddLineupRequest.md b/docs/models/operations/AddLineupRequest.md new file mode 100644 index 00000000..93673621 --- /dev/null +++ b/docs/models/operations/AddLineupRequest.md @@ -0,0 +1,20 @@ +# AddLineupRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *long* | :heavy_check_mark: | The ID of the DVR. | | +| `lineup` | *String* | :heavy_check_mark: | The lineup to delete | | \ No newline at end of file diff --git a/docs/models/operations/AddLineupResponse.md b/docs/models/operations/AddLineupResponse.md new file mode 100644 index 00000000..cc295a5c --- /dev/null +++ b/docs/models/operations/AddLineupResponse.md @@ -0,0 +1,12 @@ +# AddLineupResponse + + +## 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/AddLineupResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddLineupResponseBody.md b/docs/models/operations/AddLineupResponseBody.md new file mode 100644 index 00000000..70f8ff60 --- /dev/null +++ b/docs/models/operations/AddLineupResponseBody.md @@ -0,0 +1,10 @@ +# AddLineupResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/AddLineupMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsMediaContainer.md b/docs/models/operations/AddPlaylistContentsMediaContainer.md deleted file mode 100644 index ec35de51..00000000 --- a/docs/models/operations/AddPlaylistContentsMediaContainer.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddPlaylistContentsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `leafCountAdded` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `leafCountRequested` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `metadata` | List\<[AddPlaylistContentsMetadata](../../models/operations/AddPlaylistContentsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsMetadata.md b/docs/models/operations/AddPlaylistContentsMetadata.md deleted file mode 100644 index 40a2c1b1..00000000 --- a/docs/models/operations/AddPlaylistContentsMetadata.md +++ /dev/null @@ -1,20 +0,0 @@ -# AddPlaylistContentsMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 94 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/94/items | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2 | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | playlist | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | A great playlist | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | One of my great playlists | -| `smart` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `playlistType` | *Optional\* | :heavy_minus_sign: | N/A | video | -| `composite` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/94/composite/1705800070 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 423000 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 3 | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705716458 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705800070 | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsRequest.md b/docs/models/operations/AddPlaylistContentsRequest.md deleted file mode 100644 index ced07df7..00000000 --- a/docs/models/operations/AddPlaylistContentsRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# AddPlaylistContentsRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | | -| `uri` | *String* | :heavy_check_mark: | the content URI for the playlist | server://12345/com.plexapp.plugins.library/library/metadata/1 | -| `playQueueID` | *Optional\* | :heavy_minus_sign: | the play queue to add to a playlist | 123 | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsResponse.md b/docs/models/operations/AddPlaylistContentsResponse.md deleted file mode 100644 index 5c83a746..00000000 --- a/docs/models/operations/AddPlaylistContentsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddPlaylistContentsResponse - - -## 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/AddPlaylistContentsResponseBody.md) | :heavy_minus_sign: | Playlist Updated | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistContentsResponseBody.md b/docs/models/operations/AddPlaylistContentsResponseBody.md deleted file mode 100644 index e0e616d5..00000000 --- a/docs/models/operations/AddPlaylistContentsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# AddPlaylistContentsResponseBody - -Playlist Updated - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/AddPlaylistContentsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistItemsRequest.md b/docs/models/operations/AddPlaylistItemsRequest.md new file mode 100644 index 00000000..e7b5f25e --- /dev/null +++ b/docs/models/operations/AddPlaylistItemsRequest.md @@ -0,0 +1,21 @@ +# AddPlaylistItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | +| `uri` | *Optional\* | :heavy_minus_sign: | The content URI for the playlist. | | +| `playQueueID` | *Optional\* | :heavy_minus_sign: | The play queue to add to a playlist. | | \ No newline at end of file diff --git a/docs/models/operations/AddPlaylistItemsResponse.md b/docs/models/operations/AddPlaylistItemsResponse.md new file mode 100644 index 00000000..19911f5c --- /dev/null +++ b/docs/models/operations/AddPlaylistItemsResponse.md @@ -0,0 +1,11 @@ +# AddPlaylistItemsResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/AddProviderRequest.md b/docs/models/operations/AddProviderRequest.md new file mode 100644 index 00000000..0d62556f --- /dev/null +++ b/docs/models/operations/AddProviderRequest.md @@ -0,0 +1,19 @@ +# AddProviderRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `url` | *String* | :heavy_check_mark: | The URL of the media provider to add. | | \ No newline at end of file diff --git a/docs/models/operations/AddProviderResponse.md b/docs/models/operations/AddProviderResponse.md new file mode 100644 index 00000000..4a299be9 --- /dev/null +++ b/docs/models/operations/AddProviderResponse.md @@ -0,0 +1,10 @@ +# AddProviderResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/AddSectionRequest.md b/docs/models/operations/AddSectionRequest.md new file mode 100644 index 00000000..53e519fa --- /dev/null +++ b/docs/models/operations/AddSectionRequest.md @@ -0,0 +1,28 @@ +# AddSectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `name` | *String* | :heavy_check_mark: | The name of the new section | | +| `type` | *long* | :heavy_check_mark: | The type of library section | | +| `scanner` | *Optional\* | :heavy_minus_sign: | The scanner this section should use | | +| `agent` | *String* | :heavy_check_mark: | The agent this section should use for metadata | | +| `metadataAgentProviderGroupId` | *Optional\* | :heavy_minus_sign: | The agent group id for this section | | +| `language` | *String* | :heavy_check_mark: | The language of this section | | +| `locations` | List\<*String*> | :heavy_minus_sign: | The locations on disk to add to this section | [
"O:\\fatboy\\Media\\Ripped\\Music",
"O:\\fatboy\\Media\\My Music"
] | +| `prefs` | [Optional\](../../models/operations/QueryParamPrefs.md) | :heavy_minus_sign: | The preferences for this section | {
"collectionMode": 2,
"hidden": 0
} | +| `relative` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | If set, paths are relative to `Media Upload` path | 1 | +| `importFromiTunes` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | If set, import media from iTunes. | 1 | \ No newline at end of file diff --git a/docs/models/operations/AddSectionResponse.md b/docs/models/operations/AddSectionResponse.md new file mode 100644 index 00000000..bd9da9be --- /dev/null +++ b/docs/models/operations/AddSectionResponse.md @@ -0,0 +1,11 @@ +# AddSectionResponse + + +## 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 | +| `slashGetResponses200` | [Optional\](../../models/shared/SlashGetResponses200.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/AddSubtitlesRequest.md b/docs/models/operations/AddSubtitlesRequest.md new file mode 100644 index 00000000..e524e30a --- /dev/null +++ b/docs/models/operations/AddSubtitlesRequest.md @@ -0,0 +1,26 @@ +# AddSubtitlesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | | +| `mediaItemID` | *Optional\* | :heavy_minus_sign: | N/A | | +| `url` | *Optional\* | :heavy_minus_sign: | The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body | | +| `format` | *Optional\* | :heavy_minus_sign: | N/A | | +| `forced` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | +| `hearingImpaired` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/AddSubtitlesResponse.md b/docs/models/operations/AddSubtitlesResponse.md new file mode 100644 index 00000000..b89613d6 --- /dev/null +++ b/docs/models/operations/AddSubtitlesResponse.md @@ -0,0 +1,10 @@ +# AddSubtitlesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/AddToPlayQueueRequest.md b/docs/models/operations/AddToPlayQueueRequest.md new file mode 100644 index 00000000..73ea326d --- /dev/null +++ b/docs/models/operations/AddToPlayQueueRequest.md @@ -0,0 +1,22 @@ +# AddToPlayQueueRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *long* | :heavy_check_mark: | The ID of the play queue. | | +| `uri` | *Optional\* | :heavy_minus_sign: | The content URI for what we're adding to the queue. | | +| `playlistID` | *Optional\* | :heavy_minus_sign: | The ID of the playlist to add to the playQueue. | | +| `next` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Play this item next (defaults to 0 - queueing at the end of manually queued items). | 1 | \ No newline at end of file diff --git a/docs/models/operations/AddToPlayQueueResponse.md b/docs/models/operations/AddToPlayQueueResponse.md new file mode 100644 index 00000000..d22ec1e1 --- /dev/null +++ b/docs/models/operations/AddToPlayQueueResponse.md @@ -0,0 +1,11 @@ +# AddToPlayQueueResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/AddedQueueItems.md b/docs/models/operations/AddedQueueItems.md new file mode 100644 index 00000000..459c3c1e --- /dev/null +++ b/docs/models/operations/AddedQueueItems.md @@ -0,0 +1,9 @@ +# AddedQueueItems + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | The queue item id that was added or the existing one if an item already exists in this queue with the same parameters | +| `key` | *Optional\* | :heavy_minus_sign: | The key added to the queue | \ No newline at end of file diff --git a/docs/models/operations/AdvancedSubtitles.md b/docs/models/operations/AdvancedSubtitles.md new file mode 100644 index 00000000..2748c7b0 --- /dev/null +++ b/docs/models/operations/AdvancedSubtitles.md @@ -0,0 +1,13 @@ +# AdvancedSubtitles + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `AUTO` | auto | +| `BURN` | burn | +| `NONE` | none | +| `SIDECAR` | sidecar | +| `EMBEDDED` | embedded | +| `SEGMENTED` | segmented | \ No newline at end of file diff --git a/docs/models/operations/AllLibraries.md b/docs/models/operations/AllLibraries.md deleted file mode 100644 index 393878a3..00000000 --- a/docs/models/operations/AllLibraries.md +++ /dev/null @@ -1,11 +0,0 @@ -# AllLibraries - -Indicates if the user has access to all libraries. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/AllowCameraUpload.md b/docs/models/operations/AllowCameraUpload.md deleted file mode 100644 index b080e796..00000000 --- a/docs/models/operations/AllowCameraUpload.md +++ /dev/null @@ -1,11 +0,0 @@ -# AllowCameraUpload - -Indicates if the user is allowed to upload from a camera. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/AllowChannels.md b/docs/models/operations/AllowChannels.md deleted file mode 100644 index 72073287..00000000 --- a/docs/models/operations/AllowChannels.md +++ /dev/null @@ -1,11 +0,0 @@ -# AllowChannels - -Indicates if the user has access to channels. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/AllowSubtitleAdmin.md b/docs/models/operations/AllowSubtitleAdmin.md deleted file mode 100644 index 63bf969b..00000000 --- a/docs/models/operations/AllowSubtitleAdmin.md +++ /dev/null @@ -1,11 +0,0 @@ -# AllowSubtitleAdmin - -Indicates if the user can manage subtitles. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/AllowSync.md b/docs/models/operations/AllowSync.md deleted file mode 100644 index 92557733..00000000 --- a/docs/models/operations/AllowSync.md +++ /dev/null @@ -1,11 +0,0 @@ -# AllowSync - -Indicates if the user is allowed to sync media. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/AllowTuners.md b/docs/models/operations/AllowTuners.md deleted file mode 100644 index fe810e45..00000000 --- a/docs/models/operations/AllowTuners.md +++ /dev/null @@ -1,11 +0,0 @@ -# AllowTuners - -Indicates if the user is allowed to use tuners. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/AnalyzeMetadataRequest.md b/docs/models/operations/AnalyzeMetadataRequest.md new file mode 100644 index 00000000..95bbe49c --- /dev/null +++ b/docs/models/operations/AnalyzeMetadataRequest.md @@ -0,0 +1,21 @@ +# AnalyzeMetadataRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `thumbOffset` | *Optional\* | :heavy_minus_sign: | Set the offset to be used for thumbnails | | +| `artOffset` | *Optional\* | :heavy_minus_sign: | Set the offset to be used for artwork | | \ No newline at end of file diff --git a/docs/models/operations/AnalyzeMetadataResponse.md b/docs/models/operations/AnalyzeMetadataResponse.md new file mode 100644 index 00000000..66e95618 --- /dev/null +++ b/docs/models/operations/AnalyzeMetadataResponse.md @@ -0,0 +1,10 @@ +# AnalyzeMetadataResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/ApplyUpdatesRequest.md b/docs/models/operations/ApplyUpdatesRequest.md index 357468b4..c2347ea8 100644 --- a/docs/models/operations/ApplyUpdatesRequest.md +++ b/docs/models/operations/ApplyUpdatesRequest.md @@ -3,7 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tonight` | [Optional\](../../models/operations/Tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 | -| `skip` | [Optional\](../../models/operations/Skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `tonight` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install immediately. | 1 | +| `skip` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | 1 | \ No newline at end of file diff --git a/docs/models/operations/Args.md b/docs/models/operations/Args.md new file mode 100644 index 00000000..40841aeb --- /dev/null +++ b/docs/models/operations/Args.md @@ -0,0 +1,9 @@ +# Args + +The new values for the metadata item + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/Attributes.md b/docs/models/operations/Attributes.md index 405c7ada..8fe36891 100644 --- a/docs/models/operations/Attributes.md +++ b/docs/models/operations/Attributes.md @@ -1,11 +1,9 @@ # Attributes -Attributes associated with the marker. +The attributes to assign to this marker ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | The identifier for the attributes. | 306970 | -| `version` | *Optional\* | :heavy_minus_sign: | The version number of the marker attributes. | 4 | \ No newline at end of file +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/AutoSelectSubtitle.md b/docs/models/operations/AutoSelectSubtitle.md deleted file mode 100644 index 2104db2e..00000000 --- a/docs/models/operations/AutoSelectSubtitle.md +++ /dev/null @@ -1,11 +0,0 @@ -# AutoSelectSubtitle - -The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/AutocompleteRequest.md b/docs/models/operations/AutocompleteRequest.md new file mode 100644 index 00000000..774e6497 --- /dev/null +++ b/docs/models/operations/AutocompleteRequest.md @@ -0,0 +1,22 @@ +# AutocompleteRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `type` | *Optional\* | :heavy_minus_sign: | Item type | | +| `fieldQuery` | *Optional\* | :heavy_minus_sign: | The "field" stands in for any field, the value is a partial string for matching | | +| `mediaQuery` | [Optional\](../../models/shared/MediaQuery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | \ No newline at end of file diff --git a/docs/models/operations/AutocompleteResponse.md b/docs/models/operations/AutocompleteResponse.md new file mode 100644 index 00000000..66e0058e --- /dev/null +++ b/docs/models/operations/AutocompleteResponse.md @@ -0,0 +1,12 @@ +# AutocompleteResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Bandwidth.md b/docs/models/operations/Bandwidth.md new file mode 100644 index 00000000..4a8f6fa7 --- /dev/null +++ b/docs/models/operations/Bandwidth.md @@ -0,0 +1,10 @@ +# Bandwidth + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `bandwidth` | *Optional\* | :heavy_minus_sign: | The bandwidth at this time in kbps | +| `resolution` | *Optional\* | :heavy_minus_sign: | The user-friendly resolution at this time | +| `time` | *Optional\* | :heavy_minus_sign: | Media playback time where this bandwidth started | \ No newline at end of file diff --git a/docs/models/operations/Bandwidths.md b/docs/models/operations/Bandwidths.md new file mode 100644 index 00000000..500ca019 --- /dev/null +++ b/docs/models/operations/Bandwidths.md @@ -0,0 +1,10 @@ +# Bandwidths + +A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `bandwidth` | List\<[Bandwidth](../../models/operations/Bandwidth.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Billing.md b/docs/models/operations/Billing.md deleted file mode 100644 index 67e98971..00000000 --- a/docs/models/operations/Billing.md +++ /dev/null @@ -1,9 +0,0 @@ -# Billing - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `internalPaymentMethod` | [InternalPaymentMethod](../../models/operations/InternalPaymentMethod.md) | :heavy_check_mark: | N/A | -| `paymentMethodId` | *Optional\* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ButlerTask.md b/docs/models/operations/ButlerTask.md index c62074fa..772131ec 100644 --- a/docs/models/operations/ButlerTask.md +++ b/docs/models/operations/ButlerTask.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `name` | *Optional\* | :heavy_minus_sign: | N/A | BackupDatabase | -| `interval` | *Optional\* | :heavy_minus_sign: | N/A | 3 | -| `scheduleRandomized` | *Optional\* | :heavy_minus_sign: | N/A | | -| `enabled` | *Optional\* | :heavy_minus_sign: | N/A | | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Backup Database | -| `description` | *Optional\* | :heavy_minus_sign: | N/A | Create a backup copy of the server's database in the configured backup directory | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `description` | *Optional\* | :heavy_minus_sign: | A user-friendly description of the task | +| `enabled` | *Optional\* | :heavy_minus_sign: | Whether this task is enabled or not | +| `interval` | *Optional\* | :heavy_minus_sign: | The interval (in days) of when this task is run. A value of 1 is run every day, 7 is every week, etc. | +| `name` | *Optional\* | :heavy_minus_sign: | The name of the task | +| `scheduleRandomized` | *Optional\* | :heavy_minus_sign: | Indicates whether the timing of the task is randomized within the butler interval | +| `title` | *Optional\* | :heavy_minus_sign: | A user-friendly title of the task | \ No newline at end of file diff --git a/docs/models/operations/CancelActivityRequest.md b/docs/models/operations/CancelActivityRequest.md new file mode 100644 index 00000000..0364097d --- /dev/null +++ b/docs/models/operations/CancelActivityRequest.md @@ -0,0 +1,19 @@ +# CancelActivityRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `activityId` | *String* | :heavy_check_mark: | The UUID of the activity to cancel. | d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e | \ No newline at end of file diff --git a/docs/models/operations/CancelActivityResponse.md b/docs/models/operations/CancelActivityResponse.md new file mode 100644 index 00000000..df0187c4 --- /dev/null +++ b/docs/models/operations/CancelActivityResponse.md @@ -0,0 +1,10 @@ +# CancelActivityResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/CancelGrabRequest.md b/docs/models/operations/CancelGrabRequest.md new file mode 100644 index 00000000..e40722a8 --- /dev/null +++ b/docs/models/operations/CancelGrabRequest.md @@ -0,0 +1,19 @@ +# CancelGrabRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `operationId` | *String* | :heavy_check_mark: | The ID of the operation. | | \ No newline at end of file diff --git a/docs/models/operations/CancelGrabResponse.md b/docs/models/operations/CancelGrabResponse.md new file mode 100644 index 00000000..61402ad8 --- /dev/null +++ b/docs/models/operations/CancelGrabResponse.md @@ -0,0 +1,10 @@ +# CancelGrabResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/CancelRefreshRequest.md b/docs/models/operations/CancelRefreshRequest.md new file mode 100644 index 00000000..715393b4 --- /dev/null +++ b/docs/models/operations/CancelRefreshRequest.md @@ -0,0 +1,19 @@ +# CancelRefreshRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/CancelRefreshResponse.md b/docs/models/operations/CancelRefreshResponse.md new file mode 100644 index 00000000..7c4269a3 --- /dev/null +++ b/docs/models/operations/CancelRefreshResponse.md @@ -0,0 +1,10 @@ +# CancelRefreshResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/CancelServerActivitiesRequest.md b/docs/models/operations/CancelServerActivitiesRequest.md deleted file mode 100644 index a8eef37a..00000000 --- a/docs/models/operations/CancelServerActivitiesRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# CancelServerActivitiesRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `activityUUID` | *String* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e | \ No newline at end of file diff --git a/docs/models/operations/CancelServerActivitiesResponse.md b/docs/models/operations/CancelServerActivitiesResponse.md deleted file mode 100644 index 2f8da9c2..00000000 --- a/docs/models/operations/CancelServerActivitiesResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# CancelServerActivitiesResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/ChannelMapping.md b/docs/models/operations/ChannelMapping.md new file mode 100644 index 00000000..9673f871 --- /dev/null +++ b/docs/models/operations/ChannelMapping.md @@ -0,0 +1,9 @@ +# ChannelMapping + +The mapping of changes, passed as a map of device channel to lineup VCN. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/ChannelMappingByKey.md b/docs/models/operations/ChannelMappingByKey.md new file mode 100644 index 00000000..0d81ecb2 --- /dev/null +++ b/docs/models/operations/ChannelMappingByKey.md @@ -0,0 +1,9 @@ +# ChannelMappingByKey + +The mapping of changes, passed as a map of device channel to lineup key. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/Chapter.md b/docs/models/operations/Chapter.md deleted file mode 100644 index 4a2fca2a..00000000 --- a/docs/models/operations/Chapter.md +++ /dev/null @@ -1,15 +0,0 @@ -# Chapter - -The thumbnail for the chapter - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `id` | *long* | :heavy_check_mark: | N/A | 4 | -| `filter` | *String* | :heavy_check_mark: | N/A | thumb=4 | -| `index` | *long* | :heavy_check_mark: | N/A | 1 | -| `startTimeOffset` | *long* | :heavy_check_mark: | N/A | 0 | -| `endTimeOffset` | *long* | :heavy_check_mark: | N/A | 100100 | -| `thumb` | *String* | :heavy_check_mark: | N/A | /library/media/46883/chapterImages/1 | \ No newline at end of file diff --git a/docs/models/operations/CheckForUpdatesRequest.md b/docs/models/operations/CheckForUpdatesRequest.md deleted file mode 100644 index 842fc040..00000000 --- a/docs/models/operations/CheckForUpdatesRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# CheckForUpdatesRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `download` | [Optional\](../../models/operations/Download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 | \ No newline at end of file diff --git a/docs/models/operations/CheckForUpdatesResponse.md b/docs/models/operations/CheckForUpdatesResponse.md deleted file mode 100644 index 8ef61d6b..00000000 --- a/docs/models/operations/CheckForUpdatesResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# CheckForUpdatesResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/CheckUpdatesRequest.md b/docs/models/operations/CheckUpdatesRequest.md new file mode 100644 index 00000000..df5f666c --- /dev/null +++ b/docs/models/operations/CheckUpdatesRequest.md @@ -0,0 +1,19 @@ +# CheckUpdatesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `download` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 | \ No newline at end of file diff --git a/docs/models/operations/CheckUpdatesResponse.md b/docs/models/operations/CheckUpdatesResponse.md new file mode 100644 index 00000000..f590fcb3 --- /dev/null +++ b/docs/models/operations/CheckUpdatesResponse.md @@ -0,0 +1,10 @@ +# CheckUpdatesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/ChromaSubsampling.md b/docs/models/operations/ChromaSubsampling.md new file mode 100644 index 00000000..ddb6c39f --- /dev/null +++ b/docs/models/operations/ChromaSubsampling.md @@ -0,0 +1,18 @@ +# ChromaSubsampling + +Use the specified chroma subsambling. + - 0: 411 + - 1: 420 + - 2: 422 + - 3: 444 +Defaults to 3 (444) + + +## Values + +| Name | Value | +| ------- | ------- | +| `ZERO` | 0 | +| `ONE` | 1 | +| `TWO` | 2 | +| `THREE` | 3 | \ No newline at end of file diff --git a/docs/models/operations/CleanBundlesResponse.md b/docs/models/operations/CleanBundlesResponse.md new file mode 100644 index 00000000..526b869a --- /dev/null +++ b/docs/models/operations/CleanBundlesResponse.md @@ -0,0 +1,10 @@ +# CleanBundlesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/ClearPlayQueueRequest.md b/docs/models/operations/ClearPlayQueueRequest.md new file mode 100644 index 00000000..bbd8a7cc --- /dev/null +++ b/docs/models/operations/ClearPlayQueueRequest.md @@ -0,0 +1,19 @@ +# ClearPlayQueueRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *long* | :heavy_check_mark: | The ID of the play queue. | | \ No newline at end of file diff --git a/docs/models/operations/ClearPlayQueueResponse.md b/docs/models/operations/ClearPlayQueueResponse.md new file mode 100644 index 00000000..4a25b546 --- /dev/null +++ b/docs/models/operations/ClearPlayQueueResponse.md @@ -0,0 +1,11 @@ +# ClearPlayQueueResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ClearPlaylistContentsRequest.md b/docs/models/operations/ClearPlaylistContentsRequest.md deleted file mode 100644 index 1b9d8198..00000000 --- a/docs/models/operations/ClearPlaylistContentsRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# ClearPlaylistContentsRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file diff --git a/docs/models/operations/ClearPlaylistContentsResponse.md b/docs/models/operations/ClearPlaylistContentsResponse.md deleted file mode 100644 index bd118d48..00000000 --- a/docs/models/operations/ClearPlaylistContentsResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClearPlaylistContentsResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/ClearPlaylistItemsRequest.md b/docs/models/operations/ClearPlaylistItemsRequest.md new file mode 100644 index 00000000..a46e84e9 --- /dev/null +++ b/docs/models/operations/ClearPlaylistItemsRequest.md @@ -0,0 +1,19 @@ +# ClearPlaylistItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | \ No newline at end of file diff --git a/docs/models/operations/ClearPlaylistItemsResponse.md b/docs/models/operations/ClearPlaylistItemsResponse.md new file mode 100644 index 00000000..3f369f3b --- /dev/null +++ b/docs/models/operations/ClearPlaylistItemsResponse.md @@ -0,0 +1,11 @@ +# ClearPlaylistItemsResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/Collection.md b/docs/models/operations/Collection.md deleted file mode 100644 index 2966fa47..00000000 --- a/docs/models/operations/Collection.md +++ /dev/null @@ -1,8 +0,0 @@ -# Collection - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `tag` | *String* | :heavy_check_mark: | The user-made collection this media item belongs to | My Awesome Collection | \ No newline at end of file diff --git a/docs/models/operations/ComputeChannelMapChannelMapping.md b/docs/models/operations/ComputeChannelMapChannelMapping.md new file mode 100644 index 00000000..d7cfd134 --- /dev/null +++ b/docs/models/operations/ComputeChannelMapChannelMapping.md @@ -0,0 +1,11 @@ +# ComputeChannelMapChannelMapping + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `channelKey` | *Optional\* | :heavy_minus_sign: | N/A | +| `deviceIdentifier` | *Optional\* | :heavy_minus_sign: | The channel description on the device | +| `favorite` | *Optional\* | :heavy_minus_sign: | N/A | +| `lineupIdentifier` | *Optional\* | :heavy_minus_sign: | The channel identifier in the lineup | \ No newline at end of file diff --git a/docs/models/operations/ComputeChannelMapMediaContainer.md b/docs/models/operations/ComputeChannelMapMediaContainer.md new file mode 100644 index 00000000..9e73f4bd --- /dev/null +++ b/docs/models/operations/ComputeChannelMapMediaContainer.md @@ -0,0 +1,17 @@ +# ComputeChannelMapMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `channelMapping` | List\<[ComputeChannelMapChannelMapping](../../models/operations/ComputeChannelMapChannelMapping.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ComputeChannelMapRequest.md b/docs/models/operations/ComputeChannelMapRequest.md new file mode 100644 index 00000000..6d5476c7 --- /dev/null +++ b/docs/models/operations/ComputeChannelMapRequest.md @@ -0,0 +1,20 @@ +# ComputeChannelMapRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceQueryParameter` | *String* | :heavy_check_mark: | The URI describing the device | | +| `lineup` | *String* | :heavy_check_mark: | The URI describing the lineup | | \ No newline at end of file diff --git a/docs/models/operations/ComputeChannelMapResponse.md b/docs/models/operations/ComputeChannelMapResponse.md new file mode 100644 index 00000000..e7a38b40 --- /dev/null +++ b/docs/models/operations/ComputeChannelMapResponse.md @@ -0,0 +1,12 @@ +# ComputeChannelMapResponse + + +## 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/ComputeChannelMapResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ComputeChannelMapResponseBody.md b/docs/models/operations/ComputeChannelMapResponseBody.md new file mode 100644 index 00000000..5930871e --- /dev/null +++ b/docs/models/operations/ComputeChannelMapResponseBody.md @@ -0,0 +1,10 @@ +# ComputeChannelMapResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/ComputeChannelMapMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ConnectWebSocketRequest.md b/docs/models/operations/ConnectWebSocketRequest.md new file mode 100644 index 00000000..168bcfbc --- /dev/null +++ b/docs/models/operations/ConnectWebSocketRequest.md @@ -0,0 +1,19 @@ +# ConnectWebSocketRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `filter` | List\<*String*> | :heavy_minus_sign: | By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example:

- `filters=-log`: All event types except logs (the default).
- `filters=foo,bar`: Only the foo and bar event types.
- `filters=`: All events types.
- `filters=-foo,bar`: All event types except foo and bar.
| | \ No newline at end of file diff --git a/docs/models/operations/ConnectWebSocketResponse.md b/docs/models/operations/ConnectWebSocketResponse.md new file mode 100644 index 00000000..45c8a362 --- /dev/null +++ b/docs/models/operations/ConnectWebSocketResponse.md @@ -0,0 +1,11 @@ +# ConnectWebSocketResponse + + +## 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 | +| `responseStream` | *Optional\* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/Connection.md b/docs/models/operations/Connection.md new file mode 100644 index 00000000..e5ea6ae1 --- /dev/null +++ b/docs/models/operations/Connection.md @@ -0,0 +1,13 @@ +# Connection + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `address` | *Optional\* | :heavy_minus_sign: | N/A | +| `local` | *Optional\* | :heavy_minus_sign: | Indicates if the connection is the server's LAN address | +| `port` | *Optional\* | :heavy_minus_sign: | N/A | +| `protocol` | *Optional\* | :heavy_minus_sign: | N/A | +| `relay` | *Optional\* | :heavy_minus_sign: | Indicates the connection is over a relayed connection | +| `uri` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Connections.md b/docs/models/operations/Connections.md deleted file mode 100644 index b61c1f64..00000000 --- a/docs/models/operations/Connections.md +++ /dev/null @@ -1,14 +0,0 @@ -# Connections - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `protocol` | [Protocol](../../models/operations/Protocol.md) | :heavy_check_mark: | The protocol used for the connection (http, https, etc) | http | -| `address` | *String* | :heavy_check_mark: | The (ip) address or domain name used for the connection | | -| `port` | *int* | :heavy_check_mark: | The port used for the connection | | -| `uri` | *String* | :heavy_check_mark: | The full URI of the connection | | -| `local` | *boolean* | :heavy_check_mark: | If the connection is local address | | -| `relay` | *boolean* | :heavy_check_mark: | If the connection is relayed through plex.direct | | -| `iPv6` | *boolean* | :heavy_check_mark: | If the connection is using IPv6 | | \ No newline at end of file diff --git a/docs/models/operations/Context.md b/docs/models/operations/Context.md deleted file mode 100644 index 61fa7a4e..00000000 --- a/docs/models/operations/Context.md +++ /dev/null @@ -1,8 +0,0 @@ -# Context - - -## Fields - -| Field | Type | Required | Description | -| ------------------- | ------------------- | ------------------- | ------------------- | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Country.md b/docs/models/operations/Country.md index bf817852..f505911d 100644 --- a/docs/models/operations/Country.md +++ b/docs/models/operations/Country.md @@ -1,12 +1,15 @@ # Country -The filter query string for country media items. - ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *String* | :heavy_check_mark: | The country of origin of this media item | United States of America | -| `filter` | *String* | :heavy_check_mark: | N/A | country=19 | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `code` | *Optional\* | :heavy_minus_sign: | Three letter code | +| `example` | *Optional\* | :heavy_minus_sign: | N/A | +| `flavor` | [Optional\](../../models/operations/Flavor.md) | :heavy_minus_sign: | - `0`: The country is divided into regions, and following the key will lead to a list of regions.
- `1`: The county is divided by postal codes, and an example code is returned in `example`.
- `2`: The country has a single postal code, returned in `example`.
| +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | Three letter language code | +| `languageTitle` | *Optional\* | :heavy_minus_sign: | The title of the language | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateCollectionRequest.md b/docs/models/operations/CreateCollectionRequest.md new file mode 100644 index 00000000..0805bb20 --- /dev/null +++ b/docs/models/operations/CreateCollectionRequest.md @@ -0,0 +1,23 @@ +# CreateCollectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *String* | :heavy_check_mark: | The section where this collection will be created | | +| `title` | *Optional\* | :heavy_minus_sign: | The title to filter by or assign | | +| `smart` | *Optional\* | :heavy_minus_sign: | Whether this is a smart collection/playlist | | +| `uri` | *Optional\* | :heavy_minus_sign: | The URI for processing the smart collection. Required for a smart collection | | +| `type` | *Optional\* | :heavy_minus_sign: | The metadata type to filter by | | \ No newline at end of file diff --git a/docs/models/operations/CreateCollectionResponse.md b/docs/models/operations/CreateCollectionResponse.md new file mode 100644 index 00000000..ffa32035 --- /dev/null +++ b/docs/models/operations/CreateCollectionResponse.md @@ -0,0 +1,11 @@ +# CreateCollectionResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/CreateCustomHubRequest.md b/docs/models/operations/CreateCustomHubRequest.md new file mode 100644 index 00000000..5ac4f476 --- /dev/null +++ b/docs/models/operations/CreateCustomHubRequest.md @@ -0,0 +1,23 @@ +# CreateCustomHubRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | The section ID for the hubs to reorder | | +| `metadataItemId` | *long* | :heavy_check_mark: | The metadata item on which to base this hub. This must currently be a collection | | +| `promotedToRecommended` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether this hub should be displayed in recommended | 1 | +| `promotedToOwnHome` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether this hub should be displayed in admin's home | 1 | +| `promotedToSharedHome` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether this hub should be displayed in shared user's home | 1 | \ No newline at end of file diff --git a/docs/models/operations/CreateCustomHubResponse.md b/docs/models/operations/CreateCustomHubResponse.md new file mode 100644 index 00000000..c4f8bd7d --- /dev/null +++ b/docs/models/operations/CreateCustomHubResponse.md @@ -0,0 +1,10 @@ +# CreateCustomHubResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/CreateDVRRequest.md b/docs/models/operations/CreateDVRRequest.md new file mode 100644 index 00000000..d11d35cc --- /dev/null +++ b/docs/models/operations/CreateDVRRequest.md @@ -0,0 +1,21 @@ +# CreateDVRRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `lineup` | *Optional\* | :heavy_minus_sign: | The EPG lineup. | lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT | +| `deviceQueryParameter` | List\<*String*> | :heavy_minus_sign: | The device. | device[]=device://tv.plex.grabbers.hdhomerun/1053C0CA | +| `language` | *Optional\* | :heavy_minus_sign: | The language. | eng | \ No newline at end of file diff --git a/docs/models/operations/CreateDVRResponse.md b/docs/models/operations/CreateDVRResponse.md new file mode 100644 index 00000000..4e65af9a --- /dev/null +++ b/docs/models/operations/CreateDVRResponse.md @@ -0,0 +1,12 @@ +# CreateDVRResponse + + +## 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 | +| `dvrRequestHandlerSlashGetResponses200` | [Optional\](../../models/shared/DvrRequestHandlerSlashGetResponses200.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateDownloadQueueMediaContainer.md b/docs/models/operations/CreateDownloadQueueMediaContainer.md new file mode 100644 index 00000000..2e59febd --- /dev/null +++ b/docs/models/operations/CreateDownloadQueueMediaContainer.md @@ -0,0 +1,17 @@ +# CreateDownloadQueueMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `downloadQueue` | List\<[DownloadQueue](../../models/operations/DownloadQueue.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateDownloadQueueResponse.md b/docs/models/operations/CreateDownloadQueueResponse.md new file mode 100644 index 00000000..cad0aaa8 --- /dev/null +++ b/docs/models/operations/CreateDownloadQueueResponse.md @@ -0,0 +1,11 @@ +# CreateDownloadQueueResponse + + +## 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/CreateDownloadQueueResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/CreateDownloadQueueResponseBody.md b/docs/models/operations/CreateDownloadQueueResponseBody.md new file mode 100644 index 00000000..f6f2b18e --- /dev/null +++ b/docs/models/operations/CreateDownloadQueueResponseBody.md @@ -0,0 +1,10 @@ +# CreateDownloadQueueResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/CreateDownloadQueueMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateMarkerMediaContainer.md b/docs/models/operations/CreateMarkerMediaContainer.md new file mode 100644 index 00000000..9ed00b62 --- /dev/null +++ b/docs/models/operations/CreateMarkerMediaContainer.md @@ -0,0 +1,23 @@ +# CreateMarkerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `color` | *Optional\* | :heavy_minus_sign: | N/A | +| `endTimeOffset` | *Optional\* | :heavy_minus_sign: | N/A | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `startTimeOffset` | *Optional\* | :heavy_minus_sign: | N/A | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | [Optional\](../../models/operations/CreateMarkerType.md) | :heavy_minus_sign: | N/A | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateMarkerRequest.md b/docs/models/operations/CreateMarkerRequest.md new file mode 100644 index 00000000..556939bd --- /dev/null +++ b/docs/models/operations/CreateMarkerRequest.md @@ -0,0 +1,23 @@ +# CreateMarkerRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `type` | *long* | :heavy_check_mark: | The type of marker to edit/create | | +| `startTimeOffset` | *long* | :heavy_check_mark: | The start time of the marker | | +| `endTimeOffset` | *Optional\* | :heavy_minus_sign: | The end time of the marker | | +| `attributes` | [Optional\](../../models/operations/Attributes.md) | :heavy_minus_sign: | The attributes to assign to this marker | {
"title": "My favorite spot"
} | \ No newline at end of file diff --git a/docs/models/operations/CreateMarkerResponse.md b/docs/models/operations/CreateMarkerResponse.md new file mode 100644 index 00000000..426ae8d1 --- /dev/null +++ b/docs/models/operations/CreateMarkerResponse.md @@ -0,0 +1,11 @@ +# CreateMarkerResponse + + +## 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/CreateMarkerResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/CreateMarkerResponseBody.md b/docs/models/operations/CreateMarkerResponseBody.md new file mode 100644 index 00000000..0764488b --- /dev/null +++ b/docs/models/operations/CreateMarkerResponseBody.md @@ -0,0 +1,10 @@ +# CreateMarkerResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/CreateMarkerMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateMarkerType.md b/docs/models/operations/CreateMarkerType.md new file mode 100644 index 00000000..f605a7ae --- /dev/null +++ b/docs/models/operations/CreateMarkerType.md @@ -0,0 +1,12 @@ +# CreateMarkerType + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `INTRO` | intro | +| `COMMERCIAL` | commercial | +| `BOOKMARK` | bookmark | +| `RESUME` | resume | +| `CREDIT` | credit | \ No newline at end of file diff --git a/docs/models/operations/CreatePlayQueueMediaContainer.md b/docs/models/operations/CreatePlayQueueMediaContainer.md new file mode 100644 index 00000000..6200b8dd --- /dev/null +++ b/docs/models/operations/CreatePlayQueueMediaContainer.md @@ -0,0 +1,25 @@ +# CreatePlayQueueMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `playQueueID` | *Optional\* | :heavy_minus_sign: | The ID of the play queue, which is used in subsequent requests. | +| `playQueueLastAddedItemID` | *Optional\* | :heavy_minus_sign: | Defines where the "Up Next" region starts | +| `playQueueSelectedItemID` | *Optional\* | :heavy_minus_sign: | The queue item ID of the currently selected item. | +| `playQueueSelectedItemOffset` | *Optional\* | :heavy_minus_sign: | The offset of the selected item in the play queue, from the beginning of the queue. | +| `playQueueSelectedMetadataItemID` | *Optional\* | :heavy_minus_sign: | The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library). | +| `playQueueShuffled` | *Optional\* | :heavy_minus_sign: | Whether or not the queue is shuffled. | +| `playQueueSourceURI` | *Optional\* | :heavy_minus_sign: | The original URI used to create the play queue. | +| `playQueueTotalCount` | *Optional\* | :heavy_minus_sign: | The total number of items in the play queue. | +| `playQueueVersion` | *Optional\* | :heavy_minus_sign: | The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh. | \ No newline at end of file diff --git a/docs/models/operations/CreatePlayQueueRequest.md b/docs/models/operations/CreatePlayQueueRequest.md new file mode 100644 index 00000000..336c7982 --- /dev/null +++ b/docs/models/operations/CreatePlayQueueRequest.md @@ -0,0 +1,28 @@ +# CreatePlayQueueRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `uri` | *Optional\* | :heavy_minus_sign: | The content URI for what we're playing. | | +| `playlistID` | *Optional\* | :heavy_minus_sign: | the ID of the playlist we're playing. | | +| `type` | [Type](../../models/operations/Type.md) | :heavy_check_mark: | The type of play queue to create | | +| `key` | *Optional\* | :heavy_minus_sign: | The key of the first item to play, defaults to the first in the play queue. | | +| `shuffle` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether to shuffle the playlist, defaults to 0. | 1 | +| `repeat` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0. | 1 | +| `continuous` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether to create a continuous play queue (e.g. from an episode), defaults to 0. | 1 | +| `extrasPrefixCount` | *Optional\* | :heavy_minus_sign: | Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie `extrasPrefixCount` should be omitted as a parameter instead of passing 0. | | +| `recursive` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1. | 1 | +| `onDeck` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season. | 1 | \ No newline at end of file diff --git a/docs/models/operations/CreatePlayQueueResponse.md b/docs/models/operations/CreatePlayQueueResponse.md new file mode 100644 index 00000000..fb265b50 --- /dev/null +++ b/docs/models/operations/CreatePlayQueueResponse.md @@ -0,0 +1,12 @@ +# CreatePlayQueueResponse + + +## 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/CreatePlayQueueResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreatePlayQueueResponseBody.md b/docs/models/operations/CreatePlayQueueResponseBody.md new file mode 100644 index 00000000..df567a90 --- /dev/null +++ b/docs/models/operations/CreatePlayQueueResponseBody.md @@ -0,0 +1,10 @@ +# CreatePlayQueueResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/CreatePlayQueueMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistMediaContainer.md b/docs/models/operations/CreatePlaylistMediaContainer.md deleted file mode 100644 index f7ad62f7..00000000 --- a/docs/models/operations/CreatePlaylistMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreatePlaylistMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 7 | -| `metadata` | List\<[CreatePlaylistMetadata](../../models/operations/CreatePlaylistMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistMetadata.md b/docs/models/operations/CreatePlaylistMetadata.md deleted file mode 100644 index 2eb3d665..00000000 --- a/docs/models/operations/CreatePlaylistMetadata.md +++ /dev/null @@ -1,23 +0,0 @@ -# CreatePlaylistMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 96 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/96/items | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55 | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | playlist | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | A Great Playlist | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | What a great playlist | -| `smart` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `playlistType` | *Optional\* | :heavy_minus_sign: | N/A | video | -| `icon` | *Optional\* | :heavy_minus_sign: | N/A | playlist://image.smart | -| `viewCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705719589 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705719589 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705724593 | -| `composite` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/96/composite/1705724593 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 141000 | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistQueryParamType.md b/docs/models/operations/CreatePlaylistQueryParamType.md deleted file mode 100644 index bb012f27..00000000 --- a/docs/models/operations/CreatePlaylistQueryParamType.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreatePlaylistQueryParamType - -type of playlist to create - - -## Values - -| Name | Value | -| ------- | ------- | -| `AUDIO` | audio | -| `VIDEO` | video | -| `PHOTO` | photo | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistRequest.md b/docs/models/operations/CreatePlaylistRequest.md index d1ff885b..3e59d0b1 100644 --- a/docs/models/operations/CreatePlaylistRequest.md +++ b/docs/models/operations/CreatePlaylistRequest.md @@ -3,10 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `title` | *String* | :heavy_check_mark: | name of the playlist | -| `type` | [CreatePlaylistQueryParamType](../../models/operations/CreatePlaylistQueryParamType.md) | :heavy_check_mark: | type of playlist to create | -| `smart` | [Smart](../../models/operations/Smart.md) | :heavy_check_mark: | whether the playlist is smart or not | -| `uri` | *String* | :heavy_check_mark: | the content URI for the playlist | -| `playQueueID` | *Optional\* | :heavy_minus_sign: | the play queue to copy to a playlist | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `uri` | *Optional\* | :heavy_minus_sign: | The content URI for what we're playing (e.g. `library://...`). | | +| `playQueueID` | *Optional\* | :heavy_minus_sign: | To create a playlist from an existing play queue. | | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistResponse.md b/docs/models/operations/CreatePlaylistResponse.md index 5bb04447..c3143e25 100644 --- a/docs/models/operations/CreatePlaylistResponse.md +++ b/docs/models/operations/CreatePlaylistResponse.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/CreatePlaylistResponseBody.md) | :heavy_minus_sign: | returns all playlists | \ No newline at end of file +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/CreatePlaylistResponseBody.md b/docs/models/operations/CreatePlaylistResponseBody.md deleted file mode 100644 index 3fb23a89..00000000 --- a/docs/models/operations/CreatePlaylistResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreatePlaylistResponseBody - -returns all playlists - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/CreatePlaylistMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateSubscriptionMediaContainer.md b/docs/models/operations/CreateSubscriptionMediaContainer.md new file mode 100644 index 00000000..19700214 --- /dev/null +++ b/docs/models/operations/CreateSubscriptionMediaContainer.md @@ -0,0 +1,17 @@ +# CreateSubscriptionMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `mediaSubscription` | List\<[MediaSubscription](../../models/shared/MediaSubscription.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateSubscriptionQueryParamPrefs.md b/docs/models/operations/CreateSubscriptionQueryParamPrefs.md new file mode 100644 index 00000000..b1cba5da --- /dev/null +++ b/docs/models/operations/CreateSubscriptionQueryParamPrefs.md @@ -0,0 +1,9 @@ +# CreateSubscriptionQueryParamPrefs + +Subscription preferences. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/CreateSubscriptionRequest.md b/docs/models/operations/CreateSubscriptionRequest.md new file mode 100644 index 00000000..ae04c0af --- /dev/null +++ b/docs/models/operations/CreateSubscriptionRequest.md @@ -0,0 +1,24 @@ +# CreateSubscriptionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `targetLibrarySectionID` | *Optional\* | :heavy_minus_sign: | The library section into which we'll grab the media. Not actually required when the subscription is to a playlist. | 1 | +| `targetSectionLocationID` | *Optional\* | :heavy_minus_sign: | The section location into which to grab. | 3 | +| `type` | *Optional\* | :heavy_minus_sign: | The type of the thing we're subscribing too (e.g. show, season). | 2 | +| `hints` | [Optional\](../../models/operations/Hints.md) | :heavy_minus_sign: | Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. | {
"title": "Family Guy"
} | +| `prefs` | [Optional\](../../models/operations/CreateSubscriptionQueryParamPrefs.md) | :heavy_minus_sign: | Subscription preferences. | {
"minVideoQuality": 720
} | +| `params` | [Optional\](../../models/operations/Params.md) | :heavy_minus_sign: | Subscription parameters.
- `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into
- `source`: Required for downloads to indicate the source of the downloaded content.
| {
"mediaProviderID": 1
} | \ No newline at end of file diff --git a/docs/models/operations/CreateSubscriptionResponse.md b/docs/models/operations/CreateSubscriptionResponse.md new file mode 100644 index 00000000..a57d96d5 --- /dev/null +++ b/docs/models/operations/CreateSubscriptionResponse.md @@ -0,0 +1,12 @@ +# CreateSubscriptionResponse + + +## 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/CreateSubscriptionResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateSubscriptionResponseBody.md b/docs/models/operations/CreateSubscriptionResponseBody.md new file mode 100644 index 00000000..ad9abf97 --- /dev/null +++ b/docs/models/operations/CreateSubscriptionResponseBody.md @@ -0,0 +1,10 @@ +# CreateSubscriptionResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/CreateSubscriptionMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DecisionResult.md b/docs/models/operations/DecisionResult.md new file mode 100644 index 00000000..75aea41e --- /dev/null +++ b/docs/models/operations/DecisionResult.md @@ -0,0 +1,16 @@ +# DecisionResult + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `availableBandwidth` | *Optional\* | :heavy_minus_sign: | The maximum bitrate set when item was added | +| `directPlayDecisionCode` | *Optional\* | :heavy_minus_sign: | N/A | +| `directPlayDecisionText` | *Optional\* | :heavy_minus_sign: | N/A | +| `generalDecisionCode` | *Optional\* | :heavy_minus_sign: | N/A | +| `generalDecisionText` | *Optional\* | :heavy_minus_sign: | N/A | +| `mdeDecisionCode` | *Optional\* | :heavy_minus_sign: | The code indicating the status of evaluation of playback when client indicates `hasMDE=1` | +| `mdeDecisionText` | *Optional\* | :heavy_minus_sign: | Descriptive text for the above code | +| `transcodeDecisionCode` | *Optional\* | :heavy_minus_sign: | N/A | +| `transcodeDecisionText` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DefaultDirection.md b/docs/models/operations/DefaultDirection.md deleted file mode 100644 index f0d96510..00000000 --- a/docs/models/operations/DefaultDirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# DefaultDirection - -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/DefaultSubtitleAccessibility.md b/docs/models/operations/DefaultSubtitleAccessibility.md deleted file mode 100644 index 592d982c..00000000 --- a/docs/models/operations/DefaultSubtitleAccessibility.md +++ /dev/null @@ -1,11 +0,0 @@ -# DefaultSubtitleAccessibility - -The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles) - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/DefaultSubtitleForced.md b/docs/models/operations/DefaultSubtitleForced.md deleted file mode 100644 index 6270cf9f..00000000 --- a/docs/models/operations/DefaultSubtitleForced.md +++ /dev/null @@ -1,11 +0,0 @@ -# DefaultSubtitleForced - -The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/DeleteCachesResponse.md b/docs/models/operations/DeleteCachesResponse.md new file mode 100644 index 00000000..901fe792 --- /dev/null +++ b/docs/models/operations/DeleteCachesResponse.md @@ -0,0 +1,10 @@ +# DeleteCachesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteCollectionItemRequest.md b/docs/models/operations/DeleteCollectionItemRequest.md new file mode 100644 index 00000000..4fb68963 --- /dev/null +++ b/docs/models/operations/DeleteCollectionItemRequest.md @@ -0,0 +1,20 @@ +# DeleteCollectionItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `collectionId` | *long* | :heavy_check_mark: | The collection id | | +| `itemId` | *long* | :heavy_check_mark: | The item to delete | | \ No newline at end of file diff --git a/docs/models/operations/DeleteCollectionItemResponse.md b/docs/models/operations/DeleteCollectionItemResponse.md new file mode 100644 index 00000000..1766fdd2 --- /dev/null +++ b/docs/models/operations/DeleteCollectionItemResponse.md @@ -0,0 +1,11 @@ +# DeleteCollectionItemResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/DeleteCollectionRequest.md b/docs/models/operations/DeleteCollectionRequest.md new file mode 100644 index 00000000..16ea630e --- /dev/null +++ b/docs/models/operations/DeleteCollectionRequest.md @@ -0,0 +1,20 @@ +# DeleteCollectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `collectionId` | *long* | :heavy_check_mark: | Collection Id | | \ No newline at end of file diff --git a/docs/models/operations/DeleteCollectionResponse.md b/docs/models/operations/DeleteCollectionResponse.md new file mode 100644 index 00000000..9795c3ad --- /dev/null +++ b/docs/models/operations/DeleteCollectionResponse.md @@ -0,0 +1,10 @@ +# DeleteCollectionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteCustomHubRequest.md b/docs/models/operations/DeleteCustomHubRequest.md new file mode 100644 index 00000000..9449d8d5 --- /dev/null +++ b/docs/models/operations/DeleteCustomHubRequest.md @@ -0,0 +1,20 @@ +# DeleteCustomHubRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | The section ID for the hubs to change | | +| `identifier` | *String* | :heavy_check_mark: | The identifier of the hub to change | | \ No newline at end of file diff --git a/docs/models/operations/DeleteCustomHubResponse.md b/docs/models/operations/DeleteCustomHubResponse.md new file mode 100644 index 00000000..aa0a0c8d --- /dev/null +++ b/docs/models/operations/DeleteCustomHubResponse.md @@ -0,0 +1,10 @@ +# DeleteCustomHubResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteDVRRequest.md b/docs/models/operations/DeleteDVRRequest.md new file mode 100644 index 00000000..97c07ec4 --- /dev/null +++ b/docs/models/operations/DeleteDVRRequest.md @@ -0,0 +1,19 @@ +# DeleteDVRRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *long* | :heavy_check_mark: | The ID of the DVR. | | \ No newline at end of file diff --git a/docs/models/operations/DeleteDVRResponse.md b/docs/models/operations/DeleteDVRResponse.md new file mode 100644 index 00000000..ce47a776 --- /dev/null +++ b/docs/models/operations/DeleteDVRResponse.md @@ -0,0 +1,10 @@ +# DeleteDVRResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteHistoryRequest.md b/docs/models/operations/DeleteHistoryRequest.md new file mode 100644 index 00000000..1f0850a2 --- /dev/null +++ b/docs/models/operations/DeleteHistoryRequest.md @@ -0,0 +1,19 @@ +# DeleteHistoryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `historyId` | *long* | :heavy_check_mark: | The id of the history item (the `historyKey` from above) | | \ No newline at end of file diff --git a/docs/models/operations/DeleteHistoryResponse.md b/docs/models/operations/DeleteHistoryResponse.md new file mode 100644 index 00000000..6f8b374a --- /dev/null +++ b/docs/models/operations/DeleteHistoryResponse.md @@ -0,0 +1,12 @@ +# DeleteHistoryResponse + + +## 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 | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainer.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DeleteIndexesRequest.md b/docs/models/operations/DeleteIndexesRequest.md new file mode 100644 index 00000000..0f213876 --- /dev/null +++ b/docs/models/operations/DeleteIndexesRequest.md @@ -0,0 +1,19 @@ +# DeleteIndexesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/DeleteIndexesResponse.md b/docs/models/operations/DeleteIndexesResponse.md new file mode 100644 index 00000000..9ec6be5d --- /dev/null +++ b/docs/models/operations/DeleteIndexesResponse.md @@ -0,0 +1,10 @@ +# DeleteIndexesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteIntrosRequest.md b/docs/models/operations/DeleteIntrosRequest.md new file mode 100644 index 00000000..0e62b634 --- /dev/null +++ b/docs/models/operations/DeleteIntrosRequest.md @@ -0,0 +1,19 @@ +# DeleteIntrosRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/DeleteIntrosResponse.md b/docs/models/operations/DeleteIntrosResponse.md new file mode 100644 index 00000000..3267c422 --- /dev/null +++ b/docs/models/operations/DeleteIntrosResponse.md @@ -0,0 +1,10 @@ +# DeleteIntrosResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteLibraryRequest.md b/docs/models/operations/DeleteLibraryRequest.md deleted file mode 100644 index 864269c8..00000000 --- a/docs/models/operations/DeleteLibraryRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# DeleteLibraryRequest - - -## Fields - -| 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 | \ No newline at end of file diff --git a/docs/models/operations/DeleteLibraryResponse.md b/docs/models/operations/DeleteLibraryResponse.md deleted file mode 100644 index 6a169c6d..00000000 --- a/docs/models/operations/DeleteLibraryResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# DeleteLibraryResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteLibrarySectionRequest.md b/docs/models/operations/DeleteLibrarySectionRequest.md new file mode 100644 index 00000000..33650201 --- /dev/null +++ b/docs/models/operations/DeleteLibrarySectionRequest.md @@ -0,0 +1,20 @@ +# DeleteLibrarySectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *String* | :heavy_check_mark: | The section identifier | | +| `async` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete | 1 | \ No newline at end of file diff --git a/docs/models/operations/DeleteLibrarySectionResponse.md b/docs/models/operations/DeleteLibrarySectionResponse.md new file mode 100644 index 00000000..26166f5d --- /dev/null +++ b/docs/models/operations/DeleteLibrarySectionResponse.md @@ -0,0 +1,10 @@ +# DeleteLibrarySectionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteLineupDVR.md b/docs/models/operations/DeleteLineupDVR.md new file mode 100644 index 00000000..2eeabee1 --- /dev/null +++ b/docs/models/operations/DeleteLineupDVR.md @@ -0,0 +1,12 @@ +# DeleteLineupDVR + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `device` | List\<[Device](../../models/shared/Device.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | +| `lineup` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DeleteLineupDVRsMediaContainer.md b/docs/models/operations/DeleteLineupDVRsMediaContainer.md new file mode 100644 index 00000000..d7264a3d --- /dev/null +++ b/docs/models/operations/DeleteLineupDVRsMediaContainer.md @@ -0,0 +1,17 @@ +# DeleteLineupDVRsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *Optional\* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/models/operations/DeleteLineupMediaContainer.md b/docs/models/operations/DeleteLineupMediaContainer.md new file mode 100644 index 00000000..2112776d --- /dev/null +++ b/docs/models/operations/DeleteLineupMediaContainer.md @@ -0,0 +1,9 @@ +# DeleteLineupMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/DeleteLineupDVRsMediaContainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | List\<[DeleteLineupDVR](../../models/operations/DeleteLineupDVR.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DeleteLineupRequest.md b/docs/models/operations/DeleteLineupRequest.md new file mode 100644 index 00000000..f8058fcf --- /dev/null +++ b/docs/models/operations/DeleteLineupRequest.md @@ -0,0 +1,20 @@ +# DeleteLineupRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *long* | :heavy_check_mark: | The ID of the DVR. | | +| `lineup` | *String* | :heavy_check_mark: | The lineup to delete | | \ No newline at end of file diff --git a/docs/models/operations/DeleteLineupResponse.md b/docs/models/operations/DeleteLineupResponse.md new file mode 100644 index 00000000..a8eab5b0 --- /dev/null +++ b/docs/models/operations/DeleteLineupResponse.md @@ -0,0 +1,12 @@ +# DeleteLineupResponse + + +## 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/DeleteLineupResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DeleteLineupResponseBody.md b/docs/models/operations/DeleteLineupResponseBody.md new file mode 100644 index 00000000..362968d0 --- /dev/null +++ b/docs/models/operations/DeleteLineupResponseBody.md @@ -0,0 +1,10 @@ +# DeleteLineupResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/DeleteLineupMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DeleteMarkerRequest.md b/docs/models/operations/DeleteMarkerRequest.md new file mode 100644 index 00000000..eefe639d --- /dev/null +++ b/docs/models/operations/DeleteMarkerRequest.md @@ -0,0 +1,20 @@ +# DeleteMarkerRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `marker` | *String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/DeleteMarkerResponse.md b/docs/models/operations/DeleteMarkerResponse.md new file mode 100644 index 00000000..a30c8505 --- /dev/null +++ b/docs/models/operations/DeleteMarkerResponse.md @@ -0,0 +1,10 @@ +# DeleteMarkerResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteMediaItemRequest.md b/docs/models/operations/DeleteMediaItemRequest.md new file mode 100644 index 00000000..2a7f59be --- /dev/null +++ b/docs/models/operations/DeleteMediaItemRequest.md @@ -0,0 +1,21 @@ +# DeleteMediaItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `mediaItem` | *String* | :heavy_check_mark: | N/A | | +| `proxy` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. | 1 | \ No newline at end of file diff --git a/docs/models/operations/DeleteMediaItemResponse.md b/docs/models/operations/DeleteMediaItemResponse.md new file mode 100644 index 00000000..d98d915d --- /dev/null +++ b/docs/models/operations/DeleteMediaItemResponse.md @@ -0,0 +1,10 @@ +# DeleteMediaItemResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteMediaProviderRequest.md b/docs/models/operations/DeleteMediaProviderRequest.md new file mode 100644 index 00000000..fe296f54 --- /dev/null +++ b/docs/models/operations/DeleteMediaProviderRequest.md @@ -0,0 +1,19 @@ +# DeleteMediaProviderRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `provider` | *String* | :heavy_check_mark: | The ID of the media provider to delete | | \ No newline at end of file diff --git a/docs/models/operations/DeleteMediaProviderResponse.md b/docs/models/operations/DeleteMediaProviderResponse.md new file mode 100644 index 00000000..8d81cfdd --- /dev/null +++ b/docs/models/operations/DeleteMediaProviderResponse.md @@ -0,0 +1,10 @@ +# DeleteMediaProviderResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteMetadataItemRequest.md b/docs/models/operations/DeleteMetadataItemRequest.md new file mode 100644 index 00000000..d8d00cf8 --- /dev/null +++ b/docs/models/operations/DeleteMetadataItemRequest.md @@ -0,0 +1,20 @@ +# DeleteMetadataItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `proxy` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. | 1 | \ No newline at end of file diff --git a/docs/models/operations/DeleteMetadataItemResponse.md b/docs/models/operations/DeleteMetadataItemResponse.md new file mode 100644 index 00000000..10ed8624 --- /dev/null +++ b/docs/models/operations/DeleteMetadataItemResponse.md @@ -0,0 +1,10 @@ +# DeleteMetadataItemResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeletePlayQueueItemRequest.md b/docs/models/operations/DeletePlayQueueItemRequest.md new file mode 100644 index 00000000..d2fb20cf --- /dev/null +++ b/docs/models/operations/DeletePlayQueueItemRequest.md @@ -0,0 +1,20 @@ +# DeletePlayQueueItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *long* | :heavy_check_mark: | The ID of the play queue. | | +| `playQueueItemId` | *long* | :heavy_check_mark: | The play queue item ID to delete. | | \ No newline at end of file diff --git a/docs/models/operations/DeletePlayQueueItemResponse.md b/docs/models/operations/DeletePlayQueueItemResponse.md new file mode 100644 index 00000000..f3000fce --- /dev/null +++ b/docs/models/operations/DeletePlayQueueItemResponse.md @@ -0,0 +1,11 @@ +# DeletePlayQueueItemResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/DeletePlaylistItemRequest.md b/docs/models/operations/DeletePlaylistItemRequest.md new file mode 100644 index 00000000..c9064b30 --- /dev/null +++ b/docs/models/operations/DeletePlaylistItemRequest.md @@ -0,0 +1,20 @@ +# DeletePlaylistItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | +| `generatorId` | *long* | :heavy_check_mark: | The generator item ID to delete. | | \ No newline at end of file diff --git a/docs/models/operations/DeletePlaylistItemResponse.md b/docs/models/operations/DeletePlaylistItemResponse.md new file mode 100644 index 00000000..f6ea0b26 --- /dev/null +++ b/docs/models/operations/DeletePlaylistItemResponse.md @@ -0,0 +1,11 @@ +# DeletePlaylistItemResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/DeletePlaylistRequest.md b/docs/models/operations/DeletePlaylistRequest.md index dfebd858..8f5879f3 100644 --- a/docs/models/operations/DeletePlaylistRequest.md +++ b/docs/models/operations/DeletePlaylistRequest.md @@ -3,6 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | \ No newline at end of file diff --git a/docs/models/operations/DeleteStreamRequest.md b/docs/models/operations/DeleteStreamRequest.md new file mode 100644 index 00000000..10802569 --- /dev/null +++ b/docs/models/operations/DeleteStreamRequest.md @@ -0,0 +1,20 @@ +# DeleteStreamRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `streamId` | *long* | :heavy_check_mark: | The id of the stream | | +| `ext` | *String* | :heavy_check_mark: | This is not a part of this endpoint but documented here to satisfy OpenAPI | | \ No newline at end of file diff --git a/docs/models/operations/DeleteStreamResponse.md b/docs/models/operations/DeleteStreamResponse.md new file mode 100644 index 00000000..be339767 --- /dev/null +++ b/docs/models/operations/DeleteStreamResponse.md @@ -0,0 +1,10 @@ +# DeleteStreamResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DeleteSubscriptionRequest.md b/docs/models/operations/DeleteSubscriptionRequest.md new file mode 100644 index 00000000..0a31b221 --- /dev/null +++ b/docs/models/operations/DeleteSubscriptionRequest.md @@ -0,0 +1,19 @@ +# DeleteSubscriptionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `subscriptionId` | *long* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/DeleteSubscriptionResponse.md b/docs/models/operations/DeleteSubscriptionResponse.md new file mode 100644 index 00000000..6a4d9475 --- /dev/null +++ b/docs/models/operations/DeleteSubscriptionResponse.md @@ -0,0 +1,10 @@ +# DeleteSubscriptionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DetectAdsRequest.md b/docs/models/operations/DetectAdsRequest.md new file mode 100644 index 00000000..e11a9969 --- /dev/null +++ b/docs/models/operations/DetectAdsRequest.md @@ -0,0 +1,19 @@ +# DetectAdsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/DetectAdsResponse.md b/docs/models/operations/DetectAdsResponse.md new file mode 100644 index 00000000..271bc965 --- /dev/null +++ b/docs/models/operations/DetectAdsResponse.md @@ -0,0 +1,10 @@ +# DetectAdsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DetectCreditsRequest.md b/docs/models/operations/DetectCreditsRequest.md new file mode 100644 index 00000000..f7ccaa45 --- /dev/null +++ b/docs/models/operations/DetectCreditsRequest.md @@ -0,0 +1,21 @@ +# DetectCreditsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `force` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | +| `manual` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/DetectCreditsResponse.md b/docs/models/operations/DetectCreditsResponse.md new file mode 100644 index 00000000..03824e7a --- /dev/null +++ b/docs/models/operations/DetectCreditsResponse.md @@ -0,0 +1,10 @@ +# DetectCreditsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DetectIntrosRequest.md b/docs/models/operations/DetectIntrosRequest.md new file mode 100644 index 00000000..5b324502 --- /dev/null +++ b/docs/models/operations/DetectIntrosRequest.md @@ -0,0 +1,21 @@ +# DetectIntrosRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `force` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicate whether detection should be re-run | 1 | +| `threshold` | *Optional\* | :heavy_minus_sign: | The threshold for determining if content is an intro or not | | \ No newline at end of file diff --git a/docs/models/operations/DetectIntrosResponse.md b/docs/models/operations/DetectIntrosResponse.md new file mode 100644 index 00000000..50f25479 --- /dev/null +++ b/docs/models/operations/DetectIntrosResponse.md @@ -0,0 +1,10 @@ +# DetectIntrosResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/DetectVoiceActivityRequest.md b/docs/models/operations/DetectVoiceActivityRequest.md new file mode 100644 index 00000000..498e99b0 --- /dev/null +++ b/docs/models/operations/DetectVoiceActivityRequest.md @@ -0,0 +1,21 @@ +# DetectVoiceActivityRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `force` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicate whether detection should be re-run | 1 | +| `manual` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicate whether detection is manually run | 1 | \ No newline at end of file diff --git a/docs/models/operations/DetectVoiceActivityResponse.md b/docs/models/operations/DetectVoiceActivityResponse.md new file mode 100644 index 00000000..59592174 --- /dev/null +++ b/docs/models/operations/DetectVoiceActivityResponse.md @@ -0,0 +1,10 @@ +# DetectVoiceActivityResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Device.md b/docs/models/operations/Device.md index da6761d2..1db17a0a 100644 --- a/docs/models/operations/Device.md +++ b/docs/models/operations/Device.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `name` | *Optional\* | :heavy_minus_sign: | N/A | iPhone | -| `platform` | *Optional\* | :heavy_minus_sign: | N/A | iOS | -| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | | -| `createdAt` | *Optional\* | :heavy_minus_sign: | N/A | 1654131230 | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `accessToken` | *Optional\* | :heavy_minus_sign: | N/A | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `connection` | List\<[Connection](../../models/operations/Connection.md)> | :heavy_minus_sign: | N/A | +| `name` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DeviceChannel.md b/docs/models/operations/DeviceChannel.md new file mode 100644 index 00000000..eb624ff6 --- /dev/null +++ b/docs/models/operations/DeviceChannel.md @@ -0,0 +1,15 @@ +# DeviceChannel + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `drm` | *Optional\* | :heavy_minus_sign: | Indicates the channel is DRMed and thus may not be playable | +| `favorite` | *Optional\* | :heavy_minus_sign: | N/A | +| `hd` | *Optional\* | :heavy_minus_sign: | N/A | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `name` | *Optional\* | :heavy_minus_sign: | N/A | +| `signalQuality` | *Optional\* | :heavy_minus_sign: | N/A | +| `signalStrength` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Director.md b/docs/models/operations/Director.md deleted file mode 100644 index f0043665..00000000 --- a/docs/models/operations/Director.md +++ /dev/null @@ -1,12 +0,0 @@ -# Director - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 | -| `filter` | *String* | :heavy_check_mark: | The filter string used to query this director. | director=235876 | -| `tag` | *String* | :heavy_check_mark: | The role of Director | Danny Boyle | -| `tagKey` | *String* | :heavy_check_mark: | A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. | 5d776831151a60001f24d031 | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/Directory.md b/docs/models/operations/Directory.md index 1cf0b425..b8dd708f 100644 --- a/docs/models/operations/Directory.md +++ b/docs/models/operations/Directory.md @@ -3,8 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------- | ------------------- | ------------------- | ------------------- | -| `count` | *Optional\* | :heavy_minus_sign: | N/A | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `filter` | *Optional\* | :heavy_minus_sign: | The filter string to view metadata wit this tag | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `tag` | *Optional\* | :heavy_minus_sign: | The name of the tag | +| `tagKey` | *Optional\* | :heavy_minus_sign: | The key of this tag. This is a universal key across all PMS instances and plex.tv services | +| `tagType` | *Optional\* | :heavy_minus_sign: | The type of the tag | +| `thumb` | *Optional\* | :heavy_minus_sign: | The URL to a thumbnail for this tag | \ No newline at end of file diff --git a/docs/models/operations/DiscoverDevicesResponse.md b/docs/models/operations/DiscoverDevicesResponse.md new file mode 100644 index 00000000..70ed2ff4 --- /dev/null +++ b/docs/models/operations/DiscoverDevicesResponse.md @@ -0,0 +1,11 @@ +# DiscoverDevicesResponse + + +## 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 | +| `mediaContainerWithDevice` | [Optional\](../../models/shared/MediaContainerWithDevice.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/Download.md b/docs/models/operations/Download.md deleted file mode 100644 index 1eb27ea5..00000000 --- a/docs/models/operations/Download.md +++ /dev/null @@ -1,11 +0,0 @@ -# Download - -Indicate that you want to start download any updates found. - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/DownloadQueue.md b/docs/models/operations/DownloadQueue.md new file mode 100644 index 00000000..2d515f6a --- /dev/null +++ b/docs/models/operations/DownloadQueue.md @@ -0,0 +1,10 @@ +# DownloadQueue + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `itemCount` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | [Optional\](../../models/operations/Status.md) | :heavy_minus_sign: | The state of this queue
- deciding: At least one item is still being decided
- waiting: At least one item is waiting for transcode and none are currently transcoding
- processing: At least one item is being transcoded
- done: All items are available (or potentially expired)
- error: At least one item has encountered an error
| \ No newline at end of file diff --git a/docs/models/operations/DownloadQueueItem.md b/docs/models/operations/DownloadQueueItem.md new file mode 100644 index 00000000..1d09417c --- /dev/null +++ b/docs/models/operations/DownloadQueueItem.md @@ -0,0 +1,15 @@ +# DownloadQueueItem + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `decisionResult` | [Optional\](../../models/operations/DecisionResult.md) | :heavy_minus_sign: | N/A | +| `error` | *Optional\* | :heavy_minus_sign: | The error encountered in transcoding or decision | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `queueId` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | [Optional\](../../models/operations/ListDownloadQueueItemsStatus.md) | :heavy_minus_sign: | The state of the item:
- deciding: The item decision is pending
- waiting: The item is waiting for transcode
- processing: The item is being transcoded
- available: The item is available for download
- error: The item encountered an error in the decision or transcode
- expired: The transcoded item has timed out and is no longer available
| +| `transcode` | [Optional\](../../models/operations/Transcode.md) | :heavy_minus_sign: | The transcode session object which is not yet documented otherwise it'd be a $ref here. | +| `transcodeSession` | [Optional\](../../models/shared/TranscodeSession.md) | :heavy_minus_sign: | The transcode session if item is currently being transcoded | \ No newline at end of file diff --git a/docs/models/operations/Dvr.md b/docs/models/operations/Dvr.md new file mode 100644 index 00000000..1e18553c --- /dev/null +++ b/docs/models/operations/Dvr.md @@ -0,0 +1,12 @@ +# Dvr + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `device` | List\<[Device](../../models/shared/Device.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | +| `lineup` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/EditMarkerRequest.md b/docs/models/operations/EditMarkerRequest.md new file mode 100644 index 00000000..8880d317 --- /dev/null +++ b/docs/models/operations/EditMarkerRequest.md @@ -0,0 +1,24 @@ +# EditMarkerRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `marker` | *String* | :heavy_check_mark: | The id of the marker to edit | | +| `type` | *long* | :heavy_check_mark: | The type of marker to edit/create | | +| `startTimeOffset` | *long* | :heavy_check_mark: | The start time of the marker | | +| `endTimeOffset` | *Optional\* | :heavy_minus_sign: | The end time of the marker | | +| `attributes` | [Optional\](../../models/operations/QueryParamAttributes.md) | :heavy_minus_sign: | The attributes to assign to this marker | {
"title": "My favorite spot"
} | \ No newline at end of file diff --git a/docs/models/operations/EditMarkerResponse.md b/docs/models/operations/EditMarkerResponse.md new file mode 100644 index 00000000..817c5a2e --- /dev/null +++ b/docs/models/operations/EditMarkerResponse.md @@ -0,0 +1,11 @@ +# EditMarkerResponse + + +## 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 | +| `postResponses200` | [Optional\](../../models/shared/PostResponses200.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/EditMetadataItemRequest.md b/docs/models/operations/EditMetadataItemRequest.md new file mode 100644 index 00000000..25c5adaf --- /dev/null +++ b/docs/models/operations/EditMetadataItemRequest.md @@ -0,0 +1,20 @@ +# EditMetadataItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | List\<*String*> | :heavy_check_mark: | N/A | | +| `args` | [Optional\](../../models/operations/Args.md) | :heavy_minus_sign: | The new values for the metadata item | | \ No newline at end of file diff --git a/docs/models/operations/EditMetadataItemResponse.md b/docs/models/operations/EditMetadataItemResponse.md new file mode 100644 index 00000000..fbe14e36 --- /dev/null +++ b/docs/models/operations/EditMetadataItemResponse.md @@ -0,0 +1,10 @@ +# EditMetadataItemResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/EditSectionQueryParamPrefs.md b/docs/models/operations/EditSectionQueryParamPrefs.md new file mode 100644 index 00000000..713e00f5 --- /dev/null +++ b/docs/models/operations/EditSectionQueryParamPrefs.md @@ -0,0 +1,9 @@ +# EditSectionQueryParamPrefs + +The preferences for this section + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/EditSectionRequest.md b/docs/models/operations/EditSectionRequest.md new file mode 100644 index 00000000..379f3399 --- /dev/null +++ b/docs/models/operations/EditSectionRequest.md @@ -0,0 +1,26 @@ +# EditSectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *String* | :heavy_check_mark: | The section identifier | | +| `name` | *Optional\* | :heavy_minus_sign: | The name of the new section | | +| `scanner` | *Optional\* | :heavy_minus_sign: | The scanner this section should use | | +| `agent` | *String* | :heavy_check_mark: | The agent this section should use for metadata | | +| `metadataAgentProviderGroupId` | *Optional\* | :heavy_minus_sign: | The agent group id for this section | | +| `language` | *Optional\* | :heavy_minus_sign: | The language of this section | | +| `locations` | List\<*String*> | :heavy_minus_sign: | The locations on disk to add to this section | [
"O:\\fatboy\\Media\\Ripped\\Music",
"O:\\fatboy\\Media\\My Music"
] | +| `prefs` | [Optional\](../../models/operations/EditSectionQueryParamPrefs.md) | :heavy_minus_sign: | The preferences for this section | {
"collectionMode": 2,
"hidden": 0
} | \ No newline at end of file diff --git a/docs/models/operations/EditSectionResponse.md b/docs/models/operations/EditSectionResponse.md new file mode 100644 index 00000000..60567aad --- /dev/null +++ b/docs/models/operations/EditSectionResponse.md @@ -0,0 +1,10 @@ +# EditSectionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/EditSubscriptionPreferencesQueryParamPrefs.md b/docs/models/operations/EditSubscriptionPreferencesQueryParamPrefs.md new file mode 100644 index 00000000..1f4aba51 --- /dev/null +++ b/docs/models/operations/EditSubscriptionPreferencesQueryParamPrefs.md @@ -0,0 +1,7 @@ +# EditSubscriptionPreferencesQueryParamPrefs + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/EditSubscriptionPreferencesRequest.md b/docs/models/operations/EditSubscriptionPreferencesRequest.md new file mode 100644 index 00000000..ffde7643 --- /dev/null +++ b/docs/models/operations/EditSubscriptionPreferencesRequest.md @@ -0,0 +1,20 @@ +# EditSubscriptionPreferencesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `subscriptionId` | *long* | :heavy_check_mark: | N/A | | +| `prefs` | [Optional\](../../models/operations/EditSubscriptionPreferencesQueryParamPrefs.md) | :heavy_minus_sign: | N/A | {
"minVideoQuality": 720
} | \ No newline at end of file diff --git a/docs/models/operations/EditSubscriptionPreferencesResponse.md b/docs/models/operations/EditSubscriptionPreferencesResponse.md new file mode 100644 index 00000000..e1d652aa --- /dev/null +++ b/docs/models/operations/EditSubscriptionPreferencesResponse.md @@ -0,0 +1,11 @@ +# EditSubscriptionPreferencesResponse + + +## 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 | +| `mediaContainerWithSubscription` | [Optional\](../../models/shared/MediaContainerWithSubscription.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/Element.md b/docs/models/operations/Element.md new file mode 100644 index 00000000..f0b5f2fb --- /dev/null +++ b/docs/models/operations/Element.md @@ -0,0 +1,13 @@ +# Element + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `THUMB` | thumb | +| `ART` | art | +| `CLEAR_LOGO` | clearLogo | +| `BANNER` | banner | +| `POSTER` | poster | +| `THEME` | theme | \ No newline at end of file diff --git a/docs/models/operations/EmptyTrashRequest.md b/docs/models/operations/EmptyTrashRequest.md new file mode 100644 index 00000000..eb725a21 --- /dev/null +++ b/docs/models/operations/EmptyTrashRequest.md @@ -0,0 +1,19 @@ +# EmptyTrashRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/EmptyTrashResponse.md b/docs/models/operations/EmptyTrashResponse.md new file mode 100644 index 00000000..ec79d774 --- /dev/null +++ b/docs/models/operations/EmptyTrashResponse.md @@ -0,0 +1,10 @@ +# EmptyTrashResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/EnablePaperTrailResponse.md b/docs/models/operations/EnablePaperTrailResponse.md deleted file mode 100644 index 074517c2..00000000 --- a/docs/models/operations/EnablePaperTrailResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# EnablePaperTrailResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/EnablePapertrailRequest.md b/docs/models/operations/EnablePapertrailRequest.md new file mode 100644 index 00000000..7a578b47 --- /dev/null +++ b/docs/models/operations/EnablePapertrailRequest.md @@ -0,0 +1,19 @@ +# EnablePapertrailRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `minutes` | *Optional\* | :heavy_minus_sign: | The number of minutes logging should be sent to Papertrail | | \ No newline at end of file diff --git a/docs/models/operations/EnablePapertrailResponse.md b/docs/models/operations/EnablePapertrailResponse.md new file mode 100644 index 00000000..9073da36 --- /dev/null +++ b/docs/models/operations/EnablePapertrailResponse.md @@ -0,0 +1,10 @@ +# EnablePapertrailResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Extension.md b/docs/models/operations/Extension.md new file mode 100644 index 00000000..11f49c63 --- /dev/null +++ b/docs/models/operations/Extension.md @@ -0,0 +1,12 @@ +# Extension + +Extension + + + +## Values + +| Name | Value | +| ------ | ------ | +| `M3U8` | m3u8 | +| `MPD` | mpd | \ No newline at end of file diff --git a/docs/models/operations/Extras.md b/docs/models/operations/Extras.md deleted file mode 100644 index 969011a8..00000000 --- a/docs/models/operations/Extras.md +++ /dev/null @@ -1,8 +0,0 @@ -# Extras - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | The size of the extras. | 1 | \ No newline at end of file diff --git a/docs/models/operations/Feature.md b/docs/models/operations/Feature.md index cbb028d6..d83012f9 100644 --- a/docs/models/operations/Feature.md +++ b/docs/models/operations/Feature.md @@ -3,12 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | | -| `type` | *String* | :heavy_check_mark: | N/A | | -| `flavor` | *Optional\* | :heavy_minus_sign: | N/A | global | -| `scrobbleKey` | *Optional\* | :heavy_minus_sign: | N/A | /:/scrobble/new | -| `unscrobbleKey` | *Optional\* | :heavy_minus_sign: | N/A | /:/unscrobble/new | -| `directory` | List\<[GetMediaProvidersDirectory](../../models/operations/GetMediaProvidersDirectory.md)> | :heavy_minus_sign: | N/A | | -| `action` | List\<[Action](../../models/operations/Action.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `directory` | List\<[Directory](../../models/shared/Directory.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Field.md b/docs/models/operations/Field.md deleted file mode 100644 index 46489043..00000000 --- a/docs/models/operations/Field.md +++ /dev/null @@ -1,11 +0,0 @@ -# Field - - -## 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/FieldType.md b/docs/models/operations/FieldType.md deleted file mode 100644 index 926ccafe..00000000 --- a/docs/models/operations/FieldType.md +++ /dev/null @@ -1,9 +0,0 @@ -# FieldType - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `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/Filter.md b/docs/models/operations/Filter.md deleted file mode 100644 index 2736d3d0..00000000 --- a/docs/models/operations/Filter.md +++ /dev/null @@ -1,12 +0,0 @@ -# Filter - -Filter - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `ALL` | all | -| `AVAILABLE` | available | -| `RELEASED` | released | \ No newline at end of file diff --git a/docs/models/operations/FlattenSeasons.md b/docs/models/operations/FlattenSeasons.md deleted file mode 100644 index de372005..00000000 --- a/docs/models/operations/FlattenSeasons.md +++ /dev/null @@ -1,13 +0,0 @@ -# FlattenSeasons - -Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - - - -## Values - -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `Hide` | 0 | -| `Show` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Flavor.md b/docs/models/operations/Flavor.md new file mode 100644 index 00000000..b43f961f --- /dev/null +++ b/docs/models/operations/Flavor.md @@ -0,0 +1,15 @@ +# Flavor + +- `0`: The country is divided into regions, and following the key will lead to a list of regions. +- `1`: The county is divided by postal codes, and an example code is returned in `example`. +- `2`: The country has a single postal code, returned in `example`. + + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | +| `TWO` | 2 | \ No newline at end of file diff --git a/docs/models/operations/Force.md b/docs/models/operations/Force.md deleted file mode 100644 index 97b7709c..00000000 --- a/docs/models/operations/Force.md +++ /dev/null @@ -1,11 +0,0 @@ -# Force - -Force the refresh even if the library is already being refreshed. - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Format.md b/docs/models/operations/Format.md new file mode 100644 index 00000000..bc596c76 --- /dev/null +++ b/docs/models/operations/Format.md @@ -0,0 +1,13 @@ +# Format + +The output format for the image; defaults to jpg + + +## Values + +| Name | Value | +| ------ | ------ | +| `JPG` | jpg | +| `JPEG` | jpeg | +| `PNG` | png | +| `PPM` | ppm | \ No newline at end of file diff --git a/docs/models/operations/Friend.md b/docs/models/operations/Friend.md deleted file mode 100644 index e2023bbe..00000000 --- a/docs/models/operations/Friend.md +++ /dev/null @@ -1,19 +0,0 @@ -# Friend - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `email` | *String* | :heavy_check_mark: | The account email address | username@email.com | -| `friendlyName` | *Optional\* | :heavy_check_mark: | The account full name | exampleUser | -| `home` | *boolean* | :heavy_check_mark: | If the account is a Plex Home user | | -| `id` | *int* | :heavy_check_mark: | The Plex account ID | | -| `restricted` | *Optional\* | :heavy_minus_sign: | If the account is a Plex Home managed user | | -| `sharedServers` | List\<[SharedServers](../../models/operations/SharedServers.md)> | :heavy_check_mark: | N/A | | -| `sharedSources` | List\<[SharedSources](../../models/operations/SharedSources.md)> | :heavy_check_mark: | N/A | | -| `status` | [Status](../../models/operations/Status.md) | :heavy_check_mark: | Current friend request status | accepted | -| `thumb` | *String* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578 | -| `title` | *String* | :heavy_check_mark: | The title of the account (username or friendly name) | username123 | -| `username` | *String* | :heavy_check_mark: | The account username | username123 | -| `uuid` | *String* | :heavy_check_mark: | The account Universally Unique Identifier (UUID) | 7d1916e0d8f6e76b | \ No newline at end of file diff --git a/docs/models/operations/GenerateThumbsRequest.md b/docs/models/operations/GenerateThumbsRequest.md new file mode 100644 index 00000000..0869d5aa --- /dev/null +++ b/docs/models/operations/GenerateThumbsRequest.md @@ -0,0 +1,20 @@ +# GenerateThumbsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `force` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/GenerateThumbsResponse.md b/docs/models/operations/GenerateThumbsResponse.md new file mode 100644 index 00000000..a50b8e4e --- /dev/null +++ b/docs/models/operations/GenerateThumbsResponse.md @@ -0,0 +1,10 @@ +# GenerateThumbsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Genre.md b/docs/models/operations/Genre.md deleted file mode 100644 index d275aaa1..00000000 --- a/docs/models/operations/Genre.md +++ /dev/null @@ -1,12 +0,0 @@ -# Genre - -The filter query string for similar items. - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `filter` | *String* | :heavy_check_mark: | N/A | genre=19 | -| `tag` | *String* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/models/operations/GeoData.md b/docs/models/operations/GeoData.md deleted file mode 100644 index 1d9d8064..00000000 --- a/docs/models/operations/GeoData.md +++ /dev/null @@ -1,20 +0,0 @@ -# GeoData - -Geo location data - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | *String* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI | -| `continentCode` | *String* | :heavy_check_mark: | The continent code where the country is located. | NA | -| `country` | *String* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands | -| `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam | -| `europeanUnionMember` | *Optional\* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | -| `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | -| `postalCode` | *String* | :heavy_check_mark: | The postal code of the location. | 802 | -| `inPrivacyRestrictedCountry` | *Optional\* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | -| `inPrivacyRestrictedRegion` | *Optional\* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | -| `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | -| `coordinates` | *String* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 | \ No newline at end of file diff --git a/docs/models/operations/GetActorsLibraryDirectory.md b/docs/models/operations/GetActorsLibraryDirectory.md deleted file mode 100644 index ccc56a59..00000000 --- a/docs/models/operations/GetActorsLibraryDirectory.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetActorsLibraryDirectory - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `fastKey` | *String* | :heavy_check_mark: | A fast lookup key for the actor relative url. | /library/sections/2/all?actor=134671 | -| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the actor. | https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg | -| `key` | *String* | :heavy_check_mark: | A unique key representing the actor. | 134671 | -| `title` | *String* | :heavy_check_mark: | The name of the actor. | Aaron Paul | \ No newline at end of file diff --git a/docs/models/operations/GetActorsLibraryMediaContainer.md b/docs/models/operations/GetActorsLibraryMediaContainer.md deleted file mode 100644 index aa2ca471..00000000 --- a/docs/models/operations/GetActorsLibraryMediaContainer.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetActorsLibraryMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `title2` | *String* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `viewGroup` | *String* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `viewMode` | *Optional\* | :heavy_minus_sign: | Identifier for the view mode. | 131131 | -| `directory` | List\<[GetActorsLibraryDirectory](../../models/operations/GetActorsLibraryDirectory.md)> | :heavy_minus_sign: | An array of actor entries for media items. | | \ No newline at end of file diff --git a/docs/models/operations/GetActorsLibraryQueryParamType.md b/docs/models/operations/GetActorsLibraryQueryParamType.md deleted file mode 100644 index 54c839f2..00000000 --- a/docs/models/operations/GetActorsLibraryQueryParamType.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetActorsLibraryQueryParamType - -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | \ No newline at end of file diff --git a/docs/models/operations/GetActorsLibraryRequest.md b/docs/models/operations/GetActorsLibraryRequest.md deleted file mode 100644 index 202a7bbb..00000000 --- a/docs/models/operations/GetActorsLibraryRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetActorsLibraryRequest - - -## Fields - -| 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` | [GetActorsLibraryQueryParamType](../../models/operations/GetActorsLibraryQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/models/operations/GetActorsLibraryResponse.md b/docs/models/operations/GetActorsLibraryResponse.md deleted file mode 100644 index 9d25cbbd..00000000 --- a/docs/models/operations/GetActorsLibraryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetActorsLibraryResponse - - -## 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/GetActorsLibraryResponseBody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/models/operations/GetActorsLibraryResponseBody.md b/docs/models/operations/GetActorsLibraryResponseBody.md deleted file mode 100644 index 4d52eede..00000000 --- a/docs/models/operations/GetActorsLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetActorsLibraryResponseBody - -Successful response containing media container data. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetActorsLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAlbumsRequest.md b/docs/models/operations/GetAlbumsRequest.md new file mode 100644 index 00000000..866887d5 --- /dev/null +++ b/docs/models/operations/GetAlbumsRequest.md @@ -0,0 +1,19 @@ +# GetAlbumsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/GetAlbumsResponse.md b/docs/models/operations/GetAlbumsResponse.md new file mode 100644 index 00000000..51d7f095 --- /dev/null +++ b/docs/models/operations/GetAlbumsResponse.md @@ -0,0 +1,11 @@ +# GetAlbumsResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetAllHubsMediaContainer.md b/docs/models/operations/GetAllHubsMediaContainer.md new file mode 100644 index 00000000..5890b204 --- /dev/null +++ b/docs/models/operations/GetAllHubsMediaContainer.md @@ -0,0 +1,17 @@ +# GetAllHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | List\<[Hub](../../models/shared/Hub.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAllHubsRequest.md b/docs/models/operations/GetAllHubsRequest.md new file mode 100644 index 00000000..806c2418 --- /dev/null +++ b/docs/models/operations/GetAllHubsRequest.md @@ -0,0 +1,21 @@ +# GetAllHubsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `count` | *Optional\* | :heavy_minus_sign: | Limit results to count items | | +| `onlyTransient` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) | 1 | +| `identifier` | List\<*String*> | :heavy_minus_sign: | If provided, limit to only specified hubs | | \ No newline at end of file diff --git a/docs/models/operations/GetAllHubsResponse.md b/docs/models/operations/GetAllHubsResponse.md new file mode 100644 index 00000000..4e212207 --- /dev/null +++ b/docs/models/operations/GetAllHubsResponse.md @@ -0,0 +1,12 @@ +# GetAllHubsResponse + + +## 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/GetAllHubsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAllHubsResponseBody.md b/docs/models/operations/GetAllHubsResponseBody.md new file mode 100644 index 00000000..7c7c9458 --- /dev/null +++ b/docs/models/operations/GetAllHubsResponseBody.md @@ -0,0 +1,10 @@ +# GetAllHubsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/GetAllHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAllItemLeavesRequest.md b/docs/models/operations/GetAllItemLeavesRequest.md new file mode 100644 index 00000000..cf7fef5a --- /dev/null +++ b/docs/models/operations/GetAllItemLeavesRequest.md @@ -0,0 +1,19 @@ +# GetAllItemLeavesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetAllItemLeavesResponse.md b/docs/models/operations/GetAllItemLeavesResponse.md new file mode 100644 index 00000000..4c8aa012 --- /dev/null +++ b/docs/models/operations/GetAllItemLeavesResponse.md @@ -0,0 +1,12 @@ +# GetAllItemLeavesResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAllLanguagesMediaContainer.md b/docs/models/operations/GetAllLanguagesMediaContainer.md new file mode 100644 index 00000000..b42b926a --- /dev/null +++ b/docs/models/operations/GetAllLanguagesMediaContainer.md @@ -0,0 +1,17 @@ +# GetAllLanguagesMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `language` | List\<[Language](../../models/operations/Language.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAllLanguagesResponse.md b/docs/models/operations/GetAllLanguagesResponse.md new file mode 100644 index 00000000..b432243d --- /dev/null +++ b/docs/models/operations/GetAllLanguagesResponse.md @@ -0,0 +1,12 @@ +# GetAllLanguagesResponse + + +## 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/GetAllLanguagesResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAllLanguagesResponseBody.md b/docs/models/operations/GetAllLanguagesResponseBody.md new file mode 100644 index 00000000..07190e22 --- /dev/null +++ b/docs/models/operations/GetAllLanguagesResponseBody.md @@ -0,0 +1,10 @@ +# GetAllLanguagesResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetAllLanguagesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAllLeavesRequest.md b/docs/models/operations/GetAllLeavesRequest.md new file mode 100644 index 00000000..8bac24d9 --- /dev/null +++ b/docs/models/operations/GetAllLeavesRequest.md @@ -0,0 +1,19 @@ +# GetAllLeavesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/GetAllLeavesResponse.md b/docs/models/operations/GetAllLeavesResponse.md new file mode 100644 index 00000000..f004d2f4 --- /dev/null +++ b/docs/models/operations/GetAllLeavesResponse.md @@ -0,0 +1,11 @@ +# GetAllLeavesResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetAllLibrariesDirectory.md b/docs/models/operations/GetAllLibrariesDirectory.md deleted file mode 100644 index cd951869..00000000 --- a/docs/models/operations/GetAllLibrariesDirectory.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetAllLibrariesDirectory - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `composite` | *String* | :heavy_check_mark: | The relative path to the composite media item. | /library/sections/1/composite/1743824484 | -| `filters` | *boolean* | :heavy_check_mark: | UNKNOWN | true | -| `refreshing` | *boolean* | :heavy_check_mark: | Indicates whether the library is currently being refreshed or updated | true | -| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `key` | *String* | :heavy_check_mark: | The library key representing the unique identifier | 1 | -| `type` | [GetAllLibrariesType](../../models/operations/GetAllLibrariesType.md) | :heavy_check_mark: | N/A | movie | -| `title` | *String* | :heavy_check_mark: | The title of the library | Movies | -| `agent` | *String* | :heavy_check_mark: | The Plex agent used to match and retrieve media metadata. | tv.plex.agents.movie | -| `scanner` | *String* | :heavy_check_mark: | UNKNOWN | Plex Movie | -| `language` | *String* | :heavy_check_mark: | The Plex library language that has been set | en-US | -| `uuid` | *String* | :heavy_check_mark: | The universally unique identifier for the library. | e69655a2-ef48-4aba-bb19-01e7d3cc34d6 | -| `updatedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `createdAt` | *Optional\* | :heavy_minus_sign: | N/A | 1556281940 | -| `scannedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `content` | *boolean* | :heavy_check_mark: | UNKNOWN | true | -| `directory` | *boolean* | :heavy_check_mark: | UNKNOWN | true | -| `contentChangedAt` | *long* | :heavy_check_mark: | Timestamp (in seconds) representing the last time the content was modified.
NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64
| 9173960 | -| `hidden` | [Optional\](../../models/operations/Hidden.md) | :heavy_minus_sign: | The Plex library visibility setting | 1 | -| `location` | List\<[GetAllLibrariesLocation](../../models/operations/GetAllLibrariesLocation.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetAllLibrariesLocation.md b/docs/models/operations/GetAllLibrariesLocation.md deleted file mode 100644 index e28f14a8..00000000 --- a/docs/models/operations/GetAllLibrariesLocation.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetAllLibrariesLocation - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `id` | *int* | :heavy_check_mark: | The ID of the location. | 1 | -| `path` | *String* | :heavy_check_mark: | The path to the media item. | /Movies | \ No newline at end of file diff --git a/docs/models/operations/GetAllLibrariesMediaContainer.md b/docs/models/operations/GetAllLibrariesMediaContainer.md deleted file mode 100644 index 54cafe0b..00000000 --- a/docs/models/operations/GetAllLibrariesMediaContainer.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAllLibrariesMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `directory` | List\<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetAllLibrariesResponse.md b/docs/models/operations/GetAllLibrariesResponse.md deleted file mode 100644 index c278db65..00000000 --- a/docs/models/operations/GetAllLibrariesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAllLibrariesResponse - - -## 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/GetAllLibrariesResponseBody.md) | :heavy_minus_sign: | The libraries available on the Server | \ No newline at end of file diff --git a/docs/models/operations/GetAllLibrariesResponseBody.md b/docs/models/operations/GetAllLibrariesResponseBody.md deleted file mode 100644 index f92de919..00000000 --- a/docs/models/operations/GetAllLibrariesResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAllLibrariesResponseBody - -The libraries available on the Server - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAllLibrariesType.md b/docs/models/operations/GetAllLibrariesType.md deleted file mode 100644 index 432e0446..00000000 --- a/docs/models/operations/GetAllLibrariesType.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetAllLibrariesType - -The library type - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | \ No newline at end of file diff --git a/docs/models/operations/GetAllPreferencesResponse.md b/docs/models/operations/GetAllPreferencesResponse.md new file mode 100644 index 00000000..62aeda89 --- /dev/null +++ b/docs/models/operations/GetAllPreferencesResponse.md @@ -0,0 +1,11 @@ +# GetAllPreferencesResponse + + +## 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 | +| `mediaContainerWithSettings` | [Optional\](../../models/shared/MediaContainerWithSettings.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetAllSubscriptionsRequest.md b/docs/models/operations/GetAllSubscriptionsRequest.md new file mode 100644 index 00000000..a4207f03 --- /dev/null +++ b/docs/models/operations/GetAllSubscriptionsRequest.md @@ -0,0 +1,20 @@ +# GetAllSubscriptionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `includeGrabs` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates whether the active grabs should be included as well | 1 | +| `includeStorage` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Compute the storage of recorded items desired by this subscription | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetAllSubscriptionsResponse.md b/docs/models/operations/GetAllSubscriptionsResponse.md new file mode 100644 index 00000000..6bc1f75b --- /dev/null +++ b/docs/models/operations/GetAllSubscriptionsResponse.md @@ -0,0 +1,12 @@ +# GetAllSubscriptionsResponse + + +## 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 | +| `mediaContainerWithSubscription` | [Optional\](../../models/shared/MediaContainerWithSubscription.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetArtsRequest.md b/docs/models/operations/GetArtsRequest.md new file mode 100644 index 00000000..d9892aa2 --- /dev/null +++ b/docs/models/operations/GetArtsRequest.md @@ -0,0 +1,19 @@ +# GetArtsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/GetArtsResponse.md b/docs/models/operations/GetArtsResponse.md new file mode 100644 index 00000000..df5c9e70 --- /dev/null +++ b/docs/models/operations/GetArtsResponse.md @@ -0,0 +1,11 @@ +# GetArtsResponse + + +## 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 | +| `mediaContainerWithArtwork` | [Optional\](../../models/shared/MediaContainerWithArtwork.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetAugmentationStatusRequest.md b/docs/models/operations/GetAugmentationStatusRequest.md new file mode 100644 index 00000000..0b97852c --- /dev/null +++ b/docs/models/operations/GetAugmentationStatusRequest.md @@ -0,0 +1,20 @@ +# GetAugmentationStatusRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `augmentationId` | *String* | :heavy_check_mark: | The id of the augmentation | | +| `wait_` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Wait for augmentation completion before returning | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetAugmentationStatusResponse.md b/docs/models/operations/GetAugmentationStatusResponse.md new file mode 100644 index 00000000..0531aad2 --- /dev/null +++ b/docs/models/operations/GetAugmentationStatusResponse.md @@ -0,0 +1,10 @@ +# GetAugmentationStatusResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableClientsMediaContainer.md b/docs/models/operations/GetAvailableClientsMediaContainer.md deleted file mode 100644 index 199a458d..00000000 --- a/docs/models/operations/GetAvailableClientsMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetAvailableClientsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `server` | List\<[Server](../../models/operations/Server.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableClientsResponse.md b/docs/models/operations/GetAvailableClientsResponse.md deleted file mode 100644 index a47368f6..00000000 --- a/docs/models/operations/GetAvailableClientsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAvailableClientsResponse - - -## 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/GetAvailableClientsResponseBody.md) | :heavy_minus_sign: | Available Clients | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableClientsResponseBody.md b/docs/models/operations/GetAvailableClientsResponseBody.md deleted file mode 100644 index cb362d40..00000000 --- a/docs/models/operations/GetAvailableClientsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAvailableClientsResponseBody - -Available Clients - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetAvailableClientsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableGrabbersMediaContainer.md b/docs/models/operations/GetAvailableGrabbersMediaContainer.md new file mode 100644 index 00000000..38ee7ba0 --- /dev/null +++ b/docs/models/operations/GetAvailableGrabbersMediaContainer.md @@ -0,0 +1,17 @@ +# GetAvailableGrabbersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `mediaGrabber` | List\<[MediaGrabber](../../models/operations/MediaGrabber.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableGrabbersRequest.md b/docs/models/operations/GetAvailableGrabbersRequest.md new file mode 100644 index 00000000..68cb43a7 --- /dev/null +++ b/docs/models/operations/GetAvailableGrabbersRequest.md @@ -0,0 +1,19 @@ +# GetAvailableGrabbersRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `protocol` | *Optional\* | :heavy_minus_sign: | Only return grabbers providing this protocol. | livetv | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableGrabbersResponse.md b/docs/models/operations/GetAvailableGrabbersResponse.md new file mode 100644 index 00000000..b73c5743 --- /dev/null +++ b/docs/models/operations/GetAvailableGrabbersResponse.md @@ -0,0 +1,12 @@ +# GetAvailableGrabbersResponse + + +## 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/GetAvailableGrabbersResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableGrabbersResponseBody.md b/docs/models/operations/GetAvailableGrabbersResponseBody.md new file mode 100644 index 00000000..4b911129 --- /dev/null +++ b/docs/models/operations/GetAvailableGrabbersResponseBody.md @@ -0,0 +1,10 @@ +# GetAvailableGrabbersResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetAvailableGrabbersMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableSortsMediaContainer.md b/docs/models/operations/GetAvailableSortsMediaContainer.md new file mode 100644 index 00000000..ef9cf8e5 --- /dev/null +++ b/docs/models/operations/GetAvailableSortsMediaContainer.md @@ -0,0 +1,17 @@ +# GetAvailableSortsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | List\<[Sort](../../models/shared/Sort.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableSortsRequest.md b/docs/models/operations/GetAvailableSortsRequest.md new file mode 100644 index 00000000..67160025 --- /dev/null +++ b/docs/models/operations/GetAvailableSortsRequest.md @@ -0,0 +1,19 @@ +# GetAvailableSortsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableSortsResponse.md b/docs/models/operations/GetAvailableSortsResponse.md new file mode 100644 index 00000000..40b23618 --- /dev/null +++ b/docs/models/operations/GetAvailableSortsResponse.md @@ -0,0 +1,11 @@ +# GetAvailableSortsResponse + + +## 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/GetAvailableSortsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetAvailableSortsResponseBody.md b/docs/models/operations/GetAvailableSortsResponseBody.md new file mode 100644 index 00000000..1595b004 --- /dev/null +++ b/docs/models/operations/GetAvailableSortsResponseBody.md @@ -0,0 +1,10 @@ +# GetAvailableSortsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetAvailableSortsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetBackgroundTasksMediaContainer.md b/docs/models/operations/GetBackgroundTasksMediaContainer.md new file mode 100644 index 00000000..80eac1e7 --- /dev/null +++ b/docs/models/operations/GetBackgroundTasksMediaContainer.md @@ -0,0 +1,17 @@ +# GetBackgroundTasksMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `transcodeJob` | List\<[TranscodeJob](../../models/operations/TranscodeJob.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetBackgroundTasksResponse.md b/docs/models/operations/GetBackgroundTasksResponse.md new file mode 100644 index 00000000..825998df --- /dev/null +++ b/docs/models/operations/GetBackgroundTasksResponse.md @@ -0,0 +1,11 @@ +# GetBackgroundTasksResponse + + +## 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/GetBackgroundTasksResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetBackgroundTasksResponseBody.md b/docs/models/operations/GetBackgroundTasksResponseBody.md new file mode 100644 index 00000000..d234d610 --- /dev/null +++ b/docs/models/operations/GetBackgroundTasksResponseBody.md @@ -0,0 +1,10 @@ +# GetBackgroundTasksResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetBackgroundTasksMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetBackgroundTasksType.md b/docs/models/operations/GetBackgroundTasksType.md new file mode 100644 index 00000000..12b9d11b --- /dev/null +++ b/docs/models/operations/GetBackgroundTasksType.md @@ -0,0 +1,8 @@ +# GetBackgroundTasksType + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `TRANSCODE` | transcode | \ No newline at end of file diff --git a/docs/models/operations/GetBandwidthStatisticsAccount.md b/docs/models/operations/GetBandwidthStatisticsAccount.md deleted file mode 100644 index 50e75245..00000000 --- a/docs/models/operations/GetBandwidthStatisticsAccount.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetBandwidthStatisticsAccount - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 238960586 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /accounts/238960586 | -| `name` | *Optional\* | :heavy_minus_sign: | N/A | Diane | -| `defaultAudioLanguage` | *Optional\* | :heavy_minus_sign: | N/A | en | -| `autoSelectAudio` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `defaultSubtitleLanguage` | *Optional\* | :heavy_minus_sign: | N/A | en | -| `subtitleMode` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 | \ No newline at end of file diff --git a/docs/models/operations/GetBandwidthStatisticsDevice.md b/docs/models/operations/GetBandwidthStatisticsDevice.md deleted file mode 100644 index 21a2a5f1..00000000 --- a/docs/models/operations/GetBandwidthStatisticsDevice.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetBandwidthStatisticsDevice - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 208 | -| `name` | *Optional\* | :heavy_minus_sign: | N/A | Roku Express | -| `platform` | *Optional\* | :heavy_minus_sign: | N/A | Roku | -| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 | -| `createdAt` | *Optional\* | :heavy_minus_sign: | N/A | 1706470556 | \ No newline at end of file diff --git a/docs/models/operations/GetBandwidthStatisticsMediaContainer.md b/docs/models/operations/GetBandwidthStatisticsMediaContainer.md deleted file mode 100644 index 9e8472ce..00000000 --- a/docs/models/operations/GetBandwidthStatisticsMediaContainer.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetBandwidthStatisticsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 5497 | -| `device` | List\<[GetBandwidthStatisticsDevice](../../models/operations/GetBandwidthStatisticsDevice.md)> | :heavy_minus_sign: | N/A | | -| `account` | List\<[GetBandwidthStatisticsAccount](../../models/operations/GetBandwidthStatisticsAccount.md)> | :heavy_minus_sign: | N/A | | -| `statisticsBandwidth` | List\<[StatisticsBandwidth](../../models/operations/StatisticsBandwidth.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetBandwidthStatisticsRequest.md b/docs/models/operations/GetBandwidthStatisticsRequest.md deleted file mode 100644 index 4b8d2e6d..00000000 --- a/docs/models/operations/GetBandwidthStatisticsRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetBandwidthStatisticsRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `timespan` | *Optional\* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | \ No newline at end of file diff --git a/docs/models/operations/GetBandwidthStatisticsResponse.md b/docs/models/operations/GetBandwidthStatisticsResponse.md deleted file mode 100644 index 43d5e925..00000000 --- a/docs/models/operations/GetBandwidthStatisticsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetBandwidthStatisticsResponse - - -## 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/GetBandwidthStatisticsResponseBody.md) | :heavy_minus_sign: | Bandwidth Statistics | \ No newline at end of file diff --git a/docs/models/operations/GetBandwidthStatisticsResponseBody.md b/docs/models/operations/GetBandwidthStatisticsResponseBody.md deleted file mode 100644 index 72e9ab0b..00000000 --- a/docs/models/operations/GetBandwidthStatisticsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetBandwidthStatisticsResponseBody - -Bandwidth Statistics - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetBandwidthStatisticsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetBannerImageRequest.md b/docs/models/operations/GetBannerImageRequest.md deleted file mode 100644 index 317203e4..00000000 --- a/docs/models/operations/GetBannerImageRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetBannerImageRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | -| `width` | *long* | :heavy_check_mark: | N/A | 396 | -| `height` | *long* | :heavy_check_mark: | N/A | 396 | -| `minSize` | *long* | :heavy_check_mark: | N/A | 1 | -| `upscale` | *long* | :heavy_check_mark: | N/A | 1 | -| `xPlexToken` | *String* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/GetBannerImageResponse.md b/docs/models/operations/GetBannerImageResponse.md deleted file mode 100644 index e7ff686b..00000000 --- a/docs/models/operations/GetBannerImageResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetBannerImageResponse - - -## 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 | -| `responseStream` | *Optional\* | :heavy_minus_sign: | Successful response returning an image | -| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetButlerTasksResponse.md b/docs/models/operations/GetButlerTasksResponse.md deleted file mode 100644 index 4177a7b3..00000000 --- a/docs/models/operations/GetButlerTasksResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetButlerTasksResponse - - -## 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/GetButlerTasksResponseBody.md) | :heavy_minus_sign: | All butler tasks | \ No newline at end of file diff --git a/docs/models/operations/GetButlerTasksResponseBody.md b/docs/models/operations/GetButlerTasksResponseBody.md deleted file mode 100644 index 636d2a16..00000000 --- a/docs/models/operations/GetButlerTasksResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetButlerTasksResponseBody - -All butler tasks - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `butlerTasks` | [Optional\](../../models/operations/ButlerTasks.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCategoriesRequest.md b/docs/models/operations/GetCategoriesRequest.md new file mode 100644 index 00000000..9241a39c --- /dev/null +++ b/docs/models/operations/GetCategoriesRequest.md @@ -0,0 +1,19 @@ +# GetCategoriesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/GetCategoriesResponse.md b/docs/models/operations/GetCategoriesResponse.md new file mode 100644 index 00000000..c94c9970 --- /dev/null +++ b/docs/models/operations/GetCategoriesResponse.md @@ -0,0 +1,11 @@ +# GetCategoriesResponse + + +## 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 | +| `mediaContainerWithArtwork` | [Optional\](../../models/shared/MediaContainerWithArtwork.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetChannelsMediaContainer.md b/docs/models/operations/GetChannelsMediaContainer.md new file mode 100644 index 00000000..615a1397 --- /dev/null +++ b/docs/models/operations/GetChannelsMediaContainer.md @@ -0,0 +1,17 @@ +# GetChannelsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `channel` | List\<[Channel](../../models/shared/Channel.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetChannelsRequest.md b/docs/models/operations/GetChannelsRequest.md new file mode 100644 index 00000000..5257b1bf --- /dev/null +++ b/docs/models/operations/GetChannelsRequest.md @@ -0,0 +1,19 @@ +# GetChannelsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `lineup` | *String* | :heavy_check_mark: | The URI describing the lineup | | \ No newline at end of file diff --git a/docs/models/operations/GetChannelsResponse.md b/docs/models/operations/GetChannelsResponse.md new file mode 100644 index 00000000..f59813c5 --- /dev/null +++ b/docs/models/operations/GetChannelsResponse.md @@ -0,0 +1,12 @@ +# GetChannelsResponse + + +## 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/GetChannelsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetChannelsResponseBody.md b/docs/models/operations/GetChannelsResponseBody.md new file mode 100644 index 00000000..adb207e6 --- /dev/null +++ b/docs/models/operations/GetChannelsResponseBody.md @@ -0,0 +1,10 @@ +# GetChannelsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetChannelsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetChapterImageRequest.md b/docs/models/operations/GetChapterImageRequest.md new file mode 100644 index 00000000..4bc09418 --- /dev/null +++ b/docs/models/operations/GetChapterImageRequest.md @@ -0,0 +1,20 @@ +# GetChapterImageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `mediaId` | *long* | :heavy_check_mark: | The id of the media item | | +| `chapter` | *long* | :heavy_check_mark: | The index of the chapter | | \ No newline at end of file diff --git a/docs/models/operations/GetChapterImageResponse.md b/docs/models/operations/GetChapterImageResponse.md new file mode 100644 index 00000000..7b95b580 --- /dev/null +++ b/docs/models/operations/GetChapterImageResponse.md @@ -0,0 +1,11 @@ +# GetChapterImageResponse + + +## 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 | +| `responseStream` | *Optional\* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetClusterRequest.md b/docs/models/operations/GetClusterRequest.md new file mode 100644 index 00000000..43842dee --- /dev/null +++ b/docs/models/operations/GetClusterRequest.md @@ -0,0 +1,19 @@ +# GetClusterRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/GetClusterResponse.md b/docs/models/operations/GetClusterResponse.md new file mode 100644 index 00000000..f2aaed65 --- /dev/null +++ b/docs/models/operations/GetClusterResponse.md @@ -0,0 +1,11 @@ +# GetClusterResponse + + +## 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 | +| `mediaContainerWithArtwork` | [Optional\](../../models/shared/MediaContainerWithArtwork.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetCollectionImageRequest.md b/docs/models/operations/GetCollectionImageRequest.md new file mode 100644 index 00000000..5e1fedfa --- /dev/null +++ b/docs/models/operations/GetCollectionImageRequest.md @@ -0,0 +1,21 @@ +# GetCollectionImageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `collectionId` | *long* | :heavy_check_mark: | The collection id | | +| `updatedAt` | *long* | :heavy_check_mark: | The update time of the image. Used for busting cache. | | +| `composite` | [Optional\](../../models/shared/Composite.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetCollectionImageResponse.md b/docs/models/operations/GetCollectionImageResponse.md new file mode 100644 index 00000000..c8223b84 --- /dev/null +++ b/docs/models/operations/GetCollectionImageResponse.md @@ -0,0 +1,11 @@ +# GetCollectionImageResponse + + +## 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 | +| `responseStream` | *Optional\* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetCollectionItemsRequest.md b/docs/models/operations/GetCollectionItemsRequest.md new file mode 100644 index 00000000..4c64bebd --- /dev/null +++ b/docs/models/operations/GetCollectionItemsRequest.md @@ -0,0 +1,19 @@ +# GetCollectionItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `collectionId` | *long* | :heavy_check_mark: | The collection id | | \ No newline at end of file diff --git a/docs/models/operations/GetCollectionItemsResponse.md b/docs/models/operations/GetCollectionItemsResponse.md new file mode 100644 index 00000000..a456d821 --- /dev/null +++ b/docs/models/operations/GetCollectionItemsResponse.md @@ -0,0 +1,11 @@ +# GetCollectionItemsResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetCollectionsRequest.md b/docs/models/operations/GetCollectionsRequest.md new file mode 100644 index 00000000..cd8eee68 --- /dev/null +++ b/docs/models/operations/GetCollectionsRequest.md @@ -0,0 +1,20 @@ +# GetCollectionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `mediaQuery` | [Optional\](../../models/shared/MediaQuery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | \ No newline at end of file diff --git a/docs/models/operations/GetCollectionsResponse.md b/docs/models/operations/GetCollectionsResponse.md new file mode 100644 index 00000000..4df611aa --- /dev/null +++ b/docs/models/operations/GetCollectionsResponse.md @@ -0,0 +1,12 @@ +# GetCollectionsResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetColorsMediaContainer.md b/docs/models/operations/GetColorsMediaContainer.md new file mode 100644 index 00000000..5dea96aa --- /dev/null +++ b/docs/models/operations/GetColorsMediaContainer.md @@ -0,0 +1,17 @@ +# GetColorsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `ultraBlurColors` | List\<[UltraBlurColors](../../models/operations/UltraBlurColors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetColorsRequest.md b/docs/models/operations/GetColorsRequest.md new file mode 100644 index 00000000..112140bd --- /dev/null +++ b/docs/models/operations/GetColorsRequest.md @@ -0,0 +1,19 @@ +# GetColorsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `url` | *Optional\* | :heavy_minus_sign: | Url for image which requires color extraction. Can be relative PMS library path or absolute url. | /library/metadata/217745/art/1718931408 | \ No newline at end of file diff --git a/docs/models/operations/GetColorsResponse.md b/docs/models/operations/GetColorsResponse.md new file mode 100644 index 00000000..4b2d28c3 --- /dev/null +++ b/docs/models/operations/GetColorsResponse.md @@ -0,0 +1,11 @@ +# GetColorsResponse + + +## 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/GetColorsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetColorsResponseBody.md b/docs/models/operations/GetColorsResponseBody.md new file mode 100644 index 00000000..a57d2d12 --- /dev/null +++ b/docs/models/operations/GetColorsResponseBody.md @@ -0,0 +1,10 @@ +# GetColorsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetColorsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCommonRequest.md b/docs/models/operations/GetCommonRequest.md new file mode 100644 index 00000000..c163665f --- /dev/null +++ b/docs/models/operations/GetCommonRequest.md @@ -0,0 +1,21 @@ +# GetCommonRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `type` | *Optional\* | :heavy_minus_sign: | Item type | | +| `mediaQuery` | [Optional\](../../models/shared/MediaQuery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | \ No newline at end of file diff --git a/docs/models/operations/GetCommonResponse.md b/docs/models/operations/GetCommonResponse.md new file mode 100644 index 00000000..3bc6b23b --- /dev/null +++ b/docs/models/operations/GetCommonResponse.md @@ -0,0 +1,12 @@ +# GetCommonResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCompanionsDataResponse.md b/docs/models/operations/GetCompanionsDataResponse.md deleted file mode 100644 index d0effc3a..00000000 --- a/docs/models/operations/GetCompanionsDataResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetCompanionsDataResponse - - -## 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 | -| `responseBodies` | List\<[ResponseBody](../../models/operations/ResponseBody.md)> | :heavy_minus_sign: | Companions Data | \ No newline at end of file diff --git a/docs/models/operations/GetContinueWatchingMediaContainer.md b/docs/models/operations/GetContinueWatchingMediaContainer.md new file mode 100644 index 00000000..c684d5d5 --- /dev/null +++ b/docs/models/operations/GetContinueWatchingMediaContainer.md @@ -0,0 +1,17 @@ +# GetContinueWatchingMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | List\<[Hub](../../models/shared/Hub.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetContinueWatchingRequest.md b/docs/models/operations/GetContinueWatchingRequest.md new file mode 100644 index 00000000..76ddfca5 --- /dev/null +++ b/docs/models/operations/GetContinueWatchingRequest.md @@ -0,0 +1,19 @@ +# GetContinueWatchingRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `count` | *Optional\* | :heavy_minus_sign: | Limit results to count items | | \ No newline at end of file diff --git a/docs/models/operations/GetContinueWatchingResponse.md b/docs/models/operations/GetContinueWatchingResponse.md new file mode 100644 index 00000000..3d1915e1 --- /dev/null +++ b/docs/models/operations/GetContinueWatchingResponse.md @@ -0,0 +1,12 @@ +# GetContinueWatchingResponse + + +## 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/GetContinueWatchingResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetContinueWatchingResponseBody.md b/docs/models/operations/GetContinueWatchingResponseBody.md new file mode 100644 index 00000000..4baa06ed --- /dev/null +++ b/docs/models/operations/GetContinueWatchingResponseBody.md @@ -0,0 +1,10 @@ +# GetContinueWatchingResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/GetContinueWatchingMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesLibraryDirectory.md b/docs/models/operations/GetCountriesLibraryDirectory.md deleted file mode 100644 index 2a7168d9..00000000 --- a/docs/models/operations/GetCountriesLibraryDirectory.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetCountriesLibraryDirectory - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `fastKey` | *String* | :heavy_check_mark: | N/A | /library/sections/2/all?country=15491 | -| `key` | *String* | :heavy_check_mark: | N/A | 15491 | -| `title` | *String* | :heavy_check_mark: | N/A | Japan | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesLibraryMediaContainer.md b/docs/models/operations/GetCountriesLibraryMediaContainer.md deleted file mode 100644 index aa4bfd7b..00000000 --- a/docs/models/operations/GetCountriesLibraryMediaContainer.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetCountriesLibraryMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `content` | *String* | :heavy_check_mark: | The content type or mode. | secondary | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `title2` | *String* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `viewGroup` | *String* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `directory` | List\<[GetCountriesLibraryDirectory](../../models/operations/GetCountriesLibraryDirectory.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesLibraryQueryParamType.md b/docs/models/operations/GetCountriesLibraryQueryParamType.md deleted file mode 100644 index d29a551a..00000000 --- a/docs/models/operations/GetCountriesLibraryQueryParamType.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetCountriesLibraryQueryParamType - -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesLibraryRequest.md b/docs/models/operations/GetCountriesLibraryRequest.md deleted file mode 100644 index d4f8ab3b..00000000 --- a/docs/models/operations/GetCountriesLibraryRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetCountriesLibraryRequest - - -## Fields - -| 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` | [GetCountriesLibraryQueryParamType](../../models/operations/GetCountriesLibraryQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesLibraryResponse.md b/docs/models/operations/GetCountriesLibraryResponse.md deleted file mode 100644 index ef889c78..00000000 --- a/docs/models/operations/GetCountriesLibraryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetCountriesLibraryResponse - - -## 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/GetCountriesLibraryResponseBody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesLibraryResponseBody.md b/docs/models/operations/GetCountriesLibraryResponseBody.md deleted file mode 100644 index d180d081..00000000 --- a/docs/models/operations/GetCountriesLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetCountriesLibraryResponseBody - -Successful response containing media container data. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetCountriesLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesLineupsRequest.md b/docs/models/operations/GetCountriesLineupsRequest.md new file mode 100644 index 00000000..4e266ab2 --- /dev/null +++ b/docs/models/operations/GetCountriesLineupsRequest.md @@ -0,0 +1,21 @@ +# GetCountriesLineupsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `country` | *String* | :heavy_check_mark: | 3 letter country code | | +| `epgId` | *String* | :heavy_check_mark: | The `providerIdentifier` of the provider | | +| `postalCode` | *Optional\* | :heavy_minus_sign: | The postal code for the lineups to fetch | | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesLineupsResponse.md b/docs/models/operations/GetCountriesLineupsResponse.md new file mode 100644 index 00000000..83cd6165 --- /dev/null +++ b/docs/models/operations/GetCountriesLineupsResponse.md @@ -0,0 +1,11 @@ +# GetCountriesLineupsResponse + + +## 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 | +| `mediaContainerWithLineup` | [Optional\](../../models/shared/MediaContainerWithLineup.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesMediaContainer.md b/docs/models/operations/GetCountriesMediaContainer.md new file mode 100644 index 00000000..5ed757b1 --- /dev/null +++ b/docs/models/operations/GetCountriesMediaContainer.md @@ -0,0 +1,17 @@ +# GetCountriesMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `country` | List\<[Country](../../models/operations/Country.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesResponse.md b/docs/models/operations/GetCountriesResponse.md new file mode 100644 index 00000000..35f95336 --- /dev/null +++ b/docs/models/operations/GetCountriesResponse.md @@ -0,0 +1,12 @@ +# GetCountriesResponse + + +## 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/GetCountriesResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCountriesResponseBody.md b/docs/models/operations/GetCountriesResponseBody.md new file mode 100644 index 00000000..cd6ee56c --- /dev/null +++ b/docs/models/operations/GetCountriesResponseBody.md @@ -0,0 +1,10 @@ +# GetCountriesResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetCountriesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCountryRegionsCountry.md b/docs/models/operations/GetCountryRegionsCountry.md new file mode 100644 index 00000000..46d008ab --- /dev/null +++ b/docs/models/operations/GetCountryRegionsCountry.md @@ -0,0 +1,11 @@ +# GetCountryRegionsCountry + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `national` | *Optional\* | :heavy_minus_sign: | N/A | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCountryRegionsMediaContainer.md b/docs/models/operations/GetCountryRegionsMediaContainer.md new file mode 100644 index 00000000..846cc173 --- /dev/null +++ b/docs/models/operations/GetCountryRegionsMediaContainer.md @@ -0,0 +1,17 @@ +# GetCountryRegionsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `country` | List\<[GetCountryRegionsCountry](../../models/operations/GetCountryRegionsCountry.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCountryRegionsRequest.md b/docs/models/operations/GetCountryRegionsRequest.md new file mode 100644 index 00000000..826fd011 --- /dev/null +++ b/docs/models/operations/GetCountryRegionsRequest.md @@ -0,0 +1,20 @@ +# GetCountryRegionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `country` | *String* | :heavy_check_mark: | 3 letter country code | | +| `epgId` | *String* | :heavy_check_mark: | The `providerIdentifier` of the provider | | \ No newline at end of file diff --git a/docs/models/operations/GetCountryRegionsResponse.md b/docs/models/operations/GetCountryRegionsResponse.md new file mode 100644 index 00000000..c9756b6f --- /dev/null +++ b/docs/models/operations/GetCountryRegionsResponse.md @@ -0,0 +1,12 @@ +# GetCountryRegionsResponse + + +## 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/GetCountryRegionsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetCountryRegionsResponseBody.md b/docs/models/operations/GetCountryRegionsResponseBody.md new file mode 100644 index 00000000..232a5471 --- /dev/null +++ b/docs/models/operations/GetCountryRegionsResponseBody.md @@ -0,0 +1,10 @@ +# GetCountryRegionsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetCountryRegionsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDVRDVR.md b/docs/models/operations/GetDVRDVR.md new file mode 100644 index 00000000..56c7662d --- /dev/null +++ b/docs/models/operations/GetDVRDVR.md @@ -0,0 +1,12 @@ +# GetDVRDVR + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `device` | List\<[Device](../../models/shared/Device.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | +| `lineup` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDVRDVRsMediaContainer.md b/docs/models/operations/GetDVRDVRsMediaContainer.md new file mode 100644 index 00000000..cdf66a65 --- /dev/null +++ b/docs/models/operations/GetDVRDVRsMediaContainer.md @@ -0,0 +1,17 @@ +# GetDVRDVRsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *Optional\* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/models/operations/GetDVRMediaContainer.md b/docs/models/operations/GetDVRMediaContainer.md new file mode 100644 index 00000000..788f6761 --- /dev/null +++ b/docs/models/operations/GetDVRMediaContainer.md @@ -0,0 +1,9 @@ +# GetDVRMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/GetDVRDVRsMediaContainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | List\<[GetDVRDVR](../../models/operations/GetDVRDVR.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDVRRequest.md b/docs/models/operations/GetDVRRequest.md new file mode 100644 index 00000000..2bae96e9 --- /dev/null +++ b/docs/models/operations/GetDVRRequest.md @@ -0,0 +1,19 @@ +# GetDVRRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *long* | :heavy_check_mark: | The ID of the DVR. | | \ No newline at end of file diff --git a/docs/models/operations/GetDVRResponse.md b/docs/models/operations/GetDVRResponse.md new file mode 100644 index 00000000..d38b929a --- /dev/null +++ b/docs/models/operations/GetDVRResponse.md @@ -0,0 +1,12 @@ +# GetDVRResponse + + +## 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/GetDVRResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDVRResponseBody.md b/docs/models/operations/GetDVRResponseBody.md new file mode 100644 index 00000000..f444344b --- /dev/null +++ b/docs/models/operations/GetDVRResponseBody.md @@ -0,0 +1,10 @@ +# GetDVRResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetDVRMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDeviceDetailsRequest.md b/docs/models/operations/GetDeviceDetailsRequest.md new file mode 100644 index 00000000..52ffb4d1 --- /dev/null +++ b/docs/models/operations/GetDeviceDetailsRequest.md @@ -0,0 +1,19 @@ +# GetDeviceDetailsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device. | | \ No newline at end of file diff --git a/docs/models/operations/GetDeviceDetailsResponse.md b/docs/models/operations/GetDeviceDetailsResponse.md new file mode 100644 index 00000000..b204db3d --- /dev/null +++ b/docs/models/operations/GetDeviceDetailsResponse.md @@ -0,0 +1,11 @@ +# GetDeviceDetailsResponse + + +## 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 | +| `mediaContainerWithDevice` | [Optional\](../../models/shared/MediaContainerWithDevice.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesChannelsMediaContainer.md b/docs/models/operations/GetDevicesChannelsMediaContainer.md new file mode 100644 index 00000000..140e6bfe --- /dev/null +++ b/docs/models/operations/GetDevicesChannelsMediaContainer.md @@ -0,0 +1,17 @@ +# GetDevicesChannelsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `deviceChannel` | List\<[DeviceChannel](../../models/operations/DeviceChannel.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesChannelsRequest.md b/docs/models/operations/GetDevicesChannelsRequest.md new file mode 100644 index 00000000..de9866a7 --- /dev/null +++ b/docs/models/operations/GetDevicesChannelsRequest.md @@ -0,0 +1,19 @@ +# GetDevicesChannelsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device. | | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesChannelsResponse.md b/docs/models/operations/GetDevicesChannelsResponse.md new file mode 100644 index 00000000..34de53e7 --- /dev/null +++ b/docs/models/operations/GetDevicesChannelsResponse.md @@ -0,0 +1,12 @@ +# GetDevicesChannelsResponse + + +## 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/GetDevicesChannelsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesChannelsResponseBody.md b/docs/models/operations/GetDevicesChannelsResponseBody.md new file mode 100644 index 00000000..628f9726 --- /dev/null +++ b/docs/models/operations/GetDevicesChannelsResponseBody.md @@ -0,0 +1,10 @@ +# GetDevicesChannelsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetDevicesChannelsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesMediaContainer.md b/docs/models/operations/GetDevicesMediaContainer.md deleted file mode 100644 index fb44c8af..00000000 --- a/docs/models/operations/GetDevicesMediaContainer.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetDevicesMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 151 | -| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | com.plexapp.system.devices | -| `device` | List\<[Device](../../models/operations/Device.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesResponse.md b/docs/models/operations/GetDevicesResponse.md deleted file mode 100644 index 1c9bcec3..00000000 --- a/docs/models/operations/GetDevicesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetDevicesResponse - - -## 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/GetDevicesResponseBody.md) | :heavy_minus_sign: | Devices | \ No newline at end of file diff --git a/docs/models/operations/GetDevicesResponseBody.md b/docs/models/operations/GetDevicesResponseBody.md deleted file mode 100644 index 050f15fc..00000000 --- a/docs/models/operations/GetDevicesResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetDevicesResponseBody - -Devices - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetDevicesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueDownloadQueue.md b/docs/models/operations/GetDownloadQueueDownloadQueue.md new file mode 100644 index 00000000..cc0177cc --- /dev/null +++ b/docs/models/operations/GetDownloadQueueDownloadQueue.md @@ -0,0 +1,10 @@ +# GetDownloadQueueDownloadQueue + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `itemCount` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | [Optional\](../../models/operations/GetDownloadQueueStatus.md) | :heavy_minus_sign: | The state of this queue
- deciding: At least one item is still being decided
- waiting: At least one item is waiting for transcode and none are currently transcoding
- processing: At least one item is being transcoded
- done: All items are available (or potentially expired)
- error: At least one item has encountered an error
| \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueItemsDecisionResult.md b/docs/models/operations/GetDownloadQueueItemsDecisionResult.md new file mode 100644 index 00000000..52289346 --- /dev/null +++ b/docs/models/operations/GetDownloadQueueItemsDecisionResult.md @@ -0,0 +1,16 @@ +# GetDownloadQueueItemsDecisionResult + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `availableBandwidth` | *Optional\* | :heavy_minus_sign: | The maximum bitrate set when item was added | +| `directPlayDecisionCode` | *Optional\* | :heavy_minus_sign: | N/A | +| `directPlayDecisionText` | *Optional\* | :heavy_minus_sign: | N/A | +| `generalDecisionCode` | *Optional\* | :heavy_minus_sign: | N/A | +| `generalDecisionText` | *Optional\* | :heavy_minus_sign: | N/A | +| `mdeDecisionCode` | *Optional\* | :heavy_minus_sign: | The code indicating the status of evaluation of playback when client indicates `hasMDE=1` | +| `mdeDecisionText` | *Optional\* | :heavy_minus_sign: | Descriptive text for the above code | +| `transcodeDecisionCode` | *Optional\* | :heavy_minus_sign: | N/A | +| `transcodeDecisionText` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueItemsDownloadQueueItem.md b/docs/models/operations/GetDownloadQueueItemsDownloadQueueItem.md new file mode 100644 index 00000000..4431513d --- /dev/null +++ b/docs/models/operations/GetDownloadQueueItemsDownloadQueueItem.md @@ -0,0 +1,15 @@ +# GetDownloadQueueItemsDownloadQueueItem + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `decisionResult` | [Optional\](../../models/operations/GetDownloadQueueItemsDecisionResult.md) | :heavy_minus_sign: | N/A | +| `error` | *Optional\* | :heavy_minus_sign: | The error encountered in transcoding or decision | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `queueId` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | [Optional\](../../models/operations/GetDownloadQueueItemsStatus.md) | :heavy_minus_sign: | The state of the item:
- deciding: The item decision is pending
- waiting: The item is waiting for transcode
- processing: The item is being transcoded
- available: The item is available for download
- error: The item encountered an error in the decision or transcode
- expired: The transcoded item has timed out and is no longer available
| +| `transcode` | [Optional\](../../models/operations/GetDownloadQueueItemsTranscode.md) | :heavy_minus_sign: | The transcode session object which is not yet documented otherwise it'd be a $ref here. | +| `transcodeSession` | [Optional\](../../models/shared/TranscodeSession.md) | :heavy_minus_sign: | The transcode session if item is currently being transcoded | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueItemsMediaContainer.md b/docs/models/operations/GetDownloadQueueItemsMediaContainer.md new file mode 100644 index 00000000..5cd3a265 --- /dev/null +++ b/docs/models/operations/GetDownloadQueueItemsMediaContainer.md @@ -0,0 +1,17 @@ +# GetDownloadQueueItemsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `downloadQueueItem` | List\<[GetDownloadQueueItemsDownloadQueueItem](../../models/operations/GetDownloadQueueItemsDownloadQueueItem.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueItemsRequest.md b/docs/models/operations/GetDownloadQueueItemsRequest.md new file mode 100644 index 00000000..d35d602d --- /dev/null +++ b/docs/models/operations/GetDownloadQueueItemsRequest.md @@ -0,0 +1,20 @@ +# GetDownloadQueueItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *long* | :heavy_check_mark: | The queue id | | +| `itemId` | List\<*long*> | :heavy_check_mark: | The item ids | [
32,
345,
23
] | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueItemsResponse.md b/docs/models/operations/GetDownloadQueueItemsResponse.md new file mode 100644 index 00000000..46fdcbbb --- /dev/null +++ b/docs/models/operations/GetDownloadQueueItemsResponse.md @@ -0,0 +1,11 @@ +# GetDownloadQueueItemsResponse + + +## 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/GetDownloadQueueItemsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueItemsResponseBody.md b/docs/models/operations/GetDownloadQueueItemsResponseBody.md new file mode 100644 index 00000000..6bd4d82c --- /dev/null +++ b/docs/models/operations/GetDownloadQueueItemsResponseBody.md @@ -0,0 +1,10 @@ +# GetDownloadQueueItemsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetDownloadQueueItemsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueItemsStatus.md b/docs/models/operations/GetDownloadQueueItemsStatus.md new file mode 100644 index 00000000..2d3c6730 --- /dev/null +++ b/docs/models/operations/GetDownloadQueueItemsStatus.md @@ -0,0 +1,22 @@ +# GetDownloadQueueItemsStatus + +The state of the item: + - deciding: The item decision is pending + - waiting: The item is waiting for transcode + - processing: The item is being transcoded + - available: The item is available for download + - error: The item encountered an error in the decision or transcode + - expired: The transcoded item has timed out and is no longer available + + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `DECIDING` | deciding | +| `WAITING` | waiting | +| `PROCESSING` | processing | +| `AVAILABLE` | available | +| `ERROR` | error | +| `EXPIRED` | expired | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueItemsTranscode.md b/docs/models/operations/GetDownloadQueueItemsTranscode.md new file mode 100644 index 00000000..cf4954ad --- /dev/null +++ b/docs/models/operations/GetDownloadQueueItemsTranscode.md @@ -0,0 +1,9 @@ +# GetDownloadQueueItemsTranscode + +The transcode session object which is not yet documented otherwise it'd be a $ref here. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueMediaContainer.md b/docs/models/operations/GetDownloadQueueMediaContainer.md new file mode 100644 index 00000000..139b6e45 --- /dev/null +++ b/docs/models/operations/GetDownloadQueueMediaContainer.md @@ -0,0 +1,17 @@ +# GetDownloadQueueMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `downloadQueue` | List\<[GetDownloadQueueDownloadQueue](../../models/operations/GetDownloadQueueDownloadQueue.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueMediaRequest.md b/docs/models/operations/GetDownloadQueueMediaRequest.md new file mode 100644 index 00000000..9ab3cb90 --- /dev/null +++ b/docs/models/operations/GetDownloadQueueMediaRequest.md @@ -0,0 +1,20 @@ +# GetDownloadQueueMediaRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *long* | :heavy_check_mark: | The queue id | | +| `itemId` | *long* | :heavy_check_mark: | The item ids | 32 | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueMediaResponse.md b/docs/models/operations/GetDownloadQueueMediaResponse.md new file mode 100644 index 00000000..a106183a --- /dev/null +++ b/docs/models/operations/GetDownloadQueueMediaResponse.md @@ -0,0 +1,11 @@ +# GetDownloadQueueMediaResponse + + +## 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 | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueRequest.md b/docs/models/operations/GetDownloadQueueRequest.md new file mode 100644 index 00000000..f2950c08 --- /dev/null +++ b/docs/models/operations/GetDownloadQueueRequest.md @@ -0,0 +1,19 @@ +# GetDownloadQueueRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *long* | :heavy_check_mark: | The queue id | | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueResponse.md b/docs/models/operations/GetDownloadQueueResponse.md new file mode 100644 index 00000000..486c1601 --- /dev/null +++ b/docs/models/operations/GetDownloadQueueResponse.md @@ -0,0 +1,11 @@ +# GetDownloadQueueResponse + + +## 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/GetDownloadQueueResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueResponseBody.md b/docs/models/operations/GetDownloadQueueResponseBody.md new file mode 100644 index 00000000..a5aaf60f --- /dev/null +++ b/docs/models/operations/GetDownloadQueueResponseBody.md @@ -0,0 +1,10 @@ +# GetDownloadQueueResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/GetDownloadQueueMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetDownloadQueueStatus.md b/docs/models/operations/GetDownloadQueueStatus.md new file mode 100644 index 00000000..6aa946d9 --- /dev/null +++ b/docs/models/operations/GetDownloadQueueStatus.md @@ -0,0 +1,20 @@ +# GetDownloadQueueStatus + +The state of this queue + - deciding: At least one item is still being decided + - waiting: At least one item is waiting for transcode and none are currently transcoding + - processing: At least one item is being transcoded + - done: All items are available (or potentially expired) + - error: At least one item has encountered an error + + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `DECIDING` | deciding | +| `WAITING` | waiting | +| `PROCESSING` | processing | +| `DONE` | done | +| `ERROR` | error | \ No newline at end of file diff --git a/docs/models/operations/GetExtrasRequest.md b/docs/models/operations/GetExtrasRequest.md new file mode 100644 index 00000000..ac05565c --- /dev/null +++ b/docs/models/operations/GetExtrasRequest.md @@ -0,0 +1,19 @@ +# GetExtrasRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetExtrasResponse.md b/docs/models/operations/GetExtrasResponse.md new file mode 100644 index 00000000..9676d6e0 --- /dev/null +++ b/docs/models/operations/GetExtrasResponse.md @@ -0,0 +1,12 @@ +# GetExtrasResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetFileHashRequest.md b/docs/models/operations/GetFileHashRequest.md deleted file mode 100644 index 8b95f018..00000000 --- a/docs/models/operations/GetFileHashRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetFileHashRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `url` | *String* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 | -| `type` | *Optional\* | :heavy_minus_sign: | Item type | | \ No newline at end of file diff --git a/docs/models/operations/GetFileHashResponse.md b/docs/models/operations/GetFileHashResponse.md deleted file mode 100644 index 223d26af..00000000 --- a/docs/models/operations/GetFileHashResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetFileHashResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetFileRequest.md b/docs/models/operations/GetFileRequest.md new file mode 100644 index 00000000..b9a5cce1 --- /dev/null +++ b/docs/models/operations/GetFileRequest.md @@ -0,0 +1,20 @@ +# GetFileRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `url` | *Optional\* | :heavy_minus_sign: | The bundle url, typically starting with `metadata://` or `media://` | | \ No newline at end of file diff --git a/docs/models/operations/GetFileResponse.md b/docs/models/operations/GetFileResponse.md new file mode 100644 index 00000000..2f92c01f --- /dev/null +++ b/docs/models/operations/GetFileResponse.md @@ -0,0 +1,12 @@ +# GetFileResponse + + +## 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 | +| `twoHundredAudioMpeg3ResponseStream` | *Optional\* | :heavy_minus_sign: | OK | +| `twoHundredImageJpegResponseStream` | *Optional\* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetFirstCharactersDirectory.md b/docs/models/operations/GetFirstCharactersDirectory.md new file mode 100644 index 00000000..530210a7 --- /dev/null +++ b/docs/models/operations/GetFirstCharactersDirectory.md @@ -0,0 +1,10 @@ +# GetFirstCharactersDirectory + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `size` | *Optional\* | :heavy_minus_sign: | The number of items starting with this character | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetFirstCharactersMediaContainer.md b/docs/models/operations/GetFirstCharactersMediaContainer.md new file mode 100644 index 00000000..eb1c534d --- /dev/null +++ b/docs/models/operations/GetFirstCharactersMediaContainer.md @@ -0,0 +1,17 @@ +# GetFirstCharactersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | List\<[GetFirstCharactersDirectory](../../models/operations/GetFirstCharactersDirectory.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetFirstCharactersRequest.md b/docs/models/operations/GetFirstCharactersRequest.md new file mode 100644 index 00000000..c9a93660 --- /dev/null +++ b/docs/models/operations/GetFirstCharactersRequest.md @@ -0,0 +1,22 @@ +# GetFirstCharactersRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `type` | *Optional\* | :heavy_minus_sign: | The metadata type to filter on | | +| `sort` | *Optional\* | :heavy_minus_sign: | The metadata type to filter on | | +| `mediaQuery` | [Optional\](../../models/shared/MediaQuery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | \ No newline at end of file diff --git a/docs/models/operations/GetFirstCharactersResponse.md b/docs/models/operations/GetFirstCharactersResponse.md new file mode 100644 index 00000000..4a29a8c1 --- /dev/null +++ b/docs/models/operations/GetFirstCharactersResponse.md @@ -0,0 +1,11 @@ +# GetFirstCharactersResponse + + +## 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/GetFirstCharactersResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetFirstCharactersResponseBody.md b/docs/models/operations/GetFirstCharactersResponseBody.md new file mode 100644 index 00000000..299aea37 --- /dev/null +++ b/docs/models/operations/GetFirstCharactersResponseBody.md @@ -0,0 +1,10 @@ +# GetFirstCharactersResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetFirstCharactersMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetFoldersDirectory.md b/docs/models/operations/GetFoldersDirectory.md new file mode 100644 index 00000000..6d7705d7 --- /dev/null +++ b/docs/models/operations/GetFoldersDirectory.md @@ -0,0 +1,10 @@ +# GetFoldersDirectory + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `fastKey` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetFoldersMediaContainer.md b/docs/models/operations/GetFoldersMediaContainer.md new file mode 100644 index 00000000..bfcc2d7c --- /dev/null +++ b/docs/models/operations/GetFoldersMediaContainer.md @@ -0,0 +1,17 @@ +# GetFoldersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | List\<[GetFoldersDirectory](../../models/operations/GetFoldersDirectory.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetFoldersRequest.md b/docs/models/operations/GetFoldersRequest.md new file mode 100644 index 00000000..0721697e --- /dev/null +++ b/docs/models/operations/GetFoldersRequest.md @@ -0,0 +1,19 @@ +# GetFoldersRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/GetFoldersResponse.md b/docs/models/operations/GetFoldersResponse.md new file mode 100644 index 00000000..4363ae52 --- /dev/null +++ b/docs/models/operations/GetFoldersResponse.md @@ -0,0 +1,11 @@ +# GetFoldersResponse + + +## 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/GetFoldersResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetFoldersResponseBody.md b/docs/models/operations/GetFoldersResponseBody.md new file mode 100644 index 00000000..c0c0e554 --- /dev/null +++ b/docs/models/operations/GetFoldersResponseBody.md @@ -0,0 +1,10 @@ +# GetFoldersResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/GetFoldersMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetGenresLibraryDirectory.md b/docs/models/operations/GetGenresLibraryDirectory.md deleted file mode 100644 index ea1e9701..00000000 --- a/docs/models/operations/GetGenresLibraryDirectory.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGenresLibraryDirectory - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `fastKey` | *String* | :heavy_check_mark: | N/A | /library/sections/10/all?genre=89 | -| `key` | *String* | :heavy_check_mark: | N/A | 89 | -| `title` | *String* | :heavy_check_mark: | N/A | Action | -| `type` | *String* | :heavy_check_mark: | N/A | genre | \ No newline at end of file diff --git a/docs/models/operations/GetGenresLibraryMediaContainer.md b/docs/models/operations/GetGenresLibraryMediaContainer.md deleted file mode 100644 index 2cf70760..00000000 --- a/docs/models/operations/GetGenresLibraryMediaContainer.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetGenresLibraryMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `content` | *String* | :heavy_check_mark: | The content type or mode. | secondary | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `title2` | *String* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `viewGroup` | *String* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `directory` | List\<[GetGenresLibraryDirectory](../../models/operations/GetGenresLibraryDirectory.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetGenresLibraryQueryParamType.md b/docs/models/operations/GetGenresLibraryQueryParamType.md deleted file mode 100644 index 9f1c2190..00000000 --- a/docs/models/operations/GetGenresLibraryQueryParamType.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetGenresLibraryQueryParamType - -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | \ No newline at end of file diff --git a/docs/models/operations/GetGenresLibraryRequest.md b/docs/models/operations/GetGenresLibraryRequest.md deleted file mode 100644 index a5966f10..00000000 --- a/docs/models/operations/GetGenresLibraryRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetGenresLibraryRequest - - -## Fields - -| 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` | [GetGenresLibraryQueryParamType](../../models/operations/GetGenresLibraryQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/models/operations/GetGenresLibraryResponse.md b/docs/models/operations/GetGenresLibraryResponse.md deleted file mode 100644 index 9700a2f7..00000000 --- a/docs/models/operations/GetGenresLibraryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGenresLibraryResponse - - -## 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/GetGenresLibraryResponseBody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/models/operations/GetGenresLibraryResponseBody.md b/docs/models/operations/GetGenresLibraryResponseBody.md deleted file mode 100644 index 1161bc31..00000000 --- a/docs/models/operations/GetGenresLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetGenresLibraryResponseBody - -Successful response containing media container data. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetGenresLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetGeoDataGeoData.md b/docs/models/operations/GetGeoDataGeoData.md deleted file mode 100644 index cc0c1994..00000000 --- a/docs/models/operations/GetGeoDataGeoData.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetGeoDataGeoData - -Geo location data - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | *String* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI | -| `continentCode` | *String* | :heavy_check_mark: | The continent code where the country is located. | NA | -| `country` | *String* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands | -| `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam | -| `europeanUnionMember` | *Optional\* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | -| `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | -| `postalCode` | *String* | :heavy_check_mark: | The postal code of the location. | 802 | -| `inPrivacyRestrictedCountry` | *Optional\* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | -| `inPrivacyRestrictedRegion` | *Optional\* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | -| `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | -| `coordinates` | *String* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 | \ No newline at end of file diff --git a/docs/models/operations/GetGeoDataResponse.md b/docs/models/operations/GetGeoDataResponse.md deleted file mode 100644 index a8db3888..00000000 --- a/docs/models/operations/GetGeoDataResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGeoDataResponse - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | | -| `geoData` | [Optional\](../../models/operations/GetGeoDataGeoData.md) | :heavy_minus_sign: | Gets the geo location data of the user | {
"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"
} | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsMediaContainer.md b/docs/models/operations/GetGlobalHubsMediaContainer.md deleted file mode 100644 index 91555fef..00000000 --- a/docs/models/operations/GetGlobalHubsMediaContainer.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGlobalHubsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 8 | -| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `hub` | List\<[Hub](../../models/operations/Hub.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsMetadata.md b/docs/models/operations/GetGlobalHubsMetadata.md deleted file mode 100644 index 09a2f374..00000000 --- a/docs/models/operations/GetGlobalHubsMetadata.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetGlobalHubsMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 57070 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/57070/items | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | playlist | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | November Movie Day | -| `titleSort` | *Optional\* | :heavy_minus_sign: | N/A | Tracks | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | | -| `smart` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `playlistType` | *Optional\* | :heavy_minus_sign: | N/A | video | -| `composite` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/57070/composite/1668787730 | -| `icon` | *Optional\* | :heavy_minus_sign: | N/A | playlist://image.smart | -| `viewCount` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1668787732 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 16873000 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 3 | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1668779618 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1668787730 | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsRequest.md b/docs/models/operations/GetGlobalHubsRequest.md deleted file mode 100644 index d09ec8c8..00000000 --- a/docs/models/operations/GetGlobalHubsRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetGlobalHubsRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `count` | *Optional\* | :heavy_minus_sign: | The number of items to return with each hub. | -| `onlyTransient` | [Optional\](../../models/operations/OnlyTransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsResponse.md b/docs/models/operations/GetGlobalHubsResponse.md deleted file mode 100644 index b2e56c91..00000000 --- a/docs/models/operations/GetGlobalHubsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGlobalHubsResponse - - -## 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/GetGlobalHubsResponseBody.md) | :heavy_minus_sign: | returns global hubs | \ No newline at end of file diff --git a/docs/models/operations/GetGlobalHubsResponseBody.md b/docs/models/operations/GetGlobalHubsResponseBody.md deleted file mode 100644 index cc6c7b7d..00000000 --- a/docs/models/operations/GetGlobalHubsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetGlobalHubsResponseBody - -returns global hubs - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetGlobalHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetHistoryItemRequest.md b/docs/models/operations/GetHistoryItemRequest.md new file mode 100644 index 00000000..10ed375e --- /dev/null +++ b/docs/models/operations/GetHistoryItemRequest.md @@ -0,0 +1,19 @@ +# GetHistoryItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `historyId` | *long* | :heavy_check_mark: | The id of the history item (the `historyKey` from above) | | \ No newline at end of file diff --git a/docs/models/operations/GetHistoryItemResponse.md b/docs/models/operations/GetHistoryItemResponse.md new file mode 100644 index 00000000..4cf7459f --- /dev/null +++ b/docs/models/operations/GetHistoryItemResponse.md @@ -0,0 +1,12 @@ +# GetHistoryItemResponse + + +## 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 | +| `historyAllGetResponses200` | [Optional\](../../models/shared/HistoryAllGetResponses200.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetHomeDataResponse.md b/docs/models/operations/GetHomeDataResponse.md deleted file mode 100644 index 9b4828b3..00000000 --- a/docs/models/operations/GetHomeDataResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetHomeDataResponse - - -## 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/GetHomeDataResponseBody.md) | :heavy_minus_sign: | Home Data | \ No newline at end of file diff --git a/docs/models/operations/GetHomeDataResponseBody.md b/docs/models/operations/GetHomeDataResponseBody.md deleted file mode 100644 index 0845c968..00000000 --- a/docs/models/operations/GetHomeDataResponseBody.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetHomeDataResponseBody - -Home Data - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 1841489 | -| `name` | *Optional\* | :heavy_minus_sign: | N/A | Blindkitty38's home | -| `guestUserID` | *Optional\* | :heavy_minus_sign: | N/A | 58815432 | -| `guestUserUUID` | *Optional\* | :heavy_minus_sign: | N/A | f3df4e01bfca0787 | -| `guestEnabled` | *Optional\* | :heavy_minus_sign: | N/A | | -| `subscription` | *Optional\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetHubItemsRequest.md b/docs/models/operations/GetHubItemsRequest.md new file mode 100644 index 00000000..d858fcb5 --- /dev/null +++ b/docs/models/operations/GetHubItemsRequest.md @@ -0,0 +1,20 @@ +# GetHubItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `count` | *Optional\* | :heavy_minus_sign: | Limit results to count items | | +| `identifier` | List\<*String*> | :heavy_check_mark: | If provided, limit to only specified hubs | | \ No newline at end of file diff --git a/docs/models/operations/GetHubItemsResponse.md b/docs/models/operations/GetHubItemsResponse.md new file mode 100644 index 00000000..6a19b298 --- /dev/null +++ b/docs/models/operations/GetHubItemsResponse.md @@ -0,0 +1,12 @@ +# GetHubItemsResponse + + +## 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/GetHubItemsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetHubItemsResponseBody.md b/docs/models/operations/GetHubItemsResponseBody.md new file mode 100644 index 00000000..d842bde0 --- /dev/null +++ b/docs/models/operations/GetHubItemsResponseBody.md @@ -0,0 +1,10 @@ +# GetHubItemsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainer.md) | :heavy_minus_sign: | `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
| \ No newline at end of file diff --git a/docs/models/operations/GetIdentityMediaContainer.md b/docs/models/operations/GetIdentityMediaContainer.md new file mode 100644 index 00000000..2ac803e6 --- /dev/null +++ b/docs/models/operations/GetIdentityMediaContainer.md @@ -0,0 +1,11 @@ +# GetIdentityMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `claimed` | *Optional\* | :heavy_minus_sign: | Indicates whether this server has been claimed by a user | +| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | A unique identifier of the computer | +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `version` | *Optional\* | :heavy_minus_sign: | The full version string of the PMS | \ No newline at end of file diff --git a/docs/models/operations/GetIdentityResponse.md b/docs/models/operations/GetIdentityResponse.md new file mode 100644 index 00000000..a41c6bdb --- /dev/null +++ b/docs/models/operations/GetIdentityResponse.md @@ -0,0 +1,11 @@ +# GetIdentityResponse + + +## 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/GetIdentityResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetIdentityResponseBody.md b/docs/models/operations/GetIdentityResponseBody.md new file mode 100644 index 00000000..f55707e7 --- /dev/null +++ b/docs/models/operations/GetIdentityResponseBody.md @@ -0,0 +1,10 @@ +# GetIdentityResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetIdentityMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetImageFromBifRequest.md b/docs/models/operations/GetImageFromBifRequest.md new file mode 100644 index 00000000..e2aa69d5 --- /dev/null +++ b/docs/models/operations/GetImageFromBifRequest.md @@ -0,0 +1,21 @@ +# GetImageFromBifRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `partId` | *long* | :heavy_check_mark: | The part id who's index is to be fetched | | +| `index` | [PathParamIndex](../../models/operations/PathParamIndex.md) | :heavy_check_mark: | The type of index to grab. | | +| `offset` | *long* | :heavy_check_mark: | The offset to seek in ms. | | \ No newline at end of file diff --git a/docs/models/operations/GetImageFromBifResponse.md b/docs/models/operations/GetImageFromBifResponse.md new file mode 100644 index 00000000..b94f38ea --- /dev/null +++ b/docs/models/operations/GetImageFromBifResponse.md @@ -0,0 +1,11 @@ +# GetImageFromBifResponse + + +## 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 | +| `responseStream` | *Optional\* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetImageRequest.md b/docs/models/operations/GetImageRequest.md new file mode 100644 index 00000000..19804e09 --- /dev/null +++ b/docs/models/operations/GetImageRequest.md @@ -0,0 +1,25 @@ +# GetImageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `topLeft` | *Optional\* | :heavy_minus_sign: | The base color (hex) for the top left quadrant. | 3f280a | +| `topRight` | *Optional\* | :heavy_minus_sign: | The base color (hex) for the top right quadrant. | 6b4713 | +| `bottomRight` | *Optional\* | :heavy_minus_sign: | The base color (hex) for the bottom right quadrant. | 0f2a43 | +| `bottomLeft` | *Optional\* | :heavy_minus_sign: | The base color (hex) for the bottom left quadrant. | 1c425d | +| `width` | *Optional\* | :heavy_minus_sign: | Width in pixels for the image. | 1920 | +| `height` | *Optional\* | :heavy_minus_sign: | Height in pixels for the image. | 1080 | +| `noise` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether to add noise to the ouput image. Noise can reduce color banding with the gradients. Image sizes with noise will be larger. | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetImageResponse.md b/docs/models/operations/GetImageResponse.md new file mode 100644 index 00000000..7abb38b7 --- /dev/null +++ b/docs/models/operations/GetImageResponse.md @@ -0,0 +1,11 @@ +# GetImageResponse + + +## 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 | +| `responseStream` | *Optional\* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetItemArtworkPathParamElement.md b/docs/models/operations/GetItemArtworkPathParamElement.md new file mode 100644 index 00000000..a3cd58d4 --- /dev/null +++ b/docs/models/operations/GetItemArtworkPathParamElement.md @@ -0,0 +1,13 @@ +# GetItemArtworkPathParamElement + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `THUMB` | thumb | +| `ART` | art | +| `CLEAR_LOGO` | clearLogo | +| `BANNER` | banner | +| `POSTER` | poster | +| `THEME` | theme | \ No newline at end of file diff --git a/docs/models/operations/GetItemArtworkRequest.md b/docs/models/operations/GetItemArtworkRequest.md new file mode 100644 index 00000000..0a49040b --- /dev/null +++ b/docs/models/operations/GetItemArtworkRequest.md @@ -0,0 +1,21 @@ +# GetItemArtworkRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `element` | [GetItemArtworkPathParamElement](../../models/operations/GetItemArtworkPathParamElement.md) | :heavy_check_mark: | N/A | | +| `timestamp` | *long* | :heavy_check_mark: | A timestamp on the element used for cache management in the client | | \ No newline at end of file diff --git a/docs/models/operations/GetItemArtworkResponse.md b/docs/models/operations/GetItemArtworkResponse.md new file mode 100644 index 00000000..1add1fa9 --- /dev/null +++ b/docs/models/operations/GetItemArtworkResponse.md @@ -0,0 +1,12 @@ +# GetItemArtworkResponse + + +## 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 | +| `twoHundredAudioMpeg3ResponseStream` | *Optional\* | :heavy_minus_sign: | OK | +| `twoHundredImageJpegResponseStream` | *Optional\* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetItemDecisionRequest.md b/docs/models/operations/GetItemDecisionRequest.md new file mode 100644 index 00000000..635cd050 --- /dev/null +++ b/docs/models/operations/GetItemDecisionRequest.md @@ -0,0 +1,20 @@ +# GetItemDecisionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *long* | :heavy_check_mark: | The queue id | | +| `itemId` | *long* | :heavy_check_mark: | The item ids | 32 | \ No newline at end of file diff --git a/docs/models/operations/GetItemDecisionResponse.md b/docs/models/operations/GetItemDecisionResponse.md new file mode 100644 index 00000000..49dea872 --- /dev/null +++ b/docs/models/operations/GetItemDecisionResponse.md @@ -0,0 +1,11 @@ +# GetItemDecisionResponse + + +## 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 | +| `mediaContainerWithDecision` | [Optional\](../../models/shared/MediaContainerWithDecision.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetItemTreeRequest.md b/docs/models/operations/GetItemTreeRequest.md new file mode 100644 index 00000000..548e76ab --- /dev/null +++ b/docs/models/operations/GetItemTreeRequest.md @@ -0,0 +1,19 @@ +# GetItemTreeRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetItemTreeResponse.md b/docs/models/operations/GetItemTreeResponse.md new file mode 100644 index 00000000..56691ec7 --- /dev/null +++ b/docs/models/operations/GetItemTreeResponse.md @@ -0,0 +1,11 @@ +# GetItemTreeResponse + + +## 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 | +| `mediaContainerWithNestedMetadata` | [Optional\](../../models/shared/MediaContainerWithNestedMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsDirectory.md b/docs/models/operations/GetLibraryDetailsDirectory.md deleted file mode 100644 index 7eeec158..00000000 --- a/docs/models/operations/GetLibraryDetailsDirectory.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibraryDetailsDirectory - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | search?type=1 | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Search... | -| `secondary` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `prompt` | *Optional\* | :heavy_minus_sign: | N/A | Search Movies | -| `search` | *Optional\* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsField.md b/docs/models/operations/GetLibraryDetailsField.md deleted file mode 100644 index 1cc66c35..00000000 --- a/docs/models/operations/GetLibraryDetailsField.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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 deleted file mode 100644 index 6c053259..00000000 --- a/docs/models/operations/GetLibraryDetailsFieldType.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/GetLibraryDetailsFilter.md b/docs/models/operations/GetLibraryDetailsFilter.md deleted file mode 100644 index 8a395d6c..00000000 --- a/docs/models/operations/GetLibraryDetailsFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibraryDetailsFilter - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `filter` | *Optional\* | :heavy_minus_sign: | N/A | label | -| `filterType` | *Optional\* | :heavy_minus_sign: | N/A | string | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/sections/1/label | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Labels | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | filter | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsMediaContainer.md b/docs/models/operations/GetLibraryDetailsMediaContainer.md index 96843f9f..68d2e259 100644 --- a/docs/models/operations/GetLibraryDetailsMediaContainer.md +++ b/docs/models/operations/GetLibraryDetailsMediaContainer.md @@ -3,20 +3,19 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 29 | -| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | -| `content` | *Optional\* | :heavy_minus_sign: | N/A | secondary | -| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `mediaTagPrefix` | *Optional\* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *Optional\* | :heavy_minus_sign: | N/A | 1701731894 | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /:/resources/movie.png | -| `title1` | *Optional\* | :heavy_minus_sign: | N/A | Movies | -| `viewGroup` | *Optional\* | :heavy_minus_sign: | N/A | secondary | -| `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\<[GetLibraryDetailsFieldType](../../models/operations/GetLibraryDetailsFieldType.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content` | *Optional\* | :heavy_minus_sign: | The flavors of directory found here:
- Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.
- Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.
- Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. | +| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | +| `art` | *Optional\* | :heavy_minus_sign: | N/A | +| `directory` | List\<[Metadata](../../models/shared/Metadata.md)> | :heavy_minus_sign: | N/A | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | +| `mediaTagPrefix` | *Optional\* | :heavy_minus_sign: | N/A | +| `mediaTagVersion` | *Optional\* | :heavy_minus_sign: | N/A | +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `sortAsc` | *Optional\* | :heavy_minus_sign: | N/A | +| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | +| `title1` | *Optional\* | :heavy_minus_sign: | N/A | +| `viewGroup` | *Optional\* | :heavy_minus_sign: | N/A | +| `viewMode` | *Optional\* | :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 deleted file mode 100644 index 11eccef6..00000000 --- a/docs/models/operations/GetLibraryDetailsOperator.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/GetLibraryDetailsRequest.md b/docs/models/operations/GetLibraryDetailsRequest.md index 718f0f33..c9614364 100644 --- a/docs/models/operations/GetLibraryDetailsRequest.md +++ b/docs/models/operations/GetLibraryDetailsRequest.md @@ -3,7 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `includeDetails` | [Optional\](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | -| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *String* | :heavy_check_mark: | The section identifier | | +| `includeDetails` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsResponse.md b/docs/models/operations/GetLibraryDetailsResponse.md index 60bd9b43..244c8169 100644 --- a/docs/models/operations/GetLibraryDetailsResponse.md +++ b/docs/models/operations/GetLibraryDetailsResponse.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/GetLibraryDetailsResponseBody.md) | :heavy_minus_sign: | The details of the library | \ No newline at end of file +| `object` | [Optional\](../../models/operations/GetLibraryDetailsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsResponseBody.md b/docs/models/operations/GetLibraryDetailsResponseBody.md index 6106a0fa..7df53f59 100644 --- a/docs/models/operations/GetLibraryDetailsResponseBody.md +++ b/docs/models/operations/GetLibraryDetailsResponseBody.md @@ -1,6 +1,6 @@ # GetLibraryDetailsResponseBody -The details of the library +OK ## Fields diff --git a/docs/models/operations/GetLibraryDetailsSort.md b/docs/models/operations/GetLibraryDetailsSort.md deleted file mode 100644 index e757023c..00000000 --- a/docs/models/operations/GetLibraryDetailsSort.md +++ /dev/null @@ -1,13 +0,0 @@ -# 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 deleted file mode 100644 index 13ad6f6b..00000000 --- a/docs/models/operations/GetLibraryDetailsType.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetLibraryDetailsType - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | movie | -| `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\<[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/GetLibraryHubsCountry.md b/docs/models/operations/GetLibraryHubsCountry.md deleted file mode 100644 index ddb97201..00000000 --- a/docs/models/operations/GetLibraryHubsCountry.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibraryHubsCountry - - -## 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/GetLibraryHubsDirector.md b/docs/models/operations/GetLibraryHubsDirector.md deleted file mode 100644 index 8f062c77..00000000 --- a/docs/models/operations/GetLibraryHubsDirector.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibraryHubsDirector - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Nathan Greno | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsGenre.md b/docs/models/operations/GetLibraryHubsGenre.md deleted file mode 100644 index 69799e53..00000000 --- a/docs/models/operations/GetLibraryHubsGenre.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibraryHubsGenre - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Animation | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsHub.md b/docs/models/operations/GetLibraryHubsHub.md deleted file mode 100644 index 9b93fa91..00000000 --- a/docs/models/operations/GetLibraryHubsHub.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibraryHubsHub - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0 | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Recently Played Movies | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | movie | -| `hubIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | movie.recentlyviewed.1 | -| `context` | *Optional\* | :heavy_minus_sign: | N/A | hub.movie.recentlyviewed | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 6 | -| `more` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `style` | *Optional\* | :heavy_minus_sign: | N/A | shelf | -| `hubKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66485,66098,57249,11449,5858,14944 | -| `metadata` | List\<[GetLibraryHubsMetadata](../../models/operations/GetLibraryHubsMetadata.md)> | :heavy_minus_sign: | N/A | | -| `promoted` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `random` | *Optional\* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsMedia.md b/docs/models/operations/GetLibraryHubsMedia.md deleted file mode 100644 index b622b41a..00000000 --- a/docs/models/operations/GetLibraryHubsMedia.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetLibraryHubsMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 38247 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 6017237 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 2051 | -| `width` | *Optional\* | :heavy_minus_sign: | N/A | 1920 | -| `height` | *Optional\* | :heavy_minus_sign: | N/A | 1080 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | N/A | 1.78 | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | N/A | aac | -| `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 | 1 | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | lc | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | high | -| `part` | List\<[GetLibraryHubsPart](../../models/operations/GetLibraryHubsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsMediaContainer.md b/docs/models/operations/GetLibraryHubsMediaContainer.md deleted file mode 100644 index a0b65b37..00000000 --- a/docs/models/operations/GetLibraryHubsMediaContainer.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetLibraryHubsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 7 | -| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `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 | -| `hub` | List\<[GetLibraryHubsHub](../../models/operations/GetLibraryHubsHub.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsMetadata.md b/docs/models/operations/GetLibraryHubsMetadata.md deleted file mode 100644 index 18949369..00000000 --- a/docs/models/operations/GetLibraryHubsMetadata.md +++ /dev/null @@ -1,41 +0,0 @@ -# GetLibraryHubsMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 14944 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/14944 | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | plex://movie/5d77686eeb5d26001f1eb339 | -| `studio` | *Optional\* | :heavy_minus_sign: | N/A | Walt Disney Animation Studios | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | movie | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Tangled | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `contentRating` | *Optional\* | :heavy_minus_sign: | N/A | PG | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is. | -| `rating` | *Optional\* | :heavy_minus_sign: | N/A | 8.9 | -| `audienceRating` | *Optional\* | :heavy_minus_sign: | N/A | 8.7 | -| `viewCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1704936047 | -| `year` | *Optional\* | :heavy_minus_sign: | N/A | 2010 | -| `tagline` | *Optional\* | :heavy_minus_sign: | N/A | They're taking adventure to new lengths. | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/14944/thumb/1705739847 | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/14944/art/1705739847 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 6017237 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2010-11-24 00:00:00 +0000 UTC | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1589412494 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705739847 | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/14952 | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `media` | List\<[GetLibraryHubsMedia](../../models/operations/GetLibraryHubsMedia.md)> | :heavy_minus_sign: | N/A | | -| `genre` | List\<[GetLibraryHubsGenre](../../models/operations/GetLibraryHubsGenre.md)> | :heavy_minus_sign: | N/A | | -| `country` | List\<[GetLibraryHubsCountry](../../models/operations/GetLibraryHubsCountry.md)> | :heavy_minus_sign: | N/A | | -| `director` | List\<[GetLibraryHubsDirector](../../models/operations/GetLibraryHubsDirector.md)> | :heavy_minus_sign: | N/A | | -| `role` | List\<[GetLibraryHubsRole](../../models/operations/GetLibraryHubsRole.md)> | :heavy_minus_sign: | N/A | | -| `writer` | List\<[GetLibraryHubsWriter](../../models/operations/GetLibraryHubsWriter.md)> | :heavy_minus_sign: | N/A | | -| `skipCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `chapterSource` | *Optional\* | :heavy_minus_sign: | N/A | media | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsPart.md b/docs/models/operations/GetLibraryHubsPart.md deleted file mode 100644 index 48803b50..00000000 --- a/docs/models/operations/GetLibraryHubsPart.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibraryHubsPart - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 38247 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/parts/38247/1589412494/file.mp4 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 6017237 | -| `file` | *Optional\* | :heavy_minus_sign: | N/A | /movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4 | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 1545647447 | -| `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 | true | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | high | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsRequest.md b/docs/models/operations/GetLibraryHubsRequest.md deleted file mode 100644 index c51bc85a..00000000 --- a/docs/models/operations/GetLibraryHubsRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryHubsRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionId` | *double* | :heavy_check_mark: | the Id of the library to query | -| `count` | *Optional\* | :heavy_minus_sign: | The number of items to return with each hub. | -| `onlyTransient` | [Optional\](../../models/operations/QueryParamOnlyTransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsResponse.md b/docs/models/operations/GetLibraryHubsResponse.md deleted file mode 100644 index 9a5eefc2..00000000 --- a/docs/models/operations/GetLibraryHubsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryHubsResponse - - -## 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/GetLibraryHubsResponseBody.md) | :heavy_minus_sign: | The hubs specific to the library | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsResponseBody.md b/docs/models/operations/GetLibraryHubsResponseBody.md deleted file mode 100644 index 2f96f7bc..00000000 --- a/docs/models/operations/GetLibraryHubsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryHubsResponseBody - -The hubs specific to the library - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetLibraryHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsRole.md b/docs/models/operations/GetLibraryHubsRole.md deleted file mode 100644 index a8de6cf1..00000000 --- a/docs/models/operations/GetLibraryHubsRole.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibraryHubsRole - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Donna Murphy | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryHubsWriter.md b/docs/models/operations/GetLibraryHubsWriter.md deleted file mode 100644 index 51876f37..00000000 --- a/docs/models/operations/GetLibraryHubsWriter.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibraryHubsWriter - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Wilhelm Grimm | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsActiveDirection.md b/docs/models/operations/GetLibraryItemsActiveDirection.md deleted file mode 100644 index 308a0170..00000000 --- a/docs/models/operations/GetLibraryItemsActiveDirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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 deleted file mode 100644 index 9498e077..00000000 --- a/docs/models/operations/GetLibraryItemsCollection.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibraryItemsCollection - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `tag` | *String* | :heavy_check_mark: | The user-made collection this media item belongs to | My Awesome Collection | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsCountry.md b/docs/models/operations/GetLibraryItemsCountry.md deleted file mode 100644 index a7489084..00000000 --- a/docs/models/operations/GetLibraryItemsCountry.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibraryItemsCountry - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *String* | :heavy_check_mark: | The country of origin of this media item | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsDefaultDirection.md b/docs/models/operations/GetLibraryItemsDefaultDirection.md deleted file mode 100644 index e9cec297..00000000 --- a/docs/models/operations/GetLibraryItemsDefaultDirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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/GetLibraryItemsDirector.md b/docs/models/operations/GetLibraryItemsDirector.md deleted file mode 100644 index 7d272875..00000000 --- a/docs/models/operations/GetLibraryItemsDirector.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryItemsDirector - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 | -| `tag` | *String* | :heavy_check_mark: | The role of Director | Danny Boyle | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsField.md b/docs/models/operations/GetLibraryItemsField.md deleted file mode 100644 index 01fe888d..00000000 --- a/docs/models/operations/GetLibraryItemsField.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryItemsField - - -## 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/GetLibraryItemsFieldType.md b/docs/models/operations/GetLibraryItemsFieldType.md deleted file mode 100644 index cea6b66d..00000000 --- a/docs/models/operations/GetLibraryItemsFieldType.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibraryItemsFieldType - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `type` | *String* | :heavy_check_mark: | N/A | tag | -| `operator` | List\<[GetLibraryItemsOperator](../../models/operations/GetLibraryItemsOperator.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsFilter.md b/docs/models/operations/GetLibraryItemsFilter.md deleted file mode 100644 index 50f40813..00000000 --- a/docs/models/operations/GetLibraryItemsFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibraryItemsFilter - - -## 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/GetLibraryItemsGenre.md b/docs/models/operations/GetLibraryItemsGenre.md deleted file mode 100644 index f1eccdca..00000000 --- a/docs/models/operations/GetLibraryItemsGenre.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibraryItemsGenre - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *String* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsGuids.md b/docs/models/operations/GetLibraryItemsGuids.md deleted file mode 100644 index 26b40a0f..00000000 --- a/docs/models/operations/GetLibraryItemsGuids.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibraryItemsGuids - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsHasThumbnail.md b/docs/models/operations/GetLibraryItemsHasThumbnail.md deleted file mode 100644 index 5fe35368..00000000 --- a/docs/models/operations/GetLibraryItemsHasThumbnail.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibraryItemsHasThumbnail - -Indicates if the part has a thumbnail. - - - -## 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 deleted file mode 100644 index 928613fa..00000000 --- a/docs/models/operations/GetLibraryItemsImage.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryItemsImage - - -## 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 diff --git a/docs/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.md b/docs/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.md deleted file mode 100644 index a56a8e27..00000000 --- a/docs/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.md +++ /dev/null @@ -1,5 +0,0 @@ -# GetLibraryItemsLibraryOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - diff --git a/docs/models/operations/GetLibraryItemsLibraryResponseType.md b/docs/models/operations/GetLibraryItemsLibraryResponseType.md deleted file mode 100644 index 1573fa0c..00000000 --- a/docs/models/operations/GetLibraryItemsLibraryResponseType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryItemsLibraryResponseType - - -## 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/GetLibraryItemsLibraryType.md b/docs/models/operations/GetLibraryItemsLibraryType.md deleted file mode 100644 index 0e88b919..00000000 --- a/docs/models/operations/GetLibraryItemsLibraryType.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetLibraryItemsLibraryType - - -## 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 diff --git a/docs/models/operations/GetLibraryItemsLocation.md b/docs/models/operations/GetLibraryItemsLocation.md deleted file mode 100644 index 1053cce9..00000000 --- a/docs/models/operations/GetLibraryItemsLocation.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryItemsLocation - -The folder path for the media item. - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `path` | *String* | :heavy_check_mark: | N/A | /TV Shows/Clarkson's Farm | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMedia.md b/docs/models/operations/GetLibraryItemsMedia.md deleted file mode 100644 index 72d7b7b3..00000000 --- a/docs/models/operations/GetLibraryItemsMedia.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetLibraryItemsMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *Optional\* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *Optional\* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *Optional\* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | Audio codec used. | aac | -| `videoCodec` | *Optional\* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *Optional\* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *Optional\* | :heavy_minus_sign: | Container format of the media. | mp4 | -| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetLibraryItemsOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | Indicates whether the media has 64-bit offsets.
This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
| false | -| `part` | List\<[GetLibraryItemsPart](../../models/operations/GetLibraryItemsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMediaContainer.md b/docs/models/operations/GetLibraryItemsMediaContainer.md deleted file mode 100644 index bebb969a..00000000 --- a/docs/models/operations/GetLibraryItemsMediaContainer.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetLibraryItemsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `totalSize` | *int* | :heavy_check_mark: | Total number of media items in the library. | 50 | -| `offset` | *long* | :heavy_check_mark: | Offset value for pagination. | 0 | -| `content` | *String* | :heavy_check_mark: | The content type or mode. | secondary | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | TV Series | -| `librarySectionUUID` | *Optional\* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `title2` | *String* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `viewGroup` | *String* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `viewMode` | *Optional\* | :heavy_minus_sign: | Identifier for the view mode. | 131131 | -| `mixedParents` | *Optional\* | :heavy_minus_sign: | Indicates if the media container has mixed parents. | true | -| `metadata` | List\<[GetLibraryItemsMetadata](../../models/operations/GetLibraryItemsMetadata.md)> | :heavy_check_mark: | An array of metadata items. | | -| `meta` | [Optional\](../../models/operations/GetLibraryItemsMeta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMeta.md b/docs/models/operations/GetLibraryItemsMeta.md deleted file mode 100644 index e409a70e..00000000 --- a/docs/models/operations/GetLibraryItemsMeta.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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\<[GetLibraryItemsLibraryType](../../models/operations/GetLibraryItemsLibraryType.md)> | :heavy_minus_sign: | N/A | -| `fieldType` | List\<[GetLibraryItemsFieldType](../../models/operations/GetLibraryItemsFieldType.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMetadata.md b/docs/models/operations/GetLibraryItemsMetadata.md deleted file mode 100644 index 117a9cb2..00000000 --- a/docs/models/operations/GetLibraryItemsMetadata.md +++ /dev/null @@ -1,88 +0,0 @@ -# GetLibraryItemsMetadata - -Unknown - - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *String* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | -| `key` | *String* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | -| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | -| `slug` | *String* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | -| `studio` | *Optional\* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `type` | [GetLibraryItemsType](../../models/operations/GetLibraryItemsType.md) | :heavy_check_mark: | N/A | movie | -| `title` | *String* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | -| `banner` | *String* | :heavy_check_mark: | The banner image URL for the media item. | /library/metadata/58683/banner/1703239236 | -| `titleSort` | *String* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | -| `contentRating` | *Optional\* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | -| `summary` | *String* | :heavy_check_mark: | A synopsis of the media item. | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.
Once a familiar threat returns to finish what was previously started, Jake must
work with Neytiri and the army of the Na'vi race to protect their home.
| -| `rating` | *float* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | -| `audienceRating` | *double* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | -| `year` | *Optional\* | :heavy_minus_sign: | The release year of the media item. | 2022 | -| `tagline` | *String* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | -| `thumb` | *String* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | -| `art` | *String* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | -| `theme` | *String* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | -| `index` | *int* | :heavy_check_mark: | The index position of the media item. | 1 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | -| `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | -| `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | -| `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | -| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | -| `chapterSource` | *Optional\* | :heavy_minus_sign: | The source from which chapter data is derived. | media | -| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | -| `originalTitle` | *Optional\* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | -| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | -| `parentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentSlug` | *Optional\* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | -| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | -| `parentKey` | *Optional\* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | -| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | -| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | -| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | -| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | The title of the parent media item. | Caprica | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | The index position of the parent media item. | 1 | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | -| `viewCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | -| `viewOffset` | *Optional\* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | -| `skipCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | -| `subtype` | *Optional\* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | -| `lastRatedAt` | *Optional\* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | -| `createdAtAccuracy` | *Optional\* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | -| `createdAtTZOffset` | *Optional\* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | -| `userRating` | *Optional\* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `image` | List\<[GetLibraryItemsImage](../../models/operations/GetLibraryItemsImage.md)> | :heavy_minus_sign: | N/A | | -| `ultraBlurColors` | [Optional\](../../models/operations/GetLibraryItemsUltraBlurColors.md) | :heavy_minus_sign: | N/A | | -| `guids` | List\<[GetLibraryItemsGuids](../../models/operations/GetLibraryItemsGuids.md)> | :heavy_minus_sign: | N/A | | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The identifier for the library section. | 1 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | Movies | -| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | -| `showOrdering` | [Optional\](../../models/operations/ShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
Options:
- None = Library default
- tmdbAiring = The Movie Database (Aired)
- aired = TheTVDB (Aired)
- dvd = TheTVDB (DVD)
- absolute = TheTVDB (Absolute)
| absolute | -| `flattenSeasons` | [Optional\](../../models/operations/FlattenSeasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
| 1 | -| `skipChildren` | *Optional\* | :heavy_minus_sign: | Indicates whether child items should be skipped. | false | -| `media` | List\<[GetLibraryItemsMedia](../../models/operations/GetLibraryItemsMedia.md)> | :heavy_minus_sign: | N/A | | -| `genre` | List\<[GetLibraryItemsGenre](../../models/operations/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | | -| `country` | List\<[GetLibraryItemsCountry](../../models/operations/GetLibraryItemsCountry.md)> | :heavy_minus_sign: | N/A | | -| `director` | List\<[GetLibraryItemsDirector](../../models/operations/GetLibraryItemsDirector.md)> | :heavy_minus_sign: | N/A | | -| `writer` | List\<[GetLibraryItemsWriter](../../models/operations/GetLibraryItemsWriter.md)> | :heavy_minus_sign: | N/A | | -| `producer` | List\<[GetLibraryItemsProducer](../../models/operations/GetLibraryItemsProducer.md)> | :heavy_minus_sign: | N/A | | -| `collection` | List\<[GetLibraryItemsCollection](../../models/operations/GetLibraryItemsCollection.md)> | :heavy_minus_sign: | N/A | | -| `role` | List\<[GetLibraryItemsRole](../../models/operations/GetLibraryItemsRole.md)> | :heavy_minus_sign: | N/A | | -| `ratings` | List\<[Ratings](../../models/operations/Ratings.md)> | :heavy_minus_sign: | N/A | | -| `similar` | List\<[GetLibraryItemsSimilar](../../models/operations/GetLibraryItemsSimilar.md)> | :heavy_minus_sign: | N/A | | -| `location` | List\<[GetLibraryItemsLocation](../../models/operations/GetLibraryItemsLocation.md)> | :heavy_minus_sign: | N/A | | -| `chapter` | List\<[Chapter](../../models/operations/Chapter.md)> | :heavy_minus_sign: | N/A | | -| `marker` | List\<[Marker](../../models/operations/Marker.md)> | :heavy_minus_sign: | N/A | | -| `extras` | [Optional\](../../models/operations/Extras.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsOperator.md b/docs/models/operations/GetLibraryItemsOperator.md deleted file mode 100644 index 0a318647..00000000 --- a/docs/models/operations/GetLibraryItemsOperator.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibraryItemsOperator - - -## 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/GetLibraryItemsOptimizedForStreaming.md b/docs/models/operations/GetLibraryItemsOptimizedForStreaming.md deleted file mode 100644 index fc2f1197..00000000 --- a/docs/models/operations/GetLibraryItemsOptimizedForStreaming.md +++ /dev/null @@ -1,4 +0,0 @@ -# GetLibraryItemsOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - diff --git a/docs/models/operations/GetLibraryItemsOptimizedForStreaming1.md b/docs/models/operations/GetLibraryItemsOptimizedForStreaming1.md deleted file mode 100644 index 53890500..00000000 --- a/docs/models/operations/GetLibraryItemsOptimizedForStreaming1.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibraryItemsOptimizedForStreaming1 - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsPart.md b/docs/models/operations/GetLibraryItemsPart.md deleted file mode 100644 index d7fadb1a..00000000 --- a/docs/models/operations/GetLibraryItemsPart.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetLibraryItemsPart - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `accessible` | *Optional\* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `exists` | *Optional\* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `id` | *long* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *Optional\* | :heavy_minus_sign: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `indexes` | *Optional\* | :heavy_minus_sign: | N/A | sd | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *Optional\* | :heavy_minus_sign: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *Optional\* | :heavy_minus_sign: | File size in bytes. | 30649952104 | -| `packetLength` | *Optional\* | :heavy_minus_sign: | N/A | 188 | -| `container` | *Optional\* | :heavy_minus_sign: | Container format of the part. | mkv | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetLibraryItemsLibraryOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
| | -| `hasThumbnail` | [Optional\](../../models/operations/GetLibraryItemsHasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsProducer.md b/docs/models/operations/GetLibraryItemsProducer.md deleted file mode 100644 index 4cc1691a..00000000 --- a/docs/models/operations/GetLibraryItemsProducer.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetLibraryItemsProducer - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | The unique role identifier. | 109501 | -| `filter` | *String* | :heavy_check_mark: | The filter string for the role. | actor=109501 | -| `tag` | *String* | :heavy_check_mark: | The actor's name. | Bob Odenkirk | -| `tagKey` | *String* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 | -| `role` | *Optional\* | :heavy_minus_sign: | The character name or role. | Jimmy McGill | -| `thumb` | *Optional\* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsQueryParamIncludeMeta.md b/docs/models/operations/GetLibraryItemsQueryParamIncludeMeta.md deleted file mode 100644 index d721bb9f..00000000 --- a/docs/models/operations/GetLibraryItemsQueryParamIncludeMeta.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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 deleted file mode 100644 index 02791eae..00000000 --- a/docs/models/operations/GetLibraryItemsQueryParamType.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetLibraryItemsQueryParamType - -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsRequest.md b/docs/models/operations/GetLibraryItemsRequest.md index 8e365438..a64ef2fe 100644 --- a/docs/models/operations/GetLibraryItemsRequest.md +++ b/docs/models/operations/GetLibraryItemsRequest.md @@ -3,12 +3,17 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | -| `type` | [GetLibraryItemsQueryParamType](../../models/operations/GetLibraryItemsQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | -| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `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 +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `mediaQuery` | [Optional\](../../models/shared/MediaQuery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsResponse.md b/docs/models/operations/GetLibraryItemsResponse.md index 82533369..b5497e8c 100644 --- a/docs/models/operations/GetLibraryItemsResponse.md +++ b/docs/models/operations/GetLibraryItemsResponse.md @@ -8,4 +8,5 @@ | `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/GetLibraryItemsResponseBody.md) | :heavy_minus_sign: | The contents of the library by section and tag | \ No newline at end of file +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsResponseBody.md b/docs/models/operations/GetLibraryItemsResponseBody.md deleted file mode 100644 index c1b78166..00000000 --- a/docs/models/operations/GetLibraryItemsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryItemsResponseBody - -The contents of the library by section and tag - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetLibraryItemsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsRole.md b/docs/models/operations/GetLibraryItemsRole.md deleted file mode 100644 index f57ca5f1..00000000 --- a/docs/models/operations/GetLibraryItemsRole.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibraryItemsRole - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | -| `tag` | *String* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | -| `role` | *Optional\* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsSimilar.md b/docs/models/operations/GetLibraryItemsSimilar.md deleted file mode 100644 index 5f1419fd..00000000 --- a/docs/models/operations/GetLibraryItemsSimilar.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryItemsSimilar - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `id` | *long* | :heavy_check_mark: | The unique similar item identifier. | 26 | -| `filter` | *String* | :heavy_check_mark: | The filter string for similar items. | similar=26 | -| `tag` | *String* | :heavy_check_mark: | The tag or title of the similar content. | Breaking Bad | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsSort.md b/docs/models/operations/GetLibraryItemsSort.md deleted file mode 100644 index 0b24b956..00000000 --- a/docs/models/operations/GetLibraryItemsSort.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetLibraryItemsSort - - -## 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/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/GetLibraryItemsType.md b/docs/models/operations/GetLibraryItemsType.md deleted file mode 100644 index d2d39f59..00000000 --- a/docs/models/operations/GetLibraryItemsType.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetLibraryItemsType - -The type of media content in the Plex library. This can represent videos, music, or photos. - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsUltraBlurColors.md b/docs/models/operations/GetLibraryItemsUltraBlurColors.md deleted file mode 100644 index 1e2c27d0..00000000 --- a/docs/models/operations/GetLibraryItemsUltraBlurColors.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/GetLibraryItemsWriter.md b/docs/models/operations/GetLibraryItemsWriter.md deleted file mode 100644 index 82e4461d..00000000 --- a/docs/models/operations/GetLibraryItemsWriter.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryItemsWriter - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | -| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryMatchesRequest.md b/docs/models/operations/GetLibraryMatchesRequest.md new file mode 100644 index 00000000..89fd73e6 --- /dev/null +++ b/docs/models/operations/GetLibraryMatchesRequest.md @@ -0,0 +1,32 @@ +# GetLibraryMatchesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `type` | *Optional\* | :heavy_minus_sign: | The metadata type to filter by | | +| `includeFullMetadata` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | +| `includeAncestorMetadata` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | +| `includeAlternateMetadataSources` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | +| `guid` | *Optional\* | :heavy_minus_sign: | Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined. | | +| `title` | *Optional\* | :heavy_minus_sign: | The title to filter by or assign | | +| `year` | *Optional\* | :heavy_minus_sign: | Used for movies shows, and albums. Optional. | | +| `path` | *Optional\* | :heavy_minus_sign: | Used for movies, episodes, and tracks. The full path to the media file, used for "cloud-scanning" an item. | | +| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | Used for episodes and tracks. The title of the show/artist. Required if `path` isn't passed. | | +| `grandparentYear` | *Optional\* | :heavy_minus_sign: | Used for episodes. The year of the show. | | +| `parentIndex` | *Optional\* | :heavy_minus_sign: | Used for episodes and tracks. The season/album number. | | +| `index` | *Optional\* | :heavy_minus_sign: | Used for episodes and tracks. The episode/tracks number in the season/album. | | +| `originallyAvailableAt` | *Optional\* | :heavy_minus_sign: | Used for episodes. In the format `YYYY-MM-DD`. | | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | Used for albums and tracks. The artist name for albums or the album name for tracks. | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryMatchesResponse.md b/docs/models/operations/GetLibraryMatchesResponse.md new file mode 100644 index 00000000..e2d584c3 --- /dev/null +++ b/docs/models/operations/GetLibraryMatchesResponse.md @@ -0,0 +1,12 @@ +# GetLibraryMatchesResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllActiveDirection.md b/docs/models/operations/GetLibrarySectionsAllActiveDirection.md deleted file mode 100644 index ad9278ae..00000000 --- a/docs/models/operations/GetLibrarySectionsAllActiveDirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibrarySectionsAllActiveDirection - -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/GetLibrarySectionsAllCollection.md b/docs/models/operations/GetLibrarySectionsAllCollection.md deleted file mode 100644 index 6a2db8f8..00000000 --- a/docs/models/operations/GetLibrarySectionsAllCollection.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibrarySectionsAllCollection - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `tag` | *String* | :heavy_check_mark: | The user-made collection this media item belongs to | My Awesome Collection | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllCountry.md b/docs/models/operations/GetLibrarySectionsAllCountry.md deleted file mode 100644 index 8a7ea694..00000000 --- a/docs/models/operations/GetLibrarySectionsAllCountry.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibrarySectionsAllCountry - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `tag` | *String* | :heavy_check_mark: | The country of origin of this media item | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllDefaultDirection.md b/docs/models/operations/GetLibrarySectionsAllDefaultDirection.md deleted file mode 100644 index 3f423636..00000000 --- a/docs/models/operations/GetLibrarySectionsAllDefaultDirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibrarySectionsAllDefaultDirection - -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/GetLibrarySectionsAllDirector.md b/docs/models/operations/GetLibrarySectionsAllDirector.md deleted file mode 100644 index 0617247f..00000000 --- a/docs/models/operations/GetLibrarySectionsAllDirector.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibrarySectionsAllDirector - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `tag` | *String* | :heavy_check_mark: | The role of Director | Danny Boyle | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllField.md b/docs/models/operations/GetLibrarySectionsAllField.md deleted file mode 100644 index 8dd30e5d..00000000 --- a/docs/models/operations/GetLibrarySectionsAllField.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibrarySectionsAllField - - -## 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/GetLibrarySectionsAllFieldType.md b/docs/models/operations/GetLibrarySectionsAllFieldType.md deleted file mode 100644 index 55e629b9..00000000 --- a/docs/models/operations/GetLibrarySectionsAllFieldType.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibrarySectionsAllFieldType - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `type` | *String* | :heavy_check_mark: | N/A | tag | -| `operator` | List\<[GetLibrarySectionsAllOperator](../../models/operations/GetLibrarySectionsAllOperator.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllFilter.md b/docs/models/operations/GetLibrarySectionsAllFilter.md deleted file mode 100644 index 21288ace..00000000 --- a/docs/models/operations/GetLibrarySectionsAllFilter.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetLibrarySectionsAllFilter - - -## 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 | -| `advanced` | *Optional\* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllGenre.md b/docs/models/operations/GetLibrarySectionsAllGenre.md deleted file mode 100644 index 8b1e439a..00000000 --- a/docs/models/operations/GetLibrarySectionsAllGenre.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibrarySectionsAllGenre - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `tag` | *String* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllGuids.md b/docs/models/operations/GetLibrarySectionsAllGuids.md deleted file mode 100644 index 5f03536c..00000000 --- a/docs/models/operations/GetLibrarySectionsAllGuids.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibrarySectionsAllGuids - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllHasThumbnail.md b/docs/models/operations/GetLibrarySectionsAllHasThumbnail.md deleted file mode 100644 index 327600d2..00000000 --- a/docs/models/operations/GetLibrarySectionsAllHasThumbnail.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibrarySectionsAllHasThumbnail - -Indicates if the part has a thumbnail. - - -## Values - -| Name | Value | -| ------- | ------- | -| `False` | 0 | -| `True` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllImage.md b/docs/models/operations/GetLibrarySectionsAllImage.md deleted file mode 100644 index 83896223..00000000 --- a/docs/models/operations/GetLibrarySectionsAllImage.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibrarySectionsAllImage - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `alt` | *String* | :heavy_check_mark: | N/A | Episode 1 | -| `type` | [GetLibrarySectionsAllLibraryResponseType](../../models/operations/GetLibrarySectionsAllLibraryResponseType.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/GetLibrarySectionsAllLibraryOptimizedForStreaming.md b/docs/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.md deleted file mode 100644 index dfad8eb2..00000000 --- a/docs/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.md +++ /dev/null @@ -1,4 +0,0 @@ -# GetLibrarySectionsAllLibraryOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - diff --git a/docs/models/operations/GetLibrarySectionsAllLibraryResponseType.md b/docs/models/operations/GetLibrarySectionsAllLibraryResponseType.md deleted file mode 100644 index ce9af2ef..00000000 --- a/docs/models/operations/GetLibrarySectionsAllLibraryResponseType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibrarySectionsAllLibraryResponseType - - -## 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/GetLibrarySectionsAllLibraryType.md b/docs/models/operations/GetLibrarySectionsAllLibraryType.md deleted file mode 100644 index 5b9c6fb0..00000000 --- a/docs/models/operations/GetLibrarySectionsAllLibraryType.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetLibrarySectionsAllLibraryType - -The type of media content in the Plex library. This can represent videos, music, or photos. - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllMedia.md b/docs/models/operations/GetLibrarySectionsAllMedia.md deleted file mode 100644 index f168b277..00000000 --- a/docs/models/operations/GetLibrarySectionsAllMedia.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetLibrarySectionsAllMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *long* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *Optional\* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *Optional\* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *Optional\* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | Audio codec used. | eac3 | -| `videoCodec` | *Optional\* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *Optional\* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *Optional\* | :heavy_minus_sign: | File container type. | mkv | -| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetLibrarySectionsAllOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `part` | List\<[GetLibrarySectionsAllPart](../../models/operations/GetLibrarySectionsAllPart.md)> | :heavy_minus_sign: | An array of parts for this media item. | | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllMediaContainer.md b/docs/models/operations/GetLibrarySectionsAllMediaContainer.md deleted file mode 100644 index 1ee7ef1c..00000000 --- a/docs/models/operations/GetLibrarySectionsAllMediaContainer.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetLibrarySectionsAllMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `totalSize` | *int* | :heavy_check_mark: | Total number of media items in the library. | 50 | -| `offset` | *long* | :heavy_check_mark: | Offset value for pagination. | 0 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `content` | *String* | :heavy_check_mark: | The content type or mode. | secondary | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | TV Series | -| `librarySectionUUID` | *Optional\* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `title2` | *String* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `viewGroup` | *String* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `meta` | [Optional\](../../models/operations/GetLibrarySectionsAllMeta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | -| `metadata` | List\<[GetLibrarySectionsAllMetadata](../../models/operations/GetLibrarySectionsAllMetadata.md)> | :heavy_minus_sign: | An array of metadata items. | | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllMeta.md b/docs/models/operations/GetLibrarySectionsAllMeta.md deleted file mode 100644 index f98c2ebf..00000000 --- a/docs/models/operations/GetLibrarySectionsAllMeta.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibrarySectionsAllMeta - -The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `type` | List\<[GetLibrarySectionsAllType](../../models/operations/GetLibrarySectionsAllType.md)> | :heavy_minus_sign: | N/A | -| `fieldType` | List\<[GetLibrarySectionsAllFieldType](../../models/operations/GetLibrarySectionsAllFieldType.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllMetadata.md b/docs/models/operations/GetLibrarySectionsAllMetadata.md deleted file mode 100644 index b6e33c66..00000000 --- a/docs/models/operations/GetLibrarySectionsAllMetadata.md +++ /dev/null @@ -1,74 +0,0 @@ -# GetLibrarySectionsAllMetadata - -Unknown - - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *String* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | -| `key` | *String* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | -| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | -| `slug` | *String* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | -| `studio` | *Optional\* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `type` | [GetLibrarySectionsAllLibraryType](../../models/operations/GetLibrarySectionsAllLibraryType.md) | :heavy_check_mark: | N/A | movie | -| `title` | *String* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | -| `titleSort` | *String* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | -| `contentRating` | *Optional\* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | -| `summary` | *String* | :heavy_check_mark: | A synopsis of the media item. | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.
Once a familiar threat returns to finish what was previously started, Jake must
work with Neytiri and the army of the Na'vi race to protect their home.
| -| `rating` | *float* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | -| `audienceRating` | *double* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | -| `year` | *Optional\* | :heavy_minus_sign: | The release year of the media item. | 2022 | -| `tagline` | *String* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | -| `thumb` | *String* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | -| `art` | *String* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | -| `theme` | *String* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | -| `index` | *int* | :heavy_check_mark: | The index position of the media item. | 1 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | -| `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | -| `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | -| `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | -| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | -| `chapterSource` | *Optional\* | :heavy_minus_sign: | The source from which chapter data is derived. | media | -| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | -| `originalTitle` | *Optional\* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | -| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | -| `parentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentSlug` | *Optional\* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | -| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | -| `parentKey` | *Optional\* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | -| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | -| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | -| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | -| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | The title of the parent media item. | Caprica | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | The index position of the parent media item. | 1 | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | -| `viewCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | -| `viewOffset` | *Optional\* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | -| `skipCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | -| `subtype` | *Optional\* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | -| `lastRatedAt` | *Optional\* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | -| `createdAtAccuracy` | *Optional\* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | -| `createdAtTZOffset` | *Optional\* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | -| `userRating` | *Optional\* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `image` | List\<[GetLibrarySectionsAllImage](../../models/operations/GetLibrarySectionsAllImage.md)> | :heavy_minus_sign: | N/A | | -| `ultraBlurColors` | [Optional\](../../models/operations/GetLibrarySectionsAllUltraBlurColors.md) | :heavy_minus_sign: | N/A | | -| `guids` | List\<[GetLibrarySectionsAllGuids](../../models/operations/GetLibrarySectionsAllGuids.md)> | :heavy_minus_sign: | N/A | | -| `media` | List\<[GetLibrarySectionsAllMedia](../../models/operations/GetLibrarySectionsAllMedia.md)> | :heavy_minus_sign: | N/A | | -| `genre` | List\<[GetLibrarySectionsAllGenre](../../models/operations/GetLibrarySectionsAllGenre.md)> | :heavy_minus_sign: | N/A | | -| `country` | List\<[GetLibrarySectionsAllCountry](../../models/operations/GetLibrarySectionsAllCountry.md)> | :heavy_minus_sign: | N/A | | -| `director` | List\<[GetLibrarySectionsAllDirector](../../models/operations/GetLibrarySectionsAllDirector.md)> | :heavy_minus_sign: | N/A | | -| `writer` | List\<[GetLibrarySectionsAllWriter](../../models/operations/GetLibrarySectionsAllWriter.md)> | :heavy_minus_sign: | N/A | | -| `role` | List\<[GetLibrarySectionsAllRole](../../models/operations/GetLibrarySectionsAllRole.md)> | :heavy_minus_sign: | N/A | | -| `collection` | List\<[GetLibrarySectionsAllCollection](../../models/operations/GetLibrarySectionsAllCollection.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllOperator.md b/docs/models/operations/GetLibrarySectionsAllOperator.md deleted file mode 100644 index f5e0cea5..00000000 --- a/docs/models/operations/GetLibrarySectionsAllOperator.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibrarySectionsAllOperator - - -## 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/GetLibrarySectionsAllOptimizedForStreaming.md b/docs/models/operations/GetLibrarySectionsAllOptimizedForStreaming.md deleted file mode 100644 index d06675ca..00000000 --- a/docs/models/operations/GetLibrarySectionsAllOptimizedForStreaming.md +++ /dev/null @@ -1,4 +0,0 @@ -# GetLibrarySectionsAllOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - diff --git a/docs/models/operations/GetLibrarySectionsAllOptimizedForStreaming1.md b/docs/models/operations/GetLibrarySectionsAllOptimizedForStreaming1.md deleted file mode 100644 index 75916606..00000000 --- a/docs/models/operations/GetLibrarySectionsAllOptimizedForStreaming1.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibrarySectionsAllOptimizedForStreaming1 - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.md b/docs/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.md deleted file mode 100644 index 70e3903d..00000000 --- a/docs/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetLibrarySectionsAllOptimizedForStreamingLibrary1 - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllPart.md b/docs/models/operations/GetLibrarySectionsAllPart.md deleted file mode 100644 index 695f45f8..00000000 --- a/docs/models/operations/GetLibrarySectionsAllPart.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetLibrarySectionsAllPart - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `accessible` | *Optional\* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `exists` | *Optional\* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `id` | *long* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *String* | :heavy_check_mark: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `indexes` | *Optional\* | :heavy_minus_sign: | N/A | sd | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *String* | :heavy_check_mark: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *long* | :heavy_check_mark: | File size in bytes. | 30649952104 | -| `packetLength` | *Optional\* | :heavy_minus_sign: | N/A | 188 | -| `container` | *Optional\* | :heavy_minus_sign: | Container format of the part. | mkv | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `hasThumbnail` | [Optional\](../../models/operations/GetLibrarySectionsAllHasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | -| `stream` | List\<[GetLibrarySectionsAllStream](../../models/operations/GetLibrarySectionsAllStream.md)> | :heavy_minus_sign: | An array of streams for this part. | | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllQueryParamIncludeMeta.md b/docs/models/operations/GetLibrarySectionsAllQueryParamIncludeMeta.md deleted file mode 100644 index 7f157732..00000000 --- a/docs/models/operations/GetLibrarySectionsAllQueryParamIncludeMeta.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLibrarySectionsAllQueryParamIncludeMeta - -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/GetLibrarySectionsAllQueryParamType.md b/docs/models/operations/GetLibrarySectionsAllQueryParamType.md deleted file mode 100644 index 7e859e6a..00000000 --- a/docs/models/operations/GetLibrarySectionsAllQueryParamType.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetLibrarySectionsAllQueryParamType - -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllRequest.md b/docs/models/operations/GetLibrarySectionsAllRequest.md deleted file mode 100644 index 38dfe987..00000000 --- a/docs/models/operations/GetLibrarySectionsAllRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetLibrarySectionsAllRequest - - -## Fields - -| 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` | [GetLibrarySectionsAllQueryParamType](../../models/operations/GetLibrarySectionsAllQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | -| `includeMeta` | [Optional\](../../models/operations/GetLibrarySectionsAllQueryParamIncludeMeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | -| `includeGuids` | [Optional\](../../models/operations/QueryParamIncludeGuids.md) | :heavy_minus_sign: | Adds the Guid object to the response
| 1 | -| `includeAdvanced` | [Optional\](../../models/operations/IncludeAdvanced.md) | :heavy_minus_sign: | N/A | 1 | -| `includeCollections` | [Optional\](../../models/operations/QueryParamIncludeCollections.md) | :heavy_minus_sign: | N/A | 1 | -| `includeExternalMedia` | [Optional\](../../models/operations/QueryParamIncludeExternalMedia.md) | :heavy_minus_sign: | N/A | 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/GetLibrarySectionsAllResponse.md b/docs/models/operations/GetLibrarySectionsAllResponse.md deleted file mode 100644 index 343482b1..00000000 --- a/docs/models/operations/GetLibrarySectionsAllResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibrarySectionsAllResponse - - -## 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/GetLibrarySectionsAllResponseBody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllResponseBody.md b/docs/models/operations/GetLibrarySectionsAllResponseBody.md deleted file mode 100644 index aa2b87e6..00000000 --- a/docs/models/operations/GetLibrarySectionsAllResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibrarySectionsAllResponseBody - -Successful response containing media container data. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetLibrarySectionsAllMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllRole.md b/docs/models/operations/GetLibrarySectionsAllRole.md deleted file mode 100644 index 1fab2205..00000000 --- a/docs/models/operations/GetLibrarySectionsAllRole.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibrarySectionsAllRole - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `tag` | *String* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllSort.md b/docs/models/operations/GetLibrarySectionsAllSort.md deleted file mode 100644 index c98a497d..00000000 --- a/docs/models/operations/GetLibrarySectionsAllSort.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetLibrarySectionsAllSort - - -## 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/GetLibrarySectionsAllActiveDirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `defaultDirection` | [Optional\](../../models/operations/GetLibrarySectionsAllDefaultDirection.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/GetLibrarySectionsAllStream.md b/docs/models/operations/GetLibrarySectionsAllStream.md deleted file mode 100644 index 54efafbf..00000000 --- a/docs/models/operations/GetLibrarySectionsAllStream.md +++ /dev/null @@ -1,58 +0,0 @@ -# GetLibrarySectionsAllStream - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 | -| `streamType` | *long* | :heavy_check_mark: | Stream type:
- VIDEO = 1
- AUDIO = 2
- SUBTITLE = 3
| | -| `format` | *Optional\* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | -| `default_` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is default. | true | -| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc | -| `index` | *Optional\* | :heavy_minus_sign: | Index of the stream. | 0 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | -| `language` | *Optional\* | :heavy_minus_sign: | Language of the stream. | English | -| `languageTag` | *Optional\* | :heavy_minus_sign: | Language tag (e.g., en). | en | -| `languageCode` | *Optional\* | :heavy_minus_sign: | ISO language code. | eng | -| `headerCompression` | *Optional\* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | -| `doviblCompatID` | *Optional\* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | -| `doviblPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | -| `dovielPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | -| `doviLevel` | *Optional\* | :heavy_minus_sign: | Dolby Vision level. | 6 | -| `doviPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | -| `doviProfile` | *Optional\* | :heavy_minus_sign: | Dolby Vision profile. | 8 | -| `dovirpuPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | -| `doviVersion` | *Optional\* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | -| `bitDepth` | *Optional\* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | -| `chromaLocation` | *Optional\* | :heavy_minus_sign: | Chroma sample location. | topleft | -| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | -| `codedHeight` | *Optional\* | :heavy_minus_sign: | Coded video height. | 1608 | -| `codedWidth` | *Optional\* | :heavy_minus_sign: | Coded video width. | 3840 | -| `closedCaptions` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `colorPrimaries` | *Optional\* | :heavy_minus_sign: | Color primaries used. | bt2020 | -| `colorRange` | *Optional\* | :heavy_minus_sign: | Color range (e.g., tv). | tv | -| `colorSpace` | *Optional\* | :heavy_minus_sign: | Color space. | bt2020nc | -| `colorTrc` | *Optional\* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | -| `frameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | -| `key` | *Optional\* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | -| `height` | *Optional\* | :heavy_minus_sign: | Height of the video stream. | 1602 | -| `level` | *Optional\* | :heavy_minus_sign: | Video level. | 150 | -| `original` | *Optional\* | :heavy_minus_sign: | Indicates if this is the original stream. | true | -| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `profile` | *Optional\* | :heavy_minus_sign: | Video profile. | main 10 | -| `scanType` | *Optional\* | :heavy_minus_sign: | N/A | progressive | -| `embeddedInVideo` | *Optional\* | :heavy_minus_sign: | N/A | progressive | -| `refFrames` | *Optional\* | :heavy_minus_sign: | Number of reference frames. | 1 | -| `width` | *Optional\* | :heavy_minus_sign: | Width of the video stream. | 3840 | -| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `selected` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | -| `forced` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `channels` | *Optional\* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | -| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | -| `samplingRate` | *Optional\* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | -| `canAutoSync` | *Optional\* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | -| `hearingImpaired` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | -| `dub` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | -| `title` | *Optional\* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllType.md b/docs/models/operations/GetLibrarySectionsAllType.md deleted file mode 100644 index c2377113..00000000 --- a/docs/models/operations/GetLibrarySectionsAllType.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetLibrarySectionsAllType - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `key` | *String* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | -| `type` | *String* | :heavy_check_mark: | N/A | filter | -| `subtype` | *Optional\* | :heavy_minus_sign: | N/A | clip | -| `title` | *String* | :heavy_check_mark: | N/A | TV Shows | -| `active` | *boolean* | :heavy_check_mark: | N/A | false | -| `filter` | List\<[GetLibrarySectionsAllFilter](../../models/operations/GetLibrarySectionsAllFilter.md)> | :heavy_minus_sign: | N/A | | -| `sort` | List\<[GetLibrarySectionsAllSort](../../models/operations/GetLibrarySectionsAllSort.md)> | :heavy_minus_sign: | N/A | | -| `field` | List\<[GetLibrarySectionsAllField](../../models/operations/GetLibrarySectionsAllField.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibrarySectionsAllUltraBlurColors.md b/docs/models/operations/GetLibrarySectionsAllUltraBlurColors.md deleted file mode 100644 index a2fca66e..00000000 --- a/docs/models/operations/GetLibrarySectionsAllUltraBlurColors.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetLibrarySectionsAllUltraBlurColors - - -## 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/GetLibrarySectionsAllWriter.md b/docs/models/operations/GetLibrarySectionsAllWriter.md deleted file mode 100644 index 2b631e3b..00000000 --- a/docs/models/operations/GetLibrarySectionsAllWriter.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetLibrarySectionsAllWriter - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | \ No newline at end of file diff --git a/docs/models/operations/GetLineupChannelsMediaContainer.md b/docs/models/operations/GetLineupChannelsMediaContainer.md new file mode 100644 index 00000000..9dfa2259 --- /dev/null +++ b/docs/models/operations/GetLineupChannelsMediaContainer.md @@ -0,0 +1,17 @@ +# GetLineupChannelsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `lineup` | List\<[Lineup](../../models/operations/Lineup.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLineupChannelsRequest.md b/docs/models/operations/GetLineupChannelsRequest.md new file mode 100644 index 00000000..f0a442ee --- /dev/null +++ b/docs/models/operations/GetLineupChannelsRequest.md @@ -0,0 +1,19 @@ +# GetLineupChannelsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `lineup` | List\<*String*> | :heavy_check_mark: | The URIs describing the lineups | | \ No newline at end of file diff --git a/docs/models/operations/GetLineupChannelsResponse.md b/docs/models/operations/GetLineupChannelsResponse.md new file mode 100644 index 00000000..c9dc9c99 --- /dev/null +++ b/docs/models/operations/GetLineupChannelsResponse.md @@ -0,0 +1,11 @@ +# GetLineupChannelsResponse + + +## 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/GetLineupChannelsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetLineupChannelsResponseBody.md b/docs/models/operations/GetLineupChannelsResponseBody.md new file mode 100644 index 00000000..1d6aaaa2 --- /dev/null +++ b/docs/models/operations/GetLineupChannelsResponseBody.md @@ -0,0 +1,10 @@ +# GetLineupChannelsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetLineupChannelsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLineupRequest.md b/docs/models/operations/GetLineupRequest.md new file mode 100644 index 00000000..c6cf2c71 --- /dev/null +++ b/docs/models/operations/GetLineupRequest.md @@ -0,0 +1,20 @@ +# GetLineupRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceQueryParameter` | *String* | :heavy_check_mark: | The URI describing the device | | +| `lineupGroup` | *String* | :heavy_check_mark: | The URI describing the lineupGroup | | \ No newline at end of file diff --git a/docs/models/operations/GetLineupResponse.md b/docs/models/operations/GetLineupResponse.md new file mode 100644 index 00000000..a3e4c63a --- /dev/null +++ b/docs/models/operations/GetLineupResponse.md @@ -0,0 +1,11 @@ +# GetLineupResponse + + +## 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 | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetLiveTVSessionRequest.md b/docs/models/operations/GetLiveTVSessionRequest.md new file mode 100644 index 00000000..c23ee75a --- /dev/null +++ b/docs/models/operations/GetLiveTVSessionRequest.md @@ -0,0 +1,19 @@ +# GetLiveTVSessionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sessionId` | *String* | :heavy_check_mark: | The session id | | \ No newline at end of file diff --git a/docs/models/operations/GetLiveTVSessionResponse.md b/docs/models/operations/GetLiveTVSessionResponse.md new file mode 100644 index 00000000..ad7ad524 --- /dev/null +++ b/docs/models/operations/GetLiveTVSessionResponse.md @@ -0,0 +1,12 @@ +# GetLiveTVSessionResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMediaArtsMediaContainer.md b/docs/models/operations/GetMediaArtsMediaContainer.md deleted file mode 100644 index cf6dc62b..00000000 --- a/docs/models/operations/GetMediaArtsMediaContainer.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMediaArtsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `metadata` | List\<[GetMediaArtsMetadata](../../models/operations/GetMediaArtsMetadata.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaArtsMetadata.md b/docs/models/operations/GetMediaArtsMetadata.md deleted file mode 100644 index dfe0f2eb..00000000 --- a/docs/models/operations/GetMediaArtsMetadata.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMediaArtsMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `key` | *String* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg | -| `provider` | *Optional\* | :heavy_minus_sign: | The provider of the artwork. | tmdb | -| `ratingKey` | *String* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg | -| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected artwork. | true | -| `thumb` | *String* | :heavy_check_mark: | The URL of the artwork thumbnail. | https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg | \ No newline at end of file diff --git a/docs/models/operations/GetMediaArtsRequest.md b/docs/models/operations/GetMediaArtsRequest.md deleted file mode 100644 index 44e20b15..00000000 --- a/docs/models/operations/GetMediaArtsRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetMediaArtsRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaArtsResponse.md b/docs/models/operations/GetMediaArtsResponse.md deleted file mode 100644 index f902ffe4..00000000 --- a/docs/models/operations/GetMediaArtsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaArtsResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [Optional\](../../models/operations/GetMediaArtsResponseBody.md) | :heavy_minus_sign: | The available background artwork for the library item. | \ No newline at end of file diff --git a/docs/models/operations/GetMediaArtsResponseBody.md b/docs/models/operations/GetMediaArtsResponseBody.md deleted file mode 100644 index 67846c85..00000000 --- a/docs/models/operations/GetMediaArtsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaArtsResponseBody - -The available background artwork for the library item. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetMediaArtsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataAttributes.md b/docs/models/operations/GetMediaMetaDataAttributes.md deleted file mode 100644 index f3fe51a9..00000000 --- a/docs/models/operations/GetMediaMetaDataAttributes.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaMetaDataAttributes - -Attributes associated with the marker. - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | The identifier for the attributes. | 306970 | -| `version` | *Optional\* | :heavy_minus_sign: | The version number of the marker attributes. | 4 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataChapter.md b/docs/models/operations/GetMediaMetaDataChapter.md deleted file mode 100644 index c7bd8d81..00000000 --- a/docs/models/operations/GetMediaMetaDataChapter.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetMediaMetaDataChapter - -The thumbnail for the chapter - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `id` | *long* | :heavy_check_mark: | N/A | 4 | -| `filter` | *String* | :heavy_check_mark: | N/A | thumb=4 | -| `index` | *long* | :heavy_check_mark: | N/A | 1 | -| `startTimeOffset` | *long* | :heavy_check_mark: | N/A | 0 | -| `endTimeOffset` | *long* | :heavy_check_mark: | N/A | 100100 | -| `thumb` | *String* | :heavy_check_mark: | N/A | /library/media/46883/chapterImages/1 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataCountry.md b/docs/models/operations/GetMediaMetaDataCountry.md deleted file mode 100644 index 69a85c79..00000000 --- a/docs/models/operations/GetMediaMetaDataCountry.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMediaMetaDataCountry - -The filter query string for country media items. - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *String* | :heavy_check_mark: | The country of origin of this media item | United States of America | -| `filter` | *String* | :heavy_check_mark: | N/A | country=19 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataDirector.md b/docs/models/operations/GetMediaMetaDataDirector.md deleted file mode 100644 index caa01eb0..00000000 --- a/docs/models/operations/GetMediaMetaDataDirector.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMediaMetaDataDirector - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 | -| `tag` | *String* | :heavy_check_mark: | The role of Director | Danny Boyle | -| `filter` | *String* | :heavy_check_mark: | The filter string used to query this director. | director=235876 | -| `tagKey` | *String* | :heavy_check_mark: | A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. | 5d776831151a60001f24d031 | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataExtras.md b/docs/models/operations/GetMediaMetaDataExtras.md deleted file mode 100644 index 7e3449e5..00000000 --- a/docs/models/operations/GetMediaMetaDataExtras.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetMediaMetaDataExtras - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | The size of the extras. | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataGenre.md b/docs/models/operations/GetMediaMetaDataGenre.md deleted file mode 100644 index a0d5ddf3..00000000 --- a/docs/models/operations/GetMediaMetaDataGenre.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMediaMetaDataGenre - -The filter query string for similar items. - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *String* | :heavy_check_mark: | The genre name of this media-item
| Crime | -| `filter` | *String* | :heavy_check_mark: | N/A | genre=19 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataGuids.md b/docs/models/operations/GetMediaMetaDataGuids.md deleted file mode 100644 index e0ca4eb0..00000000 --- a/docs/models/operations/GetMediaMetaDataGuids.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetMediaMetaDataGuids - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataHasThumbnail.md b/docs/models/operations/GetMediaMetaDataHasThumbnail.md deleted file mode 100644 index fc2814d2..00000000 --- a/docs/models/operations/GetMediaMetaDataHasThumbnail.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMediaMetaDataHasThumbnail - -Indicates if the part has a thumbnail. - - - -## Values - -| Name | Value | -| ------- | ------- | -| `False` | 0 | -| `True` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataImage.md b/docs/models/operations/GetMediaMetaDataImage.md deleted file mode 100644 index 0d14c56e..00000000 --- a/docs/models/operations/GetMediaMetaDataImage.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaMetaDataImage - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `alt` | *String* | :heavy_check_mark: | N/A | Episode 1 | -| `type` | [GetMediaMetaDataLibraryType](../../models/operations/GetMediaMetaDataLibraryType.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/GetMediaMetaDataLibraryOptimizedForStreaming.md b/docs/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md deleted file mode 100644 index 03d6ddbf..00000000 --- a/docs/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md +++ /dev/null @@ -1,5 +0,0 @@ -# GetMediaMetaDataLibraryOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - diff --git a/docs/models/operations/GetMediaMetaDataLibraryType.md b/docs/models/operations/GetMediaMetaDataLibraryType.md deleted file mode 100644 index 77547ef3..00000000 --- a/docs/models/operations/GetMediaMetaDataLibraryType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaMetaDataLibraryType - - -## 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/GetMediaMetaDataLocation.md b/docs/models/operations/GetMediaMetaDataLocation.md deleted file mode 100644 index 1b12f5b6..00000000 --- a/docs/models/operations/GetMediaMetaDataLocation.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetMediaMetaDataLocation - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `path` | *String* | :heavy_check_mark: | The file path for the location. | /TV Shows/Better Call Saul | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataMarker.md b/docs/models/operations/GetMediaMetaDataMarker.md deleted file mode 100644 index 2c07a9a3..00000000 --- a/docs/models/operations/GetMediaMetaDataMarker.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetMediaMetaDataMarker - -The final status of the marker - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | N/A | 306970 | -| `type` | *String* | :heavy_check_mark: | N/A | credits | -| `startTimeOffset` | *long* | :heavy_check_mark: | N/A | 4176050 | -| `endTimeOffset` | *long* | :heavy_check_mark: | N/A | 4393389 | -| `final_` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `attributes` | [Optional\](../../models/operations/GetMediaMetaDataAttributes.md) | :heavy_minus_sign: | Attributes associated with the marker. | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataMedia.md b/docs/models/operations/GetMediaMetaDataMedia.md deleted file mode 100644 index 10cafff1..00000000 --- a/docs/models/operations/GetMediaMetaDataMedia.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetMediaMetaDataMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *Optional\* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *Optional\* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *Optional\* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | Audio codec used. | aac | -| `videoCodec` | *Optional\* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *Optional\* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *Optional\* | :heavy_minus_sign: | Container format of the media. | mp4 | -| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetMediaMetaDataOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | Indicates whether the media has 64-bit offsets.
This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
| false | -| `part` | List\<[GetMediaMetaDataPart](../../models/operations/GetMediaMetaDataPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataMediaContainer.md b/docs/models/operations/GetMediaMetaDataMediaContainer.md deleted file mode 100644 index 279b92ba..00000000 --- a/docs/models/operations/GetMediaMetaDataMediaContainer.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetMediaMetaDataMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | TV Series | -| `librarySectionUUID` | *Optional\* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `metadata` | List\<[GetMediaMetaDataMetadata](../../models/operations/GetMediaMetaDataMetadata.md)> | :heavy_check_mark: | An array of metadata items. | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataMetadata.md b/docs/models/operations/GetMediaMetaDataMetadata.md deleted file mode 100644 index 57312926..00000000 --- a/docs/models/operations/GetMediaMetaDataMetadata.md +++ /dev/null @@ -1,83 +0,0 @@ -# GetMediaMetaDataMetadata - -Unknown - - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *String* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | -| `key` | *String* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | -| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | -| `slug` | *String* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | -| `studio` | *Optional\* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `type` | [GetMediaMetaDataType](../../models/operations/GetMediaMetaDataType.md) | :heavy_check_mark: | N/A | movie | -| `title` | *String* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | -| `titleSort` | *String* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | -| `contentRating` | *Optional\* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | -| `summary` | *String* | :heavy_check_mark: | A synopsis of the media item. | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.
Once a familiar threat returns to finish what was previously started, Jake must
work with Neytiri and the army of the Na'vi race to protect their home.
| -| `rating` | *float* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | -| `audienceRating` | *double* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | -| `year` | *Optional\* | :heavy_minus_sign: | The release year of the media item. | 2022 | -| `tagline` | *String* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | -| `thumb` | *String* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | -| `art` | *String* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | -| `theme` | *String* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | -| `index` | *int* | :heavy_check_mark: | The index position of the media item. | 1 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | -| `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | -| `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | -| `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | -| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | -| `chapterSource` | *Optional\* | :heavy_minus_sign: | The source from which chapter data is derived. | media | -| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | -| `originalTitle` | *Optional\* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | -| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | -| `parentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentSlug` | *Optional\* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | -| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | -| `parentKey` | *Optional\* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | -| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | -| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | -| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | -| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | The title of the parent media item. | Caprica | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | The index position of the parent media item. | 1 | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | -| `viewCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | -| `viewOffset` | *Optional\* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | -| `skipCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | -| `subtype` | *Optional\* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | -| `lastRatedAt` | *Optional\* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | -| `createdAtAccuracy` | *Optional\* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | -| `createdAtTZOffset` | *Optional\* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | -| `userRating` | *Optional\* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `image` | List\<[GetMediaMetaDataImage](../../models/operations/GetMediaMetaDataImage.md)> | :heavy_minus_sign: | N/A | | -| `ultraBlurColors` | [Optional\](../../models/operations/GetMediaMetaDataUltraBlurColors.md) | :heavy_minus_sign: | N/A | | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The identifier for the library section. | 1 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | Movies | -| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | -| `guids` | List\<[GetMediaMetaDataGuids](../../models/operations/GetMediaMetaDataGuids.md)> | :heavy_minus_sign: | N/A | | -| `media` | List\<[GetMediaMetaDataMedia](../../models/operations/GetMediaMetaDataMedia.md)> | :heavy_minus_sign: | N/A | | -| `genre` | List\<[GetMediaMetaDataGenre](../../models/operations/GetMediaMetaDataGenre.md)> | :heavy_minus_sign: | N/A | | -| `country` | List\<[GetMediaMetaDataCountry](../../models/operations/GetMediaMetaDataCountry.md)> | :heavy_minus_sign: | N/A | | -| `director` | List\<[GetMediaMetaDataDirector](../../models/operations/GetMediaMetaDataDirector.md)> | :heavy_minus_sign: | N/A | | -| `writer` | List\<[GetMediaMetaDataWriter](../../models/operations/GetMediaMetaDataWriter.md)> | :heavy_minus_sign: | N/A | | -| `producer` | List\<[GetMediaMetaDataProducer](../../models/operations/GetMediaMetaDataProducer.md)> | :heavy_minus_sign: | N/A | | -| `role` | List\<[GetMediaMetaDataRole](../../models/operations/GetMediaMetaDataRole.md)> | :heavy_minus_sign: | N/A | | -| `ratings` | List\<[GetMediaMetaDataRatings](../../models/operations/GetMediaMetaDataRatings.md)> | :heavy_minus_sign: | N/A | | -| `similar` | List\<[GetMediaMetaDataSimilar](../../models/operations/GetMediaMetaDataSimilar.md)> | :heavy_minus_sign: | N/A | | -| `location` | List\<[GetMediaMetaDataLocation](../../models/operations/GetMediaMetaDataLocation.md)> | :heavy_minus_sign: | N/A | | -| `chapter` | List\<[GetMediaMetaDataChapter](../../models/operations/GetMediaMetaDataChapter.md)> | :heavy_minus_sign: | N/A | | -| `marker` | List\<[GetMediaMetaDataMarker](../../models/operations/GetMediaMetaDataMarker.md)> | :heavy_minus_sign: | N/A | | -| `extras` | [Optional\](../../models/operations/GetMediaMetaDataExtras.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataOptimizedForStreaming.md b/docs/models/operations/GetMediaMetaDataOptimizedForStreaming.md deleted file mode 100644 index 67de368d..00000000 --- a/docs/models/operations/GetMediaMetaDataOptimizedForStreaming.md +++ /dev/null @@ -1,4 +0,0 @@ -# GetMediaMetaDataOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - diff --git a/docs/models/operations/GetMediaMetaDataOptimizedForStreaming1.md b/docs/models/operations/GetMediaMetaDataOptimizedForStreaming1.md deleted file mode 100644 index 67a4a971..00000000 --- a/docs/models/operations/GetMediaMetaDataOptimizedForStreaming1.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetMediaMetaDataOptimizedForStreaming1 - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataOptimizedForStreamingLibrary1.md b/docs/models/operations/GetMediaMetaDataOptimizedForStreamingLibrary1.md deleted file mode 100644 index 82871591..00000000 --- a/docs/models/operations/GetMediaMetaDataOptimizedForStreamingLibrary1.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetMediaMetaDataOptimizedForStreamingLibrary1 - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataPart.md b/docs/models/operations/GetMediaMetaDataPart.md deleted file mode 100644 index 7fb0565e..00000000 --- a/docs/models/operations/GetMediaMetaDataPart.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetMediaMetaDataPart - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `accessible` | *Optional\* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `exists` | *Optional\* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `id` | *long* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *Optional\* | :heavy_minus_sign: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `indexes` | *Optional\* | :heavy_minus_sign: | N/A | sd | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *Optional\* | :heavy_minus_sign: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *Optional\* | :heavy_minus_sign: | File size in bytes. | 30649952104 | -| `packetLength` | *Optional\* | :heavy_minus_sign: | N/A | 188 | -| `container` | *Optional\* | :heavy_minus_sign: | Container format of the part. | mkv | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
| | -| `hasThumbnail` | [Optional\](../../models/operations/GetMediaMetaDataHasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | -| `stream` | List\<[GetMediaMetaDataStream](../../models/operations/GetMediaMetaDataStream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataProducer.md b/docs/models/operations/GetMediaMetaDataProducer.md deleted file mode 100644 index cd10ffe6..00000000 --- a/docs/models/operations/GetMediaMetaDataProducer.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetMediaMetaDataProducer - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | The unique role identifier. | 109501 | -| `filter` | *String* | :heavy_check_mark: | The filter string for the role. | actor=109501 | -| `tag` | *String* | :heavy_check_mark: | The actor's name. | Bob Odenkirk | -| `tagKey` | *String* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 | -| `role` | *Optional\* | :heavy_minus_sign: | The character name or role. | Jimmy McGill | -| `thumb` | *Optional\* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataRatings.md b/docs/models/operations/GetMediaMetaDataRatings.md deleted file mode 100644 index 83c7df05..00000000 --- a/docs/models/operations/GetMediaMetaDataRatings.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaMetaDataRatings - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `image` | *String* | :heavy_check_mark: | The image or reference for the rating. | imdb://image.rating | -| `value` | *float* | :heavy_check_mark: | The rating value. | 9 | -| `type` | *String* | :heavy_check_mark: | The type of rating (e.g., audience, critic). | audience | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataRequest.md b/docs/models/operations/GetMediaMetaDataRequest.md deleted file mode 100644 index fb3ec4e9..00000000 --- a/docs/models/operations/GetMediaMetaDataRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaMetaDataRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *String* | :heavy_check_mark: | The id(s) of the library item(s) to return metadata for. Can be a single ID or comma-separated list of IDs. | 21119,21617 | -| `includeConcerts` | *Optional\* | :heavy_minus_sign: | Include concerts data if set to true. | true | -| `includeExtras` | *Optional\* | :heavy_minus_sign: | Include extra content (e.g. bonus features). | true | -| `includeOnDeck` | *Optional\* | :heavy_minus_sign: | Include on-deck items. | true | -| `includePopularLeaves` | *Optional\* | :heavy_minus_sign: | Include popular leaves (episodes/chapters). | true | -| `includePreferences` | *Optional\* | :heavy_minus_sign: | Include preferences information. | true | -| `includeReviews` | *Optional\* | :heavy_minus_sign: | Include reviews for the content. | true | -| `includeChapters` | *Optional\* | :heavy_minus_sign: | Include chapter details. | true | -| `includeStations` | *Optional\* | :heavy_minus_sign: | Include station data. | true | -| `includeExternalMedia` | *Optional\* | :heavy_minus_sign: | Include external media data. | true | -| `asyncAugmentMetadata` | *Optional\* | :heavy_minus_sign: | Trigger asynchronous metadata augmentation. | true | -| `asyncCheckFiles` | *Optional\* | :heavy_minus_sign: | Trigger asynchronous file checking. | true | -| `asyncRefreshAnalysis` | *Optional\* | :heavy_minus_sign: | Trigger asynchronous refresh of analysis. | true | -| `asyncRefreshLocalMediaAgent` | *Optional\* | :heavy_minus_sign: | Trigger asynchronous refresh of the local media agent. | true | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataResponse.md b/docs/models/operations/GetMediaMetaDataResponse.md deleted file mode 100644 index 2b8b9284..00000000 --- a/docs/models/operations/GetMediaMetaDataResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaMetaDataResponse - - -## 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/GetMediaMetaDataResponseBody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataResponseBody.md b/docs/models/operations/GetMediaMetaDataResponseBody.md deleted file mode 100644 index ad54a955..00000000 --- a/docs/models/operations/GetMediaMetaDataResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaMetaDataResponseBody - -The metadata of the library item. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetMediaMetaDataMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataRole.md b/docs/models/operations/GetMediaMetaDataRole.md deleted file mode 100644 index ae44ed18..00000000 --- a/docs/models/operations/GetMediaMetaDataRole.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetMediaMetaDataRole - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | -| `tag` | *String* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | -| `role` | *Optional\* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | -| `filter` | *String* | :heavy_check_mark: | The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. | actor=126522 | -| `tagKey` | *String* | :heavy_check_mark: | A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification.
NOTE: This is globally unique across all Plex Servers.
| 5d77683d85719b001f3a535e | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataSimilar.md b/docs/models/operations/GetMediaMetaDataSimilar.md deleted file mode 100644 index 8ca229d0..00000000 --- a/docs/models/operations/GetMediaMetaDataSimilar.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaMetaDataSimilar - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `id` | *long* | :heavy_check_mark: | The unique similar item identifier. | 26 | -| `filter` | *String* | :heavy_check_mark: | The filter string for similar items. | similar=26 | -| `tag` | *String* | :heavy_check_mark: | The tag or title of the similar content. | Breaking Bad | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataStream.md b/docs/models/operations/GetMediaMetaDataStream.md deleted file mode 100644 index 4adc8765..00000000 --- a/docs/models/operations/GetMediaMetaDataStream.md +++ /dev/null @@ -1,58 +0,0 @@ -# GetMediaMetaDataStream - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 | -| `streamType` | *long* | :heavy_check_mark: | Stream type:
- VIDEO = 1
- AUDIO = 2
- SUBTITLE = 3
| | -| `format` | *Optional\* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | -| `default_` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is default. | true | -| `codec` | *Optional\* | :heavy_minus_sign: | Codec used by the stream. | hevc | -| `index` | *Optional\* | :heavy_minus_sign: | Index of the stream. | 0 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | -| `language` | *Optional\* | :heavy_minus_sign: | Language of the stream. | English | -| `languageTag` | *Optional\* | :heavy_minus_sign: | Language tag (e.g., en). | en | -| `languageCode` | *Optional\* | :heavy_minus_sign: | ISO language code. | eng | -| `headerCompression` | *Optional\* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | -| `doviblCompatID` | *Optional\* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | -| `doviblPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | -| `dovielPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | -| `doviLevel` | *Optional\* | :heavy_minus_sign: | Dolby Vision level. | 6 | -| `doviPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | -| `doviProfile` | *Optional\* | :heavy_minus_sign: | Dolby Vision profile. | 8 | -| `dovirpuPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | -| `doviVersion` | *Optional\* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | -| `bitDepth` | *Optional\* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | -| `chromaLocation` | *Optional\* | :heavy_minus_sign: | Chroma sample location. | topleft | -| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | -| `codedHeight` | *Optional\* | :heavy_minus_sign: | Coded video height. | 1608 | -| `codedWidth` | *Optional\* | :heavy_minus_sign: | Coded video width. | 3840 | -| `closedCaptions` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `colorPrimaries` | *Optional\* | :heavy_minus_sign: | Color primaries used. | bt2020 | -| `colorRange` | *Optional\* | :heavy_minus_sign: | Color range (e.g., tv). | tv | -| `colorSpace` | *Optional\* | :heavy_minus_sign: | Color space. | bt2020nc | -| `colorTrc` | *Optional\* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | -| `frameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | -| `key` | *Optional\* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | -| `height` | *Optional\* | :heavy_minus_sign: | Height of the video stream. | 1602 | -| `level` | *Optional\* | :heavy_minus_sign: | Video level. | 150 | -| `original` | *Optional\* | :heavy_minus_sign: | Indicates if this is the original stream. | true | -| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `profile` | *Optional\* | :heavy_minus_sign: | Video profile. | main 10 | -| `scanType` | *Optional\* | :heavy_minus_sign: | N/A | progressive | -| `embeddedInVideo` | *Optional\* | :heavy_minus_sign: | N/A | progressive | -| `refFrames` | *Optional\* | :heavy_minus_sign: | Number of reference frames. | 1 | -| `width` | *Optional\* | :heavy_minus_sign: | Width of the video stream. | 3840 | -| `displayTitle` | *Optional\* | :heavy_minus_sign: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `extendedDisplayTitle` | *Optional\* | :heavy_minus_sign: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `selected` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | -| `forced` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `channels` | *Optional\* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | -| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | -| `samplingRate` | *Optional\* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | -| `canAutoSync` | *Optional\* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | -| `hearingImpaired` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | -| `dub` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | -| `title` | *Optional\* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataType.md b/docs/models/operations/GetMediaMetaDataType.md deleted file mode 100644 index 415e437d..00000000 --- a/docs/models/operations/GetMediaMetaDataType.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetMediaMetaDataType - -The type of media content in the Plex library. This can represent videos, music, or photos. - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | \ No newline at end of file diff --git a/docs/models/operations/GetMediaMetaDataUltraBlurColors.md b/docs/models/operations/GetMediaMetaDataUltraBlurColors.md deleted file mode 100644 index 7ce01a56..00000000 --- a/docs/models/operations/GetMediaMetaDataUltraBlurColors.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaMetaDataUltraBlurColors - - -## 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/GetMediaMetaDataWriter.md b/docs/models/operations/GetMediaMetaDataWriter.md deleted file mode 100644 index 678e0986..00000000 --- a/docs/models/operations/GetMediaMetaDataWriter.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMediaMetaDataWriter - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | -| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | -| `filter` | *String* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | -| `tagKey` | *Optional\* | :heavy_minus_sign: | A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. | 5d77683d85719b001f3a535e | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPartRequest.md b/docs/models/operations/GetMediaPartRequest.md new file mode 100644 index 00000000..b4b57ca5 --- /dev/null +++ b/docs/models/operations/GetMediaPartRequest.md @@ -0,0 +1,22 @@ +# GetMediaPartRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `partId` | *long* | :heavy_check_mark: | The part id who's index is to be fetched | | +| `changestamp` | *long* | :heavy_check_mark: | The changestamp of the part; used for busting potential caches. Provided in the `key` for the part | | +| `filename` | *String* | :heavy_check_mark: | A generic filename used for a client media stack which relies on the extension in the request. Provided in the `key` for the part | | +| `download` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether this is a file download | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPartResponse.md b/docs/models/operations/GetMediaPartResponse.md new file mode 100644 index 00000000..20f7f8c4 --- /dev/null +++ b/docs/models/operations/GetMediaPartResponse.md @@ -0,0 +1,11 @@ +# GetMediaPartResponse + + +## 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 | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPostersMediaContainer.md b/docs/models/operations/GetMediaPostersMediaContainer.md deleted file mode 100644 index f965a9e4..00000000 --- a/docs/models/operations/GetMediaPostersMediaContainer.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMediaPostersMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `metadata` | List\<[GetMediaPostersMetadata](../../models/operations/GetMediaPostersMetadata.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPostersMetadata.md b/docs/models/operations/GetMediaPostersMetadata.md deleted file mode 100644 index 540626ae..00000000 --- a/docs/models/operations/GetMediaPostersMetadata.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMediaPostersMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `key` | *String* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg | -| `provider` | *Optional\* | :heavy_minus_sign: | The provider of the poster. | tmdb | -| `ratingKey` | *String* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg | -| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected poster. | true | -| `thumb` | *String* | :heavy_check_mark: | The URL of the poster thumbnail. | https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPostersRequest.md b/docs/models/operations/GetMediaPostersRequest.md deleted file mode 100644 index 615c70bb..00000000 --- a/docs/models/operations/GetMediaPostersRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetMediaPostersRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPostersResponse.md b/docs/models/operations/GetMediaPostersResponse.md deleted file mode 100644 index 6f272896..00000000 --- a/docs/models/operations/GetMediaPostersResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaPostersResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [Optional\](../../models/operations/GetMediaPostersResponseBody.md) | :heavy_minus_sign: | The available posters for the library item. | \ No newline at end of file diff --git a/docs/models/operations/GetMediaPostersResponseBody.md b/docs/models/operations/GetMediaPostersResponseBody.md deleted file mode 100644 index e374c367..00000000 --- a/docs/models/operations/GetMediaPostersResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaPostersResponseBody - -The available posters for the library item. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetMediaPostersMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMediaProvidersDirectory.md b/docs/models/operations/GetMediaProvidersDirectory.md deleted file mode 100644 index ce020ded..00000000 --- a/docs/models/operations/GetMediaProvidersDirectory.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaProvidersDirectory - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `hubKey` | *Optional\* | :heavy_minus_sign: | N/A | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | -| `agent` | *Optional\* | :heavy_minus_sign: | N/A | -| `language` | *Optional\* | :heavy_minus_sign: | N/A | -| `refreshing` | *Optional\* | :heavy_minus_sign: | N/A | -| `scanner` | *Optional\* | :heavy_minus_sign: | N/A | -| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | -| `subtype` | *Optional\* | :heavy_minus_sign: | N/A | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | -| `scannedAt` | *Optional\* | :heavy_minus_sign: | N/A | -| `pivot` | List\<[Pivot](../../models/operations/Pivot.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMediaProvidersMediaContainer.md b/docs/models/operations/GetMediaProvidersMediaContainer.md deleted file mode 100644 index fb987884..00000000 --- a/docs/models/operations/GetMediaProvidersMediaContainer.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetMediaProvidersMediaContainer - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowCameraUpload` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowChannelAccess` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowSharing` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowTuners` | *Optional\* | :heavy_minus_sign: | N/A | -| `backgroundProcessing` | *Optional\* | :heavy_minus_sign: | N/A | -| `certificate` | *Optional\* | :heavy_minus_sign: | N/A | -| `companionProxy` | *Optional\* | :heavy_minus_sign: | N/A | -| `countryCode` | *Optional\* | :heavy_minus_sign: | N/A | -| `diagnostics` | *Optional\* | :heavy_minus_sign: | N/A | -| `eventStream` | *Optional\* | :heavy_minus_sign: | N/A | -| `friendlyName` | *Optional\* | :heavy_minus_sign: | N/A | -| `livetv` | *Optional\* | :heavy_minus_sign: | N/A | -| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | -| `musicAnalysis` | *Optional\* | :heavy_minus_sign: | N/A | -| `myPlex` | *Optional\* | :heavy_minus_sign: | N/A | -| `myPlexMappingState` | *Optional\* | :heavy_minus_sign: | N/A | -| `myPlexSigninState` | *Optional\* | :heavy_minus_sign: | N/A | -| `myPlexSubscription` | *Optional\* | :heavy_minus_sign: | N/A | -| `myPlexUsername` | *Optional\* | :heavy_minus_sign: | N/A | -| `offlineTranscode` | *Optional\* | :heavy_minus_sign: | N/A | -| `ownerFeatures` | *Optional\* | :heavy_minus_sign: | N/A | -| `platform` | *Optional\* | :heavy_minus_sign: | N/A | -| `platformVersion` | *Optional\* | :heavy_minus_sign: | N/A | -| `pluginHost` | *Optional\* | :heavy_minus_sign: | N/A | -| `pushNotifications` | *Optional\* | :heavy_minus_sign: | N/A | -| `readOnlyLibraries` | *Optional\* | :heavy_minus_sign: | N/A | -| `streamingBrainABRVersion` | *Optional\* | :heavy_minus_sign: | N/A | -| `streamingBrainVersion` | *Optional\* | :heavy_minus_sign: | N/A | -| `sync` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderActiveVideoSessions` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderAudio` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderLyrics` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderSubtitles` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderVideo` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderVideoBitrates` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderVideoQualities` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderVideoResolutions` | *Optional\* | :heavy_minus_sign: | N/A | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | -| `updater` | *Optional\* | :heavy_minus_sign: | N/A | -| `version` | *Optional\* | :heavy_minus_sign: | N/A | -| `voiceSearch` | *Optional\* | :heavy_minus_sign: | N/A | -| `mediaProvider` | List\<[MediaProvider](../../models/operations/MediaProvider.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMediaProvidersRequest.md b/docs/models/operations/GetMediaProvidersRequest.md deleted file mode 100644 index 43c327fb..00000000 --- a/docs/models/operations/GetMediaProvidersRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetMediaProvidersRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `xPlexToken` | *String* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/GetMediaProvidersResponse.md b/docs/models/operations/GetMediaProvidersResponse.md deleted file mode 100644 index 0f78927b..00000000 --- a/docs/models/operations/GetMediaProvidersResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaProvidersResponse - - -## 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/GetMediaProvidersResponseBody.md) | :heavy_minus_sign: | Media providers and their features | \ No newline at end of file diff --git a/docs/models/operations/GetMediaProvidersResponseBody.md b/docs/models/operations/GetMediaProvidersResponseBody.md deleted file mode 100644 index d8c793a8..00000000 --- a/docs/models/operations/GetMediaProvidersResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMediaProvidersResponseBody - -Media providers and their features - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetMediaProvidersMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenDirectory.md b/docs/models/operations/GetMetadataChildrenDirectory.md deleted file mode 100644 index 6b67e6b1..00000000 --- a/docs/models/operations/GetMetadataChildrenDirectory.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMetadataChildrenDirectory - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 16 | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | -| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | N/A | 16 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/30072/allLeaves | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | All episodes | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenMediaContainer.md b/docs/models/operations/GetMetadataChildrenMediaContainer.md deleted file mode 100644 index e2d88dcf..00000000 --- a/docs/models/operations/GetMetadataChildrenMediaContainer.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetMetadataChildrenMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 3 | -| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 | -| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | 30072 | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | N/A | TV Shows | -| `librarySectionUUID` | *Optional\* | :heavy_minus_sign: | N/A | 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd | -| `mediaTagPrefix` | *Optional\* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *Optional\* | :heavy_minus_sign: | N/A | 1701731894 | -| `nocache` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | N/A | Reacher | -| `parentYear` | *Optional\* | :heavy_minus_sign: | N/A | 2022 | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia. | -| `theme` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | -| `title1` | *Optional\* | :heavy_minus_sign: | N/A | TV Shows | -| `title2` | *Optional\* | :heavy_minus_sign: | N/A | Reacher | -| `viewGroup` | *Optional\* | :heavy_minus_sign: | N/A | season | -| `viewMode` | *Optional\* | :heavy_minus_sign: | N/A | 65593 | -| `directory` | List\<[GetMetadataChildrenDirectory](../../models/operations/GetMetadataChildrenDirectory.md)> | :heavy_minus_sign: | N/A | [
{
"leafCount": 16,
"thumb": "/library/metadata/30072/thumb/1705739923",
"viewedLeafCount": 16,
"key": "/library/metadata/30072/allLeaves",
"title": "All episodes"
}
] | -| `metadata` | List\<[GetMetadataChildrenMetadata](../../models/operations/GetMetadataChildrenMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenMetadata.md b/docs/models/operations/GetMetadataChildrenMetadata.md deleted file mode 100644 index fca6aa93..00000000 --- a/docs/models/operations/GetMetadataChildrenMetadata.md +++ /dev/null @@ -1,34 +0,0 @@ -# GetMetadataChildrenMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 66488 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66488/children | -| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | N/A | 30072 | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | plex://season/652aea6549508477c34c6000 | -| `parentGuid` | *Optional\* | :heavy_minus_sign: | N/A | plex://show/5d9c09190aaccd001f8f42f0 | -| `parentStudio` | *Optional\* | :heavy_minus_sign: | N/A | Amazon Studios | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | season | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Season 2 | -| `parentKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/30072 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | N/A | Reacher | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | Based on"Bad Luck and Trouble," when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind-revenge. | -| `index` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `viewCount` | *Optional\* | :heavy_minus_sign: | N/A | 11 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705646565 | -| `parentYear` | *Optional\* | :heavy_minus_sign: | N/A | 2022 | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/66488/thumb/1703065033 | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | -| `parentTheme` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 8 | -| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | N/A | 8 | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1702602021 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1703065033 | -| `userRating` | *Optional\* | :heavy_minus_sign: | N/A | 9 | -| `skipCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `lastRatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1703881224 | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenRequest.md b/docs/models/operations/GetMetadataChildrenRequest.md deleted file mode 100644 index 4a61c158..00000000 --- a/docs/models/operations/GetMetadataChildrenRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetMetadataChildrenRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ratingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. | -| `includeElements` | *Optional\* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)
| \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenResponse.md b/docs/models/operations/GetMetadataChildrenResponse.md deleted file mode 100644 index 7c4a3404..00000000 --- a/docs/models/operations/GetMetadataChildrenResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMetadataChildrenResponse - - -## 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/GetMetadataChildrenResponseBody.md) | :heavy_minus_sign: | The children of the library item. | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataChildrenResponseBody.md b/docs/models/operations/GetMetadataChildrenResponseBody.md deleted file mode 100644 index 31ed56d9..00000000 --- a/docs/models/operations/GetMetadataChildrenResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMetadataChildrenResponseBody - -The children of the library item. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetMetadataChildrenMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataHubsRequest.md b/docs/models/operations/GetMetadataHubsRequest.md new file mode 100644 index 00000000..69919259 --- /dev/null +++ b/docs/models/operations/GetMetadataHubsRequest.md @@ -0,0 +1,21 @@ +# GetMetadataHubsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `metadataId` | *long* | :heavy_check_mark: | The metadata ID for the hubs to fetch | | +| `count` | *Optional\* | :heavy_minus_sign: | Limit results to count items | | +| `onlyTransient` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataHubsResponse.md b/docs/models/operations/GetMetadataHubsResponse.md new file mode 100644 index 00000000..646a29e1 --- /dev/null +++ b/docs/models/operations/GetMetadataHubsResponse.md @@ -0,0 +1,12 @@ +# GetMetadataHubsResponse + + +## 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 | +| `mediaContainerWithHubs` | [Optional\](../../models/shared/MediaContainerWithHubs.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataItemRequest.md b/docs/models/operations/GetMetadataItemRequest.md new file mode 100644 index 00000000..eb7c661d --- /dev/null +++ b/docs/models/operations/GetMetadataItemRequest.md @@ -0,0 +1,27 @@ +# GetMetadataItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | List\<*String*> | :heavy_check_mark: | N/A | | +| `asyncCheckFiles` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Determines if file check should be performed asynchronously. An activity is created to indicate progress. Default is false. | 1 | +| `asyncRefreshLocalMediaAgent` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Determines if local media agent refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. | 1 | +| `asyncRefreshAnalysis` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Determines if analysis refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. | 1 | +| `checkFiles` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Determines if file check should be performed synchronously. Specifying `asyncCheckFiles` will cause this option to be ignored. Default is false. | 1 | +| `skipRefresh` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Determines if synchronous local media agent and analysis refresh should be skipped. Specifying async versions will cause synchronous versions to be skipped. Default is false. | 1 | +| `checkFileAvailability` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Determines if file existence check should be performed synchronously. Specifying `checkFiles` will imply this option. Default is false. | 1 | +| `asyncAugmentMetadata` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Add metadata augmentations. An activity is created to indicate progress. Option will be ignored if specified by non-admin or if multiple metadata items are requested. Default is false. | 1 | +| `augmentCount` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Number of augmentations to add. Requires `asyncAugmentMetadata` to be specified. | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetMetadataItemResponse.md b/docs/models/operations/GetMetadataItemResponse.md new file mode 100644 index 00000000..950a22d4 --- /dev/null +++ b/docs/models/operations/GetMetadataItemResponse.md @@ -0,0 +1,12 @@ +# GetMetadataItemResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetMyPlexAccountResponse.md b/docs/models/operations/GetMyPlexAccountResponse.md deleted file mode 100644 index c2303480..00000000 --- a/docs/models/operations/GetMyPlexAccountResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMyPlexAccountResponse - - -## 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/GetMyPlexAccountResponseBody.md) | :heavy_minus_sign: | MyPlex Account | \ No newline at end of file diff --git a/docs/models/operations/GetMyPlexAccountResponseBody.md b/docs/models/operations/GetMyPlexAccountResponseBody.md deleted file mode 100644 index fe778443..00000000 --- a/docs/models/operations/GetMyPlexAccountResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMyPlexAccountResponseBody - -MyPlex Account - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `myPlex` | [Optional\](../../models/operations/MyPlex.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetNotificationsRequest.md b/docs/models/operations/GetNotificationsRequest.md new file mode 100644 index 00000000..351aff3e --- /dev/null +++ b/docs/models/operations/GetNotificationsRequest.md @@ -0,0 +1,19 @@ +# GetNotificationsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `filter` | List\<*String*> | :heavy_minus_sign: | By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example:

- `filters=-log`: All event types except logs (the default).
- `filters=foo,bar`: Only the foo and bar event types.
- `filters=`: All events types.
- `filters=-foo,bar`: All event types except foo and bar.
| | \ No newline at end of file diff --git a/docs/models/operations/GetNotificationsResponse.md b/docs/models/operations/GetNotificationsResponse.md new file mode 100644 index 00000000..4a2be088 --- /dev/null +++ b/docs/models/operations/GetNotificationsResponse.md @@ -0,0 +1,11 @@ +# GetNotificationsResponse + + +## 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 | +| `responseStream` | *Optional\* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetPartIndexRequest.md b/docs/models/operations/GetPartIndexRequest.md new file mode 100644 index 00000000..a4433367 --- /dev/null +++ b/docs/models/operations/GetPartIndexRequest.md @@ -0,0 +1,21 @@ +# GetPartIndexRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `partId` | *long* | :heavy_check_mark: | The part id who's index is to be fetched | | +| `index` | [Index](../../models/operations/Index.md) | :heavy_check_mark: | The type of index to grab. | | +| `interval` | *Optional\* | :heavy_minus_sign: | The interval between images to return in ms. | | \ No newline at end of file diff --git a/docs/models/operations/GetPartIndexResponse.md b/docs/models/operations/GetPartIndexResponse.md new file mode 100644 index 00000000..c02e2e9c --- /dev/null +++ b/docs/models/operations/GetPartIndexResponse.md @@ -0,0 +1,11 @@ +# GetPartIndexResponse + + +## 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 | +| `responseStream` | *Optional\* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetPersonMediaContainer.md b/docs/models/operations/GetPersonMediaContainer.md new file mode 100644 index 00000000..09708d38 --- /dev/null +++ b/docs/models/operations/GetPersonMediaContainer.md @@ -0,0 +1,17 @@ +# GetPersonMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPersonRequest.md b/docs/models/operations/GetPersonRequest.md new file mode 100644 index 00000000..eb8f3ba2 --- /dev/null +++ b/docs/models/operations/GetPersonRequest.md @@ -0,0 +1,19 @@ +# GetPersonRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `personId` | *String* | :heavy_check_mark: | Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor | | \ No newline at end of file diff --git a/docs/models/operations/GetPersonResponse.md b/docs/models/operations/GetPersonResponse.md new file mode 100644 index 00000000..5ef9acac --- /dev/null +++ b/docs/models/operations/GetPersonResponse.md @@ -0,0 +1,11 @@ +# GetPersonResponse + + +## 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/GetPersonResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetPersonResponseBody.md b/docs/models/operations/GetPersonResponseBody.md new file mode 100644 index 00000000..d0b10bfc --- /dev/null +++ b/docs/models/operations/GetPersonResponseBody.md @@ -0,0 +1,10 @@ +# GetPersonResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetPersonMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPinAuthPinContainer.md b/docs/models/operations/GetPinAuthPinContainer.md deleted file mode 100644 index f0e71efb..00000000 --- a/docs/models/operations/GetPinAuthPinContainer.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPinAuthPinContainer - -Requests a new pin id used in the authentication flow - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | N/A | 308667304 | -| `code` | *String* | :heavy_check_mark: | N/A | 7RQZ | -| `product` | *String* | :heavy_check_mark: | N/A | Tautulli | -| `trusted` | *Optional\* | :heavy_minus_sign: | N/A | | -| `qr` | *String* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ | -| `clientIdentifier` | *String* | :heavy_check_mark: | The X-Client-Identifier used in the request | Tautulli | -| `location` | [GeoData](../../models/operations/GeoData.md) | :heavy_check_mark: | Geo location data | {
"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` | *Optional\* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z | -| `expiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z | -| `authToken` | *JsonNullable\* | :heavy_minus_sign: | N/A | gcgzw5rz2xovp84b4vha3a40 | -| `newRegistration` | *JsonNullable\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetPinRequest.md b/docs/models/operations/GetPinRequest.md deleted file mode 100644 index 7dcd179f..00000000 --- a/docs/models/operations/GetPinRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetPinRequest - - -## 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`
| | -| `clientID` | *String* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `clientName` | *Optional\* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | -| `deviceNickname` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | -| `clientVersion` | *Optional\* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | -| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client application. | Roku | \ No newline at end of file diff --git a/docs/models/operations/GetPinResponse.md b/docs/models/operations/GetPinResponse.md deleted file mode 100644 index 2b7a60bc..00000000 --- a/docs/models/operations/GetPinResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPinResponse - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | | -| `authPinContainer` | [Optional\](../../models/operations/GetPinAuthPinContainer.md) | :heavy_minus_sign: | Requests a new pin id used in the authentication flow | {
"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
} | \ No newline at end of file diff --git a/docs/models/operations/GetPlayQueueRequest.md b/docs/models/operations/GetPlayQueueRequest.md new file mode 100644 index 00000000..f7a03c31 --- /dev/null +++ b/docs/models/operations/GetPlayQueueRequest.md @@ -0,0 +1,24 @@ +# GetPlayQueueRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *long* | :heavy_check_mark: | The ID of the play queue. | | +| `own` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | If the server should transfer ownership to the requesting client (used in remote control scenarios). | 1 | +| `center` | *Optional\* | :heavy_minus_sign: | The play queue item ID for the center of the window - this doesn't change the current selected item. | | +| `window` | *Optional\* | :heavy_minus_sign: | How many items on each side of the center of the window | | +| `includeBefore` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether to include the items before the center (if 0, center is not included either), defaults to 1. | 1 | +| `includeAfter` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether to include the items after the center (if 0, center is not included either), defaults to 1. | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetPlayQueueResponse.md b/docs/models/operations/GetPlayQueueResponse.md new file mode 100644 index 00000000..54bc71c0 --- /dev/null +++ b/docs/models/operations/GetPlayQueueResponse.md @@ -0,0 +1,11 @@ +# GetPlayQueueResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsCountry.md b/docs/models/operations/GetPlaylistContentsCountry.md deleted file mode 100644 index 1cb43809..00000000 --- a/docs/models/operations/GetPlaylistContentsCountry.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetPlaylistContentsCountry - - -## 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/GetPlaylistContentsDirector.md b/docs/models/operations/GetPlaylistContentsDirector.md deleted file mode 100644 index 8dceadf7..00000000 --- a/docs/models/operations/GetPlaylistContentsDirector.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetPlaylistContentsDirector - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Joss Whedon | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsGenre.md b/docs/models/operations/GetPlaylistContentsGenre.md deleted file mode 100644 index b5950adc..00000000 --- a/docs/models/operations/GetPlaylistContentsGenre.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetPlaylistContentsGenre - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Action | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsMedia.md b/docs/models/operations/GetPlaylistContentsMedia.md deleted file mode 100644 index f33598ac..00000000 --- a/docs/models/operations/GetPlaylistContentsMedia.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetPlaylistContentsMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 15 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 141416 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 2273 | -| `width` | *Optional\* | :heavy_minus_sign: | N/A | 1920 | -| `height` | *Optional\* | :heavy_minus_sign: | N/A | 814 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | N/A | 2.35 | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | N/A | aac | -| `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 | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | lc | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | high | -| `part` | List\<[GetPlaylistContentsPart](../../models/operations/GetPlaylistContentsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsMediaContainer.md b/docs/models/operations/GetPlaylistContentsMediaContainer.md deleted file mode 100644 index 97a24f58..00000000 --- a/docs/models/operations/GetPlaylistContentsMediaContainer.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetPlaylistContentsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `composite` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717521 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 282 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `playlistType` | *Optional\* | :heavy_minus_sign: | N/A | video | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 95 | -| `smart` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Smart Movie Playlist | -| `metadata` | List\<[GetPlaylistContentsMetadata](../../models/operations/GetPlaylistContentsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsMetadata.md b/docs/models/operations/GetPlaylistContentsMetadata.md deleted file mode 100644 index 4c151d6b..00000000 --- a/docs/models/operations/GetPlaylistContentsMetadata.md +++ /dev/null @@ -1,39 +0,0 @@ -# GetPlaylistContentsMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 17 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/17 | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | -| `studio` | *Optional\* | :heavy_minus_sign: | N/A | Universal Pictures | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | movie | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Serenity | -| `titleSort` | *Optional\* | :heavy_minus_sign: | N/A | Amazing Spider-Man 2 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `contentRating` | *Optional\* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | -| `rating` | *Optional\* | :heavy_minus_sign: | N/A | 8.2 | -| `audienceRating` | *Optional\* | :heavy_minus_sign: | N/A | 9.1 | -| `year` | *Optional\* | :heavy_minus_sign: | N/A | 2005 | -| `tagline` | *Optional\* | :heavy_minus_sign: | N/A | They aim to misbehave. | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 141416 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705637164 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705637165 | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `hasPremiumExtras` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `hasPremiumPrimaryExtra` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `media` | List\<[GetPlaylistContentsMedia](../../models/operations/GetPlaylistContentsMedia.md)> | :heavy_minus_sign: | N/A | | -| `genre` | List\<[GetPlaylistContentsGenre](../../models/operations/GetPlaylistContentsGenre.md)> | :heavy_minus_sign: | N/A | | -| `country` | List\<[GetPlaylistContentsCountry](../../models/operations/GetPlaylistContentsCountry.md)> | :heavy_minus_sign: | N/A | | -| `director` | List\<[GetPlaylistContentsDirector](../../models/operations/GetPlaylistContentsDirector.md)> | :heavy_minus_sign: | N/A | | -| `writer` | List\<[GetPlaylistContentsWriter](../../models/operations/GetPlaylistContentsWriter.md)> | :heavy_minus_sign: | N/A | | -| `role` | List\<[GetPlaylistContentsRole](../../models/operations/GetPlaylistContentsRole.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsPart.md b/docs/models/operations/GetPlaylistContentsPart.md deleted file mode 100644 index 402976af..00000000 --- a/docs/models/operations/GetPlaylistContentsPart.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetPlaylistContentsPart - - -## 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 | 141416 | -| `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 | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsQueryParamType.md b/docs/models/operations/GetPlaylistContentsQueryParamType.md deleted file mode 100644 index fc52d53c..00000000 --- a/docs/models/operations/GetPlaylistContentsQueryParamType.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetPlaylistContentsQueryParamType - -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsRequest.md b/docs/models/operations/GetPlaylistContentsRequest.md deleted file mode 100644 index f5876a9a..00000000 --- a/docs/models/operations/GetPlaylistContentsRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetPlaylistContentsRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | | -| `type` | [GetPlaylistContentsQueryParamType](../../models/operations/GetPlaylistContentsQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsResponse.md b/docs/models/operations/GetPlaylistContentsResponse.md deleted file mode 100644 index 4f3ca46c..00000000 --- a/docs/models/operations/GetPlaylistContentsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPlaylistContentsResponse - - -## 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/GetPlaylistContentsResponseBody.md) | :heavy_minus_sign: | The playlist contents | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsResponseBody.md b/docs/models/operations/GetPlaylistContentsResponseBody.md deleted file mode 100644 index 02148dd1..00000000 --- a/docs/models/operations/GetPlaylistContentsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistContentsResponseBody - -The playlist contents - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetPlaylistContentsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsRole.md b/docs/models/operations/GetPlaylistContentsRole.md deleted file mode 100644 index fc0f19af..00000000 --- a/docs/models/operations/GetPlaylistContentsRole.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetPlaylistContentsRole - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Gina Torres | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistContentsWriter.md b/docs/models/operations/GetPlaylistContentsWriter.md deleted file mode 100644 index 90a43401..00000000 --- a/docs/models/operations/GetPlaylistContentsWriter.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetPlaylistContentsWriter - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Joss Whedon | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorDevice.md b/docs/models/operations/GetPlaylistGeneratorDevice.md new file mode 100644 index 00000000..e00ca2a8 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorDevice.md @@ -0,0 +1,8 @@ +# GetPlaylistGeneratorDevice + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `profile` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorItemsMediaContainer.md b/docs/models/operations/GetPlaylistGeneratorItemsMediaContainer.md new file mode 100644 index 00000000..346222e1 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorItemsMediaContainer.md @@ -0,0 +1,17 @@ +# GetPlaylistGeneratorItemsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | [Optional\](../../models/operations/GetPlaylistGeneratorItemsMetadata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorItemsMetadata.md b/docs/models/operations/GetPlaylistGeneratorItemsMetadata.md new file mode 100644 index 00000000..758657b2 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorItemsMetadata.md @@ -0,0 +1,84 @@ +# GetPlaylistGeneratorItemsMetadata + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *Optional\* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *Optional\* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *Optional\* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *Optional\* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `banner` | *Optional\* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *Optional\* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *Optional\* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *Optional\* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `director` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `duration` | *Optional\* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | List\<[Filter](../../models/shared/Filter.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `hero` | *Optional\* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | List\<[Image](../../models/shared/Image.md)> | :heavy_minus_sign: | N/A | +| `index` | *Optional\* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *Optional\* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | List\<[Media](../../models/shared/Media.md)> | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *Optional\* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *Optional\* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *Optional\* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *Optional\* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *Optional\* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `ratingCount` | *Optional\* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *Optional\* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `search` | *Optional\* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *Optional\* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *Optional\* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *Optional\* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | List\<[Sort](../../models/shared/Sort.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *Optional\* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *Optional\* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *Optional\* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *Optional\* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *Optional\* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *Optional\* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *Optional\* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *Optional\* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *Optional\* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *Optional\* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `year` | *Optional\* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `processingState` | [Optional\](../../models/operations/ProcessingState.md) | :heavy_minus_sign: | The state of processing if this generator is part of an optimizer playlist | +| `processingStateContext` | [Optional\](../../models/operations/ProcessingStateContext.md) | :heavy_minus_sign: | The error which could have occurred (or `good`) | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorItemsRequest.md b/docs/models/operations/GetPlaylistGeneratorItemsRequest.md new file mode 100644 index 00000000..0b69b367 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorItemsRequest.md @@ -0,0 +1,20 @@ +# GetPlaylistGeneratorItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | +| `generatorId` | *long* | :heavy_check_mark: | The generator item ID to delete. | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorItemsResponse.md b/docs/models/operations/GetPlaylistGeneratorItemsResponse.md new file mode 100644 index 00000000..267eb704 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorItemsResponse.md @@ -0,0 +1,11 @@ +# GetPlaylistGeneratorItemsResponse + + +## 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/GetPlaylistGeneratorItemsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorItemsResponseBody.md b/docs/models/operations/GetPlaylistGeneratorItemsResponseBody.md new file mode 100644 index 00000000..590e8a6f --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorItemsResponseBody.md @@ -0,0 +1,10 @@ +# GetPlaylistGeneratorItemsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/GetPlaylistGeneratorItemsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorLocation.md b/docs/models/operations/GetPlaylistGeneratorLocation.md new file mode 100644 index 00000000..1d5296d6 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorLocation.md @@ -0,0 +1,9 @@ +# GetPlaylistGeneratorLocation + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | +| `uri` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorMediaContainer.md b/docs/models/operations/GetPlaylistGeneratorMediaContainer.md new file mode 100644 index 00000000..a96ae078 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorMediaContainer.md @@ -0,0 +1,17 @@ +# GetPlaylistGeneratorMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `item` | List\<[Item](../../models/operations/Item.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorRequest.md b/docs/models/operations/GetPlaylistGeneratorRequest.md new file mode 100644 index 00000000..d73e19af --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorRequest.md @@ -0,0 +1,20 @@ +# GetPlaylistGeneratorRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | +| `generatorId` | *long* | :heavy_check_mark: | The generator item ID to delete. | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorResponse.md b/docs/models/operations/GetPlaylistGeneratorResponse.md new file mode 100644 index 00000000..e27b1b7b --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorResponse.md @@ -0,0 +1,11 @@ +# GetPlaylistGeneratorResponse + + +## 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/GetPlaylistGeneratorResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorResponseBody.md b/docs/models/operations/GetPlaylistGeneratorResponseBody.md new file mode 100644 index 00000000..a078d9a1 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorResponseBody.md @@ -0,0 +1,10 @@ +# GetPlaylistGeneratorResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetPlaylistGeneratorMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorScope.md b/docs/models/operations/GetPlaylistGeneratorScope.md new file mode 100644 index 00000000..cf338e9e --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorScope.md @@ -0,0 +1,9 @@ +# GetPlaylistGeneratorScope + + +## Values + +| Name | Value | +| ------- | ------- | +| `ALL` | all | +| `COUNT` | count | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorState.md b/docs/models/operations/GetPlaylistGeneratorState.md new file mode 100644 index 00000000..374ddd98 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorState.md @@ -0,0 +1,10 @@ +# GetPlaylistGeneratorState + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PENDING` | pending | +| `COMPLETE` | complete | +| `FAILED` | failed | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorStatus.md b/docs/models/operations/GetPlaylistGeneratorStatus.md new file mode 100644 index 00000000..1a61fc2d --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorStatus.md @@ -0,0 +1,12 @@ +# GetPlaylistGeneratorStatus + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `itemsCompleteCount` | *Optional\* | :heavy_minus_sign: | N/A | +| `itemsCount` | *Optional\* | :heavy_minus_sign: | N/A | +| `itemsSuccessfulCount` | *Optional\* | :heavy_minus_sign: | N/A | +| `state` | [Optional\](../../models/operations/GetPlaylistGeneratorState.md) | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorSubtitles.md b/docs/models/operations/GetPlaylistGeneratorSubtitles.md new file mode 100644 index 00000000..eea04304 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorSubtitles.md @@ -0,0 +1,13 @@ +# GetPlaylistGeneratorSubtitles + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `AUTO` | auto | +| `BURN` | burn | +| `NONE` | none | +| `SIDECAR` | sidecar | +| `EMBEDDED` | embedded | +| `SEGMENTED` | segmented | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorType.md b/docs/models/operations/GetPlaylistGeneratorType.md new file mode 100644 index 00000000..ab0011c3 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorType.md @@ -0,0 +1,11 @@ +# GetPlaylistGeneratorType + +The type of this generator + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `MINUS1` | -1 | +| `FORTY_TWO` | 42 | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorsMediaContainer.md b/docs/models/operations/GetPlaylistGeneratorsMediaContainer.md new file mode 100644 index 00000000..1ab3a8f7 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorsMediaContainer.md @@ -0,0 +1,17 @@ +# GetPlaylistGeneratorsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `playQueueGenerator` | List\<[PlayQueueGenerator](../../models/operations/PlayQueueGenerator.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorsRequest.md b/docs/models/operations/GetPlaylistGeneratorsRequest.md new file mode 100644 index 00000000..9d3bcf68 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorsRequest.md @@ -0,0 +1,19 @@ +# GetPlaylistGeneratorsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorsResponse.md b/docs/models/operations/GetPlaylistGeneratorsResponse.md new file mode 100644 index 00000000..e3c029c5 --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorsResponse.md @@ -0,0 +1,11 @@ +# GetPlaylistGeneratorsResponse + + +## 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/GetPlaylistGeneratorsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorsResponseBody.md b/docs/models/operations/GetPlaylistGeneratorsResponseBody.md new file mode 100644 index 00000000..6f64a2bc --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorsResponseBody.md @@ -0,0 +1,10 @@ +# GetPlaylistGeneratorsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetPlaylistGeneratorsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistGeneratorsType.md b/docs/models/operations/GetPlaylistGeneratorsType.md new file mode 100644 index 00000000..c6dd4cbc --- /dev/null +++ b/docs/models/operations/GetPlaylistGeneratorsType.md @@ -0,0 +1,15 @@ +# GetPlaylistGeneratorsType + +The type of playlist generator. + + - -1: A smart playlist generator + - 42: A optimized version generator + + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `MINUS1` | -1 | +| `FORTY_TWO` | 42 | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistItemsRequest.md b/docs/models/operations/GetPlaylistItemsRequest.md new file mode 100644 index 00000000..b6c04d20 --- /dev/null +++ b/docs/models/operations/GetPlaylistItemsRequest.md @@ -0,0 +1,20 @@ +# GetPlaylistItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | +| `type` | List\<*long*> | :heavy_minus_sign: | The metadata types of the item to return. Values past the first are only used in fetching items from the background processing playlist. | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistItemsResponse.md b/docs/models/operations/GetPlaylistItemsResponse.md new file mode 100644 index 00000000..a1c37093 --- /dev/null +++ b/docs/models/operations/GetPlaylistItemsResponse.md @@ -0,0 +1,12 @@ +# GetPlaylistItemsResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistMediaContainer.md b/docs/models/operations/GetPlaylistMediaContainer.md deleted file mode 100644 index 341b906e..00000000 --- a/docs/models/operations/GetPlaylistMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetPlaylistMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `metadata` | List\<[GetPlaylistMetadata](../../models/operations/GetPlaylistMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistMetadata.md b/docs/models/operations/GetPlaylistMetadata.md deleted file mode 100644 index 3f43586d..00000000 --- a/docs/models/operations/GetPlaylistMetadata.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetPlaylistMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `content` | *Optional\* | :heavy_minus_sign: | N/A | library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1 | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 95 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/95/items | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91 | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | playlist | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Smart Movie Playlist | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | | -| `smart` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `playlistType` | *Optional\* | :heavy_minus_sign: | N/A | video | -| `composite` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717387 | -| `icon` | *Optional\* | :heavy_minus_sign: | N/A | playlist://image.smart | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 282000 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705716493 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705717387 | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistRequest.md b/docs/models/operations/GetPlaylistRequest.md index 93aa49c2..b3503496 100644 --- a/docs/models/operations/GetPlaylistRequest.md +++ b/docs/models/operations/GetPlaylistRequest.md @@ -3,6 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistResponse.md b/docs/models/operations/GetPlaylistResponse.md index 6941451b..7b1d59ae 100644 --- a/docs/models/operations/GetPlaylistResponse.md +++ b/docs/models/operations/GetPlaylistResponse.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/GetPlaylistResponseBody.md) | :heavy_minus_sign: | The playlist | \ No newline at end of file +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistResponseBody.md b/docs/models/operations/GetPlaylistResponseBody.md deleted file mode 100644 index 34130a2d..00000000 --- a/docs/models/operations/GetPlaylistResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistResponseBody - -The playlist - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetPlaylistMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsMediaContainer.md b/docs/models/operations/GetPlaylistsMediaContainer.md deleted file mode 100644 index 4aeb7519..00000000 --- a/docs/models/operations/GetPlaylistsMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetPlaylistsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 4 | -| `metadata` | List\<[GetPlaylistsMetadata](../../models/operations/GetPlaylistsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsMetadata.md b/docs/models/operations/GetPlaylistsMetadata.md deleted file mode 100644 index 2be63147..00000000 --- a/docs/models/operations/GetPlaylistsMetadata.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetPlaylistsMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 92 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/92/items | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903 | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | playlist | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Static Playlist | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | A Great Playlist | -| `smart` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `playlistType` | *Optional\* | :heavy_minus_sign: | N/A | video | -| `composite` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/92/composite/1705716440 | -| `icon` | *Optional\* | :heavy_minus_sign: | N/A | playlist://image.smart | -| `viewCount` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705716298 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 7328000 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 32 | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705716298 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705716440 | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsRequest.md b/docs/models/operations/GetPlaylistsRequest.md deleted file mode 100644 index 0cfcea56..00000000 --- a/docs/models/operations/GetPlaylistsRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetPlaylistsRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `playlistType` | [Optional\](../../models/operations/PlaylistType.md) | :heavy_minus_sign: | limit to a type of playlist. | -| `smart` | [Optional\](../../models/operations/QueryParamSmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsResponse.md b/docs/models/operations/GetPlaylistsResponse.md deleted file mode 100644 index 58683a75..00000000 --- a/docs/models/operations/GetPlaylistsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPlaylistsResponse - - -## 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/GetPlaylistsResponseBody.md) | :heavy_minus_sign: | returns all playlists | \ No newline at end of file diff --git a/docs/models/operations/GetPlaylistsResponseBody.md b/docs/models/operations/GetPlaylistsResponseBody.md deleted file mode 100644 index c7e2475f..00000000 --- a/docs/models/operations/GetPlaylistsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistsResponseBody - -returns all playlists - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetPlaylistsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPostplayHubsRequest.md b/docs/models/operations/GetPostplayHubsRequest.md new file mode 100644 index 00000000..c8576154 --- /dev/null +++ b/docs/models/operations/GetPostplayHubsRequest.md @@ -0,0 +1,21 @@ +# GetPostplayHubsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `metadataId` | *long* | :heavy_check_mark: | The metadata ID for the hubs to fetch | | +| `count` | *Optional\* | :heavy_minus_sign: | Limit results to count items | | +| `onlyTransient` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetPostplayHubsResponse.md b/docs/models/operations/GetPostplayHubsResponse.md new file mode 100644 index 00000000..923239c3 --- /dev/null +++ b/docs/models/operations/GetPostplayHubsResponse.md @@ -0,0 +1,12 @@ +# GetPostplayHubsResponse + + +## 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 | +| `mediaContainerWithHubs` | [Optional\](../../models/shared/MediaContainerWithHubs.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPreferenceRequest.md b/docs/models/operations/GetPreferenceRequest.md new file mode 100644 index 00000000..eedb7c12 --- /dev/null +++ b/docs/models/operations/GetPreferenceRequest.md @@ -0,0 +1,19 @@ +# GetPreferenceRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `id` | *Optional\* | :heavy_minus_sign: | The preference to fetch | | \ No newline at end of file diff --git a/docs/models/operations/GetPreferenceResponse.md b/docs/models/operations/GetPreferenceResponse.md new file mode 100644 index 00000000..f56056e0 --- /dev/null +++ b/docs/models/operations/GetPreferenceResponse.md @@ -0,0 +1,11 @@ +# GetPreferenceResponse + + +## 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 | +| `mediaContainerWithSettings` | [Optional\](../../models/shared/MediaContainerWithSettings.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetPromotedHubsMediaContainer.md b/docs/models/operations/GetPromotedHubsMediaContainer.md new file mode 100644 index 00000000..8679b4dc --- /dev/null +++ b/docs/models/operations/GetPromotedHubsMediaContainer.md @@ -0,0 +1,17 @@ +# GetPromotedHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | List\<[Hub](../../models/shared/Hub.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPromotedHubsRequest.md b/docs/models/operations/GetPromotedHubsRequest.md new file mode 100644 index 00000000..e0cd506d --- /dev/null +++ b/docs/models/operations/GetPromotedHubsRequest.md @@ -0,0 +1,19 @@ +# GetPromotedHubsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `count` | *Optional\* | :heavy_minus_sign: | Limit results to count items | | \ No newline at end of file diff --git a/docs/models/operations/GetPromotedHubsResponse.md b/docs/models/operations/GetPromotedHubsResponse.md new file mode 100644 index 00000000..0a42c615 --- /dev/null +++ b/docs/models/operations/GetPromotedHubsResponse.md @@ -0,0 +1,12 @@ +# GetPromotedHubsResponse + + +## 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/GetPromotedHubsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPromotedHubsResponseBody.md b/docs/models/operations/GetPromotedHubsResponseBody.md new file mode 100644 index 00000000..238b20e8 --- /dev/null +++ b/docs/models/operations/GetPromotedHubsResponseBody.md @@ -0,0 +1,10 @@ +# GetPromotedHubsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetPromotedHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetRandomArtworkRequest.md b/docs/models/operations/GetRandomArtworkRequest.md new file mode 100644 index 00000000..15e81c1e --- /dev/null +++ b/docs/models/operations/GetRandomArtworkRequest.md @@ -0,0 +1,19 @@ +# GetRandomArtworkRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sections` | List\<*long*> | :heavy_minus_sign: | The sections for which to fetch artwork. | [
5,
6
] | \ No newline at end of file diff --git a/docs/models/operations/GetRandomArtworkResponse.md b/docs/models/operations/GetRandomArtworkResponse.md new file mode 100644 index 00000000..f46cb3f7 --- /dev/null +++ b/docs/models/operations/GetRandomArtworkResponse.md @@ -0,0 +1,11 @@ +# GetRandomArtworkResponse + + +## 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 | +| `mediaContainerWithArtwork` | [Optional\](../../models/shared/MediaContainerWithArtwork.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedActiveDirection.md b/docs/models/operations/GetRecentlyAddedActiveDirection.md deleted file mode 100644 index a0fa724f..00000000 --- a/docs/models/operations/GetRecentlyAddedActiveDirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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 deleted file mode 100644 index b7422fa4..00000000 --- a/docs/models/operations/GetRecentlyAddedDefaultDirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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 deleted file mode 100644 index 6a413a88..00000000 --- a/docs/models/operations/GetRecentlyAddedField.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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 deleted file mode 100644 index 03997388..00000000 --- a/docs/models/operations/GetRecentlyAddedFieldType.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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 deleted file mode 100644 index cf95f1c3..00000000 --- a/docs/models/operations/GetRecentlyAddedFilter.md +++ /dev/null @@ -1,13 +0,0 @@ -# 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 | -| `advanced` | *Optional\* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedHubsResponseType.md b/docs/models/operations/GetRecentlyAddedHubsResponseType.md deleted file mode 100644 index eb8cad3e..00000000 --- a/docs/models/operations/GetRecentlyAddedHubsResponseType.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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 deleted file mode 100644 index 4d903e95..00000000 --- a/docs/models/operations/GetRecentlyAddedHubsType.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetRecentlyAddedHubsType - -The type of media content in the Plex library. This can represent videos, music, or photos. - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedImage.md b/docs/models/operations/GetRecentlyAddedImage.md deleted file mode 100644 index 56656cb9..00000000 --- a/docs/models/operations/GetRecentlyAddedImage.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index 1b099464..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryCountry.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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 deleted file mode 100644 index d6f40e94..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryDirector.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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 deleted file mode 100644 index 2e32a3d3..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryFilter.md +++ /dev/null @@ -1,13 +0,0 @@ -# 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 | -| `advanced` | *Optional\* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryGenre.md b/docs/models/operations/GetRecentlyAddedLibraryGenre.md deleted file mode 100644 index 83a5797d..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryGenre.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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 deleted file mode 100644 index feb86914..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryMedia.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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 deleted file mode 100644 index a5785ab6..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryMediaContainer.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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 deleted file mode 100644 index ae31df2d..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryMetadata.md +++ /dev/null @@ -1,39 +0,0 @@ -# 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 deleted file mode 100644 index 9ea88248..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryPart.md +++ /dev/null @@ -1,17 +0,0 @@ -# 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 deleted file mode 100644 index 852659d2..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# 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 or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 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 deleted file mode 100644 index 0e7342e4..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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 deleted file mode 100644 index 2c379be5..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index 4a1d683b..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryRole.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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 deleted file mode 100644 index c5cbbe4f..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryType.md +++ /dev/null @@ -1,15 +0,0 @@ -# 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 | filter | -| `subtype` | *Optional\* | :heavy_minus_sign: | N/A | clip | -| `title` | *String* | :heavy_check_mark: | N/A | TV Shows | -| `active` | *boolean* | :heavy_check_mark: | N/A | false | -| `filter` | List\<[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 deleted file mode 100644 index c1ee26d2..00000000 --- a/docs/models/operations/GetRecentlyAddedLibraryWriter.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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 deleted file mode 100644 index f2a779b0..00000000 --- a/docs/models/operations/GetRecentlyAddedMediaContainer.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetRecentlyAddedMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `totalSize` | *int* | :heavy_check_mark: | Total number of media items in the library. | 50 | -| `offset` | *long* | :heavy_check_mark: | Offset value for pagination. | 0 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `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: | An array of metadata items. | | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedMetadata.md b/docs/models/operations/GetRecentlyAddedMetadata.md deleted file mode 100644 index 0e19fc73..00000000 --- a/docs/models/operations/GetRecentlyAddedMetadata.md +++ /dev/null @@ -1,85 +0,0 @@ -# GetRecentlyAddedMetadata - -Unknown - - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | -| `art` | *String* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | -| `audienceRating` | *double* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | -| `chapterSource` | *Optional\* | :heavy_minus_sign: | The source from which chapter data is derived. | media | -| `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | -| `contentRating` | *Optional\* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | -| `createdAtAccuracy` | *Optional\* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | -| `createdAtTZOffset` | *Optional\* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | -| `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | -| `grandparentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | -| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | -| `grandparentSlug` | *Optional\* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | -| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | -| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | -| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | -| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | -| `index` | *int* | :heavy_check_mark: | The index position of the media item. | 1 | -| `key` | *String* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | -| `lastRatedAt` | *Optional\* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The identifier for the library section. | 1 | -| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | Movies | -| `originalTitle` | *Optional\* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | -| `parentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | The index position of the parent media item. | 1 | -| `parentKey` | *Optional\* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | -| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | -| `parentSlug` | *Optional\* | :heavy_minus_sign: | The slug for the parent media item. | alice-in-borderland-2020 | -| `parentStudio` | *String* | :heavy_check_mark: | The studio of the parent media item. | UCP | -| `parentTheme` | *String* | :heavy_check_mark: | The theme URL for the parent media item. | /library/metadata/66/theme/1705716261 | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | The title of the parent media item. | Caprica | -| `parentYear` | *Optional\* | :heavy_minus_sign: | The release year of the parent media item. | 2010 | -| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | -| `ratingKey` | *String* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | -| `rating` | *float* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | -| `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | -| `skipCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | -| `slug` | *String* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | -| `studio` | *Optional\* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `subtype` | *Optional\* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | -| `summary` | *String* | :heavy_check_mark: | A synopsis of the media item. | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.
Once a familiar threat returns to finish what was previously started, Jake must
work with Neytiri and the army of the Na'vi race to protect their home.
| -| `tagline` | *String* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | -| `theme` | *String* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | -| `thumb` | *String* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | -| `titleSort` | *String* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | -| `title` | *String* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | -| `type` | [GetRecentlyAddedHubsType](../../models/operations/GetRecentlyAddedHubsType.md) | :heavy_check_mark: | N/A | movie | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `userRating` | *Optional\* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `viewCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | -| `viewOffset` | *Optional\* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | -| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | -| `year` | *Optional\* | :heavy_minus_sign: | The release year of the media item. | 2022 | -| `image` | List\<[GetRecentlyAddedImage](../../models/operations/GetRecentlyAddedImage.md)> | :heavy_minus_sign: | N/A | | -| `ultraBlurColors` | [Optional\](../../models/operations/UltraBlurColors.md) | :heavy_minus_sign: | N/A | | -| `guids` | List\<[Guids](../../models/operations/Guids.md)> | :heavy_minus_sign: | N/A | | -| `media` | List\<[Media](../../models/operations/Media.md)> | :heavy_minus_sign: | N/A | | -| `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 | | -| `role` | List\<[Role](../../models/operations/Role.md)> | :heavy_minus_sign: | N/A | | -| `producer` | List\<[Producer](../../models/operations/Producer.md)> | :heavy_minus_sign: | N/A | | -| `rating1` | List\<[Rating](../../models/operations/Rating.md)> | :heavy_minus_sign: | N/A | | -| `similar` | List\<[Similar](../../models/operations/Similar.md)> | :heavy_minus_sign: | N/A | | -| `location` | List\<[Location](../../models/operations/Location.md)> | :heavy_minus_sign: | N/A | | -| `collection` | List\<[Collection](../../models/operations/Collection.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedOperator.md b/docs/models/operations/GetRecentlyAddedOperator.md deleted file mode 100644 index d26a9e64..00000000 --- a/docs/models/operations/GetRecentlyAddedOperator.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/GetRecentlyAddedOptimizedForStreaming.md b/docs/models/operations/GetRecentlyAddedOptimizedForStreaming.md deleted file mode 100644 index d9b438a0..00000000 --- a/docs/models/operations/GetRecentlyAddedOptimizedForStreaming.md +++ /dev/null @@ -1,4 +0,0 @@ -# GetRecentlyAddedOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - diff --git a/docs/models/operations/GetRecentlyAddedOptimizedForStreaming1.md b/docs/models/operations/GetRecentlyAddedOptimizedForStreaming1.md deleted file mode 100644 index 0f8e9535..00000000 --- a/docs/models/operations/GetRecentlyAddedOptimizedForStreaming1.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetRecentlyAddedOptimizedForStreaming1 - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedRequest.md b/docs/models/operations/GetRecentlyAddedRequest.md deleted file mode 100644 index 93ee1e64..00000000 --- a/docs/models/operations/GetRecentlyAddedRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetRecentlyAddedRequest - - -## Fields - -| 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 or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 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 deleted file mode 100644 index 73c9649d..00000000 --- a/docs/models/operations/GetRecentlyAddedResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetRecentlyAddedResponse - - -## 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/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 deleted file mode 100644 index 3b718806..00000000 --- a/docs/models/operations/GetRecentlyAddedResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetRecentlyAddedResponseBody - -A successful response with recently added content. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetRecentlyAddedMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedSort.md b/docs/models/operations/GetRecentlyAddedSort.md deleted file mode 100644 index 9fd46896..00000000 --- a/docs/models/operations/GetRecentlyAddedSort.md +++ /dev/null @@ -1,15 +0,0 @@ -# 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 deleted file mode 100644 index 37ad1719..00000000 --- a/docs/models/operations/GetRecentlyAddedType.md +++ /dev/null @@ -1,15 +0,0 @@ -# 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 | filter | -| `subtype` | *Optional\* | :heavy_minus_sign: | N/A | clip | -| `title` | *String* | :heavy_check_mark: | N/A | TV Shows | -| `active` | *boolean* | :heavy_check_mark: | N/A | false | -| `filter` | List\<[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/GetRefreshLibraryMetadataRequest.md b/docs/models/operations/GetRefreshLibraryMetadataRequest.md deleted file mode 100644 index 243fcfeb..00000000 --- a/docs/models/operations/GetRefreshLibraryMetadataRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetRefreshLibraryMetadataRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `force` | [Optional\](../../models/operations/Force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | -| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file diff --git a/docs/models/operations/GetRefreshLibraryMetadataResponse.md b/docs/models/operations/GetRefreshLibraryMetadataResponse.md deleted file mode 100644 index d1286023..00000000 --- a/docs/models/operations/GetRefreshLibraryMetadataResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetRefreshLibraryMetadataResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetRelatedHubsRequest.md b/docs/models/operations/GetRelatedHubsRequest.md new file mode 100644 index 00000000..7edb77ba --- /dev/null +++ b/docs/models/operations/GetRelatedHubsRequest.md @@ -0,0 +1,21 @@ +# GetRelatedHubsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `metadataId` | *long* | :heavy_check_mark: | The metadata ID for the hubs to fetch | | +| `count` | *Optional\* | :heavy_minus_sign: | Limit results to count items | | +| `onlyTransient` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetRelatedHubsResponse.md b/docs/models/operations/GetRelatedHubsResponse.md new file mode 100644 index 00000000..b70018ab --- /dev/null +++ b/docs/models/operations/GetRelatedHubsResponse.md @@ -0,0 +1,12 @@ +# GetRelatedHubsResponse + + +## 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 | +| `mediaContainerWithHubs` | [Optional\](../../models/shared/MediaContainerWithHubs.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetRelatedItemsMediaContainer.md b/docs/models/operations/GetRelatedItemsMediaContainer.md new file mode 100644 index 00000000..857d1103 --- /dev/null +++ b/docs/models/operations/GetRelatedItemsMediaContainer.md @@ -0,0 +1,17 @@ +# GetRelatedItemsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | List\<[Hub](../../models/shared/Hub.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetRelatedItemsRequest.md b/docs/models/operations/GetRelatedItemsRequest.md new file mode 100644 index 00000000..b2d3aef9 --- /dev/null +++ b/docs/models/operations/GetRelatedItemsRequest.md @@ -0,0 +1,19 @@ +# GetRelatedItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetRelatedItemsResponse.md b/docs/models/operations/GetRelatedItemsResponse.md new file mode 100644 index 00000000..166613ea --- /dev/null +++ b/docs/models/operations/GetRelatedItemsResponse.md @@ -0,0 +1,11 @@ +# GetRelatedItemsResponse + + +## 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/GetRelatedItemsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetRelatedItemsResponseBody.md b/docs/models/operations/GetRelatedItemsResponseBody.md new file mode 100644 index 00000000..585f1e38 --- /dev/null +++ b/docs/models/operations/GetRelatedItemsResponseBody.md @@ -0,0 +1,10 @@ +# GetRelatedItemsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetRelatedItemsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetResizedPhotoRequest.md b/docs/models/operations/GetResizedPhotoRequest.md deleted file mode 100644 index 4de812d9..00000000 --- a/docs/models/operations/GetResizedPhotoRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetResizedPhotoRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `width` | *double* | :heavy_check_mark: | The width for the resized photo | 110 | -| `height` | *double* | :heavy_check_mark: | The height for the resized photo | 165 | -| `opacity` | *long* | :heavy_check_mark: | The opacity for the resized photo | | -| `blur` | *double* | :heavy_check_mark: | The width for the resized photo | 0 | -| `minSize` | [MinSize](../../models/operations/MinSize.md) | :heavy_check_mark: | images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. | | -| `upscale` | [Upscale](../../models/operations/Upscale.md) | :heavy_check_mark: | allow images to be resized beyond native dimensions. | | -| `url` | *String* | :heavy_check_mark: | path to image within Plex | /library/metadata/49564/thumb/1654258204 | \ No newline at end of file diff --git a/docs/models/operations/GetResizedPhotoResponse.md b/docs/models/operations/GetResizedPhotoResponse.md deleted file mode 100644 index 34b52959..00000000 --- a/docs/models/operations/GetResizedPhotoResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetResizedPhotoResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetResourcesStatisticsMediaContainer.md b/docs/models/operations/GetResourcesStatisticsMediaContainer.md deleted file mode 100644 index b159fe27..00000000 --- a/docs/models/operations/GetResourcesStatisticsMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetResourcesStatisticsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 5497 | -| `statisticsResources` | List\<[StatisticsResources](../../models/operations/StatisticsResources.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetResourcesStatisticsRequest.md b/docs/models/operations/GetResourcesStatisticsRequest.md deleted file mode 100644 index de28f068..00000000 --- a/docs/models/operations/GetResourcesStatisticsRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetResourcesStatisticsRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `timespan` | *Optional\* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | \ No newline at end of file diff --git a/docs/models/operations/GetResourcesStatisticsResponse.md b/docs/models/operations/GetResourcesStatisticsResponse.md deleted file mode 100644 index 192f8474..00000000 --- a/docs/models/operations/GetResourcesStatisticsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetResourcesStatisticsResponse - - -## 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/GetResourcesStatisticsResponseBody.md) | :heavy_minus_sign: | Resource Statistics | \ No newline at end of file diff --git a/docs/models/operations/GetResourcesStatisticsResponseBody.md b/docs/models/operations/GetResourcesStatisticsResponseBody.md deleted file mode 100644 index ded09784..00000000 --- a/docs/models/operations/GetResourcesStatisticsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetResourcesStatisticsResponseBody - -Resource Statistics - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetResourcesStatisticsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetScheduledRecordingsMediaContainer.md b/docs/models/operations/GetScheduledRecordingsMediaContainer.md new file mode 100644 index 00000000..037d13e1 --- /dev/null +++ b/docs/models/operations/GetScheduledRecordingsMediaContainer.md @@ -0,0 +1,17 @@ +# GetScheduledRecordingsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `mediaGrabOperation` | List\<[MediaGrabOperation](../../models/shared/MediaGrabOperation.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetScheduledRecordingsResponse.md b/docs/models/operations/GetScheduledRecordingsResponse.md new file mode 100644 index 00000000..67ada721 --- /dev/null +++ b/docs/models/operations/GetScheduledRecordingsResponse.md @@ -0,0 +1,12 @@ +# GetScheduledRecordingsResponse + + +## 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/GetScheduledRecordingsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetScheduledRecordingsResponseBody.md b/docs/models/operations/GetScheduledRecordingsResponseBody.md new file mode 100644 index 00000000..65cfed1a --- /dev/null +++ b/docs/models/operations/GetScheduledRecordingsResponseBody.md @@ -0,0 +1,10 @@ +# GetScheduledRecordingsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/GetScheduledRecordingsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesCountry.md b/docs/models/operations/GetSearchAllLibrariesCountry.md deleted file mode 100644 index db23576f..00000000 --- a/docs/models/operations/GetSearchAllLibrariesCountry.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetSearchAllLibrariesCountry - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *String* | :heavy_check_mark: | The country of origin of this media item | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesDirector.md b/docs/models/operations/GetSearchAllLibrariesDirector.md deleted file mode 100644 index a9d3c39f..00000000 --- a/docs/models/operations/GetSearchAllLibrariesDirector.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchAllLibrariesDirector - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 | -| `tag` | *String* | :heavy_check_mark: | The role of Director | Danny Boyle | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesDirectory.md b/docs/models/operations/GetSearchAllLibrariesDirectory.md deleted file mode 100644 index ed824307..00000000 --- a/docs/models/operations/GetSearchAllLibrariesDirectory.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetSearchAllLibrariesDirectory - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `key` | *String* | :heavy_check_mark: | The unique identifier path for the search result item. | /library/sections/3/all?actor=197429 | -| `librarySectionID` | *long* | :heavy_check_mark: | The identifier for the library section. | 1 | -| `librarySectionKey` | *String* | :heavy_check_mark: | The key corresponding to the library section. | /library/sections/1 | -| `librarySectionTitle` | *String* | :heavy_check_mark: | The title of the library section. | Movies | -| `librarySectionType` | *Optional\* | :heavy_minus_sign: | N/A | | -| `type` | *String* | :heavy_check_mark: | The type of the directory. | tag | -| `id` | *long* | :heavy_check_mark: | N/A | 197429 | -| `filter` | *Optional\* | :heavy_minus_sign: | The filter string used to query this specific item in the library. | actor=197429 | -| `tag` | *String* | :heavy_check_mark: | N/A | Ben Stiller | -| `tagType` | *Optional\* | :heavy_minus_sign: | The type of tag associated with this search result (e.g., Director, Actor). | | -| `tagKey` | *Optional\* | :heavy_minus_sign: | The unique identifier for the tag associated with this search result. | 5d776826999c64001ec2c606 | -| `thumb` | *Optional\* | :heavy_minus_sign: | The URL to the thumbnail image associated with this search result. | https://metadata-static.plex.tv/5/people/57bd7c7d6c5c9e2881251b30e5603d3d.jpg | -| `count` | *Optional\* | :heavy_minus_sign: | The number of items associated with this search result. | 10 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesFlattenSeasons.md b/docs/models/operations/GetSearchAllLibrariesFlattenSeasons.md deleted file mode 100644 index 00be6ad3..00000000 --- a/docs/models/operations/GetSearchAllLibrariesFlattenSeasons.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetSearchAllLibrariesFlattenSeasons - -Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - - - -## Values - -| Name | Value | -| ---------------- | ---------------- | -| `LibraryDefault` | -1 | -| `Hide` | 0 | -| `Show` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesGenre.md b/docs/models/operations/GetSearchAllLibrariesGenre.md deleted file mode 100644 index 72e39477..00000000 --- a/docs/models/operations/GetSearchAllLibrariesGenre.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetSearchAllLibrariesGenre - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *String* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesGuids.md b/docs/models/operations/GetSearchAllLibrariesGuids.md deleted file mode 100644 index 1f235c9f..00000000 --- a/docs/models/operations/GetSearchAllLibrariesGuids.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetSearchAllLibrariesGuids - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesHasThumbnail.md b/docs/models/operations/GetSearchAllLibrariesHasThumbnail.md deleted file mode 100644 index b5f9278d..00000000 --- a/docs/models/operations/GetSearchAllLibrariesHasThumbnail.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetSearchAllLibrariesHasThumbnail - -Indicates if the part has a thumbnail. - - - -## Values - -| Name | Value | -| ------- | ------- | -| `False` | 0 | -| `True` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesImage.md b/docs/models/operations/GetSearchAllLibrariesImage.md deleted file mode 100644 index 0b0b9fb6..00000000 --- a/docs/models/operations/GetSearchAllLibrariesImage.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchAllLibrariesImage - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `alt` | *String* | :heavy_check_mark: | N/A | Episode 1 | -| `type` | [GetSearchAllLibrariesLibraryType](../../models/operations/GetSearchAllLibrariesLibraryType.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/GetSearchAllLibrariesLibraryOptimizedForStreaming.md b/docs/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.md deleted file mode 100644 index d53b0701..00000000 --- a/docs/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.md +++ /dev/null @@ -1,5 +0,0 @@ -# GetSearchAllLibrariesLibraryOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - diff --git a/docs/models/operations/GetSearchAllLibrariesLibraryType.md b/docs/models/operations/GetSearchAllLibrariesLibraryType.md deleted file mode 100644 index a3f90fe1..00000000 --- a/docs/models/operations/GetSearchAllLibrariesLibraryType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchAllLibrariesLibraryType - - -## 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/GetSearchAllLibrariesLocation.md b/docs/models/operations/GetSearchAllLibrariesLocation.md deleted file mode 100644 index 8e977828..00000000 --- a/docs/models/operations/GetSearchAllLibrariesLocation.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchAllLibrariesLocation - -The folder path for the media item. - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `path` | *String* | :heavy_check_mark: | N/A | /TV Shows/Clarkson's Farm | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesMedia.md b/docs/models/operations/GetSearchAllLibrariesMedia.md deleted file mode 100644 index b496bcd4..00000000 --- a/docs/models/operations/GetSearchAllLibrariesMedia.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetSearchAllLibrariesMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *Optional\* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *Optional\* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *Optional\* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | Audio codec used. | aac | -| `videoCodec` | *Optional\* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *Optional\* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *Optional\* | :heavy_minus_sign: | Container format of the media. | mp4 | -| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetSearchAllLibrariesOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | Indicates whether the media has 64-bit offsets.
This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
| false | -| `part` | List\<[GetSearchAllLibrariesPart](../../models/operations/GetSearchAllLibrariesPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesMediaContainer.md b/docs/models/operations/GetSearchAllLibrariesMediaContainer.md deleted file mode 100644 index f220aba3..00000000 --- a/docs/models/operations/GetSearchAllLibrariesMediaContainer.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetSearchAllLibrariesMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | TV Series | -| `librarySectionUUID` | *Optional\* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `searchResult` | List\<[SearchResult](../../models/operations/SearchResult.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesMetadata.md b/docs/models/operations/GetSearchAllLibrariesMetadata.md deleted file mode 100644 index 929f7516..00000000 --- a/docs/models/operations/GetSearchAllLibrariesMetadata.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetSearchAllLibrariesMetadata - -Unknown - - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *String* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | -| `key` | *String* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | -| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | -| `slug` | *String* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | -| `studio` | *Optional\* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `type` | [GetSearchAllLibrariesType](../../models/operations/GetSearchAllLibrariesType.md) | :heavy_check_mark: | N/A | movie | -| `title` | *String* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | -| `banner` | *String* | :heavy_check_mark: | The banner image URL for the media item. | /library/metadata/58683/banner/1703239236 | -| `titleSort` | *String* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | -| `contentRating` | *Optional\* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | -| `summary` | *String* | :heavy_check_mark: | A synopsis of the media item. | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.
Once a familiar threat returns to finish what was previously started, Jake must
work with Neytiri and the army of the Na'vi race to protect their home.
| -| `rating` | *float* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | -| `audienceRating` | *double* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | -| `year` | *Optional\* | :heavy_minus_sign: | The release year of the media item. | 2022 | -| `tagline` | *String* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | -| `thumb` | *String* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | -| `art` | *String* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | -| `theme` | *String* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | -| `index` | *int* | :heavy_check_mark: | The index position of the media item. | 1 | -| `leafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | -| `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | -| `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | -| `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | -| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `parentYear` | *Optional\* | :heavy_minus_sign: | The release year of the parent media item. | 2010 | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | -| `chapterSource` | *Optional\* | :heavy_minus_sign: | The source from which chapter data is derived. | media | -| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | -| `originalTitle` | *Optional\* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | -| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | -| `parentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentGuid` | *Optional\* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentSlug` | *Optional\* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | -| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | -| `parentKey` | *Optional\* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | -| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | -| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | -| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | -| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | The title of the parent media item. | Caprica | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | The index position of the parent media item. | 1 | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | -| `viewCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | -| `viewOffset` | *Optional\* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | -| `skipCount` | *Optional\* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | -| `subtype` | *Optional\* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | -| `lastRatedAt` | *Optional\* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | -| `createdAtAccuracy` | *Optional\* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | -| `createdAtTZOffset` | *Optional\* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | -| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | -| `userRating` | *Optional\* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `image` | List\<[GetSearchAllLibrariesImage](../../models/operations/GetSearchAllLibrariesImage.md)> | :heavy_minus_sign: | N/A | | -| `ultraBlurColors` | [Optional\](../../models/operations/GetSearchAllLibrariesUltraBlurColors.md) | :heavy_minus_sign: | N/A | | -| `guids` | List\<[GetSearchAllLibrariesGuids](../../models/operations/GetSearchAllLibrariesGuids.md)> | :heavy_minus_sign: | N/A | | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The identifier for the library section. | 1 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | The title of the library section. | Movies | -| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | -| `showOrdering` | [Optional\](../../models/operations/GetSearchAllLibrariesShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
Options:
- None = Library default
- tmdbAiring = The Movie Database (Aired)
- aired = TheTVDB (Aired)
- dvd = TheTVDB (DVD)
- absolute = TheTVDB (Absolute)
| absolute | -| `flattenSeasons` | [Optional\](../../models/operations/GetSearchAllLibrariesFlattenSeasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
| 1 | -| `skipChildren` | *Optional\* | :heavy_minus_sign: | Indicates whether child items should be skipped. | false | -| `media` | List\<[GetSearchAllLibrariesMedia](../../models/operations/GetSearchAllLibrariesMedia.md)> | :heavy_minus_sign: | N/A | | -| `genre` | List\<[GetSearchAllLibrariesGenre](../../models/operations/GetSearchAllLibrariesGenre.md)> | :heavy_minus_sign: | N/A | | -| `country` | List\<[GetSearchAllLibrariesCountry](../../models/operations/GetSearchAllLibrariesCountry.md)> | :heavy_minus_sign: | N/A | | -| `director` | List\<[GetSearchAllLibrariesDirector](../../models/operations/GetSearchAllLibrariesDirector.md)> | :heavy_minus_sign: | N/A | | -| `writer` | List\<[GetSearchAllLibrariesWriter](../../models/operations/GetSearchAllLibrariesWriter.md)> | :heavy_minus_sign: | N/A | | -| `role` | List\<[GetSearchAllLibrariesRole](../../models/operations/GetSearchAllLibrariesRole.md)> | :heavy_minus_sign: | N/A | | -| `location` | List\<[GetSearchAllLibrariesLocation](../../models/operations/GetSearchAllLibrariesLocation.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming.md b/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming.md deleted file mode 100644 index fa7e8b54..00000000 --- a/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming.md +++ /dev/null @@ -1,4 +0,0 @@ -# GetSearchAllLibrariesOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - diff --git a/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.md b/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.md deleted file mode 100644 index ff8e21af..00000000 --- a/docs/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetSearchAllLibrariesOptimizedForStreaming1 - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.md b/docs/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.md deleted file mode 100644 index b078b22c..00000000 --- a/docs/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetSearchAllLibrariesOptimizedForStreamingLibrary1 - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesPart.md b/docs/models/operations/GetSearchAllLibrariesPart.md deleted file mode 100644 index 9ba87c6e..00000000 --- a/docs/models/operations/GetSearchAllLibrariesPart.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetSearchAllLibrariesPart - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `accessible` | *Optional\* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `exists` | *Optional\* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `id` | *long* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *Optional\* | :heavy_minus_sign: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `indexes` | *Optional\* | :heavy_minus_sign: | N/A | sd | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *Optional\* | :heavy_minus_sign: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *Optional\* | :heavy_minus_sign: | File size in bytes. | 30649952104 | -| `packetLength` | *Optional\* | :heavy_minus_sign: | N/A | 188 | -| `container` | *Optional\* | :heavy_minus_sign: | Container format of the part. | mkv | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
| | -| `hasThumbnail` | [Optional\](../../models/operations/GetSearchAllLibrariesHasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.md b/docs/models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.md deleted file mode 100644 index d0bc1303..00000000 --- a/docs/models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchAllLibrariesQueryParamIncludeCollections - -Whether to include collections in the search results. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.md b/docs/models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.md deleted file mode 100644 index a5f85db1..00000000 --- a/docs/models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchAllLibrariesQueryParamIncludeExternalMedia - -Whether to include external media in the search results. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesRequest.md b/docs/models/operations/GetSearchAllLibrariesRequest.md deleted file mode 100644 index b748a5b0..00000000 --- a/docs/models/operations/GetSearchAllLibrariesRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetSearchAllLibrariesRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `query` | *String* | :heavy_check_mark: | The search query term. | | -| `clientID` | *String* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `limit` | *Optional\* | :heavy_minus_sign: | Limit the number of results returned. | | -| `searchTypes` | List\<[SearchTypes](../../models/operations/SearchTypes.md)> | :heavy_minus_sign: | A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv.
| movies,music,otherVideos,people,tv | -| `includeCollections` | [Optional\](../../models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.md) | :heavy_minus_sign: | Whether to include collections in the search results. | 1 | -| `includeExternalMedia` | [Optional\](../../models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.md) | :heavy_minus_sign: | Whether to include external media in the search results. | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesResponse.md b/docs/models/operations/GetSearchAllLibrariesResponse.md deleted file mode 100644 index 34d861d0..00000000 --- a/docs/models/operations/GetSearchAllLibrariesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchAllLibrariesResponse - - -## 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/GetSearchAllLibrariesResponseBody.md) | :heavy_minus_sign: | The libraries available on the Server | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesResponseBody.md b/docs/models/operations/GetSearchAllLibrariesResponseBody.md deleted file mode 100644 index 90896681..00000000 --- a/docs/models/operations/GetSearchAllLibrariesResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchAllLibrariesResponseBody - -The libraries available on the Server - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [GetSearchAllLibrariesMediaContainer](../../models/operations/GetSearchAllLibrariesMediaContainer.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesRole.md b/docs/models/operations/GetSearchAllLibrariesRole.md deleted file mode 100644 index 985e03c9..00000000 --- a/docs/models/operations/GetSearchAllLibrariesRole.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchAllLibrariesRole - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | -| `tag` | *String* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | -| `role` | *Optional\* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesShowOrdering.md b/docs/models/operations/GetSearchAllLibrariesShowOrdering.md deleted file mode 100644 index 6331527e..00000000 --- a/docs/models/operations/GetSearchAllLibrariesShowOrdering.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchAllLibrariesShowOrdering - -Setting that indicates the episode ordering for the show. -Options: - - None = Library default - - tmdbAiring = The Movie Database (Aired) - - aired = TheTVDB (Aired) - - dvd = TheTVDB (DVD) - - absolute = TheTVDB (Absolute) - - - -## Values - -| Name | Value | -| -------------- | -------------- | -| `None` | None | -| `TmdbAiring` | tmdbAiring | -| `TvdbAired` | aired | -| `TvdbDvd` | dvd | -| `TvdbAbsolute` | absolute | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesType.md b/docs/models/operations/GetSearchAllLibrariesType.md deleted file mode 100644 index 289c76f2..00000000 --- a/docs/models/operations/GetSearchAllLibrariesType.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetSearchAllLibrariesType - -The type of media content in the Plex library. This can represent videos, music, or photos. - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | \ No newline at end of file diff --git a/docs/models/operations/GetSearchAllLibrariesUltraBlurColors.md b/docs/models/operations/GetSearchAllLibrariesUltraBlurColors.md deleted file mode 100644 index 49657694..00000000 --- a/docs/models/operations/GetSearchAllLibrariesUltraBlurColors.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchAllLibrariesUltraBlurColors - - -## 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/GetSearchAllLibrariesWriter.md b/docs/models/operations/GetSearchAllLibrariesWriter.md deleted file mode 100644 index 255e7879..00000000 --- a/docs/models/operations/GetSearchAllLibrariesWriter.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchAllLibrariesWriter - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | -| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetSearchLibraryMediaContainer.md b/docs/models/operations/GetSearchLibraryMediaContainer.md deleted file mode 100644 index d1bdd294..00000000 --- a/docs/models/operations/GetSearchLibraryMediaContainer.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetSearchLibraryMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /:/resources/show-fanart.jpg | -| `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 | 1698860922 | -| `nocache` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /:/resources/show.png | -| `title1` | *Optional\* | :heavy_minus_sign: | N/A | TV Shows | -| `title2` | *Optional\* | :heavy_minus_sign: | N/A | Search for '' | -| `viewGroup` | *Optional\* | :heavy_minus_sign: | N/A | season | -| `viewMode` | *Optional\* | :heavy_minus_sign: | N/A | 65593 | -| `metadata` | List\<[GetSearchLibraryMetadata](../../models/operations/GetSearchLibraryMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchLibraryMetadata.md b/docs/models/operations/GetSearchLibraryMetadata.md deleted file mode 100644 index b8d08bda..00000000 --- a/docs/models/operations/GetSearchLibraryMetadata.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetSearchLibraryMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/2/children | -| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | plex://season/602e67e766dfdb002c0a1b5b | -| `parentGuid` | *Optional\* | :heavy_minus_sign: | N/A | plex://show/5d9c086c7d06d9001ffd27aa | -| `parentStudio` | *Optional\* | :heavy_minus_sign: | N/A | Mutant Enemy Productions | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | season | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Season 1 | -| `parentKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/1 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | N/A | Firefly | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship "Serenity". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government "The Alliance"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space. | -| `index` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `parentYear` | *Optional\* | :heavy_minus_sign: | N/A | 2002 | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/2/thumb/1705636920 | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/1/art/1705636920 | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/1/thumb/1705636920 | -| `parentTheme` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705636916 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705636920 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchLibraryQueryParamType.md b/docs/models/operations/GetSearchLibraryQueryParamType.md deleted file mode 100644 index 698cb533..00000000 --- a/docs/models/operations/GetSearchLibraryQueryParamType.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetSearchLibraryQueryParamType - -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchLibraryRequest.md b/docs/models/operations/GetSearchLibraryRequest.md deleted file mode 100644 index 41f9c2cf..00000000 --- a/docs/models/operations/GetSearchLibraryRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetSearchLibraryRequest - - -## Fields - -| 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` | [GetSearchLibraryQueryParamType](../../models/operations/GetSearchLibraryQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchLibraryResponse.md b/docs/models/operations/GetSearchLibraryResponse.md deleted file mode 100644 index 996143d1..00000000 --- a/docs/models/operations/GetSearchLibraryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchLibraryResponse - - -## 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/GetSearchLibraryResponseBody.md) | :heavy_minus_sign: | The contents of the library by section and type | \ No newline at end of file diff --git a/docs/models/operations/GetSearchLibraryResponseBody.md b/docs/models/operations/GetSearchLibraryResponseBody.md deleted file mode 100644 index 930a0760..00000000 --- a/docs/models/operations/GetSearchLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchLibraryResponseBody - -The contents of the library by section and type - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetSearchLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsCountry.md b/docs/models/operations/GetSearchResultsCountry.md deleted file mode 100644 index 4e6eb562..00000000 --- a/docs/models/operations/GetSearchResultsCountry.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetSearchResultsCountry - - -## 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/GetSearchResultsDirector.md b/docs/models/operations/GetSearchResultsDirector.md deleted file mode 100644 index 59d70f3e..00000000 --- a/docs/models/operations/GetSearchResultsDirector.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetSearchResultsDirector - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Brian De Palma | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsGenre.md b/docs/models/operations/GetSearchResultsGenre.md deleted file mode 100644 index d38101f7..00000000 --- a/docs/models/operations/GetSearchResultsGenre.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetSearchResultsGenre - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Action | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsMedia.md b/docs/models/operations/GetSearchResultsMedia.md deleted file mode 100644 index d7cbd37f..00000000 --- a/docs/models/operations/GetSearchResultsMedia.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetSearchResultsMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 26610 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 6612628 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 4751 | -| `width` | *Optional\* | :heavy_minus_sign: | N/A | 1916 | -| `height` | *Optional\* | :heavy_minus_sign: | N/A | 796 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | N/A | 2.35 | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | N/A | 6 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | N/A | aac | -| `videoCodec` | *Optional\* | :heavy_minus_sign: | N/A | hevc | -| `videoResolution` | *Optional\* | :heavy_minus_sign: | N/A | 1080 | -| `container` | *Optional\* | :heavy_minus_sign: | N/A | mkv | -| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | N/A | 24p | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | lc | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | main 10 | -| `part` | List\<[GetSearchResultsPart](../../models/operations/GetSearchResultsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsMediaContainer.md b/docs/models/operations/GetSearchResultsMediaContainer.md deleted file mode 100644 index a07a4a28..00000000 --- a/docs/models/operations/GetSearchResultsMediaContainer.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetSearchResultsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 26 | -| `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 | -| `metadata` | List\<[GetSearchResultsMetadata](../../models/operations/GetSearchResultsMetadata.md)> | :heavy_minus_sign: | N/A | | -| `provider` | List\<[Provider](../../models/operations/Provider.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsMetadata.md b/docs/models/operations/GetSearchResultsMetadata.md deleted file mode 100644 index cdd58435..00000000 --- a/docs/models/operations/GetSearchResultsMetadata.md +++ /dev/null @@ -1,41 +0,0 @@ -# GetSearchResultsMetadata - - -## 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 | -| `personal` | *Optional\* | :heavy_minus_sign: | N/A | | -| `sourceTitle` | *Optional\* | :heavy_minus_sign: | N/A | Hera | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 10398 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/10398 | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | plex://movie/5d7768284de0ee001fcc8f52 | -| `studio` | *Optional\* | :heavy_minus_sign: | N/A | Paramount | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | movie | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Mission: Impossible | -| `contentRating` | *Optional\* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score. | -| `rating` | *Optional\* | :heavy_minus_sign: | N/A | 6.6 | -| `audienceRating` | *Optional\* | :heavy_minus_sign: | N/A | 7.1 | -| `year` | *Optional\* | :heavy_minus_sign: | N/A | 1996 | -| `tagline` | *Optional\* | :heavy_minus_sign: | N/A | Expect the impossible. | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/10398/thumb/1679505055 | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/10398/art/1679505055 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 6612628 | -| `originallyAvailableAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | 1996-05-22 00:00:00 +0000 UTC | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1589234571 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1679505055 | -| `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/10501 | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `media` | List\<[GetSearchResultsMedia](../../models/operations/GetSearchResultsMedia.md)> | :heavy_minus_sign: | N/A | | -| `genre` | List\<[GetSearchResultsGenre](../../models/operations/GetSearchResultsGenre.md)> | :heavy_minus_sign: | N/A | | -| `director` | List\<[GetSearchResultsDirector](../../models/operations/GetSearchResultsDirector.md)> | :heavy_minus_sign: | N/A | | -| `writer` | List\<[GetSearchResultsWriter](../../models/operations/GetSearchResultsWriter.md)> | :heavy_minus_sign: | N/A | | -| `country` | List\<[GetSearchResultsCountry](../../models/operations/GetSearchResultsCountry.md)> | :heavy_minus_sign: | N/A | | -| `role` | List\<[GetSearchResultsRole](../../models/operations/GetSearchResultsRole.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsPart.md b/docs/models/operations/GetSearchResultsPart.md deleted file mode 100644 index 78590d12..00000000 --- a/docs/models/operations/GetSearchResultsPart.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetSearchResultsPart - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 26610 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/parts/26610/1589234571/file.mkv | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 6612628 | -| `file` | *Optional\* | :heavy_minus_sign: | N/A | /movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 3926903851 | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | lc | -| `container` | *Optional\* | :heavy_minus_sign: | N/A | mkv | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | main 10 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsRequest.md b/docs/models/operations/GetSearchResultsRequest.md deleted file mode 100644 index cc56e4f3..00000000 --- a/docs/models/operations/GetSearchResultsRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetSearchResultsRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `query` | *String* | :heavy_check_mark: | The search query string to use | 110 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsResponse.md b/docs/models/operations/GetSearchResultsResponse.md deleted file mode 100644 index 055dc0c1..00000000 --- a/docs/models/operations/GetSearchResultsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSearchResultsResponse - - -## 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/GetSearchResultsResponseBody.md) | :heavy_minus_sign: | Search Results | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsResponseBody.md b/docs/models/operations/GetSearchResultsResponseBody.md deleted file mode 100644 index 306c645d..00000000 --- a/docs/models/operations/GetSearchResultsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchResultsResponseBody - -Search Results - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetSearchResultsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsRole.md b/docs/models/operations/GetSearchResultsRole.md deleted file mode 100644 index 3b0556ed..00000000 --- a/docs/models/operations/GetSearchResultsRole.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetSearchResultsRole - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Tom Cruise | \ No newline at end of file diff --git a/docs/models/operations/GetSearchResultsWriter.md b/docs/models/operations/GetSearchResultsWriter.md deleted file mode 100644 index b1f4006b..00000000 --- a/docs/models/operations/GetSearchResultsWriter.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetSearchResultsWriter - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | David Koepp | \ No newline at end of file diff --git a/docs/models/operations/GetSectionFiltersMediaContainer.md b/docs/models/operations/GetSectionFiltersMediaContainer.md new file mode 100644 index 00000000..5ab05726 --- /dev/null +++ b/docs/models/operations/GetSectionFiltersMediaContainer.md @@ -0,0 +1,17 @@ +# GetSectionFiltersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | List\<[Directory](../../models/shared/Directory.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSectionFiltersRequest.md b/docs/models/operations/GetSectionFiltersRequest.md new file mode 100644 index 00000000..1ad8024d --- /dev/null +++ b/docs/models/operations/GetSectionFiltersRequest.md @@ -0,0 +1,19 @@ +# GetSectionFiltersRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/GetSectionFiltersResponse.md b/docs/models/operations/GetSectionFiltersResponse.md new file mode 100644 index 00000000..1a5a5b22 --- /dev/null +++ b/docs/models/operations/GetSectionFiltersResponse.md @@ -0,0 +1,11 @@ +# GetSectionFiltersResponse + + +## 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/GetSectionFiltersResponseBody.md) | :heavy_minus_sign: | The filters on the section | \ No newline at end of file diff --git a/docs/models/operations/GetSectionFiltersResponseBody.md b/docs/models/operations/GetSectionFiltersResponseBody.md new file mode 100644 index 00000000..07614066 --- /dev/null +++ b/docs/models/operations/GetSectionFiltersResponseBody.md @@ -0,0 +1,10 @@ +# GetSectionFiltersResponseBody + +The filters on the section + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetSectionFiltersMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSectionHubsMediaContainer.md b/docs/models/operations/GetSectionHubsMediaContainer.md new file mode 100644 index 00000000..783920bd --- /dev/null +++ b/docs/models/operations/GetSectionHubsMediaContainer.md @@ -0,0 +1,17 @@ +# GetSectionHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | List\<[Hub](../../models/shared/Hub.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSectionHubsRequest.md b/docs/models/operations/GetSectionHubsRequest.md new file mode 100644 index 00000000..9f9962ab --- /dev/null +++ b/docs/models/operations/GetSectionHubsRequest.md @@ -0,0 +1,21 @@ +# GetSectionHubsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | The section ID for the hubs to fetch | | +| `count` | *Optional\* | :heavy_minus_sign: | Limit results to count items | | +| `onlyTransient` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSectionHubsResponse.md b/docs/models/operations/GetSectionHubsResponse.md new file mode 100644 index 00000000..c6ff4a12 --- /dev/null +++ b/docs/models/operations/GetSectionHubsResponse.md @@ -0,0 +1,12 @@ +# GetSectionHubsResponse + + +## 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/GetSectionHubsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSectionHubsResponseBody.md b/docs/models/operations/GetSectionHubsResponseBody.md new file mode 100644 index 00000000..6addec97 --- /dev/null +++ b/docs/models/operations/GetSectionHubsResponseBody.md @@ -0,0 +1,10 @@ +# GetSectionHubsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetSectionHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSectionImageRequest.md b/docs/models/operations/GetSectionImageRequest.md new file mode 100644 index 00000000..67a6b206 --- /dev/null +++ b/docs/models/operations/GetSectionImageRequest.md @@ -0,0 +1,22 @@ +# GetSectionImageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `updatedAt` | *long* | :heavy_check_mark: | The update time of the image. Used for busting cache. | | +| `mediaQuery` | [Optional\](../../models/shared/MediaQuery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | +| `composite` | [Optional\](../../models/shared/Composite.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSectionImageResponse.md b/docs/models/operations/GetSectionImageResponse.md new file mode 100644 index 00000000..1dcd2cc3 --- /dev/null +++ b/docs/models/operations/GetSectionImageResponse.md @@ -0,0 +1,10 @@ +# GetSectionImageResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetSectionPreferencesRequest.md b/docs/models/operations/GetSectionPreferencesRequest.md new file mode 100644 index 00000000..ec47bcf4 --- /dev/null +++ b/docs/models/operations/GetSectionPreferencesRequest.md @@ -0,0 +1,20 @@ +# GetSectionPreferencesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `agent` | *Optional\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSectionPreferencesResponse.md b/docs/models/operations/GetSectionPreferencesResponse.md new file mode 100644 index 00000000..6ef8eb52 --- /dev/null +++ b/docs/models/operations/GetSectionPreferencesResponse.md @@ -0,0 +1,11 @@ +# GetSectionPreferencesResponse + + +## 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 | +| `mediaContainerWithSettings` | [Optional\](../../models/shared/MediaContainerWithSettings.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetSectionsMediaContainer.md b/docs/models/operations/GetSectionsMediaContainer.md new file mode 100644 index 00000000..1645e3dc --- /dev/null +++ b/docs/models/operations/GetSectionsMediaContainer.md @@ -0,0 +1,19 @@ +# GetSectionsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | +| `directory` | List\<[LibrarySection](../../models/shared/LibrarySection.md)> | :heavy_minus_sign: | N/A | +| `title1` | *Optional\* | :heavy_minus_sign: | Typically just "Plex Library" | \ No newline at end of file diff --git a/docs/models/operations/GetSectionsPrefsRequest.md b/docs/models/operations/GetSectionsPrefsRequest.md new file mode 100644 index 00000000..add6abf3 --- /dev/null +++ b/docs/models/operations/GetSectionsPrefsRequest.md @@ -0,0 +1,20 @@ +# GetSectionsPrefsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `type` | *long* | :heavy_check_mark: | The metadata type | | +| `agent` | *Optional\* | :heavy_minus_sign: | The metadata agent in use | | \ No newline at end of file diff --git a/docs/models/operations/GetSectionsPrefsResponse.md b/docs/models/operations/GetSectionsPrefsResponse.md new file mode 100644 index 00000000..e267cf9e --- /dev/null +++ b/docs/models/operations/GetSectionsPrefsResponse.md @@ -0,0 +1,11 @@ +# GetSectionsPrefsResponse + + +## 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 | +| `requestHandlerSlashGetResponses200` | [Optional\](../../models/shared/RequestHandlerSlashGetResponses200.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetSectionsResponse.md b/docs/models/operations/GetSectionsResponse.md new file mode 100644 index 00000000..e35b62bd --- /dev/null +++ b/docs/models/operations/GetSectionsResponse.md @@ -0,0 +1,12 @@ +# GetSectionsResponse + + +## 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/GetSectionsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSectionsResponseBody.md b/docs/models/operations/GetSectionsResponseBody.md new file mode 100644 index 00000000..50c409b2 --- /dev/null +++ b/docs/models/operations/GetSectionsResponseBody.md @@ -0,0 +1,10 @@ +# GetSectionsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetSectionsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerActivitiesMediaContainer.md b/docs/models/operations/GetServerActivitiesMediaContainer.md deleted file mode 100644 index 2869705e..00000000 --- a/docs/models/operations/GetServerActivitiesMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetServerActivitiesMediaContainer - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | -| `activity` | List\<[Activity](../../models/operations/Activity.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerActivitiesResponse.md b/docs/models/operations/GetServerActivitiesResponse.md deleted file mode 100644 index d5743265..00000000 --- a/docs/models/operations/GetServerActivitiesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerActivitiesResponse - - -## 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/GetServerActivitiesResponseBody.md) | :heavy_minus_sign: | The Server Activities | \ No newline at end of file diff --git a/docs/models/operations/GetServerActivitiesResponseBody.md b/docs/models/operations/GetServerActivitiesResponseBody.md deleted file mode 100644 index 8cfeb999..00000000 --- a/docs/models/operations/GetServerActivitiesResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerActivitiesResponseBody - -The Server Activities - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetServerActivitiesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerCapabilitiesResponse.md b/docs/models/operations/GetServerCapabilitiesResponse.md deleted file mode 100644 index 7f3409bc..00000000 --- a/docs/models/operations/GetServerCapabilitiesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerCapabilitiesResponse - - -## 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/GetServerCapabilitiesResponseBody.md) | :heavy_minus_sign: | The Server Capabilities | \ No newline at end of file diff --git a/docs/models/operations/GetServerCapabilitiesResponseBody.md b/docs/models/operations/GetServerCapabilitiesResponseBody.md deleted file mode 100644 index 2633be06..00000000 --- a/docs/models/operations/GetServerCapabilitiesResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerCapabilitiesResponseBody - -The Server Capabilities - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/MediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerIdentityMediaContainer.md b/docs/models/operations/GetServerIdentityMediaContainer.md deleted file mode 100644 index a2938950..00000000 --- a/docs/models/operations/GetServerIdentityMediaContainer.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerIdentityMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 0 | -| `claimed` | *Optional\* | :heavy_minus_sign: | N/A | | -| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 | -| `version` | *Optional\* | :heavy_minus_sign: | N/A | 1.31.3.6868-28fc46b27 | \ No newline at end of file diff --git a/docs/models/operations/GetServerIdentityResponse.md b/docs/models/operations/GetServerIdentityResponse.md deleted file mode 100644 index c0499fd7..00000000 --- a/docs/models/operations/GetServerIdentityResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerIdentityResponse - - -## 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/GetServerIdentityResponseBody.md) | :heavy_minus_sign: | The Server Identity information | \ No newline at end of file diff --git a/docs/models/operations/GetServerIdentityResponseBody.md b/docs/models/operations/GetServerIdentityResponseBody.md deleted file mode 100644 index f4ca7564..00000000 --- a/docs/models/operations/GetServerIdentityResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerIdentityResponseBody - -The Server Identity information - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetServerIdentityMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerInfoRequest.md b/docs/models/operations/GetServerInfoRequest.md new file mode 100644 index 00000000..4fdab085 --- /dev/null +++ b/docs/models/operations/GetServerInfoRequest.md @@ -0,0 +1,18 @@ +# GetServerInfoRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/models/operations/GetServerInfoResponse.md b/docs/models/operations/GetServerInfoResponse.md new file mode 100644 index 00000000..aaf34857 --- /dev/null +++ b/docs/models/operations/GetServerInfoResponse.md @@ -0,0 +1,11 @@ +# GetServerInfoResponse + + +## 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 | +| `mediaContainerWithDirectory` | [Optional\](../../models/shared/MediaContainerWithDirectory.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetServerListMediaContainer.md b/docs/models/operations/GetServerListMediaContainer.md deleted file mode 100644 index 85203837..00000000 --- a/docs/models/operations/GetServerListMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetServerListMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `server` | List\<[GetServerListServer](../../models/operations/GetServerListServer.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetServerListResponse.md b/docs/models/operations/GetServerListResponse.md deleted file mode 100644 index 63c6c4f2..00000000 --- a/docs/models/operations/GetServerListResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerListResponse - - -## 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/GetServerListResponseBody.md) | :heavy_minus_sign: | List of Servers | \ No newline at end of file diff --git a/docs/models/operations/GetServerListResponseBody.md b/docs/models/operations/GetServerListResponseBody.md deleted file mode 100644 index 90fd8833..00000000 --- a/docs/models/operations/GetServerListResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerListResponseBody - -List of Servers - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetServerListMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerListServer.md b/docs/models/operations/GetServerListServer.md deleted file mode 100644 index 8a39988f..00000000 --- a/docs/models/operations/GetServerListServer.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetServerListServer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `name` | *Optional\* | :heavy_minus_sign: | N/A | Hera | -| `host` | *Optional\* | :heavy_minus_sign: | N/A | 10.10.10.47 | -| `address` | *Optional\* | :heavy_minus_sign: | N/A | 10.10.10.47 | -| `port` | *Optional\* | :heavy_minus_sign: | N/A | 32400 | -| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 | -| `version` | *Optional\* | :heavy_minus_sign: | N/A | 1.31.3.6868-28fc46b27 | \ No newline at end of file diff --git a/docs/models/operations/GetServerPreferencesMediaContainer.md b/docs/models/operations/GetServerPreferencesMediaContainer.md deleted file mode 100644 index 138dafb2..00000000 --- a/docs/models/operations/GetServerPreferencesMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetServerPreferencesMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 161 | -| `setting` | List\<[Setting](../../models/operations/Setting.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetServerPreferencesResponse.md b/docs/models/operations/GetServerPreferencesResponse.md deleted file mode 100644 index 828a70ef..00000000 --- a/docs/models/operations/GetServerPreferencesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerPreferencesResponse - - -## 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/GetServerPreferencesResponseBody.md) | :heavy_minus_sign: | Server Preferences | \ No newline at end of file diff --git a/docs/models/operations/GetServerPreferencesResponseBody.md b/docs/models/operations/GetServerPreferencesResponseBody.md deleted file mode 100644 index 77793f18..00000000 --- a/docs/models/operations/GetServerPreferencesResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerPreferencesResponseBody - -Server Preferences - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetServerPreferencesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetServerResourcesRequest.md b/docs/models/operations/GetServerResourcesRequest.md deleted file mode 100644 index e6469c47..00000000 --- a/docs/models/operations/GetServerResourcesRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerResourcesRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `includeHttps` | [Optional\](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | -| `includeRelay` | [Optional\](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | -| `includeIPv6` | [Optional\](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | -| `clientID` | *String* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | \ No newline at end of file diff --git a/docs/models/operations/GetServerResourcesResponse.md b/docs/models/operations/GetServerResourcesResponse.md deleted file mode 100644 index 0cf5feb4..00000000 --- a/docs/models/operations/GetServerResourcesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerResourcesResponse - - -## 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 | -| `plexDevices` | List\<[PlexDevice](../../models/operations/PlexDevice.md)> | :heavy_minus_sign: | List of Plex Devices. This includes Plex hosted servers and clients | \ No newline at end of file diff --git a/docs/models/operations/GetSessionHistoryMediaContainer.md b/docs/models/operations/GetSessionHistoryMediaContainer.md deleted file mode 100644 index a85e1794..00000000 --- a/docs/models/operations/GetSessionHistoryMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetSessionHistoryMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 10855 | -| `metadata` | List\<[GetSessionHistoryMetadata](../../models/operations/GetSessionHistoryMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSessionHistoryMetadata.md b/docs/models/operations/GetSessionHistoryMetadata.md deleted file mode 100644 index b625da6d..00000000 --- a/docs/models/operations/GetSessionHistoryMetadata.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetSessionHistoryMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `historyKey` | *Optional\* | :heavy_minus_sign: | N/A | /status/sessions/history/1 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/32171 | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 32171 | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `parentKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/32170 | -| `grandparentKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/32132 | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | The Noise That Blue Makes | -| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | N/A | Taskmaster | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | episode | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/32171/thumb/-1 | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/32170/thumb/1654134301 | -| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/32132/thumb/1703933346 | -| `grandparentArt` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/32132/art/1703933346 | -| `index` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | N/A | 13 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2022-04-14 00:00:00 +0000 UTC | -| `viewedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1654139223 | -| `accountID` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `deviceID` | *Optional\* | :heavy_minus_sign: | N/A | 5 | \ No newline at end of file diff --git a/docs/models/operations/GetSessionHistoryRequest.md b/docs/models/operations/GetSessionHistoryRequest.md deleted file mode 100644 index 0f322e59..00000000 --- a/docs/models/operations/GetSessionHistoryRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSessionHistoryRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sort` | *Optional\* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)
| | -| `accountId` | *Optional\* | :heavy_minus_sign: | Filter results by those that are related to a specific users id
| 1 | -| `filter` | [Optional\](../../models/operations/QueryParamFilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | Filters the results based on the id of a valid library section
| 12 | \ No newline at end of file diff --git a/docs/models/operations/GetSessionHistoryResponse.md b/docs/models/operations/GetSessionHistoryResponse.md deleted file mode 100644 index 3024f595..00000000 --- a/docs/models/operations/GetSessionHistoryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSessionHistoryResponse - - -## 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/GetSessionHistoryResponseBody.md) | :heavy_minus_sign: | List of Plex Sessions | \ No newline at end of file diff --git a/docs/models/operations/GetSessionHistoryResponseBody.md b/docs/models/operations/GetSessionHistoryResponseBody.md deleted file mode 100644 index 25ae7d86..00000000 --- a/docs/models/operations/GetSessionHistoryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSessionHistoryResponseBody - -List of Plex Sessions - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetSessionHistoryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSessionPlaylistIndexRequest.md b/docs/models/operations/GetSessionPlaylistIndexRequest.md new file mode 100644 index 00000000..2c229f25 --- /dev/null +++ b/docs/models/operations/GetSessionPlaylistIndexRequest.md @@ -0,0 +1,20 @@ +# GetSessionPlaylistIndexRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sessionId` | *String* | :heavy_check_mark: | The session id | | +| `consumerId` | *String* | :heavy_check_mark: | The consumer id | | \ No newline at end of file diff --git a/docs/models/operations/GetSessionPlaylistIndexResponse.md b/docs/models/operations/GetSessionPlaylistIndexResponse.md new file mode 100644 index 00000000..555422e3 --- /dev/null +++ b/docs/models/operations/GetSessionPlaylistIndexResponse.md @@ -0,0 +1,10 @@ +# GetSessionPlaylistIndexResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetSessionSegmentRequest.md b/docs/models/operations/GetSessionSegmentRequest.md new file mode 100644 index 00000000..35e9efff --- /dev/null +++ b/docs/models/operations/GetSessionSegmentRequest.md @@ -0,0 +1,21 @@ +# GetSessionSegmentRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sessionId` | *String* | :heavy_check_mark: | The session id | | +| `consumerId` | *String* | :heavy_check_mark: | The consumer id | | +| `segmentId` | *String* | :heavy_check_mark: | The segment id | | \ No newline at end of file diff --git a/docs/models/operations/GetSessionSegmentResponse.md b/docs/models/operations/GetSessionSegmentResponse.md new file mode 100644 index 00000000..c5ecac5e --- /dev/null +++ b/docs/models/operations/GetSessionSegmentResponse.md @@ -0,0 +1,10 @@ +# GetSessionSegmentResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsMedia.md b/docs/models/operations/GetSessionsMedia.md deleted file mode 100644 index cb86b345..00000000 --- a/docs/models/operations/GetSessionsMedia.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetSessionsMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | N/A | flac | -| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 1014 | -| `container` | *Optional\* | :heavy_minus_sign: | N/A | flac | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 186240 | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 130355 | -| `selected` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `part` | List\<[GetSessionsPart](../../models/operations/GetSessionsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsMediaContainer.md b/docs/models/operations/GetSessionsMediaContainer.md deleted file mode 100644 index 0bf8ede5..00000000 --- a/docs/models/operations/GetSessionsMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetSessionsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `metadata` | List\<[GetSessionsMetadata](../../models/operations/GetSessionsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsMetadata.md b/docs/models/operations/GetSessionsMetadata.md deleted file mode 100644 index 8c17733f..00000000 --- a/docs/models/operations/GetSessionsMetadata.md +++ /dev/null @@ -1,45 +0,0 @@ -# GetSessionsMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705543312 | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 186240 | -| `grandparentArt` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | -| `grandparentGuid` | *Optional\* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 | -| `grandparentKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/39904 | -| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | N/A | 39904 | -| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 | -| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | N/A | Green Day | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f | -| `index` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/67085 | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | 3 | -| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/sections/3 | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | N/A | Music | -| `musicAnalysisVersion` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `originalTitle` | *Optional\* | :heavy_minus_sign: | The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist | The American Dream Is Killing Me | -| `parentGuid` | *Optional\* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 | -| `parentIndex` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `parentKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/67084 | -| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | N/A | 67084 | -| `parentStudio` | *Optional\* | :heavy_minus_sign: | N/A | Reprise Records | -| `parentThumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | -| `parentTitle` | *Optional\* | :heavy_minus_sign: | N/A | Saviors | -| `parentYear` | *Optional\* | :heavy_minus_sign: | N/A | 2024 | -| `ratingCount` | *Optional\* | :heavy_minus_sign: | N/A | 45885 | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 67085 | -| `sessionKey` | *Optional\* | :heavy_minus_sign: | N/A | 203 | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me | -| `titleSort` | *Optional\* | :heavy_minus_sign: | N/A | American Dream Is Killing Me | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | track | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705543314 | -| `viewOffset` | *Optional\* | :heavy_minus_sign: | N/A | 1000 | -| `media` | List\<[GetSessionsMedia](../../models/operations/GetSessionsMedia.md)> | :heavy_minus_sign: | N/A | | -| `user` | [Optional\](../../models/operations/GetSessionsUser.md) | :heavy_minus_sign: | N/A | | -| `player` | [Optional\](../../models/operations/Player.md) | :heavy_minus_sign: | N/A | | -| `session` | [Optional\](../../models/operations/Session.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsPart.md b/docs/models/operations/GetSessionsPart.md deleted file mode 100644 index 2c6785c0..00000000 --- a/docs/models/operations/GetSessionsPart.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSessionsPart - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `container` | *Optional\* | :heavy_minus_sign: | N/A | flac | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 186240 | -| `file` | *Optional\* | :heavy_minus_sign: | N/A | /music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac | -| `hasThumbnail` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 130625 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/parts/130625/1705543268/file.flac | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 23644000 | -| `decision` | *Optional\* | :heavy_minus_sign: | N/A | directplay | -| `selected` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `stream` | List\<[GetSessionsStream](../../models/operations/GetSessionsStream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsResponse.md b/docs/models/operations/GetSessionsResponse.md index cd44edb3..e588c575 100644 --- a/docs/models/operations/GetSessionsResponse.md +++ b/docs/models/operations/GetSessionsResponse.md @@ -8,4 +8,5 @@ | `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/GetSessionsResponseBody.md) | :heavy_minus_sign: | List of Active Plex Sessions | \ No newline at end of file +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsResponseBody.md b/docs/models/operations/GetSessionsResponseBody.md deleted file mode 100644 index 7b4f4561..00000000 --- a/docs/models/operations/GetSessionsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSessionsResponseBody - -List of Active Plex Sessions - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetSessionsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsStream.md b/docs/models/operations/GetSessionsStream.md deleted file mode 100644 index 80d42efc..00000000 --- a/docs/models/operations/GetSessionsStream.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetSessionsStream - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `albumGain` | *Optional\* | :heavy_minus_sign: | N/A | -12.94 | -| `albumPeak` | *Optional\* | :heavy_minus_sign: | N/A | 1.000000 | -| `albumRange` | *Optional\* | :heavy_minus_sign: | N/A | 4.751014 | -| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | N/A | stereo | -| `bitDepth` | *Optional\* | :heavy_minus_sign: | N/A | 16 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 1014 | -| `channels` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `codec` | *Optional\* | :heavy_minus_sign: | N/A | flac | -| `displayTitle` | *Optional\* | :heavy_minus_sign: | N/A | FLAC (Stereo) | -| `extendedDisplayTitle` | *Optional\* | :heavy_minus_sign: | N/A | FLAC (Stereo) | -| `gain` | *Optional\* | :heavy_minus_sign: | N/A | -12.94 | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 352487 | -| `index` | *Optional\* | :heavy_minus_sign: | N/A | 0 | -| `loudness` | *Optional\* | :heavy_minus_sign: | N/A | -5.94 | -| `lra` | *Optional\* | :heavy_minus_sign: | N/A | 1.74 | -| `peak` | *Optional\* | :heavy_minus_sign: | N/A | 1.000000 | -| `samplingRate` | *Optional\* | :heavy_minus_sign: | N/A | 44100 | -| `selected` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `streamType` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `location` | *Optional\* | :heavy_minus_sign: | N/A | direct | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsUser.md b/docs/models/operations/GetSessionsUser.md deleted file mode 100644 index cb17880a..00000000 --- a/docs/models/operations/GetSessionsUser.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSessionsUser - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661 | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Blindkitty38 | \ No newline at end of file diff --git a/docs/models/operations/GetSonicPathRequest.md b/docs/models/operations/GetSonicPathRequest.md new file mode 100644 index 00000000..ccb03f06 --- /dev/null +++ b/docs/models/operations/GetSonicPathRequest.md @@ -0,0 +1,23 @@ +# GetSonicPathRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `startID` | *long* | :heavy_check_mark: | The starting metadata item id | | +| `endID` | *long* | :heavy_check_mark: | The ending metadata item id | | +| `count` | *Optional\* | :heavy_minus_sign: | Limit results to count items | | +| `maxDistance` | *Optional\* | :heavy_minus_sign: | The maximum distance allowed along the path; defaults to 0.25 | | \ No newline at end of file diff --git a/docs/models/operations/GetSonicPathResponse.md b/docs/models/operations/GetSonicPathResponse.md new file mode 100644 index 00000000..4fee3c67 --- /dev/null +++ b/docs/models/operations/GetSonicPathResponse.md @@ -0,0 +1,11 @@ +# GetSonicPathResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetSonicallySimilarRequest.md b/docs/models/operations/GetSonicallySimilarRequest.md new file mode 100644 index 00000000..a993e2f4 --- /dev/null +++ b/docs/models/operations/GetSonicallySimilarRequest.md @@ -0,0 +1,23 @@ +# GetSonicallySimilarRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `type` | *Optional\* | :heavy_minus_sign: | The metadata type to fetch (should be 10 for audio track) | | +| `values` | List\<*long*> | :heavy_check_mark: | The music analysis to center the search. Typically obtained from the `musicAnalysis` of a track | | +| `limit` | *Optional\* | :heavy_minus_sign: | The limit of the number of items to fetch; defaults to 50 | | +| `maxDistance` | *Optional\* | :heavy_minus_sign: | The maximum distance to search, defaults to 0.25 | | \ No newline at end of file diff --git a/docs/models/operations/GetSonicallySimilarResponse.md b/docs/models/operations/GetSonicallySimilarResponse.md new file mode 100644 index 00000000..203e93b5 --- /dev/null +++ b/docs/models/operations/GetSonicallySimilarResponse.md @@ -0,0 +1,11 @@ +# GetSonicallySimilarResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetSourceConnectionInformationMediaContainer.md b/docs/models/operations/GetSourceConnectionInformationMediaContainer.md new file mode 100644 index 00000000..0a5b245a --- /dev/null +++ b/docs/models/operations/GetSourceConnectionInformationMediaContainer.md @@ -0,0 +1,17 @@ +# GetSourceConnectionInformationMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `device` | [Optional\](../../models/operations/Device.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetSourceConnectionInformationRequest.md b/docs/models/operations/GetSourceConnectionInformationRequest.md index a173a061..1fac0d0d 100644 --- a/docs/models/operations/GetSourceConnectionInformationRequest.md +++ b/docs/models/operations/GetSourceConnectionInformationRequest.md @@ -3,6 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `source` | *String* | :heavy_check_mark: | The source identifier with an included prefix. | server://client-identifier | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `source` | *String* | :heavy_check_mark: | The source identifier with an included prefix. | | +| `refresh` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Force refresh | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSourceConnectionInformationResponse.md b/docs/models/operations/GetSourceConnectionInformationResponse.md index d09b6ffc..8ba9430a 100644 --- a/docs/models/operations/GetSourceConnectionInformationResponse.md +++ b/docs/models/operations/GetSourceConnectionInformationResponse.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| 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/GetSourceConnectionInformationResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetSourceConnectionInformationResponseBody.md b/docs/models/operations/GetSourceConnectionInformationResponseBody.md new file mode 100644 index 00000000..d43a2761 --- /dev/null +++ b/docs/models/operations/GetSourceConnectionInformationResponseBody.md @@ -0,0 +1,10 @@ +# GetSourceConnectionInformationResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetSourceConnectionInformationMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsDevice.md b/docs/models/operations/GetStatisticsDevice.md deleted file mode 100644 index 849a9dca..00000000 --- a/docs/models/operations/GetStatisticsDevice.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetStatisticsDevice - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 208 | -| `name` | *Optional\* | :heavy_minus_sign: | N/A | Roku Express | -| `platform` | *Optional\* | :heavy_minus_sign: | N/A | Roku | -| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 | -| `createdAt` | *Optional\* | :heavy_minus_sign: | N/A | 1706470556 | \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsMediaContainer.md b/docs/models/operations/GetStatisticsMediaContainer.md deleted file mode 100644 index e31a1b72..00000000 --- a/docs/models/operations/GetStatisticsMediaContainer.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetStatisticsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 5497 | -| `device` | List\<[GetStatisticsDevice](../../models/operations/GetStatisticsDevice.md)> | :heavy_minus_sign: | N/A | | -| `account` | List\<[Account](../../models/operations/Account.md)> | :heavy_minus_sign: | N/A | | -| `statisticsMedia` | List\<[StatisticsMedia](../../models/operations/StatisticsMedia.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsRequest.md b/docs/models/operations/GetStatisticsRequest.md deleted file mode 100644 index e375ce8e..00000000 --- a/docs/models/operations/GetStatisticsRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetStatisticsRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `timespan` | *Optional\* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsResponse.md b/docs/models/operations/GetStatisticsResponse.md deleted file mode 100644 index bfa84344..00000000 --- a/docs/models/operations/GetStatisticsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetStatisticsResponse - - -## 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/GetStatisticsResponseBody.md) | :heavy_minus_sign: | Media Statistics | \ No newline at end of file diff --git a/docs/models/operations/GetStatisticsResponseBody.md b/docs/models/operations/GetStatisticsResponseBody.md deleted file mode 100644 index e878d17c..00000000 --- a/docs/models/operations/GetStatisticsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetStatisticsResponseBody - -Media Statistics - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `mediaContainer` | [Optional\](../../models/operations/GetStatisticsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetStreamLevelsLevel.md b/docs/models/operations/GetStreamLevelsLevel.md new file mode 100644 index 00000000..0a93067c --- /dev/null +++ b/docs/models/operations/GetStreamLevelsLevel.md @@ -0,0 +1,8 @@ +# GetStreamLevelsLevel + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `v` | *Optional\* | :heavy_minus_sign: | The level in db. | \ No newline at end of file diff --git a/docs/models/operations/GetStreamLevelsMediaContainer.md b/docs/models/operations/GetStreamLevelsMediaContainer.md new file mode 100644 index 00000000..4f451d3c --- /dev/null +++ b/docs/models/operations/GetStreamLevelsMediaContainer.md @@ -0,0 +1,18 @@ +# GetStreamLevelsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `level` | List\<[GetStreamLevelsLevel](../../models/operations/GetStreamLevelsLevel.md)> | :heavy_minus_sign: | N/A | +| `totalSamples` | *Optional\* | :heavy_minus_sign: | The total number of samples (as a string) | \ No newline at end of file diff --git a/docs/models/operations/GetStreamLevelsRequest.md b/docs/models/operations/GetStreamLevelsRequest.md new file mode 100644 index 00000000..9d1b4351 --- /dev/null +++ b/docs/models/operations/GetStreamLevelsRequest.md @@ -0,0 +1,20 @@ +# GetStreamLevelsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `streamId` | *long* | :heavy_check_mark: | The id of the stream | | +| `subsample` | *Optional\* | :heavy_minus_sign: | Subsample result down to return only the provided number of samples | | \ No newline at end of file diff --git a/docs/models/operations/GetStreamLevelsResponse.md b/docs/models/operations/GetStreamLevelsResponse.md new file mode 100644 index 00000000..f1b080ed --- /dev/null +++ b/docs/models/operations/GetStreamLevelsResponse.md @@ -0,0 +1,11 @@ +# GetStreamLevelsResponse + + +## 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/GetStreamLevelsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetStreamLevelsResponseBody.md b/docs/models/operations/GetStreamLevelsResponseBody.md new file mode 100644 index 00000000..7be61beb --- /dev/null +++ b/docs/models/operations/GetStreamLevelsResponseBody.md @@ -0,0 +1,10 @@ +# GetStreamLevelsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetStreamLevelsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetStreamLoudnessRequest.md b/docs/models/operations/GetStreamLoudnessRequest.md new file mode 100644 index 00000000..211340c5 --- /dev/null +++ b/docs/models/operations/GetStreamLoudnessRequest.md @@ -0,0 +1,20 @@ +# GetStreamLoudnessRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `streamId` | *long* | :heavy_check_mark: | The id of the stream | | +| `subsample` | *Optional\* | :heavy_minus_sign: | Subsample result down to return only the provided number of samples | | \ No newline at end of file diff --git a/docs/models/operations/GetStreamLoudnessResponse.md b/docs/models/operations/GetStreamLoudnessResponse.md new file mode 100644 index 00000000..45ac1764 --- /dev/null +++ b/docs/models/operations/GetStreamLoudnessResponse.md @@ -0,0 +1,11 @@ +# GetStreamLoudnessResponse + + +## 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 | +| `res` | *Optional\* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetStreamRequest.md b/docs/models/operations/GetStreamRequest.md new file mode 100644 index 00000000..17111eae --- /dev/null +++ b/docs/models/operations/GetStreamRequest.md @@ -0,0 +1,23 @@ +# GetStreamRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `streamId` | *long* | :heavy_check_mark: | The id of the stream | | +| `ext` | *String* | :heavy_check_mark: | The extension of the stream. Required to fetch the `sub` portion of `idx`/`sub` subtitles | | +| `encoding` | *Optional\* | :heavy_minus_sign: | The requested encoding for the subtitle (only used for text subtitles) | | +| `format` | *Optional\* | :heavy_minus_sign: | The requested format for the subtitle to convert the subtitles to (only used for text subtitles) | | +| `autoAdjustSubtitle` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether the server should attempt to automatically adjust the subtitle timestamps to match the media | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetStreamResponse.md b/docs/models/operations/GetStreamResponse.md new file mode 100644 index 00000000..0375d710 --- /dev/null +++ b/docs/models/operations/GetStreamResponse.md @@ -0,0 +1,10 @@ +# GetStreamResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetSubscriptionRequest.md b/docs/models/operations/GetSubscriptionRequest.md new file mode 100644 index 00000000..0b67de56 --- /dev/null +++ b/docs/models/operations/GetSubscriptionRequest.md @@ -0,0 +1,21 @@ +# GetSubscriptionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `subscriptionId` | *long* | :heavy_check_mark: | N/A | | +| `includeGrabs` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates whether the active grabs should be included as well | 1 | +| `includeStorage` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Compute the storage of recorded items desired by this subscription | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetSubscriptionResponse.md b/docs/models/operations/GetSubscriptionResponse.md new file mode 100644 index 00000000..3bd6d62c --- /dev/null +++ b/docs/models/operations/GetSubscriptionResponse.md @@ -0,0 +1,11 @@ +# GetSubscriptionResponse + + +## 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 | +| `mediaContainerWithSubscription` | [Optional\](../../models/shared/MediaContainerWithSubscription.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetTagsMediaContainer.md b/docs/models/operations/GetTagsMediaContainer.md new file mode 100644 index 00000000..4a20f1a8 --- /dev/null +++ b/docs/models/operations/GetTagsMediaContainer.md @@ -0,0 +1,17 @@ +# GetTagsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | List\<[Directory](../../models/operations/Directory.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTagsRequest.md b/docs/models/operations/GetTagsRequest.md new file mode 100644 index 00000000..e0f123cd --- /dev/null +++ b/docs/models/operations/GetTagsRequest.md @@ -0,0 +1,19 @@ +# GetTagsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `type` | *Optional\* | :heavy_minus_sign: | The metadata type to filter by | | \ No newline at end of file diff --git a/docs/models/operations/GetTagsResponse.md b/docs/models/operations/GetTagsResponse.md new file mode 100644 index 00000000..199e16c9 --- /dev/null +++ b/docs/models/operations/GetTagsResponse.md @@ -0,0 +1,11 @@ +# GetTagsResponse + + +## 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/GetTagsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetTagsResponseBody.md b/docs/models/operations/GetTagsResponseBody.md new file mode 100644 index 00000000..7b18ceec --- /dev/null +++ b/docs/models/operations/GetTagsResponseBody.md @@ -0,0 +1,10 @@ +# GetTagsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/GetTagsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTasksResponse.md b/docs/models/operations/GetTasksResponse.md new file mode 100644 index 00000000..3fcdd0a3 --- /dev/null +++ b/docs/models/operations/GetTasksResponse.md @@ -0,0 +1,11 @@ +# GetTasksResponse + + +## 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/GetTasksResponseBody.md) | :heavy_minus_sign: | Butler tasks | \ No newline at end of file diff --git a/docs/models/operations/GetTasksResponseBody.md b/docs/models/operations/GetTasksResponseBody.md new file mode 100644 index 00000000..6f54a53d --- /dev/null +++ b/docs/models/operations/GetTasksResponseBody.md @@ -0,0 +1,10 @@ +# GetTasksResponseBody + +Butler tasks + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `butlerTasks` | [Optional\](../../models/operations/ButlerTasks.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTemplateMediaContainer.md b/docs/models/operations/GetTemplateMediaContainer.md new file mode 100644 index 00000000..d4939b6c --- /dev/null +++ b/docs/models/operations/GetTemplateMediaContainer.md @@ -0,0 +1,17 @@ +# GetTemplateMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `subscriptionTemplate` | List\<[SubscriptionTemplate](../../models/operations/SubscriptionTemplate.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTemplateRequest.md b/docs/models/operations/GetTemplateRequest.md new file mode 100644 index 00000000..2a92e417 --- /dev/null +++ b/docs/models/operations/GetTemplateRequest.md @@ -0,0 +1,19 @@ +# GetTemplateRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `guid` | *Optional\* | :heavy_minus_sign: | The guid of the item for which to get the template | plex://episode/5fc70265c40548002d539d23 | \ No newline at end of file diff --git a/docs/models/operations/GetTemplateResponse.md b/docs/models/operations/GetTemplateResponse.md new file mode 100644 index 00000000..71b5dd43 --- /dev/null +++ b/docs/models/operations/GetTemplateResponse.md @@ -0,0 +1,12 @@ +# GetTemplateResponse + + +## 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/GetTemplateResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTemplateResponseBody.md b/docs/models/operations/GetTemplateResponseBody.md new file mode 100644 index 00000000..2904ef80 --- /dev/null +++ b/docs/models/operations/GetTemplateResponseBody.md @@ -0,0 +1,10 @@ +# GetTemplateResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetTemplateMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetThumbImageRequest.md b/docs/models/operations/GetThumbImageRequest.md deleted file mode 100644 index b31d8f83..00000000 --- a/docs/models/operations/GetThumbImageRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetThumbImageRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | -| `width` | *long* | :heavy_check_mark: | N/A | 396 | -| `height` | *long* | :heavy_check_mark: | N/A | 396 | -| `minSize` | *long* | :heavy_check_mark: | N/A | 1 | -| `upscale` | *long* | :heavy_check_mark: | N/A | 1 | -| `xPlexToken` | *String* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/GetThumbImageResponse.md b/docs/models/operations/GetThumbImageResponse.md deleted file mode 100644 index 97cbff58..00000000 --- a/docs/models/operations/GetThumbImageResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetThumbImageResponse - - -## 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 | -| `responseStream` | *Optional\* | :heavy_minus_sign: | Successful response returning an image | -| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetThumbRequest.md b/docs/models/operations/GetThumbRequest.md new file mode 100644 index 00000000..559e1377 --- /dev/null +++ b/docs/models/operations/GetThumbRequest.md @@ -0,0 +1,20 @@ +# GetThumbRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device. | | +| `versionPathParameter` | *long* | :heavy_check_mark: | A version number of the thumb used for busting cache | | \ No newline at end of file diff --git a/docs/models/operations/GetThumbResponse.md b/docs/models/operations/GetThumbResponse.md new file mode 100644 index 00000000..fd922c27 --- /dev/null +++ b/docs/models/operations/GetThumbResponse.md @@ -0,0 +1,10 @@ +# GetThumbResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetTimelineRequest.md b/docs/models/operations/GetTimelineRequest.md deleted file mode 100644 index 50409428..00000000 --- a/docs/models/operations/GetTimelineRequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTimelineRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `ratingKey` | *double* | :heavy_check_mark: | The rating key of the media item | 23409 | -| `key` | *String* | :heavy_check_mark: | The key of the media item to get the timeline for | /library/metadata/23409 | -| `state` | [State](../../models/operations/State.md) | :heavy_check_mark: | The state of the media item | playing | -| `hasMDE` | *double* | :heavy_check_mark: | Whether the media item has MDE | 1 | -| `time` | *double* | :heavy_check_mark: | The time of the media item | 2000 | -| `duration` | *double* | :heavy_check_mark: | The duration of the media item | 10000 | -| `context` | *String* | :heavy_check_mark: | The context of the media item | home:hub.continueWatching | -| `playQueueItemID` | *double* | :heavy_check_mark: | The play queue item ID of the media item | 1 | -| `playBackTime` | *double* | :heavy_check_mark: | The playback time of the media item | 2000 | -| `row` | *double* | :heavy_check_mark: | The row of the media item | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetTimelineResponse.md b/docs/models/operations/GetTimelineResponse.md deleted file mode 100644 index 0477ed6b..00000000 --- a/docs/models/operations/GetTimelineResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTimelineResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetTokenByPinIdAuthPinContainer.md b/docs/models/operations/GetTokenByPinIdAuthPinContainer.md deleted file mode 100644 index af5a8dcf..00000000 --- a/docs/models/operations/GetTokenByPinIdAuthPinContainer.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTokenByPinIdAuthPinContainer - -The Pin with a non-null authToken when it has been verified by the user - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | N/A | 308667304 | -| `code` | *String* | :heavy_check_mark: | N/A | 7RQZ | -| `product` | *String* | :heavy_check_mark: | N/A | Tautulli | -| `trusted` | *Optional\* | :heavy_minus_sign: | N/A | | -| `qr` | *String* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ | -| `clientIdentifier` | *String* | :heavy_check_mark: | The X-Client-Identifier used in the request | Tautulli | -| `location` | [GetTokenByPinIdGeoData](../../models/operations/GetTokenByPinIdGeoData.md) | :heavy_check_mark: | Geo location data | {
"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` | *Optional\* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z | -| `expiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z | -| `authToken` | *JsonNullable\* | :heavy_minus_sign: | N/A | gcgzw5rz2xovp84b4vha3a40 | -| `newRegistration` | *JsonNullable\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetTokenByPinIdGeoData.md b/docs/models/operations/GetTokenByPinIdGeoData.md deleted file mode 100644 index 4e1199d2..00000000 --- a/docs/models/operations/GetTokenByPinIdGeoData.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetTokenByPinIdGeoData - -Geo location data - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | *String* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI | -| `continentCode` | *String* | :heavy_check_mark: | The continent code where the country is located. | NA | -| `country` | *String* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands | -| `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam | -| `europeanUnionMember` | *Optional\* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | -| `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | -| `postalCode` | *String* | :heavy_check_mark: | The postal code of the location. | 802 | -| `inPrivacyRestrictedCountry` | *Optional\* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | -| `inPrivacyRestrictedRegion` | *Optional\* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | -| `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | -| `coordinates` | *String* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 | \ No newline at end of file diff --git a/docs/models/operations/GetTokenByPinIdRequest.md b/docs/models/operations/GetTokenByPinIdRequest.md deleted file mode 100644 index 784d2619..00000000 --- a/docs/models/operations/GetTokenByPinIdRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetTokenByPinIdRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | | -| `clientID` | *String* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `clientName` | *Optional\* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | -| `deviceNickname` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | -| `clientVersion` | *Optional\* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | -| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client application. | Roku | \ No newline at end of file diff --git a/docs/models/operations/GetTokenByPinIdResponse.md b/docs/models/operations/GetTokenByPinIdResponse.md deleted file mode 100644 index 09c5254e..00000000 --- a/docs/models/operations/GetTokenByPinIdResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTokenByPinIdResponse - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | | -| `authPinContainer` | [Optional\](../../models/operations/GetTokenByPinIdAuthPinContainer.md) | :heavy_minus_sign: | The Pin with a non-null authToken when it has been verified by the user | {
"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
} | \ No newline at end of file diff --git a/docs/models/operations/GetTokenDetailsAuthenticationResponseStatus.md b/docs/models/operations/GetTokenDetailsAuthenticationResponseStatus.md deleted file mode 100644 index c13e886f..00000000 --- a/docs/models/operations/GetTokenDetailsAuthenticationResponseStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTokenDetailsAuthenticationResponseStatus - -String representation of subscriptionActive - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `INACTIVE` | Inactive | -| `ACTIVE` | Active | \ No newline at end of file diff --git a/docs/models/operations/GetTokenDetailsAuthenticationStatus.md b/docs/models/operations/GetTokenDetailsAuthenticationStatus.md deleted file mode 100644 index 7a8ee4bd..00000000 --- a/docs/models/operations/GetTokenDetailsAuthenticationStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTokenDetailsAuthenticationStatus - -String representation of subscriptionActive - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `INACTIVE` | Inactive | -| `ACTIVE` | Active | \ No newline at end of file diff --git a/docs/models/operations/GetTokenDetailsResponse.md b/docs/models/operations/GetTokenDetailsResponse.md deleted file mode 100644 index d03a20b3..00000000 --- a/docs/models/operations/GetTokenDetailsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTokenDetailsResponse - - -## 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 | -| `userPlexAccount` | [Optional\](../../models/operations/GetTokenDetailsUserPlexAccount.md) | :heavy_minus_sign: | Logged in user details | \ No newline at end of file diff --git a/docs/models/operations/GetTokenDetailsStatus.md b/docs/models/operations/GetTokenDetailsStatus.md deleted file mode 100644 index 94e900d1..00000000 --- a/docs/models/operations/GetTokenDetailsStatus.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTokenDetailsStatus - - -## Values - -| Name | Value | -| --------- | --------- | -| `ONLINE` | online | -| `OFFLINE` | offline | \ No newline at end of file diff --git a/docs/models/operations/GetTokenDetailsSubscription.md b/docs/models/operations/GetTokenDetailsSubscription.md deleted file mode 100644 index c109fc84..00000000 --- a/docs/models/operations/GetTokenDetailsSubscription.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetTokenDetailsSubscription - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `features` | List\<*String*> | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | -| `active` | *Optional\* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | -| `subscribedAt` | *JsonNullable\* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | -| `status` | [Optional\](../../models/operations/GetTokenDetailsAuthenticationResponseStatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | -| `paymentService` | *JsonNullable\* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | -| `plan` | *JsonNullable\* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/models/operations/GetTokenDetailsUserPlexAccount.md b/docs/models/operations/GetTokenDetailsUserPlexAccount.md deleted file mode 100644 index 670b8477..00000000 --- a/docs/models/operations/GetTokenDetailsUserPlexAccount.md +++ /dev/null @@ -1,50 +0,0 @@ -# GetTokenDetailsUserPlexAccount - -Logged in user details - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `adsConsent` | *Optional\* | :heavy_check_mark: | Unknown | | -| `adsConsentReminderAt` | *Optional\* | :heavy_check_mark: | N/A | 1556281940 | -| `adsConsentSetAt` | *Optional\* | :heavy_check_mark: | N/A | 1556281940 | -| `anonymous` | *JsonNullable\* | :heavy_minus_sign: | Unknown | | -| `authToken` | *String* | :heavy_check_mark: | The account token | CxoUzBTSV5hsxjTpFKaf | -| `backupCodesCreated` | *Optional\* | :heavy_minus_sign: | If the two-factor authentication backup codes have been created | | -| `confirmed` | *Optional\* | :heavy_minus_sign: | If the account has been confirmed | | -| `country` | *String* | :heavy_check_mark: | The account country | US | -| `email` | *String* | :heavy_check_mark: | The account email address | username@email.com | -| `emailOnlyAuth` | *Optional\* | :heavy_minus_sign: | If login with email only is enabled | | -| `experimentalFeatures` | *Optional\* | :heavy_minus_sign: | If experimental features are enabled | | -| `friendlyName` | *String* | :heavy_check_mark: | Your account full name | friendlyUsername | -| `entitlements` | List\<*String*> | :heavy_check_mark: | List of devices your allowed to use with this account | | -| `guest` | *Optional\* | :heavy_minus_sign: | If the account is a Plex Home guest user | | -| `hasPassword` | *Optional\* | :heavy_minus_sign: | If the account has a password | | -| `home` | *Optional\* | :heavy_minus_sign: | If the account is a Plex Home user | | -| `homeAdmin` | *Optional\* | :heavy_minus_sign: | If the account is the Plex Home admin | | -| `homeSize` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 | -| `id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 | -| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `locale` | *Optional\* | :heavy_check_mark: | The account locale | | -| `mailingListActive` | *Optional\* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | | -| `mailingListStatus` | [MailingListStatus](../../models/operations/MailingListStatus.md) | :heavy_check_mark: | Your current mailing list status (active or unsubscribed) | active | -| `maxHomeSize` | *int* | :heavy_check_mark: | The maximum number of accounts allowed in the Plex Home | 15 | -| ~~`pin`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

[Might be removed] The hashed Plex Home PIN | | -| `profile` | [UserProfile](../../models/operations/UserProfile.md) | :heavy_check_mark: | N/A | | -| `protected_` | *Optional\* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | | -| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `restricted` | *Optional\* | :heavy_minus_sign: | If the account is a Plex Home managed user | | -| `roles` | List\<*String*> | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | | -| `scrobbleTypes` | *String* | :heavy_check_mark: | Unknown | | -| `services` | List\<[Services](../../models/operations/Services.md)> | :heavy_check_mark: | N/A | | -| `subscription` | [Subscription](../../models/operations/Subscription.md) | :heavy_check_mark: | If the account’s Plex Pass subscription is active | | -| `subscriptionDescription` | *Optional\* | :heavy_check_mark: | Description of the Plex Pass subscription | | -| `subscriptions` | List\<[GetTokenDetailsSubscription](../../models/operations/GetTokenDetailsSubscription.md)> | :heavy_minus_sign: | N/A | | -| `thumb` | *String* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 | -| `title` | *String* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle | -| `twoFactorEnabled` | *Optional\* | :heavy_minus_sign: | If two-factor authentication is enabled | | -| `username` | *String* | :heavy_check_mark: | The account username | Username | -| `uuid` | *String* | :heavy_check_mark: | The account UUID | dae343c1f45beb4f | -| `attributionPartner` | *Optional\* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentCountry.md b/docs/models/operations/GetTopWatchedContentCountry.md deleted file mode 100644 index f7172c19..00000000 --- a/docs/models/operations/GetTopWatchedContentCountry.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTopWatchedContentCountry - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 116 | -| `filter` | *Optional\* | :heavy_minus_sign: | N/A | country=116 | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentGenre.md b/docs/models/operations/GetTopWatchedContentGenre.md deleted file mode 100644 index 562eed33..00000000 --- a/docs/models/operations/GetTopWatchedContentGenre.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTopWatchedContentGenre - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 184 | -| `filter` | *Optional\* | :heavy_minus_sign: | N/A | genre=184 | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Thriller | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentGuids.md b/docs/models/operations/GetTopWatchedContentGuids.md deleted file mode 100644 index 65be8ea9..00000000 --- a/docs/models/operations/GetTopWatchedContentGuids.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetTopWatchedContentGuids - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | tvdb://2337 | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentMediaContainer.md b/docs/models/operations/GetTopWatchedContentMediaContainer.md deleted file mode 100644 index f22a63e7..00000000 --- a/docs/models/operations/GetTopWatchedContentMediaContainer.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetTopWatchedContentMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `metadata` | List\<[GetTopWatchedContentMetadata](../../models/operations/GetTopWatchedContentMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentMetadata.md b/docs/models/operations/GetTopWatchedContentMetadata.md deleted file mode 100644 index c5d919dd..00000000 --- a/docs/models/operations/GetTopWatchedContentMetadata.md +++ /dev/null @@ -1,39 +0,0 @@ -# GetTopWatchedContentMetadata - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | 17 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/17 | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | -| `slug` | *Optional\* | :heavy_minus_sign: | N/A | waterloo-road | -| `studio` | *Optional\* | :heavy_minus_sign: | N/A | Universal Pictures | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | movie | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Serenity | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `contentRating` | *Optional\* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | -| `index` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `audienceRating` | *Optional\* | :heavy_minus_sign: | N/A | 9.1 | -| `year` | *Optional\* | :heavy_minus_sign: | N/A | 2005 | -| `tagline` | *Optional\* | :heavy_minus_sign: | N/A | They aim to misbehave. | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 141417 | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | 222 | -| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | N/A | 100 | -| `childCount` | *Optional\* | :heavy_minus_sign: | N/A | 13 | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705637164 | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705637165 | -| `globalViewCount` | *Optional\* | :heavy_minus_sign: | N/A | 80 | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `genre` | List\<[GetTopWatchedContentGenre](../../models/operations/GetTopWatchedContentGenre.md)> | :heavy_minus_sign: | N/A | | -| `country` | List\<[GetTopWatchedContentCountry](../../models/operations/GetTopWatchedContentCountry.md)> | :heavy_minus_sign: | N/A | | -| `guids` | List\<[GetTopWatchedContentGuids](../../models/operations/GetTopWatchedContentGuids.md)> | :heavy_minus_sign: | N/A | | -| `role` | List\<[GetTopWatchedContentRole](../../models/operations/GetTopWatchedContentRole.md)> | :heavy_minus_sign: | N/A | | -| `user` | List\<[GetTopWatchedContentUser](../../models/operations/GetTopWatchedContentUser.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentQueryParamIncludeGuids.md b/docs/models/operations/GetTopWatchedContentQueryParamIncludeGuids.md deleted file mode 100644 index 22fb318b..00000000 --- a/docs/models/operations/GetTopWatchedContentQueryParamIncludeGuids.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetTopWatchedContentQueryParamIncludeGuids - -Adds the Guid object to the response - - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentQueryParamType.md b/docs/models/operations/GetTopWatchedContentQueryParamType.md deleted file mode 100644 index a2fedd2c..00000000 --- a/docs/models/operations/GetTopWatchedContentQueryParamType.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetTopWatchedContentQueryParamType - -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentRequest.md b/docs/models/operations/GetTopWatchedContentRequest.md deleted file mode 100644 index dc4de2fc..00000000 --- a/docs/models/operations/GetTopWatchedContentRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTopWatchedContentRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [GetTopWatchedContentQueryParamType](../../models/operations/GetTopWatchedContentQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | -| `includeGuids` | [Optional\](../../models/operations/GetTopWatchedContentQueryParamIncludeGuids.md) | :heavy_minus_sign: | Adds the Guid object to the response
| 1 | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentResponse.md b/docs/models/operations/GetTopWatchedContentResponse.md deleted file mode 100644 index 2f05219a..00000000 --- a/docs/models/operations/GetTopWatchedContentResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTopWatchedContentResponse - - -## 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/GetTopWatchedContentResponseBody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentResponseBody.md b/docs/models/operations/GetTopWatchedContentResponseBody.md deleted file mode 100644 index a19a4e60..00000000 --- a/docs/models/operations/GetTopWatchedContentResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTopWatchedContentResponseBody - -The metadata of the library item. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetTopWatchedContentMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentRole.md b/docs/models/operations/GetTopWatchedContentRole.md deleted file mode 100644 index af33a9a5..00000000 --- a/docs/models/operations/GetTopWatchedContentRole.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetTopWatchedContentRole - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 220 | -| `filter` | *Optional\* | :heavy_minus_sign: | N/A | actor=220 | -| `tag` | *Optional\* | :heavy_minus_sign: | N/A | Dennis Keiffer | -| `tagKey` | *Optional\* | :heavy_minus_sign: | N/A | 5d77683554f42c001f8c4708 | -| `role` | *Optional\* | :heavy_minus_sign: | N/A | Bar Guy (uncredited) | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg | \ No newline at end of file diff --git a/docs/models/operations/GetTopWatchedContentUser.md b/docs/models/operations/GetTopWatchedContentUser.md deleted file mode 100644 index 71b82023..00000000 --- a/docs/models/operations/GetTopWatchedContentUser.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetTopWatchedContentUser - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 220 | \ No newline at end of file diff --git a/docs/models/operations/GetTranscodeSessionsMediaContainer.md b/docs/models/operations/GetTranscodeSessionsMediaContainer.md deleted file mode 100644 index f528dc2e..00000000 --- a/docs/models/operations/GetTranscodeSessionsMediaContainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTranscodeSessionsMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `transcodeSession` | List\<[TranscodeSession](../../models/operations/TranscodeSession.md)> | :heavy_minus_sign: | N/A | [
{
"key": "vv3i2q2lax92qlzul1hbd4bx",
"throttled": false,
"complete": false,
"progress": 1.7999999523162842,
"size": -22,
"speed": 25.100000381469727,
"error": false,
"duration": 1445695,
"remaining": 53,
"context": "streaming",
"sourceVideoCodec": "h264",
"sourceAudioCodec": "aac",
"videoDecision": "transcode",
"audioDecision": "transcode",
"subtitleDecision": "burn",
"protocol": "http",
"container": "mkv",
"videoCodec": "h264",
"audioCodec": "opus",
"audioChannels": 1,
"transcodeHwRequested": true,
"timeStamp": 1705895805.4919229,
"maxOffsetAvailable": 29.53,
"minOffsetAvailable": 3.003000020980835
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetTranscodeSessionsResponse.md b/docs/models/operations/GetTranscodeSessionsResponse.md deleted file mode 100644 index dadf7131..00000000 --- a/docs/models/operations/GetTranscodeSessionsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetTranscodeSessionsResponse - - -## 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/GetTranscodeSessionsResponseBody.md) | :heavy_minus_sign: | The Transcode Sessions | \ No newline at end of file diff --git a/docs/models/operations/GetTranscodeSessionsResponseBody.md b/docs/models/operations/GetTranscodeSessionsResponseBody.md deleted file mode 100644 index 0378a9a6..00000000 --- a/docs/models/operations/GetTranscodeSessionsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTranscodeSessionsResponseBody - -The Transcode Sessions - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetTranscodeSessionsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetTransientTokenMediaContainer.md b/docs/models/operations/GetTransientTokenMediaContainer.md new file mode 100644 index 00000000..17b77f31 --- /dev/null +++ b/docs/models/operations/GetTransientTokenMediaContainer.md @@ -0,0 +1,17 @@ +# GetTransientTokenMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `token` | *Optional\* | :heavy_minus_sign: | The transient token | \ No newline at end of file diff --git a/docs/models/operations/GetTransientTokenQueryParamType.md b/docs/models/operations/GetTransientTokenQueryParamType.md deleted file mode 100644 index 5c33dc3d..00000000 --- a/docs/models/operations/GetTransientTokenQueryParamType.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTransientTokenQueryParamType - -`delegation` - This is the only supported `type` parameter. - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `DELEGATION` | delegation | \ No newline at end of file diff --git a/docs/models/operations/GetTransientTokenRequest.md b/docs/models/operations/GetTransientTokenRequest.md index 35042f1d..29dc6453 100644 --- a/docs/models/operations/GetTransientTokenRequest.md +++ b/docs/models/operations/GetTransientTokenRequest.md @@ -3,7 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `type` | [GetTransientTokenQueryParamType](../../models/operations/GetTransientTokenQueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | -| `scope` | [Scope](../../models/operations/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `type` | [QueryParamType](../../models/operations/QueryParamType.md) | :heavy_check_mark: | The value `delegation` is the only supported `type` parameter. | | +| `scope` | [Scope](../../models/operations/Scope.md) | :heavy_check_mark: | The value `all` is the only supported `scope` parameter. | | \ No newline at end of file diff --git a/docs/models/operations/GetTransientTokenResponse.md b/docs/models/operations/GetTransientTokenResponse.md index 5e21f966..926a0397 100644 --- a/docs/models/operations/GetTransientTokenResponse.md +++ b/docs/models/operations/GetTransientTokenResponse.md @@ -7,4 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/GetTransientTokenResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetTransientTokenResponseBody.md b/docs/models/operations/GetTransientTokenResponseBody.md new file mode 100644 index 00000000..7c5d4460 --- /dev/null +++ b/docs/models/operations/GetTransientTokenResponseBody.md @@ -0,0 +1,10 @@ +# GetTransientTokenResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/GetTransientTokenMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetUpdateStatusMediaContainer.md b/docs/models/operations/GetUpdateStatusMediaContainer.md deleted file mode 100644 index 6b03dad5..00000000 --- a/docs/models/operations/GetUpdateStatusMediaContainer.md +++ /dev/null @@ -1,13 +0,0 @@ -# GetUpdateStatusMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `canInstall` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `checkedAt` | *Optional\* | :heavy_minus_sign: | N/A | 1705801232 | -| `downloadURL` | *Optional\* | :heavy_minus_sign: | N/A | https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx | -| `status` | *Optional\* | :heavy_minus_sign: | N/A | 0 | -| `release` | List\<[Release](../../models/operations/Release.md)> | :heavy_minus_sign: | N/A | [
{
"key": "https://plex.tv/updater/releases/5136",
"version": "1.40.0.7775-456fbaf97",
"added": "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n(Music) Store track genres and add filtering options (#14653)\n(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n(View History) No longer create a view history entry for items marked as played (#10888)\n(Web) Updated to 4.118.0",
"fixed": "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n(Collection) Server could become unresponsive when collection membership changes (#14612)\n(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n(Library) The Content Rating not equal to None filter does not work (#14620)\n(Search) Album search results could contain all the album's tracks too (#14486)\n(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)",
"downloadURL": "https://plex.tv/downloads/latest/5?channel=8\u0026build=linux-x86_64\u0026distro=redhat\u0026X-Plex-Token=xxxxxxxxxxxxxxxxxxxx",
"state": "notify"
}
] | \ No newline at end of file diff --git a/docs/models/operations/GetUpdateStatusResponse.md b/docs/models/operations/GetUpdateStatusResponse.md deleted file mode 100644 index b4966490..00000000 --- a/docs/models/operations/GetUpdateStatusResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUpdateStatusResponse - - -## 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/GetUpdateStatusResponseBody.md) | :heavy_minus_sign: | The Server Updates | \ No newline at end of file diff --git a/docs/models/operations/GetUpdateStatusResponseBody.md b/docs/models/operations/GetUpdateStatusResponseBody.md deleted file mode 100644 index 81b760e0..00000000 --- a/docs/models/operations/GetUpdateStatusResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetUpdateStatusResponseBody - -The Server Updates - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetUpdateStatusMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetUpdatesStatusMediaContainer.md b/docs/models/operations/GetUpdatesStatusMediaContainer.md new file mode 100644 index 00000000..518202aa --- /dev/null +++ b/docs/models/operations/GetUpdatesStatusMediaContainer.md @@ -0,0 +1,13 @@ +# GetUpdatesStatusMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `autoUpdateVersion` | *Optional\* | :heavy_minus_sign: | The version of the updater (currently `1`) | +| `canInstall` | *Optional\* | :heavy_minus_sign: | Indicates whether this install can be updated through these endpoints (typically only on MacOS and Windows) | +| `checkedAt` | *Optional\* | :heavy_minus_sign: | The last time a check for updates was performed | +| `downloadURL` | *Optional\* | :heavy_minus_sign: | The URL where the update is available | +| `release` | List\<[Release](../../models/operations/Release.md)> | :heavy_minus_sign: | N/A | +| `status` | *Optional\* | :heavy_minus_sign: | The current error code (`0` means no error) | \ No newline at end of file diff --git a/docs/models/operations/GetUpdatesStatusResponse.md b/docs/models/operations/GetUpdatesStatusResponse.md new file mode 100644 index 00000000..c02c95cd --- /dev/null +++ b/docs/models/operations/GetUpdatesStatusResponse.md @@ -0,0 +1,11 @@ +# GetUpdatesStatusResponse + + +## 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/GetUpdatesStatusResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/GetUpdatesStatusResponseBody.md b/docs/models/operations/GetUpdatesStatusResponseBody.md new file mode 100644 index 00000000..83af8460 --- /dev/null +++ b/docs/models/operations/GetUpdatesStatusResponseBody.md @@ -0,0 +1,10 @@ +# GetUpdatesStatusResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/GetUpdatesStatusMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetUpdatesStatusState.md b/docs/models/operations/GetUpdatesStatusState.md new file mode 100644 index 00000000..ac4ba867 --- /dev/null +++ b/docs/models/operations/GetUpdatesStatusState.md @@ -0,0 +1,29 @@ +# GetUpdatesStatusState + +The status of this update. + +- available - This release is available +- downloading - This release is downloading +- downloaded - This release has been downloaded +- installing - This release is installing +- tonight - This release will be installed tonight +- skipped - This release has been skipped +- error - This release has an error +- notify - This release is only notifying it is available (typically because it cannot be installed on this setup) +- done - This release is complete + + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `AVAILABLE` | available | +| `DOWNLOADING` | downloading | +| `DOWNLOADED` | downloaded | +| `INSTALLING` | installing | +| `TONIGHT` | tonight | +| `SKIPPED` | skipped | +| `ERROR` | error | +| `NOTIFY` | notify | +| `DONE` | done | \ No newline at end of file diff --git a/docs/models/operations/GetUserFriendsResponse.md b/docs/models/operations/GetUserFriendsResponse.md deleted file mode 100644 index 6da1e1d1..00000000 --- a/docs/models/operations/GetUserFriendsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUserFriendsResponse - - -## 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 | -| `friends` | List\<[Friend](../../models/operations/Friend.md)> | :heavy_minus_sign: | Friends Data | \ No newline at end of file diff --git a/docs/models/operations/GetUsersMediaContainer.md b/docs/models/operations/GetUsersMediaContainer.md deleted file mode 100644 index 9f8a9294..00000000 --- a/docs/models/operations/GetUsersMediaContainer.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetUsersMediaContainer - -Container holding user and server details. - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `friendlyName` | *String* | :heavy_check_mark: | The friendly name of the Plex instance. | myPlex | -| `identifier` | *String* | :heavy_check_mark: | N/A | com.plexapp.plugins.myplex | -| `machineIdentifier` | *String* | :heavy_check_mark: | Unique Machine identifier of the Plex server. | 3dff4c4da3b1229a649aa574a9e2b419a684a20e | -| `totalSize` | *long* | :heavy_check_mark: | Total number of users. | 30 | -| `size` | *long* | :heavy_check_mark: | Number of users in the current response. | 30 | -| `user` | List\<[User](../../models/operations/User.md)> | :heavy_check_mark: | List of users with access to the Plex server. | | \ No newline at end of file diff --git a/docs/models/operations/GetUsersRequest.md b/docs/models/operations/GetUsersRequest.md deleted file mode 100644 index fb3e5db3..00000000 --- a/docs/models/operations/GetUsersRequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetUsersRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `clientID` | *String* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `clientName` | *Optional\* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | -| `deviceNickname` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | -| `deviceName` | *Optional\* | :heavy_minus_sign: | The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) | Chrome | -| `deviceScreenResolution` | *Optional\* | :heavy_minus_sign: | The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) | 1487x1165,2560x1440 | -| `clientVersion` | *Optional\* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | -| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client application. | Roku | -| `clientFeatures` | *Optional\* | :heavy_minus_sign: | The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) | external-media,indirect-media,hub-style-list | -| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | -| `xPlexSessionId` | *Optional\* | :heavy_minus_sign: | The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) | 97e136ef-4ddd-4ff3-89a7-a5820c96c2ca | -| `xPlexLanguage` | *Optional\* | :heavy_minus_sign: | The language of the client application. | en | -| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | -| `xPlexToken` | *String* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/GetUsersResponse.md b/docs/models/operations/GetUsersResponse.md deleted file mode 100644 index 6b665d9e..00000000 --- a/docs/models/operations/GetUsersResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUsersResponse - - -## 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 | -| `body` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetUsersResponseBody.md b/docs/models/operations/GetUsersResponseBody.md deleted file mode 100644 index 68e0cb50..00000000 --- a/docs/models/operations/GetUsersResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetUsersResponseBody - -Successful response with media container data in XML - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `mediaContainer` | [Optional\](../../models/operations/GetUsersMediaContainer.md) | :heavy_minus_sign: | Container holding user and server details. | \ No newline at end of file diff --git a/docs/models/operations/GetUsersServer.md b/docs/models/operations/GetUsersServer.md deleted file mode 100644 index db7f3cdb..00000000 --- a/docs/models/operations/GetUsersServer.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetUsersServer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `id` | *long* | :heavy_check_mark: | Unique ID of the server of the connected user | 907759180 | -| `serverId` | *long* | :heavy_check_mark: | ID of the actual Plex server. | 9999999 | -| `machineIdentifier` | *String* | :heavy_check_mark: | Machine identifier of the Plex server. | fbb8aa6be6e0c997c6268bc2b4431c8807f70a3 | -| `name` | *String* | :heavy_check_mark: | Name of the Plex server of the connected user. | ConnectedUserFlix | -| `lastSeenAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | -| `numLibraries` | *long* | :heavy_check_mark: | Number of libraries in the server this user has access to. | 16 | -| `allLibraries` | [Optional\](../../models/operations/AllLibraries.md) | :heavy_minus_sign: | N/A | 1 | -| `owned` | [Optional\](../../models/operations/Owned.md) | :heavy_minus_sign: | N/A | 1 | -| `pending` | [Optional\](../../models/operations/Pending.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetWatchListRequest.md b/docs/models/operations/GetWatchListRequest.md deleted file mode 100644 index dafcf8be..00000000 --- a/docs/models/operations/GetWatchListRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetWatchListRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `filter` | [Filter](../../models/operations/Filter.md) | :heavy_check_mark: | Filter | | -| `sort` | *Optional\* | :heavy_minus_sign: | In the format "field:dir". Available fields are "watchlistedAt" (Added At),
"titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating).
"dir" can be "asc" or "desc"
| | -| `libtype` | [Optional\](../../models/operations/Libtype.md) | :heavy_minus_sign: | The type of library to filter. Can be "movie" or "show", or all if not present.
| | -| `maxresults` | *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.
| | -| `includeCollections` | [Optional\](../../models/operations/IncludeCollections.md) | :heavy_minus_sign: | include collections in the results
| | -| `includeExternalMedia` | [Optional\](../../models/operations/IncludeExternalMedia.md) | :heavy_minus_sign: | include external media in the results
| | -| `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 | -| `xPlexToken` | *String* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/GetWatchListResponse.md b/docs/models/operations/GetWatchListResponse.md deleted file mode 100644 index 6c5b262d..00000000 --- a/docs/models/operations/GetWatchListResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetWatchListResponse - - -## 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/GetWatchListResponseBody.md) | :heavy_minus_sign: | Watchlist Data | \ No newline at end of file diff --git a/docs/models/operations/GetWatchListResponseBody.md b/docs/models/operations/GetWatchListResponseBody.md deleted file mode 100644 index 5939a9a3..00000000 --- a/docs/models/operations/GetWatchListResponseBody.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetWatchListResponseBody - -Watchlist Data - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | -| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | N/A | -| `offset` | *Optional\* | :heavy_minus_sign: | N/A | -| `totalSize` | *Optional\* | :heavy_minus_sign: | N/A | -| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | -| `metadata` | List\<[Metadata](../../models/operations/Metadata.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Guids.md b/docs/models/operations/Guids.md deleted file mode 100644 index cd6b0ff7..00000000 --- a/docs/models/operations/Guids.md +++ /dev/null @@ -1,8 +0,0 @@ -# Guids - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/models/operations/HasThumbnail.md b/docs/models/operations/HasThumbnail.md deleted file mode 100644 index 7a4a122d..00000000 --- a/docs/models/operations/HasThumbnail.md +++ /dev/null @@ -1,11 +0,0 @@ -# HasThumbnail - -Indicates if the part has a thumbnail. - - -## Values - -| Name | Value | -| ------- | ------- | -| `False` | 0 | -| `True` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Hidden.md b/docs/models/operations/Hidden.md deleted file mode 100644 index 303b13e8..00000000 --- a/docs/models/operations/Hidden.md +++ /dev/null @@ -1,12 +0,0 @@ -# Hidden - -The Plex library visibility setting - - -## Values - -| Name | Value | -| ---------------------------------- | ---------------------------------- | -| `Visible` | 0 | -| `ExcludeHomeScreen` | 1 | -| `ExcludeHomeScreenAndGlobalSearch` | 2 | \ No newline at end of file diff --git a/docs/models/operations/Hints.md b/docs/models/operations/Hints.md new file mode 100644 index 00000000..baedb29e --- /dev/null +++ b/docs/models/operations/Hints.md @@ -0,0 +1,9 @@ +# Hints + +Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/Home.md b/docs/models/operations/Home.md deleted file mode 100644 index 6733522f..00000000 --- a/docs/models/operations/Home.md +++ /dev/null @@ -1,11 +0,0 @@ -# Home - -Indicates if the user is part of a home group. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/HomeVisibility.md b/docs/models/operations/HomeVisibility.md new file mode 100644 index 00000000..fe364cbb --- /dev/null +++ b/docs/models/operations/HomeVisibility.md @@ -0,0 +1,18 @@ +# HomeVisibility + +Whether this hub is visible on the home screen + - all: Visible to all users + - none: Visible to no users + - admin: Visible to only admin users + - shared: Visible to shared users + + + +## Values + +| Name | Value | +| -------- | -------- | +| `ALL` | all | +| `NONE` | none | +| `ADMIN` | admin | +| `SHARED` | shared | \ No newline at end of file diff --git a/docs/models/operations/Hub.md b/docs/models/operations/Hub.md index 48cf5b51..2a354e64 100644 --- a/docs/models/operations/Hub.md +++ b/docs/models/operations/Hub.md @@ -3,16 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `hubKey` | *Optional\* | :heavy_minus_sign: | N/A | /library/metadata/50768,65523,58188,57341,57302,57070 | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Recent Playlists | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | playlist | -| `hubIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | home.playlists | -| `context` | *Optional\* | :heavy_minus_sign: | N/A | hub.home.playlists | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | 6 | -| `more` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `style` | *Optional\* | :heavy_minus_sign: | N/A | shelf | -| `promoted` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `metadata` | List\<[GetGlobalHubsMetadata](../../models/operations/GetGlobalHubsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `homeVisibility` | [Optional\](../../models/operations/HomeVisibility.md) | :heavy_minus_sign: | Whether this hub is visible on the home screen
- all: Visible to all users
- none: Visible to no users
- admin: Visible to only admin users
- shared: Visible to shared users
| +| `identifier` | *Optional\* | :heavy_minus_sign: | The identifier for this hub | +| `promotedToOwnHome` | *Optional\* | :heavy_minus_sign: | Whether this hub is visible to admin user home | +| `promotedToRecommended` | *Optional\* | :heavy_minus_sign: | Whether this hub is promoted to all for recommendations | +| `promotedToSharedHome` | *Optional\* | :heavy_minus_sign: | Whether this hub is visible to shared user's home | +| `recommendationsVisibility` | [Optional\](../../models/operations/RecommendationsVisibility.md) | :heavy_minus_sign: | The visibility of this hub in recommendations:
- all: Visible to all users
- none: Visible to no users
- admin: Visible to only admin users
- shared: Visible to shared users
| +| `title` | *Optional\* | :heavy_minus_sign: | The title of this hub | \ No newline at end of file diff --git a/docs/models/operations/Image.md b/docs/models/operations/Image.md deleted file mode 100644 index baad8d10..00000000 --- a/docs/models/operations/Image.md +++ /dev/null @@ -1,10 +0,0 @@ -# Image - - -## Fields - -| Field | Type | Required | Description | -| ------------------- | ------------------- | ------------------- | ------------------- | -| `alt` | *Optional\* | :heavy_minus_sign: | N/A | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | -| `url` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/IncludeAdvanced.md b/docs/models/operations/IncludeAdvanced.md deleted file mode 100644 index b7c32d16..00000000 --- a/docs/models/operations/IncludeAdvanced.md +++ /dev/null @@ -1,9 +0,0 @@ -# IncludeAdvanced - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/IncludeCollections.md b/docs/models/operations/IncludeCollections.md deleted file mode 100644 index cc248dfa..00000000 --- a/docs/models/operations/IncludeCollections.md +++ /dev/null @@ -1,12 +0,0 @@ -# IncludeCollections - -include collections in the results - - - -## Values - -| Name | Value | -| ------ | ------ | -| `ONE` | 1 | -| `ZERO` | 0 | \ No newline at end of file diff --git a/docs/models/operations/IncludeDetails.md b/docs/models/operations/IncludeDetails.md deleted file mode 100644 index 4dbe243e..00000000 --- a/docs/models/operations/IncludeDetails.md +++ /dev/null @@ -1,13 +0,0 @@ -# IncludeDetails - -Whether or not to include details for a section (types, filters, and sorts). -Only exists for backwards compatibility, media providers other than the server libraries have it on always. - - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/IncludeExternalMedia.md b/docs/models/operations/IncludeExternalMedia.md deleted file mode 100644 index 07bbeab2..00000000 --- a/docs/models/operations/IncludeExternalMedia.md +++ /dev/null @@ -1,12 +0,0 @@ -# IncludeExternalMedia - -include external media in the results - - - -## Values - -| Name | Value | -| ------ | ------ | -| `ONE` | 1 | -| `ZERO` | 0 | \ No newline at end of file diff --git a/docs/models/operations/IncludeGuids.md b/docs/models/operations/IncludeGuids.md deleted file mode 100644 index eaba0b97..00000000 --- a/docs/models/operations/IncludeGuids.md +++ /dev/null @@ -1,12 +0,0 @@ -# IncludeGuids - -Adds the Guids object to the response - - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/IncludeHttps.md b/docs/models/operations/IncludeHttps.md deleted file mode 100644 index 94382d40..00000000 --- a/docs/models/operations/IncludeHttps.md +++ /dev/null @@ -1,11 +0,0 @@ -# IncludeHttps - -Include Https entries in the results - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/IncludeIPv6.md b/docs/models/operations/IncludeIPv6.md deleted file mode 100644 index 0b70e657..00000000 --- a/docs/models/operations/IncludeIPv6.md +++ /dev/null @@ -1,11 +0,0 @@ -# IncludeIPv6 - -Include IPv6 entries in the results - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/IncludeMeta.md b/docs/models/operations/IncludeMeta.md deleted file mode 100644 index 0f180ebe..00000000 --- a/docs/models/operations/IncludeMeta.md +++ /dev/null @@ -1,12 +0,0 @@ -# IncludeMeta - -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/IncludeRelay.md b/docs/models/operations/IncludeRelay.md deleted file mode 100644 index 2136d5a1..00000000 --- a/docs/models/operations/IncludeRelay.md +++ /dev/null @@ -1,13 +0,0 @@ -# IncludeRelay - -Include Relay addresses in the results -E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Index.md b/docs/models/operations/Index.md new file mode 100644 index 00000000..5e9bb114 --- /dev/null +++ b/docs/models/operations/Index.md @@ -0,0 +1,10 @@ +# Index + +The type of index to grab. + + +## Values + +| Name | Value | +| ----- | ----- | +| `SD` | sd | \ No newline at end of file diff --git a/docs/models/operations/IngestTransientItemRequest.md b/docs/models/operations/IngestTransientItemRequest.md new file mode 100644 index 00000000..a84ed3e1 --- /dev/null +++ b/docs/models/operations/IngestTransientItemRequest.md @@ -0,0 +1,22 @@ +# IngestTransientItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `url` | *Optional\* | :heavy_minus_sign: | The file of the file to ingest. | file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv | +| `virtualFilePath` | *Optional\* | :heavy_minus_sign: | A virtual path to use when the url is opaque. | /Avatar.mkv | +| `computeHashes` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0. | 1 | +| `ingestNonMatches` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether or not non matching media should be stored. Defaults to 0. | 1 | \ No newline at end of file diff --git a/docs/models/operations/IngestTransientItemResponse.md b/docs/models/operations/IngestTransientItemResponse.md new file mode 100644 index 00000000..e5752706 --- /dev/null +++ b/docs/models/operations/IngestTransientItemResponse.md @@ -0,0 +1,12 @@ +# IngestTransientItemResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/InternalPaymentMethod.md b/docs/models/operations/InternalPaymentMethod.md deleted file mode 100644 index f1103c25..00000000 --- a/docs/models/operations/InternalPaymentMethod.md +++ /dev/null @@ -1,7 +0,0 @@ -# InternalPaymentMethod - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/Item.md b/docs/models/operations/Item.md new file mode 100644 index 00000000..8c78374f --- /dev/null +++ b/docs/models/operations/Item.md @@ -0,0 +1,18 @@ +# Item + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `composite` | *Optional\* | :heavy_minus_sign: | The composite thumbnail image path | +| `device` | [Optional\](../../models/operations/GetPlaylistGeneratorDevice.md) | :heavy_minus_sign: | N/A | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `location` | [Optional\](../../models/operations/GetPlaylistGeneratorLocation.md) | :heavy_minus_sign: | N/A | +| `mediaSettings` | [Optional\](../../models/operations/MediaSettings.md) | :heavy_minus_sign: | N/A | +| `policy` | [Optional\](../../models/operations/Policy.md) | :heavy_minus_sign: | N/A | +| `status` | [Optional\](../../models/operations/GetPlaylistGeneratorStatus.md) | :heavy_minus_sign: | N/A | +| `target` | *Optional\* | :heavy_minus_sign: | N/A | +| `targetTagID` | *Optional\* | :heavy_minus_sign: | The tag of this generator's settings | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | [Optional\](../../models/operations/GetPlaylistGeneratorType.md) | :heavy_minus_sign: | The type of this generator | \ No newline at end of file diff --git a/docs/models/operations/Language.md b/docs/models/operations/Language.md new file mode 100644 index 00000000..d1569ffb --- /dev/null +++ b/docs/models/operations/Language.md @@ -0,0 +1,9 @@ +# Language + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `code` | *Optional\* | :heavy_minus_sign: | 3 letter language code | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Level.md b/docs/models/operations/Level.md index 5db4f273..1df216b2 100644 --- a/docs/models/operations/Level.md +++ b/docs/models/operations/Level.md @@ -1,11 +1,11 @@ # Level An integer log level to write to the PMS log with. -0: Error -1: Warning -2: Info -3: Debug -4: Verbose + - 0: Error + - 1: Warning + - 2: Info + - 3: Debug + - 4: Verbose diff --git a/docs/models/operations/Libtype.md b/docs/models/operations/Libtype.md deleted file mode 100644 index 6828dfdc..00000000 --- a/docs/models/operations/Libtype.md +++ /dev/null @@ -1,12 +0,0 @@ -# Libtype - -The type of library to filter. Can be "movie" or "show", or all if not present. - - - -## Values - -| Name | Value | -| ------- | ------- | -| `MOVIE` | movie | -| `SHOW` | show | \ No newline at end of file diff --git a/docs/models/operations/Lineup.md b/docs/models/operations/Lineup.md new file mode 100644 index 00000000..f12f81d7 --- /dev/null +++ b/docs/models/operations/Lineup.md @@ -0,0 +1,13 @@ +# Lineup + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | The type of this object (`lineup` in this case) | +| `lineupType` | [Optional\](../../models/operations/LineupType.md) | :heavy_minus_sign: | - `-1`: N/A
- `0`: Over the air
- `1`: Cable
- `2`: Satellite
- `3`: IPTV
- `4`: Virtual
| +| `location` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | The uuid of this lineup | +| `channel` | List\<[Channel](../../models/shared/Channel.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/LineupType.md b/docs/models/operations/LineupType.md new file mode 100644 index 00000000..b078ed2c --- /dev/null +++ b/docs/models/operations/LineupType.md @@ -0,0 +1,21 @@ +# LineupType + +- `-1`: N/A +- `0`: Over the air +- `1`: Cable +- `2`: Satellite +- `3`: IPTV +- `4`: Virtual + + + +## Values + +| Name | Value | +| -------- | -------- | +| `MINUS1` | -1 | +| `ZERO` | 0 | +| `ONE` | 1 | +| `TWO` | 2 | +| `THREE` | 3 | +| `FOUR` | 4 | \ No newline at end of file diff --git a/docs/models/operations/ListActivitiesMediaContainer.md b/docs/models/operations/ListActivitiesMediaContainer.md new file mode 100644 index 00000000..3fd6166b --- /dev/null +++ b/docs/models/operations/ListActivitiesMediaContainer.md @@ -0,0 +1,8 @@ +# ListActivitiesMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `activity` | List\<[Activity](../../models/operations/Activity.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListActivitiesResponse.md b/docs/models/operations/ListActivitiesResponse.md new file mode 100644 index 00000000..ffeca4c1 --- /dev/null +++ b/docs/models/operations/ListActivitiesResponse.md @@ -0,0 +1,11 @@ +# ListActivitiesResponse + + +## 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/ListActivitiesResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ListActivitiesResponseBody.md b/docs/models/operations/ListActivitiesResponseBody.md new file mode 100644 index 00000000..cabf27ac --- /dev/null +++ b/docs/models/operations/ListActivitiesResponseBody.md @@ -0,0 +1,10 @@ +# ListActivitiesResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/ListActivitiesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListContentRequest.md b/docs/models/operations/ListContentRequest.md new file mode 100644 index 00000000..ec870dac --- /dev/null +++ b/docs/models/operations/ListContentRequest.md @@ -0,0 +1,20 @@ +# ListContentRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `mediaQuery` | [Optional\](../../models/shared/MediaQuery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | +| `sectionId` | *String* | :heavy_check_mark: | The id of the section | | \ No newline at end of file diff --git a/docs/models/operations/ListContentResponse.md b/docs/models/operations/ListContentResponse.md new file mode 100644 index 00000000..d0102827 --- /dev/null +++ b/docs/models/operations/ListContentResponse.md @@ -0,0 +1,12 @@ +# ListContentResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListDVRsDVRsMediaContainer.md b/docs/models/operations/ListDVRsDVRsMediaContainer.md new file mode 100644 index 00000000..02848db6 --- /dev/null +++ b/docs/models/operations/ListDVRsDVRsMediaContainer.md @@ -0,0 +1,17 @@ +# ListDVRsDVRsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *Optional\* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/models/operations/ListDVRsMediaContainer.md b/docs/models/operations/ListDVRsMediaContainer.md new file mode 100644 index 00000000..433cacac --- /dev/null +++ b/docs/models/operations/ListDVRsMediaContainer.md @@ -0,0 +1,9 @@ +# ListDVRsMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/ListDVRsDVRsMediaContainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | List\<[Dvr](../../models/operations/Dvr.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListDVRsResponse.md b/docs/models/operations/ListDVRsResponse.md new file mode 100644 index 00000000..06e87a4f --- /dev/null +++ b/docs/models/operations/ListDVRsResponse.md @@ -0,0 +1,12 @@ +# ListDVRsResponse + + +## 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/ListDVRsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListDVRsResponseBody.md b/docs/models/operations/ListDVRsResponseBody.md new file mode 100644 index 00000000..08cbed00 --- /dev/null +++ b/docs/models/operations/ListDVRsResponseBody.md @@ -0,0 +1,10 @@ +# ListDVRsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/ListDVRsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListDevicesResponse.md b/docs/models/operations/ListDevicesResponse.md new file mode 100644 index 00000000..b253ff9d --- /dev/null +++ b/docs/models/operations/ListDevicesResponse.md @@ -0,0 +1,12 @@ +# ListDevicesResponse + + +## 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 | +| `mediaContainerWithDevice` | [Optional\](../../models/shared/MediaContainerWithDevice.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListDownloadQueueItemsMediaContainer.md b/docs/models/operations/ListDownloadQueueItemsMediaContainer.md new file mode 100644 index 00000000..f8e10ff4 --- /dev/null +++ b/docs/models/operations/ListDownloadQueueItemsMediaContainer.md @@ -0,0 +1,17 @@ +# ListDownloadQueueItemsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `downloadQueueItem` | List\<[DownloadQueueItem](../../models/operations/DownloadQueueItem.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListDownloadQueueItemsRequest.md b/docs/models/operations/ListDownloadQueueItemsRequest.md new file mode 100644 index 00000000..72a78699 --- /dev/null +++ b/docs/models/operations/ListDownloadQueueItemsRequest.md @@ -0,0 +1,19 @@ +# ListDownloadQueueItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *long* | :heavy_check_mark: | The queue id | | \ No newline at end of file diff --git a/docs/models/operations/ListDownloadQueueItemsResponse.md b/docs/models/operations/ListDownloadQueueItemsResponse.md new file mode 100644 index 00000000..06592eac --- /dev/null +++ b/docs/models/operations/ListDownloadQueueItemsResponse.md @@ -0,0 +1,11 @@ +# ListDownloadQueueItemsResponse + + +## 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/ListDownloadQueueItemsResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ListDownloadQueueItemsResponseBody.md b/docs/models/operations/ListDownloadQueueItemsResponseBody.md new file mode 100644 index 00000000..22f874a8 --- /dev/null +++ b/docs/models/operations/ListDownloadQueueItemsResponseBody.md @@ -0,0 +1,10 @@ +# ListDownloadQueueItemsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/ListDownloadQueueItemsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListDownloadQueueItemsStatus.md b/docs/models/operations/ListDownloadQueueItemsStatus.md new file mode 100644 index 00000000..b9a4bf42 --- /dev/null +++ b/docs/models/operations/ListDownloadQueueItemsStatus.md @@ -0,0 +1,22 @@ +# ListDownloadQueueItemsStatus + +The state of the item: + - deciding: The item decision is pending + - waiting: The item is waiting for transcode + - processing: The item is being transcoded + - available: The item is available for download + - error: The item encountered an error in the decision or transcode + - expired: The transcoded item has timed out and is no longer available + + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `DECIDING` | deciding | +| `WAITING` | waiting | +| `PROCESSING` | processing | +| `AVAILABLE` | available | +| `ERROR` | error | +| `EXPIRED` | expired | \ No newline at end of file diff --git a/docs/models/operations/ListHubsMediaContainer.md b/docs/models/operations/ListHubsMediaContainer.md new file mode 100644 index 00000000..786ab778 --- /dev/null +++ b/docs/models/operations/ListHubsMediaContainer.md @@ -0,0 +1,17 @@ +# ListHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | List\<[Hub](../../models/operations/Hub.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListHubsRequest.md b/docs/models/operations/ListHubsRequest.md new file mode 100644 index 00000000..7e416459 --- /dev/null +++ b/docs/models/operations/ListHubsRequest.md @@ -0,0 +1,20 @@ +# ListHubsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | The section ID for the hubs to reorder | | +| `metadataItemId` | *Optional\* | :heavy_minus_sign: | Restrict hubs to ones relevant to the provided metadata item | | \ No newline at end of file diff --git a/docs/models/operations/ListHubsResponse.md b/docs/models/operations/ListHubsResponse.md new file mode 100644 index 00000000..a419e656 --- /dev/null +++ b/docs/models/operations/ListHubsResponse.md @@ -0,0 +1,12 @@ +# ListHubsResponse + + +## 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/ListHubsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListHubsResponseBody.md b/docs/models/operations/ListHubsResponseBody.md new file mode 100644 index 00000000..f3e52682 --- /dev/null +++ b/docs/models/operations/ListHubsResponseBody.md @@ -0,0 +1,10 @@ +# ListHubsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/ListHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListLineupsRequest.md b/docs/models/operations/ListLineupsRequest.md new file mode 100644 index 00000000..7bb46b84 --- /dev/null +++ b/docs/models/operations/ListLineupsRequest.md @@ -0,0 +1,21 @@ +# ListLineupsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `country` | *String* | :heavy_check_mark: | 3 letter country code | | +| `epgId` | *String* | :heavy_check_mark: | The `providerIdentifier` of the provider | | +| `region` | *String* | :heavy_check_mark: | The region for the lineup | | \ No newline at end of file diff --git a/docs/models/operations/ListLineupsResponse.md b/docs/models/operations/ListLineupsResponse.md new file mode 100644 index 00000000..4abbaed4 --- /dev/null +++ b/docs/models/operations/ListLineupsResponse.md @@ -0,0 +1,12 @@ +# ListLineupsResponse + + +## 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 | +| `mediaContainerWithLineup` | [Optional\](../../models/shared/MediaContainerWithLineup.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListMatchesRequest.md b/docs/models/operations/ListMatchesRequest.md new file mode 100644 index 00000000..66f3556d --- /dev/null +++ b/docs/models/operations/ListMatchesRequest.md @@ -0,0 +1,25 @@ +# ListMatchesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | N/A | | +| `agent` | *Optional\* | :heavy_minus_sign: | N/A | | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | | +| `year` | *Optional\* | :heavy_minus_sign: | N/A | | +| `manual` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/ListMatchesResponse.md b/docs/models/operations/ListMatchesResponse.md new file mode 100644 index 00000000..99429eba --- /dev/null +++ b/docs/models/operations/ListMatchesResponse.md @@ -0,0 +1,11 @@ +# ListMatchesResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ListMomentsRequest.md b/docs/models/operations/ListMomentsRequest.md new file mode 100644 index 00000000..4a15c749 --- /dev/null +++ b/docs/models/operations/ListMomentsRequest.md @@ -0,0 +1,19 @@ +# ListMomentsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/ListMomentsResponse.md b/docs/models/operations/ListMomentsResponse.md new file mode 100644 index 00000000..9c031967 --- /dev/null +++ b/docs/models/operations/ListMomentsResponse.md @@ -0,0 +1,11 @@ +# ListMomentsResponse + + +## 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 | +| `mediaContainerWithArtwork` | [Optional\](../../models/shared/MediaContainerWithArtwork.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ListPersonMediaRequest.md b/docs/models/operations/ListPersonMediaRequest.md new file mode 100644 index 00000000..e92c6c54 --- /dev/null +++ b/docs/models/operations/ListPersonMediaRequest.md @@ -0,0 +1,19 @@ +# ListPersonMediaRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `personId` | *String* | :heavy_check_mark: | Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor | | \ No newline at end of file diff --git a/docs/models/operations/ListPersonMediaResponse.md b/docs/models/operations/ListPersonMediaResponse.md new file mode 100644 index 00000000..f0660a2c --- /dev/null +++ b/docs/models/operations/ListPersonMediaResponse.md @@ -0,0 +1,11 @@ +# ListPersonMediaResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ListPlaybackHistoryMediaContainer.md b/docs/models/operations/ListPlaybackHistoryMediaContainer.md new file mode 100644 index 00000000..70ebf394 --- /dev/null +++ b/docs/models/operations/ListPlaybackHistoryMediaContainer.md @@ -0,0 +1,17 @@ +# ListPlaybackHistoryMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | List\<[ListPlaybackHistoryMetadata](../../models/operations/ListPlaybackHistoryMetadata.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListPlaybackHistoryMetadata.md b/docs/models/operations/ListPlaybackHistoryMetadata.md new file mode 100644 index 00000000..3456222c --- /dev/null +++ b/docs/models/operations/ListPlaybackHistoryMetadata.md @@ -0,0 +1,18 @@ +# ListPlaybackHistoryMetadata + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `accountID` | *Optional\* | :heavy_minus_sign: | The account id of this playback | +| `deviceID` | *Optional\* | :heavy_minus_sign: | The device id which played the item | +| `historyKey` | *Optional\* | :heavy_minus_sign: | The key for this individual history item | +| `key` | *Optional\* | :heavy_minus_sign: | The metadata key for the item played | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The library section id containing the item played | +| `originallyAvailableAt` | *Optional\* | :heavy_minus_sign: | The originally available at of the item played | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | The rating key for the item played | +| `thumb` | *Optional\* | :heavy_minus_sign: | The thumb of the item played | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the item played | +| `type` | *Optional\* | :heavy_minus_sign: | The metadata type of the item played | +| `viewedAt` | *Optional\* | :heavy_minus_sign: | The time when the item was played | \ No newline at end of file diff --git a/docs/models/operations/ListPlaybackHistoryRequest.md b/docs/models/operations/ListPlaybackHistoryRequest.md new file mode 100644 index 00000000..633aaaf1 --- /dev/null +++ b/docs/models/operations/ListPlaybackHistoryRequest.md @@ -0,0 +1,23 @@ +# ListPlaybackHistoryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `accountID` | *Optional\* | :heavy_minus_sign: | The account id to restrict view history | | +| `viewedAt` | *Optional\* | :heavy_minus_sign: | The time period to restrict history (typically of the form `viewedAt>=12456789`) | | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The library section id to restrict view history | | +| `metadataItemID` | *Optional\* | :heavy_minus_sign: | The metadata item to restrict view history (can provide the id for a show to see all of that show's view history). Note this is translated to `metadata_items.id`, `parents.id`, or `grandparents.id` internally depending on the metadata type. | | +| `sort` | List\<*String*> | :heavy_minus_sign: | The field on which to sort. Multiple orderings can be specified separated by `,` and the direction specified following a `:` (`desc` or `asc`; `asc` is assumed if not provided). Note `metadataItemID` may not be used here. | viewedAt:desc,accountID | \ No newline at end of file diff --git a/docs/models/operations/ListPlaybackHistoryResponse.md b/docs/models/operations/ListPlaybackHistoryResponse.md new file mode 100644 index 00000000..6cba8fd4 --- /dev/null +++ b/docs/models/operations/ListPlaybackHistoryResponse.md @@ -0,0 +1,12 @@ +# ListPlaybackHistoryResponse + + +## 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/ListPlaybackHistoryResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListPlaybackHistoryResponseBody.md b/docs/models/operations/ListPlaybackHistoryResponseBody.md new file mode 100644 index 00000000..ad2961c5 --- /dev/null +++ b/docs/models/operations/ListPlaybackHistoryResponseBody.md @@ -0,0 +1,10 @@ +# ListPlaybackHistoryResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/ListPlaybackHistoryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListPlaylistsRequest.md b/docs/models/operations/ListPlaylistsRequest.md new file mode 100644 index 00000000..4a23f764 --- /dev/null +++ b/docs/models/operations/ListPlaylistsRequest.md @@ -0,0 +1,20 @@ +# ListPlaylistsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistType` | [Optional\](../../models/operations/PlaylistType.md) | :heavy_minus_sign: | Limit to a type of playlist | | +| `smart` | *Optional\* | :heavy_minus_sign: | Whether this is a smart collection/playlist | | \ No newline at end of file diff --git a/docs/models/operations/ListPlaylistsResponse.md b/docs/models/operations/ListPlaylistsResponse.md new file mode 100644 index 00000000..413f190d --- /dev/null +++ b/docs/models/operations/ListPlaylistsResponse.md @@ -0,0 +1,12 @@ +# ListPlaylistsResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListProvidersMediaContainer.md b/docs/models/operations/ListProvidersMediaContainer.md new file mode 100644 index 00000000..70c3ed5c --- /dev/null +++ b/docs/models/operations/ListProvidersMediaContainer.md @@ -0,0 +1,68 @@ +# ListProvidersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | A unique identifier for the provider, e.g. `com.plexapp.plugins.library`. | | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| | +| `size` | *Optional\* | :heavy_minus_sign: | N/A | | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| | +| `allowCameraUpload` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowChannelAccess` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowMediaDeletion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowSharing` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowTuners` | *Optional\* | :heavy_minus_sign: | N/A | | +| `backgroundProcessing` | *Optional\* | :heavy_minus_sign: | N/A | | +| `certificate` | *Optional\* | :heavy_minus_sign: | N/A | | +| `companionProxy` | *Optional\* | :heavy_minus_sign: | N/A | | +| `countryCode` | *Optional\* | :heavy_minus_sign: | N/A | | +| `diagnostics` | *Optional\* | :heavy_minus_sign: | N/A | | +| `eventStream` | *Optional\* | :heavy_minus_sign: | N/A | | +| `friendlyName` | *Optional\* | :heavy_minus_sign: | N/A | | +| `hubSearch` | *Optional\* | :heavy_minus_sign: | N/A | | +| `itemClusters` | *Optional\* | :heavy_minus_sign: | N/A | | +| `livetv` | *Optional\* | :heavy_minus_sign: | N/A | 7 | +| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | 0123456789abcdef0123456789abcdef012345678 | +| `mediaProviders` | *Optional\* | :heavy_minus_sign: | N/A | | +| `multiuser` | *Optional\* | :heavy_minus_sign: | N/A | | +| `musicAnalysis` | *Optional\* | :heavy_minus_sign: | N/A | 2 | +| `myPlex` | *Optional\* | :heavy_minus_sign: | N/A | | +| `myPlexMappingState` | *Optional\* | :heavy_minus_sign: | N/A | mapped | +| `myPlexSigninState` | *Optional\* | :heavy_minus_sign: | N/A | ok | +| `myPlexSubscription` | *Optional\* | :heavy_minus_sign: | N/A | | +| `myPlexUsername` | *Optional\* | :heavy_minus_sign: | N/A | | +| `offlineTranscode` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `ownerFeatures` | *Optional\* | :heavy_minus_sign: | A comma-separated list of features which are enabled for the server owner | | +| `platform` | *Optional\* | :heavy_minus_sign: | N/A | | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `pluginHost` | *Optional\* | :heavy_minus_sign: | N/A | | +| `pushNotifications` | *Optional\* | :heavy_minus_sign: | N/A | | +| `readOnlyLibraries` | *Optional\* | :heavy_minus_sign: | N/A | | +| `streamingBrainABRVersion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `streamingBrainVersion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `sync` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderActiveVideoSessions` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderAudio` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderLyrics` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderPhoto` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderSubtitles` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderVideo` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderVideoBitrates` | *Optional\* | :heavy_minus_sign: | The suggested video quality bitrates to present to the user | | +| `transcoderVideoQualities` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderVideoResolutions` | *Optional\* | :heavy_minus_sign: | The suggested video resolutions to the above quality bitrates | | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | | +| `updater` | *Optional\* | :heavy_minus_sign: | N/A | | +| `version` | *Optional\* | :heavy_minus_sign: | N/A | | +| `voiceSearch` | *Optional\* | :heavy_minus_sign: | N/A | | +| `feature` | List\<[Feature](../../models/operations/Feature.md)> | :heavy_minus_sign: | N/A | | +| `protocols` | *Optional\* | :heavy_minus_sign: | A comma-separated list of default protocols for the provider, which can be:
- `stream`: The provider allows streaming media directly from the provider (e.g. for Vimeo). - `download`: The provider allows downloading media for offline storage, sync, etc. (e.g. Podcasts). - `livetv`: The provider provides live content which is only available on a schedule basis. | | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the provider. | | +| `types` | *Optional\* | :heavy_minus_sign: | This attribute contains a comma-separated list of the media types exposed by the provider (e.g. `video, audio`). | | \ No newline at end of file diff --git a/docs/models/operations/ListProvidersResponse.md b/docs/models/operations/ListProvidersResponse.md new file mode 100644 index 00000000..867c010a --- /dev/null +++ b/docs/models/operations/ListProvidersResponse.md @@ -0,0 +1,11 @@ +# ListProvidersResponse + + +## 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/ListProvidersResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ListProvidersResponseBody.md b/docs/models/operations/ListProvidersResponseBody.md new file mode 100644 index 00000000..6c2fd11f --- /dev/null +++ b/docs/models/operations/ListProvidersResponseBody.md @@ -0,0 +1,10 @@ +# ListProvidersResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/ListProvidersMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListSessionsMediaContainer.md b/docs/models/operations/ListSessionsMediaContainer.md new file mode 100644 index 00000000..60796106 --- /dev/null +++ b/docs/models/operations/ListSessionsMediaContainer.md @@ -0,0 +1,17 @@ +# ListSessionsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | List\<[Metadata](../../models/operations/Metadata.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListSessionsResponse.md b/docs/models/operations/ListSessionsResponse.md new file mode 100644 index 00000000..07017f13 --- /dev/null +++ b/docs/models/operations/ListSessionsResponse.md @@ -0,0 +1,12 @@ +# ListSessionsResponse + + +## 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/ListSessionsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListSessionsResponseBody.md b/docs/models/operations/ListSessionsResponseBody.md new file mode 100644 index 00000000..8ca9f030 --- /dev/null +++ b/docs/models/operations/ListSessionsResponseBody.md @@ -0,0 +1,10 @@ +# ListSessionsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/ListSessionsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListSimilarRequest.md b/docs/models/operations/ListSimilarRequest.md new file mode 100644 index 00000000..cad0451a --- /dev/null +++ b/docs/models/operations/ListSimilarRequest.md @@ -0,0 +1,20 @@ +# ListSimilarRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `count` | *Optional\* | :heavy_minus_sign: | Limit results to count items | | \ No newline at end of file diff --git a/docs/models/operations/ListSimilarResponse.md b/docs/models/operations/ListSimilarResponse.md new file mode 100644 index 00000000..9517bffc --- /dev/null +++ b/docs/models/operations/ListSimilarResponse.md @@ -0,0 +1,11 @@ +# ListSimilarResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ListSonicallySimilarRequest.md b/docs/models/operations/ListSonicallySimilarRequest.md new file mode 100644 index 00000000..6c44327b --- /dev/null +++ b/docs/models/operations/ListSonicallySimilarRequest.md @@ -0,0 +1,23 @@ +# ListSonicallySimilarRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `excludeParentID` | *Optional\* | :heavy_minus_sign: | N/A | | +| `excludeGrandparentID` | *Optional\* | :heavy_minus_sign: | N/A | | +| `limit` | *Optional\* | :heavy_minus_sign: | N/A | | +| `maxDistance` | *Optional\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/ListSonicallySimilarResponse.md b/docs/models/operations/ListSonicallySimilarResponse.md new file mode 100644 index 00000000..2c0156a0 --- /dev/null +++ b/docs/models/operations/ListSonicallySimilarResponse.md @@ -0,0 +1,11 @@ +# ListSonicallySimilarResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ListTopUsersMediaContainer.md b/docs/models/operations/ListTopUsersMediaContainer.md new file mode 100644 index 00000000..2374bea3 --- /dev/null +++ b/docs/models/operations/ListTopUsersMediaContainer.md @@ -0,0 +1,17 @@ +# ListTopUsersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `account` | List\<[Account](../../models/operations/Account.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListTopUsersRequest.md b/docs/models/operations/ListTopUsersRequest.md new file mode 100644 index 00000000..94690c4f --- /dev/null +++ b/docs/models/operations/ListTopUsersRequest.md @@ -0,0 +1,19 @@ +# ListTopUsersRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/ListTopUsersResponse.md b/docs/models/operations/ListTopUsersResponse.md new file mode 100644 index 00000000..4ef6bd32 --- /dev/null +++ b/docs/models/operations/ListTopUsersResponse.md @@ -0,0 +1,11 @@ +# ListTopUsersResponse + + +## 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/ListTopUsersResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ListTopUsersResponseBody.md b/docs/models/operations/ListTopUsersResponseBody.md new file mode 100644 index 00000000..2179534c --- /dev/null +++ b/docs/models/operations/ListTopUsersResponseBody.md @@ -0,0 +1,10 @@ +# ListTopUsersResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/ListTopUsersMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Location.md b/docs/models/operations/Location.md index af4b8ab8..544c06c9 100644 --- a/docs/models/operations/Location.md +++ b/docs/models/operations/Location.md @@ -1,10 +1,12 @@ # Location -The folder path for the media item. +Network type of the client, can be used to help determine target bitrate. -## Fields +## Values -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `path` | *String* | :heavy_check_mark: | N/A | /TV Shows/Clarkson's Farm | \ No newline at end of file +| Name | Value | +| ---------- | ---------- | +| `LAN` | lan | +| `WAN` | wan | +| `CELLULAR` | cellular | \ No newline at end of file diff --git a/docs/models/operations/LogLineRequest.md b/docs/models/operations/LogLineRequest.md deleted file mode 100644 index b306db02..00000000 --- a/docs/models/operations/LogLineRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# LogLineRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `level` | [Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
| | -| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message | -| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman | \ No newline at end of file diff --git a/docs/models/operations/LogLineResponse.md b/docs/models/operations/LogLineResponse.md deleted file mode 100644 index d9de99aa..00000000 --- a/docs/models/operations/LogLineResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# LogLineResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/LogMultiLineResponse.md b/docs/models/operations/LogMultiLineResponse.md deleted file mode 100644 index d9e7ea1e..00000000 --- a/docs/models/operations/LogMultiLineResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# LogMultiLineResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/MailingListStatus.md b/docs/models/operations/MailingListStatus.md deleted file mode 100644 index 3f0bbb3b..00000000 --- a/docs/models/operations/MailingListStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# MailingListStatus - -Your current mailing list status (active or unsubscribed) - - -## Values - -| Name | Value | -| -------------- | -------------- | -| `ACTIVE` | active | -| `UNSUBSCRIBED` | unsubscribed | \ No newline at end of file diff --git a/docs/models/operations/MakeDecisionRequest.md b/docs/models/operations/MakeDecisionRequest.md new file mode 100644 index 00000000..975c164c --- /dev/null +++ b/docs/models/operations/MakeDecisionRequest.md @@ -0,0 +1,49 @@ +# MakeDecisionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `transcodeType` | [TranscodeType](../../models/shared/TranscodeType.md) | :heavy_check_mark: | Type of transcode media | | +| `transcodeSessionId` | *Optional\* | :heavy_minus_sign: | Transcode session UUID | | +| `advancedSubtitles` | [Optional\](../../models/shared/AdvancedSubtitles.md) | :heavy_minus_sign: | Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost
| burn | +| `audioBoost` | *Optional\* | :heavy_minus_sign: | Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) | 50 | +| `audioChannelCount` | *Optional\* | :heavy_minus_sign: | Target video number of audio channels. | 5 | +| `autoAdjustQuality` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports ABR. | 1 | +| `autoAdjustSubtitle` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates if the server should adjust subtitles based on Voice Activity Data. | 1 | +| `directPlay` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct playing the indicated content. | 1 | +| `directStream` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the video of the indicated content. | 1 | +| `directStreamAudio` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the audio of the indicated content. | 1 | +| `disableResolutionRotation` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates if resolution should be adjusted for orientation. | 1 | +| `hasMDE` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 | 1 | +| `location` | [Optional\](../../models/operations/Location.md) | :heavy_minus_sign: | Network type of the client, can be used to help determine target bitrate. | wan | +| `mediaBufferSize` | *Optional\* | :heavy_minus_sign: | Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. | 102400 | +| `mediaIndex` | *Optional\* | :heavy_minus_sign: | Index of the media to transcode. -1 or not specified indicates let the server choose. | 0 | +| `musicBitrate` | *Optional\* | :heavy_minus_sign: | Target bitrate for audio only files (in kbps, used to transcode). | 5000 | +| `offset` | *Optional\* | :heavy_minus_sign: | Offset from the start of the media (in seconds). | 90.5 | +| `partIndex` | *Optional\* | :heavy_minus_sign: | Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode | 0 | +| `path` | *Optional\* | :heavy_minus_sign: | Internal PMS path of the media to transcode. | /library/metadata/151671 | +| `peakBitrate` | *Optional\* | :heavy_minus_sign: | Maximum bitrate (in kbps) to use in ABR. | 12000 | +| `photoResolution` | *Optional\* | :heavy_minus_sign: | Target photo resolution. | 1080x1080 | +| `protocol` | [Optional\](../../models/operations/Protocol.md) | :heavy_minus_sign: | Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022)
| dash | +| `secondsPerSegment` | *Optional\* | :heavy_minus_sign: | Number of seconds to include in each transcoded segment | 5 | +| `subtitleSize` | *Optional\* | :heavy_minus_sign: | Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) | 50 | +| `subtitles` | [Optional\](../../models/operations/Subtitles.md) | :heavy_minus_sign: | Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream
| Burn | +| `videoBitrate` | *Optional\* | :heavy_minus_sign: | Target video bitrate (in kbps). | 12000 | +| `videoQuality` | *Optional\* | :heavy_minus_sign: | Target photo quality. | 50 | +| `videoResolution` | *Optional\* | :heavy_minus_sign: | Target maximum video resolution. | 1080x1080 | +| `xPlexClientProfileExtra` | *Optional\* | :heavy_minus_sign: | See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . | add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash) | +| `xPlexClientProfileName` | *Optional\* | :heavy_minus_sign: | Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. | generic | +| `xPlexSessionIdentifier` | *Optional\* | :heavy_minus_sign: | Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) | | \ No newline at end of file diff --git a/docs/models/operations/MakeDecisionResponse.md b/docs/models/operations/MakeDecisionResponse.md new file mode 100644 index 00000000..5e9cfeba --- /dev/null +++ b/docs/models/operations/MakeDecisionResponse.md @@ -0,0 +1,11 @@ +# MakeDecisionResponse + + +## 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 | +| `mediaContainerWithDecision` | [Optional\](../../models/shared/MediaContainerWithDecision.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/MarkPlayedRequest.md b/docs/models/operations/MarkPlayedRequest.md index 59ec5aa2..c797f510 100644 --- a/docs/models/operations/MarkPlayedRequest.md +++ b/docs/models/operations/MarkPlayedRequest.md @@ -3,6 +3,19 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `key` | *double* | :heavy_check_mark: | The media key to mark as played | 59398 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `identifier` | *String* | :heavy_check_mark: | The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` | | +| `key` | *Optional\* | :heavy_minus_sign: | The key of the item to rate. This is the `ratingKey` found in metadata items | | +| `uri` | *Optional\* | :heavy_minus_sign: | The URI of the item to mark as played. See intro for description of the URIs | | \ No newline at end of file diff --git a/docs/models/operations/MarkUnplayedRequest.md b/docs/models/operations/MarkUnplayedRequest.md deleted file mode 100644 index c365eda1..00000000 --- a/docs/models/operations/MarkUnplayedRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# MarkUnplayedRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `key` | *double* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 | \ No newline at end of file diff --git a/docs/models/operations/MarkUnplayedResponse.md b/docs/models/operations/MarkUnplayedResponse.md deleted file mode 100644 index b5085297..00000000 --- a/docs/models/operations/MarkUnplayedResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarkUnplayedResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Marker.md b/docs/models/operations/Marker.md deleted file mode 100644 index e0628947..00000000 --- a/docs/models/operations/Marker.md +++ /dev/null @@ -1,15 +0,0 @@ -# Marker - -The final status of the marker - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | N/A | 306970 | -| `type` | *String* | :heavy_check_mark: | N/A | credits | -| `startTimeOffset` | *long* | :heavy_check_mark: | N/A | 4176050 | -| `endTimeOffset` | *long* | :heavy_check_mark: | N/A | 4393389 | -| `final_` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `attributes` | [Optional\](../../models/operations/Attributes.md) | :heavy_minus_sign: | Attributes associated with the marker. | | \ No newline at end of file diff --git a/docs/models/operations/MatchItemRequest.md b/docs/models/operations/MatchItemRequest.md new file mode 100644 index 00000000..7c53e7f0 --- /dev/null +++ b/docs/models/operations/MatchItemRequest.md @@ -0,0 +1,22 @@ +# MatchItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `guid` | *Optional\* | :heavy_minus_sign: | N/A | | +| `name` | *Optional\* | :heavy_minus_sign: | N/A | | +| `year` | *Optional\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/MatchItemResponse.md b/docs/models/operations/MatchItemResponse.md new file mode 100644 index 00000000..0295d53f --- /dev/null +++ b/docs/models/operations/MatchItemResponse.md @@ -0,0 +1,10 @@ +# MatchItemResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Media.md b/docs/models/operations/Media.md deleted file mode 100644 index f3afe28f..00000000 --- a/docs/models/operations/Media.md +++ /dev/null @@ -1,26 +0,0 @@ -# Media - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `id` | *long* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *Optional\* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *Optional\* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *Optional\* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *Optional\* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | Audio codec used. | eac3 | -| `videoCodec` | *Optional\* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *Optional\* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *Optional\* | :heavy_minus_sign: | File container type. | mkv | -| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | [Optional\](../../models/operations/OptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `part` | List\<[Part](../../models/operations/Part.md)> | :heavy_minus_sign: | An array of parts for this media item. | | \ No newline at end of file diff --git a/docs/models/operations/MediaContainer.md b/docs/models/operations/MediaContainer.md index 19c8f3fa..838aae24 100644 --- a/docs/models/operations/MediaContainer.md +++ b/docs/models/operations/MediaContainer.md @@ -1,58 +1,67 @@ # MediaContainer +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowCameraUpload` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowChannelAccess` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowMediaDeletion` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowSharing` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | -| `allowTuners` | *Optional\* | :heavy_minus_sign: | N/A | -| `backgroundProcessing` | *Optional\* | :heavy_minus_sign: | N/A | -| `certificate` | *Optional\* | :heavy_minus_sign: | N/A | -| `companionProxy` | *Optional\* | :heavy_minus_sign: | N/A | -| `countryCode` | *Optional\* | :heavy_minus_sign: | N/A | -| `diagnostics` | *Optional\* | :heavy_minus_sign: | N/A | -| `eventStream` | *Optional\* | :heavy_minus_sign: | N/A | -| `friendlyName` | *Optional\* | :heavy_minus_sign: | N/A | -| `hubSearch` | *Optional\* | :heavy_minus_sign: | N/A | -| `itemClusters` | *Optional\* | :heavy_minus_sign: | N/A | -| `livetv` | *Optional\* | :heavy_minus_sign: | N/A | -| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | -| `mediaProviders` | *Optional\* | :heavy_minus_sign: | N/A | -| `multiuser` | *Optional\* | :heavy_minus_sign: | N/A | -| `musicAnalysis` | *Optional\* | :heavy_minus_sign: | N/A | -| `myPlex` | *Optional\* | :heavy_minus_sign: | N/A | -| `myPlexMappingState` | *Optional\* | :heavy_minus_sign: | N/A | -| `myPlexSigninState` | *Optional\* | :heavy_minus_sign: | N/A | -| `myPlexSubscription` | *Optional\* | :heavy_minus_sign: | N/A | -| `myPlexUsername` | *Optional\* | :heavy_minus_sign: | N/A | -| `offlineTranscode` | *Optional\* | :heavy_minus_sign: | N/A | -| `ownerFeatures` | *Optional\* | :heavy_minus_sign: | N/A | -| `photoAutoTag` | *Optional\* | :heavy_minus_sign: | N/A | -| `platform` | *Optional\* | :heavy_minus_sign: | N/A | -| `platformVersion` | *Optional\* | :heavy_minus_sign: | N/A | -| `pluginHost` | *Optional\* | :heavy_minus_sign: | N/A | -| `pushNotifications` | *Optional\* | :heavy_minus_sign: | N/A | -| `readOnlyLibraries` | *Optional\* | :heavy_minus_sign: | N/A | -| `streamingBrainABRVersion` | *Optional\* | :heavy_minus_sign: | N/A | -| `streamingBrainVersion` | *Optional\* | :heavy_minus_sign: | N/A | -| `sync` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderActiveVideoSessions` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderAudio` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderLyrics` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderPhoto` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderSubtitles` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderVideo` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderVideoBitrates` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderVideoQualities` | *Optional\* | :heavy_minus_sign: | N/A | -| `transcoderVideoResolutions` | *Optional\* | :heavy_minus_sign: | N/A | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | -| `updater` | *Optional\* | :heavy_minus_sign: | N/A | -| `version` | *Optional\* | :heavy_minus_sign: | N/A | -| `voiceSearch` | *Optional\* | :heavy_minus_sign: | N/A | -| `directory` | List\<[Directory](../../models/operations/Directory.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| | +| `size` | *Optional\* | :heavy_minus_sign: | N/A | | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| | +| `allowCameraUpload` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowChannelAccess` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowMediaDeletion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowSharing` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowTuners` | *Optional\* | :heavy_minus_sign: | N/A | | +| `backgroundProcessing` | *Optional\* | :heavy_minus_sign: | N/A | | +| `certificate` | *Optional\* | :heavy_minus_sign: | N/A | | +| `companionProxy` | *Optional\* | :heavy_minus_sign: | N/A | | +| `countryCode` | *Optional\* | :heavy_minus_sign: | N/A | | +| `diagnostics` | *Optional\* | :heavy_minus_sign: | N/A | | +| `eventStream` | *Optional\* | :heavy_minus_sign: | N/A | | +| `friendlyName` | *Optional\* | :heavy_minus_sign: | N/A | | +| `hubSearch` | *Optional\* | :heavy_minus_sign: | N/A | | +| `itemClusters` | *Optional\* | :heavy_minus_sign: | N/A | | +| `livetv` | *Optional\* | :heavy_minus_sign: | N/A | 7 | +| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | 0123456789abcdef0123456789abcdef012345678 | +| `mediaProviders` | *Optional\* | :heavy_minus_sign: | N/A | | +| `multiuser` | *Optional\* | :heavy_minus_sign: | N/A | | +| `musicAnalysis` | *Optional\* | :heavy_minus_sign: | N/A | 2 | +| `myPlex` | *Optional\* | :heavy_minus_sign: | N/A | | +| `myPlexMappingState` | *Optional\* | :heavy_minus_sign: | N/A | mapped | +| `myPlexSigninState` | *Optional\* | :heavy_minus_sign: | N/A | ok | +| `myPlexSubscription` | *Optional\* | :heavy_minus_sign: | N/A | | +| `myPlexUsername` | *Optional\* | :heavy_minus_sign: | N/A | | +| `offlineTranscode` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `ownerFeatures` | *Optional\* | :heavy_minus_sign: | A comma-separated list of features which are enabled for the server owner | | +| `platform` | *Optional\* | :heavy_minus_sign: | N/A | | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `pluginHost` | *Optional\* | :heavy_minus_sign: | N/A | | +| `pushNotifications` | *Optional\* | :heavy_minus_sign: | N/A | | +| `readOnlyLibraries` | *Optional\* | :heavy_minus_sign: | N/A | | +| `streamingBrainABRVersion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `streamingBrainVersion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `sync` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderActiveVideoSessions` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderAudio` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderLyrics` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderPhoto` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderSubtitles` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderVideo` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderVideoBitrates` | *Optional\* | :heavy_minus_sign: | The suggested video quality bitrates to present to the user | | +| `transcoderVideoQualities` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderVideoResolutions` | *Optional\* | :heavy_minus_sign: | The suggested video resolutions to the above quality bitrates | | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | | +| `updater` | *Optional\* | :heavy_minus_sign: | N/A | | +| `version` | *Optional\* | :heavy_minus_sign: | N/A | | +| `voiceSearch` | *Optional\* | :heavy_minus_sign: | N/A | | +| `bandwidths` | [Optional\](../../models/operations/Bandwidths.md) | :heavy_minus_sign: | A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth | | +| `terminationCode` | *Optional\* | :heavy_minus_sign: | A code describing why the session was terminated by the server. | | +| `terminationText` | *Optional\* | :heavy_minus_sign: | A user friendly and localized text describing why the session was terminated by the server. | | \ No newline at end of file diff --git a/docs/models/operations/MediaGrabber.md b/docs/models/operations/MediaGrabber.md new file mode 100644 index 00000000..f8f036a3 --- /dev/null +++ b/docs/models/operations/MediaGrabber.md @@ -0,0 +1,10 @@ +# MediaGrabber + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `protocol` | *Optional\* | :heavy_minus_sign: | N/A | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/MediaProvider.md b/docs/models/operations/MediaProvider.md deleted file mode 100644 index 52fafef2..00000000 --- a/docs/models/operations/MediaProvider.md +++ /dev/null @@ -1,12 +0,0 @@ -# MediaProvider - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | -| `types` | *Optional\* | :heavy_minus_sign: | N/A | -| `protocols` | *Optional\* | :heavy_minus_sign: | N/A | -| `feature` | List\<[Feature](../../models/operations/Feature.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/MediaReviewsVisibility.md b/docs/models/operations/MediaReviewsVisibility.md deleted file mode 100644 index b36e8021..00000000 --- a/docs/models/operations/MediaReviewsVisibility.md +++ /dev/null @@ -1,11 +0,0 @@ -# MediaReviewsVisibility - -Whether or not the account has media reviews visibility enabled - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/MediaSettings.md b/docs/models/operations/MediaSettings.md new file mode 100644 index 00000000..d601d233 --- /dev/null +++ b/docs/models/operations/MediaSettings.md @@ -0,0 +1,27 @@ +# MediaSettings + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `advancedSubtitles` | [Optional\](../../models/operations/AdvancedSubtitles.md) | :heavy_minus_sign: | N/A | +| `audioBoost` | *Optional\* | :heavy_minus_sign: | N/A | +| `audioChannelCount` | *Optional\* | :heavy_minus_sign: | N/A | +| `autoAdjustQuality` | *Optional\* | :heavy_minus_sign: | N/A | +| `autoAdjustSubtitle` | *Optional\* | :heavy_minus_sign: | N/A | +| `directPlay` | *Optional\* | :heavy_minus_sign: | N/A | +| `directStream` | *Optional\* | :heavy_minus_sign: | N/A | +| `directStreamAudio` | *Optional\* | :heavy_minus_sign: | N/A | +| `disableResolutionRotation` | *Optional\* | :heavy_minus_sign: | N/A | +| `maxVideoBitrate` | *Optional\* | :heavy_minus_sign: | N/A | +| `musicBitrate` | *Optional\* | :heavy_minus_sign: | N/A | +| `peakBitrate` | *Optional\* | :heavy_minus_sign: | N/A | +| `photoQuality` | *Optional\* | :heavy_minus_sign: | N/A | +| `photoResolution` | *Optional\* | :heavy_minus_sign: | N/A | +| `secondsPerSegment` | *Optional\* | :heavy_minus_sign: | N/A | +| `subtitles` | [Optional\](../../models/operations/GetPlaylistGeneratorSubtitles.md) | :heavy_minus_sign: | N/A | +| `subtitleSize` | *Optional\* | :heavy_minus_sign: | N/A | +| `videoBitrate` | *Optional\* | :heavy_minus_sign: | N/A | +| `videoQuality` | *Optional\* | :heavy_minus_sign: | N/A | +| `videoResolution` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/MediaSubscription.md b/docs/models/operations/MediaSubscription.md new file mode 100644 index 00000000..2f8a0081 --- /dev/null +++ b/docs/models/operations/MediaSubscription.md @@ -0,0 +1,28 @@ +# MediaSubscription + +A media subscription contains a representation of metadata desired to be recorded + + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | The title of this subscription type | This Episode | +| `type` | *Optional\* | :heavy_minus_sign: | Metadata type number | | +| `airingsType` | *Optional\* | :heavy_minus_sign: | N/A | | +| `createdAt` | *Optional\* | :heavy_minus_sign: | N/A | | +| `directory` | Map\ | :heavy_minus_sign: | Media Matching Hints | | +| `durationTotal` | *Optional\* | :heavy_minus_sign: | Only included if `includeStorage` is specified | | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | | +| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | N/A | | +| `locationPath` | *Optional\* | :heavy_minus_sign: | N/A | | +| `mediaGrabOperation` | List\<[MediaGrabOperation](../../models/shared/MediaGrabOperation.md)> | :heavy_minus_sign: | N/A | | +| `playlist` | Map\ | :heavy_minus_sign: | Media Matching Hints | | +| `setting` | List\<[Setting](../../models/shared/Setting.md)> | :heavy_minus_sign: | N/A | | +| `storageTotal` | *Optional\* | :heavy_minus_sign: | Only included if `includeStorage` is specified | | +| `targetLibrarySectionID` | *Optional\* | :heavy_minus_sign: | Where this subscription will record to | | +| `targetSectionLocationID` | *Optional\* | :heavy_minus_sign: | The library section location id for where the item is to be recorded | | +| `video` | Map\ | :heavy_minus_sign: | Media Matching Hints | | +| `parameters` | *Optional\* | :heavy_minus_sign: | Parameter string for creating this subscription | | +| `selected` | *Optional\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/MergeItemsRequest.md b/docs/models/operations/MergeItemsRequest.md new file mode 100644 index 00000000..a65a8917 --- /dev/null +++ b/docs/models/operations/MergeItemsRequest.md @@ -0,0 +1,20 @@ +# MergeItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `idsPathParameter` | *String* | :heavy_check_mark: | N/A | | +| `idsQueryParameter` | List\<*String*> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/MergeItemsResponse.md b/docs/models/operations/MergeItemsResponse.md new file mode 100644 index 00000000..aa0d8788 --- /dev/null +++ b/docs/models/operations/MergeItemsResponse.md @@ -0,0 +1,10 @@ +# MergeItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Meta.md b/docs/models/operations/Meta.md deleted file mode 100644 index 21d51bde..00000000 --- a/docs/models/operations/Meta.md +++ /dev/null @@ -1,12 +0,0 @@ -# Meta - -The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - - - -## Fields - -| 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/Metadata.md b/docs/models/operations/Metadata.md index e264f8ca..ce7adb47 100644 --- a/docs/models/operations/Metadata.md +++ b/docs/models/operations/Metadata.md @@ -1,42 +1,85 @@ # Metadata +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `art` | *Optional\* | :heavy_minus_sign: | N/A | -| `guid` | *Optional\* | :heavy_minus_sign: | N/A | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | -| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | -| `studio` | *Optional\* | :heavy_minus_sign: | N/A | -| `tagline` | *Optional\* | :heavy_minus_sign: | N/A | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | -| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | -| `addedAt` | *Optional\* | :heavy_minus_sign: | N/A | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | -| `publicPagesURL` | *Optional\* | :heavy_minus_sign: | N/A | -| `slug` | *Optional\* | :heavy_minus_sign: | N/A | -| `userState` | *Optional\* | :heavy_minus_sign: | N/A | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | -| `contentRating` | *Optional\* | :heavy_minus_sign: | N/A | -| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | -| `year` | *Optional\* | :heavy_minus_sign: | N/A | -| `image` | List\<[Image](../../models/operations/Image.md)> | :heavy_minus_sign: | N/A | -| `banner` | *Optional\* | :heavy_minus_sign: | N/A | -| `rating` | *Optional\* | :heavy_minus_sign: | N/A | -| `expiresAt` | *Optional\* | :heavy_minus_sign: | N/A | -| `originalTitle` | *Optional\* | :heavy_minus_sign: | N/A | -| `audienceRating` | *Optional\* | :heavy_minus_sign: | N/A | -| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | N/A | -| `ratingImage` | *Optional\* | :heavy_minus_sign: | N/A | -| `imdbRatingCount` | *Optional\* | :heavy_minus_sign: | N/A | -| `subtype` | *Optional\* | :heavy_minus_sign: | N/A | -| `theme` | *Optional\* | :heavy_minus_sign: | N/A | -| `leafCount` | *Optional\* | :heavy_minus_sign: | N/A | -| `childCount` | *Optional\* | :heavy_minus_sign: | N/A | -| `isContinuingSeries` | *Optional\* | :heavy_minus_sign: | N/A | -| `skipChildren` | *Optional\* | :heavy_minus_sign: | N/A | -| `availabilityId` | *Optional\* | :heavy_minus_sign: | N/A | -| `streamingMediaId` | *Optional\* | :heavy_minus_sign: | N/A | -| `playableKey` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `player` | [Optional\](../../models/shared/Player.md) | :heavy_minus_sign: | Information about the player being used for playback | +| `session` | [Optional\](../../models/shared/Session.md) | :heavy_minus_sign: | Information about the playback session | +| `user` | [Optional\](../../models/shared/User.md) | :heavy_minus_sign: | The user playing the content | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *Optional\* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *Optional\* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *Optional\* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *Optional\* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `banner` | *Optional\* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *Optional\* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *Optional\* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *Optional\* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `director` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `duration` | *Optional\* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | List\<[Filter](../../models/shared/Filter.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `hero` | *Optional\* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | List\<[Image](../../models/shared/Image.md)> | :heavy_minus_sign: | N/A | +| `index` | *Optional\* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *Optional\* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | List\<[Media](../../models/shared/Media.md)> | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *Optional\* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *Optional\* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *Optional\* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *Optional\* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *Optional\* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `ratingCount` | *Optional\* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *Optional\* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `search` | *Optional\* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *Optional\* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *Optional\* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *Optional\* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | List\<[Sort](../../models/shared/Sort.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *Optional\* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *Optional\* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *Optional\* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *Optional\* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *Optional\* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *Optional\* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *Optional\* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *Optional\* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *Optional\* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *Optional\* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `year` | *Optional\* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/MinSize.md b/docs/models/operations/MinSize.md deleted file mode 100644 index 815444ca..00000000 --- a/docs/models/operations/MinSize.md +++ /dev/null @@ -1,11 +0,0 @@ -# MinSize - -images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/ModifyDeviceMediaContainer.md b/docs/models/operations/ModifyDeviceMediaContainer.md new file mode 100644 index 00000000..3b95ecc7 --- /dev/null +++ b/docs/models/operations/ModifyDeviceMediaContainer.md @@ -0,0 +1,18 @@ +# ModifyDeviceMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `message` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ModifyDeviceRequest.md b/docs/models/operations/ModifyDeviceRequest.md new file mode 100644 index 00000000..b63f1490 --- /dev/null +++ b/docs/models/operations/ModifyDeviceRequest.md @@ -0,0 +1,20 @@ +# ModifyDeviceRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device. | | +| `enabled` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether to enable the device | 1 | \ No newline at end of file diff --git a/docs/models/operations/ModifyDeviceResponse.md b/docs/models/operations/ModifyDeviceResponse.md new file mode 100644 index 00000000..2e8b0c8e --- /dev/null +++ b/docs/models/operations/ModifyDeviceResponse.md @@ -0,0 +1,12 @@ +# ModifyDeviceResponse + + +## 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/ModifyDeviceResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ModifyDeviceResponseBody.md b/docs/models/operations/ModifyDeviceResponseBody.md new file mode 100644 index 00000000..29321961 --- /dev/null +++ b/docs/models/operations/ModifyDeviceResponseBody.md @@ -0,0 +1,10 @@ +# ModifyDeviceResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/ModifyDeviceMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/MoveCollectionItemRequest.md b/docs/models/operations/MoveCollectionItemRequest.md new file mode 100644 index 00000000..f10d70a3 --- /dev/null +++ b/docs/models/operations/MoveCollectionItemRequest.md @@ -0,0 +1,21 @@ +# MoveCollectionItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `collectionId` | *long* | :heavy_check_mark: | The collection id | | +| `itemId` | *long* | :heavy_check_mark: | The item to move | | +| `after` | *Optional\* | :heavy_minus_sign: | The item to move this item after. If not provided, this item will be moved to the beginning | | \ No newline at end of file diff --git a/docs/models/operations/MoveCollectionItemResponse.md b/docs/models/operations/MoveCollectionItemResponse.md new file mode 100644 index 00000000..06dec59e --- /dev/null +++ b/docs/models/operations/MoveCollectionItemResponse.md @@ -0,0 +1,11 @@ +# MoveCollectionItemResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/MoveHubRequest.md b/docs/models/operations/MoveHubRequest.md new file mode 100644 index 00000000..c569c6fa --- /dev/null +++ b/docs/models/operations/MoveHubRequest.md @@ -0,0 +1,21 @@ +# MoveHubRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | The section ID for the hubs to reorder | | +| `identifier` | *String* | :heavy_check_mark: | The identifier of the hub to move | | +| `after` | *Optional\* | :heavy_minus_sign: | The identifier of the hub to order this hub after (or empty/missing to put this hub first) | | \ No newline at end of file diff --git a/docs/models/operations/MoveHubResponse.md b/docs/models/operations/MoveHubResponse.md new file mode 100644 index 00000000..9a27d28f --- /dev/null +++ b/docs/models/operations/MoveHubResponse.md @@ -0,0 +1,12 @@ +# MoveHubResponse + + +## 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 | +| `getResponses200` | [Optional\](../../models/shared/GetResponses200.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/MovePlayQueueItemRequest.md b/docs/models/operations/MovePlayQueueItemRequest.md new file mode 100644 index 00000000..ea5acb75 --- /dev/null +++ b/docs/models/operations/MovePlayQueueItemRequest.md @@ -0,0 +1,21 @@ +# MovePlayQueueItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *long* | :heavy_check_mark: | The ID of the play queue. | | +| `playQueueItemId` | *long* | :heavy_check_mark: | The play queue item ID to delete. | | +| `after` | *Optional\* | :heavy_minus_sign: | The play queue item ID to insert the new item after. If not present, moves to the beginning. | | \ No newline at end of file diff --git a/docs/models/operations/MovePlayQueueItemResponse.md b/docs/models/operations/MovePlayQueueItemResponse.md new file mode 100644 index 00000000..e9962aa1 --- /dev/null +++ b/docs/models/operations/MovePlayQueueItemResponse.md @@ -0,0 +1,11 @@ +# MovePlayQueueItemResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/MovePlaylistItemRequest.md b/docs/models/operations/MovePlaylistItemRequest.md new file mode 100644 index 00000000..3c0c40cb --- /dev/null +++ b/docs/models/operations/MovePlaylistItemRequest.md @@ -0,0 +1,21 @@ +# MovePlaylistItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | +| `playlistItemId` | *long* | :heavy_check_mark: | The playlist item ID to move. | | +| `after` | *Optional\* | :heavy_minus_sign: | The playlist item ID to insert the new item after. If not provided, item is moved to beginning of playlist | | \ No newline at end of file diff --git a/docs/models/operations/MovePlaylistItemResponse.md b/docs/models/operations/MovePlaylistItemResponse.md new file mode 100644 index 00000000..1364cee2 --- /dev/null +++ b/docs/models/operations/MovePlaylistItemResponse.md @@ -0,0 +1,11 @@ +# MovePlaylistItemResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/MyPlex.md b/docs/models/operations/MyPlex.md deleted file mode 100644 index 86f3d88f..00000000 --- a/docs/models/operations/MyPlex.md +++ /dev/null @@ -1,19 +0,0 @@ -# MyPlex - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `authToken` | *Optional\* | :heavy_minus_sign: | N/A | Z5v-PrNASDFpsaCi3CPK7 | -| `username` | *Optional\* | :heavy_minus_sign: | N/A | example.email@mail.com | -| `mappingState` | *Optional\* | :heavy_minus_sign: | N/A | mapped | -| `mappingError` | *Optional\* | :heavy_minus_sign: | N/A | | -| `signInState` | *Optional\* | :heavy_minus_sign: | N/A | ok | -| `publicAddress` | *Optional\* | :heavy_minus_sign: | N/A | 140.20.68.140 | -| `publicPort` | *Optional\* | :heavy_minus_sign: | N/A | 32400 | -| `privateAddress` | *Optional\* | :heavy_minus_sign: | N/A | 10.10.10.47 | -| `privatePort` | *Optional\* | :heavy_minus_sign: | N/A | 32400 | -| `subscriptionFeatures` | *Optional\* | :heavy_minus_sign: | N/A | federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks | -| `subscriptionActive` | *Optional\* | :heavy_minus_sign: | N/A | | -| `subscriptionState` | *Optional\* | :heavy_minus_sign: | N/A | Active | \ No newline at end of file diff --git a/docs/models/operations/One.md b/docs/models/operations/One.md deleted file mode 100644 index bfb3ca2b..00000000 --- a/docs/models/operations/One.md +++ /dev/null @@ -1,9 +0,0 @@ -# One - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/OnlyTransient.md b/docs/models/operations/OnlyTransient.md deleted file mode 100644 index c91d3d73..00000000 --- a/docs/models/operations/OnlyTransient.md +++ /dev/null @@ -1,11 +0,0 @@ -# OnlyTransient - -Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Operator.md b/docs/models/operations/Operator.md deleted file mode 100644 index 0af7a2d0..00000000 --- a/docs/models/operations/Operator.md +++ /dev/null @@ -1,9 +0,0 @@ -# Operator - - -## 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/OptimizeDatabaseRequest.md b/docs/models/operations/OptimizeDatabaseRequest.md new file mode 100644 index 00000000..f2703543 --- /dev/null +++ b/docs/models/operations/OptimizeDatabaseRequest.md @@ -0,0 +1,19 @@ +# OptimizeDatabaseRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `async` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | If set, don't wait for completion but return an activity | 1 | \ No newline at end of file diff --git a/docs/models/operations/OptimizeDatabaseResponse.md b/docs/models/operations/OptimizeDatabaseResponse.md new file mode 100644 index 00000000..b63f9127 --- /dev/null +++ b/docs/models/operations/OptimizeDatabaseResponse.md @@ -0,0 +1,10 @@ +# OptimizeDatabaseResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/OptimizedForStreaming.md b/docs/models/operations/OptimizedForStreaming.md deleted file mode 100644 index f50065f1..00000000 --- a/docs/models/operations/OptimizedForStreaming.md +++ /dev/null @@ -1,4 +0,0 @@ -# OptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - diff --git a/docs/models/operations/OptimizedForStreaming1.md b/docs/models/operations/OptimizedForStreaming1.md deleted file mode 100644 index 7cb50856..00000000 --- a/docs/models/operations/OptimizedForStreaming1.md +++ /dev/null @@ -1,9 +0,0 @@ -# OptimizedForStreaming1 - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Owned.md b/docs/models/operations/Owned.md deleted file mode 100644 index 6f7fa480..00000000 --- a/docs/models/operations/Owned.md +++ /dev/null @@ -1,11 +0,0 @@ -# Owned - -Indicates if the user owns the server. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Params.md b/docs/models/operations/Params.md new file mode 100644 index 00000000..b26379e6 --- /dev/null +++ b/docs/models/operations/Params.md @@ -0,0 +1,12 @@ +# Params + +Subscription parameters. + - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + - `source`: Required for downloads to indicate the source of the downloaded content. + + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/Part.md b/docs/models/operations/Part.md deleted file mode 100644 index 57c655e9..00000000 --- a/docs/models/operations/Part.md +++ /dev/null @@ -1,23 +0,0 @@ -# Part - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `accessible` | *Optional\* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `exists` | *Optional\* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `id` | *long* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *String* | :heavy_check_mark: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `indexes` | *Optional\* | :heavy_minus_sign: | N/A | sd | -| `duration` | *Optional\* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *String* | :heavy_check_mark: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *long* | :heavy_check_mark: | File size in bytes. | 30649952104 | -| `packetLength` | *Optional\* | :heavy_minus_sign: | N/A | 188 | -| `container` | *Optional\* | :heavy_minus_sign: | Container format of the part. | mkv | -| `videoProfile` | *Optional\* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `audioProfile` | *Optional\* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | [Optional\](../../models/operations/GetRecentlyAddedOptimizedForStreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `hasThumbnail` | [Optional\](../../models/operations/HasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | -| `stream` | List\<[Stream](../../models/operations/Stream.md)> | :heavy_minus_sign: | An array of streams for this part. | | \ No newline at end of file diff --git a/docs/models/operations/PastSubscription.md b/docs/models/operations/PastSubscription.md deleted file mode 100644 index 47f96380..00000000 --- a/docs/models/operations/PastSubscription.md +++ /dev/null @@ -1,22 +0,0 @@ -# PastSubscription - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_check_mark: | N/A | | -| `mode` | *Optional\* | :heavy_check_mark: | N/A | | -| `renewsAt` | *Optional\* | :heavy_check_mark: | N/A | 1556281940 | -| `endsAt` | *Optional\* | :heavy_check_mark: | N/A | 1556281940 | -| `canceled` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `gracePeriod` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `onHold` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `canReactivate` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `canUpgrade` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `canDowngrade` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `canConvert` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `type` | *String* | :heavy_check_mark: | N/A | plexpass | -| `transfer` | *Optional\* | :heavy_check_mark: | N/A | | -| `state` | [PostUsersSignInDataState](../../models/operations/PostUsersSignInDataState.md) | :heavy_check_mark: | N/A | ended | -| `billing` | [Billing](../../models/operations/Billing.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/PathParamElement.md b/docs/models/operations/PathParamElement.md new file mode 100644 index 00000000..e7598b21 --- /dev/null +++ b/docs/models/operations/PathParamElement.md @@ -0,0 +1,13 @@ +# PathParamElement + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `THUMB` | thumb | +| `ART` | art | +| `CLEAR_LOGO` | clearLogo | +| `BANNER` | banner | +| `POSTER` | poster | +| `THEME` | theme | \ No newline at end of file diff --git a/docs/models/operations/PathParamIndex.md b/docs/models/operations/PathParamIndex.md new file mode 100644 index 00000000..4b536110 --- /dev/null +++ b/docs/models/operations/PathParamIndex.md @@ -0,0 +1,10 @@ +# PathParamIndex + +The type of index to grab. + + +## Values + +| Name | Value | +| ----- | ----- | +| `SD` | sd | \ No newline at end of file diff --git a/docs/models/operations/PathParamTask.md b/docs/models/operations/PathParamTask.md new file mode 100644 index 00000000..6d8e80da --- /dev/null +++ b/docs/models/operations/PathParamTask.md @@ -0,0 +1,31 @@ +# PathParamTask + +The task name + + +## Values + +| Name | Value | +| -------------------------------------- | -------------------------------------- | +| `AUTOMATIC_UPDATES` | AutomaticUpdates | +| `BACKUP_DATABASE` | BackupDatabase | +| `BUTLER_TASK_GENERATE_AD_MARKERS` | ButlerTaskGenerateAdMarkers | +| `BUTLER_TASK_GENERATE_CREDITS_MARKERS` | ButlerTaskGenerateCreditsMarkers | +| `BUTLER_TASK_GENERATE_INTRO_MARKERS` | ButlerTaskGenerateIntroMarkers | +| `BUTLER_TASK_GENERATE_VOICE_ACTIVITY` | ButlerTaskGenerateVoiceActivity | +| `CLEAN_OLD_BUNDLES` | CleanOldBundles | +| `CLEAN_OLD_CACHE_FILES` | CleanOldCacheFiles | +| `DEEP_MEDIA_ANALYSIS` | DeepMediaAnalysis | +| `GARBAGE_COLLECT_BLOBS` | GarbageCollectBlobs | +| `GARBAGE_COLLECT_LIBRARY_MEDIA` | GarbageCollectLibraryMedia | +| `GENERATE_BLUR_HASHES` | GenerateBlurHashes | +| `GENERATE_CHAPTER_THUMBS` | GenerateChapterThumbs | +| `GENERATE_MEDIA_INDEX_FILES` | GenerateMediaIndexFiles | +| `LOUDNESS_ANALYSIS` | LoudnessAnalysis | +| `MUSIC_ANALYSIS` | MusicAnalysis | +| `OPTIMIZE_DATABASE` | OptimizeDatabase | +| `REFRESH_EPG_GUIDES` | RefreshEpgGuides | +| `REFRESH_LIBRARIES` | RefreshLibraries | +| `REFRESH_LOCAL_MEDIA` | RefreshLocalMedia | +| `REFRESH_PERIODIC_METADATA` | RefreshPeriodicMetadata | +| `UPGRADE_MEDIA_ANALYSIS` | UpgradeMediaAnalysis | \ No newline at end of file diff --git a/docs/models/operations/PathParamTaskName.md b/docs/models/operations/PathParamTaskName.md deleted file mode 100644 index 87cffd14..00000000 --- a/docs/models/operations/PathParamTaskName.md +++ /dev/null @@ -1,23 +0,0 @@ -# PathParamTaskName - -The name of the task to be started. - - -## Values - -| Name | Value | -| ----------------------------- | ----------------------------- | -| `BACKUP_DATABASE` | BackupDatabase | -| `BUILD_GRACENOTE_COLLECTIONS` | BuildGracenoteCollections | -| `CHECK_FOR_UPDATES` | CheckForUpdates | -| `CLEAN_OLD_BUNDLES` | CleanOldBundles | -| `CLEAN_OLD_CACHE_FILES` | CleanOldCacheFiles | -| `DEEP_MEDIA_ANALYSIS` | DeepMediaAnalysis | -| `GENERATE_AUTO_TAGS` | GenerateAutoTags | -| `GENERATE_CHAPTER_THUMBS` | GenerateChapterThumbs | -| `GENERATE_MEDIA_INDEX_FILES` | GenerateMediaIndexFiles | -| `OPTIMIZE_DATABASE` | OptimizeDatabase | -| `REFRESH_LIBRARIES` | RefreshLibraries | -| `REFRESH_LOCAL_MEDIA` | RefreshLocalMedia | -| `REFRESH_PERIODIC_METADATA` | RefreshPeriodicMetadata | -| `UPGRADE_MEDIA_ANALYSIS` | UpgradeMediaAnalysis | \ No newline at end of file diff --git a/docs/models/operations/Pending.md b/docs/models/operations/Pending.md deleted file mode 100644 index 53885102..00000000 --- a/docs/models/operations/Pending.md +++ /dev/null @@ -1,11 +0,0 @@ -# Pending - -Indicates if the server is pending approval. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/PerformSearchRequest.md b/docs/models/operations/PerformSearchRequest.md deleted file mode 100644 index 703724d7..00000000 --- a/docs/models/operations/PerformSearchRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PerformSearchRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `query` | *String* | :heavy_check_mark: | The query term | arnold | -| `sectionId` | *Optional\* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | -| `limit` | *Optional\* | :heavy_minus_sign: | The number of items to return per hub | 5 | \ No newline at end of file diff --git a/docs/models/operations/PerformSearchResponse.md b/docs/models/operations/PerformSearchResponse.md deleted file mode 100644 index cc31e564..00000000 --- a/docs/models/operations/PerformSearchResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# PerformSearchResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/PerformVoiceSearchRequest.md b/docs/models/operations/PerformVoiceSearchRequest.md deleted file mode 100644 index 82059164..00000000 --- a/docs/models/operations/PerformVoiceSearchRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PerformVoiceSearchRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `query` | *String* | :heavy_check_mark: | The query term | dead+poop | -| `sectionId` | *Optional\* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | -| `limit` | *Optional\* | :heavy_minus_sign: | The number of items to return per hub | 5 | \ No newline at end of file diff --git a/docs/models/operations/PerformVoiceSearchResponse.md b/docs/models/operations/PerformVoiceSearchResponse.md deleted file mode 100644 index 7890f601..00000000 --- a/docs/models/operations/PerformVoiceSearchResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# PerformVoiceSearchResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/PlayQueueGenerator.md b/docs/models/operations/PlayQueueGenerator.md new file mode 100644 index 00000000..8e632de4 --- /dev/null +++ b/docs/models/operations/PlayQueueGenerator.md @@ -0,0 +1,14 @@ +# PlayQueueGenerator + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `changedAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `createdAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `playlistID` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | [Optional\](../../models/operations/GetPlaylistGeneratorsType.md) | :heavy_minus_sign: | The type of playlist generator.

- -1: A smart playlist generator
- 42: A optimized version generator
| +| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `uri` | *Optional\* | :heavy_minus_sign: | The URI indicating the search for this generator | \ No newline at end of file diff --git a/docs/models/operations/Player.md b/docs/models/operations/Player.md deleted file mode 100644 index baf92adf..00000000 --- a/docs/models/operations/Player.md +++ /dev/null @@ -1,22 +0,0 @@ -# Player - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `address` | *Optional\* | :heavy_minus_sign: | N/A | 10.10.10.171 | -| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | 3tsdzir85m2onc3qyr255aq1 | -| `model` | *Optional\* | :heavy_minus_sign: | N/A | standalone | -| `platform` | *Optional\* | :heavy_minus_sign: | N/A | windows | -| `platformVersion` | *Optional\* | :heavy_minus_sign: | N/A | 10.0.22621 | -| `product` | *Optional\* | :heavy_minus_sign: | N/A | Plex for Windows | -| `profile` | *Optional\* | :heavy_minus_sign: | N/A | Plex Desktop | -| `remotePublicAddress` | *Optional\* | :heavy_minus_sign: | N/A | 68.248.140.20 | -| `state` | *Optional\* | :heavy_minus_sign: | N/A | playing | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | DESKTOP-BL80MTD | -| `version` | *Optional\* | :heavy_minus_sign: | N/A | 1.85.0.4071-21128b56 | -| `local` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `relayed` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `secure` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `userID` | *Optional\* | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/PlaylistType.md b/docs/models/operations/PlaylistType.md index 276ac5f7..9b20f1f4 100644 --- a/docs/models/operations/PlaylistType.md +++ b/docs/models/operations/PlaylistType.md @@ -1,6 +1,6 @@ # PlaylistType -limit to a type of playlist. +Limit to a type of playlist ## Values diff --git a/docs/models/operations/PlexDevice.md b/docs/models/operations/PlexDevice.md deleted file mode 100644 index 42c7104b..00000000 --- a/docs/models/operations/PlexDevice.md +++ /dev/null @@ -1,31 +0,0 @@ -# PlexDevice - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `name` | *String* | :heavy_check_mark: | N/A | | -| `product` | *String* | :heavy_check_mark: | N/A | | -| `productVersion` | *String* | :heavy_check_mark: | N/A | | -| `platform` | *Optional\* | :heavy_check_mark: | N/A | | -| `platformVersion` | *Optional\* | :heavy_check_mark: | N/A | | -| `device` | *Optional\* | :heavy_check_mark: | N/A | | -| `clientIdentifier` | *String* | :heavy_check_mark: | N/A | | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2019-06-24T11:38:02Z | -| `lastSeenAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2019-06-24T11:38:02Z | -| `provides` | *String* | :heavy_check_mark: | N/A | | -| `ownerId` | *Optional\* | :heavy_check_mark: | ownerId is null when the device is owned by the token used to send the request | | -| `sourceTitle` | *Optional\* | :heavy_check_mark: | N/A | | -| `publicAddress` | *String* | :heavy_check_mark: | N/A | | -| `accessToken` | *String* | :heavy_check_mark: | N/A | | -| `owned` | *boolean* | :heavy_check_mark: | N/A | | -| `home` | *boolean* | :heavy_check_mark: | N/A | | -| `synced` | *boolean* | :heavy_check_mark: | N/A | | -| `relay` | *boolean* | :heavy_check_mark: | N/A | | -| `presence` | *boolean* | :heavy_check_mark: | N/A | | -| `httpsRequired` | *boolean* | :heavy_check_mark: | N/A | | -| `publicAddressMatches` | *boolean* | :heavy_check_mark: | N/A | | -| `dnsRebindingProtection` | *boolean* | :heavy_check_mark: | N/A | | -| `natLoopbackSupported` | *boolean* | :heavy_check_mark: | N/A | | -| `connections` | List\<[Connections](../../models/operations/Connections.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/Policy.md b/docs/models/operations/Policy.md new file mode 100644 index 00000000..87c0677d --- /dev/null +++ b/docs/models/operations/Policy.md @@ -0,0 +1,10 @@ +# Policy + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `scope` | [Optional\](../../models/operations/GetPlaylistGeneratorScope.md) | :heavy_minus_sign: | N/A | +| `unwatched` | *Optional\* | :heavy_minus_sign: | True if only unwatched items are optimized | +| `value` | *Optional\* | :heavy_minus_sign: | If the scope is count, the number of items to optimize | \ No newline at end of file diff --git a/docs/models/operations/PostMediaArtsRequest.md b/docs/models/operations/PostMediaArtsRequest.md deleted file mode 100644 index afd20296..00000000 --- a/docs/models/operations/PostMediaArtsRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PostMediaArtsRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 | -| `url` | *Optional\* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b | -| `requestBody` | byte[] | :heavy_minus_sign: | The contents of the image, if uploading a local file | | \ No newline at end of file diff --git a/docs/models/operations/PostMediaArtsResponse.md b/docs/models/operations/PostMediaArtsResponse.md deleted file mode 100644 index fa119ecf..00000000 --- a/docs/models/operations/PostMediaArtsResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# PostMediaArtsResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/PostMediaPosterRequest.md b/docs/models/operations/PostMediaPosterRequest.md deleted file mode 100644 index 168e5001..00000000 --- a/docs/models/operations/PostMediaPosterRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# PostMediaPosterRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 | -| `url` | *Optional\* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b | -| `requestBody` | byte[] | :heavy_minus_sign: | The contents of the image, if uploading a local file | | \ No newline at end of file diff --git a/docs/models/operations/PostMediaPosterResponse.md b/docs/models/operations/PostMediaPosterResponse.md deleted file mode 100644 index c71d141a..00000000 --- a/docs/models/operations/PostMediaPosterResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# PostMediaPosterResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataAuthenticationResponseStatus.md b/docs/models/operations/PostUsersSignInDataAuthenticationResponseStatus.md deleted file mode 100644 index cbf43fc0..00000000 --- a/docs/models/operations/PostUsersSignInDataAuthenticationResponseStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataAuthenticationResponseStatus - -String representation of subscriptionActive - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `INACTIVE` | Inactive | -| `ACTIVE` | Active | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataAuthenticationStatus.md b/docs/models/operations/PostUsersSignInDataAuthenticationStatus.md deleted file mode 100644 index b0c9a810..00000000 --- a/docs/models/operations/PostUsersSignInDataAuthenticationStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataAuthenticationStatus - -String representation of subscriptionActive - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `INACTIVE` | Inactive | -| `ACTIVE` | Active | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataAuthenticationSubscription.md b/docs/models/operations/PostUsersSignInDataAuthenticationSubscription.md deleted file mode 100644 index 6a763923..00000000 --- a/docs/models/operations/PostUsersSignInDataAuthenticationSubscription.md +++ /dev/null @@ -1,13 +0,0 @@ -# PostUsersSignInDataAuthenticationSubscription - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `features` | List\<*String*> | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | -| `active` | *Optional\* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | -| `subscribedAt` | *JsonNullable\* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | -| `status` | [Optional\](../../models/operations/PostUsersSignInDataAuthenticationResponseStatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | -| `paymentService` | *JsonNullable\* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | -| `plan` | *JsonNullable\* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataAutoSelectSubtitle.md b/docs/models/operations/PostUsersSignInDataAutoSelectSubtitle.md deleted file mode 100644 index a1932db6..00000000 --- a/docs/models/operations/PostUsersSignInDataAutoSelectSubtitle.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataAutoSelectSubtitle - -The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.md b/docs/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.md deleted file mode 100644 index 254dd69b..00000000 --- a/docs/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataDefaultSubtitleAccessibility - -The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles) - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataDefaultSubtitleForced.md b/docs/models/operations/PostUsersSignInDataDefaultSubtitleForced.md deleted file mode 100644 index df668984..00000000 --- a/docs/models/operations/PostUsersSignInDataDefaultSubtitleForced.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataDefaultSubtitleForced - -The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataMailingListStatus.md b/docs/models/operations/PostUsersSignInDataMailingListStatus.md deleted file mode 100644 index 04b21d0d..00000000 --- a/docs/models/operations/PostUsersSignInDataMailingListStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataMailingListStatus - -Your current mailing list status (active or unsubscribed) - - -## Values - -| Name | Value | -| -------------- | -------------- | -| `ACTIVE` | active | -| `UNSUBSCRIBED` | unsubscribed | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataMediaReviewsVisibility.md b/docs/models/operations/PostUsersSignInDataMediaReviewsVisibility.md deleted file mode 100644 index 234a440f..00000000 --- a/docs/models/operations/PostUsersSignInDataMediaReviewsVisibility.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataMediaReviewsVisibility - -Whether or not the account has media reviews visibility enabled - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataRequest.md b/docs/models/operations/PostUsersSignInDataRequest.md deleted file mode 100644 index f7863eb3..00000000 --- a/docs/models/operations/PostUsersSignInDataRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# PostUsersSignInDataRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `clientID` | *String* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `clientName` | *Optional\* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | -| `deviceNickname` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | -| `clientVersion` | *Optional\* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | -| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client application. | Roku | -| `requestBody` | [Optional\](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataRequestBody.md b/docs/models/operations/PostUsersSignInDataRequestBody.md deleted file mode 100644 index 5771bd44..00000000 --- a/docs/models/operations/PostUsersSignInDataRequestBody.md +++ /dev/null @@ -1,13 +0,0 @@ -# PostUsersSignInDataRequestBody - -Login credentials - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `login` | *String* | :heavy_check_mark: | N/A | username@email.com | -| `password` | *String* | :heavy_check_mark: | N/A | password123 | -| `rememberMe` | *Optional\* | :heavy_minus_sign: | N/A | | -| `verificationCode` | *Optional\* | :heavy_minus_sign: | N/A | 123456 | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataResponse.md b/docs/models/operations/PostUsersSignInDataResponse.md deleted file mode 100644 index 44687333..00000000 --- a/docs/models/operations/PostUsersSignInDataResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataResponse - - -## 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 | -| `userPlexAccount` | [Optional\](../../models/operations/PostUsersSignInDataUserPlexAccount.md) | :heavy_minus_sign: | Returns the user account data with a valid auth token | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataServices.md b/docs/models/operations/PostUsersSignInDataServices.md deleted file mode 100644 index 909b011f..00000000 --- a/docs/models/operations/PostUsersSignInDataServices.md +++ /dev/null @@ -1,12 +0,0 @@ -# PostUsersSignInDataServices - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `identifier` | *String* | :heavy_check_mark: | N/A | metadata-dev | -| `endpoint` | *String* | :heavy_check_mark: | N/A | https://epg.provider.plex.tv | -| `token` | *Optional\* | :heavy_check_mark: | N/A | DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv | -| `secret` | *Optional\* | :heavy_check_mark: | N/A | | -| `status` | [PostUsersSignInDataStatus](../../models/operations/PostUsersSignInDataStatus.md) | :heavy_check_mark: | N/A | online | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataState.md b/docs/models/operations/PostUsersSignInDataState.md deleted file mode 100644 index d31f6b64..00000000 --- a/docs/models/operations/PostUsersSignInDataState.md +++ /dev/null @@ -1,8 +0,0 @@ -# PostUsersSignInDataState - - -## Values - -| Name | Value | -| ------- | ------- | -| `ENDED` | ended | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataStatus.md b/docs/models/operations/PostUsersSignInDataStatus.md deleted file mode 100644 index faa76864..00000000 --- a/docs/models/operations/PostUsersSignInDataStatus.md +++ /dev/null @@ -1,9 +0,0 @@ -# PostUsersSignInDataStatus - - -## Values - -| Name | Value | -| --------- | --------- | -| `ONLINE` | online | -| `OFFLINE` | offline | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataSubscription.md b/docs/models/operations/PostUsersSignInDataSubscription.md deleted file mode 100644 index 5fc53b32..00000000 --- a/docs/models/operations/PostUsersSignInDataSubscription.md +++ /dev/null @@ -1,15 +0,0 @@ -# PostUsersSignInDataSubscription - -If the account’s Plex Pass subscription is active - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `features` | List\<*String*> | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | -| `active` | *Optional\* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | -| `subscribedAt` | *JsonNullable\* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | -| `status` | [Optional\](../../models/operations/PostUsersSignInDataAuthenticationStatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | -| `paymentService` | *JsonNullable\* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | -| `plan` | *JsonNullable\* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataUserPlexAccount.md b/docs/models/operations/PostUsersSignInDataUserPlexAccount.md deleted file mode 100644 index 2982c4fa..00000000 --- a/docs/models/operations/PostUsersSignInDataUserPlexAccount.md +++ /dev/null @@ -1,52 +0,0 @@ -# PostUsersSignInDataUserPlexAccount - -Returns the user account data with a valid auth token - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `adsConsent` | *Optional\* | :heavy_check_mark: | Unknown | | -| `adsConsentReminderAt` | *Optional\* | :heavy_check_mark: | N/A | 1556281940 | -| `adsConsentSetAt` | *Optional\* | :heavy_check_mark: | N/A | 1556281940 | -| `anonymous` | *JsonNullable\* | :heavy_minus_sign: | Unknown | | -| `authToken` | *String* | :heavy_check_mark: | The account token | CxoUzBTSV5hsxjTpFKaf | -| `backupCodesCreated` | *Optional\* | :heavy_minus_sign: | If the two-factor authentication backup codes have been created | | -| `confirmed` | *Optional\* | :heavy_minus_sign: | If the account has been confirmed | | -| `country` | *String* | :heavy_check_mark: | The account country | US | -| `email` | *String* | :heavy_check_mark: | The account email address | username@email.com | -| `emailOnlyAuth` | *Optional\* | :heavy_minus_sign: | If login with email only is enabled | | -| `experimentalFeatures` | *Optional\* | :heavy_minus_sign: | If experimental features are enabled | | -| `friendlyName` | *String* | :heavy_check_mark: | Your account full name | friendlyUsername | -| `entitlements` | List\<*String*> | :heavy_check_mark: | List of devices your allowed to use with this account | | -| `guest` | *Optional\* | :heavy_minus_sign: | If the account is a Plex Home guest user | | -| `hasPassword` | *Optional\* | :heavy_minus_sign: | If the account has a password | | -| `home` | *Optional\* | :heavy_minus_sign: | If the account is a Plex Home user | | -| `homeAdmin` | *Optional\* | :heavy_minus_sign: | If the account is the Plex Home admin | | -| `homeSize` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 | -| `id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 | -| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `locale` | *Optional\* | :heavy_check_mark: | The account locale | | -| `mailingListActive` | *Optional\* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | | -| `mailingListStatus` | [PostUsersSignInDataMailingListStatus](../../models/operations/PostUsersSignInDataMailingListStatus.md) | :heavy_check_mark: | Your current mailing list status (active or unsubscribed) | active | -| `maxHomeSize` | *int* | :heavy_check_mark: | The maximum number of accounts allowed in the Plex Home | 15 | -| ~~`pin`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

[Might be removed] The hashed Plex Home PIN | | -| `profile` | [PostUsersSignInDataUserProfile](../../models/operations/PostUsersSignInDataUserProfile.md) | :heavy_check_mark: | N/A | | -| `protected_` | *Optional\* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | | -| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `restricted` | *Optional\* | :heavy_minus_sign: | If the account is a Plex Home managed user | | -| `roles` | List\<*String*> | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | | -| `scrobbleTypes` | *String* | :heavy_check_mark: | Unknown | | -| `services` | List\<[PostUsersSignInDataServices](../../models/operations/PostUsersSignInDataServices.md)> | :heavy_check_mark: | N/A | | -| `subscription` | [PostUsersSignInDataSubscription](../../models/operations/PostUsersSignInDataSubscription.md) | :heavy_check_mark: | If the account’s Plex Pass subscription is active | | -| `subscriptionDescription` | *Optional\* | :heavy_check_mark: | Description of the Plex Pass subscription | | -| `subscriptions` | List\<[PostUsersSignInDataAuthenticationSubscription](../../models/operations/PostUsersSignInDataAuthenticationSubscription.md)> | :heavy_minus_sign: | N/A | | -| `thumb` | *String* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 | -| `title` | *String* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle | -| `twoFactorEnabled` | *Optional\* | :heavy_minus_sign: | If two-factor authentication is enabled | | -| `username` | *String* | :heavy_check_mark: | The account username | Username | -| `uuid` | *String* | :heavy_check_mark: | The account UUID | dae343c1f45beb4f | -| `attributionPartner` | *Optional\* | :heavy_check_mark: | N/A | | -| `pastSubscriptions` | List\<[PastSubscription](../../models/operations/PastSubscription.md)> | :heavy_check_mark: | N/A | | -| `trials` | List\<[Trials](../../models/operations/Trials.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataUserProfile.md b/docs/models/operations/PostUsersSignInDataUserProfile.md deleted file mode 100644 index 380439d0..00000000 --- a/docs/models/operations/PostUsersSignInDataUserProfile.md +++ /dev/null @@ -1,15 +0,0 @@ -# PostUsersSignInDataUserProfile - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `autoSelectAudio` | *Optional\* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true | -| `defaultAudioLanguage` | *Optional\* | :heavy_check_mark: | The preferred audio language for the account | ja | -| `defaultSubtitleLanguage` | *Optional\* | :heavy_check_mark: | The preferred subtitle language for the account | en | -| `autoSelectSubtitle` | [Optional\](../../models/operations/PostUsersSignInDataAutoSelectSubtitle.md) | :heavy_minus_sign: | N/A | 1 | -| `defaultSubtitleAccessibility` | [Optional\](../../models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.md) | :heavy_minus_sign: | N/A | 1 | -| `defaultSubtitleForced` | [Optional\](../../models/operations/PostUsersSignInDataDefaultSubtitleForced.md) | :heavy_minus_sign: | N/A | 1 | -| `watchedIndicator` | [Optional\](../../models/operations/PostUsersSignInDataWatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 | -| `mediaReviewsVisibility` | [Optional\](../../models/operations/PostUsersSignInDataMediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataWatchedIndicator.md b/docs/models/operations/PostUsersSignInDataWatchedIndicator.md deleted file mode 100644 index fa6d450f..00000000 --- a/docs/models/operations/PostUsersSignInDataWatchedIndicator.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostUsersSignInDataWatchedIndicator - -Whether or not media watched indicators are enabled (little orange dot on media) - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Prefs.md b/docs/models/operations/Prefs.md new file mode 100644 index 00000000..0da5d3fd --- /dev/null +++ b/docs/models/operations/Prefs.md @@ -0,0 +1,7 @@ +# Prefs + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/ProcessSubscriptionsResponse.md b/docs/models/operations/ProcessSubscriptionsResponse.md new file mode 100644 index 00000000..92c798dd --- /dev/null +++ b/docs/models/operations/ProcessSubscriptionsResponse.md @@ -0,0 +1,11 @@ +# ProcessSubscriptionsResponse + + +## 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 | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ProcessingState.md b/docs/models/operations/ProcessingState.md new file mode 100644 index 00000000..09474fb7 --- /dev/null +++ b/docs/models/operations/ProcessingState.md @@ -0,0 +1,15 @@ +# ProcessingState + +The state of processing if this generator is part of an optimizer playlist + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `PROCESSED` | processed | +| `COMPLETED` | completed | +| `TOMBSTONED` | tombstoned | +| `DISABLED` | disabled | +| `ERROR` | error | +| `PENDING` | pending | \ No newline at end of file diff --git a/docs/models/operations/ProcessingStateContext.md b/docs/models/operations/ProcessingStateContext.md new file mode 100644 index 00000000..eac504ff --- /dev/null +++ b/docs/models/operations/ProcessingStateContext.md @@ -0,0 +1,21 @@ +# ProcessingStateContext + +The error which could have occurred (or `good`) + + +## Values + +| Name | Value | +| ---------------------------- | ---------------------------- | +| `GOOD` | good | +| `SOURCE_FILE_UNAVAILABLE` | sourceFileUnavailable | +| `SOURCE_FILE_METADATA_ERROR` | sourceFileMetadataError | +| `CLIENT_PROFILE_ERROR` | clientProfileError | +| `IO_ERROR` | ioError | +| `TRANSCODER_ERROR` | transcoderError | +| `UNKNOWN_ERROR` | unknownError | +| `MEDIA_ANALYSIS_ERROR` | mediaAnalysisError | +| `DOWNLOAD_FAILED` | downloadFailed | +| `ACCESS_DENIED` | accessDenied | +| `CANNOT_TRANSCODE` | cannotTranscode | +| `CODEC_INSTALL_ERROR` | codecInstallError | \ No newline at end of file diff --git a/docs/models/operations/Producer.md b/docs/models/operations/Producer.md deleted file mode 100644 index ce96a71c..00000000 --- a/docs/models/operations/Producer.md +++ /dev/null @@ -1,12 +0,0 @@ -# Producer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `id` | *int* | :heavy_check_mark: | Unique identifier for the producer. | 126522 | -| `filter` | *String* | :heavy_check_mark: | The filter string used to query this producer. | producer=126522 | -| `tag` | *String* | :heavy_check_mark: | The name of the producer | Amelia Knapp | -| `tagKey` | *String* | :heavy_check_mark: | A 24-character hexadecimal unique key associated with the producer's tag, used for internal identification.
| 5d77683d85719b001f3a535e | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the producer. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/models/operations/Protected.md b/docs/models/operations/Protected.md deleted file mode 100644 index 5e37e852..00000000 --- a/docs/models/operations/Protected.md +++ /dev/null @@ -1,11 +0,0 @@ -# Protected - -Indicates whether the account is protected. - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Protocol.md b/docs/models/operations/Protocol.md index fef75fb1..4b85c8b9 100644 --- a/docs/models/operations/Protocol.md +++ b/docs/models/operations/Protocol.md @@ -1,11 +1,13 @@ # Protocol -The protocol used for the connection (http, https, etc) +Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + ## Values -| Name | Value | -| ------- | ------- | -| `HTTP` | http | -| `HTTPS` | https | \ No newline at end of file +| Name | Value | +| ------ | ------ | +| `HTTP` | http | +| `HLS` | hls | +| `DASH` | dash | \ No newline at end of file diff --git a/docs/models/operations/Provider.md b/docs/models/operations/Provider.md deleted file mode 100644 index adc27eb8..00000000 --- a/docs/models/operations/Provider.md +++ /dev/null @@ -1,10 +0,0 @@ -# Provider - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | /system/search | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | Local Network | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | mixed | \ No newline at end of file diff --git a/docs/models/operations/QueryParamArgs.md b/docs/models/operations/QueryParamArgs.md new file mode 100644 index 00000000..65f0d63d --- /dev/null +++ b/docs/models/operations/QueryParamArgs.md @@ -0,0 +1,7 @@ +# QueryParamArgs + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/QueryParamAttributes.md b/docs/models/operations/QueryParamAttributes.md new file mode 100644 index 00000000..a41b2275 --- /dev/null +++ b/docs/models/operations/QueryParamAttributes.md @@ -0,0 +1,9 @@ +# QueryParamAttributes + +The attributes to assign to this marker + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/QueryParamFilter.md b/docs/models/operations/QueryParamFilter.md deleted file mode 100644 index 71675495..00000000 --- a/docs/models/operations/QueryParamFilter.md +++ /dev/null @@ -1,11 +0,0 @@ -# QueryParamFilter - -Filters content by field and direction/equality -(Unknown if viewedAt is the only supported column) - - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/QueryParamForce.md b/docs/models/operations/QueryParamForce.md deleted file mode 100644 index 7b257299..00000000 --- a/docs/models/operations/QueryParamForce.md +++ /dev/null @@ -1,15 +0,0 @@ -# QueryParamForce - -Force overwriting of duplicate playlists. -By default, a playlist file uploaded with the same path will overwrite the existing playlist. -The `force` argument is used to disable overwriting. -If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. - - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/QueryParamIncludeCollections.md b/docs/models/operations/QueryParamIncludeCollections.md deleted file mode 100644 index 8c4c18ff..00000000 --- a/docs/models/operations/QueryParamIncludeCollections.md +++ /dev/null @@ -1,9 +0,0 @@ -# QueryParamIncludeCollections - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/QueryParamIncludeExternalMedia.md b/docs/models/operations/QueryParamIncludeExternalMedia.md deleted file mode 100644 index c70dd453..00000000 --- a/docs/models/operations/QueryParamIncludeExternalMedia.md +++ /dev/null @@ -1,9 +0,0 @@ -# QueryParamIncludeExternalMedia - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/QueryParamIncludeGuids.md b/docs/models/operations/QueryParamIncludeGuids.md deleted file mode 100644 index db71b5dd..00000000 --- a/docs/models/operations/QueryParamIncludeGuids.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryParamIncludeGuids - -Adds the Guid object to the response - - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/QueryParamIncludeMeta.md b/docs/models/operations/QueryParamIncludeMeta.md deleted file mode 100644 index 85296cc2..00000000 --- a/docs/models/operations/QueryParamIncludeMeta.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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/QueryParamLocation.md b/docs/models/operations/QueryParamLocation.md new file mode 100644 index 00000000..eb935753 --- /dev/null +++ b/docs/models/operations/QueryParamLocation.md @@ -0,0 +1,12 @@ +# QueryParamLocation + +Network type of the client, can be used to help determine target bitrate. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `LAN` | lan | +| `WAN` | wan | +| `CELLULAR` | cellular | \ No newline at end of file diff --git a/docs/models/operations/QueryParamOnlyTransient.md b/docs/models/operations/QueryParamOnlyTransient.md deleted file mode 100644 index 6c2e1403..00000000 --- a/docs/models/operations/QueryParamOnlyTransient.md +++ /dev/null @@ -1,11 +0,0 @@ -# QueryParamOnlyTransient - -Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/QueryParamPrefs.md b/docs/models/operations/QueryParamPrefs.md new file mode 100644 index 00000000..cbf9b549 --- /dev/null +++ b/docs/models/operations/QueryParamPrefs.md @@ -0,0 +1,9 @@ +# QueryParamPrefs + +The preferences for this section + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/QueryParamProtocol.md b/docs/models/operations/QueryParamProtocol.md new file mode 100644 index 00000000..29206154 --- /dev/null +++ b/docs/models/operations/QueryParamProtocol.md @@ -0,0 +1,13 @@ +# QueryParamProtocol + +Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + + + +## Values + +| Name | Value | +| ------ | ------ | +| `HTTP` | http | +| `HLS` | hls | +| `DASH` | dash | \ No newline at end of file diff --git a/docs/models/operations/QueryParamSmart.md b/docs/models/operations/QueryParamSmart.md deleted file mode 100644 index bb53a11a..00000000 --- a/docs/models/operations/QueryParamSmart.md +++ /dev/null @@ -1,11 +0,0 @@ -# QueryParamSmart - -type of playlists to return (default is all). - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/QueryParamSubtitles.md b/docs/models/operations/QueryParamSubtitles.md new file mode 100644 index 00000000..452575df --- /dev/null +++ b/docs/models/operations/QueryParamSubtitles.md @@ -0,0 +1,17 @@ +# QueryParamSubtitles + +Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `AUTO` | auto | +| `BURN` | burn | +| `NONE` | none | +| `SIDECAR` | sidecar | +| `EMBEDDED` | embedded | +| `SEGMENTED` | segmented | +| `UNKNOWN` | unknown | \ No newline at end of file diff --git a/docs/models/operations/QueryParamType.md b/docs/models/operations/QueryParamType.md index 6a256b32..004deeb1 100644 --- a/docs/models/operations/QueryParamType.md +++ b/docs/models/operations/QueryParamType.md @@ -1,24 +1,10 @@ # QueryParamType -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - +The value `delegation` is the only supported `type` parameter. ## Values | Name | Value | | ------------ | ------------ | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | \ No newline at end of file +| `DELEGATION` | delegation | \ No newline at end of file diff --git a/docs/models/operations/Rating.md b/docs/models/operations/Rating.md deleted file mode 100644 index 22d6febc..00000000 --- a/docs/models/operations/Rating.md +++ /dev/null @@ -1,12 +0,0 @@ -# Rating - -The type of rating, for example 'audience' or 'critic'. - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `image` | *String* | :heavy_check_mark: | The URL for the rating image, for example from IMDb. | imdb://image.rating | -| `value` | *float* | :heavy_check_mark: | N/A | 5.1 | -| `type` | *String* | :heavy_check_mark: | N/A | audience | \ No newline at end of file diff --git a/docs/models/operations/Ratings.md b/docs/models/operations/Ratings.md deleted file mode 100644 index 149c41f9..00000000 --- a/docs/models/operations/Ratings.md +++ /dev/null @@ -1,10 +0,0 @@ -# Ratings - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `image` | *String* | :heavy_check_mark: | The image or reference for the rating. | imdb://image.rating | -| `value` | *float* | :heavy_check_mark: | The rating value. | 9 | -| `type` | *String* | :heavy_check_mark: | The type of rating (e.g., audience, critic). | audience | \ No newline at end of file diff --git a/docs/models/operations/RecommendationsVisibility.md b/docs/models/operations/RecommendationsVisibility.md new file mode 100644 index 00000000..ce76f3bb --- /dev/null +++ b/docs/models/operations/RecommendationsVisibility.md @@ -0,0 +1,18 @@ +# RecommendationsVisibility + +The visibility of this hub in recommendations: + - all: Visible to all users + - none: Visible to no users + - admin: Visible to only admin users + - shared: Visible to shared users + + + +## Values + +| Name | Value | +| -------- | -------- | +| `ALL` | all | +| `NONE` | none | +| `ADMIN` | admin | +| `SHARED` | shared | \ No newline at end of file diff --git a/docs/models/operations/RefreshItemsMetadataRequest.md b/docs/models/operations/RefreshItemsMetadataRequest.md new file mode 100644 index 00000000..0a134796 --- /dev/null +++ b/docs/models/operations/RefreshItemsMetadataRequest.md @@ -0,0 +1,21 @@ +# RefreshItemsMetadataRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `agent` | *Optional\* | :heavy_minus_sign: | N/A | | +| `markUpdated` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/RefreshItemsMetadataResponse.md b/docs/models/operations/RefreshItemsMetadataResponse.md new file mode 100644 index 00000000..0362ed6c --- /dev/null +++ b/docs/models/operations/RefreshItemsMetadataResponse.md @@ -0,0 +1,10 @@ +# RefreshItemsMetadataResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/RefreshPlaylistRequest.md b/docs/models/operations/RefreshPlaylistRequest.md new file mode 100644 index 00000000..3dc3f208 --- /dev/null +++ b/docs/models/operations/RefreshPlaylistRequest.md @@ -0,0 +1,22 @@ +# RefreshPlaylistRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | +| `generatorId` | *long* | :heavy_check_mark: | The generator item ID to act on | | +| `metadataId` | *long* | :heavy_check_mark: | The metadata item ID to act on | | +| `action` | [Action](../../models/operations/Action.md) | :heavy_check_mark: | The action to perform for this item on this optimizer queue | | \ No newline at end of file diff --git a/docs/models/operations/RefreshPlaylistResponse.md b/docs/models/operations/RefreshPlaylistResponse.md new file mode 100644 index 00000000..75899180 --- /dev/null +++ b/docs/models/operations/RefreshPlaylistResponse.md @@ -0,0 +1,10 @@ +# RefreshPlaylistResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/RefreshProvidersResponse.md b/docs/models/operations/RefreshProvidersResponse.md new file mode 100644 index 00000000..403a5ab6 --- /dev/null +++ b/docs/models/operations/RefreshProvidersResponse.md @@ -0,0 +1,10 @@ +# RefreshProvidersResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/RefreshSectionRequest.md b/docs/models/operations/RefreshSectionRequest.md new file mode 100644 index 00000000..922e574d --- /dev/null +++ b/docs/models/operations/RefreshSectionRequest.md @@ -0,0 +1,21 @@ +# RefreshSectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `force` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether the update of metadata and items should be performed even if modification dates indicate the items have not change | 1 | +| `path` | *Optional\* | :heavy_minus_sign: | Restrict refresh to the specified path | | \ No newline at end of file diff --git a/docs/models/operations/RefreshSectionResponse.md b/docs/models/operations/RefreshSectionResponse.md new file mode 100644 index 00000000..ef945e37 --- /dev/null +++ b/docs/models/operations/RefreshSectionResponse.md @@ -0,0 +1,10 @@ +# RefreshSectionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/RefreshSectionsMetadataRequest.md b/docs/models/operations/RefreshSectionsMetadataRequest.md new file mode 100644 index 00000000..dd1e0603 --- /dev/null +++ b/docs/models/operations/RefreshSectionsMetadataRequest.md @@ -0,0 +1,19 @@ +# RefreshSectionsMetadataRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `force` | *Optional\* | :heavy_minus_sign: | Force refresh of metadata | | \ No newline at end of file diff --git a/docs/models/operations/RefreshSectionsMetadataResponse.md b/docs/models/operations/RefreshSectionsMetadataResponse.md new file mode 100644 index 00000000..8e7cc5b9 --- /dev/null +++ b/docs/models/operations/RefreshSectionsMetadataResponse.md @@ -0,0 +1,10 @@ +# RefreshSectionsMetadataResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Release.md b/docs/models/operations/Release.md index 4ce17e5f..c732609c 100644 --- a/docs/models/operations/Release.md +++ b/docs/models/operations/Release.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | https://plex.tv/updater/releases/5136 | -| `version` | *Optional\* | :heavy_minus_sign: | N/A | 1.40.0.7775-456fbaf97 | -| `added` | *Optional\* | :heavy_minus_sign: | N/A | (PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.
(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)
(Music) Store track genres and add filtering options (#14653)
(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)
(View History) No longer create a view history entry for items marked as played (#10888)
(Web) Updated to 4.118.0 | -| `fixed` | *Optional\* | :heavy_minus_sign: | N/A | (Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)
(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)
(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)
(Collection) Server could become unresponsive when collection membership changes (#14612)
(DVR) Previously watched recordings could be deleted without being watched again (#13779)
(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)
(Library) The Content Rating not equal to None filter does not work (#14620)
(Search) Album search results could contain all the album's tracks too (#14486)
(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)
(Transcoder) HW encoding would fail on devices with no rate control (#14222)
(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605) | -| `downloadURL` | *Optional\* | :heavy_minus_sign: | N/A | https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx | -| `state` | *Optional\* | :heavy_minus_sign: | N/A | notify | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `added` | *Optional\* | :heavy_minus_sign: | A list of what has been added in this version | +| `downloadURL` | *Optional\* | :heavy_minus_sign: | The URL of where this update is available | +| `fixed` | *Optional\* | :heavy_minus_sign: | A list of what has been fixed in this version | +| `key` | *Optional\* | :heavy_minus_sign: | The URL key of the update | +| `state` | [Optional\](../../models/operations/GetUpdatesStatusState.md) | :heavy_minus_sign: | The status of this update.

- available - This release is available
- downloading - This release is downloading
- downloaded - This release has been downloaded
- installing - This release is installing
- tonight - This release will be installed tonight
- skipped - This release has been skipped
- error - This release has an error
- notify - This release is only notifying it is available (typically because it cannot be installed on this setup)
- done - This release is complete
| +| `version` | *Optional\* | :heavy_minus_sign: | The version available | \ No newline at end of file diff --git a/docs/models/operations/ReloadGuideRequest.md b/docs/models/operations/ReloadGuideRequest.md new file mode 100644 index 00000000..04de1b24 --- /dev/null +++ b/docs/models/operations/ReloadGuideRequest.md @@ -0,0 +1,19 @@ +# ReloadGuideRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *long* | :heavy_check_mark: | The ID of the DVR. | | \ No newline at end of file diff --git a/docs/models/operations/ReloadGuideResponse.md b/docs/models/operations/ReloadGuideResponse.md new file mode 100644 index 00000000..080c5d25 --- /dev/null +++ b/docs/models/operations/ReloadGuideResponse.md @@ -0,0 +1,11 @@ +# ReloadGuideResponse + + +## 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 | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/RemoveDeviceFromDVRDVR.md b/docs/models/operations/RemoveDeviceFromDVRDVR.md new file mode 100644 index 00000000..4798525b --- /dev/null +++ b/docs/models/operations/RemoveDeviceFromDVRDVR.md @@ -0,0 +1,12 @@ +# RemoveDeviceFromDVRDVR + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `device` | List\<[Device](../../models/shared/Device.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | +| `lineup` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/RemoveDeviceFromDVRDVRsMediaContainer.md b/docs/models/operations/RemoveDeviceFromDVRDVRsMediaContainer.md new file mode 100644 index 00000000..5d81f604 --- /dev/null +++ b/docs/models/operations/RemoveDeviceFromDVRDVRsMediaContainer.md @@ -0,0 +1,17 @@ +# RemoveDeviceFromDVRDVRsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *Optional\* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/models/operations/RemoveDeviceFromDVRMediaContainer.md b/docs/models/operations/RemoveDeviceFromDVRMediaContainer.md new file mode 100644 index 00000000..03d126cc --- /dev/null +++ b/docs/models/operations/RemoveDeviceFromDVRMediaContainer.md @@ -0,0 +1,9 @@ +# RemoveDeviceFromDVRMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/RemoveDeviceFromDVRDVRsMediaContainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | List\<[RemoveDeviceFromDVRDVR](../../models/operations/RemoveDeviceFromDVRDVR.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/RemoveDeviceFromDVRRequest.md b/docs/models/operations/RemoveDeviceFromDVRRequest.md new file mode 100644 index 00000000..f357251c --- /dev/null +++ b/docs/models/operations/RemoveDeviceFromDVRRequest.md @@ -0,0 +1,20 @@ +# RemoveDeviceFromDVRRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *long* | :heavy_check_mark: | The ID of the DVR. | | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device to add. | | \ No newline at end of file diff --git a/docs/models/operations/RemoveDeviceFromDVRResponse.md b/docs/models/operations/RemoveDeviceFromDVRResponse.md new file mode 100644 index 00000000..11274489 --- /dev/null +++ b/docs/models/operations/RemoveDeviceFromDVRResponse.md @@ -0,0 +1,12 @@ +# RemoveDeviceFromDVRResponse + + +## 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/RemoveDeviceFromDVRResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/RemoveDeviceFromDVRResponseBody.md b/docs/models/operations/RemoveDeviceFromDVRResponseBody.md new file mode 100644 index 00000000..eb14bce2 --- /dev/null +++ b/docs/models/operations/RemoveDeviceFromDVRResponseBody.md @@ -0,0 +1,10 @@ +# RemoveDeviceFromDVRResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/RemoveDeviceFromDVRMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/RemoveDeviceMediaContainer.md b/docs/models/operations/RemoveDeviceMediaContainer.md new file mode 100644 index 00000000..507c24ba --- /dev/null +++ b/docs/models/operations/RemoveDeviceMediaContainer.md @@ -0,0 +1,18 @@ +# RemoveDeviceMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `message` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/RemoveDeviceRequest.md b/docs/models/operations/RemoveDeviceRequest.md new file mode 100644 index 00000000..7fd19827 --- /dev/null +++ b/docs/models/operations/RemoveDeviceRequest.md @@ -0,0 +1,19 @@ +# RemoveDeviceRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device. | | \ No newline at end of file diff --git a/docs/models/operations/RemoveDeviceResponse.md b/docs/models/operations/RemoveDeviceResponse.md new file mode 100644 index 00000000..2c7d1881 --- /dev/null +++ b/docs/models/operations/RemoveDeviceResponse.md @@ -0,0 +1,12 @@ +# RemoveDeviceResponse + + +## 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/RemoveDeviceResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/RemoveDeviceResponseBody.md b/docs/models/operations/RemoveDeviceResponseBody.md new file mode 100644 index 00000000..73349b8e --- /dev/null +++ b/docs/models/operations/RemoveDeviceResponseBody.md @@ -0,0 +1,10 @@ +# RemoveDeviceResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/RemoveDeviceMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/RemoveDownloadQueueItemsRequest.md b/docs/models/operations/RemoveDownloadQueueItemsRequest.md new file mode 100644 index 00000000..dd168f28 --- /dev/null +++ b/docs/models/operations/RemoveDownloadQueueItemsRequest.md @@ -0,0 +1,20 @@ +# RemoveDownloadQueueItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *long* | :heavy_check_mark: | The queue id | | +| `itemId` | List\<*long*> | :heavy_check_mark: | The item id | [
32,
345,
23
] | \ No newline at end of file diff --git a/docs/models/operations/RemoveDownloadQueueItemsResponse.md b/docs/models/operations/RemoveDownloadQueueItemsResponse.md new file mode 100644 index 00000000..bb824a9d --- /dev/null +++ b/docs/models/operations/RemoveDownloadQueueItemsResponse.md @@ -0,0 +1,10 @@ +# RemoveDownloadQueueItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/ReorderSubscriptionRequest.md b/docs/models/operations/ReorderSubscriptionRequest.md new file mode 100644 index 00000000..1d73e21a --- /dev/null +++ b/docs/models/operations/ReorderSubscriptionRequest.md @@ -0,0 +1,20 @@ +# ReorderSubscriptionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `subscriptionId` | *long* | :heavy_check_mark: | N/A | | +| `after` | *Optional\* | :heavy_minus_sign: | The subscription to move this sub after. If missing will insert at the beginning of the list | | \ No newline at end of file diff --git a/docs/models/operations/ReorderSubscriptionResponse.md b/docs/models/operations/ReorderSubscriptionResponse.md new file mode 100644 index 00000000..46382fac --- /dev/null +++ b/docs/models/operations/ReorderSubscriptionResponse.md @@ -0,0 +1,11 @@ +# ReorderSubscriptionResponse + + +## 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 | +| `mediaContainerWithSubscription` | [Optional\](../../models/shared/MediaContainerWithSubscription.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ReportRequest.md b/docs/models/operations/ReportRequest.md new file mode 100644 index 00000000..f0466408 --- /dev/null +++ b/docs/models/operations/ReportRequest.md @@ -0,0 +1,33 @@ +# ReportRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `key` | *Optional\* | :heavy_minus_sign: | The details key for the item. | /foo | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | The rating key attribute for the item. | xyz | +| `state` | [Optional\](../../models/operations/State.md) | :heavy_minus_sign: | The current state of the media. | playing | +| `playQueueItemID` | *Optional\* | :heavy_minus_sign: | If playing media from a play queue, the play queue's ID. | 123 | +| `time` | *Optional\* | :heavy_minus_sign: | The current time offset of playback in ms. | 0 | +| `duration` | *Optional\* | :heavy_minus_sign: | The total duration of the item in ms. | 10000 | +| `continuing` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | When state is `stopped`, a flag indicating whether or not the client is going to continue playing anothe item. | 1 | +| `updated` | *Optional\* | :heavy_minus_sign: | Used when a sync client comes online and is syncing media timelines, holds the time at which the playback state was last updated. | 14200000 | +| `offline` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Also used by sync clients, used to indicate that a timeline is being synced from being offline, as opposed to being "live". | 1 | +| `timeToFirstFrame` | *Optional\* | :heavy_minus_sign: | Time in seconds till first frame is displayed. Sent only on the first playing timeline request. | 1000 | +| `timeStalled` | *Optional\* | :heavy_minus_sign: | Time in seconds spent buffering since last request. | 1000 | +| `bandwidth` | *Optional\* | :heavy_minus_sign: | Bandwidth in kbps as estimated by the client. | 100 | +| `bufferedTime` | *Optional\* | :heavy_minus_sign: | Amount of time in seconds buffered by client. Omit if computed by `bufferedSize` below. | 100 | +| `bufferedSize` | *Optional\* | :heavy_minus_sign: | Size in kilobytes of data buffered by client. Omit if computed by `bufferedTime` above | 1024 | +| `xPlexSessionIdentifier` | *Optional\* | :heavy_minus_sign: | Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) | | \ No newline at end of file diff --git a/docs/models/operations/ReportResponse.md b/docs/models/operations/ReportResponse.md new file mode 100644 index 00000000..1b69be12 --- /dev/null +++ b/docs/models/operations/ReportResponse.md @@ -0,0 +1,11 @@ +# ReportResponse + + +## 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/ReportResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ReportResponseBody.md b/docs/models/operations/ReportResponseBody.md new file mode 100644 index 00000000..1dcd62d1 --- /dev/null +++ b/docs/models/operations/ReportResponseBody.md @@ -0,0 +1,10 @@ +# ReportResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/MediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ResetPlayQueueRequest.md b/docs/models/operations/ResetPlayQueueRequest.md new file mode 100644 index 00000000..977fd362 --- /dev/null +++ b/docs/models/operations/ResetPlayQueueRequest.md @@ -0,0 +1,19 @@ +# ResetPlayQueueRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *long* | :heavy_check_mark: | The ID of the play queue. | | \ No newline at end of file diff --git a/docs/models/operations/ResetPlayQueueResponse.md b/docs/models/operations/ResetPlayQueueResponse.md new file mode 100644 index 00000000..4d04a563 --- /dev/null +++ b/docs/models/operations/ResetPlayQueueResponse.md @@ -0,0 +1,11 @@ +# ResetPlayQueueResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/ResetSectionDefaultsRequest.md b/docs/models/operations/ResetSectionDefaultsRequest.md new file mode 100644 index 00000000..c721265d --- /dev/null +++ b/docs/models/operations/ResetSectionDefaultsRequest.md @@ -0,0 +1,19 @@ +# ResetSectionDefaultsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | The section ID for the hubs to reorder | | \ No newline at end of file diff --git a/docs/models/operations/ResetSectionDefaultsResponse.md b/docs/models/operations/ResetSectionDefaultsResponse.md new file mode 100644 index 00000000..15751db4 --- /dev/null +++ b/docs/models/operations/ResetSectionDefaultsResponse.md @@ -0,0 +1,10 @@ +# ResetSectionDefaultsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/ResponseBody.md b/docs/models/operations/ResponseBody.md deleted file mode 100644 index 858a3316..00000000 --- a/docs/models/operations/ResponseBody.md +++ /dev/null @@ -1,13 +0,0 @@ -# ResponseBody - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `identifier` | *String* | :heavy_check_mark: | N/A | tv.plex.sonos | -| `baseURL` | *String* | :heavy_check_mark: | N/A | https://sonos.plex.tv | -| `title` | *String* | :heavy_check_mark: | N/A | Sonos | -| `linkURL` | *String* | :heavy_check_mark: | N/A | https://sonos.plex.tv/link | -| `provides` | *String* | :heavy_check_mark: | N/A | client,player | -| `token` | *String* | :heavy_check_mark: | The plex authtoken used to identify with | | \ No newline at end of file diff --git a/docs/models/operations/RestartProcessingDownloadQueueItemsRequest.md b/docs/models/operations/RestartProcessingDownloadQueueItemsRequest.md new file mode 100644 index 00000000..23408971 --- /dev/null +++ b/docs/models/operations/RestartProcessingDownloadQueueItemsRequest.md @@ -0,0 +1,20 @@ +# RestartProcessingDownloadQueueItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *long* | :heavy_check_mark: | The queue id | | +| `itemId` | List\<*long*> | :heavy_check_mark: | The item ids | [
32,
345,
23
] | \ No newline at end of file diff --git a/docs/models/operations/RestartProcessingDownloadQueueItemsResponse.md b/docs/models/operations/RestartProcessingDownloadQueueItemsResponse.md new file mode 100644 index 00000000..05b47290 --- /dev/null +++ b/docs/models/operations/RestartProcessingDownloadQueueItemsResponse.md @@ -0,0 +1,10 @@ +# RestartProcessingDownloadQueueItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Restricted.md b/docs/models/operations/Restricted.md deleted file mode 100644 index bbbb3665..00000000 --- a/docs/models/operations/Restricted.md +++ /dev/null @@ -1,11 +0,0 @@ -# Restricted - -Indicates if the user has restricted access. - - -## 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 deleted file mode 100644 index f03c8cfb..00000000 --- a/docs/models/operations/Role.md +++ /dev/null @@ -1,13 +0,0 @@ -# Role - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | -| `filter` | *String* | :heavy_check_mark: | The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. | actor=126522 | -| `tag` | *String* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | -| `tagKey` | *String* | :heavy_check_mark: | A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification.
NOTE: This is globally unique across all Plex Servers.
| 5d77683d85719b001f3a535e | -| `role` | *Optional\* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/models/operations/ScanRequest.md b/docs/models/operations/ScanRequest.md new file mode 100644 index 00000000..7bd4e6d4 --- /dev/null +++ b/docs/models/operations/ScanRequest.md @@ -0,0 +1,20 @@ +# ScanRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device. | | +| `source` | *Optional\* | :heavy_minus_sign: | A valid source for the scan | Cable | \ No newline at end of file diff --git a/docs/models/operations/ScanResponse.md b/docs/models/operations/ScanResponse.md new file mode 100644 index 00000000..af140620 --- /dev/null +++ b/docs/models/operations/ScanResponse.md @@ -0,0 +1,12 @@ +# ScanResponse + + +## 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 | +| `mediaContainerWithDevice` | [Optional\](../../models/shared/MediaContainerWithDevice.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Scope.md b/docs/models/operations/Scope.md index dfa16809..417782e6 100644 --- a/docs/models/operations/Scope.md +++ b/docs/models/operations/Scope.md @@ -1,6 +1,6 @@ # Scope -`all` - This is the only supported `scope` parameter. +The value `all` is the only supported `scope` parameter. ## Values diff --git a/docs/models/operations/SearchHubsMediaContainer.md b/docs/models/operations/SearchHubsMediaContainer.md new file mode 100644 index 00000000..8d308430 --- /dev/null +++ b/docs/models/operations/SearchHubsMediaContainer.md @@ -0,0 +1,17 @@ +# SearchHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | List\<[Hub](../../models/shared/Hub.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SearchHubsRequest.md b/docs/models/operations/SearchHubsRequest.md new file mode 100644 index 00000000..6080c9c0 --- /dev/null +++ b/docs/models/operations/SearchHubsRequest.md @@ -0,0 +1,21 @@ +# SearchHubsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `query` | *String* | :heavy_check_mark: | The query term | | +| `sectionId` | *Optional\* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs. | 1 | +| `limit` | *Optional\* | :heavy_minus_sign: | The number of items to return per hub. 3 if not specified | | \ No newline at end of file diff --git a/docs/models/operations/SearchHubsResponse.md b/docs/models/operations/SearchHubsResponse.md new file mode 100644 index 00000000..34727689 --- /dev/null +++ b/docs/models/operations/SearchHubsResponse.md @@ -0,0 +1,12 @@ +# SearchHubsResponse + + +## 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/SearchHubsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SearchHubsResponseBody.md b/docs/models/operations/SearchHubsResponseBody.md new file mode 100644 index 00000000..4b28c99a --- /dev/null +++ b/docs/models/operations/SearchHubsResponseBody.md @@ -0,0 +1,10 @@ +# SearchHubsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/operations/SearchHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SearchResult.md b/docs/models/operations/SearchResult.md deleted file mode 100644 index 63ccef4b..00000000 --- a/docs/models/operations/SearchResult.md +++ /dev/null @@ -1,10 +0,0 @@ -# SearchResult - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `score` | *float* | :heavy_check_mark: | The score of the search result, typically a float value between 0 and 1. | 0.92 | -| `directory` | [Optional\](../../models/operations/GetSearchAllLibrariesDirectory.md) | :heavy_minus_sign: | N/A | | -| `metadata` | [Optional\](../../models/operations/GetSearchAllLibrariesMetadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/SearchTypes.md b/docs/models/operations/SearchTypes.md deleted file mode 100644 index 32b99a0b..00000000 --- a/docs/models/operations/SearchTypes.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchTypes - - -## Values - -| Name | Value | -| -------------- | -------------- | -| `MOVIES` | movies | -| `MUSIC` | music | -| `OTHER_VIDEOS` | otherVideos | -| `PEOPLE` | people | -| `TV` | tv | \ No newline at end of file diff --git a/docs/models/operations/Server.md b/docs/models/operations/Server.md deleted file mode 100644 index 13854805..00000000 --- a/docs/models/operations/Server.md +++ /dev/null @@ -1,18 +0,0 @@ -# Server - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `name` | *Optional\* | :heavy_minus_sign: | N/A | iPad | -| `host` | *Optional\* | :heavy_minus_sign: | N/A | 10.10.10.102 | -| `address` | *Optional\* | :heavy_minus_sign: | N/A | 10.10.10.102 | -| `port` | *Optional\* | :heavy_minus_sign: | N/A | 32500 | -| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05 | -| `version` | *Optional\* | :heavy_minus_sign: | N/A | 8.17 | -| `protocol` | *Optional\* | :heavy_minus_sign: | N/A | plex | -| `product` | *Optional\* | :heavy_minus_sign: | N/A | Plex for iOS | -| `deviceClass` | *Optional\* | :heavy_minus_sign: | N/A | tablet | -| `protocolVersion` | *Optional\* | :heavy_minus_sign: | N/A | 2 | -| `protocolCapabilities` | *Optional\* | :heavy_minus_sign: | N/A | playback,playqueues,timeline,provider-playback | \ No newline at end of file diff --git a/docs/models/operations/Services.md b/docs/models/operations/Services.md deleted file mode 100644 index daf11b60..00000000 --- a/docs/models/operations/Services.md +++ /dev/null @@ -1,12 +0,0 @@ -# Services - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `identifier` | *String* | :heavy_check_mark: | N/A | metadata-dev | -| `endpoint` | *String* | :heavy_check_mark: | N/A | https://epg.provider.plex.tv | -| `token` | *Optional\* | :heavy_check_mark: | N/A | DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv | -| `secret` | *Optional\* | :heavy_check_mark: | N/A | | -| `status` | [GetTokenDetailsStatus](../../models/operations/GetTokenDetailsStatus.md) | :heavy_check_mark: | N/A | online | \ No newline at end of file diff --git a/docs/models/operations/Session.md b/docs/models/operations/Session.md deleted file mode 100644 index 719081b7..00000000 --- a/docs/models/operations/Session.md +++ /dev/null @@ -1,10 +0,0 @@ -# Session - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | 93h7e00ncblxncqw9lkfaoxi | -| `bandwidth` | *Optional\* | :heavy_minus_sign: | N/A | 1050 | -| `location` | *Optional\* | :heavy_minus_sign: | N/A | lan | \ No newline at end of file diff --git a/docs/models/operations/SetChannelmapRequest.md b/docs/models/operations/SetChannelmapRequest.md new file mode 100644 index 00000000..5bca88a3 --- /dev/null +++ b/docs/models/operations/SetChannelmapRequest.md @@ -0,0 +1,22 @@ +# SetChannelmapRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device. | | +| `channelMapping` | [Optional\](../../models/operations/ChannelMapping.md) | :heavy_minus_sign: | The mapping of changes, passed as a map of device channel to lineup VCN. | {
"46.3": 2,
"48.9": 4
} | +| `channelMappingByKey` | [Optional\](../../models/operations/ChannelMappingByKey.md) | :heavy_minus_sign: | The mapping of changes, passed as a map of device channel to lineup key. | {
"46.3": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
"48.9": "5cc83d73af4a72001e9b16d7-5cab3c63ec158a001d32db8d"
} | +| `channelsEnabled` | List\<*String*> | :heavy_minus_sign: | The channels which are enabled. | 46.1,44.1,45.1 | \ No newline at end of file diff --git a/docs/models/operations/SetChannelmapResponse.md b/docs/models/operations/SetChannelmapResponse.md new file mode 100644 index 00000000..3ea728bd --- /dev/null +++ b/docs/models/operations/SetChannelmapResponse.md @@ -0,0 +1,11 @@ +# SetChannelmapResponse + + +## 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 | +| `mediaContainerWithDevice` | [Optional\](../../models/shared/MediaContainerWithDevice.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/SetDVRPreferencesDVR.md b/docs/models/operations/SetDVRPreferencesDVR.md new file mode 100644 index 00000000..402c3bea --- /dev/null +++ b/docs/models/operations/SetDVRPreferencesDVR.md @@ -0,0 +1,12 @@ +# SetDVRPreferencesDVR + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `device` | List\<[Device](../../models/shared/Device.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | +| `lineup` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SetDVRPreferencesDVRsMediaContainer.md b/docs/models/operations/SetDVRPreferencesDVRsMediaContainer.md new file mode 100644 index 00000000..c0d55564 --- /dev/null +++ b/docs/models/operations/SetDVRPreferencesDVRsMediaContainer.md @@ -0,0 +1,17 @@ +# SetDVRPreferencesDVRsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *Optional\* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/models/operations/SetDVRPreferencesMediaContainer.md b/docs/models/operations/SetDVRPreferencesMediaContainer.md new file mode 100644 index 00000000..54c83eca --- /dev/null +++ b/docs/models/operations/SetDVRPreferencesMediaContainer.md @@ -0,0 +1,9 @@ +# SetDVRPreferencesMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/SetDVRPreferencesDVRsMediaContainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | List\<[SetDVRPreferencesDVR](../../models/operations/SetDVRPreferencesDVR.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SetDVRPreferencesRequest.md b/docs/models/operations/SetDVRPreferencesRequest.md new file mode 100644 index 00000000..6e3ef36e --- /dev/null +++ b/docs/models/operations/SetDVRPreferencesRequest.md @@ -0,0 +1,20 @@ +# SetDVRPreferencesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *long* | :heavy_check_mark: | The ID of the DVR. | | +| `name` | *Optional\* | :heavy_minus_sign: | Set the `name` preference to the provided value | | \ No newline at end of file diff --git a/docs/models/operations/SetDVRPreferencesResponse.md b/docs/models/operations/SetDVRPreferencesResponse.md new file mode 100644 index 00000000..2a4afc32 --- /dev/null +++ b/docs/models/operations/SetDVRPreferencesResponse.md @@ -0,0 +1,12 @@ +# SetDVRPreferencesResponse + + +## 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/SetDVRPreferencesResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SetDVRPreferencesResponseBody.md b/docs/models/operations/SetDVRPreferencesResponseBody.md new file mode 100644 index 00000000..ab00f1d9 --- /dev/null +++ b/docs/models/operations/SetDVRPreferencesResponseBody.md @@ -0,0 +1,10 @@ +# SetDVRPreferencesResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/SetDVRPreferencesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SetDevicePreferencesRequest.md b/docs/models/operations/SetDevicePreferencesRequest.md new file mode 100644 index 00000000..0db9b029 --- /dev/null +++ b/docs/models/operations/SetDevicePreferencesRequest.md @@ -0,0 +1,20 @@ +# SetDevicePreferencesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device. | | +| `name` | *Optional\* | :heavy_minus_sign: | The preference names and values. | | \ No newline at end of file diff --git a/docs/models/operations/SetDevicePreferencesResponse.md b/docs/models/operations/SetDevicePreferencesResponse.md new file mode 100644 index 00000000..1e0279b2 --- /dev/null +++ b/docs/models/operations/SetDevicePreferencesResponse.md @@ -0,0 +1,10 @@ +# SetDevicePreferencesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/SetItemArtworkRequest.md b/docs/models/operations/SetItemArtworkRequest.md new file mode 100644 index 00000000..fd459634 --- /dev/null +++ b/docs/models/operations/SetItemArtworkRequest.md @@ -0,0 +1,21 @@ +# SetItemArtworkRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `element` | [Element](../../models/operations/Element.md) | :heavy_check_mark: | N/A | | +| `url` | *Optional\* | :heavy_minus_sign: | The url of the new asset. If not provided, the binary of the asset must be provided in the post body. | | \ No newline at end of file diff --git a/docs/models/operations/SetItemArtworkResponse.md b/docs/models/operations/SetItemArtworkResponse.md new file mode 100644 index 00000000..968dc71c --- /dev/null +++ b/docs/models/operations/SetItemArtworkResponse.md @@ -0,0 +1,10 @@ +# SetItemArtworkResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/SetItemPreferencesRequest.md b/docs/models/operations/SetItemPreferencesRequest.md new file mode 100644 index 00000000..6eed3e6c --- /dev/null +++ b/docs/models/operations/SetItemPreferencesRequest.md @@ -0,0 +1,20 @@ +# SetItemPreferencesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `args` | [Optional\](../../models/operations/QueryParamArgs.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/SetItemPreferencesResponse.md b/docs/models/operations/SetItemPreferencesResponse.md new file mode 100644 index 00000000..fef5dfa1 --- /dev/null +++ b/docs/models/operations/SetItemPreferencesResponse.md @@ -0,0 +1,10 @@ +# SetItemPreferencesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/SetPreferencesRequest.md b/docs/models/operations/SetPreferencesRequest.md new file mode 100644 index 00000000..ac1dfc00 --- /dev/null +++ b/docs/models/operations/SetPreferencesRequest.md @@ -0,0 +1,19 @@ +# SetPreferencesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `prefs` | [Prefs](../../models/operations/Prefs.md) | :heavy_check_mark: | N/A | {
"FriendlyName": "My Server",
"ScheduledLibraryUpdateInterval": 3600,
"sendCrashReports": 1
} | \ No newline at end of file diff --git a/docs/models/operations/SetPreferencesResponse.md b/docs/models/operations/SetPreferencesResponse.md new file mode 100644 index 00000000..5f4bc2d9 --- /dev/null +++ b/docs/models/operations/SetPreferencesResponse.md @@ -0,0 +1,10 @@ +# SetPreferencesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/SetRatingRequest.md b/docs/models/operations/SetRatingRequest.md new file mode 100644 index 00000000..2938acd2 --- /dev/null +++ b/docs/models/operations/SetRatingRequest.md @@ -0,0 +1,22 @@ +# SetRatingRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `identifier` | *String* | :heavy_check_mark: | The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` | | +| `key` | *String* | :heavy_check_mark: | The key of the item to rate. This is the `ratingKey` found in metadata items | | +| `rating` | *double* | :heavy_check_mark: | The rating to give the item. | | +| `ratedAt` | *Optional\* | :heavy_minus_sign: | The time when the rating occurred. If not present, interpreted as now. | | \ No newline at end of file diff --git a/docs/models/operations/SetRatingResponse.md b/docs/models/operations/SetRatingResponse.md new file mode 100644 index 00000000..36e98328 --- /dev/null +++ b/docs/models/operations/SetRatingResponse.md @@ -0,0 +1,10 @@ +# SetRatingResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/SetSectionPreferencesQueryParamPrefs.md b/docs/models/operations/SetSectionPreferencesQueryParamPrefs.md new file mode 100644 index 00000000..e70d4d67 --- /dev/null +++ b/docs/models/operations/SetSectionPreferencesQueryParamPrefs.md @@ -0,0 +1,7 @@ +# SetSectionPreferencesQueryParamPrefs + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/SetSectionPreferencesRequest.md b/docs/models/operations/SetSectionPreferencesRequest.md new file mode 100644 index 00000000..5d1a1406 --- /dev/null +++ b/docs/models/operations/SetSectionPreferencesRequest.md @@ -0,0 +1,20 @@ +# SetSectionPreferencesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | +| `prefs` | [SetSectionPreferencesQueryParamPrefs](../../models/operations/SetSectionPreferencesQueryParamPrefs.md) | :heavy_check_mark: | N/A | {
"enableCinemaTrailers": 1,
"hidden": 0
} | \ No newline at end of file diff --git a/docs/models/operations/SetSectionPreferencesResponse.md b/docs/models/operations/SetSectionPreferencesResponse.md new file mode 100644 index 00000000..a27e24d0 --- /dev/null +++ b/docs/models/operations/SetSectionPreferencesResponse.md @@ -0,0 +1,10 @@ +# SetSectionPreferencesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/SetStreamOffsetRequest.md b/docs/models/operations/SetStreamOffsetRequest.md new file mode 100644 index 00000000..e8c96621 --- /dev/null +++ b/docs/models/operations/SetStreamOffsetRequest.md @@ -0,0 +1,21 @@ +# SetStreamOffsetRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `streamId` | *long* | :heavy_check_mark: | The id of the stream | | +| `ext` | *String* | :heavy_check_mark: | This is not a part of this endpoint but documented here to satisfy OpenAPI | | +| `offset` | *Optional\* | :heavy_minus_sign: | The offest in ms | | \ No newline at end of file diff --git a/docs/models/operations/SetStreamOffsetResponse.md b/docs/models/operations/SetStreamOffsetResponse.md new file mode 100644 index 00000000..1a96d5bb --- /dev/null +++ b/docs/models/operations/SetStreamOffsetResponse.md @@ -0,0 +1,10 @@ +# SetStreamOffsetResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/SetStreamSelectionRequest.md b/docs/models/operations/SetStreamSelectionRequest.md new file mode 100644 index 00000000..57ebce63 --- /dev/null +++ b/docs/models/operations/SetStreamSelectionRequest.md @@ -0,0 +1,22 @@ +# SetStreamSelectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `partId` | *long* | :heavy_check_mark: | The id of the part to select streams on | | +| `audioStreamID` | *Optional\* | :heavy_minus_sign: | The id of the audio stream to select in this part | | +| `subtitleStreamID` | *Optional\* | :heavy_minus_sign: | The id of the subtitle stream to select in this part. Specify 0 to select no subtitle | | +| `allParts` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Perform the same for all parts of this media selecting similar streams in each | 1 | \ No newline at end of file diff --git a/docs/models/operations/SetStreamSelectionResponse.md b/docs/models/operations/SetStreamSelectionResponse.md new file mode 100644 index 00000000..d763c0c5 --- /dev/null +++ b/docs/models/operations/SetStreamSelectionResponse.md @@ -0,0 +1,10 @@ +# SetStreamSelectionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Setting.md b/docs/models/operations/Setting.md deleted file mode 100644 index 0b311662..00000000 --- a/docs/models/operations/Setting.md +++ /dev/null @@ -1,17 +0,0 @@ -# Setting - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | EnableDatabaseTrace | -| `label` | *Optional\* | :heavy_minus_sign: | N/A | | -| `summary` | *Optional\* | :heavy_minus_sign: | N/A | | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | bool | -| `default_` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `value` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `hidden` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `advanced` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `group` | *Optional\* | :heavy_minus_sign: | N/A | | -| `enumValues` | *Optional\* | :heavy_minus_sign: | N/A | 1:admin only\|2:everyone | \ No newline at end of file diff --git a/docs/models/operations/SharedServers.md b/docs/models/operations/SharedServers.md deleted file mode 100644 index d787f3b8..00000000 --- a/docs/models/operations/SharedServers.md +++ /dev/null @@ -1,7 +0,0 @@ -# SharedServers - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/SharedSources.md b/docs/models/operations/SharedSources.md deleted file mode 100644 index ca742997..00000000 --- a/docs/models/operations/SharedSources.md +++ /dev/null @@ -1,7 +0,0 @@ -# SharedSources - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/ShowOrdering.md b/docs/models/operations/ShowOrdering.md deleted file mode 100644 index 2965ddfe..00000000 --- a/docs/models/operations/ShowOrdering.md +++ /dev/null @@ -1,21 +0,0 @@ -# ShowOrdering - -Setting that indicates the episode ordering for the show. -Options: - - None = Library default - - tmdbAiring = The Movie Database (Aired) - - aired = TheTVDB (Aired) - - dvd = TheTVDB (DVD) - - absolute = TheTVDB (Absolute) - - - -## Values - -| Name | Value | -| -------------- | -------------- | -| `None` | None | -| `TmdbAiring` | tmdbAiring | -| `TvdbAired` | aired | -| `TvdbDvd` | dvd | -| `TvdbAbsolute` | absolute | \ No newline at end of file diff --git a/docs/models/operations/ShuffleRequest.md b/docs/models/operations/ShuffleRequest.md new file mode 100644 index 00000000..0e63c006 --- /dev/null +++ b/docs/models/operations/ShuffleRequest.md @@ -0,0 +1,19 @@ +# ShuffleRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *long* | :heavy_check_mark: | The ID of the play queue. | | \ No newline at end of file diff --git a/docs/models/operations/ShuffleResponse.md b/docs/models/operations/ShuffleResponse.md new file mode 100644 index 00000000..b341fe67 --- /dev/null +++ b/docs/models/operations/ShuffleResponse.md @@ -0,0 +1,11 @@ +# ShuffleResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/Similar.md b/docs/models/operations/Similar.md deleted file mode 100644 index 29326165..00000000 --- a/docs/models/operations/Similar.md +++ /dev/null @@ -1,12 +0,0 @@ -# Similar - -The display tag for the similar item, typically the title. - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | -| `id` | *int* | :heavy_check_mark: | N/A | 259 | -| `filter` | *String* | :heavy_check_mark: | N/A | similar=259 | -| `tag` | *String* | :heavy_check_mark: | N/A | Criss Angel Mindfreak | \ No newline at end of file diff --git a/docs/models/operations/Skip.md b/docs/models/operations/Skip.md deleted file mode 100644 index 8487d677..00000000 --- a/docs/models/operations/Skip.md +++ /dev/null @@ -1,11 +0,0 @@ -# Skip - -Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Smart.md b/docs/models/operations/Smart.md deleted file mode 100644 index a4d5e784..00000000 --- a/docs/models/operations/Smart.md +++ /dev/null @@ -1,11 +0,0 @@ -# Smart - -whether the playlist is smart or not - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Sort.md b/docs/models/operations/Sort.md deleted file mode 100644 index 8760d82f..00000000 --- a/docs/models/operations/Sort.md +++ /dev/null @@ -1,15 +0,0 @@ -# Sort - - -## 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 diff --git a/docs/models/operations/SplitItemRequest.md b/docs/models/operations/SplitItemRequest.md new file mode 100644 index 00000000..f34def30 --- /dev/null +++ b/docs/models/operations/SplitItemRequest.md @@ -0,0 +1,19 @@ +# SplitItemRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/SplitItemResponse.md b/docs/models/operations/SplitItemResponse.md new file mode 100644 index 00000000..588669da --- /dev/null +++ b/docs/models/operations/SplitItemResponse.md @@ -0,0 +1,10 @@ +# SplitItemResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/StartAllTasksResponse.md b/docs/models/operations/StartAllTasksResponse.md deleted file mode 100644 index 53f3dc64..00000000 --- a/docs/models/operations/StartAllTasksResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartAllTasksResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/StartAnalysisRequest.md b/docs/models/operations/StartAnalysisRequest.md new file mode 100644 index 00000000..7ddeda8f --- /dev/null +++ b/docs/models/operations/StartAnalysisRequest.md @@ -0,0 +1,19 @@ +# StartAnalysisRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/models/operations/StartAnalysisResponse.md b/docs/models/operations/StartAnalysisResponse.md new file mode 100644 index 00000000..9fcf8078 --- /dev/null +++ b/docs/models/operations/StartAnalysisResponse.md @@ -0,0 +1,10 @@ +# StartAnalysisResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/StartBifGenerationRequest.md b/docs/models/operations/StartBifGenerationRequest.md new file mode 100644 index 00000000..cdc772df --- /dev/null +++ b/docs/models/operations/StartBifGenerationRequest.md @@ -0,0 +1,20 @@ +# StartBifGenerationRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `force` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/StartBifGenerationResponse.md b/docs/models/operations/StartBifGenerationResponse.md new file mode 100644 index 00000000..f8ac3fbc --- /dev/null +++ b/docs/models/operations/StartBifGenerationResponse.md @@ -0,0 +1,10 @@ +# StartBifGenerationResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/StartTaskRequest.md b/docs/models/operations/StartTaskRequest.md index df0b59e3..58933900 100644 --- a/docs/models/operations/StartTaskRequest.md +++ b/docs/models/operations/StartTaskRequest.md @@ -3,6 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `taskName` | [TaskName](../../models/operations/TaskName.md) | :heavy_check_mark: | the name of the task to be started. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `task` | [PathParamTask](../../models/operations/PathParamTask.md) | :heavy_check_mark: | The task name | | \ No newline at end of file diff --git a/docs/models/operations/StartTasksResponse.md b/docs/models/operations/StartTasksResponse.md new file mode 100644 index 00000000..9712c6f3 --- /dev/null +++ b/docs/models/operations/StartTasksResponse.md @@ -0,0 +1,10 @@ +# StartTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/StartTranscodeSessionQueryParamLocation.md b/docs/models/operations/StartTranscodeSessionQueryParamLocation.md new file mode 100644 index 00000000..d7388691 --- /dev/null +++ b/docs/models/operations/StartTranscodeSessionQueryParamLocation.md @@ -0,0 +1,12 @@ +# StartTranscodeSessionQueryParamLocation + +Network type of the client, can be used to help determine target bitrate. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `LAN` | lan | +| `WAN` | wan | +| `CELLULAR` | cellular | \ No newline at end of file diff --git a/docs/models/operations/StartTranscodeSessionQueryParamProtocol.md b/docs/models/operations/StartTranscodeSessionQueryParamProtocol.md new file mode 100644 index 00000000..5c5dbce5 --- /dev/null +++ b/docs/models/operations/StartTranscodeSessionQueryParamProtocol.md @@ -0,0 +1,13 @@ +# StartTranscodeSessionQueryParamProtocol + +Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + + + +## Values + +| Name | Value | +| ------ | ------ | +| `HTTP` | http | +| `HLS` | hls | +| `DASH` | dash | \ No newline at end of file diff --git a/docs/models/operations/StartTranscodeSessionQueryParamSubtitles.md b/docs/models/operations/StartTranscodeSessionQueryParamSubtitles.md new file mode 100644 index 00000000..80d3e2c9 --- /dev/null +++ b/docs/models/operations/StartTranscodeSessionQueryParamSubtitles.md @@ -0,0 +1,17 @@ +# StartTranscodeSessionQueryParamSubtitles + +Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `AUTO` | auto | +| `BURN` | burn | +| `NONE` | none | +| `SIDECAR` | sidecar | +| `EMBEDDED` | embedded | +| `SEGMENTED` | segmented | +| `UNKNOWN` | unknown | \ No newline at end of file diff --git a/docs/models/operations/StartTranscodeSessionRequest.md b/docs/models/operations/StartTranscodeSessionRequest.md new file mode 100644 index 00000000..bf8ce220 --- /dev/null +++ b/docs/models/operations/StartTranscodeSessionRequest.md @@ -0,0 +1,50 @@ +# StartTranscodeSessionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `transcodeType` | [TranscodeType](../../models/shared/TranscodeType.md) | :heavy_check_mark: | Type of transcode media | | +| `transcodeSessionId` | *Optional\* | :heavy_minus_sign: | Transcode session UUID | | +| `extension` | [Extension](../../models/operations/Extension.md) | :heavy_check_mark: | Extension
| | +| `advancedSubtitles` | [Optional\](../../models/shared/AdvancedSubtitles.md) | :heavy_minus_sign: | Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost
| burn | +| `audioBoost` | *Optional\* | :heavy_minus_sign: | Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) | 50 | +| `audioChannelCount` | *Optional\* | :heavy_minus_sign: | Target video number of audio channels. | 5 | +| `autoAdjustQuality` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports ABR. | 1 | +| `autoAdjustSubtitle` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates if the server should adjust subtitles based on Voice Activity Data. | 1 | +| `directPlay` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct playing the indicated content. | 1 | +| `directStream` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the video of the indicated content. | 1 | +| `directStreamAudio` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the audio of the indicated content. | 1 | +| `disableResolutionRotation` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates if resolution should be adjusted for orientation. | 1 | +| `hasMDE` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 | 1 | +| `location` | [Optional\](../../models/operations/StartTranscodeSessionQueryParamLocation.md) | :heavy_minus_sign: | Network type of the client, can be used to help determine target bitrate. | wan | +| `mediaBufferSize` | *Optional\* | :heavy_minus_sign: | Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. | 102400 | +| `mediaIndex` | *Optional\* | :heavy_minus_sign: | Index of the media to transcode. -1 or not specified indicates let the server choose. | 0 | +| `musicBitrate` | *Optional\* | :heavy_minus_sign: | Target bitrate for audio only files (in kbps, used to transcode). | 5000 | +| `offset` | *Optional\* | :heavy_minus_sign: | Offset from the start of the media (in seconds). | 90.5 | +| `partIndex` | *Optional\* | :heavy_minus_sign: | Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode | 0 | +| `path` | *Optional\* | :heavy_minus_sign: | Internal PMS path of the media to transcode. | /library/metadata/151671 | +| `peakBitrate` | *Optional\* | :heavy_minus_sign: | Maximum bitrate (in kbps) to use in ABR. | 12000 | +| `photoResolution` | *Optional\* | :heavy_minus_sign: | Target photo resolution. | 1080x1080 | +| `protocol` | [Optional\](../../models/operations/StartTranscodeSessionQueryParamProtocol.md) | :heavy_minus_sign: | Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022)
| dash | +| `secondsPerSegment` | *Optional\* | :heavy_minus_sign: | Number of seconds to include in each transcoded segment | 5 | +| `subtitleSize` | *Optional\* | :heavy_minus_sign: | Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) | 50 | +| `subtitles` | [Optional\](../../models/operations/StartTranscodeSessionQueryParamSubtitles.md) | :heavy_minus_sign: | Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream
| Burn | +| `videoBitrate` | *Optional\* | :heavy_minus_sign: | Target video bitrate (in kbps). | 12000 | +| `videoQuality` | *Optional\* | :heavy_minus_sign: | Target photo quality. | 50 | +| `videoResolution` | *Optional\* | :heavy_minus_sign: | Target maximum video resolution. | 1080x1080 | +| `xPlexClientProfileExtra` | *Optional\* | :heavy_minus_sign: | See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . | add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash) | +| `xPlexClientProfileName` | *Optional\* | :heavy_minus_sign: | Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. | generic | +| `xPlexSessionIdentifier` | *Optional\* | :heavy_minus_sign: | Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) | | \ No newline at end of file diff --git a/docs/models/operations/StartTranscodeSessionResponse.md b/docs/models/operations/StartTranscodeSessionResponse.md new file mode 100644 index 00000000..36de4e01 --- /dev/null +++ b/docs/models/operations/StartTranscodeSessionResponse.md @@ -0,0 +1,11 @@ +# StartTranscodeSessionResponse + + +## 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 | +| `responseStream` | *Optional\* | :heavy_minus_sign: | MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream | \ No newline at end of file diff --git a/docs/models/operations/StartUniversalTranscodeRequest.md b/docs/models/operations/StartUniversalTranscodeRequest.md deleted file mode 100644 index 87817bcd..00000000 --- a/docs/models/operations/StartUniversalTranscodeRequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# StartUniversalTranscodeRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `hasMDE` | *double* | :heavy_check_mark: | Whether the media item has MDE | 1 | -| `path` | *String* | :heavy_check_mark: | The path to the media item to transcode | /library/metadata/23409 | -| `mediaIndex` | *double* | :heavy_check_mark: | The index of the media item to transcode | 0 | -| `partIndex` | *double* | :heavy_check_mark: | The index of the part to transcode | 0 | -| `protocol` | *String* | :heavy_check_mark: | The protocol to use for the transcode session | hls | -| `fastSeek` | *Optional\* | :heavy_minus_sign: | Whether to use fast seek or not | 0 | -| `directPlay` | *Optional\* | :heavy_minus_sign: | Whether to use direct play or not | 0 | -| `directStream` | *Optional\* | :heavy_minus_sign: | Whether to use direct stream or not | 0 | -| `subtitleSize` | *Optional\* | :heavy_minus_sign: | The size of the subtitles | 100 | -| `subtites` | *Optional\* | :heavy_minus_sign: | The subtitles | burn | -| `audioBoost` | *Optional\* | :heavy_minus_sign: | The audio boost | 100 | -| `location` | *Optional\* | :heavy_minus_sign: | The location of the transcode session | lan | -| `mediaBufferSize` | *Optional\* | :heavy_minus_sign: | The size of the media buffer | 102400 | -| `session` | *Optional\* | :heavy_minus_sign: | The session ID | zvcage8b7rkioqcm8f4uns4c | -| `addDebugOverlay` | *Optional\* | :heavy_minus_sign: | Whether to add a debug overlay or not | 0 | -| `autoAdjustQuality` | *Optional\* | :heavy_minus_sign: | Whether to auto adjust quality or not | 0 | \ No newline at end of file diff --git a/docs/models/operations/StartUniversalTranscodeResponse.md b/docs/models/operations/StartUniversalTranscodeResponse.md deleted file mode 100644 index d3e781b2..00000000 --- a/docs/models/operations/StartUniversalTranscodeResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartUniversalTranscodeResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/State.md b/docs/models/operations/State.md index f4f712a5..a59897c3 100644 --- a/docs/models/operations/State.md +++ b/docs/models/operations/State.md @@ -1,12 +1,13 @@ # State -The state of the media item +The current state of the media. ## Values -| Name | Value | -| --------- | --------- | -| `PLAYING` | playing | -| `PAUSED` | paused | -| `STOPPED` | stopped | \ No newline at end of file +| Name | Value | +| ----------- | ----------- | +| `STOPPED` | stopped | +| `BUFFERING` | buffering | +| `PLAYING` | playing | +| `PAUSED` | paused | \ No newline at end of file diff --git a/docs/models/operations/StatisticsBandwidth.md b/docs/models/operations/StatisticsBandwidth.md deleted file mode 100644 index b9fddcb6..00000000 --- a/docs/models/operations/StatisticsBandwidth.md +++ /dev/null @@ -1,13 +0,0 @@ -# StatisticsBandwidth - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `accountID` | *Optional\* | :heavy_minus_sign: | N/A | 238960586 | -| `deviceID` | *Optional\* | :heavy_minus_sign: | N/A | 208 | -| `timespan` | *Optional\* | :heavy_minus_sign: | N/A | 6 | -| `at` | *Optional\* | :heavy_minus_sign: | N/A | 1718387650 | -| `lan` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `bytes` | *Optional\* | :heavy_minus_sign: | N/A | 22 | \ No newline at end of file diff --git a/docs/models/operations/StatisticsMedia.md b/docs/models/operations/StatisticsMedia.md deleted file mode 100644 index da1bf732..00000000 --- a/docs/models/operations/StatisticsMedia.md +++ /dev/null @@ -1,14 +0,0 @@ -# StatisticsMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `accountID` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `deviceID` | *Optional\* | :heavy_minus_sign: | N/A | 13 | -| `timespan` | *Optional\* | :heavy_minus_sign: | N/A | 4 | -| `at` | *Optional\* | :heavy_minus_sign: | N/A | 1707141600 | -| `metadataType` | *Optional\* | :heavy_minus_sign: | N/A | 4 | -| `count` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 1555 | \ No newline at end of file diff --git a/docs/models/operations/StatisticsResources.md b/docs/models/operations/StatisticsResources.md deleted file mode 100644 index dd5d3077..00000000 --- a/docs/models/operations/StatisticsResources.md +++ /dev/null @@ -1,13 +0,0 @@ -# StatisticsResources - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -------------------------- | -| `timespan` | *Optional\* | :heavy_minus_sign: | N/A | 6 | -| `at` | *Optional\* | :heavy_minus_sign: | N/A | 1718384427 | -| `hostCpuUtilization` | *Optional\* | :heavy_minus_sign: | N/A | 1.276 | -| `processCpuUtilization` | *Optional\* | :heavy_minus_sign: | N/A | 0.025 | -| `hostMemoryUtilization` | *Optional\* | :heavy_minus_sign: | N/A | 17.026 | -| `processMemoryUtilization` | *Optional\* | :heavy_minus_sign: | N/A | 0.493 | \ No newline at end of file diff --git a/docs/models/operations/Status.md b/docs/models/operations/Status.md index 01a15395..821f2701 100644 --- a/docs/models/operations/Status.md +++ b/docs/models/operations/Status.md @@ -1,10 +1,20 @@ # Status -Current friend request status +The state of this queue + - deciding: At least one item is still being decided + - waiting: At least one item is waiting for transcode and none are currently transcoding + - processing: At least one item is being transcoded + - done: All items are available (or potentially expired) + - error: At least one item has encountered an error + ## Values -| Name | Value | -| ---------- | ---------- | -| `ACCEPTED` | accepted | \ No newline at end of file +| Name | Value | +| ------------ | ------------ | +| `DECIDING` | deciding | +| `WAITING` | waiting | +| `PROCESSING` | processing | +| `DONE` | done | +| `ERROR` | error | \ No newline at end of file diff --git a/docs/models/operations/StopAllRefreshesResponse.md b/docs/models/operations/StopAllRefreshesResponse.md new file mode 100644 index 00000000..6aa8528f --- /dev/null +++ b/docs/models/operations/StopAllRefreshesResponse.md @@ -0,0 +1,11 @@ +# StopAllRefreshesResponse + + +## 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 | +| `requestHandlerSlashGetResponses200` | [Optional\](../../models/shared/RequestHandlerSlashGetResponses200.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/StopAllTasksResponse.md b/docs/models/operations/StopAllTasksResponse.md deleted file mode 100644 index c26d9a28..00000000 --- a/docs/models/operations/StopAllTasksResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopAllTasksResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/StopDVRReloadRequest.md b/docs/models/operations/StopDVRReloadRequest.md new file mode 100644 index 00000000..e58af971 --- /dev/null +++ b/docs/models/operations/StopDVRReloadRequest.md @@ -0,0 +1,19 @@ +# StopDVRReloadRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *long* | :heavy_check_mark: | The ID of the DVR. | | \ No newline at end of file diff --git a/docs/models/operations/StopDVRReloadResponse.md b/docs/models/operations/StopDVRReloadResponse.md new file mode 100644 index 00000000..090121b0 --- /dev/null +++ b/docs/models/operations/StopDVRReloadResponse.md @@ -0,0 +1,10 @@ +# StopDVRReloadResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/StopScanRequest.md b/docs/models/operations/StopScanRequest.md new file mode 100644 index 00000000..85d41745 --- /dev/null +++ b/docs/models/operations/StopScanRequest.md @@ -0,0 +1,19 @@ +# StopScanRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *long* | :heavy_check_mark: | The ID of the device. | | \ No newline at end of file diff --git a/docs/models/operations/StopScanResponse.md b/docs/models/operations/StopScanResponse.md new file mode 100644 index 00000000..8111b0a0 --- /dev/null +++ b/docs/models/operations/StopScanResponse.md @@ -0,0 +1,11 @@ +# StopScanResponse + + +## 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 | +| `mediaContainerWithDevice` | [Optional\](../../models/shared/MediaContainerWithDevice.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/StopTaskRequest.md b/docs/models/operations/StopTaskRequest.md index 29b88b9b..14a192d0 100644 --- a/docs/models/operations/StopTaskRequest.md +++ b/docs/models/operations/StopTaskRequest.md @@ -3,6 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `taskName` | [PathParamTaskName](../../models/operations/PathParamTaskName.md) | :heavy_check_mark: | The name of the task to be started. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `task` | [Task](../../models/operations/Task.md) | :heavy_check_mark: | The task name | | \ No newline at end of file diff --git a/docs/models/operations/StopTasksResponse.md b/docs/models/operations/StopTasksResponse.md new file mode 100644 index 00000000..ebeb6207 --- /dev/null +++ b/docs/models/operations/StopTasksResponse.md @@ -0,0 +1,10 @@ +# StopTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/StopTranscodeSessionRequest.md b/docs/models/operations/StopTranscodeSessionRequest.md deleted file mode 100644 index 863a31c0..00000000 --- a/docs/models/operations/StopTranscodeSessionRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# StopTranscodeSessionRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `sessionKey` | *String* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep | \ No newline at end of file diff --git a/docs/models/operations/StopTranscodeSessionResponse.md b/docs/models/operations/StopTranscodeSessionResponse.md deleted file mode 100644 index 4688cfd6..00000000 --- a/docs/models/operations/StopTranscodeSessionResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopTranscodeSessionResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Stream.md b/docs/models/operations/Stream.md deleted file mode 100644 index 36638128..00000000 --- a/docs/models/operations/Stream.md +++ /dev/null @@ -1,58 +0,0 @@ -# Stream - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 | -| `streamType` | *long* | :heavy_check_mark: | Stream type:
- VIDEO = 1
- AUDIO = 2
- SUBTITLE = 3
| | -| `format` | *Optional\* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | -| `default_` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is default. | true | -| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc | -| `index` | *Optional\* | :heavy_minus_sign: | Index of the stream. | 0 | -| `bitrate` | *Optional\* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | -| `language` | *Optional\* | :heavy_minus_sign: | Language of the stream. | English | -| `languageTag` | *Optional\* | :heavy_minus_sign: | Language tag (e.g., en). | en | -| `languageCode` | *Optional\* | :heavy_minus_sign: | ISO language code. | eng | -| `headerCompression` | *Optional\* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | -| `doviblCompatID` | *Optional\* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | -| `doviblPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | -| `dovielPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | -| `doviLevel` | *Optional\* | :heavy_minus_sign: | Dolby Vision level. | 6 | -| `doviPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | -| `doviProfile` | *Optional\* | :heavy_minus_sign: | Dolby Vision profile. | 8 | -| `dovirpuPresent` | *Optional\* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | -| `doviVersion` | *Optional\* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | -| `bitDepth` | *Optional\* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | -| `chromaLocation` | *Optional\* | :heavy_minus_sign: | Chroma sample location. | topleft | -| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | -| `codedHeight` | *Optional\* | :heavy_minus_sign: | Coded video height. | 1608 | -| `codedWidth` | *Optional\* | :heavy_minus_sign: | Coded video width. | 3840 | -| `closedCaptions` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `colorPrimaries` | *Optional\* | :heavy_minus_sign: | Color primaries used. | bt2020 | -| `colorRange` | *Optional\* | :heavy_minus_sign: | Color range (e.g., tv). | tv | -| `colorSpace` | *Optional\* | :heavy_minus_sign: | Color space. | bt2020nc | -| `colorTrc` | *Optional\* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | -| `frameRate` | *Optional\* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | -| `key` | *Optional\* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | -| `height` | *Optional\* | :heavy_minus_sign: | Height of the video stream. | 1602 | -| `level` | *Optional\* | :heavy_minus_sign: | Video level. | 150 | -| `original` | *Optional\* | :heavy_minus_sign: | Indicates if this is the original stream. | true | -| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `profile` | *Optional\* | :heavy_minus_sign: | Video profile. | main 10 | -| `scanType` | *Optional\* | :heavy_minus_sign: | N/A | progressive | -| `embeddedInVideo` | *Optional\* | :heavy_minus_sign: | N/A | progressive | -| `refFrames` | *Optional\* | :heavy_minus_sign: | Number of reference frames. | 1 | -| `width` | *Optional\* | :heavy_minus_sign: | Width of the video stream. | 3840 | -| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `selected` | *Optional\* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | -| `forced` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `channels` | *Optional\* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | -| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | -| `samplingRate` | *Optional\* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | -| `canAutoSync` | *Optional\* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | -| `hearingImpaired` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | -| `dub` | *Optional\* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | -| `title` | *Optional\* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file diff --git a/docs/models/operations/Subscription.md b/docs/models/operations/Subscription.md deleted file mode 100644 index 645f7335..00000000 --- a/docs/models/operations/Subscription.md +++ /dev/null @@ -1,15 +0,0 @@ -# Subscription - -If the account’s Plex Pass subscription is active - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `features` | List\<*String*> | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | -| `active` | *Optional\* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | -| `subscribedAt` | *JsonNullable\* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | -| `status` | [Optional\](../../models/operations/GetTokenDetailsAuthenticationStatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | -| `paymentService` | *JsonNullable\* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | -| `plan` | *JsonNullable\* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/models/operations/SubscriptionTemplate.md b/docs/models/operations/SubscriptionTemplate.md new file mode 100644 index 00000000..5de6e6b6 --- /dev/null +++ b/docs/models/operations/SubscriptionTemplate.md @@ -0,0 +1,8 @@ +# SubscriptionTemplate + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `mediaSubscription` | List\<[MediaSubscription](../../models/operations/MediaSubscription.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Subtitles.md b/docs/models/operations/Subtitles.md new file mode 100644 index 00000000..625af38b --- /dev/null +++ b/docs/models/operations/Subtitles.md @@ -0,0 +1,17 @@ +# Subtitles + +Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `AUTO` | auto | +| `BURN` | burn | +| `NONE` | none | +| `SIDECAR` | sidecar | +| `EMBEDDED` | embedded | +| `SEGMENTED` | segmented | +| `UNKNOWN` | unknown | \ No newline at end of file diff --git a/docs/models/operations/Tag.md b/docs/models/operations/Tag.md deleted file mode 100644 index b736af36..00000000 --- a/docs/models/operations/Tag.md +++ /dev/null @@ -1,25 +0,0 @@ -# Tag - -A key representing a specific tag within the section. - - -## Values - -| Name | Value | -| ----------------- | ----------------- | -| `UNWATCHED` | unwatched | -| `NEWEST` | newest | -| `RECENTLY_ADDED` | recentlyAdded | -| `RECENTLY_VIEWED` | recentlyViewed | -| `ON_DECK` | onDeck | -| `COLLECTION` | collection | -| `EDITION` | edition | -| `YEAR` | year | -| `DECADE` | decade | -| `DIRECTOR` | director | -| `CONTENT_RATING` | contentRating | -| `RATING` | rating | -| `RESOLUTION` | resolution | -| `FIRST_CHARACTER` | firstCharacter | -| `FOLDER` | folder | -| `ALBUMS` | albums | \ No newline at end of file diff --git a/docs/models/operations/Task.md b/docs/models/operations/Task.md new file mode 100644 index 00000000..e9d63f20 --- /dev/null +++ b/docs/models/operations/Task.md @@ -0,0 +1,31 @@ +# Task + +The task name + + +## Values + +| Name | Value | +| -------------------------------------- | -------------------------------------- | +| `AUTOMATIC_UPDATES` | AutomaticUpdates | +| `BACKUP_DATABASE` | BackupDatabase | +| `BUTLER_TASK_GENERATE_AD_MARKERS` | ButlerTaskGenerateAdMarkers | +| `BUTLER_TASK_GENERATE_CREDITS_MARKERS` | ButlerTaskGenerateCreditsMarkers | +| `BUTLER_TASK_GENERATE_INTRO_MARKERS` | ButlerTaskGenerateIntroMarkers | +| `BUTLER_TASK_GENERATE_VOICE_ACTIVITY` | ButlerTaskGenerateVoiceActivity | +| `CLEAN_OLD_BUNDLES` | CleanOldBundles | +| `CLEAN_OLD_CACHE_FILES` | CleanOldCacheFiles | +| `DEEP_MEDIA_ANALYSIS` | DeepMediaAnalysis | +| `GARBAGE_COLLECT_BLOBS` | GarbageCollectBlobs | +| `GARBAGE_COLLECT_LIBRARY_MEDIA` | GarbageCollectLibraryMedia | +| `GENERATE_BLUR_HASHES` | GenerateBlurHashes | +| `GENERATE_CHAPTER_THUMBS` | GenerateChapterThumbs | +| `GENERATE_MEDIA_INDEX_FILES` | GenerateMediaIndexFiles | +| `LOUDNESS_ANALYSIS` | LoudnessAnalysis | +| `MUSIC_ANALYSIS` | MusicAnalysis | +| `OPTIMIZE_DATABASE` | OptimizeDatabase | +| `REFRESH_EPG_GUIDES` | RefreshEpgGuides | +| `REFRESH_LIBRARIES` | RefreshLibraries | +| `REFRESH_LOCAL_MEDIA` | RefreshLocalMedia | +| `REFRESH_PERIODIC_METADATA` | RefreshPeriodicMetadata | +| `UPGRADE_MEDIA_ANALYSIS` | UpgradeMediaAnalysis | \ No newline at end of file diff --git a/docs/models/operations/TaskName.md b/docs/models/operations/TaskName.md deleted file mode 100644 index 44383b38..00000000 --- a/docs/models/operations/TaskName.md +++ /dev/null @@ -1,23 +0,0 @@ -# TaskName - -the name of the task to be started. - - -## Values - -| Name | Value | -| ----------------------------- | ----------------------------- | -| `BACKUP_DATABASE` | BackupDatabase | -| `BUILD_GRACENOTE_COLLECTIONS` | BuildGracenoteCollections | -| `CHECK_FOR_UPDATES` | CheckForUpdates | -| `CLEAN_OLD_BUNDLES` | CleanOldBundles | -| `CLEAN_OLD_CACHE_FILES` | CleanOldCacheFiles | -| `DEEP_MEDIA_ANALYSIS` | DeepMediaAnalysis | -| `GENERATE_AUTO_TAGS` | GenerateAutoTags | -| `GENERATE_CHAPTER_THUMBS` | GenerateChapterThumbs | -| `GENERATE_MEDIA_INDEX_FILES` | GenerateMediaIndexFiles | -| `OPTIMIZE_DATABASE` | OptimizeDatabase | -| `REFRESH_LIBRARIES` | RefreshLibraries | -| `REFRESH_LOCAL_MEDIA` | RefreshLocalMedia | -| `REFRESH_PERIODIC_METADATA` | RefreshPeriodicMetadata | -| `UPGRADE_MEDIA_ANALYSIS` | UpgradeMediaAnalysis | \ No newline at end of file diff --git a/docs/models/operations/TerminateSessionRequest.md b/docs/models/operations/TerminateSessionRequest.md new file mode 100644 index 00000000..50ff4ca8 --- /dev/null +++ b/docs/models/operations/TerminateSessionRequest.md @@ -0,0 +1,20 @@ +# TerminateSessionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sessionId` | *String* | :heavy_check_mark: | The session id (found in the `Session` element in [/status/sessions](#tag/Status/operation/statusGetSlash)) | cdefghijklmnopqrstuvwxyz | +| `reason` | *Optional\* | :heavy_minus_sign: | The reason to give to the user (typically displayed in the client) | Stop Playing | \ No newline at end of file diff --git a/docs/models/operations/TerminateSessionResponse.md b/docs/models/operations/TerminateSessionResponse.md new file mode 100644 index 00000000..89f2a8fe --- /dev/null +++ b/docs/models/operations/TerminateSessionResponse.md @@ -0,0 +1,10 @@ +# TerminateSessionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Tonight.md b/docs/models/operations/Tonight.md deleted file mode 100644 index 7bf98ba0..00000000 --- a/docs/models/operations/Tonight.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tonight - -Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Transcode.md b/docs/models/operations/Transcode.md new file mode 100644 index 00000000..94ea9d94 --- /dev/null +++ b/docs/models/operations/Transcode.md @@ -0,0 +1,9 @@ +# Transcode + +The transcode session object which is not yet documented otherwise it'd be a $ref here. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/TranscodeImageRequest.md b/docs/models/operations/TranscodeImageRequest.md new file mode 100644 index 00000000..fdae65e7 --- /dev/null +++ b/docs/models/operations/TranscodeImageRequest.md @@ -0,0 +1,32 @@ +# TranscodeImageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `url` | *Optional\* | :heavy_minus_sign: | The source URL for the image to transcode. Note, if this URL requires a token such as `X-Plex-Token`, it should be given as a query parameter to this url. | /library/metadata/265/thumb/1715112705 | +| `format` | [Optional\](../../models/operations/Format.md) | :heavy_minus_sign: | The output format for the image; defaults to jpg | | +| `width` | *Optional\* | :heavy_minus_sign: | The desired width of the output image | | +| `height` | *Optional\* | :heavy_minus_sign: | The desired height of the output image | | +| `quality` | *Optional\* | :heavy_minus_sign: | The desired quality of the output. -1 means the highest quality. Defaults to -1 | | +| `background` | *Optional\* | :heavy_minus_sign: | The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none | #ff5522 | +| `upscale` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates if image should be upscaled to the desired width/height. Defaults to false | 1 | +| `minSize` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension. | 1 | +| `rotate` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Obey the rotation values specified in EXIF data. Defaults to true. | 1 | +| `blur` | *Optional\* | :heavy_minus_sign: | Apply a blur to the image, Defaults to 0 (none) | | +| `saturation` | *Optional\* | :heavy_minus_sign: | Scale the image saturation by the specified percentage. Defaults to 100 | | +| `opacity` | *Optional\* | :heavy_minus_sign: | Render the image at the specified opacity percentage. Defaults to 100 | | +| `chromaSubsampling` | [Optional\](../../models/operations/ChromaSubsampling.md) | :heavy_minus_sign: | Use the specified chroma subsambling.
- 0: 411
- 1: 420
- 2: 422
- 3: 444
Defaults to 3 (444) | | +| `blendColor` | *Optional\* | :heavy_minus_sign: | The color to blend with the image. Defaults to none | #ff5522 | \ No newline at end of file diff --git a/docs/models/operations/TranscodeImageResponse.md b/docs/models/operations/TranscodeImageResponse.md new file mode 100644 index 00000000..dad471cb --- /dev/null +++ b/docs/models/operations/TranscodeImageResponse.md @@ -0,0 +1,13 @@ +# TranscodeImageResponse + + +## 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 | +| `twoHundredImageJpegResponseStream` | *Optional\* | :heavy_minus_sign: | The resulting image | +| `twoHundredImagePngResponseStream` | *Optional\* | :heavy_minus_sign: | The resulting image | +| `twoHundredImageXPortablePixmapResponseStream` | *Optional\* | :heavy_minus_sign: | The resulting image | \ No newline at end of file diff --git a/docs/models/operations/TranscodeJob.md b/docs/models/operations/TranscodeJob.md new file mode 100644 index 00000000..89bacaaf --- /dev/null +++ b/docs/models/operations/TranscodeJob.md @@ -0,0 +1,18 @@ +# TranscodeJob + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `generatorID` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `progress` | *Optional\* | :heavy_minus_sign: | N/A | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | +| `remaining` | *Optional\* | :heavy_minus_sign: | The number of seconds remaining in this job | +| `size` | *Optional\* | :heavy_minus_sign: | The size of the result so far | +| `speed` | *Optional\* | :heavy_minus_sign: | The speed of the transcode; 1.0 means real-time | +| `targetTagID` | *Optional\* | :heavy_minus_sign: | The tag associated with the job. This could be the tag containing the optimizer settings. | +| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | [Optional\](../../models/operations/GetBackgroundTasksType.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/TranscodeSession.md b/docs/models/operations/TranscodeSession.md deleted file mode 100644 index 8cea1ad0..00000000 --- a/docs/models/operations/TranscodeSession.md +++ /dev/null @@ -1,31 +0,0 @@ -# TranscodeSession - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `key` | *Optional\* | :heavy_minus_sign: | N/A | vv3i2q2lax92qlzul1hbd4bx | -| `throttled` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `complete` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `progress` | *Optional\* | :heavy_minus_sign: | N/A | 1.7999999523162842 | -| `size` | *Optional\* | :heavy_minus_sign: | N/A | -22 | -| `speed` | *Optional\* | :heavy_minus_sign: | N/A | 25.100000381469727 | -| `error` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 1445695 | -| `remaining` | *Optional\* | :heavy_minus_sign: | N/A | 53 | -| `context` | *Optional\* | :heavy_minus_sign: | N/A | streaming | -| `sourceVideoCodec` | *Optional\* | :heavy_minus_sign: | N/A | h264 | -| `sourceAudioCodec` | *Optional\* | :heavy_minus_sign: | N/A | aac | -| `videoDecision` | *Optional\* | :heavy_minus_sign: | N/A | transcode | -| `audioDecision` | *Optional\* | :heavy_minus_sign: | N/A | transcode | -| `subtitleDecision` | *Optional\* | :heavy_minus_sign: | N/A | burn | -| `protocol` | *Optional\* | :heavy_minus_sign: | N/A | http | -| `container` | *Optional\* | :heavy_minus_sign: | N/A | mkv | -| `videoCodec` | *Optional\* | :heavy_minus_sign: | N/A | h264 | -| `audioCodec` | *Optional\* | :heavy_minus_sign: | N/A | opus | -| `audioChannels` | *Optional\* | :heavy_minus_sign: | N/A | 1 | -| `transcodeHwRequested` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `timeStamp` | *Optional\* | :heavy_minus_sign: | N/A | 1.7058958054919229e+09 | -| `maxOffsetAvailable` | *Optional\* | :heavy_minus_sign: | N/A | 29.53 | -| `minOffsetAvailable` | *Optional\* | :heavy_minus_sign: | N/A | 3.003000020980835 | \ No newline at end of file diff --git a/docs/models/operations/TranscodeSubtitlesRequest.md b/docs/models/operations/TranscodeSubtitlesRequest.md new file mode 100644 index 00000000..34b912ac --- /dev/null +++ b/docs/models/operations/TranscodeSubtitlesRequest.md @@ -0,0 +1,49 @@ +# TranscodeSubtitlesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `transcodeType` | [TranscodeType](../../models/shared/TranscodeType.md) | :heavy_check_mark: | Type of transcode media | | +| `transcodeSessionId` | *Optional\* | :heavy_minus_sign: | Transcode session UUID | | +| `advancedSubtitles` | [Optional\](../../models/shared/AdvancedSubtitles.md) | :heavy_minus_sign: | Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost
| burn | +| `audioBoost` | *Optional\* | :heavy_minus_sign: | Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) | 50 | +| `audioChannelCount` | *Optional\* | :heavy_minus_sign: | Target video number of audio channels. | 5 | +| `autoAdjustQuality` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports ABR. | 1 | +| `autoAdjustSubtitle` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates if the server should adjust subtitles based on Voice Activity Data. | 1 | +| `directPlay` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct playing the indicated content. | 1 | +| `directStream` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the video of the indicated content. | 1 | +| `directStreamAudio` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the audio of the indicated content. | 1 | +| `disableResolutionRotation` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Indicates if resolution should be adjusted for orientation. | 1 | +| `hasMDE` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 | 1 | +| `location` | [Optional\](../../models/operations/QueryParamLocation.md) | :heavy_minus_sign: | Network type of the client, can be used to help determine target bitrate. | wan | +| `mediaBufferSize` | *Optional\* | :heavy_minus_sign: | Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. | 102400 | +| `mediaIndex` | *Optional\* | :heavy_minus_sign: | Index of the media to transcode. -1 or not specified indicates let the server choose. | 0 | +| `musicBitrate` | *Optional\* | :heavy_minus_sign: | Target bitrate for audio only files (in kbps, used to transcode). | 5000 | +| `offset` | *Optional\* | :heavy_minus_sign: | Offset from the start of the media (in seconds). | 90.5 | +| `partIndex` | *Optional\* | :heavy_minus_sign: | Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode | 0 | +| `path` | *Optional\* | :heavy_minus_sign: | Internal PMS path of the media to transcode. | /library/metadata/151671 | +| `peakBitrate` | *Optional\* | :heavy_minus_sign: | Maximum bitrate (in kbps) to use in ABR. | 12000 | +| `photoResolution` | *Optional\* | :heavy_minus_sign: | Target photo resolution. | 1080x1080 | +| `protocol` | [Optional\](../../models/operations/QueryParamProtocol.md) | :heavy_minus_sign: | Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022)
| dash | +| `secondsPerSegment` | *Optional\* | :heavy_minus_sign: | Number of seconds to include in each transcoded segment | 5 | +| `subtitleSize` | *Optional\* | :heavy_minus_sign: | Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) | 50 | +| `subtitles` | [Optional\](../../models/operations/QueryParamSubtitles.md) | :heavy_minus_sign: | Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream
| Burn | +| `videoBitrate` | *Optional\* | :heavy_minus_sign: | Target video bitrate (in kbps). | 12000 | +| `videoQuality` | *Optional\* | :heavy_minus_sign: | Target photo quality. | 50 | +| `videoResolution` | *Optional\* | :heavy_minus_sign: | Target maximum video resolution. | 1080x1080 | +| `xPlexClientProfileExtra` | *Optional\* | :heavy_minus_sign: | See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . | add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash) | +| `xPlexClientProfileName` | *Optional\* | :heavy_minus_sign: | Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. | generic | +| `xPlexSessionIdentifier` | *Optional\* | :heavy_minus_sign: | Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) | | \ No newline at end of file diff --git a/docs/models/operations/TranscodeSubtitlesResponse.md b/docs/models/operations/TranscodeSubtitlesResponse.md new file mode 100644 index 00000000..1d8f3563 --- /dev/null +++ b/docs/models/operations/TranscodeSubtitlesResponse.md @@ -0,0 +1,10 @@ +# TranscodeSubtitlesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Trials.md b/docs/models/operations/Trials.md deleted file mode 100644 index 1b9b77de..00000000 --- a/docs/models/operations/Trials.md +++ /dev/null @@ -1,7 +0,0 @@ -# Trials - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/TriggerFallbackRequest.md b/docs/models/operations/TriggerFallbackRequest.md new file mode 100644 index 00000000..994a28d4 --- /dev/null +++ b/docs/models/operations/TriggerFallbackRequest.md @@ -0,0 +1,20 @@ +# TriggerFallbackRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `transcodeType` | [TranscodeType](../../models/shared/TranscodeType.md) | :heavy_check_mark: | Type of transcode media | | +| `transcodeSessionId` | *Optional\* | :heavy_minus_sign: | Transcode session UUID | | \ No newline at end of file diff --git a/docs/models/operations/TriggerFallbackResponse.md b/docs/models/operations/TriggerFallbackResponse.md new file mode 100644 index 00000000..fe351085 --- /dev/null +++ b/docs/models/operations/TriggerFallbackResponse.md @@ -0,0 +1,10 @@ +# TriggerFallbackResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/TuneChannelRequest.md b/docs/models/operations/TuneChannelRequest.md new file mode 100644 index 00000000..4f5e729a --- /dev/null +++ b/docs/models/operations/TuneChannelRequest.md @@ -0,0 +1,20 @@ +# TuneChannelRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *long* | :heavy_check_mark: | The ID of the DVR. | | +| `channel` | *String* | :heavy_check_mark: | The channel ID to tune | 2.1 | \ No newline at end of file diff --git a/docs/models/operations/TuneChannelResponse.md b/docs/models/operations/TuneChannelResponse.md new file mode 100644 index 00000000..81e48c9d --- /dev/null +++ b/docs/models/operations/TuneChannelResponse.md @@ -0,0 +1,12 @@ +# TuneChannelResponse + + +## 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 | +| `mediaContainerWithMetadata` | [Optional\](../../models/shared/MediaContainerWithMetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/Type.md b/docs/models/operations/Type.md index e353fcf8..36728af5 100644 --- a/docs/models/operations/Type.md +++ b/docs/models/operations/Type.md @@ -1,24 +1,12 @@ # Type -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - +The type of play queue to create ## Values -| Name | Value | -| ------------ | ------------ | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | \ No newline at end of file +| Name | Value | +| ------- | ------- | +| `AUDIO` | audio | +| `VIDEO` | video | +| `PHOTO` | photo | \ No newline at end of file diff --git a/docs/models/operations/UltraBlurColors.md b/docs/models/operations/UltraBlurColors.md index 0fa5b989..af995434 100644 --- a/docs/models/operations/UltraBlurColors.md +++ b/docs/models/operations/UltraBlurColors.md @@ -3,9 +3,9 @@ ## 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 +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `bottomLeft` | *Optional\* | :heavy_minus_sign: | The color (hex) for the bottom left quadrant. | +| `bottomRight` | *Optional\* | :heavy_minus_sign: | The color (hex) for the bottom right quadrant. | +| `topLeft` | *Optional\* | :heavy_minus_sign: | The color (hex) for the top left quadrant. | +| `topRight` | *Optional\* | :heavy_minus_sign: | The color (hex) for the top right quadrant. | \ No newline at end of file diff --git a/docs/models/operations/UnmatchRequest.md b/docs/models/operations/UnmatchRequest.md new file mode 100644 index 00000000..541abe3e --- /dev/null +++ b/docs/models/operations/UnmatchRequest.md @@ -0,0 +1,19 @@ +# UnmatchRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/UnmatchResponse.md b/docs/models/operations/UnmatchResponse.md new file mode 100644 index 00000000..6439a973 --- /dev/null +++ b/docs/models/operations/UnmatchResponse.md @@ -0,0 +1,10 @@ +# UnmatchResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/UnscrobbleRequest.md b/docs/models/operations/UnscrobbleRequest.md new file mode 100644 index 00000000..61687c16 --- /dev/null +++ b/docs/models/operations/UnscrobbleRequest.md @@ -0,0 +1,21 @@ +# UnscrobbleRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `identifier` | *String* | :heavy_check_mark: | The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` | | +| `key` | *Optional\* | :heavy_minus_sign: | The key of the item to rate. This is the `ratingKey` found in metadata items | | +| `uri` | *Optional\* | :heavy_minus_sign: | The URI of the item to mark as played. See intro for description of the URIs | | \ No newline at end of file diff --git a/docs/models/operations/UnscrobbleResponse.md b/docs/models/operations/UnscrobbleResponse.md new file mode 100644 index 00000000..b6348bf7 --- /dev/null +++ b/docs/models/operations/UnscrobbleResponse.md @@ -0,0 +1,10 @@ +# UnscrobbleResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/UnshuffleRequest.md b/docs/models/operations/UnshuffleRequest.md new file mode 100644 index 00000000..69aaa5fe --- /dev/null +++ b/docs/models/operations/UnshuffleRequest.md @@ -0,0 +1,19 @@ +# UnshuffleRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *long* | :heavy_check_mark: | The ID of the play queue. | | \ No newline at end of file diff --git a/docs/models/operations/UnshuffleResponse.md b/docs/models/operations/UnshuffleResponse.md new file mode 100644 index 00000000..be2f5bcc --- /dev/null +++ b/docs/models/operations/UnshuffleResponse.md @@ -0,0 +1,11 @@ +# UnshuffleResponse + + +## 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 | +| `mediaContainerWithPlaylistMetadata` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/UpdateHubVisibilityRequest.md b/docs/models/operations/UpdateHubVisibilityRequest.md new file mode 100644 index 00000000..1adb80d6 --- /dev/null +++ b/docs/models/operations/UpdateHubVisibilityRequest.md @@ -0,0 +1,23 @@ +# UpdateHubVisibilityRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *long* | :heavy_check_mark: | The section ID for the hubs to change | | +| `identifier` | *String* | :heavy_check_mark: | The identifier of the hub to change | | +| `promotedToRecommended` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether this hub should be displayed in recommended | 1 | +| `promotedToOwnHome` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether this hub should be displayed in admin's home | 1 | +| `promotedToSharedHome` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Whether this hub should be displayed in shared user's home | 1 | \ No newline at end of file diff --git a/docs/models/operations/UpdateHubVisibilityResponse.md b/docs/models/operations/UpdateHubVisibilityResponse.md new file mode 100644 index 00000000..33864149 --- /dev/null +++ b/docs/models/operations/UpdateHubVisibilityResponse.md @@ -0,0 +1,10 @@ +# UpdateHubVisibilityResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/UpdateItemArtworkRequest.md b/docs/models/operations/UpdateItemArtworkRequest.md new file mode 100644 index 00000000..d8068979 --- /dev/null +++ b/docs/models/operations/UpdateItemArtworkRequest.md @@ -0,0 +1,21 @@ +# UpdateItemArtworkRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *String* | :heavy_check_mark: | N/A | | +| `element` | [PathParamElement](../../models/operations/PathParamElement.md) | :heavy_check_mark: | N/A | | +| `url` | *Optional\* | :heavy_minus_sign: | The url of the new asset. | | \ No newline at end of file diff --git a/docs/models/operations/UpdateItemArtworkResponse.md b/docs/models/operations/UpdateItemArtworkResponse.md new file mode 100644 index 00000000..efca8799 --- /dev/null +++ b/docs/models/operations/UpdateItemArtworkResponse.md @@ -0,0 +1,10 @@ +# UpdateItemArtworkResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/UpdateItemsRequest.md b/docs/models/operations/UpdateItemsRequest.md new file mode 100644 index 00000000..51176a94 --- /dev/null +++ b/docs/models/operations/UpdateItemsRequest.md @@ -0,0 +1,32 @@ +# UpdateItemsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *String* | :heavy_check_mark: | The id of the section | | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | | +| `filters` | *Optional\* | :heavy_minus_sign: | The filters to apply to determine which items should be modified | | +| `fieldValue` | *Optional\* | :heavy_minus_sign: | Set the specified field to a new value | | +| `fieldLocked` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Set the specified field to locked (or unlocked if set to 0) | 1 | +| `titleValue` | *Optional\* | :heavy_minus_sign: | This field is treated specially by albums or artists and may be used for implicit reparenting. | | +| `artistTitleValue` | *Optional\* | :heavy_minus_sign: | Reparents set of Tracks or Albums - used with album.title.* in the case of tracks | | +| `artistTitleId` | *Optional\* | :heavy_minus_sign: | Reparents set of Tracks or Albums - used with album.title.* in the case of tracks | | +| `albumTitleValue` | *Optional\* | :heavy_minus_sign: | Reparents set of Tracks - Must be used in conjunction with artist.title.value or id | | +| `albumTitleId` | *Optional\* | :heavy_minus_sign: | Reparents set of Tracks - Must be used in conjunction with artist.title.value or id | | +| `tagtypeIdxTagTag` | *Optional\* | :heavy_minus_sign: | Creates tag and associates it with each item in the set. - [idx] links this and the next parameters together | | +| `tagtypeIdxTaggingObject` | *Optional\* | :heavy_minus_sign: | Here `object` may be text/thumb/art/theme - Optionally used in conjunction with tag.tag, to update association info across the set. | | +| `tagtypeTagTag` | *Optional\* | :heavy_minus_sign: | Remove comma separated tags from the set of items | | +| `tagtypeTag` | *Optional\* | :heavy_minus_sign: | Remove associations of this type (e.g. genre) from the set of items | | \ No newline at end of file diff --git a/docs/models/operations/UpdateItemsResponse.md b/docs/models/operations/UpdateItemsResponse.md new file mode 100644 index 00000000..38a1b4ae --- /dev/null +++ b/docs/models/operations/UpdateItemsResponse.md @@ -0,0 +1,10 @@ +# UpdateItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/UpdatePlayProgressRequest.md b/docs/models/operations/UpdatePlayProgressRequest.md deleted file mode 100644 index e8095bff..00000000 --- a/docs/models/operations/UpdatePlayProgressRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdatePlayProgressRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `key` | *String* | :heavy_check_mark: | the media key | | -| `time` | *double* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 | -| `state` | *String* | :heavy_check_mark: | The playback state of the media item. | played | \ No newline at end of file diff --git a/docs/models/operations/UpdatePlayProgressResponse.md b/docs/models/operations/UpdatePlayProgressResponse.md deleted file mode 100644 index 11506da7..00000000 --- a/docs/models/operations/UpdatePlayProgressResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdatePlayProgressResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/UpdatePlaylistRequest.md b/docs/models/operations/UpdatePlaylistRequest.md index 5b1ea869..4dc05838 100644 --- a/docs/models/operations/UpdatePlaylistRequest.md +++ b/docs/models/operations/UpdatePlaylistRequest.md @@ -3,8 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | -| `title` | *Optional\* | :heavy_minus_sign: | name of the playlist | -| `summary` | *Optional\* | :heavy_minus_sign: | summary description of the playlist | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *long* | :heavy_check_mark: | The ID of the playlist | | \ No newline at end of file diff --git a/docs/models/operations/UploadPlaylistRequest.md b/docs/models/operations/UploadPlaylistRequest.md index 92bfef86..9b4d90ee 100644 --- a/docs/models/operations/UploadPlaylistRequest.md +++ b/docs/models/operations/UploadPlaylistRequest.md @@ -3,8 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
| /home/barkley/playlist.m3u | -| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
| | -| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `path` | *Optional\* | :heavy_minus_sign: | Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename. | /home/barkley/playlist.m3u | +| `force` | [Optional\](../../models/shared/BoolInt.md) | :heavy_minus_sign: | Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. | 1 | \ No newline at end of file diff --git a/docs/models/operations/Upscale.md b/docs/models/operations/Upscale.md deleted file mode 100644 index 1622f51f..00000000 --- a/docs/models/operations/Upscale.md +++ /dev/null @@ -1,11 +0,0 @@ -# Upscale - -allow images to be resized beyond native dimensions. - - -## Values - -| Name | Value | -| ------ | ------ | -| `ZERO` | 0 | -| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/operations/User.md b/docs/models/operations/User.md deleted file mode 100644 index 7ea4e35c..00000000 --- a/docs/models/operations/User.md +++ /dev/null @@ -1,27 +0,0 @@ -# User - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `id` | *long* | :heavy_check_mark: | User's unique ID. | 22526914 | -| `title` | *String* | :heavy_check_mark: | User's display name. | Plex User | -| `username` | *String* | :heavy_check_mark: | User's username. | zgfuc7krcqfimrmb9lsl5j | -| `email` | *String* | :heavy_check_mark: | User's email address. | zgfuc7krcqfimrmb9lsl5j@protonmail.com | -| `recommendationsPlaylistId` | *JsonNullable\* | :heavy_minus_sign: | ID of the user's recommendation playlist. | | -| `thumb` | *String* | :heavy_check_mark: | URL to the user's avatar image. | https://plex.tv/users/3346028014e93acd/avatar?c=1731605021 | -| `protected_` | [Optional\](../../models/operations/Protected.md) | :heavy_minus_sign: | N/A | 1 | -| `home` | [Optional\](../../models/operations/Home.md) | :heavy_minus_sign: | N/A | 1 | -| `allowTuners` | [Optional\](../../models/operations/AllowTuners.md) | :heavy_minus_sign: | N/A | 1 | -| `allowSync` | [Optional\](../../models/operations/AllowSync.md) | :heavy_minus_sign: | N/A | 1 | -| `allowCameraUpload` | [Optional\](../../models/operations/AllowCameraUpload.md) | :heavy_minus_sign: | N/A | 1 | -| `allowChannels` | [Optional\](../../models/operations/AllowChannels.md) | :heavy_minus_sign: | N/A | 1 | -| `allowSubtitleAdmin` | [Optional\](../../models/operations/AllowSubtitleAdmin.md) | :heavy_minus_sign: | N/A | 1 | -| `filterAll` | *JsonNullable\* | :heavy_minus_sign: | Filters applied for all content. | | -| `filterMovies` | *JsonNullable\* | :heavy_minus_sign: | Filters applied for movies. | | -| `filterMusic` | *JsonNullable\* | :heavy_minus_sign: | Filters applied for music. | | -| `filterPhotos` | *JsonNullable\* | :heavy_minus_sign: | Filters applied for photos. | | -| `filterTelevision` | *Optional\* | :heavy_minus_sign: | Filters applied for television. | | -| `restricted` | [Optional\](../../models/operations/Restricted.md) | :heavy_minus_sign: | N/A | 1 | -| `server` | List\<[GetUsersServer](../../models/operations/GetUsersServer.md)> | :heavy_check_mark: | List of servers owned by the user. | | \ No newline at end of file diff --git a/docs/models/operations/UserProfile.md b/docs/models/operations/UserProfile.md deleted file mode 100644 index d6279b7a..00000000 --- a/docs/models/operations/UserProfile.md +++ /dev/null @@ -1,15 +0,0 @@ -# UserProfile - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `autoSelectAudio` | *Optional\* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true | -| `defaultAudioLanguage` | *Optional\* | :heavy_check_mark: | The preferred audio language for the account | ja | -| `defaultSubtitleLanguage` | *Optional\* | :heavy_check_mark: | The preferred subtitle language for the account | en | -| `autoSelectSubtitle` | [Optional\](../../models/operations/AutoSelectSubtitle.md) | :heavy_minus_sign: | N/A | 1 | -| `defaultSubtitleAccessibility` | [Optional\](../../models/operations/DefaultSubtitleAccessibility.md) | :heavy_minus_sign: | N/A | 1 | -| `defaultSubtitleForced` | [Optional\](../../models/operations/DefaultSubtitleForced.md) | :heavy_minus_sign: | N/A | 1 | -| `watchedIndicator` | [Optional\](../../models/operations/WatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 | -| `mediaReviewsVisibility` | [Optional\](../../models/operations/MediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/operations/VoiceSearchHubsMediaContainer.md b/docs/models/operations/VoiceSearchHubsMediaContainer.md new file mode 100644 index 00000000..7f5e560a --- /dev/null +++ b/docs/models/operations/VoiceSearchHubsMediaContainer.md @@ -0,0 +1,17 @@ +# VoiceSearchHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | List\<[Hub](../../models/shared/Hub.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/VoiceSearchHubsRequest.md b/docs/models/operations/VoiceSearchHubsRequest.md new file mode 100644 index 00000000..9265b372 --- /dev/null +++ b/docs/models/operations/VoiceSearchHubsRequest.md @@ -0,0 +1,21 @@ +# VoiceSearchHubsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `query` | *String* | :heavy_check_mark: | The query term | | +| `type` | *Optional\* | :heavy_minus_sign: | The metadata type to filter by | | +| `limit` | *Optional\* | :heavy_minus_sign: | The number of items to return per hub. 3 if not specified | | \ No newline at end of file diff --git a/docs/models/operations/VoiceSearchHubsResponse.md b/docs/models/operations/VoiceSearchHubsResponse.md new file mode 100644 index 00000000..2e905678 --- /dev/null +++ b/docs/models/operations/VoiceSearchHubsResponse.md @@ -0,0 +1,12 @@ +# VoiceSearchHubsResponse + + +## 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/VoiceSearchHubsResponseBody.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/VoiceSearchHubsResponseBody.md b/docs/models/operations/VoiceSearchHubsResponseBody.md new file mode 100644 index 00000000..16f7239c --- /dev/null +++ b/docs/models/operations/VoiceSearchHubsResponseBody.md @@ -0,0 +1,10 @@ +# VoiceSearchHubsResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/operations/VoiceSearchHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/WatchedIndicator.md b/docs/models/operations/WatchedIndicator.md deleted file mode 100644 index 5a931a76..00000000 --- a/docs/models/operations/WatchedIndicator.md +++ /dev/null @@ -1,11 +0,0 @@ -# WatchedIndicator - -Whether or not media watched indicators are enabled (little orange dot on media) - - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/WriteLogResponse.md b/docs/models/operations/WriteLogResponse.md new file mode 100644 index 00000000..a18b4106 --- /dev/null +++ b/docs/models/operations/WriteLogResponse.md @@ -0,0 +1,10 @@ +# WriteLogResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/WriteMessageRequest.md b/docs/models/operations/WriteMessageRequest.md new file mode 100644 index 00000000..bef7ef3a --- /dev/null +++ b/docs/models/operations/WriteMessageRequest.md @@ -0,0 +1,21 @@ +# WriteMessageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `accepts` | [Optional\](../../models/shared/Accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | | +| `clientIdentifier` | *Optional\* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `product` | *Optional\* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | Roku | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `device` | *Optional\* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `model` | *Optional\* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `deviceVendor` | *Optional\* | :heavy_minus_sign: | The device vendor | Roku | +| `deviceName` | *Optional\* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `marketplace` | *Optional\* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `level` | [Optional\](../../models/operations/Level.md) | :heavy_minus_sign: | An integer log level to write to the PMS log with.
- 0: Error
- 1: Warning
- 2: Info
- 3: Debug
- 4: Verbose
| | +| `message` | *Optional\* | :heavy_minus_sign: | The text of the message to write to the log. | | +| `source` | *Optional\* | :heavy_minus_sign: | A string indicating the source of the message. | | \ No newline at end of file diff --git a/docs/models/operations/WriteMessageResponse.md b/docs/models/operations/WriteMessageResponse.md new file mode 100644 index 00000000..1a761800 --- /dev/null +++ b/docs/models/operations/WriteMessageResponse.md @@ -0,0 +1,10 @@ +# WriteMessageResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Writer.md b/docs/models/operations/Writer.md deleted file mode 100644 index 4ece1c6e..00000000 --- a/docs/models/operations/Writer.md +++ /dev/null @@ -1,12 +0,0 @@ -# Writer - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | -| `filter` | *String* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 | -| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | -| `tagKey` | *Optional\* | :heavy_minus_sign: | A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. | 5d77683d85719b001f3a535e | -| `thumb` | *Optional\* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/shared/Accepts.md b/docs/models/shared/Accepts.md new file mode 100644 index 00000000..79077670 --- /dev/null +++ b/docs/models/shared/Accepts.md @@ -0,0 +1,9 @@ +# Accepts + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `APPLICATION_JSON` | application/json | +| `APPLICATION_XML` | application/xml | \ No newline at end of file diff --git a/docs/models/shared/AdvancedSubtitles.md b/docs/models/shared/AdvancedSubtitles.md new file mode 100644 index 00000000..a89aab3a --- /dev/null +++ b/docs/models/shared/AdvancedSubtitles.md @@ -0,0 +1,10 @@ +# AdvancedSubtitles + + +## Values + +| Name | Value | +| --------- | --------- | +| `BURN` | burn | +| `TEXT` | text | +| `UNKNOWN` | unknown | \ No newline at end of file diff --git a/docs/models/shared/AiringsType.md b/docs/models/shared/AiringsType.md new file mode 100644 index 00000000..cf402bec --- /dev/null +++ b/docs/models/shared/AiringsType.md @@ -0,0 +1,9 @@ +# AiringsType + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `NEW_AIRINGS_ONLY` | New Airings Only | +| `NEW_AND_REPEAT_AIRINGS` | New and Repeat Airings | \ No newline at end of file diff --git a/docs/models/shared/BoolInt.md b/docs/models/shared/BoolInt.md new file mode 100644 index 00000000..46f2b33d --- /dev/null +++ b/docs/models/shared/BoolInt.md @@ -0,0 +1,9 @@ +# BoolInt + + +## Values + +| Name | Value | +| ------ | ------ | +| `ZERO` | 0 | +| `ONE` | 1 | \ No newline at end of file diff --git a/docs/models/shared/Channel.md b/docs/models/shared/Channel.md new file mode 100644 index 00000000..7ae43104 --- /dev/null +++ b/docs/models/shared/Channel.md @@ -0,0 +1,15 @@ +# Channel + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `callSign` | *Optional\* | :heavy_minus_sign: | N/A | +| `channelVcn` | *Optional\* | :heavy_minus_sign: | N/A | +| `hd` | *Optional\* | :heavy_minus_sign: | N/A | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | +| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/ChannelMapping.md b/docs/models/shared/ChannelMapping.md new file mode 100644 index 00000000..74cc303d --- /dev/null +++ b/docs/models/shared/ChannelMapping.md @@ -0,0 +1,11 @@ +# ChannelMapping + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `channelKey` | *Optional\* | :heavy_minus_sign: | N/A | +| `deviceIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `enabled` | *Optional\* | :heavy_minus_sign: | N/A | +| `lineupIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/Composite.md b/docs/models/shared/Composite.md new file mode 100644 index 00000000..5ab126f6 --- /dev/null +++ b/docs/models/shared/Composite.md @@ -0,0 +1,18 @@ +# Composite + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `type` | *Optional\* | :heavy_minus_sign: | Limit composite to specified metadata types | +| `format` | [Optional\](../../models/shared/Format.md) | :heavy_minus_sign: | The image type | +| `backgroundColor` | *Optional\* | :heavy_minus_sign: | 6 character hex RGB value for background color for image | +| `border` | *Optional\* | :heavy_minus_sign: | The width of the intra-image border | +| `cols` | *Optional\* | :heavy_minus_sign: | Number of columns to construct in the composite image | +| `crop` | [Optional\](../../models/shared/Crop.md) | :heavy_minus_sign: | Where to crop source images to fit into composite image proportions | +| `height` | *Optional\* | :heavy_minus_sign: | The height of the image | +| `media` | [Optional\](../../models/shared/CompositeMedia.md) | :heavy_minus_sign: | The default image type to use as the sources | +| `repeat` | *Optional\* | :heavy_minus_sign: | Allow repetion of images if there are not enough source images to fill grid | +| `rows` | *Optional\* | :heavy_minus_sign: | Number of rows to construct in the composite image | +| `width` | *Optional\* | :heavy_minus_sign: | The width of the image | \ No newline at end of file diff --git a/docs/models/shared/CompositeMedia.md b/docs/models/shared/CompositeMedia.md new file mode 100644 index 00000000..b0f4601f --- /dev/null +++ b/docs/models/shared/CompositeMedia.md @@ -0,0 +1,12 @@ +# CompositeMedia + +The default image type to use as the sources + + +## Values + +| Name | Value | +| -------- | -------- | +| `THUMB` | thumb | +| `ART` | art | +| `BANNER` | banner | \ No newline at end of file diff --git a/docs/models/shared/Crop.md b/docs/models/shared/Crop.md new file mode 100644 index 00000000..c28b6f47 --- /dev/null +++ b/docs/models/shared/Crop.md @@ -0,0 +1,11 @@ +# Crop + +Where to crop source images to fit into composite image proportions + + +## Values + +| Name | Value | +| -------- | -------- | +| `CENTER` | center | +| `TOP` | top | \ No newline at end of file diff --git a/docs/models/shared/Decision.md b/docs/models/shared/Decision.md new file mode 100644 index 00000000..89f31258 --- /dev/null +++ b/docs/models/shared/Decision.md @@ -0,0 +1,10 @@ +# Decision + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `DIRECTPLAY` | directplay | +| `TRANSCODE` | transcode | +| `NONE` | none | \ No newline at end of file diff --git a/docs/models/shared/Default.md b/docs/models/shared/Default.md new file mode 100644 index 00000000..1df079ac --- /dev/null +++ b/docs/models/shared/Default.md @@ -0,0 +1,4 @@ +# Default + +The default value of this setting + diff --git a/docs/models/shared/DefaultDirection.md b/docs/models/shared/DefaultDirection.md new file mode 100644 index 00000000..102359f4 --- /dev/null +++ b/docs/models/shared/DefaultDirection.md @@ -0,0 +1,11 @@ +# DefaultDirection + +This default diction of this sort + + +## Values + +| Name | Value | +| ------ | ------ | +| `ASC` | asc | +| `DESC` | desc | \ No newline at end of file diff --git a/docs/models/shared/Device.md b/docs/models/shared/Device.md new file mode 100644 index 00000000..53d06190 --- /dev/null +++ b/docs/models/shared/Device.md @@ -0,0 +1,20 @@ +# Device + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `channelMapping` | List\<[ChannelMapping](../../models/shared/ChannelMapping.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `lastSeenAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `make` | *Optional\* | :heavy_minus_sign: | N/A | +| `model` | *Optional\* | :heavy_minus_sign: | N/A | +| `modelNumber` | *Optional\* | :heavy_minus_sign: | N/A | +| `protocol` | *Optional\* | :heavy_minus_sign: | N/A | +| `sources` | *Optional\* | :heavy_minus_sign: | N/A | +| `state` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | *Optional\* | :heavy_minus_sign: | N/A | +| `tuners` | *Optional\* | :heavy_minus_sign: | N/A | +| `uri` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/Directory.md b/docs/models/shared/Directory.md new file mode 100644 index 00000000..73bd2585 --- /dev/null +++ b/docs/models/shared/Directory.md @@ -0,0 +1,23 @@ +# Directory + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | +| `art` | *Optional\* | :heavy_minus_sign: | N/A | +| `content` | *Optional\* | :heavy_minus_sign: | N/A | +| `filter` | *Optional\* | :heavy_minus_sign: | N/A | +| `hasPrefs` | *Optional\* | :heavy_minus_sign: | N/A | +| `hasStoreServices` | *Optional\* | :heavy_minus_sign: | N/A | +| `hubKey` | *Optional\* | :heavy_minus_sign: | N/A | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `lastAccessedAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `pivot` | List\<[Pivot](../../models/shared/Pivot.md)> | :heavy_minus_sign: | N/A | +| `share` | *Optional\* | :heavy_minus_sign: | N/A | +| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | +| `titleBar` | *Optional\* | :heavy_minus_sign: | N/A | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/Dvr.md b/docs/models/shared/Dvr.md new file mode 100644 index 00000000..1e18553c --- /dev/null +++ b/docs/models/shared/Dvr.md @@ -0,0 +1,12 @@ +# Dvr + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `device` | List\<[Device](../../models/shared/Device.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | +| `lineup` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/DvrRequestHandlerSlashGetResponses200.md b/docs/models/shared/DvrRequestHandlerSlashGetResponses200.md new file mode 100644 index 00000000..e6c47fdc --- /dev/null +++ b/docs/models/shared/DvrRequestHandlerSlashGetResponses200.md @@ -0,0 +1,10 @@ +# DvrRequestHandlerSlashGetResponses200 + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/DvrRequestHandlerSlashGetResponses200MediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainer.md b/docs/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainer.md new file mode 100644 index 00000000..7b6e4ef9 --- /dev/null +++ b/docs/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainer.md @@ -0,0 +1,9 @@ +# DvrRequestHandlerSlashGetResponses200MediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/shared/DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | List\<[Dvr](../../models/shared/Dvr.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer.md b/docs/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer.md new file mode 100644 index 00000000..a09530dc --- /dev/null +++ b/docs/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer.md @@ -0,0 +1,17 @@ +# DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *Optional\* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/models/shared/Filter.md b/docs/models/shared/Filter.md new file mode 100644 index 00000000..2af0ef36 --- /dev/null +++ b/docs/models/shared/Filter.md @@ -0,0 +1,27 @@ +# Filter + +Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an important subset useful for top-level API. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | The title for the filter. | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | +| `art` | *Optional\* | :heavy_minus_sign: | N/A | +| `content` | *Optional\* | :heavy_minus_sign: | N/A | +| `filter` | *Optional\* | :heavy_minus_sign: | This represents the filter name used for the filter, which can be used to construct complex media queries with. | +| `hasPrefs` | *Optional\* | :heavy_minus_sign: | N/A | +| `hasStoreServices` | *Optional\* | :heavy_minus_sign: | N/A | +| `hubKey` | *Optional\* | :heavy_minus_sign: | N/A | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. | +| `lastAccessedAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `pivot` | List\<[FilterPivot](../../models/shared/FilterPivot.md)> | :heavy_minus_sign: | N/A | +| `share` | *Optional\* | :heavy_minus_sign: | N/A | +| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | +| `titleBar` | *Optional\* | :heavy_minus_sign: | N/A | +| `filterType` | *Optional\* | :heavy_minus_sign: | This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/FilterPivot.md b/docs/models/shared/FilterPivot.md new file mode 100644 index 00000000..d6117801 --- /dev/null +++ b/docs/models/shared/FilterPivot.md @@ -0,0 +1,13 @@ +# FilterPivot + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | +| `context` | *Optional\* | :heavy_minus_sign: | N/A | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `symbol` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/Format.md b/docs/models/shared/Format.md new file mode 100644 index 00000000..d6cedc55 --- /dev/null +++ b/docs/models/shared/Format.md @@ -0,0 +1,11 @@ +# Format + +The image type + + +## Values + +| Name | Value | +| ----- | ----- | +| `JPG` | jpg | +| `PNG` | png | \ No newline at end of file diff --git a/docs/models/shared/GetResponses200.md b/docs/models/shared/GetResponses200.md new file mode 100644 index 00000000..e20996e8 --- /dev/null +++ b/docs/models/shared/GetResponses200.md @@ -0,0 +1,10 @@ +# GetResponses200 + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/shared/GetResponses200MediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/GetResponses200Hub.md b/docs/models/shared/GetResponses200Hub.md new file mode 100644 index 00000000..cb4a6a93 --- /dev/null +++ b/docs/models/shared/GetResponses200Hub.md @@ -0,0 +1,14 @@ +# GetResponses200Hub + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `homeVisibility` | [Optional\](../../models/shared/HomeVisibility.md) | :heavy_minus_sign: | Whether this hub is visible on the home screen
- all: Visible to all users
- none: Visible to no users
- admin: Visible to only admin users
- shared: Visible to shared users
| +| `identifier` | *Optional\* | :heavy_minus_sign: | The identifier for this hub | +| `promotedToOwnHome` | *Optional\* | :heavy_minus_sign: | Whether this hub is visible to admin user home | +| `promotedToRecommended` | *Optional\* | :heavy_minus_sign: | Whether this hub is promoted to all for recommendations | +| `promotedToSharedHome` | *Optional\* | :heavy_minus_sign: | Whether this hub is visible to shared user's home | +| `recommendationsVisibility` | [Optional\](../../models/shared/RecommendationsVisibility.md) | :heavy_minus_sign: | The visibility of this hub in recommendations:
- all: Visible to all users
- none: Visible to no users
- admin: Visible to only admin users
- shared: Visible to shared users
| +| `title` | *Optional\* | :heavy_minus_sign: | The title of this hub | \ No newline at end of file diff --git a/docs/models/shared/GetResponses200MediaContainer.md b/docs/models/shared/GetResponses200MediaContainer.md new file mode 100644 index 00000000..05008575 --- /dev/null +++ b/docs/models/shared/GetResponses200MediaContainer.md @@ -0,0 +1,17 @@ +# GetResponses200MediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | List\<[GetResponses200Hub](../../models/shared/GetResponses200Hub.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/HistoryAllGetResponses200.md b/docs/models/shared/HistoryAllGetResponses200.md new file mode 100644 index 00000000..072e2443 --- /dev/null +++ b/docs/models/shared/HistoryAllGetResponses200.md @@ -0,0 +1,10 @@ +# HistoryAllGetResponses200 + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/HistoryAllGetResponses200MediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/HistoryAllGetResponses200MediaContainer.md b/docs/models/shared/HistoryAllGetResponses200MediaContainer.md new file mode 100644 index 00000000..78b8d636 --- /dev/null +++ b/docs/models/shared/HistoryAllGetResponses200MediaContainer.md @@ -0,0 +1,17 @@ +# HistoryAllGetResponses200MediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | List\<[HistoryAllGetResponses200Metadata](../../models/shared/HistoryAllGetResponses200Metadata.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/HistoryAllGetResponses200Metadata.md b/docs/models/shared/HistoryAllGetResponses200Metadata.md new file mode 100644 index 00000000..0b88d2d4 --- /dev/null +++ b/docs/models/shared/HistoryAllGetResponses200Metadata.md @@ -0,0 +1,18 @@ +# HistoryAllGetResponses200Metadata + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `accountID` | *Optional\* | :heavy_minus_sign: | The account id of this playback | +| `deviceID` | *Optional\* | :heavy_minus_sign: | The device id which played the item | +| `historyKey` | *Optional\* | :heavy_minus_sign: | The key for this individual history item | +| `key` | *Optional\* | :heavy_minus_sign: | The metadata key for the item played | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | The library section id containing the item played | +| `originallyAvailableAt` | *Optional\* | :heavy_minus_sign: | The originally available at of the item played | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | The rating key for the item played | +| `thumb` | *Optional\* | :heavy_minus_sign: | The thumb of the item played | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the item played | +| `type` | *Optional\* | :heavy_minus_sign: | The metadata type of the item played | +| `viewedAt` | *Optional\* | :heavy_minus_sign: | The time when the item was played | \ No newline at end of file diff --git a/docs/models/shared/HomeVisibility.md b/docs/models/shared/HomeVisibility.md new file mode 100644 index 00000000..fe364cbb --- /dev/null +++ b/docs/models/shared/HomeVisibility.md @@ -0,0 +1,18 @@ +# HomeVisibility + +Whether this hub is visible on the home screen + - all: Visible to all users + - none: Visible to no users + - admin: Visible to only admin users + - shared: Visible to shared users + + + +## Values + +| Name | Value | +| -------- | -------- | +| `ALL` | all | +| `NONE` | none | +| `ADMIN` | admin | +| `SHARED` | shared | \ No newline at end of file diff --git a/docs/models/shared/Hub.md b/docs/models/shared/Hub.md new file mode 100644 index 00000000..ae7d6da1 --- /dev/null +++ b/docs/models/shared/Hub.md @@ -0,0 +1,22 @@ +# Hub + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | A title for this grouping of content | | +| `type` | *Optional\* | :heavy_minus_sign: | The type of the items contained in this hub, or possibly `mixed` if there are multiple types | track | +| `context` | *Optional\* | :heavy_minus_sign: | N/A | hub.home.onDeck | +| `hubIdentifier` | *Optional\* | :heavy_minus_sign: | A unique identifier for the hub | home.onDeck | +| `hubKey` | *Optional\* | :heavy_minus_sign: | A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional.
| | +| `key` | *Optional\* | :heavy_minus_sign: | The key at which all of the content for this hub can be retrieved | /hubs/sections/home/onDeck | +| `metadata` | List\<[Metadata](../../models/shared/Metadata.md)> | :heavy_minus_sign: | N/A | | +| `more` | *Optional\* | :heavy_minus_sign: | "A boolean indicating that the hub contains more than what's included in the current response."
| | +| `promoted` | *Optional\* | :heavy_minus_sign: | Indicating if the hub should be promoted to the user's homescreen | | +| `random` | *Optional\* | :heavy_minus_sign: | Indicating that the contents of the hub may change on each request | | +| `size` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `style` | *Optional\* | :heavy_minus_sign: | A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell` | | +| `subtype` | *Optional\* | :heavy_minus_sign: | The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types | podcast | +| `totalSize` | *Optional\* | :heavy_minus_sign: | N/A | 8 | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/Image.md b/docs/models/shared/Image.md new file mode 100644 index 00000000..bee79fd3 --- /dev/null +++ b/docs/models/shared/Image.md @@ -0,0 +1,13 @@ +# Image + +Images such as movie posters and background artwork are represented by Image elements. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `type` | [Optional\](../../models/shared/ImageType.md) | :heavy_minus_sign: | Describes both the purpose and intended presentation of the image. | +| `alt` | *Optional\* | :heavy_minus_sign: | Title to use for accessibility. | +| `url` | *Optional\* | :heavy_minus_sign: | The relative path or absolute url for the image. | \ No newline at end of file diff --git a/docs/models/shared/ImageType.md b/docs/models/shared/ImageType.md new file mode 100644 index 00000000..e0e404f0 --- /dev/null +++ b/docs/models/shared/ImageType.md @@ -0,0 +1,14 @@ +# ImageType + +Describes both the purpose and intended presentation of the image. + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `BACKGROUND` | background | +| `BANNER` | banner | +| `CLEAR_LOGO` | clearLogo | +| `COVER_POSTER` | coverPoster | +| `SNAPSHOT` | snapshot | \ No newline at end of file diff --git a/docs/models/shared/Items.md b/docs/models/shared/Items.md new file mode 100644 index 00000000..d0bb8611 --- /dev/null +++ b/docs/models/shared/Items.md @@ -0,0 +1,83 @@ +# Items + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *Optional\* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *Optional\* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *Optional\* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *Optional\* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `banner` | *Optional\* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *Optional\* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *Optional\* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *Optional\* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `director` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `duration` | *Optional\* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | List\<[Filter](../../models/shared/Filter.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `hero` | *Optional\* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | List\<[Image](../../models/shared/Image.md)> | :heavy_minus_sign: | N/A | +| `index` | *Optional\* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *Optional\* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | List\<[Media](../../models/shared/Media.md)> | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *Optional\* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *Optional\* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *Optional\* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *Optional\* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *Optional\* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `ratingCount` | *Optional\* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *Optional\* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `search` | *Optional\* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *Optional\* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *Optional\* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *Optional\* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | List\<[Sort](../../models/shared/Sort.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *Optional\* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *Optional\* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *Optional\* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *Optional\* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *Optional\* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *Optional\* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *Optional\* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *Optional\* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *Optional\* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *Optional\* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `year` | *Optional\* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `metadataItem` | List\<[Items](../../models/shared/Items.md)> | :heavy_minus_sign: | N/A | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/LibrarySection.md b/docs/models/shared/LibrarySection.md new file mode 100644 index 00000000..313f2b21 --- /dev/null +++ b/docs/models/shared/LibrarySection.md @@ -0,0 +1,27 @@ +# LibrarySection + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | +| `agent` | *Optional\* | :heavy_minus_sign: | N/A | +| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | +| `art` | *Optional\* | :heavy_minus_sign: | N/A | +| `composite` | *Optional\* | :heavy_minus_sign: | N/A | +| `content` | *Optional\* | :heavy_minus_sign: | N/A | +| `contentChangedAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `createdAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `directory` | *Optional\* | :heavy_minus_sign: | N/A | +| `filters` | *Optional\* | :heavy_minus_sign: | Indicates whether this section has filtering capabilities | +| `hidden` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | +| `location` | List\<[LibrarySectionLocation](../../models/shared/LibrarySectionLocation.md)> | :heavy_minus_sign: | N/A | +| `refreshing` | *Optional\* | :heavy_minus_sign: | Indicates whether this library section is currently scanning | +| `scannedAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `scanner` | *Optional\* | :heavy_minus_sign: | N/A | +| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/LibrarySectionLocation.md b/docs/models/shared/LibrarySectionLocation.md new file mode 100644 index 00000000..a83bb432 --- /dev/null +++ b/docs/models/shared/LibrarySectionLocation.md @@ -0,0 +1,11 @@ +# LibrarySectionLocation + +Represents a top-level location on disk where media in this library section is stored + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `path` | *Optional\* | :heavy_minus_sign: | The path of where this directory exists on disk | \ No newline at end of file diff --git a/docs/models/shared/Lineup.md b/docs/models/shared/Lineup.md new file mode 100644 index 00000000..f0072bf9 --- /dev/null +++ b/docs/models/shared/Lineup.md @@ -0,0 +1,12 @@ +# Lineup + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | The type of this object (`lineup` in this case) | +| `lineupType` | [Optional\](../../models/shared/LineupType.md) | :heavy_minus_sign: | - `-1`: N/A
- `0`: Over the air
- `1`: Cable
- `2`: Satellite
- `3`: IPTV
- `4`: Virtual
| +| `location` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | The uuid of this lineup | \ No newline at end of file diff --git a/docs/models/shared/LineupType.md b/docs/models/shared/LineupType.md new file mode 100644 index 00000000..b078ed2c --- /dev/null +++ b/docs/models/shared/LineupType.md @@ -0,0 +1,21 @@ +# LineupType + +- `-1`: N/A +- `0`: Over the air +- `1`: Cable +- `2`: Satellite +- `3`: IPTV +- `4`: Virtual + + + +## Values + +| Name | Value | +| -------- | -------- | +| `MINUS1` | -1 | +| `ZERO` | 0 | +| `ONE` | 1 | +| `TWO` | 2 | +| `THREE` | 3 | +| `FOUR` | 4 | \ No newline at end of file diff --git a/docs/models/shared/Location.md b/docs/models/shared/Location.md new file mode 100644 index 00000000..49a37560 --- /dev/null +++ b/docs/models/shared/Location.md @@ -0,0 +1,10 @@ +# Location + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `LAN` | lan | +| `WAN` | wan | +| `CELLULAR` | cellular | \ No newline at end of file diff --git a/docs/models/shared/Media.md b/docs/models/shared/Media.md new file mode 100644 index 00000000..ca1338a6 --- /dev/null +++ b/docs/models/shared/Media.md @@ -0,0 +1,29 @@ +# Media + +`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element. + + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `aspectRatio` | *Optional\* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *Optional\* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *Optional\* | :heavy_minus_sign: | N/A | aac | +| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | lc | +| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 5612 | +| `container` | *Optional\* | :heavy_minus_sign: | N/A | mov | +| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 150192 | +| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | N/A | true | +| `height` | *Optional\* | :heavy_minus_sign: | N/A | 544 | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `optimizedForStreaming` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `part` | List\<[Part](../../models/shared/Part.md)> | :heavy_minus_sign: | N/A | | +| `videoCodec` | *Optional\* | :heavy_minus_sign: | N/A | h264 | +| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | N/A | 24p | +| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | main | +| `videoResolution` | *Optional\* | :heavy_minus_sign: | N/A | 720 | +| `width` | *Optional\* | :heavy_minus_sign: | N/A | 1280 | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/MediaContainer.md b/docs/models/shared/MediaContainer.md new file mode 100644 index 00000000..6d2e4b58 --- /dev/null +++ b/docs/models/shared/MediaContainer.md @@ -0,0 +1,16 @@ +# MediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithArtwork.md b/docs/models/shared/MediaContainerWithArtwork.md new file mode 100644 index 00000000..7aa8de70 --- /dev/null +++ b/docs/models/shared/MediaContainerWithArtwork.md @@ -0,0 +1,8 @@ +# MediaContainerWithArtwork + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithArtworkMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithArtworkMediaContainer.md b/docs/models/shared/MediaContainerWithArtworkMediaContainer.md new file mode 100644 index 00000000..da6cb104 --- /dev/null +++ b/docs/models/shared/MediaContainerWithArtworkMediaContainer.md @@ -0,0 +1,17 @@ +# MediaContainerWithArtworkMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | List\<[MediaContainerWithArtworkMetadata](../../models/shared/MediaContainerWithArtworkMetadata.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithArtworkMetadata.md b/docs/models/shared/MediaContainerWithArtworkMetadata.md new file mode 100644 index 00000000..46037bf2 --- /dev/null +++ b/docs/models/shared/MediaContainerWithArtworkMetadata.md @@ -0,0 +1,11 @@ +# MediaContainerWithArtworkMetadata + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the item | +| `type` | [Optional\](../../models/shared/MediaContainerWithArtworkType.md) | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | The path to the artwork | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithArtworkType.md b/docs/models/shared/MediaContainerWithArtworkType.md new file mode 100644 index 00000000..e0d1badd --- /dev/null +++ b/docs/models/shared/MediaContainerWithArtworkType.md @@ -0,0 +1,8 @@ +# MediaContainerWithArtworkType + + +## Values + +| Name | Value | +| ------- | ------- | +| `IMAGE` | image | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDecision.md b/docs/models/shared/MediaContainerWithDecision.md new file mode 100644 index 00000000..da63b750 --- /dev/null +++ b/docs/models/shared/MediaContainerWithDecision.md @@ -0,0 +1,13 @@ +# MediaContainerWithDecision + +`MediaContainer` is commonly found as the root of a response and is a pretty generic container. Common attributes include `identifier` and things related to paging (`offset`, `size`, `totalSize`). + +It is also common for a `MediaContainer` to contain attributes "hoisted" from its children. If every element in the container would have had the same attribute, then that attribute can be present on the container instead of being repeated on every element. For example, an album's list of tracks might include `parentTitle` on the container since all of the tracks have the same album title. A container may have a `source` attribute when all of the items came from the same source. Generally speaking, when looking for an attribute on an item, if the attribute wasn't found then the container should be checked for that attribute as well. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithDecisionMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDecisionDecision.md b/docs/models/shared/MediaContainerWithDecisionDecision.md new file mode 100644 index 00000000..b0811057 --- /dev/null +++ b/docs/models/shared/MediaContainerWithDecisionDecision.md @@ -0,0 +1,13 @@ +# MediaContainerWithDecisionDecision + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `COPY` | copy | +| `TRANSCODE` | transcode | +| `BURN` | burn | +| `UNAVAILABLE` | unavailable | +| `IGNORE` | ignore | +| `NONE` | none | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDecisionLocation.md b/docs/models/shared/MediaContainerWithDecisionLocation.md new file mode 100644 index 00000000..bed60974 --- /dev/null +++ b/docs/models/shared/MediaContainerWithDecisionLocation.md @@ -0,0 +1,15 @@ +# MediaContainerWithDecisionLocation + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT` | direct | +| `SIDECAR_SUBS` | sidecar-subs | +| `SEGMENTS_VIDEO` | segments-video | +| `SEGMENTS_AUDIO` | segments-audio | +| `SEGMENTS_AV` | segments-av | +| `SEGMENTS_SUBS` | segments-subs | +| `EMBEDDED` | embedded | +| `SIDECAR` | sidecar | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDecisionMedia.md b/docs/models/shared/MediaContainerWithDecisionMedia.md new file mode 100644 index 00000000..c7cee602 --- /dev/null +++ b/docs/models/shared/MediaContainerWithDecisionMedia.md @@ -0,0 +1,32 @@ +# MediaContainerWithDecisionMedia + +`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element. + + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `aspectRatio` | *Optional\* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *Optional\* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *Optional\* | :heavy_minus_sign: | N/A | aac | +| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | lc | +| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 5612 | +| `container` | *Optional\* | :heavy_minus_sign: | N/A | mov | +| `duration` | *Optional\* | :heavy_minus_sign: | N/A | 150192 | +| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `hasVoiceActivity` | *Optional\* | :heavy_minus_sign: | N/A | true | +| `height` | *Optional\* | :heavy_minus_sign: | N/A | 544 | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `optimizedForStreaming` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `part` | List\<[MediaContainerWithDecisionPart](../../models/shared/MediaContainerWithDecisionPart.md)> | :heavy_minus_sign: | N/A | | +| `videoCodec` | *Optional\* | :heavy_minus_sign: | N/A | h264 | +| `videoFrameRate` | *Optional\* | :heavy_minus_sign: | N/A | 24p | +| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | main | +| `videoResolution` | *Optional\* | :heavy_minus_sign: | N/A | 720 | +| `width` | *Optional\* | :heavy_minus_sign: | N/A | 1280 | +| `abr` | *Optional\* | :heavy_minus_sign: | N/A | | +| `resourceSession` | *Optional\* | :heavy_minus_sign: | N/A | | +| `selected` | *Optional\* | :heavy_minus_sign: | N/A | | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDecisionMediaContainer.md b/docs/models/shared/MediaContainerWithDecisionMediaContainer.md new file mode 100644 index 00000000..a4239149 --- /dev/null +++ b/docs/models/shared/MediaContainerWithDecisionMediaContainer.md @@ -0,0 +1,26 @@ +# MediaContainerWithDecisionMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `availableBandwidth` | *Optional\* | :heavy_minus_sign: | The maximum available bitrate when the decision was rendered. | +| `directPlayDecisionCode` | *Optional\* | :heavy_minus_sign: | N/A | +| `directPlayDecisionText` | *Optional\* | :heavy_minus_sign: | N/A | +| `generalDecisionCode` | *Optional\* | :heavy_minus_sign: | The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all. | +| `generalDecisionText` | *Optional\* | :heavy_minus_sign: | N/A | +| `mdeDecisionCode` | *Optional\* | :heavy_minus_sign: | The code indicating the status of evaluation of playback when client indicates `hasMDE=1` | +| `mdeDecisionText` | *Optional\* | :heavy_minus_sign: | Descriptive text for the above code | +| `metadata` | List\<[MediaContainerWithDecisionMetadata](../../models/shared/MediaContainerWithDecisionMetadata.md)> | :heavy_minus_sign: | N/A | +| `transcodeDecisionCode` | *Optional\* | :heavy_minus_sign: | N/A | +| `transcodeDecisionText` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDecisionMetadata.md b/docs/models/shared/MediaContainerWithDecisionMetadata.md new file mode 100644 index 00000000..483e136f --- /dev/null +++ b/docs/models/shared/MediaContainerWithDecisionMetadata.md @@ -0,0 +1,82 @@ +# MediaContainerWithDecisionMetadata + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *Optional\* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *Optional\* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *Optional\* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *Optional\* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `banner` | *Optional\* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *Optional\* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *Optional\* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *Optional\* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `director` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `duration` | *Optional\* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | List\<[Filter](../../models/shared/Filter.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `hero` | *Optional\* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | List\<[Image](../../models/shared/Image.md)> | :heavy_minus_sign: | N/A | +| `index` | *Optional\* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *Optional\* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | List\<[MediaContainerWithDecisionMedia](../../models/shared/MediaContainerWithDecisionMedia.md)> | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *Optional\* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *Optional\* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *Optional\* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *Optional\* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *Optional\* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `ratingCount` | *Optional\* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *Optional\* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `search` | *Optional\* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *Optional\* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *Optional\* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *Optional\* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | List\<[Sort](../../models/shared/Sort.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *Optional\* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *Optional\* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *Optional\* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *Optional\* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *Optional\* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *Optional\* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *Optional\* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *Optional\* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *Optional\* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *Optional\* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `year` | *Optional\* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDecisionPart.md b/docs/models/shared/MediaContainerWithDecisionPart.md new file mode 100644 index 00000000..d3e6a901 --- /dev/null +++ b/docs/models/shared/MediaContainerWithDecisionPart.md @@ -0,0 +1,24 @@ +# MediaContainerWithDecisionPart + +`Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part. + + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | lc | +| `container` | *Optional\* | :heavy_minus_sign: | The container of the media file, such as `mp4` or `mkv` | mov | +| `duration` | *Optional\* | :heavy_minus_sign: | The duration of the media item, in milliseconds | 150192 | +| `file` | *Optional\* | :heavy_minus_sign: | The local file path at which the part is stored on the server | /home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov | +| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `key` | *Optional\* | :heavy_minus_sign: | The key from which the media can be streamed | /library/parts/1/1531779263/file.mov | +| `optimizedForStreaming` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `size` | *Optional\* | :heavy_minus_sign: | The size of the media, in bytes | 105355654 | +| `stream` | List\<[MediaContainerWithDecisionStream](../../models/shared/MediaContainerWithDecisionStream.md)> | :heavy_minus_sign: | N/A | | +| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | main | +| `decision` | [Optional\](../../models/shared/Decision.md) | :heavy_minus_sign: | N/A | | +| `selected` | *Optional\* | :heavy_minus_sign: | N/A | | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDecisionStream.md b/docs/models/shared/MediaContainerWithDecisionStream.md new file mode 100644 index 00000000..3cf44d5b --- /dev/null +++ b/docs/models/shared/MediaContainerWithDecisionStream.md @@ -0,0 +1,42 @@ +# MediaContainerWithDecisionStream + +`Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream. Note that photos do not have streams (mostly as an optimization). + + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `default_` | *Optional\* | :heavy_minus_sign: | N/A | true | +| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | N/A | stereo | +| `bitDepth` | *Optional\* | :heavy_minus_sign: | N/A | 8 | +| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 5466 | +| `canAutoSync` | *Optional\* | :heavy_minus_sign: | For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. | true | +| `chromaLocation` | *Optional\* | :heavy_minus_sign: | N/A | topleft | +| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | N/A | 4:2:0 | +| `codec` | *Optional\* | :heavy_minus_sign: | The codec of the stream, such as `h264` or `aac` | h264 | +| `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 | +| `displayTitle` | *Optional\* | :heavy_minus_sign: | A friendly name for the stream, often comprised of the language and codec information | English (H.264 Main) | +| `frameRate` | *Optional\* | :heavy_minus_sign: | N/A | 23.976 | +| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `height` | *Optional\* | :heavy_minus_sign: | N/A | 544 | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `index` | *Optional\* | :heavy_minus_sign: | If the stream is part of the `Part` and not an external resource, the index of the stream within that part | 0 | +| `key` | *Optional\* | :heavy_minus_sign: | If the stream is independently streamable, the key from which it can be streamed | /library/streams/1 | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | English | +| `languageCode` | *Optional\* | :heavy_minus_sign: | The three character language code for the stream contents | eng | +| `level` | *Optional\* | :heavy_minus_sign: | N/A | 31 | +| `profile` | *Optional\* | :heavy_minus_sign: | N/A | main | +| `refFrames` | *Optional\* | :heavy_minus_sign: | N/A | 2 | +| `samplingRate` | *Optional\* | :heavy_minus_sign: | N/A | 48000 | +| `selected` | *Optional\* | :heavy_minus_sign: | N/A | | +| `streamIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `streamType` | *Optional\* | :heavy_minus_sign: | A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics | 1 | +| `width` | *Optional\* | :heavy_minus_sign: | N/A | 1280 | +| `decision` | [Optional\](../../models/shared/MediaContainerWithDecisionDecision.md) | :heavy_minus_sign: | N/A | | +| `location` | [Optional\](../../models/shared/MediaContainerWithDecisionLocation.md) | :heavy_minus_sign: | N/A | | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDevice.md b/docs/models/shared/MediaContainerWithDevice.md new file mode 100644 index 00000000..d5064c85 --- /dev/null +++ b/docs/models/shared/MediaContainerWithDevice.md @@ -0,0 +1,8 @@ +# MediaContainerWithDevice + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithDeviceMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDeviceDevice.md b/docs/models/shared/MediaContainerWithDeviceDevice.md new file mode 100644 index 00000000..500ce53a --- /dev/null +++ b/docs/models/shared/MediaContainerWithDeviceDevice.md @@ -0,0 +1,20 @@ +# MediaContainerWithDeviceDevice + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `channelMapping` | List\<[ChannelMapping](../../models/shared/ChannelMapping.md)> | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `lastSeenAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `make` | *Optional\* | :heavy_minus_sign: | N/A | +| `model` | *Optional\* | :heavy_minus_sign: | N/A | +| `modelNumber` | *Optional\* | :heavy_minus_sign: | N/A | +| `protocol` | *Optional\* | :heavy_minus_sign: | N/A | +| `sources` | *Optional\* | :heavy_minus_sign: | N/A | +| `state` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | *Optional\* | :heavy_minus_sign: | N/A | +| `tuners` | *Optional\* | :heavy_minus_sign: | N/A | +| `uri` | *Optional\* | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDeviceMediaContainer.md b/docs/models/shared/MediaContainerWithDeviceMediaContainer.md new file mode 100644 index 00000000..cfe2436e --- /dev/null +++ b/docs/models/shared/MediaContainerWithDeviceMediaContainer.md @@ -0,0 +1,17 @@ +# MediaContainerWithDeviceMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `device` | List\<[MediaContainerWithDeviceDevice](../../models/shared/MediaContainerWithDeviceDevice.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDirectory.md b/docs/models/shared/MediaContainerWithDirectory.md new file mode 100644 index 00000000..905b68e6 --- /dev/null +++ b/docs/models/shared/MediaContainerWithDirectory.md @@ -0,0 +1,8 @@ +# MediaContainerWithDirectory + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithDirectoryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithDirectoryMediaContainer.md b/docs/models/shared/MediaContainerWithDirectoryMediaContainer.md new file mode 100644 index 00000000..38a85753 --- /dev/null +++ b/docs/models/shared/MediaContainerWithDirectoryMediaContainer.md @@ -0,0 +1,17 @@ +# MediaContainerWithDirectoryMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | List\<[Directory](../../models/shared/Directory.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithHubs.md b/docs/models/shared/MediaContainerWithHubs.md new file mode 100644 index 00000000..1993cdb1 --- /dev/null +++ b/docs/models/shared/MediaContainerWithHubs.md @@ -0,0 +1,10 @@ +# MediaContainerWithHubs + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithHubsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithHubsMediaContainer.md b/docs/models/shared/MediaContainerWithHubsMediaContainer.md new file mode 100644 index 00000000..4b331a79 --- /dev/null +++ b/docs/models/shared/MediaContainerWithHubsMediaContainer.md @@ -0,0 +1,17 @@ +# MediaContainerWithHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | List\<[Hub](../../models/shared/Hub.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithLineup.md b/docs/models/shared/MediaContainerWithLineup.md new file mode 100644 index 00000000..1c4ea0a3 --- /dev/null +++ b/docs/models/shared/MediaContainerWithLineup.md @@ -0,0 +1,8 @@ +# MediaContainerWithLineup + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithLineupMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithLineupMediaContainer.md b/docs/models/shared/MediaContainerWithLineupMediaContainer.md new file mode 100644 index 00000000..2c7f1f69 --- /dev/null +++ b/docs/models/shared/MediaContainerWithLineupMediaContainer.md @@ -0,0 +1,18 @@ +# MediaContainerWithLineupMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `lineup` | List\<[Lineup](../../models/shared/Lineup.md)> | :heavy_minus_sign: | N/A | +| `uuid` | *Optional\* | :heavy_minus_sign: | The UUID of this set lineups | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithMetadata.md b/docs/models/shared/MediaContainerWithMetadata.md new file mode 100644 index 00000000..7b4e978a --- /dev/null +++ b/docs/models/shared/MediaContainerWithMetadata.md @@ -0,0 +1,8 @@ +# MediaContainerWithMetadata + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithMetadataMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithMetadataMediaContainer.md b/docs/models/shared/MediaContainerWithMetadataMediaContainer.md new file mode 100644 index 00000000..6f54c91b --- /dev/null +++ b/docs/models/shared/MediaContainerWithMetadataMediaContainer.md @@ -0,0 +1,17 @@ +# MediaContainerWithMetadataMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | List\<[Metadata](../../models/shared/Metadata.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithNestedMetadata.md b/docs/models/shared/MediaContainerWithNestedMetadata.md new file mode 100644 index 00000000..fd5e740d --- /dev/null +++ b/docs/models/shared/MediaContainerWithNestedMetadata.md @@ -0,0 +1,8 @@ +# MediaContainerWithNestedMetadata + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithNestedMetadataMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithNestedMetadataMediaContainer.md b/docs/models/shared/MediaContainerWithNestedMetadataMediaContainer.md new file mode 100644 index 00000000..8601c970 --- /dev/null +++ b/docs/models/shared/MediaContainerWithNestedMetadataMediaContainer.md @@ -0,0 +1,17 @@ +# MediaContainerWithNestedMetadataMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadataItem` | List\<[MetadataItem](../../models/shared/MetadataItem.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithPlaylistMetadata.md b/docs/models/shared/MediaContainerWithPlaylistMetadata.md new file mode 100644 index 00000000..9039ca7c --- /dev/null +++ b/docs/models/shared/MediaContainerWithPlaylistMetadata.md @@ -0,0 +1,8 @@ +# MediaContainerWithPlaylistMetadata + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithPlaylistMetadataMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithPlaylistMetadataMediaContainer.md b/docs/models/shared/MediaContainerWithPlaylistMetadataMediaContainer.md new file mode 100644 index 00000000..6c951e05 --- /dev/null +++ b/docs/models/shared/MediaContainerWithPlaylistMetadataMediaContainer.md @@ -0,0 +1,17 @@ +# MediaContainerWithPlaylistMetadataMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | List\<[MediaContainerWithPlaylistMetadataMetadata](../../models/shared/MediaContainerWithPlaylistMetadataMetadata.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithPlaylistMetadataMetadata.md b/docs/models/shared/MediaContainerWithPlaylistMetadataMetadata.md new file mode 100644 index 00000000..09dc7bd1 --- /dev/null +++ b/docs/models/shared/MediaContainerWithPlaylistMetadataMetadata.md @@ -0,0 +1,86 @@ +# MediaContainerWithPlaylistMetadataMetadata + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `readOnly` | *Optional\* | :heavy_minus_sign: | If we return this as true then this playlist cannot be altered or deleted directly by the client. | +| `composite` | *Optional\* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `duration` | *Optional\* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `key` | *Optional\* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `leafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `playlistType` | [Optional\](../../models/shared/PlaylistType.md) | :heavy_minus_sign: | The type of the playlist. | +| `smart` | *Optional\* | :heavy_minus_sign: | Whether or not the playlist is smart. | +| `specialPlaylistType` | *Optional\* | :heavy_minus_sign: | If this is a special playlist, this returns its type (e.g. favorites). | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *Optional\* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *Optional\* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *Optional\* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *Optional\* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `banner` | *Optional\* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *Optional\* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `contentRating` | *Optional\* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `director` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `filter` | List\<[Filter](../../models/shared/Filter.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `hero` | *Optional\* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | List\<[Image](../../models/shared/Image.md)> | :heavy_minus_sign: | N/A | +| `index` | *Optional\* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `media` | List\<[Media](../../models/shared/Media.md)> | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *Optional\* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *Optional\* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *Optional\* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *Optional\* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *Optional\* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `ratingCount` | *Optional\* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *Optional\* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `search` | *Optional\* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *Optional\* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *Optional\* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *Optional\* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | List\<[Sort](../../models/shared/Sort.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *Optional\* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *Optional\* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *Optional\* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *Optional\* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *Optional\* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *Optional\* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *Optional\* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *Optional\* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *Optional\* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *Optional\* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `year` | *Optional\* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithSettings.md b/docs/models/shared/MediaContainerWithSettings.md new file mode 100644 index 00000000..28c66208 --- /dev/null +++ b/docs/models/shared/MediaContainerWithSettings.md @@ -0,0 +1,8 @@ +# MediaContainerWithSettings + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithSettingsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithSettingsMediaContainer.md b/docs/models/shared/MediaContainerWithSettingsMediaContainer.md new file mode 100644 index 00000000..a52ff11c --- /dev/null +++ b/docs/models/shared/MediaContainerWithSettingsMediaContainer.md @@ -0,0 +1,17 @@ +# MediaContainerWithSettingsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `setting` | List\<[Setting](../../models/shared/Setting.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithSubscription.md b/docs/models/shared/MediaContainerWithSubscription.md new file mode 100644 index 00000000..5e0d1fee --- /dev/null +++ b/docs/models/shared/MediaContainerWithSubscription.md @@ -0,0 +1,8 @@ +# MediaContainerWithSubscription + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [Optional\](../../models/shared/MediaContainerWithSubscriptionMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaContainerWithSubscriptionMediaContainer.md b/docs/models/shared/MediaContainerWithSubscriptionMediaContainer.md new file mode 100644 index 00000000..8edcb043 --- /dev/null +++ b/docs/models/shared/MediaContainerWithSubscriptionMediaContainer.md @@ -0,0 +1,17 @@ +# MediaContainerWithSubscriptionMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `mediaSubscription` | List\<[MediaSubscription](../../models/shared/MediaSubscription.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaGrabOperation.md b/docs/models/shared/MediaGrabOperation.md new file mode 100644 index 00000000..f172ef52 --- /dev/null +++ b/docs/models/shared/MediaGrabOperation.md @@ -0,0 +1,21 @@ +# MediaGrabOperation + +A media grab opration represents a scheduled or active recording of media + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `currentSize` | *Optional\* | :heavy_minus_sign: | N/A | +| `grabberIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `grabberProtocol` | *Optional\* | :heavy_minus_sign: | N/A | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `mediaIndex` | *Optional\* | :heavy_minus_sign: | N/A | +| `mediaSubscriptionID` | *Optional\* | :heavy_minus_sign: | N/A | +| `metadata` | [Optional\](../../models/shared/Metadata.md) | :heavy_minus_sign: | Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
| +| `percent` | *Optional\* | :heavy_minus_sign: | N/A | +| `provider` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | [Optional\](../../models/shared/Status.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MediaQuery.md b/docs/models/shared/MediaQuery.md new file mode 100644 index 00000000..72cbb9c2 --- /dev/null +++ b/docs/models/shared/MediaQuery.md @@ -0,0 +1,7 @@ +# MediaQuery + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/MediaSubscription.md b/docs/models/shared/MediaSubscription.md new file mode 100644 index 00000000..4d86f404 --- /dev/null +++ b/docs/models/shared/MediaSubscription.md @@ -0,0 +1,26 @@ +# MediaSubscription + +A media subscription contains a representation of metadata desired to be recorded + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | The metadata type of the root item of the subscription | +| `airingsType` | [Optional\](../../models/shared/AiringsType.md) | :heavy_minus_sign: | N/A | +| `createdAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `directory` | Map\ | :heavy_minus_sign: | Media Matching Hints | +| `durationTotal` | *Optional\* | :heavy_minus_sign: | Only included if `includeStorage` is specified | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `librarySectionTitle` | *Optional\* | :heavy_minus_sign: | N/A | +| `locationPath` | *Optional\* | :heavy_minus_sign: | N/A | +| `mediaGrabOperation` | List\<[MediaGrabOperation](../../models/shared/MediaGrabOperation.md)> | :heavy_minus_sign: | N/A | +| `playlist` | Map\ | :heavy_minus_sign: | Media Matching Hints | +| `setting` | List\<[Setting](../../models/shared/Setting.md)> | :heavy_minus_sign: | N/A | +| `storageTotal` | *Optional\* | :heavy_minus_sign: | Only included if `includeStorage` is specified | +| `targetLibrarySectionID` | *Optional\* | :heavy_minus_sign: | The library section id for where the item is to be recorded | +| `targetSectionLocationID` | *Optional\* | :heavy_minus_sign: | The library section location id for where the item is to be recorded | +| `video` | Map\ | :heavy_minus_sign: | Media Matching Hints | \ No newline at end of file diff --git a/docs/models/shared/Metadata.md b/docs/models/shared/Metadata.md new file mode 100644 index 00000000..685c008e --- /dev/null +++ b/docs/models/shared/Metadata.md @@ -0,0 +1,82 @@ +# Metadata + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *Optional\* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *Optional\* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *Optional\* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *Optional\* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `banner` | *Optional\* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *Optional\* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *Optional\* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *Optional\* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `director` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `duration` | *Optional\* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | List\<[Filter](../../models/shared/Filter.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `hero` | *Optional\* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | List\<[Image](../../models/shared/Image.md)> | :heavy_minus_sign: | N/A | +| `index` | *Optional\* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *Optional\* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | List\<[Media](../../models/shared/Media.md)> | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *Optional\* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *Optional\* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *Optional\* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *Optional\* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *Optional\* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `ratingCount` | *Optional\* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *Optional\* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `search` | *Optional\* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *Optional\* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *Optional\* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *Optional\* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | List\<[Sort](../../models/shared/Sort.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *Optional\* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *Optional\* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *Optional\* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *Optional\* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *Optional\* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *Optional\* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *Optional\* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *Optional\* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *Optional\* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *Optional\* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `year` | *Optional\* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/MetadataItem.md b/docs/models/shared/MetadataItem.md new file mode 100644 index 00000000..97e674d3 --- /dev/null +++ b/docs/models/shared/MetadataItem.md @@ -0,0 +1,83 @@ +# MetadataItem + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *Optional\* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *Optional\* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *Optional\* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *Optional\* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *Optional\* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `banner` | *Optional\* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *Optional\* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *Optional\* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *Optional\* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `director` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `duration` | *Optional\* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | List\<[Filter](../../models/shared/Filter.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `grandparentArt` | *Optional\* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *Optional\* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `hero` | *Optional\* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | List\<[Image](../../models/shared/Image.md)> | :heavy_minus_sign: | N/A | +| `index` | *Optional\* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *Optional\* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *Optional\* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | List\<[Media](../../models/shared/Media.md)> | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *Optional\* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *Optional\* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *Optional\* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *Optional\* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *Optional\* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *Optional\* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *Optional\* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *Optional\* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *Optional\* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *Optional\* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *Optional\* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `ratingCount` | *Optional\* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *Optional\* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `search` | *Optional\* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *Optional\* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *Optional\* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *Optional\* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | List\<[Sort](../../models/shared/Sort.md)> | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *Optional\* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *Optional\* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *Optional\* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *Optional\* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *Optional\* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *Optional\* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *Optional\* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *Optional\* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *Optional\* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *Optional\* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *Optional\* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | List\<[Tag](../../models/shared/Tag.md)> | :heavy_minus_sign: | N/A | +| `year` | *Optional\* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `metadataItem` | List\<[Items](../../models/shared/Items.md)> | :heavy_minus_sign: | N/A | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/Part.md b/docs/models/shared/Part.md new file mode 100644 index 00000000..bdce894d --- /dev/null +++ b/docs/models/shared/Part.md @@ -0,0 +1,22 @@ +# Part + +`Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part. + + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `audioProfile` | *Optional\* | :heavy_minus_sign: | N/A | lc | +| `container` | *Optional\* | :heavy_minus_sign: | The container of the media file, such as `mp4` or `mkv` | mov | +| `duration` | *Optional\* | :heavy_minus_sign: | The duration of the media item, in milliseconds | 150192 | +| `file` | *Optional\* | :heavy_minus_sign: | The local file path at which the part is stored on the server | /home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov | +| `has64bitOffsets` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `key` | *Optional\* | :heavy_minus_sign: | The key from which the media can be streamed | /library/parts/1/1531779263/file.mov | +| `optimizedForStreaming` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `size` | *Optional\* | :heavy_minus_sign: | The size of the media, in bytes | 105355654 | +| `stream` | List\<[Stream](../../models/shared/Stream.md)> | :heavy_minus_sign: | N/A | | +| `videoProfile` | *Optional\* | :heavy_minus_sign: | N/A | main | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/Pivot.md b/docs/models/shared/Pivot.md similarity index 100% rename from docs/models/operations/Pivot.md rename to docs/models/shared/Pivot.md index 77e96708..5e71a5fc 100644 --- a/docs/models/operations/Pivot.md +++ b/docs/models/shared/Pivot.md @@ -5,9 +5,9 @@ | Field | Type | Required | Description | | ------------------- | ------------------- | ------------------- | ------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | +| `context` | *Optional\* | :heavy_minus_sign: | N/A | | `id` | *Optional\* | :heavy_minus_sign: | N/A | | `key` | *Optional\* | :heavy_minus_sign: | N/A | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | -| `title` | *Optional\* | :heavy_minus_sign: | N/A | -| `context` | *Optional\* | :heavy_minus_sign: | N/A | | `symbol` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/Player.md b/docs/models/shared/Player.md new file mode 100644 index 00000000..276cc2e5 --- /dev/null +++ b/docs/models/shared/Player.md @@ -0,0 +1,24 @@ +# Player + +Information about the player being used for playback + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the client | +| `address` | *Optional\* | :heavy_minus_sign: | The remote address | +| `local` | *Optional\* | :heavy_minus_sign: | Indicating if the client is playing from the local LAN | +| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | The identifier of the client | +| `model` | *Optional\* | :heavy_minus_sign: | The model of the client | +| `platform` | *Optional\* | :heavy_minus_sign: | The platform of the client | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | The platformVersion of the client | +| `product` | *Optional\* | :heavy_minus_sign: | The product name of the client | +| `relayed` | *Optional\* | :heavy_minus_sign: | Indicating if the client is playing over a relay connection | +| `remotePublicAddress` | *Optional\* | :heavy_minus_sign: | The client's public address | +| `secure` | *Optional\* | :heavy_minus_sign: | Indicating if the client is playing over HTTPS | +| `state` | *Optional\* | :heavy_minus_sign: | The client's last reported state | +| `userID` | *Optional\* | :heavy_minus_sign: | The id of the user | +| `vendor` | *Optional\* | :heavy_minus_sign: | The vendor of the client | +| `version` | *Optional\* | :heavy_minus_sign: | The version of the client | \ No newline at end of file diff --git a/docs/models/shared/PlaylistType.md b/docs/models/shared/PlaylistType.md new file mode 100644 index 00000000..e7b0fbcf --- /dev/null +++ b/docs/models/shared/PlaylistType.md @@ -0,0 +1,12 @@ +# PlaylistType + +The type of the playlist. + + +## Values + +| Name | Value | +| ------- | ------- | +| `AUDIO` | audio | +| `VIDEO` | video | +| `PHOTO` | photo | \ No newline at end of file diff --git a/docs/models/shared/PostResponses200.md b/docs/models/shared/PostResponses200.md new file mode 100644 index 00000000..deff45e5 --- /dev/null +++ b/docs/models/shared/PostResponses200.md @@ -0,0 +1,10 @@ +# PostResponses200 + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/PostResponses200MediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/PostResponses200MediaContainer.md b/docs/models/shared/PostResponses200MediaContainer.md new file mode 100644 index 00000000..a20a5a47 --- /dev/null +++ b/docs/models/shared/PostResponses200MediaContainer.md @@ -0,0 +1,23 @@ +# PostResponses200MediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `color` | *Optional\* | :heavy_minus_sign: | N/A | +| `endTimeOffset` | *Optional\* | :heavy_minus_sign: | N/A | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `startTimeOffset` | *Optional\* | :heavy_minus_sign: | N/A | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | [Optional\](../../models/shared/PostResponses200Type.md) | :heavy_minus_sign: | N/A | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/PostResponses200Type.md b/docs/models/shared/PostResponses200Type.md new file mode 100644 index 00000000..9c4bc4df --- /dev/null +++ b/docs/models/shared/PostResponses200Type.md @@ -0,0 +1,12 @@ +# PostResponses200Type + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `INTRO` | intro | +| `COMMERCIAL` | commercial | +| `BOOKMARK` | bookmark | +| `RESUME` | resume | +| `CREDIT` | credit | \ No newline at end of file diff --git a/docs/models/shared/Protocol.md b/docs/models/shared/Protocol.md new file mode 100644 index 00000000..61c4cb75 --- /dev/null +++ b/docs/models/shared/Protocol.md @@ -0,0 +1,10 @@ +# Protocol + + +## Values + +| Name | Value | +| ------ | ------ | +| `HTTP` | http | +| `HLS` | hls | +| `DASH` | dash | \ No newline at end of file diff --git a/docs/models/shared/RecommendationsVisibility.md b/docs/models/shared/RecommendationsVisibility.md new file mode 100644 index 00000000..ce76f3bb --- /dev/null +++ b/docs/models/shared/RecommendationsVisibility.md @@ -0,0 +1,18 @@ +# RecommendationsVisibility + +The visibility of this hub in recommendations: + - all: Visible to all users + - none: Visible to no users + - admin: Visible to only admin users + - shared: Visible to shared users + + + +## Values + +| Name | Value | +| -------- | -------- | +| `ALL` | all | +| `NONE` | none | +| `ADMIN` | admin | +| `SHARED` | shared | \ No newline at end of file diff --git a/docs/models/shared/RequestHandlerSlashGetResponses200.md b/docs/models/shared/RequestHandlerSlashGetResponses200.md new file mode 100644 index 00000000..55d743ec --- /dev/null +++ b/docs/models/shared/RequestHandlerSlashGetResponses200.md @@ -0,0 +1,10 @@ +# RequestHandlerSlashGetResponses200 + +OK + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/RequestHandlerSlashGetResponses200MediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/RequestHandlerSlashGetResponses200Directory.md b/docs/models/shared/RequestHandlerSlashGetResponses200Directory.md new file mode 100644 index 00000000..77e4cccf --- /dev/null +++ b/docs/models/shared/RequestHandlerSlashGetResponses200Directory.md @@ -0,0 +1,10 @@ +# RequestHandlerSlashGetResponses200Directory + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `count` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | The key where this directory is found | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/RequestHandlerSlashGetResponses200MediaContainer.md b/docs/models/shared/RequestHandlerSlashGetResponses200MediaContainer.md new file mode 100644 index 00000000..b7e0570b --- /dev/null +++ b/docs/models/shared/RequestHandlerSlashGetResponses200MediaContainer.md @@ -0,0 +1,65 @@ +# RequestHandlerSlashGetResponses200MediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | | +| `offset` | *Optional\* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| | +| `size` | *Optional\* | :heavy_minus_sign: | N/A | | +| `totalSize` | *Optional\* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| | +| `allowCameraUpload` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowChannelAccess` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowMediaDeletion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowSharing` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | | +| `allowTuners` | *Optional\* | :heavy_minus_sign: | N/A | | +| `backgroundProcessing` | *Optional\* | :heavy_minus_sign: | N/A | | +| `certificate` | *Optional\* | :heavy_minus_sign: | N/A | | +| `companionProxy` | *Optional\* | :heavy_minus_sign: | N/A | | +| `countryCode` | *Optional\* | :heavy_minus_sign: | N/A | | +| `diagnostics` | *Optional\* | :heavy_minus_sign: | N/A | | +| `eventStream` | *Optional\* | :heavy_minus_sign: | N/A | | +| `friendlyName` | *Optional\* | :heavy_minus_sign: | N/A | | +| `hubSearch` | *Optional\* | :heavy_minus_sign: | N/A | | +| `itemClusters` | *Optional\* | :heavy_minus_sign: | N/A | | +| `livetv` | *Optional\* | :heavy_minus_sign: | N/A | 7 | +| `machineIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | 0123456789abcdef0123456789abcdef012345678 | +| `mediaProviders` | *Optional\* | :heavy_minus_sign: | N/A | | +| `multiuser` | *Optional\* | :heavy_minus_sign: | N/A | | +| `musicAnalysis` | *Optional\* | :heavy_minus_sign: | N/A | 2 | +| `myPlex` | *Optional\* | :heavy_minus_sign: | N/A | | +| `myPlexMappingState` | *Optional\* | :heavy_minus_sign: | N/A | mapped | +| `myPlexSigninState` | *Optional\* | :heavy_minus_sign: | N/A | ok | +| `myPlexSubscription` | *Optional\* | :heavy_minus_sign: | N/A | | +| `myPlexUsername` | *Optional\* | :heavy_minus_sign: | N/A | | +| `offlineTranscode` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `ownerFeatures` | *Optional\* | :heavy_minus_sign: | A comma-separated list of features which are enabled for the server owner | | +| `platform` | *Optional\* | :heavy_minus_sign: | N/A | | +| `platformVersion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `pluginHost` | *Optional\* | :heavy_minus_sign: | N/A | | +| `pushNotifications` | *Optional\* | :heavy_minus_sign: | N/A | | +| `readOnlyLibraries` | *Optional\* | :heavy_minus_sign: | N/A | | +| `streamingBrainABRVersion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `streamingBrainVersion` | *Optional\* | :heavy_minus_sign: | N/A | | +| `sync` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderActiveVideoSessions` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderAudio` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderLyrics` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderPhoto` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderSubtitles` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderVideo` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderVideoBitrates` | *Optional\* | :heavy_minus_sign: | The suggested video quality bitrates to present to the user | | +| `transcoderVideoQualities` | *Optional\* | :heavy_minus_sign: | N/A | | +| `transcoderVideoResolutions` | *Optional\* | :heavy_minus_sign: | The suggested video resolutions to the above quality bitrates | | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | N/A | | +| `updater` | *Optional\* | :heavy_minus_sign: | N/A | | +| `version` | *Optional\* | :heavy_minus_sign: | N/A | | +| `voiceSearch` | *Optional\* | :heavy_minus_sign: | N/A | | +| `directory` | List\<[RequestHandlerSlashGetResponses200Directory](../../models/shared/RequestHandlerSlashGetResponses200Directory.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/Security.md b/docs/models/shared/Security.md index 82271e9c..d555aac1 100644 --- a/docs/models/shared/Security.md +++ b/docs/models/shared/Security.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ------------------- | ------------------- | ------------------- | ------------------- | -| `accessToken` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `token` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/Session.md b/docs/models/shared/Session.md new file mode 100644 index 00000000..a30c7ffe --- /dev/null +++ b/docs/models/shared/Session.md @@ -0,0 +1,12 @@ +# Session + +Information about the playback session + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `bandwidth` | *Optional\* | :heavy_minus_sign: | The bandwidth used by this client's playback in kbps | +| `id` | *Optional\* | :heavy_minus_sign: | The id of the playback session | +| `location` | [Optional\](../../models/shared/SessionLocation.md) | :heavy_minus_sign: | The location of the client | \ No newline at end of file diff --git a/docs/models/shared/SessionLocation.md b/docs/models/shared/SessionLocation.md new file mode 100644 index 00000000..dd9aafe9 --- /dev/null +++ b/docs/models/shared/SessionLocation.md @@ -0,0 +1,11 @@ +# SessionLocation + +The location of the client + + +## Values + +| Name | Value | +| ----- | ----- | +| `LAN` | lan | +| `WAN` | wan | \ No newline at end of file diff --git a/docs/models/shared/Setting.md b/docs/models/shared/Setting.md new file mode 100644 index 00000000..8e55239b --- /dev/null +++ b/docs/models/shared/Setting.md @@ -0,0 +1,19 @@ +# Setting + +A configuration setting or preference + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `type` | [Optional\](../../models/shared/Type.md) | :heavy_minus_sign: | The type of the value of this setting | +| `default_` | [Optional\](../../models/shared/Default.md) | :heavy_minus_sign: | The default value of this setting | +| `advanced` | *Optional\* | :heavy_minus_sign: | Whether the setting is considered advanced and normally hidden from the user | +| `enumValues` | *Optional\* | :heavy_minus_sign: | The possible values for this setting if restricted. The list is `\|` separated with `value:name` entries. | +| `group` | *Optional\* | :heavy_minus_sign: | The group name of this setting to aid in display of a hierarchy | +| `hidden` | *Optional\* | :heavy_minus_sign: | Whether the setting is hidden or not | +| `id` | *Optional\* | :heavy_minus_sign: | The query parameter name for this setting | +| `label` | *Optional\* | :heavy_minus_sign: | A user-friendly name for the setting | +| `summary` | *Optional\* | :heavy_minus_sign: | A description of the setting | +| `value` | [Optional\](../../models/shared/Value.md) | :heavy_minus_sign: | The current value of this setting | \ No newline at end of file diff --git a/docs/models/shared/SlashGetResponses200.md b/docs/models/shared/SlashGetResponses200.md new file mode 100644 index 00000000..c6427df3 --- /dev/null +++ b/docs/models/shared/SlashGetResponses200.md @@ -0,0 +1,10 @@ +# SlashGetResponses200 + +OK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional\](../../models/shared/SlashGetResponses200MediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/SlashGetResponses200MediaContainer.md b/docs/models/shared/SlashGetResponses200MediaContainer.md new file mode 100644 index 00000000..312d1254 --- /dev/null +++ b/docs/models/shared/SlashGetResponses200MediaContainer.md @@ -0,0 +1,21 @@ +# SlashGetResponses200MediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content` | *Optional\* | :heavy_minus_sign: | The flavors of directory found here:
- Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.
- Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.
- Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. | +| `allowSync` | *Optional\* | :heavy_minus_sign: | N/A | +| `art` | *Optional\* | :heavy_minus_sign: | N/A | +| `directory` | List\<[Metadata](../../models/shared/Metadata.md)> | :heavy_minus_sign: | N/A | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `librarySectionID` | *Optional\* | :heavy_minus_sign: | N/A | +| `mediaTagPrefix` | *Optional\* | :heavy_minus_sign: | N/A | +| `mediaTagVersion` | *Optional\* | :heavy_minus_sign: | N/A | +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `sortAsc` | *Optional\* | :heavy_minus_sign: | N/A | +| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | +| `title1` | *Optional\* | :heavy_minus_sign: | N/A | +| `viewGroup` | *Optional\* | :heavy_minus_sign: | N/A | +| `viewMode` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/Sort.md b/docs/models/shared/Sort.md new file mode 100644 index 00000000..83afbc26 --- /dev/null +++ b/docs/models/shared/Sort.md @@ -0,0 +1,30 @@ +# Sort + +Each `Sort` object contains a description of the sort field. + + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | The title of the field. | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | +| `art` | *Optional\* | :heavy_minus_sign: | N/A | +| `content` | *Optional\* | :heavy_minus_sign: | N/A | +| `filter` | *Optional\* | :heavy_minus_sign: | N/A | +| `hasPrefs` | *Optional\* | :heavy_minus_sign: | N/A | +| `hasStoreServices` | *Optional\* | :heavy_minus_sign: | N/A | +| `hubKey` | *Optional\* | :heavy_minus_sign: | N/A | +| `identifier` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | The key to use in the sort field to make items sort by this item | +| `lastAccessedAt` | *Optional\* | :heavy_minus_sign: | N/A | +| `pivot` | List\<[SortPivot](../../models/shared/SortPivot.md)> | :heavy_minus_sign: | N/A | +| `share` | *Optional\* | :heavy_minus_sign: | N/A | +| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | +| `titleBar` | *Optional\* | :heavy_minus_sign: | N/A | +| `default_` | [Optional\](../../models/shared/SortDefault.md) | :heavy_minus_sign: | If present, this sort is the default and in this direction | +| `defaultDirection` | [Optional\](../../models/shared/DefaultDirection.md) | :heavy_minus_sign: | This default diction of this sort | +| `descKey` | *Optional\* | :heavy_minus_sign: | The key for sorting this field in reverse order | +| `firstCharacterKey` | *Optional\* | :heavy_minus_sign: | The key to use to get items sorted by this field and indexed by the first character | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/SortDefault.md b/docs/models/shared/SortDefault.md new file mode 100644 index 00000000..fca0c709 --- /dev/null +++ b/docs/models/shared/SortDefault.md @@ -0,0 +1,11 @@ +# SortDefault + +If present, this sort is the default and in this direction + + +## Values + +| Name | Value | +| ------ | ------ | +| `ASC` | asc | +| `DESC` | desc | \ No newline at end of file diff --git a/docs/models/shared/SortPivot.md b/docs/models/shared/SortPivot.md new file mode 100644 index 00000000..24a40185 --- /dev/null +++ b/docs/models/shared/SortPivot.md @@ -0,0 +1,13 @@ +# SortPivot + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | N/A | +| `type` | *Optional\* | :heavy_minus_sign: | N/A | +| `context` | *Optional\* | :heavy_minus_sign: | N/A | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `symbol` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/Status.md b/docs/models/shared/Status.md new file mode 100644 index 00000000..fe0ec146 --- /dev/null +++ b/docs/models/shared/Status.md @@ -0,0 +1,15 @@ +# Status + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `INACTIVE` | inactive | +| `SCHEDULED` | scheduled | +| `INPROGRESS` | inprogress | +| `COMPLETE` | complete | +| `CANCELLED` | cancelled | +| `ERROR` | error | +| `POSTPROCESSING` | postprocessing | +| `PAUSED` | paused | \ No newline at end of file diff --git a/docs/models/shared/Stream.md b/docs/models/shared/Stream.md new file mode 100644 index 00000000..db715ec4 --- /dev/null +++ b/docs/models/shared/Stream.md @@ -0,0 +1,40 @@ +# Stream + +`Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream. Note that photos do not have streams (mostly as an optimization). + + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `default_` | *Optional\* | :heavy_minus_sign: | N/A | true | +| `audioChannelLayout` | *Optional\* | :heavy_minus_sign: | N/A | stereo | +| `bitDepth` | *Optional\* | :heavy_minus_sign: | N/A | 8 | +| `bitrate` | *Optional\* | :heavy_minus_sign: | N/A | 5466 | +| `canAutoSync` | *Optional\* | :heavy_minus_sign: | For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. | true | +| `chromaLocation` | *Optional\* | :heavy_minus_sign: | N/A | topleft | +| `chromaSubsampling` | *Optional\* | :heavy_minus_sign: | N/A | 4:2:0 | +| `codec` | *Optional\* | :heavy_minus_sign: | The codec of the stream, such as `h264` or `aac` | h264 | +| `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 | +| `displayTitle` | *Optional\* | :heavy_minus_sign: | A friendly name for the stream, often comprised of the language and codec information | English (H.264 Main) | +| `frameRate` | *Optional\* | :heavy_minus_sign: | N/A | 23.976 | +| `hasScalingMatrix` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `height` | *Optional\* | :heavy_minus_sign: | N/A | 544 | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `index` | *Optional\* | :heavy_minus_sign: | If the stream is part of the `Part` and not an external resource, the index of the stream within that part | 0 | +| `key` | *Optional\* | :heavy_minus_sign: | If the stream is independently streamable, the key from which it can be streamed | /library/streams/1 | +| `language` | *Optional\* | :heavy_minus_sign: | N/A | English | +| `languageCode` | *Optional\* | :heavy_minus_sign: | The three character language code for the stream contents | eng | +| `level` | *Optional\* | :heavy_minus_sign: | N/A | 31 | +| `profile` | *Optional\* | :heavy_minus_sign: | N/A | main | +| `refFrames` | *Optional\* | :heavy_minus_sign: | N/A | 2 | +| `samplingRate` | *Optional\* | :heavy_minus_sign: | N/A | 48000 | +| `selected` | *Optional\* | :heavy_minus_sign: | N/A | | +| `streamIdentifier` | *Optional\* | :heavy_minus_sign: | N/A | 1 | +| `streamType` | *Optional\* | :heavy_minus_sign: | A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics | 1 | +| `width` | *Optional\* | :heavy_minus_sign: | N/A | 1280 | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/Subtitles.md b/docs/models/shared/Subtitles.md new file mode 100644 index 00000000..f8d4e425 --- /dev/null +++ b/docs/models/shared/Subtitles.md @@ -0,0 +1,14 @@ +# Subtitles + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `AUTO` | auto | +| `BURN` | burn | +| `NONE` | none | +| `SIDECAR` | sidecar | +| `EMBEDDED` | embedded | +| `SEGMENTED` | segmented | +| `UNKNOWN` | unknown | \ No newline at end of file diff --git a/docs/models/shared/Tag.md b/docs/models/shared/Tag.md new file mode 100644 index 00000000..386b5475 --- /dev/null +++ b/docs/models/shared/Tag.md @@ -0,0 +1,20 @@ +# Tag + +A variety of extra information about a metadata item is included as tags. These tags use their own element names such as `Genre`, `Writer`, `Directory`, and `Role`. Individual tag types may introduce their own extra attributes. + + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `confidence` | *Optional\* | :heavy_minus_sign: | Measure of the confidence of an automatic tag | | +| `context` | *Optional\* | :heavy_minus_sign: | N/A | | +| `filter` | *Optional\* | :heavy_minus_sign: | A filter parameter that can be used to query for more content that matches this tag value. | actor=49 | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | | +| `ratingKey` | *Optional\* | :heavy_minus_sign: | N/A | | +| `role` | *Optional\* | :heavy_minus_sign: | The role this actor played | Secretary | +| `tag` | *Optional\* | :heavy_minus_sign: | The value of the tag (the name) | Shaun Lawton | +| `tagKey` | *Optional\* | :heavy_minus_sign: | Plex identifier for this tag which can be used to fetch additional information from plex.tv | 5d3ee12c4cde6a001c3e0b27 | +| `tagType` | *Optional\* | :heavy_minus_sign: | N/A | | +| `thumb` | *Optional\* | :heavy_minus_sign: | N/A | http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg | \ No newline at end of file diff --git a/docs/models/shared/TranscodeSession.md b/docs/models/shared/TranscodeSession.md new file mode 100644 index 00000000..a1471549 --- /dev/null +++ b/docs/models/shared/TranscodeSession.md @@ -0,0 +1,23 @@ +# TranscodeSession + +The transcode session if item is currently being transcoded + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `complete` | *Optional\* | :heavy_minus_sign: | N/A | +| `context` | *Optional\* | :heavy_minus_sign: | N/A | +| `duration` | *Optional\* | :heavy_minus_sign: | N/A | +| `error` | *Optional\* | :heavy_minus_sign: | N/A | +| `key` | *Optional\* | :heavy_minus_sign: | N/A | +| `progress` | *Optional\* | :heavy_minus_sign: | N/A | +| `protocol` | *Optional\* | :heavy_minus_sign: | N/A | +| `size` | *Optional\* | :heavy_minus_sign: | N/A | +| `sourceAudioCodec` | *Optional\* | :heavy_minus_sign: | N/A | +| `sourceVideoCodec` | *Optional\* | :heavy_minus_sign: | N/A | +| `speed` | *Optional\* | :heavy_minus_sign: | N/A | +| `throttled` | *Optional\* | :heavy_minus_sign: | N/A | +| `transcodeHwFullPipeline` | *Optional\* | :heavy_minus_sign: | N/A | +| `transcodeHwRequested` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/TranscodeType.md b/docs/models/shared/TranscodeType.md new file mode 100644 index 00000000..99481812 --- /dev/null +++ b/docs/models/shared/TranscodeType.md @@ -0,0 +1,11 @@ +# TranscodeType + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `VIDEO` | video | +| `MUSIC` | music | +| `AUDIO` | audio | +| `SUBTITLES` | subtitles | \ No newline at end of file diff --git a/docs/models/shared/Type.md b/docs/models/shared/Type.md new file mode 100644 index 00000000..12b3f0ad --- /dev/null +++ b/docs/models/shared/Type.md @@ -0,0 +1,13 @@ +# Type + +The type of the value of this setting + + +## Values + +| Name | Value | +| -------- | -------- | +| `BOOL` | bool | +| `INT` | int | +| `TEXT` | text | +| `DOUBLE` | double | \ No newline at end of file diff --git a/docs/models/shared/User.md b/docs/models/shared/User.md new file mode 100644 index 00000000..2eb39416 --- /dev/null +++ b/docs/models/shared/User.md @@ -0,0 +1,12 @@ +# User + +The user playing the content + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `title` | *Optional\* | :heavy_minus_sign: | The username | +| `id` | *Optional\* | :heavy_minus_sign: | The id of the user | +| `thumb` | *Optional\* | :heavy_minus_sign: | Thumb image to display for the user | \ No newline at end of file diff --git a/docs/models/shared/Value.md b/docs/models/shared/Value.md new file mode 100644 index 00000000..29b30dd7 --- /dev/null +++ b/docs/models/shared/Value.md @@ -0,0 +1,4 @@ +# Value + +The current value of this setting + diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index 3dbfc439..a43ff6fe 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -3,45 +3,41 @@ ## Overview -Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. +Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. -Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: -- They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. -- They must contain an `type` which is used by clients to distinguish the specific activity. -- They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) -- The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + +Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. ### Available Operations -* [getServerActivities](#getserveractivities) - Get Server Activities -* [cancelServerActivities](#cancelserveractivities) - Cancel Server Activities +* [listActivities](#listactivities) - Get all activities +* [cancelActivity](#cancelactivity) - Cancel a running activity -## getServerActivities +## listActivities -Get Server Activities +List all activities on the server. Admins can see all activities but other users can only see their own ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerActivitiesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerActivitiesUnauthorized; -import dev.plexapi.sdk.models.operations.GetServerActivitiesResponse; +import dev.plexapi.sdk.models.operations.ListActivitiesResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetServerActivitiesBadRequest, GetServerActivitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetServerActivitiesResponse res = sdk.activities().getServerActivities() + ListActivitiesResponse res = sdk.activities().listActivities() .call(); if (res.object().isPresent()) { @@ -53,42 +49,55 @@ public class Application { ### Response -**[GetServerActivitiesResponse](../../models/operations/GetServerActivitiesResponse.md)** +**[ListActivitiesResponse](../../models/operations/ListActivitiesResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetServerActivitiesBadRequest | 400 | application/json | -| models/errors/GetServerActivitiesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | -## cancelServerActivities +## cancelActivity -Cancel Server Activities +Cancel a running activity. Admins can cancel all activities but other users can only cancel their own ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest; -import dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized; -import dev.plexapi.sdk.models.operations.CancelServerActivitiesResponse; +import dev.plexapi.sdk.models.operations.CancelActivityRequest; +import dev.plexapi.sdk.models.operations.CancelActivityResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws CancelServerActivitiesBadRequest, CancelServerActivitiesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities() - .activityUUID("25b71ed5-0f9d-461c-baa7-d404e9e10d3e") + CancelActivityRequest req = CancelActivityRequest.builder() + .activityId("d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e") + .build(); + + CancelActivityResponse res = sdk.activities().cancelActivity() + .request(req) .call(); // handle response @@ -98,18 +107,16 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `activityUUID` | *String* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [CancelActivityRequest](../../models/operations/CancelActivityRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[CancelServerActivitiesResponse](../../models/operations/CancelServerActivitiesResponse.md)** +**[CancelActivityResponse](../../models/operations/CancelActivityResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| models/errors/CancelServerActivitiesBadRequest | 400 | application/json | -| models/errors/CancelServerActivitiesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md deleted file mode 100644 index 4e3b1ffe..00000000 --- a/docs/sdks/authentication/README.md +++ /dev/null @@ -1,239 +0,0 @@ -# Authentication -(*authentication()*) - -## Overview - -API Calls regarding authentication for Plex Media Server - - -### Available Operations - -* [getTransientToken](#gettransienttoken) - Get a Transient Token -* [getSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information -* [getTokenDetails](#gettokendetails) - Get Token Details -* [postUsersSignInData](#postuserssignindata) - Get User Sign In Data - -## getTransientToken - -This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest; -import dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized; -import dev.plexapi.sdk.models.operations.*; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetTransientTokenBadRequest, GetTransientTokenUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetTransientTokenResponse res = sdk.authentication().getTransientToken() - .type(GetTransientTokenQueryParamType.DELEGATION) - .scope(Scope.ALL) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `type` | [GetTransientTokenQueryParamType](../../models/operations/GetTransientTokenQueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | -| `scope` | [Scope](../../models/operations/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | - -### Response - -**[GetTransientTokenResponse](../../models/operations/GetTransientTokenResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetTransientTokenBadRequest | 400 | application/json | -| models/errors/GetTransientTokenUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getSourceConnectionInformation - -If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. -Note: requires Plex Media Server >= 1.15.4. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationBadRequest; -import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized; -import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetSourceConnectionInformationBadRequest, GetSourceConnectionInformationUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation() - .source("server://client-identifier") - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `source` | *String* | :heavy_check_mark: | The source identifier with an included prefix. | server://client-identifier | - -### Response - -**[GetSourceConnectionInformationResponse](../../models/operations/GetSourceConnectionInformationResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| models/errors/GetSourceConnectionInformationBadRequest | 400 | application/json | -| models/errors/GetSourceConnectionInformationUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getTokenDetails - -Get the User data from the provided X-Plex-Token - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest; -import dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized; -import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetTokenDetailsBadRequest, GetTokenDetailsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetTokenDetailsResponse res = sdk.authentication().getTokenDetails() - .call(); - - if (res.userPlexAccount().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | - -### Response - -**[GetTokenDetailsResponse](../../models/operations/GetTokenDetailsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/GetTokenDetailsBadRequest | 400 | application/json | -| models/errors/GetTokenDetailsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## postUsersSignInData - -Sign in user with username and password and return user data with Plex authentication token - -### Example Usage - - -```java -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.*; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws PostUsersSignInDataBadRequest, PostUsersSignInDataUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .build(); - - PostUsersSignInDataRequest req = PostUsersSignInDataRequest.builder() - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .clientName("Plex for Roku") - .deviceNickname("Roku 3") - .clientVersion("2.4.1") - .platform("Roku") - .requestBody(PostUsersSignInDataRequestBody.builder() - .login("username@email.com") - .password("password123") - .verificationCode("123456") - .build()) - .build(); - - PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData() - .request(req) - .call(); - - if (res.userPlexAccount().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| 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 - -**[PostUsersSignInDataResponse](../../models/operations/PostUsersSignInDataResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/PostUsersSignInDataBadRequest | 400 | application/json | -| models/errors/PostUsersSignInDataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index d4122d6b..88daca2a 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -3,42 +3,80 @@ ## Overview -Butler is the task manager of the Plex Media Server Ecosystem. - +The butler is responsible for running periodic tasks. Some tasks run daily, others every few days, and some weekly. These includes database maintenance, metadata updating, thumbnail generation, media analysis, and other tasks. ### Available Operations -* [getButlerTasks](#getbutlertasks) - Get Butler tasks -* [startAllTasks](#startalltasks) - Start all Butler tasks -* [stopAllTasks](#stopalltasks) - Stop all Butler tasks -* [startTask](#starttask) - Start a single Butler task +* [stopTasks](#stoptasks) - Stop all Butler tasks +* [getTasks](#gettasks) - Get all Butler tasks +* [startTasks](#starttasks) - Start all Butler tasks * [stopTask](#stoptask) - Stop a single Butler task +* [startTask](#starttask) - Start a single Butler task -## getButlerTasks +## stopTasks -Returns a list of butler tasks +This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetButlerTasksBadRequest; -import dev.plexapi.sdk.models.errors.GetButlerTasksUnauthorized; -import dev.plexapi.sdk.models.operations.GetButlerTasksResponse; +import dev.plexapi.sdk.models.operations.StopTasksResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetButlerTasksBadRequest, GetButlerTasksUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetButlerTasksResponse res = sdk.butler().getButlerTasks() + StopTasksResponse res = sdk.butler().stopTasks() + .call(); + + // handle response + } +} +``` + +### Response + +**[StopTasksResponse](../../models/operations/StopTasksResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getTasks + +Get the list of butler tasks and their scheduling + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetTasksResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetTasksResponse res = sdk.butler().getTasks() .call(); if (res.object().isPresent()) { @@ -50,46 +88,43 @@ public class Application { ### Response -**[GetButlerTasksResponse](../../models/operations/GetButlerTasksResponse.md)** +**[GetTasksResponse](../../models/operations/GetTasksResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/GetButlerTasksBadRequest | 400 | application/json | -| models/errors/GetButlerTasksUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | -## startAllTasks +## startTasks This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: -1. Any tasks not scheduled to run on the current day will be skipped. -2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. -3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. -4. If we are outside the configured window, the task will start immediately. + + 1. Any tasks not scheduled to run on the current day will be skipped. + 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + 4. If we are outside the configured window, the task will start immediately. ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.StartAllTasksBadRequest; -import dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized; -import dev.plexapi.sdk.models.operations.StartAllTasksResponse; +import dev.plexapi.sdk.models.operations.StartTasksResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws StartAllTasksBadRequest, StartAllTasksUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - StartAllTasksResponse res = sdk.butler().startAllTasks() + StartTasksResponse res = sdk.butler().startTasks() .call(); // handle response @@ -99,146 +134,55 @@ public class Application { ### Response -**[StartAllTasksResponse](../../models/operations/StartAllTasksResponse.md)** +**[StartTasksResponse](../../models/operations/StartTasksResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/StartAllTasksBadRequest | 400 | application/json | -| models/errors/StartAllTasksUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## stopAllTasks - -This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.StopAllTasksBadRequest; -import dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized; -import dev.plexapi.sdk.models.operations.StopAllTasksResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws StopAllTasksBadRequest, StopAllTasksUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - StopAllTasksResponse res = sdk.butler().stopAllTasks() - .call(); - - // handle response - } -} -``` - -### Response - -**[StopAllTasksResponse](../../models/operations/StopAllTasksResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/StopAllTasksBadRequest | 400 | application/json | -| models/errors/StopAllTasksUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## startTask - -This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: -1. Any tasks not scheduled to run on the current day will be skipped. -2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. -3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. -4. If we are outside the configured window, the task will start immediately. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.StartTaskBadRequest; -import dev.plexapi.sdk.models.errors.StartTaskUnauthorized; -import dev.plexapi.sdk.models.operations.StartTaskResponse; -import dev.plexapi.sdk.models.operations.TaskName; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws StartTaskBadRequest, StartTaskUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - StartTaskResponse res = sdk.butler().startTask() - .taskName(TaskName.REFRESH_PERIODIC_METADATA) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `taskName` | [TaskName](../../models/operations/TaskName.md) | :heavy_check_mark: | the name of the task to be started. | - -### Response - -**[StartTaskResponse](../../models/operations/StartTaskResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| models/errors/StartTaskBadRequest | 400 | application/json | -| models/errors/StartTaskUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## stopTask -This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. +This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.StopTaskBadRequest; -import dev.plexapi.sdk.models.errors.StopTaskUnauthorized; -import dev.plexapi.sdk.models.operations.PathParamTaskName; -import dev.plexapi.sdk.models.operations.StopTaskResponse; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws StopTaskBadRequest, StopTaskUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); + StopTaskRequest req = StopTaskRequest.builder() + .task(Task.CLEAN_OLD_BUNDLES) + .build(); + StopTaskResponse res = sdk.butler().stopTask() - .taskName(PathParamTaskName.CLEAN_OLD_CACHE_FILES) + .request(req) .call(); // handle response @@ -248,9 +192,9 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `taskName` | [PathParamTaskName](../../models/operations/PathParamTaskName.md) | :heavy_check_mark: | The name of the task to be started. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `request` | [StopTaskRequest](../../models/operations/StopTaskRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response @@ -258,8 +202,70 @@ public class Application { ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| models/errors/StopTaskBadRequest | 400 | application/json | -| models/errors/StopTaskUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## startTask + +This endpoint will attempt to start a specific Butler task by name. + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StartTaskRequest req = StartTaskRequest.builder() + .task(PathParamTask.REFRESH_LOCAL_MEDIA) + .build(); + + StartTaskResponse res = sdk.butler().startTask() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [StartTaskRequest](../../models/operations/StartTaskRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[StartTaskResponse](../../models/operations/StartTaskResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/collections/README.md b/docs/sdks/collections/README.md new file mode 100644 index 00000000..e3620364 --- /dev/null +++ b/docs/sdks/collections/README.md @@ -0,0 +1,76 @@ +# Collections +(*collections()*) + +## Overview + +API Operations against the Collections + +### Available Operations + +* [createCollection](#createcollection) - Create collection + +## createCollection + +Create a collection in the library + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.CreateCollectionRequest; +import dev.plexapi.sdk.models.operations.CreateCollectionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateCollectionRequest req = CreateCollectionRequest.builder() + .sectionId("") + .build(); + + CreateCollectionResponse res = sdk.collections().createCollection() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [CreateCollectionRequest](../../models/operations/CreateCollectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateCollectionResponse](../../models/operations/CreateCollectionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/content/README.md b/docs/sdks/content/README.md new file mode 100644 index 00000000..dfe05a98 --- /dev/null +++ b/docs/sdks/content/README.md @@ -0,0 +1,895 @@ +# Content +(*content()*) + +## Overview + +The actual content of the media provider + +### Available Operations + +* [getCollectionItems](#getcollectionitems) - Get items in a collection +* [getMetadataItem](#getmetadataitem) - Get a metadata item +* [getAlbums](#getalbums) - Set section albums +* [listContent](#listcontent) - Get items in the section +* [getAllLeaves](#getallleaves) - Set section leaves +* [getArts](#getarts) - Set section artwork +* [getCategories](#getcategories) - Set section categories +* [getCluster](#getcluster) - Set section clusters +* [getSonicPath](#getsonicpath) - Similar tracks to transition from one to another +* [getFolders](#getfolders) - Get all folder locations +* [listMoments](#listmoments) - Set section moments +* [getSonicallySimilar](#getsonicallysimilar) - The nearest audio tracks +* [getCollectionImage](#getcollectionimage) - Get a collection's image + +## getCollectionItems + +Get items in a collection. Note if this collection contains more than 100 items, paging must be used. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetCollectionItemsRequest; +import dev.plexapi.sdk.models.operations.GetCollectionItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCollectionItemsRequest req = GetCollectionItemsRequest.builder() + .collectionId(314585L) + .build(); + + GetCollectionItemsResponse res = sdk.content().getCollectionItems() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [GetCollectionItemsRequest](../../models/operations/GetCollectionItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetCollectionItemsResponse](../../models/operations/GetCollectionItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getMetadataItem + +Get one or more metadata items. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetMetadataItemRequest; +import dev.plexapi.sdk.models.operations.GetMetadataItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetMetadataItemRequest req = GetMetadataItemRequest.builder() + .ids(List.of()) + .asyncCheckFiles(BoolInt.ONE) + .asyncRefreshLocalMediaAgent(BoolInt.ONE) + .asyncRefreshAnalysis(BoolInt.ONE) + .checkFiles(BoolInt.ONE) + .skipRefresh(BoolInt.ONE) + .checkFileAvailability(BoolInt.ONE) + .asyncAugmentMetadata(BoolInt.ONE) + .augmentCount(BoolInt.ONE) + .build(); + + GetMetadataItemResponse res = sdk.content().getMetadataItem() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetMetadataItemRequest](../../models/operations/GetMetadataItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetMetadataItemResponse](../../models/operations/GetMetadataItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getAlbums + +Get all albums in a music section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetAlbumsRequest; +import dev.plexapi.sdk.models.operations.GetAlbumsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAlbumsRequest req = GetAlbumsRequest.builder() + .sectionId(817133L) + .build(); + + GetAlbumsResponse res = sdk.content().getAlbums() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [GetAlbumsRequest](../../models/operations/GetAlbumsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetAlbumsResponse](../../models/operations/GetAlbumsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listContent + +Get the items in a section, potentially filtering them + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListContentRequest; +import dev.plexapi.sdk.models.operations.ListContentResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListContentRequest req = ListContentRequest.builder() + .sectionId("") + .build(); + + ListContentResponse res = sdk.content().listContent() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [ListContentRequest](../../models/operations/ListContentRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListContentResponse](../../models/operations/ListContentResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getAllLeaves + +Get all leaves in a section (such as episodes in a show section) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetAllLeavesRequest; +import dev.plexapi.sdk.models.operations.GetAllLeavesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAllLeavesRequest req = GetAllLeavesRequest.builder() + .sectionId(633197L) + .build(); + + GetAllLeavesResponse res = sdk.content().getAllLeaves() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [GetAllLeavesRequest](../../models/operations/GetAllLeavesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetAllLeavesResponse](../../models/operations/GetAllLeavesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getArts + +Get artwork for a library section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetArtsRequest; +import dev.plexapi.sdk.models.operations.GetArtsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetArtsRequest req = GetArtsRequest.builder() + .sectionId(859200L) + .build(); + + GetArtsResponse res = sdk.content().getArts() + .request(req) + .call(); + + if (res.mediaContainerWithArtwork().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `request` | [GetArtsRequest](../../models/operations/GetArtsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetArtsResponse](../../models/operations/GetArtsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getCategories + +Get categories in a library section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetCategoriesRequest; +import dev.plexapi.sdk.models.operations.GetCategoriesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCategoriesRequest req = GetCategoriesRequest.builder() + .sectionId(21841L) + .build(); + + GetCategoriesResponse res = sdk.content().getCategories() + .request(req) + .call(); + + if (res.mediaContainerWithArtwork().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [GetCategoriesRequest](../../models/operations/GetCategoriesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetCategoriesResponse](../../models/operations/GetCategoriesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getCluster + +Get clusters in a library section (typically for photos) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetClusterRequest; +import dev.plexapi.sdk.models.operations.GetClusterResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetClusterRequest req = GetClusterRequest.builder() + .sectionId(138560L) + .build(); + + GetClusterResponse res = sdk.content().getCluster() + .request(req) + .call(); + + if (res.mediaContainerWithArtwork().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [GetClusterRequest](../../models/operations/GetClusterRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetClusterResponse](../../models/operations/GetClusterResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSonicPath + +Get a list of audio tracks starting at one and ending at another which are similar across the path + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSonicPathRequest; +import dev.plexapi.sdk.models.operations.GetSonicPathResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSonicPathRequest req = GetSonicPathRequest.builder() + .sectionId(914549L) + .startID(629990L) + .endID(687740L) + .build(); + + GetSonicPathResponse res = sdk.content().getSonicPath() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [GetSonicPathRequest](../../models/operations/GetSonicPathRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSonicPathResponse](../../models/operations/GetSonicPathResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getFolders + +Get all folder locations of the media in a section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetFoldersRequest; +import dev.plexapi.sdk.models.operations.GetFoldersResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetFoldersRequest req = GetFoldersRequest.builder() + .sectionId(892532L) + .build(); + + GetFoldersResponse res = sdk.content().getFolders() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [GetFoldersRequest](../../models/operations/GetFoldersRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetFoldersResponse](../../models/operations/GetFoldersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listMoments + +Get moments in a library section (typically for photos) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListMomentsRequest; +import dev.plexapi.sdk.models.operations.ListMomentsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListMomentsRequest req = ListMomentsRequest.builder() + .sectionId(403239L) + .build(); + + ListMomentsResponse res = sdk.content().listMoments() + .request(req) + .call(); + + if (res.mediaContainerWithArtwork().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [ListMomentsRequest](../../models/operations/ListMomentsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListMomentsResponse](../../models/operations/ListMomentsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSonicallySimilar + +Get the nearest audio tracks to a particular analysis + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSonicallySimilarRequest; +import dev.plexapi.sdk.models.operations.GetSonicallySimilarResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSonicallySimilarRequest req = GetSonicallySimilarRequest.builder() + .sectionId(525956L) + .values(List.of()) + .build(); + + GetSonicallySimilarResponse res = sdk.content().getSonicallySimilar() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [GetSonicallySimilarRequest](../../models/operations/GetSonicallySimilarRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSonicallySimilarResponse](../../models/operations/GetSonicallySimilarResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getCollectionImage + +Get an image for the collection based on the items within + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetCollectionImageRequest; +import dev.plexapi.sdk.models.operations.GetCollectionImageResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCollectionImageRequest req = GetCollectionImageRequest.builder() + .collectionId(474227L) + .updatedAt(759379L) + .build(); + + GetCollectionImageResponse res = sdk.content().getCollectionImage() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [GetCollectionImageRequest](../../models/operations/GetCollectionImageRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetCollectionImageResponse](../../models/operations/GetCollectionImageResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/devices/README.md b/docs/sdks/devices/README.md new file mode 100644 index 00000000..57989738 --- /dev/null +++ b/docs/sdks/devices/README.md @@ -0,0 +1,885 @@ +# Devices +(*devices()*) + +## Overview + +Media grabbers provide ways for media to be obtained for a given protocol. The simplest ones are `stream` and `download`. More complex grabbers can have associated devices + +Network tuners can present themselves on the network using the Simple Service Discovery Protocol and Plex Media Server will discover them. The following XML is an example of the data returned from SSDP. The `deviceType`, `serviceType`, and `serviceId` values must remain as they are in the example in order for PMS to properly discover the device. Other less-obvious fields are described in the parameters section below. + +Example SSDP output +``` + + + 1 + 0 + + + urn:plex-tv:device:Media:1 + Turing Hopper 3000 + Plex, Inc. + https://plex.tv/ + Turing Hopper 3000 Media Grabber + Plex Media Grabber + 1 + https://plex.tv + uuid:42fde8e4-93b6-41e5-8a63-12d848655811 + + + http://10.0.0.5:8088 + urn:plex-tv:service:MediaGrabber:1 + urn:plex-tv:serviceId:MediaGrabber + + + + +``` + + - UDN: (string) A UUID for the device. This should be unique across models of a device at minimum. + - URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted. + + +### Available Operations + +* [getAvailableGrabbers](#getavailablegrabbers) - Get available grabbers +* [listDevices](#listdevices) - Get all devices +* [addDevice](#adddevice) - Add a device +* [discoverDevices](#discoverdevices) - Tell grabbers to discover devices +* [removeDevice](#removedevice) - Remove a device +* [getDeviceDetails](#getdevicedetails) - Get device details +* [modifyDevice](#modifydevice) - Enable or disable a device +* [setChannelmap](#setchannelmap) - Set a device's channel mapping +* [getDevicesChannels](#getdeviceschannels) - Get a device's channels +* [setDevicePreferences](#setdevicepreferences) - Set device preferences +* [stopScan](#stopscan) - Tell a device to stop scanning for channels +* [scan](#scan) - Tell a device to scan for channels +* [getThumb](#getthumb) - Get device thumb + +## getAvailableGrabbers + +Get available grabbers visible to the server + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersRequest; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAvailableGrabbersRequest req = GetAvailableGrabbersRequest.builder() + .protocol("livetv") + .build(); + + GetAvailableGrabbersResponse res = sdk.devices().getAvailableGrabbers() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [GetAvailableGrabbersRequest](../../models/operations/GetAvailableGrabbersRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetAvailableGrabbersResponse](../../models/operations/GetAvailableGrabbersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listDevices + +Get the list of all devices present + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListDevicesResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListDevicesResponse res = sdk.devices().listDevices() + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[ListDevicesResponse](../../models/operations/ListDevicesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## addDevice + +This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AddDeviceRequest; +import dev.plexapi.sdk.models.operations.AddDeviceResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddDeviceRequest req = AddDeviceRequest.builder() + .uri("http://10.0.0.5") + .build(); + + AddDeviceResponse res = sdk.devices().addDevice() + .request(req) + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [AddDeviceRequest](../../models/operations/AddDeviceRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddDeviceResponse](../../models/operations/AddDeviceResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## discoverDevices + +Tell grabbers to discover devices + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DiscoverDevicesResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DiscoverDevicesResponse res = sdk.devices().discoverDevices() + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[DiscoverDevicesResponse](../../models/operations/DiscoverDevicesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## removeDevice + +Remove a devices by its id along with its channel mappings + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.RemoveDeviceRequest; +import dev.plexapi.sdk.models.operations.RemoveDeviceResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RemoveDeviceRequest req = RemoveDeviceRequest.builder() + .deviceId(685908L) + .build(); + + RemoveDeviceResponse res = sdk.devices().removeDevice() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [RemoveDeviceRequest](../../models/operations/RemoveDeviceRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[RemoveDeviceResponse](../../models/operations/RemoveDeviceResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getDeviceDetails + +Get a device's details by its id + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetDeviceDetailsRequest; +import dev.plexapi.sdk.models.operations.GetDeviceDetailsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDeviceDetailsRequest req = GetDeviceDetailsRequest.builder() + .deviceId(170949L) + .build(); + + GetDeviceDetailsResponse res = sdk.devices().getDeviceDetails() + .request(req) + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [GetDeviceDetailsRequest](../../models/operations/GetDeviceDetailsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetDeviceDetailsResponse](../../models/operations/GetDeviceDetailsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## modifyDevice + +Enable or disable a device by its id + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ModifyDeviceRequest; +import dev.plexapi.sdk.models.operations.ModifyDeviceResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ModifyDeviceRequest req = ModifyDeviceRequest.builder() + .deviceId(879135L) + .enabled(BoolInt.ONE) + .build(); + + ModifyDeviceResponse res = sdk.devices().modifyDevice() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [ModifyDeviceRequest](../../models/operations/ModifyDeviceRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ModifyDeviceResponse](../../models/operations/ModifyDeviceResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## setChannelmap + +Set a device's channel mapping + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetChannelmapRequest req = SetChannelmapRequest.builder() + .deviceId(937661L) + .channelMapping(ChannelMapping.builder() + .build()) + .channelMappingByKey(ChannelMappingByKey.builder() + .build()) + .channelsEnabled(List.of( + "4", + "6", + ".", + "1", + ",", + "4", + "4", + ".", + "1", + ",", + "4", + "5", + ".", + "1")) + .build(); + + SetChannelmapResponse res = sdk.devices().setChannelmap() + .request(req) + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [SetChannelmapRequest](../../models/operations/SetChannelmapRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SetChannelmapResponse](../../models/operations/SetChannelmapResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getDevicesChannels + +Get a device's channels by its id + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsRequest; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDevicesChannelsRequest req = GetDevicesChannelsRequest.builder() + .deviceId(517209L) + .build(); + + GetDevicesChannelsResponse res = sdk.devices().getDevicesChannels() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [GetDevicesChannelsRequest](../../models/operations/GetDevicesChannelsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetDevicesChannelsResponse](../../models/operations/GetDevicesChannelsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## setDevicePreferences + +Set device preferences by its id + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.SetDevicePreferencesRequest; +import dev.plexapi.sdk.models.operations.SetDevicePreferencesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetDevicePreferencesRequest req = SetDevicePreferencesRequest.builder() + .deviceId(420973L) + .build(); + + SetDevicePreferencesResponse res = sdk.devices().setDevicePreferences() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [SetDevicePreferencesRequest](../../models/operations/SetDevicePreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SetDevicePreferencesResponse](../../models/operations/SetDevicePreferencesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## stopScan + +Tell a device to stop scanning for channels + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.StopScanRequest; +import dev.plexapi.sdk.models.operations.StopScanResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StopScanRequest req = StopScanRequest.builder() + .deviceId(576494L) + .build(); + + StopScanResponse res = sdk.devices().stopScan() + .request(req) + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `request` | [StopScanRequest](../../models/operations/StopScanRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[StopScanResponse](../../models/operations/StopScanResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## scan + +Tell a device to scan for channels + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ScanRequest; +import dev.plexapi.sdk.models.operations.ScanResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ScanRequest req = ScanRequest.builder() + .deviceId(57391L) + .source("Cable") + .build(); + + ScanResponse res = sdk.devices().scan() + .request(req) + .call(); + + if (res.mediaContainerWithDevice().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `request` | [ScanRequest](../../models/operations/ScanRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ScanResponse](../../models/operations/ScanResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getThumb + +Get a device's thumb for display to the user + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetThumbRequest; +import dev.plexapi.sdk.models.operations.GetThumbResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetThumbRequest req = GetThumbRequest.builder() + .deviceId(960617L) + .versionPathParameter(1025L) + .build(); + + GetThumbResponse res = sdk.devices().getThumb() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `request` | [GetThumbRequest](../../models/operations/GetThumbRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetThumbResponse](../../models/operations/GetThumbResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/downloadqueue/README.md b/docs/sdks/downloadqueue/README.md new file mode 100644 index 00000000..9250960f --- /dev/null +++ b/docs/sdks/downloadqueue/README.md @@ -0,0 +1,652 @@ +# DownloadQueue +(*downloadQueue()*) + +## Overview + +API Operations against the Download Queue + +### Available Operations + +* [createDownloadQueue](#createdownloadqueue) - Create download queue +* [getDownloadQueue](#getdownloadqueue) - Get a download queue +* [addDownloadQueueItems](#adddownloadqueueitems) - Add to download queue +* [listDownloadQueueItems](#listdownloadqueueitems) - Get download queue items +* [getItemDecision](#getitemdecision) - Grab download queue item decision +* [getDownloadQueueMedia](#getdownloadqueuemedia) - Grab download queue media +* [removeDownloadQueueItems](#removedownloadqueueitems) - Delete download queue items +* [getDownloadQueueItems](#getdownloadqueueitems) - Get download queue items +* [restartProcessingDownloadQueueItems](#restartprocessingdownloadqueueitems) - Restart processing of items from the decision + +## createDownloadQueue + +Available: 0.2.0 + +Creates a download queue for this client if one doesn't exist, or returns the existing queue for this client and user. + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.CreateDownloadQueueResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateDownloadQueueResponse res = sdk.downloadQueue().createDownloadQueue() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[CreateDownloadQueueResponse](../../models/operations/CreateDownloadQueueResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getDownloadQueue + +Available: 0.2.0 + +Get a download queue by its id + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetDownloadQueueRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDownloadQueueRequest req = GetDownloadQueueRequest.builder() + .queueId(922802L) + .build(); + + GetDownloadQueueResponse res = sdk.downloadQueue().getDownloadQueue() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [GetDownloadQueueRequest](../../models/operations/GetDownloadQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetDownloadQueueResponse](../../models/operations/GetDownloadQueueResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## addDownloadQueueItems + +Available: 0.2.0 + +Add items to the download queue + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.shared.*; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddDownloadQueueItemsRequest req = AddDownloadQueueItemsRequest.builder() + .queueId(984925L) + .keys(List.of( + "/library/metadata/3", + "/library/metadata/6")) + .advancedSubtitles(AdvancedSubtitles.BURN) + .audioBoost(50L) + .audioChannelCount(5L) + .autoAdjustQuality(BoolInt.ONE) + .autoAdjustSubtitle(BoolInt.ONE) + .directPlay(BoolInt.ONE) + .directStream(BoolInt.ONE) + .directStreamAudio(BoolInt.ONE) + .disableResolutionRotation(BoolInt.ONE) + .hasMDE(BoolInt.ONE) + .location(Location.WAN) + .mediaBufferSize(102400L) + .mediaIndex(0L) + .musicBitrate(5000L) + .offset(90.5) + .partIndex(0L) + .path("/library/metadata/151671") + .peakBitrate(12000L) + .photoResolution("1080x1080") + .protocol(Protocol.DASH) + .secondsPerSegment(5L) + .subtitleSize(50L) + .videoBitrate(12000L) + .videoQuality(50L) + .videoResolution("1080x1080") + .build(); + + AddDownloadQueueItemsResponse res = sdk.downloadQueue().addDownloadQueueItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [AddDownloadQueueItemsRequest](../../models/operations/AddDownloadQueueItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddDownloadQueueItemsResponse](../../models/operations/AddDownloadQueueItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listDownloadQueueItems + +Available: 0.2.0 + +Get items from a download queue + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListDownloadQueueItemsRequest req = ListDownloadQueueItemsRequest.builder() + .queueId(524138L) + .build(); + + ListDownloadQueueItemsResponse res = sdk.downloadQueue().listDownloadQueueItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `request` | [ListDownloadQueueItemsRequest](../../models/operations/ListDownloadQueueItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListDownloadQueueItemsResponse](../../models/operations/ListDownloadQueueItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getItemDecision + +Available: 0.2.0 + +Grab the decision for a download queue item + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetItemDecisionRequest; +import dev.plexapi.sdk.models.operations.GetItemDecisionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetItemDecisionRequest req = GetItemDecisionRequest.builder() + .queueId(231605L) + .itemId(32L) + .build(); + + GetItemDecisionResponse res = sdk.downloadQueue().getItemDecision() + .request(req) + .call(); + + if (res.mediaContainerWithDecision().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetItemDecisionRequest](../../models/operations/GetItemDecisionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetItemDecisionResponse](../../models/operations/GetItemDecisionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getDownloadQueueMedia + +Available: 0.2.0 + +Grab the media for a download queue item + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDownloadQueueMediaRequest req = GetDownloadQueueMediaRequest.builder() + .queueId(663184L) + .itemId(32L) + .build(); + + GetDownloadQueueMediaResponse res = sdk.downloadQueue().getDownloadQueueMedia() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [GetDownloadQueueMediaRequest](../../models/operations/GetDownloadQueueMediaRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetDownloadQueueMediaResponse](../../models/operations/GetDownloadQueueMediaResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## removeDownloadQueueItems + +delete items from a download queue + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RemoveDownloadQueueItemsRequest req = RemoveDownloadQueueItemsRequest.builder() + .queueId(946275L) + .itemId(List.of( + 32L, + 345L, + 23L)) + .build(); + + RemoveDownloadQueueItemsResponse res = sdk.downloadQueue().removeDownloadQueueItems() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `request` | [RemoveDownloadQueueItemsRequest](../../models/operations/RemoveDownloadQueueItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[RemoveDownloadQueueItemsResponse](../../models/operations/RemoveDownloadQueueItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getDownloadQueueItems + +Available: 0.2.0 + +Get items from a download queue + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDownloadQueueItemsRequest req = GetDownloadQueueItemsRequest.builder() + .queueId(809886L) + .itemId(List.of( + 32L, + 345L, + 23L)) + .build(); + + GetDownloadQueueItemsResponse res = sdk.downloadQueue().getDownloadQueueItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [GetDownloadQueueItemsRequest](../../models/operations/GetDownloadQueueItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetDownloadQueueItemsResponse](../../models/operations/GetDownloadQueueItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## restartProcessingDownloadQueueItems + +Available: 0.2.0 + +Reprocess download queue items with previous decision parameters + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RestartProcessingDownloadQueueItemsRequest req = RestartProcessingDownloadQueueItemsRequest.builder() + .queueId(713001L) + .itemId(List.of( + 32L, + 345L, + 23L)) + .build(); + + RestartProcessingDownloadQueueItemsResponse res = sdk.downloadQueue().restartProcessingDownloadQueueItems() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `request` | [RestartProcessingDownloadQueueItemsRequest](../../models/operations/RestartProcessingDownloadQueueItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[RestartProcessingDownloadQueueItemsResponse](../../models/operations/RestartProcessingDownloadQueueItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/dvrs/README.md b/docs/sdks/dvrs/README.md new file mode 100644 index 00000000..4521389a --- /dev/null +++ b/docs/sdks/dvrs/README.md @@ -0,0 +1,845 @@ +# DVRs +(*dvRs()*) + +## Overview + +The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself + + +### Available Operations + +* [listDVRs](#listdvrs) - Get DVRs +* [createDVR](#createdvr) - Create a DVR +* [deleteDVR](#deletedvr) - Delete a single DVR +* [getDVR](#getdvr) - Get a single DVR +* [deleteLineup](#deletelineup) - Delete a DVR Lineup +* [addLineup](#addlineup) - Add a DVR Lineup +* [setDVRPreferences](#setdvrpreferences) - Set DVR preferences +* [stopDVRReload](#stopdvrreload) - Tell a DVR to stop reloading program guide +* [reloadGuide](#reloadguide) - Tell a DVR to reload program guide +* [tuneChannel](#tunechannel) - Tune a channel on a DVR +* [removeDeviceFromDVR](#removedevicefromdvr) - Remove a device from an existing DVR +* [addDeviceToDVR](#adddevicetodvr) - Add a device to an existing DVR + +## listDVRs + +Get the list of all available DVRs + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListDVRsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListDVRsResponse res = sdk.dvRs().listDVRs() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[ListDVRsResponse](../../models/operations/ListDVRsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## createDVR + +Creation of a DVR, after creation of a devcie and a lineup is selected + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.CreateDVRRequest; +import dev.plexapi.sdk.models.operations.CreateDVRResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateDVRRequest req = CreateDVRRequest.builder() + .lineup("lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT") + .deviceQueryParameter(List.of( + "d", + "e", + "v", + "i", + "c", + "e", + "[", + "]", + "=", + "d", + "e", + "v", + "i", + "c", + "e", + ":", + "/", + "/", + "t", + "v", + ".", + "p", + "l", + "e", + "x", + ".", + "g", + "r", + "a", + "b", + "b", + "e", + "r", + "s", + ".", + "h", + "d", + "h", + "o", + "m", + "e", + "r", + "u", + "n", + "/", + "1", + "0", + "5", + "3", + "C", + "0", + "C", + "A")) + .language("eng") + .build(); + + CreateDVRResponse res = sdk.dvRs().createDVR() + .request(req) + .call(); + + if (res.dvrRequestHandlerSlashGetResponses200().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [CreateDVRRequest](../../models/operations/CreateDVRRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateDVRResponse](../../models/operations/CreateDVRResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteDVR + +Delete a single DVR by its id (key) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteDVRRequest; +import dev.plexapi.sdk.models.operations.DeleteDVRResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteDVRRequest req = DeleteDVRRequest.builder() + .dvrId(855088L) + .build(); + + DeleteDVRResponse res = sdk.dvRs().deleteDVR() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [DeleteDVRRequest](../../models/operations/DeleteDVRRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteDVRResponse](../../models/operations/DeleteDVRResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getDVR + +Get a single DVR by its id (key) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetDVRRequest; +import dev.plexapi.sdk.models.operations.GetDVRResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetDVRRequest req = GetDVRRequest.builder() + .dvrId(973518L) + .build(); + + GetDVRResponse res = sdk.dvRs().getDVR() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `request` | [GetDVRRequest](../../models/operations/GetDVRRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetDVRResponse](../../models/operations/GetDVRResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteLineup + +Deletes a DVR device's lineup. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteLineupRequest; +import dev.plexapi.sdk.models.operations.DeleteLineupResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteLineupRequest req = DeleteLineupRequest.builder() + .dvrId(454470L) + .lineup("") + .build(); + + DeleteLineupResponse res = sdk.dvRs().deleteLineup() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [DeleteLineupRequest](../../models/operations/DeleteLineupRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteLineupResponse](../../models/operations/DeleteLineupResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## addLineup + +Add a lineup to a DVR device's set of lineups. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AddLineupRequest; +import dev.plexapi.sdk.models.operations.AddLineupResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddLineupRequest req = AddLineupRequest.builder() + .dvrId(945235L) + .lineup("") + .build(); + + AddLineupResponse res = sdk.dvRs().addLineup() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [AddLineupRequest](../../models/operations/AddLineupRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddLineupResponse](../../models/operations/AddLineupResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## setDVRPreferences + +Set DVR preferences by name avd value + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetDVRPreferencesRequest req = SetDVRPreferencesRequest.builder() + .dvrId(116357L) + .build(); + + SetDVRPreferencesResponse res = sdk.dvRs().setDVRPreferences() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [SetDVRPreferencesRequest](../../models/operations/SetDVRPreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SetDVRPreferencesResponse](../../models/operations/SetDVRPreferencesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## stopDVRReload + +Tell a DVR to stop reloading program guide + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.StopDVRReloadRequest; +import dev.plexapi.sdk.models.operations.StopDVRReloadResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StopDVRReloadRequest req = StopDVRReloadRequest.builder() + .dvrId(348053L) + .build(); + + StopDVRReloadResponse res = sdk.dvRs().stopDVRReload() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [StopDVRReloadRequest](../../models/operations/StopDVRReloadRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[StopDVRReloadResponse](../../models/operations/StopDVRReloadResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## reloadGuide + +Tell a DVR to reload program guide + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ReloadGuideRequest; +import dev.plexapi.sdk.models.operations.ReloadGuideResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ReloadGuideRequest req = ReloadGuideRequest.builder() + .dvrId(140753L) + .build(); + + ReloadGuideResponse res = sdk.dvRs().reloadGuide() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [ReloadGuideRequest](../../models/operations/ReloadGuideRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ReloadGuideResponse](../../models/operations/ReloadGuideResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## tuneChannel + +Tune a channel on a DVR to the provided channel + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.TuneChannelRequest; +import dev.plexapi.sdk.models.operations.TuneChannelResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + TuneChannelRequest req = TuneChannelRequest.builder() + .dvrId(834281L) + .channel("2.1") + .build(); + + TuneChannelResponse res = sdk.dvRs().tuneChannel() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [TuneChannelRequest](../../models/operations/TuneChannelRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[TuneChannelResponse](../../models/operations/TuneChannelResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## removeDeviceFromDVR + +Remove a device from an existing DVR + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRRequest; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RemoveDeviceFromDVRRequest req = RemoveDeviceFromDVRRequest.builder() + .dvrId(945416L) + .deviceId(260761L) + .build(); + + RemoveDeviceFromDVRResponse res = sdk.dvRs().removeDeviceFromDVR() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [RemoveDeviceFromDVRRequest](../../models/operations/RemoveDeviceFromDVRRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[RemoveDeviceFromDVRResponse](../../models/operations/RemoveDeviceFromDVRResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## addDeviceToDVR + +Add a device to an existing DVR + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AddDeviceToDVRRequest; +import dev.plexapi.sdk.models.operations.AddDeviceToDVRResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddDeviceToDVRRequest req = AddDeviceToDVRRequest.builder() + .dvrId(334755L) + .deviceId(852930L) + .build(); + + AddDeviceToDVRResponse res = sdk.dvRs().addDeviceToDVR() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [AddDeviceToDVRRequest](../../models/operations/AddDeviceToDVRRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddDeviceToDVRResponse](../../models/operations/AddDeviceToDVRResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/epg/README.md b/docs/sdks/epg/README.md new file mode 100644 index 00000000..55deaac4 --- /dev/null +++ b/docs/sdks/epg/README.md @@ -0,0 +1,572 @@ +# Epg +(*epg()*) + +## Overview + +The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when + + +### Available Operations + +* [computeChannelMap](#computechannelmap) - Compute the best channel map +* [getChannels](#getchannels) - Get channels for a lineup +* [getCountries](#getcountries) - Get all countries +* [getAllLanguages](#getalllanguages) - Get all languages +* [getLineup](#getlineup) - Compute the best lineup +* [getLineupChannels](#getlineupchannels) - Get the channels for mulitple lineups +* [getCountriesLineups](#getcountrieslineups) - Get lineups for a country via postal code +* [getCountryRegions](#getcountryregions) - Get regions for a country +* [listLineups](#listlineups) - Get lineups for a region + +## computeChannelMap + +Compute the best channel map, given device and lineup + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ComputeChannelMapRequest; +import dev.plexapi.sdk.models.operations.ComputeChannelMapResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ComputeChannelMapRequest req = ComputeChannelMapRequest.builder() + .deviceQueryParameter("") + .lineup("") + .build(); + + ComputeChannelMapResponse res = sdk.epg().computeChannelMap() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [ComputeChannelMapRequest](../../models/operations/ComputeChannelMapRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ComputeChannelMapResponse](../../models/operations/ComputeChannelMapResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getChannels + +Get channels for a lineup within an EPG provider + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetChannelsRequest; +import dev.plexapi.sdk.models.operations.GetChannelsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetChannelsRequest req = GetChannelsRequest.builder() + .lineup("") + .build(); + + GetChannelsResponse res = sdk.epg().getChannels() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [GetChannelsRequest](../../models/operations/GetChannelsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetChannelsResponse](../../models/operations/GetChannelsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getCountries + +This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetCountriesResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCountriesResponse res = sdk.epg().getCountries() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[GetCountriesResponse](../../models/operations/GetCountriesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getAllLanguages + +Returns a list of all possible languages for EPG data. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetAllLanguagesResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAllLanguagesResponse res = sdk.epg().getAllLanguages() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[GetAllLanguagesResponse](../../models/operations/GetAllLanguagesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getLineup + +Compute the best lineup, given lineup group and device + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetLineupRequest; +import dev.plexapi.sdk.models.operations.GetLineupResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetLineupRequest req = GetLineupRequest.builder() + .deviceQueryParameter("") + .lineupGroup("") + .build(); + + GetLineupResponse res = sdk.epg().getLineup() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [GetLineupRequest](../../models/operations/GetLineupRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetLineupResponse](../../models/operations/GetLineupResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getLineupChannels + +Get the channels across multiple lineups + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetLineupChannelsRequest; +import dev.plexapi.sdk.models.operations.GetLineupChannelsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetLineupChannelsRequest req = GetLineupChannelsRequest.builder() + .lineup(List.of( + "", + "")) + .build(); + + GetLineupChannelsResponse res = sdk.epg().getLineupChannels() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [GetLineupChannelsRequest](../../models/operations/GetLineupChannelsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetLineupChannelsResponse](../../models/operations/GetLineupChannelsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getCountriesLineups + +Returns a list of lineups for a given country, EPG provider and postal code + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetCountriesLineupsRequest; +import dev.plexapi.sdk.models.operations.GetCountriesLineupsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCountriesLineupsRequest req = GetCountriesLineupsRequest.builder() + .country("Malawi") + .epgId("") + .build(); + + GetCountriesLineupsResponse res = sdk.epg().getCountriesLineups() + .request(req) + .call(); + + if (res.mediaContainerWithLineup().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [GetCountriesLineupsRequest](../../models/operations/GetCountriesLineupsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetCountriesLineupsResponse](../../models/operations/GetCountriesLineupsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getCountryRegions + +Get regions for a country within an EPG provider + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetCountryRegionsRequest; +import dev.plexapi.sdk.models.operations.GetCountryRegionsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCountryRegionsRequest req = GetCountryRegionsRequest.builder() + .country("Morocco") + .epgId("") + .build(); + + GetCountryRegionsResponse res = sdk.epg().getCountryRegions() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [GetCountryRegionsRequest](../../models/operations/GetCountryRegionsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetCountryRegionsResponse](../../models/operations/GetCountryRegionsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listLineups + +Get lineups for a region within an EPG provider + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListLineupsRequest; +import dev.plexapi.sdk.models.operations.ListLineupsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListLineupsRequest req = ListLineupsRequest.builder() + .country("Vanuatu") + .epgId("") + .region("") + .build(); + + ListLineupsResponse res = sdk.epg().listLineups() + .request(req) + .call(); + + if (res.mediaContainerWithLineup().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [ListLineupsRequest](../../models/operations/ListLineupsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListLineupsResponse](../../models/operations/ListLineupsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md new file mode 100644 index 00000000..7f851e1d --- /dev/null +++ b/docs/sdks/events/README.md @@ -0,0 +1,144 @@ +# Events +(*events()*) + +## Overview + +The server can notify clients in real-time of a wide range of events, from library scanning, to preferences being modified, to changes to media, and many other things. This is also the mechanism by which activity progress is reported. + +Two protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket. + + +### Available Operations + +* [getNotifications](#getnotifications) - Connect to Eventsource +* [connectWebSocket](#connectwebsocket) - Connect to WebSocket + +## getNotifications + +Connect to the event source to get a stream of events + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetNotificationsRequest; +import dev.plexapi.sdk.models.operations.GetNotificationsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetNotificationsRequest req = GetNotificationsRequest.builder() + .build(); + + GetNotificationsResponse res = sdk.events().getNotifications() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [GetNotificationsRequest](../../models/operations/GetNotificationsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetNotificationsResponse](../../models/operations/GetNotificationsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## connectWebSocket + +Connect to the web socket to get a stream of events + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ConnectWebSocketRequest; +import dev.plexapi.sdk.models.operations.ConnectWebSocketResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ConnectWebSocketRequest req = ConnectWebSocketRequest.builder() + .build(); + + ConnectWebSocketResponse res = sdk.events().connectWebSocket() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [ConnectWebSocketRequest](../../models/operations/ConnectWebSocketRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ConnectWebSocketResponse](../../models/operations/ConnectWebSocketResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/general/README.md b/docs/sdks/general/README.md new file mode 100644 index 00000000..0dd2c433 --- /dev/null +++ b/docs/sdks/general/README.md @@ -0,0 +1,254 @@ +# General +(*general()*) + +## Overview + +General endpoints for basic PMS operation not specific to any media provider + +### Available Operations + +* [getServerInfo](#getserverinfo) - Get PMS info +* [getIdentity](#getidentity) - Get PMS identity +* [getSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information +* [getTransientToken](#gettransienttoken) - Get Transient Tokens + +## getServerInfo + +Information about this PMS setup and configuration + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetServerInfoRequest; +import dev.plexapi.sdk.models.operations.GetServerInfoResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetServerInfoRequest req = GetServerInfoRequest.builder() + .build(); + + GetServerInfoResponse res = sdk.general().getServerInfo() + .request(req) + .call(); + + if (res.mediaContainerWithDirectory().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [GetServerInfoRequest](../../models/operations/GetServerInfoRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetServerInfoResponse](../../models/operations/GetServerInfoResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getIdentity + +Get details about this PMS's identity + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetIdentityResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .build(); + + GetIdentityResponse res = sdk.general().getIdentity() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[GetIdentityResponse](../../models/operations/GetIdentityResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSourceConnectionInformation + +If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequest; +import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSourceConnectionInformationRequest req = GetSourceConnectionInformationRequest.builder() + .source("server://client-identifier") + .refresh(BoolInt.ONE) + .build(); + + GetSourceConnectionInformationResponse res = sdk.general().getSourceConnectionInformation() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `request` | [GetSourceConnectionInformationRequest](../../models/operations/GetSourceConnectionInformationRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSourceConnectionInformationResponse](../../models/operations/GetSourceConnectionInformationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getTransientToken + +This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. +Note: This endpoint responds to all HTTP verbs but POST in preferred + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetTransientTokenRequest req = GetTransientTokenRequest.builder() + .type(QueryParamType.DELEGATION) + .scope(Scope.ALL) + .build(); + + GetTransientTokenResponse res = sdk.general().getTransientToken() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [GetTransientTokenRequest](../../models/operations/GetTransientTokenRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetTransientTokenResponse](../../models/operations/GetTransientTokenResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index def847d5..d41d4ce3 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -3,81 +3,40 @@ ## Overview -Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. - +The hubs within a media provider ### Available Operations -* [getGlobalHubs](#getglobalhubs) - Get Global Hubs -* [getRecentlyAdded](#getrecentlyadded) - Get Recently Added -* [getLibraryHubs](#getlibraryhubs) - Get library specific hubs +* [getAllHubs](#getallhubs) - Get global hubs +* [getContinueWatching](#getcontinuewatching) - Get the continue watching hub +* [getHubItems](#gethubitems) - Get a hub's items +* [getPromotedHubs](#getpromotedhubs) - Get the hubs which are promoted +* [getMetadataHubs](#getmetadatahubs) - Get hubs for section by metadata item +* [getPostplayHubs](#getpostplayhubs) - Get postplay hubs +* [getRelatedHubs](#getrelatedhubs) - Get related hubs +* [getSectionHubs](#getsectionhubs) - Get section hubs +* [resetSectionDefaults](#resetsectiondefaults) - Reset hubs to defaults +* [listHubs](#listhubs) - Get hubs +* [createCustomHub](#createcustomhub) - Create a custom hub +* [moveHub](#movehub) - Move Hub +* [deleteCustomHub](#deletecustomhub) - Delete a custom hub +* [updateHubVisibility](#updatehubvisibility) - Change hub visibility -## getGlobalHubs +## getAllHubs -Get Global Hubs filtered by the parameters provided. +Get the global hubs in this PMS ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest; -import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized; -import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetGlobalHubsBadRequest, GetGlobalHubsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `count` | *Optional\* | :heavy_minus_sign: | The number of items to return with each hub. | -| `onlyTransient` | [Optional\](../../models/operations/OnlyTransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | - -### Response - -**[GetGlobalHubsResponse](../../models/operations/GetGlobalHubsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/GetGlobalHubsBadRequest | 400 | application/json | -| models/errors/GetGlobalHubsUnauthorized | 401 | application/json | -| 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.*; +import dev.plexapi.sdk.models.operations.GetAllHubsRequest; +import dev.plexapi.sdk.models.operations.GetAllHubsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { @@ -85,17 +44,25 @@ public class Application { public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetRecentlyAddedRequest req = GetRecentlyAddedRequest.builder() - .contentDirectoryID(39486L) - .type(Type.TvShow) - .sectionID(2L) - .includeMeta(IncludeMeta.Enable) + GetAllHubsRequest req = GetAllHubsRequest.builder() + .onlyTransient(BoolInt.ONE) .build(); - GetRecentlyAddedResponse res = sdk.hubs().getRecentlyAdded() + GetAllHubsResponse res = sdk.hubs().getAllHubs() .request(req) .call(); @@ -108,13 +75,13 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `request` | [GetRecentlyAddedRequest](../../models/operations/GetRecentlyAddedRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [GetAllHubsRequest](../../models/operations/GetAllHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetRecentlyAddedResponse](../../models/operations/GetRecentlyAddedResponse.md)** +**[GetAllHubsResponse](../../models/operations/GetAllHubsResponse.md)** ### Errors @@ -122,33 +89,46 @@ public class Application { | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4XX, 5XX | \*/\* | -## getLibraryHubs - -This endpoint will return a list of library specific hubs +## getContinueWatching +Get the global continue watching hub ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest; -import dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized; -import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse; +import dev.plexapi.sdk.models.operations.GetContinueWatchingRequest; +import dev.plexapi.sdk.models.operations.GetContinueWatchingResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetLibraryHubsBadRequest, GetLibraryHubsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs() - .sectionId(492.74) + GetContinueWatchingRequest req = GetContinueWatchingRequest.builder() + .build(); + + GetContinueWatchingResponse res = sdk.hubs().getContinueWatching() + .request(req) .call(); if (res.object().isPresent()) { @@ -160,20 +140,823 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionId` | *double* | :heavy_check_mark: | the Id of the library to query | -| `count` | *Optional\* | :heavy_minus_sign: | The number of items to return with each hub. | -| `onlyTransient` | [Optional\](../../models/operations/QueryParamOnlyTransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [GetContinueWatchingRequest](../../models/operations/GetContinueWatchingRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetLibraryHubsResponse](../../models/operations/GetLibraryHubsResponse.md)** +**[GetContinueWatchingResponse](../../models/operations/GetContinueWatchingResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/GetLibraryHubsBadRequest | 400 | application/json | -| models/errors/GetLibraryHubsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getHubItems + +Get the items within a single hub specified by identifier + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetHubItemsRequest; +import dev.plexapi.sdk.models.operations.GetHubItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetHubItemsRequest req = GetHubItemsRequest.builder() + .identifier(List.of( + "", + "", + "")) + .build(); + + GetHubItemsResponse res = sdk.hubs().getHubItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [GetHubItemsRequest](../../models/operations/GetHubItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetHubItemsResponse](../../models/operations/GetHubItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPromotedHubs + +Get the global hubs which are promoted (should be displayed on the home screen) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetPromotedHubsRequest; +import dev.plexapi.sdk.models.operations.GetPromotedHubsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPromotedHubsRequest req = GetPromotedHubsRequest.builder() + .build(); + + GetPromotedHubsResponse res = sdk.hubs().getPromotedHubs() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetPromotedHubsRequest](../../models/operations/GetPromotedHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPromotedHubsResponse](../../models/operations/GetPromotedHubsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getMetadataHubs + +Get the hubs for a section by metadata item. Currently only for music sections + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetMetadataHubsRequest; +import dev.plexapi.sdk.models.operations.GetMetadataHubsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetMetadataHubsRequest req = GetMetadataHubsRequest.builder() + .metadataId(605482L) + .onlyTransient(BoolInt.ONE) + .build(); + + GetMetadataHubsResponse res = sdk.hubs().getMetadataHubs() + .request(req) + .call(); + + if (res.mediaContainerWithHubs().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetMetadataHubsRequest](../../models/operations/GetMetadataHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetMetadataHubsResponse](../../models/operations/GetMetadataHubsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPostplayHubs + +Get the hubs for a metadata to be displayed in post play + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetPostplayHubsRequest; +import dev.plexapi.sdk.models.operations.GetPostplayHubsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPostplayHubsRequest req = GetPostplayHubsRequest.builder() + .metadataId(441419L) + .onlyTransient(BoolInt.ONE) + .build(); + + GetPostplayHubsResponse res = sdk.hubs().getPostplayHubs() + .request(req) + .call(); + + if (res.mediaContainerWithHubs().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetPostplayHubsRequest](../../models/operations/GetPostplayHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPostplayHubsResponse](../../models/operations/GetPostplayHubsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getRelatedHubs + +Get the hubs for a metadata related to the provided metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetRelatedHubsRequest; +import dev.plexapi.sdk.models.operations.GetRelatedHubsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetRelatedHubsRequest req = GetRelatedHubsRequest.builder() + .metadataId(8858L) + .onlyTransient(BoolInt.ONE) + .build(); + + GetRelatedHubsResponse res = sdk.hubs().getRelatedHubs() + .request(req) + .call(); + + if (res.mediaContainerWithHubs().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [GetRelatedHubsRequest](../../models/operations/GetRelatedHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetRelatedHubsResponse](../../models/operations/GetRelatedHubsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSectionHubs + +Get the hubs for a single section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSectionHubsRequest; +import dev.plexapi.sdk.models.operations.GetSectionHubsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSectionHubsRequest req = GetSectionHubsRequest.builder() + .sectionId(336924L) + .onlyTransient(BoolInt.ONE) + .build(); + + GetSectionHubsResponse res = sdk.hubs().getSectionHubs() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [GetSectionHubsRequest](../../models/operations/GetSectionHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSectionHubsResponse](../../models/operations/GetSectionHubsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## resetSectionDefaults + +Reset hubs for this section to defaults and delete custom hubs + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ResetSectionDefaultsRequest; +import dev.plexapi.sdk.models.operations.ResetSectionDefaultsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ResetSectionDefaultsRequest req = ResetSectionDefaultsRequest.builder() + .sectionId(383022L) + .build(); + + ResetSectionDefaultsResponse res = sdk.hubs().resetSectionDefaults() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [ResetSectionDefaultsRequest](../../models/operations/ResetSectionDefaultsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ResetSectionDefaultsResponse](../../models/operations/ResetSectionDefaultsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listHubs + +Get the list of hubs including both built-in and custom + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListHubsRequest; +import dev.plexapi.sdk.models.operations.ListHubsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListHubsRequest req = ListHubsRequest.builder() + .sectionId(442546L) + .build(); + + ListHubsResponse res = sdk.hubs().listHubs() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `request` | [ListHubsRequest](../../models/operations/ListHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListHubsResponse](../../models/operations/ListHubsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## createCustomHub + +Create a custom hub based on a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.CreateCustomHubRequest; +import dev.plexapi.sdk.models.operations.CreateCustomHubResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateCustomHubRequest req = CreateCustomHubRequest.builder() + .sectionId(869922L) + .metadataItemId(703843L) + .promotedToRecommended(BoolInt.ONE) + .promotedToOwnHome(BoolInt.ONE) + .promotedToSharedHome(BoolInt.ONE) + .build(); + + CreateCustomHubResponse res = sdk.hubs().createCustomHub() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [CreateCustomHubRequest](../../models/operations/CreateCustomHubRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateCustomHubResponse](../../models/operations/CreateCustomHubResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## moveHub + +Changed the ordering of a hub among others hubs + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.MoveHubRequest; +import dev.plexapi.sdk.models.operations.MoveHubResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MoveHubRequest req = MoveHubRequest.builder() + .sectionId(755710L) + .identifier("") + .build(); + + MoveHubResponse res = sdk.hubs().moveHub() + .request(req) + .call(); + + if (res.getResponses200().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `request` | [MoveHubRequest](../../models/operations/MoveHubRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[MoveHubResponse](../../models/operations/MoveHubResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteCustomHub + +Delete a custom hub from the server + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteCustomHubRequest; +import dev.plexapi.sdk.models.operations.DeleteCustomHubResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteCustomHubRequest req = DeleteCustomHubRequest.builder() + .sectionId(625677L) + .identifier("") + .build(); + + DeleteCustomHubResponse res = sdk.hubs().deleteCustomHub() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [DeleteCustomHubRequest](../../models/operations/DeleteCustomHubRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteCustomHubResponse](../../models/operations/DeleteCustomHubResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## updateHubVisibility + +Changed the visibility of a hub for both the admin and shared users + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.UpdateHubVisibilityRequest; +import dev.plexapi.sdk.models.operations.UpdateHubVisibilityResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UpdateHubVisibilityRequest req = UpdateHubVisibilityRequest.builder() + .sectionId(341650L) + .identifier("") + .promotedToRecommended(BoolInt.ONE) + .promotedToOwnHome(BoolInt.ONE) + .promotedToSharedHome(BoolInt.ONE) + .build(); + + UpdateHubVisibilityResponse res = sdk.hubs().updateHubVisibility() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [UpdateHubVisibilityRequest](../../models/operations/UpdateHubVisibilityRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UpdateHubVisibilityResponse](../../models/operations/UpdateHubVisibilityResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index e897eef0..af9f6951 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -3,415 +3,133 @@ ## Overview -API Calls interacting with Plex Media Server Libraries - +Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc). ### Available Operations -* [getFileHash](#getfilehash) - Get Hash Value -* [getRecentlyAddedLibrary](#getrecentlyaddedlibrary) - Get Recently Added -* [getAllLibraries](#getalllibraries) - Get All Libraries -* [getLibraryDetails](#getlibrarydetails) - Get Library Details -* [deleteLibrary](#deletelibrary) - Delete Library Section -* [getLibraryItems](#getlibraryitems) - Get Library Items -* [getLibrarySectionsAll](#getlibrarysectionsall) - Get Library section media by tag ALL -* [getRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library -* [getSearchLibrary](#getsearchlibrary) - Search Library -* [getGenresLibrary](#getgenreslibrary) - Get Genres of library media -* [getCountriesLibrary](#getcountrieslibrary) - Get Countries of library media -* [getActorsLibrary](#getactorslibrary) - Get Actors of library media -* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries -* [getMediaMetaData](#getmediametadata) - Get Media Metadata -* [getMediaArts](#getmediaarts) - Get Media Background Artwork -* [postMediaArts](#postmediaarts) - Upload Media Background Artwork -* [getMediaPosters](#getmediaposters) - Get Media Posters -* [postMediaPoster](#postmediaposter) - Upload Media Poster -* [getMetadataChildren](#getmetadatachildren) - Get Items Children -* [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content - -## getFileHash - -This resource returns hash values for local files - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetFileHashBadRequest; -import dev.plexapi.sdk.models.errors.GetFileHashUnauthorized; -import dev.plexapi.sdk.models.operations.GetFileHashResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetFileHashBadRequest, GetFileHashUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetFileHashResponse res = sdk.library().getFileHash() - .url("file://C:\\Image.png&type=13") - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `url` | *String* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 | -| `type` | *Optional\* | :heavy_minus_sign: | Item type | | - -### Response - -**[GetFileHashResponse](../../models/operations/GetFileHashResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models/errors/GetFileHashBadRequest | 400 | application/json | -| models/errors/GetFileHashUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getRecentlyAddedLibrary - -This endpoint will return the recently added content. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryBadRequest; -import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryUnauthorized; -import dev.plexapi.sdk.models.operations.*; -import java.lang.Exception; -import java.util.List; - -public class Application { - - public static void main(String[] args) throws GetRecentlyAddedLibraryBadRequest, GetRecentlyAddedLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - 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) - .build(); - - GetRecentlyAddedLibraryResponse res = sdk.library().getRecentlyAddedLibrary() - .request(req) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `request` | [GetRecentlyAddedLibraryRequest](../../models/operations/GetRecentlyAddedLibraryRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[GetRecentlyAddedLibraryResponse](../../models/operations/GetRecentlyAddedLibraryResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| models/errors/GetRecentlyAddedLibraryBadRequest | 400 | application/json | -| models/errors/GetRecentlyAddedLibraryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getAllLibraries - -A library section (commonly referred to as just a library) is a collection of media. -Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. -For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. - -Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. -This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest; -import dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized; -import dev.plexapi.sdk.models.operations.GetAllLibrariesResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetAllLibrariesBadRequest, GetAllLibrariesUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetAllLibrariesResponse res = sdk.library().getAllLibraries() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetAllLibrariesResponse](../../models/operations/GetAllLibrariesResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/GetAllLibrariesBadRequest | 400 | application/json | -| models/errors/GetAllLibrariesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getLibraryDetails - -## Library Details Endpoint - -This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. - -The details include: - -### Directories -Organized into three categories: - -- **Primary Directories**: - - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). - - Most can be replicated via media queries. - - Customizable by users. - -- **Secondary Directories**: - - Marked with `secondary="1"`. - - Used in older clients for structured navigation. - -- **Special Directories**: - - Includes a "By Folder" entry for filesystem-based browsing. - - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation. - -### Types -Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - -- **Type Object Attributes**: - - `key`: Endpoint for the media list of this type. - - `type`: Metadata type (if standard Plex type). - - `title`: Title for this content type (e.g., "Movies"). - -- **Filter Objects**: - - Subset of the media query language. - - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - -- **Sort Objects**: - - Description of sort fields. - - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - -> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest; -import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse; -import dev.plexapi.sdk.models.operations.IncludeDetails; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetLibraryDetailsBadRequest, GetLibraryDetailsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetLibraryDetailsResponse res = sdk.library().getLibraryDetails() - .includeDetails(IncludeDetails.ZERO) - .sectionKey(9518) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `includeDetails` | [Optional\](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | -| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | - -### Response - -**[GetLibraryDetailsResponse](../../models/operations/GetLibraryDetailsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetLibraryDetailsBadRequest | 400 | application/json | -| models/errors/GetLibraryDetailsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## deleteLibrary - -Delete a library using a specific section id - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest; -import dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized; -import dev.plexapi.sdk.models.operations.DeleteLibraryResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws DeleteLibraryBadRequest, DeleteLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - DeleteLibraryResponse res = sdk.library().deleteLibrary() - .sectionKey(9518) - .call(); - - // handle response - } -} -``` - -### Parameters - -| 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 | - -### Response - -**[DeleteLibraryResponse](../../models/operations/DeleteLibraryResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/DeleteLibraryBadRequest | 400 | application/json | -| models/errors/DeleteLibraryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +* [getLibraryItems](#getlibraryitems) - Get all items in library +* [deleteCaches](#deletecaches) - Delete library caches +* [cleanBundles](#cleanbundles) - Clean bundles +* [ingestTransientItem](#ingesttransientitem) - Ingest a transient item +* [getLibraryMatches](#getlibrarymatches) - Get library matches +* [optimizeDatabase](#optimizedatabase) - Optimize the Database +* [getRandomArtwork](#getrandomartwork) - Get random artwork +* [getSections](#getsections) - Get library sections (main Media Provider Only) +* [addSection](#addsection) - Add a library section +* [stopAllRefreshes](#stopallrefreshes) - Stop refresh +* [getSectionsPrefs](#getsectionsprefs) - Get section prefs +* [refreshSectionsMetadata](#refreshsectionsmetadata) - Refresh all sections +* [getTags](#gettags) - Get all library tags of a type +* [deleteMetadataItem](#deletemetadataitem) - Delete a metadata item +* [editMetadataItem](#editmetadataitem) - Edit a metadata item +* [detectAds](#detectads) - Ad-detect an item +* [getAllItemLeaves](#getallitemleaves) - Get the leaves of an item +* [analyzeMetadata](#analyzemetadata) - Analyze an item +* [generateThumbs](#generatethumbs) - Generate thumbs of chapters for an item +* [detectCredits](#detectcredits) - Credit detect a metadata item +* [getExtras](#getextras) - Get an item's extras +* [addExtras](#addextras) - Add to an item's extras +* [getFile](#getfile) - Get a file from a metadata or media bundle +* [startBifGeneration](#startbifgeneration) - Start BIF generation of an item +* [detectIntros](#detectintros) - Intro detect an item +* [createMarker](#createmarker) - Create a marker +* [matchItem](#matchitem) - Match a metadata item +* [listMatches](#listmatches) - Get metadata matches for an item +* [mergeItems](#mergeitems) - Merge a metadata item +* [listSonicallySimilar](#listsonicallysimilar) - Get nearest tracks to metadata item +* [setItemPreferences](#setitempreferences) - Set metadata preferences +* [refreshItemsMetadata](#refreshitemsmetadata) - Refresh a metadata item +* [getRelatedItems](#getrelateditems) - Get related items +* [listSimilar](#listsimilar) - Get similar items +* [splitItem](#splititem) - Split a metadata item +* [addSubtitles](#addsubtitles) - Add subtitles +* [getItemTree](#getitemtree) - Get metadata items as a tree +* [unmatch](#unmatch) - Unmatch a metadata item +* [listTopUsers](#listtopusers) - Get metadata top users +* [detectVoiceActivity](#detectvoiceactivity) - Detect voice activity +* [getAugmentationStatus](#getaugmentationstatus) - Get augmentation status +* [setStreamSelection](#setstreamselection) - Set stream selection +* [getPerson](#getperson) - Get person details +* [listPersonMedia](#listpersonmedia) - Get media for a person +* [deleteLibrarySection](#deletelibrarysection) - Delete a library section +* [getLibraryDetails](#getlibrarydetails) - Get a library section by id +* [editSection](#editsection) - Edit a library section +* [updateItems](#updateitems) - Set the fields of the filtered items +* [startAnalysis](#startanalysis) - Analyze a section +* [autocomplete](#autocomplete) - Get autocompletions for search +* [getCollections](#getcollections) - Get collections in a section +* [getCommon](#getcommon) - Get common fields for items +* [emptyTrash](#emptytrash) - Empty section trash +* [getSectionFilters](#getsectionfilters) - Get section filters +* [getFirstCharacters](#getfirstcharacters) - Get list of first characters +* [deleteIndexes](#deleteindexes) - Delete section indexes +* [deleteIntros](#deleteintros) - Delete section intro markers +* [getSectionPreferences](#getsectionpreferences) - Get section prefs +* [setSectionPreferences](#setsectionpreferences) - Set section prefs +* [cancelRefresh](#cancelrefresh) - Cancel section refresh +* [refreshSection](#refreshsection) - Refresh section +* [getAvailableSorts](#getavailablesorts) - Get a section sorts +* [getStreamLevels](#getstreamlevels) - Get loudness about a stream in json +* [getStreamLoudness](#getstreamloudness) - Get loudness about a stream +* [getChapterImage](#getchapterimage) - Get a chapter image +* [setItemArtwork](#setitemartwork) - Set an item's artwork, theme, etc +* [updateItemArtwork](#updateitemartwork) - Set an item's artwork, theme, etc +* [deleteMarker](#deletemarker) - Delete a marker +* [editMarker](#editmarker) - Edit a marker +* [deleteMediaItem](#deletemediaitem) - Delete a media item +* [getPartIndex](#getpartindex) - Get BIF index for a part +* [deleteCollection](#deletecollection) - Delete a collection +* [getSectionImage](#getsectionimage) - Get a section composite image +* [deleteStream](#deletestream) - Delete a stream +* [getStream](#getstream) - Get a stream +* [setStreamOffset](#setstreamoffset) - Set a stream offset +* [getItemArtwork](#getitemartwork) - Get an item's artwork, theme, etc +* [getMediaPart](#getmediapart) - Get a media part +* [getImageFromBif](#getimagefrombif) - Get an image from part BIF ## getLibraryItems -Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: -- `all`: All items in the section. -- `unwatched`: Items that have not been played. -- `newest`: Items that are recently released. -- `recentlyAdded`: Items that are recently added to the library. -- `recentlyViewed`: Items that were recently viewed. -- `onDeck`: Items to continue watching. -- `collection`: Items categorized by collection. -- `edition`: Items categorized by edition. -- `genre`: Items categorized by genre. -- `year`: Items categorized by year of release. -- `decade`: Items categorized by decade. -- `director`: Items categorized by director. -- `actor`: Items categorized by starring actor. -- `country`: Items categorized by country of origin. -- `contentRating`: Items categorized by content rating. -- `rating`: Items categorized by rating. -- `resolution`: Items categorized by resolution. -- `firstCharacter`: Items categorized by the first letter. -- `folder`: Items categorized by folder. -- `albums`: Items categorized by album. - +Request all metadata items according to a query. ### Example Usage - + ```java 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.*; +import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest; +import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetLibraryItemsBadRequest, GetLibraryItemsUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); GetLibraryItemsRequest req = GetLibraryItemsRequest.builder() - .tag(Tag.NEWEST) - .type(GetLibraryItemsQueryParamType.TvShow) - .sectionKey(9518) - .includeGuids(IncludeGuids.Enable) - .includeMeta(GetLibraryItemsQueryParamIncludeMeta.Enable) .build(); GetLibraryItemsResponse res = sdk.library().getLibraryItems() .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithMetadata().isPresent()) { // handle response } } @@ -430,52 +148,139 @@ public class Application { ### Errors -| Error Type | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/GetLibraryItemsBadRequest | 400 | application/json | -| models/errors/GetLibraryItemsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | -## getLibrarySectionsAll - -Retrieves a list of all general media data for this library. +## deleteCaches +Delete the hub caches so they are recomputed on next request ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetLibrarySectionsAllBadRequest; -import dev.plexapi.sdk.models.errors.GetLibrarySectionsAllUnauthorized; -import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.operations.DeleteCachesResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetLibrarySectionsAllBadRequest, GetLibrarySectionsAllUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetLibrarySectionsAllRequest req = GetLibrarySectionsAllRequest.builder() - .sectionKey(9518) - .type(GetLibrarySectionsAllQueryParamType.TvShow) - .includeMeta(GetLibrarySectionsAllQueryParamIncludeMeta.Enable) - .includeGuids(QueryParamIncludeGuids.Enable) - .includeAdvanced(IncludeAdvanced.Enable) - .includeCollections(QueryParamIncludeCollections.Enable) - .includeExternalMedia(QueryParamIncludeExternalMedia.Enable) + DeleteCachesResponse res = sdk.library().deleteCaches() + .call(); + + // handle response + } +} +``` + +### Response + +**[DeleteCachesResponse](../../models/operations/DeleteCachesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## cleanBundles + +Clean out any now unused bundles. Bundles can become unused when media is deleted + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.CleanBundlesResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CleanBundlesResponse res = sdk.library().cleanBundles() + .call(); + + // handle response + } +} +``` + +### Response + +**[CleanBundlesResponse](../../models/operations/CleanBundlesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## ingestTransientItem + +This endpoint takes a file path specified in the `url` parameter, matches it using the scanner's match mechanism, downloads rich metadata, and then ingests the item as a transient item (without a library section). In the case where the file represents an episode, the entire tree (show, season, and episode) is added as transient items. At this time, movies and episodes are the only supported types, which are gleaned automatically from the file path. +Note that any of the parameters passed to the metadata details endpoint (e.g. `includeExtras=1`) work here. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.IngestTransientItemRequest; +import dev.plexapi.sdk.models.operations.IngestTransientItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + IngestTransientItemRequest req = IngestTransientItemRequest.builder() + .url("file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv") + .virtualFilePath("/Avatar.mkv") + .computeHashes(BoolInt.ONE) + .ingestNonMatches(BoolInt.ONE) .build(); - GetLibrarySectionsAllResponse res = sdk.library().getLibrarySectionsAll() + IngestTransientItemResponse res = sdk.library().ingestTransientItem() .request(req) .call(); - if (res.object().isPresent()) { + if (res.mediaContainerWithMetadata().isPresent()) { // handle response } } @@ -484,51 +289,135 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `request` | [GetLibrarySectionsAllRequest](../../models/operations/GetLibrarySectionsAllRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [IngestTransientItemRequest](../../models/operations/IngestTransientItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetLibrarySectionsAllResponse](../../models/operations/GetLibrarySectionsAllResponse.md)** +**[IngestTransientItemResponse](../../models/operations/IngestTransientItemResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| models/errors/GetLibrarySectionsAllBadRequest | 400 | application/json | -| models/errors/GetLibrarySectionsAllUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | -## getRefreshLibraryMetadata - -This endpoint Refreshes all the Metadata of the library. +## getLibraryMatches +The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints. +This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata. +The endpoint response can including multiple matches, if there is ambiguity, each one containing a `score` from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching). +The `guid` hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB `ttXXX`) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of `Jane Eyre`, which could refer to the 1943 or the 2011 version). +Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest; -import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized; -import dev.plexapi.sdk.models.operations.Force; -import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse; +import dev.plexapi.sdk.models.operations.GetLibraryMatchesRequest; +import dev.plexapi.sdk.models.operations.GetLibraryMatchesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetRefreshLibraryMetadataBadRequest, GetRefreshLibraryMetadataUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata() - .force(Force.ZERO) - .sectionKey(9518) + GetLibraryMatchesRequest req = GetLibraryMatchesRequest.builder() + .includeFullMetadata(BoolInt.ONE) + .includeAncestorMetadata(BoolInt.ONE) + .includeAlternateMetadataSources(BoolInt.ONE) + .build(); + + GetLibraryMatchesResponse res = sdk.library().getLibraryMatches() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [GetLibraryMatchesRequest](../../models/operations/GetLibraryMatchesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetLibraryMatchesResponse](../../models/operations/GetLibraryMatchesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## optimizeDatabase + +Initiate optimize on the database. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.OptimizeDatabaseRequest; +import dev.plexapi.sdk.models.operations.OptimizeDatabaseResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + OptimizeDatabaseRequest req = OptimizeDatabaseRequest.builder() + .async(BoolInt.ONE) + .build(); + + OptimizeDatabaseResponse res = sdk.library().optimizeDatabase() + .request(req) .call(); // handle response @@ -538,381 +427,70 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `force` | [Optional\](../../models/operations/Force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | -| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [OptimizeDatabaseRequest](../../models/operations/OptimizeDatabaseRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetRefreshLibraryMetadataResponse](../../models/operations/GetRefreshLibraryMetadataResponse.md)** +**[OptimizeDatabaseResponse](../../models/operations/OptimizeDatabaseResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| models/errors/GetRefreshLibraryMetadataBadRequest | 400 | application/json | -| models/errors/GetRefreshLibraryMetadataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | -## getSearchLibrary +## getRandomArtwork -Search for content within a specific section of the library. +Get random artwork across sections. This is commonly used for a screensaver. -### Types -Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - -- **Type Object Attributes**: - - `type`: Metadata type (if standard Plex type). - - `title`: Title for this content type (e.g., "Movies"). - -- **Filter Objects**: - - Subset of the media query language. - - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - -- **Sort Objects**: - - Description of sort fields. - - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - -> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. +This retrieves 100 random artwork paths in the specified sections and returns them. Restrictions are put in place to not return artwork for items the user is not allowed to access. Artwork will be for Movies, Shows, and Artists only. ### Example Usage - + ```java 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 java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetSearchLibraryBadRequest, GetSearchLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetSearchLibraryResponse res = sdk.library().getSearchLibrary() - .sectionKey(9518) - .type(GetSearchLibraryQueryParamType.TvShow) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| 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` | [GetSearchLibraryQueryParamType](../../models/operations/GetSearchLibraryQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | - -### Response - -**[GetSearchLibraryResponse](../../models/operations/GetSearchLibraryResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetSearchLibraryBadRequest | 400 | application/json | -| models/errors/GetSearchLibraryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getGenresLibrary - -Retrieves a list of all the genres that are found for the media in this library. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetGenresLibraryBadRequest; -import dev.plexapi.sdk.models.errors.GetGenresLibraryUnauthorized; -import dev.plexapi.sdk.models.operations.GetGenresLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetGenresLibraryResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetGenresLibraryBadRequest, GetGenresLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetGenresLibraryResponse res = sdk.library().getGenresLibrary() - .sectionKey(9518) - .type(GetGenresLibraryQueryParamType.TvShow) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| 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` | [GetGenresLibraryQueryParamType](../../models/operations/GetGenresLibraryQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | - -### Response - -**[GetGenresLibraryResponse](../../models/operations/GetGenresLibraryResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetGenresLibraryBadRequest | 400 | application/json | -| models/errors/GetGenresLibraryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getCountriesLibrary - -Retrieves a list of all the countries that are found for the media in this library. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetCountriesLibraryBadRequest; -import dev.plexapi.sdk.models.errors.GetCountriesLibraryUnauthorized; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetCountriesLibraryBadRequest, GetCountriesLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetCountriesLibraryResponse res = sdk.library().getCountriesLibrary() - .sectionKey(9518) - .type(GetCountriesLibraryQueryParamType.TvShow) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| 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` | [GetCountriesLibraryQueryParamType](../../models/operations/GetCountriesLibraryQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | - -### Response - -**[GetCountriesLibraryResponse](../../models/operations/GetCountriesLibraryResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetCountriesLibraryBadRequest | 400 | application/json | -| models/errors/GetCountriesLibraryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getActorsLibrary - -Retrieves a list of all the actors that are found for the media in this library. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetActorsLibraryBadRequest; -import dev.plexapi.sdk.models.errors.GetActorsLibraryUnauthorized; -import dev.plexapi.sdk.models.operations.GetActorsLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetActorsLibraryResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetActorsLibraryBadRequest, GetActorsLibraryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetActorsLibraryResponse res = sdk.library().getActorsLibrary() - .sectionKey(9518) - .type(GetActorsLibraryQueryParamType.TvShow) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| 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` | [GetActorsLibraryQueryParamType](../../models/operations/GetActorsLibraryQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | - -### Response - -**[GetActorsLibraryResponse](../../models/operations/GetActorsLibraryResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetActorsLibraryBadRequest | 400 | application/json | -| models/errors/GetActorsLibraryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getSearchAllLibraries - -Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetSearchAllLibrariesBadRequest; -import dev.plexapi.sdk.models.errors.GetSearchAllLibrariesUnauthorized; -import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.operations.GetRandomArtworkRequest; +import dev.plexapi.sdk.models.operations.GetRandomArtworkResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; import java.util.List; public class Application { - public static void main(String[] args) throws GetSearchAllLibrariesBadRequest, GetSearchAllLibrariesUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetSearchAllLibrariesRequest req = GetSearchAllLibrariesRequest.builder() - .query("") - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .searchTypes(List.of( - SearchTypes.PEOPLE)) - .includeCollections(GetSearchAllLibrariesQueryParamIncludeCollections.Enable) - .includeExternalMedia(GetSearchAllLibrariesQueryParamIncludeExternalMedia.Enable) + GetRandomArtworkRequest req = GetRandomArtworkRequest.builder() + .sections(List.of( + 5L, + 6L)) .build(); - GetSearchAllLibrariesResponse res = sdk.library().getSearchAllLibraries() + GetRandomArtworkResponse res = sdk.library().getRandomArtwork() .request(req) .call(); - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `request` | [GetSearchAllLibrariesRequest](../../models/operations/GetSearchAllLibrariesRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[GetSearchAllLibrariesResponse](../../models/operations/GetSearchAllLibrariesResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| models/errors/GetSearchAllLibrariesBadRequest | 400 | application/json | -| models/errors/GetSearchAllLibrariesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getMediaMetaData - -This endpoint will return all the (meta)data of one or more library items specified by the ratingKey. -Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617"). - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetMediaMetaDataBadRequest; -import dev.plexapi.sdk.models.errors.GetMediaMetaDataUnauthorized; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequest; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetMediaMetaDataBadRequest, GetMediaMetaDataUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetMediaMetaDataRequest req = GetMediaMetaDataRequest.builder() - .ratingKey("21119,21617") - .includeConcerts(true) - .includeExtras(true) - .includeOnDeck(true) - .includePopularLeaves(true) - .includePreferences(true) - .includeReviews(true) - .includeChapters(true) - .includeStations(true) - .includeExternalMedia(true) - .asyncAugmentMetadata(true) - .asyncCheckFiles(true) - .asyncRefreshAnalysis(true) - .asyncRefreshLocalMediaAgent(true) - .build(); - - GetMediaMetaDataResponse res = sdk.library().getMediaMetaData() - .request(req) - .call(); - - if (res.object().isPresent()) { + if (res.mediaContainerWithArtwork().isPresent()) { // handle response } } @@ -923,32 +501,31 @@ public class Application { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `request` | [GetMediaMetaDataRequest](../../models/operations/GetMediaMetaDataRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [GetRandomArtworkRequest](../../models/operations/GetRandomArtworkRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetMediaMetaDataResponse](../../models/operations/GetMediaMetaDataResponse.md)** +**[GetRandomArtworkResponse](../../models/operations/GetRandomArtworkResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetMediaMetaDataBadRequest | 400 | application/json | -| models/errors/GetMediaMetaDataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | -## getMediaArts +## getSections -Returns the background artwork for a library item. +A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. +Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.operations.GetMediaArtsResponse; +import dev.plexapi.sdk.models.operations.GetSectionsResponse; import java.lang.Exception; public class Application { @@ -956,11 +533,317 @@ public class Application { public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetMediaArtsResponse res = sdk.library().getMediaArts() - .ratingKey(16099L) + GetSectionsResponse res = sdk.library().getSections() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[GetSectionsResponse](../../models/operations/GetSectionsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## addSection + +Add a new library section to the server + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddSectionRequest req = AddSectionRequest.builder() + .name("") + .type(39544L) + .agent("") + .language("") + .locations(List.of( + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music")) + .prefs(QueryParamPrefs.builder() + .build()) + .relative(BoolInt.ONE) + .importFromiTunes(BoolInt.ONE) + .build(); + + AddSectionResponse res = sdk.library().addSection() + .request(req) + .call(); + + if (res.slashGetResponses200().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [AddSectionRequest](../../models/operations/AddSectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddSectionResponse](../../models/operations/AddSectionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## stopAllRefreshes + +Stop all refreshes across all sections + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.StopAllRefreshesResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StopAllRefreshesResponse res = sdk.library().stopAllRefreshes() + .call(); + + if (res.requestHandlerSlashGetResponses200().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[StopAllRefreshesResponse](../../models/operations/StopAllRefreshesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSectionsPrefs + +Get a section's preferences for a metadata type + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSectionsPrefsRequest; +import dev.plexapi.sdk.models.operations.GetSectionsPrefsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSectionsPrefsRequest req = GetSectionsPrefsRequest.builder() + .type(460221L) + .build(); + + GetSectionsPrefsResponse res = sdk.library().getSectionsPrefs() + .request(req) + .call(); + + if (res.requestHandlerSlashGetResponses200().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [GetSectionsPrefsRequest](../../models/operations/GetSectionsPrefsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSectionsPrefsResponse](../../models/operations/GetSectionsPrefsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## refreshSectionsMetadata + +Tell PMS to refresh all section metadata + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataRequest; +import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RefreshSectionsMetadataRequest req = RefreshSectionsMetadataRequest.builder() + .build(); + + RefreshSectionsMetadataResponse res = sdk.library().refreshSectionsMetadata() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `request` | [RefreshSectionsMetadataRequest](../../models/operations/RefreshSectionsMetadataRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[RefreshSectionsMetadataResponse](../../models/operations/RefreshSectionsMetadataResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getTags + +Get all library tags of a type + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetTagsRequest; +import dev.plexapi.sdk.models.operations.GetTagsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetTagsRequest req = GetTagsRequest.builder() + .build(); + + GetTagsResponse res = sdk.library().getTags() + .request(req) .call(); if (res.object().isPresent()) { @@ -972,13 +855,13 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `request` | [GetTagsRequest](../../models/operations/GetTagsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetMediaArtsResponse](../../models/operations/GetMediaArtsResponse.md)** +**[GetTagsResponse](../../models/operations/GetTagsResponse.md)** ### Errors @@ -986,18 +869,21 @@ public class Application { | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4XX, 5XX | \*/\* | -## postMediaArts +## deleteMetadataItem -Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL +Delete a single metadata item from the library, deleting media as well ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.operations.PostMediaArtsResponse; +import dev.plexapi.sdk.models.operations.DeleteMetadataItemRequest; +import dev.plexapi.sdk.models.operations.DeleteMetadataItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { @@ -1005,29 +891,43 @@ public class Application { public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - PostMediaArtsResponse res = sdk.library().postMediaArts() - .ratingKey(2268L) - .url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b") + DeleteMetadataItemRequest req = DeleteMetadataItemRequest.builder() + .ids("") + .proxy(BoolInt.ONE) + .build(); + + DeleteMetadataItemResponse res = sdk.library().deleteMetadataItem() + .request(req) .call(); + // handle response } } ``` ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 | -| `url` | *Optional\* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b | -| `requestBody` | byte[] | :heavy_minus_sign: | The contents of the image, if uploading a local file | | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [DeleteMetadataItemRequest](../../models/operations/DeleteMetadataItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[PostMediaArtsResponse](../../models/operations/PostMediaArtsResponse.md)** +**[DeleteMetadataItemResponse](../../models/operations/DeleteMetadataItemResponse.md)** ### Errors @@ -1035,18 +935,87 @@ public class Application { | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4XX, 5XX | \*/\* | -## getMediaPosters +## editMetadataItem -Returns the available posters for a library item. +Edit metadata items setting fields ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.operations.GetMediaPostersResponse; +import dev.plexapi.sdk.models.operations.EditMetadataItemRequest; +import dev.plexapi.sdk.models.operations.EditMetadataItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EditMetadataItemRequest req = EditMetadataItemRequest.builder() + .ids(List.of( + "", + "")) + .build(); + + EditMetadataItemResponse res = sdk.library().editMetadataItem() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [EditMetadataItemRequest](../../models/operations/EditMetadataItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[EditMetadataItemResponse](../../models/operations/EditMetadataItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## detectAds + +Start the detection of ads in a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DetectAdsRequest; +import dev.plexapi.sdk.models.operations.DetectAdsResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { @@ -1054,14 +1023,93 @@ public class Application { public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetMediaPostersResponse res = sdk.library().getMediaPosters() - .ratingKey(16099L) + DetectAdsRequest req = DetectAdsRequest.builder() + .ids("") + .build(); + + DetectAdsResponse res = sdk.library().detectAds() + .request(req) .call(); - if (res.object().isPresent()) { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [DetectAdsRequest](../../models/operations/DetectAdsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DetectAdsResponse](../../models/operations/DetectAdsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getAllItemLeaves + +Get the leaves for a metadata item such as the episodes in a show + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetAllItemLeavesRequest; +import dev.plexapi.sdk.models.operations.GetAllItemLeavesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAllItemLeavesRequest req = GetAllItemLeavesRequest.builder() + .ids("") + .build(); + + GetAllItemLeavesResponse res = sdk.library().getAllItemLeaves() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { // handle response } } @@ -1070,13 +1118,13 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [GetAllItemLeavesRequest](../../models/operations/GetAllItemLeavesRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetMediaPostersResponse](../../models/operations/GetMediaPostersResponse.md)** +**[GetAllItemLeavesResponse](../../models/operations/GetAllItemLeavesResponse.md)** ### Errors @@ -1084,18 +1132,20 @@ public class Application { | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4XX, 5XX | \*/\* | -## postMediaPoster +## analyzeMetadata -Uploads a poster to a library item, either from a local file or a remote URL +Start the analysis of a metadata item ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.operations.PostMediaPosterResponse; +import dev.plexapi.sdk.models.operations.AnalyzeMetadataRequest; +import dev.plexapi.sdk.models.operations.AnalyzeMetadataResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { @@ -1103,29 +1153,42 @@ public class Application { public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - PostMediaPosterResponse res = sdk.library().postMediaPoster() - .ratingKey(2268L) - .url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b") + AnalyzeMetadataRequest req = AnalyzeMetadataRequest.builder() + .ids("") + .build(); + + AnalyzeMetadataResponse res = sdk.library().analyzeMetadata() + .request(req) .call(); + // handle response } } ``` ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 | -| `url` | *Optional\* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b | -| `requestBody` | byte[] | :heavy_minus_sign: | The contents of the image, if uploading a local file | | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [AnalyzeMetadataRequest](../../models/operations/AnalyzeMetadataRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[PostMediaPosterResponse](../../models/operations/PostMediaPosterResponse.md)** +**[AnalyzeMetadataResponse](../../models/operations/AnalyzeMetadataResponse.md)** ### Errors @@ -1133,39 +1196,119 @@ public class Application { | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4XX, 5XX | \*/\* | -## getMetadataChildren - -This endpoint will return the children of of a library item specified with the ratingKey. +## generateThumbs +Start the chapter thumb generation for an item ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest; -import dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse; +import dev.plexapi.sdk.models.operations.GenerateThumbsRequest; +import dev.plexapi.sdk.models.operations.GenerateThumbsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetMetadataChildrenBadRequest, GetMetadataChildrenUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetMetadataChildrenResponse res = sdk.library().getMetadataChildren() - .ratingKey(2403.67) - .includeElements("Stream") + GenerateThumbsRequest req = GenerateThumbsRequest.builder() + .ids("") + .force(BoolInt.ONE) + .build(); + + GenerateThumbsResponse res = sdk.library().generateThumbs() + .request(req) .call(); - if (res.object().isPresent()) { - // handle response - } + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [GenerateThumbsRequest](../../models/operations/GenerateThumbsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GenerateThumbsResponse](../../models/operations/GenerateThumbsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## detectCredits + +Start credit detection on a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DetectCreditsRequest; +import dev.plexapi.sdk.models.operations.DetectCreditsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DetectCreditsRequest req = DetectCreditsRequest.builder() + .ids("") + .force(BoolInt.ONE) + .manual(BoolInt.ONE) + .build(); + + DetectCreditsResponse res = sdk.library().detectCredits() + .request(req) + .call(); + + // handle response } } ``` @@ -1174,49 +1317,391 @@ public class Application { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ratingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. | -| `includeElements` | *Optional\* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)
| +| `request` | [DetectCreditsRequest](../../models/operations/DetectCreditsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetMetadataChildrenResponse](../../models/operations/GetMetadataChildrenResponse.md)** +**[DetectCreditsResponse](../../models/operations/DetectCreditsResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetMetadataChildrenBadRequest | 400 | application/json | -| models/errors/GetMetadataChildrenUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | -## getTopWatchedContent - -This endpoint will return the top watched content from libraries of a certain type +## getExtras +Get the extras for a metadata item ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetTopWatchedContentBadRequest; -import dev.plexapi.sdk.models.errors.GetTopWatchedContentUnauthorized; -import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.operations.GetExtrasRequest; +import dev.plexapi.sdk.models.operations.GetExtrasResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetTopWatchedContentBadRequest, GetTopWatchedContentUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent() - .type(GetTopWatchedContentQueryParamType.TvShow) - .includeGuids(GetTopWatchedContentQueryParamIncludeGuids.Enable) + GetExtrasRequest req = GetExtrasRequest.builder() + .ids("") + .build(); + + GetExtrasResponse res = sdk.library().getExtras() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [GetExtrasRequest](../../models/operations/GetExtrasRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetExtrasResponse](../../models/operations/GetExtrasResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## addExtras + +Add an extra to a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AddExtrasRequest; +import dev.plexapi.sdk.models.operations.AddExtrasResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddExtrasRequest req = AddExtrasRequest.builder() + .ids("") + .url("https://super-mortise.biz/") + .build(); + + AddExtrasResponse res = sdk.library().addExtras() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [AddExtrasRequest](../../models/operations/AddExtrasRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddExtrasResponse](../../models/operations/AddExtrasResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getFile + +Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetFileRequest; +import dev.plexapi.sdk.models.operations.GetFileResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetFileRequest req = GetFileRequest.builder() + .ids("") + .build(); + + GetFileResponse res = sdk.library().getFile() + .request(req) + .call(); + + if (res.twoHundredAudioMpeg3ResponseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `request` | [GetFileRequest](../../models/operations/GetFileRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetFileResponse](../../models/operations/GetFileResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## startBifGeneration + +Start the indexing (BIF generation) of an item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.StartBifGenerationRequest; +import dev.plexapi.sdk.models.operations.StartBifGenerationResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StartBifGenerationRequest req = StartBifGenerationRequest.builder() + .ids("") + .force(BoolInt.ONE) + .build(); + + StartBifGenerationResponse res = sdk.library().startBifGeneration() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [StartBifGenerationRequest](../../models/operations/StartBifGenerationRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[StartBifGenerationResponse](../../models/operations/StartBifGenerationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## detectIntros + +Start the detection of intros in a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DetectIntrosRequest; +import dev.plexapi.sdk.models.operations.DetectIntrosResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DetectIntrosRequest req = DetectIntrosRequest.builder() + .ids("") + .force(BoolInt.ONE) + .build(); + + DetectIntrosResponse res = sdk.library().detectIntros() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [DetectIntrosRequest](../../models/operations/DetectIntrosRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DetectIntrosResponse](../../models/operations/DetectIntrosResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## createMarker + +Create a marker for this user on the metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateMarkerRequest req = CreateMarkerRequest.builder() + .ids("") + .type(248391L) + .startTimeOffset(535191L) + .attributes(Attributes.builder() + .build()) + .build(); + + CreateMarkerResponse res = sdk.library().createMarker() + .request(req) .call(); if (res.object().isPresent()) { @@ -1228,19 +1713,3565 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [GetTopWatchedContentQueryParamType](../../models/operations/GetTopWatchedContentQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | -| `includeGuids` | [Optional\](../../models/operations/GetTopWatchedContentQueryParamIncludeGuids.md) | :heavy_minus_sign: | Adds the Guid object to the response
| 1 | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [CreateMarkerRequest](../../models/operations/CreateMarkerRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetTopWatchedContentResponse](../../models/operations/GetTopWatchedContentResponse.md)** +**[CreateMarkerResponse](../../models/operations/CreateMarkerResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| models/errors/GetTopWatchedContentBadRequest | 400 | application/json | -| models/errors/GetTopWatchedContentUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## matchItem + +Match a metadata item to a guid + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.MatchItemRequest; +import dev.plexapi.sdk.models.operations.MatchItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MatchItemRequest req = MatchItemRequest.builder() + .ids("") + .build(); + + MatchItemResponse res = sdk.library().matchItem() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [MatchItemRequest](../../models/operations/MatchItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[MatchItemResponse](../../models/operations/MatchItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listMatches + +Get the list of metadata matches for a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListMatchesRequest; +import dev.plexapi.sdk.models.operations.ListMatchesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListMatchesRequest req = ListMatchesRequest.builder() + .ids("") + .manual(BoolInt.ONE) + .build(); + + ListMatchesResponse res = sdk.library().listMatches() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [ListMatchesRequest](../../models/operations/ListMatchesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListMatchesResponse](../../models/operations/ListMatchesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## mergeItems + +Merge a metadata item with other items + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.MergeItemsRequest; +import dev.plexapi.sdk.models.operations.MergeItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MergeItemsRequest req = MergeItemsRequest.builder() + .idsPathParameter("") + .idsQueryParameter(List.of( + "<", + "v", + "a", + "l", + "u", + "e", + ">")) + .build(); + + MergeItemsResponse res = sdk.library().mergeItems() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [MergeItemsRequest](../../models/operations/MergeItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[MergeItemsResponse](../../models/operations/MergeItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listSonicallySimilar + +Get the nearest tracks, sonically, to the provided track + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListSonicallySimilarRequest; +import dev.plexapi.sdk.models.operations.ListSonicallySimilarResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListSonicallySimilarRequest req = ListSonicallySimilarRequest.builder() + .ids("") + .build(); + + ListSonicallySimilarResponse res = sdk.library().listSonicallySimilar() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [ListSonicallySimilarRequest](../../models/operations/ListSonicallySimilarRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListSonicallySimilarResponse](../../models/operations/ListSonicallySimilarResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## setItemPreferences + +Set the preferences on a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.SetItemPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetItemPreferencesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetItemPreferencesRequest req = SetItemPreferencesRequest.builder() + .ids("") + .build(); + + SetItemPreferencesResponse res = sdk.library().setItemPreferences() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [SetItemPreferencesRequest](../../models/operations/SetItemPreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SetItemPreferencesResponse](../../models/operations/SetItemPreferencesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## refreshItemsMetadata + +Refresh a metadata item from the agent + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.RefreshItemsMetadataRequest; +import dev.plexapi.sdk.models.operations.RefreshItemsMetadataResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RefreshItemsMetadataRequest req = RefreshItemsMetadataRequest.builder() + .ids("") + .markUpdated(BoolInt.ONE) + .build(); + + RefreshItemsMetadataResponse res = sdk.library().refreshItemsMetadata() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [RefreshItemsMetadataRequest](../../models/operations/RefreshItemsMetadataRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[RefreshItemsMetadataResponse](../../models/operations/RefreshItemsMetadataResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getRelatedItems + +Get a hub of related items to a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetRelatedItemsRequest; +import dev.plexapi.sdk.models.operations.GetRelatedItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetRelatedItemsRequest req = GetRelatedItemsRequest.builder() + .ids("") + .build(); + + GetRelatedItemsResponse res = sdk.library().getRelatedItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetRelatedItemsRequest](../../models/operations/GetRelatedItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetRelatedItemsResponse](../../models/operations/GetRelatedItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listSimilar + +Get a list of similar items to a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListSimilarRequest; +import dev.plexapi.sdk.models.operations.ListSimilarResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListSimilarRequest req = ListSimilarRequest.builder() + .ids("") + .build(); + + ListSimilarResponse res = sdk.library().listSimilar() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [ListSimilarRequest](../../models/operations/ListSimilarRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListSimilarResponse](../../models/operations/ListSimilarResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## splitItem + +Split a metadata item into multiple items + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.SplitItemRequest; +import dev.plexapi.sdk.models.operations.SplitItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SplitItemRequest req = SplitItemRequest.builder() + .ids("") + .build(); + + SplitItemResponse res = sdk.library().splitItem() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [SplitItemRequest](../../models/operations/SplitItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SplitItemResponse](../../models/operations/SplitItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## addSubtitles + +Add a subtitle to a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AddSubtitlesRequest; +import dev.plexapi.sdk.models.operations.AddSubtitlesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddSubtitlesRequest req = AddSubtitlesRequest.builder() + .ids("") + .forced(BoolInt.ONE) + .hearingImpaired(BoolInt.ONE) + .build(); + + AddSubtitlesResponse res = sdk.library().addSubtitles() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [AddSubtitlesRequest](../../models/operations/AddSubtitlesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddSubtitlesResponse](../../models/operations/AddSubtitlesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getItemTree + +Get a tree of metadata items, such as the seasons/episodes of a show + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetItemTreeRequest; +import dev.plexapi.sdk.models.operations.GetItemTreeResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetItemTreeRequest req = GetItemTreeRequest.builder() + .ids("") + .build(); + + GetItemTreeResponse res = sdk.library().getItemTree() + .request(req) + .call(); + + if (res.mediaContainerWithNestedMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [GetItemTreeRequest](../../models/operations/GetItemTreeRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetItemTreeResponse](../../models/operations/GetItemTreeResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## unmatch + +Unmatch a metadata item to info fetched from the agent + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.UnmatchRequest; +import dev.plexapi.sdk.models.operations.UnmatchResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UnmatchRequest req = UnmatchRequest.builder() + .ids("") + .build(); + + UnmatchResponse res = sdk.library().unmatch() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `request` | [UnmatchRequest](../../models/operations/UnmatchRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UnmatchResponse](../../models/operations/UnmatchResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listTopUsers + +Get the list of users which have played this item starting with the most + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListTopUsersRequest; +import dev.plexapi.sdk.models.operations.ListTopUsersResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListTopUsersRequest req = ListTopUsersRequest.builder() + .ids("") + .build(); + + ListTopUsersResponse res = sdk.library().listTopUsers() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [ListTopUsersRequest](../../models/operations/ListTopUsersRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListTopUsersResponse](../../models/operations/ListTopUsersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## detectVoiceActivity + +Start the detection of voice in a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DetectVoiceActivityRequest; +import dev.plexapi.sdk.models.operations.DetectVoiceActivityResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DetectVoiceActivityRequest req = DetectVoiceActivityRequest.builder() + .ids("") + .force(BoolInt.ONE) + .manual(BoolInt.ONE) + .build(); + + DetectVoiceActivityResponse res = sdk.library().detectVoiceActivity() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [DetectVoiceActivityRequest](../../models/operations/DetectVoiceActivityRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DetectVoiceActivityResponse](../../models/operations/DetectVoiceActivityResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getAugmentationStatus + +Get augmentation status and potentially wait for completion + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetAugmentationStatusRequest; +import dev.plexapi.sdk.models.operations.GetAugmentationStatusResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAugmentationStatusRequest req = GetAugmentationStatusRequest.builder() + .augmentationId("") + .wait_(BoolInt.ONE) + .build(); + + GetAugmentationStatusResponse res = sdk.library().getAugmentationStatus() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [GetAugmentationStatusRequest](../../models/operations/GetAugmentationStatusRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetAugmentationStatusResponse](../../models/operations/GetAugmentationStatusResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## setStreamSelection + +Set which streams (audio/subtitle) are selected by this user + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.SetStreamSelectionRequest; +import dev.plexapi.sdk.models.operations.SetStreamSelectionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetStreamSelectionRequest req = SetStreamSelectionRequest.builder() + .partId(360489L) + .allParts(BoolInt.ONE) + .build(); + + SetStreamSelectionResponse res = sdk.library().setStreamSelection() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [SetStreamSelectionRequest](../../models/operations/SetStreamSelectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SetStreamSelectionResponse](../../models/operations/SetStreamSelectionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPerson + +Get details for a single actor. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetPersonRequest; +import dev.plexapi.sdk.models.operations.GetPersonResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPersonRequest req = GetPersonRequest.builder() + .personId("") + .build(); + + GetPersonResponse res = sdk.library().getPerson() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [GetPersonRequest](../../models/operations/GetPersonRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPersonResponse](../../models/operations/GetPersonResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listPersonMedia + +Get all the media for a single actor. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListPersonMediaRequest; +import dev.plexapi.sdk.models.operations.ListPersonMediaResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListPersonMediaRequest req = ListPersonMediaRequest.builder() + .personId("") + .build(); + + ListPersonMediaResponse res = sdk.library().listPersonMedia() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [ListPersonMediaRequest](../../models/operations/ListPersonMediaRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListPersonMediaResponse](../../models/operations/ListPersonMediaResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteLibrarySection + +Delete a library section by id + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteLibrarySectionRequest; +import dev.plexapi.sdk.models.operations.DeleteLibrarySectionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteLibrarySectionRequest req = DeleteLibrarySectionRequest.builder() + .sectionId("") + .async(BoolInt.ONE) + .build(); + + DeleteLibrarySectionResponse res = sdk.library().deleteLibrarySection() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [DeleteLibrarySectionRequest](../../models/operations/DeleteLibrarySectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteLibrarySectionResponse](../../models/operations/DeleteLibrarySectionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getLibraryDetails + +Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. It often contains a list of `Directory` metadata objects: These used to be used by clients to build a menuing system. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetLibraryDetailsRequest; +import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetLibraryDetailsRequest req = GetLibraryDetailsRequest.builder() + .sectionId("") + .includeDetails(BoolInt.ONE) + .build(); + + GetLibraryDetailsResponse res = sdk.library().getLibraryDetails() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [GetLibraryDetailsRequest](../../models/operations/GetLibraryDetailsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetLibraryDetailsResponse](../../models/operations/GetLibraryDetailsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## editSection + +Edit a library section by id setting parameters + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EditSectionRequest req = EditSectionRequest.builder() + .sectionId("") + .agent("") + .locations(List.of( + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music")) + .prefs(EditSectionQueryParamPrefs.builder() + .build()) + .build(); + + EditSectionResponse res = sdk.library().editSection() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [EditSectionRequest](../../models/operations/EditSectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[EditSectionResponse](../../models/operations/EditSectionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## updateItems + +This endpoint takes an large possible set of values. Here are some examples. +- **Parameters, extra documentation** + - artist.title.value + - When used with track, both artist.title.value and album.title.value need to be specified + - title.value usage + - Summary + - Tracks always rename and never merge + - Albums and Artists + - if single item and item without title does not exist, it is renamed. + - if single item and item with title does exist they are merged. + - if multiple they are always merged. + - Tracks + - Works as expected will update the track's title + - Single track: `/library/sections/{id}/all?type=10&id=42&title.value=NewName` + - Multiple tracks: `/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName` + - All tracks: `/library/sections/{id}/all?type=10&title.value=NewName` + - Albums + - Functionality changes depending on the existence of an album with the same title + - Album exists + - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=Album 2` + - Album with id 42 is merged into album titled "Album 2" + - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=Moo Album` + - All albums are merged into the existing album titled "Moo Album" + - Album does not exist + - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle` + - Album with id 42 has title modified to "NewAlbumTitle" + - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=NewAlbumTitle` + - All albums are merged into a new album with title="NewAlbumTitle" + - Artists + - Functionaly changes depending on the existence of an artist with the same title. + - Artist exists + - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=Artist 2` + - Artist with id 42 is merged into existing artist titled "Artist 2" + - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=Artist 3` + - All artists are merged into the existing artist titled "Artist 3" + - Artist does not exist + - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle` + - Artist with id 42 has title modified to "NewArtistTitle" + - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=NewArtistTitle` + - All artists are merged into a new artist with title="NewArtistTitle" + +- **Notes** + - Technically square brackets are not allowed in an URI except the Internet Protocol Literal Address + - RFC3513: A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is the only place where square bracket characters are allowed in the URI syntax. + - Escaped square brackets are allowed, but don't render well + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.UpdateItemsRequest; +import dev.plexapi.sdk.models.operations.UpdateItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UpdateItemsRequest req = UpdateItemsRequest.builder() + .sectionId("") + .fieldLocked(BoolInt.ONE) + .build(); + + UpdateItemsResponse res = sdk.library().updateItems() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [UpdateItemsRequest](../../models/operations/UpdateItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UpdateItemsResponse](../../models/operations/UpdateItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## startAnalysis + +Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.StartAnalysisRequest; +import dev.plexapi.sdk.models.operations.StartAnalysisResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StartAnalysisRequest req = StartAnalysisRequest.builder() + .sectionId(158829L) + .build(); + + StartAnalysisResponse res = sdk.library().startAnalysis() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [StartAnalysisRequest](../../models/operations/StartAnalysisRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[StartAnalysisResponse](../../models/operations/StartAnalysisResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## autocomplete + +The field to autocomplete on is specified by the {field}.query parameter. For example `genre.query` or `title.query`. +Returns a set of items from the filtered items whose {field} starts with {field}.query. In the results, a {field}.queryRange will be present to express the range of the match + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AutocompleteRequest; +import dev.plexapi.sdk.models.operations.AutocompleteResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AutocompleteRequest req = AutocompleteRequest.builder() + .sectionId(942007L) + .build(); + + AutocompleteResponse res = sdk.library().autocomplete() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [AutocompleteRequest](../../models/operations/AutocompleteRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AutocompleteResponse](../../models/operations/AutocompleteResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getCollections + +Get all collections in a section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetCollectionsRequest; +import dev.plexapi.sdk.models.operations.GetCollectionsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCollectionsRequest req = GetCollectionsRequest.builder() + .sectionId(348838L) + .build(); + + GetCollectionsResponse res = sdk.library().getCollections() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [GetCollectionsRequest](../../models/operations/GetCollectionsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetCollectionsResponse](../../models/operations/GetCollectionsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getCommon + +Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter +Fields which are not common will be expressed in the `mixedFields` field + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetCommonRequest; +import dev.plexapi.sdk.models.operations.GetCommonResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetCommonRequest req = GetCommonRequest.builder() + .sectionId(298154L) + .build(); + + GetCommonResponse res = sdk.library().getCommon() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [GetCommonRequest](../../models/operations/GetCommonRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetCommonResponse](../../models/operations/GetCommonResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## emptyTrash + +Empty trash in the section, permanently deleting media/metadata for missing media + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.EmptyTrashRequest; +import dev.plexapi.sdk.models.operations.EmptyTrashResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EmptyTrashRequest req = EmptyTrashRequest.builder() + .sectionId(30052L) + .build(); + + EmptyTrashResponse res = sdk.library().emptyTrash() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [EmptyTrashRequest](../../models/operations/EmptyTrashRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[EmptyTrashResponse](../../models/operations/EmptyTrashResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSectionFilters + +Get common filters on a section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSectionFiltersRequest; +import dev.plexapi.sdk.models.operations.GetSectionFiltersResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSectionFiltersRequest req = GetSectionFiltersRequest.builder() + .sectionId(380557L) + .build(); + + GetSectionFiltersResponse res = sdk.library().getSectionFilters() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [GetSectionFiltersRequest](../../models/operations/GetSectionFiltersRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSectionFiltersResponse](../../models/operations/GetSectionFiltersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getFirstCharacters + +Get list of first characters in this section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetFirstCharactersRequest; +import dev.plexapi.sdk.models.operations.GetFirstCharactersResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetFirstCharactersRequest req = GetFirstCharactersRequest.builder() + .sectionId(3947L) + .build(); + + GetFirstCharactersResponse res = sdk.library().getFirstCharacters() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [GetFirstCharactersRequest](../../models/operations/GetFirstCharactersRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetFirstCharactersResponse](../../models/operations/GetFirstCharactersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteIndexes + +Delete all the indexes in a section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteIndexesRequest; +import dev.plexapi.sdk.models.operations.DeleteIndexesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteIndexesRequest req = DeleteIndexesRequest.builder() + .sectionId(588437L) + .build(); + + DeleteIndexesResponse res = sdk.library().deleteIndexes() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [DeleteIndexesRequest](../../models/operations/DeleteIndexesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteIndexesResponse](../../models/operations/DeleteIndexesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteIntros + +Delete all the intro markers in a section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteIntrosRequest; +import dev.plexapi.sdk.models.operations.DeleteIntrosResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteIntrosRequest req = DeleteIntrosRequest.builder() + .sectionId(498656L) + .build(); + + DeleteIntrosResponse res = sdk.library().deleteIntros() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [DeleteIntrosRequest](../../models/operations/DeleteIntrosRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteIntrosResponse](../../models/operations/DeleteIntrosResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSectionPreferences + +Get the prefs for a section by id and potentially overriding the agent + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSectionPreferencesRequest; +import dev.plexapi.sdk.models.operations.GetSectionPreferencesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSectionPreferencesRequest req = GetSectionPreferencesRequest.builder() + .sectionId(754869L) + .build(); + + GetSectionPreferencesResponse res = sdk.library().getSectionPreferences() + .request(req) + .call(); + + if (res.mediaContainerWithSettings().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [GetSectionPreferencesRequest](../../models/operations/GetSectionPreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSectionPreferencesResponse](../../models/operations/GetSectionPreferencesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## setSectionPreferences + +Set the prefs for a section by id + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetSectionPreferencesRequest req = SetSectionPreferencesRequest.builder() + .sectionId(349936L) + .prefs(SetSectionPreferencesQueryParamPrefs.builder() + .build()) + .build(); + + SetSectionPreferencesResponse res = sdk.library().setSectionPreferences() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [SetSectionPreferencesRequest](../../models/operations/SetSectionPreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SetSectionPreferencesResponse](../../models/operations/SetSectionPreferencesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## cancelRefresh + +Cancel the refresh of a section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.CancelRefreshRequest; +import dev.plexapi.sdk.models.operations.CancelRefreshResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CancelRefreshRequest req = CancelRefreshRequest.builder() + .sectionId(326852L) + .build(); + + CancelRefreshResponse res = sdk.library().cancelRefresh() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [CancelRefreshRequest](../../models/operations/CancelRefreshRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CancelRefreshResponse](../../models/operations/CancelRefreshResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## refreshSection + +Start a refresh of this section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.RefreshSectionRequest; +import dev.plexapi.sdk.models.operations.RefreshSectionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RefreshSectionRequest req = RefreshSectionRequest.builder() + .sectionId(450300L) + .force(BoolInt.ONE) + .build(); + + RefreshSectionResponse res = sdk.library().refreshSection() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [RefreshSectionRequest](../../models/operations/RefreshSectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[RefreshSectionResponse](../../models/operations/RefreshSectionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getAvailableSorts + +Get the sort mechanisms available in a section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetAvailableSortsRequest; +import dev.plexapi.sdk.models.operations.GetAvailableSortsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAvailableSortsRequest req = GetAvailableSortsRequest.builder() + .sectionId(212498L) + .build(); + + GetAvailableSortsResponse res = sdk.library().getAvailableSorts() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [GetAvailableSortsRequest](../../models/operations/GetAvailableSortsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetAvailableSortsResponse](../../models/operations/GetAvailableSortsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getStreamLevels + +The the loudness of a stream in db, one entry per 100ms + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetStreamLevelsRequest; +import dev.plexapi.sdk.models.operations.GetStreamLevelsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetStreamLevelsRequest req = GetStreamLevelsRequest.builder() + .streamId(447611L) + .build(); + + GetStreamLevelsResponse res = sdk.library().getStreamLevels() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetStreamLevelsRequest](../../models/operations/GetStreamLevelsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetStreamLevelsResponse](../../models/operations/GetStreamLevelsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getStreamLoudness + +The the loudness of a stream in db, one number per line, one entry per 100ms + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetStreamLoudnessRequest; +import dev.plexapi.sdk.models.operations.GetStreamLoudnessResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetStreamLoudnessRequest req = GetStreamLoudnessRequest.builder() + .streamId(277271L) + .build(); + + GetStreamLoudnessResponse res = sdk.library().getStreamLoudness() + .request(req) + .call(); + + if (res.res().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [GetStreamLoudnessRequest](../../models/operations/GetStreamLoudnessRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetStreamLoudnessResponse](../../models/operations/GetStreamLoudnessResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getChapterImage + +Get a single chapter image for a piece of media + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetChapterImageRequest; +import dev.plexapi.sdk.models.operations.GetChapterImageResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetChapterImageRequest req = GetChapterImageRequest.builder() + .mediaId(892563L) + .chapter(48348L) + .build(); + + GetChapterImageResponse res = sdk.library().getChapterImage() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetChapterImageRequest](../../models/operations/GetChapterImageRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetChapterImageResponse](../../models/operations/GetChapterImageResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## setItemArtwork + +Set the artwork, thumb, element for a metadata item +Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetItemArtworkRequest req = SetItemArtworkRequest.builder() + .ids("") + .element(Element.BANNER) + .build(); + + SetItemArtworkResponse res = sdk.library().setItemArtwork() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [SetItemArtworkRequest](../../models/operations/SetItemArtworkRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SetItemArtworkResponse](../../models/operations/SetItemArtworkResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## updateItemArtwork + +Set the artwork, thumb, element for a metadata item +Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UpdateItemArtworkRequest req = UpdateItemArtworkRequest.builder() + .ids("") + .element(PathParamElement.CLEAR_LOGO) + .build(); + + UpdateItemArtworkResponse res = sdk.library().updateItemArtwork() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [UpdateItemArtworkRequest](../../models/operations/UpdateItemArtworkRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UpdateItemArtworkResponse](../../models/operations/UpdateItemArtworkResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteMarker + +Delete a marker for this user on the metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteMarkerRequest; +import dev.plexapi.sdk.models.operations.DeleteMarkerResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteMarkerRequest req = DeleteMarkerRequest.builder() + .ids("") + .marker("") + .build(); + + DeleteMarkerResponse res = sdk.library().deleteMarker() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [DeleteMarkerRequest](../../models/operations/DeleteMarkerRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteMarkerResponse](../../models/operations/DeleteMarkerResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## editMarker + +Edit a marker for this user on the metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EditMarkerRequest req = EditMarkerRequest.builder() + .ids("") + .marker("") + .type(884347L) + .startTimeOffset(517251L) + .attributes(QueryParamAttributes.builder() + .build()) + .build(); + + EditMarkerResponse res = sdk.library().editMarker() + .request(req) + .call(); + + if (res.postResponses200().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [EditMarkerRequest](../../models/operations/EditMarkerRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[EditMarkerResponse](../../models/operations/EditMarkerResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteMediaItem + +Delete a single media from a metadata item in the library + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteMediaItemRequest; +import dev.plexapi.sdk.models.operations.DeleteMediaItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteMediaItemRequest req = DeleteMediaItemRequest.builder() + .ids("") + .mediaItem("") + .proxy(BoolInt.ONE) + .build(); + + DeleteMediaItemResponse res = sdk.library().deleteMediaItem() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [DeleteMediaItemRequest](../../models/operations/DeleteMediaItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteMediaItemResponse](../../models/operations/DeleteMediaItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPartIndex + +Get BIF index for a part by index type + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPartIndexRequest req = GetPartIndexRequest.builder() + .partId(724750L) + .index(Index.SD) + .build(); + + GetPartIndexResponse res = sdk.library().getPartIndex() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [GetPartIndexRequest](../../models/operations/GetPartIndexRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPartIndexResponse](../../models/operations/GetPartIndexResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteCollection + +Delete a library collection from the PMS + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteCollectionRequest; +import dev.plexapi.sdk.models.operations.DeleteCollectionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteCollectionRequest req = DeleteCollectionRequest.builder() + .sectionId(283619L) + .collectionId(680895L) + .build(); + + DeleteCollectionResponse res = sdk.library().deleteCollection() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [DeleteCollectionRequest](../../models/operations/DeleteCollectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteCollectionResponse](../../models/operations/DeleteCollectionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSectionImage + +Get a composite image of images in this section + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSectionImageRequest; +import dev.plexapi.sdk.models.operations.GetSectionImageResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSectionImageRequest req = GetSectionImageRequest.builder() + .sectionId(925611L) + .updatedAt(117413L) + .build(); + + GetSectionImageResponse res = sdk.library().getSectionImage() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetSectionImageRequest](../../models/operations/GetSectionImageRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSectionImageResponse](../../models/operations/GetSectionImageResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteStream + +Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteStreamRequest; +import dev.plexapi.sdk.models.operations.DeleteStreamResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteStreamRequest req = DeleteStreamRequest.builder() + .streamId(841510L) + .ext("") + .build(); + + DeleteStreamResponse res = sdk.library().deleteStream() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [DeleteStreamRequest](../../models/operations/DeleteStreamRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteStreamResponse](../../models/operations/DeleteStreamResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getStream + +Get a stream (such as a sidecar subtitle stream) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetStreamRequest; +import dev.plexapi.sdk.models.operations.GetStreamResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetStreamRequest req = GetStreamRequest.builder() + .streamId(314506L) + .ext("") + .autoAdjustSubtitle(BoolInt.ONE) + .build(); + + GetStreamResponse res = sdk.library().getStream() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [GetStreamRequest](../../models/operations/GetStreamRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetStreamResponse](../../models/operations/GetStreamResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## setStreamOffset + +Set a stream offset in ms. This may not be respected by all clients + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.SetStreamOffsetRequest; +import dev.plexapi.sdk.models.operations.SetStreamOffsetResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetStreamOffsetRequest req = SetStreamOffsetRequest.builder() + .streamId(606295L) + .ext("") + .build(); + + SetStreamOffsetResponse res = sdk.library().setStreamOffset() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [SetStreamOffsetRequest](../../models/operations/SetStreamOffsetRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SetStreamOffsetResponse](../../models/operations/SetStreamOffsetResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getItemArtwork + +Get the artwork, thumb, element for a metadata item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetItemArtworkRequest req = GetItemArtworkRequest.builder() + .ids("") + .element(GetItemArtworkPathParamElement.POSTER) + .timestamp(999555L) + .build(); + + GetItemArtworkResponse res = sdk.library().getItemArtwork() + .request(req) + .call(); + + if (res.twoHundredAudioMpeg3ResponseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [GetItemArtworkRequest](../../models/operations/GetItemArtworkRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetItemArtworkResponse](../../models/operations/GetItemArtworkResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getMediaPart + +Get a media part for streaming or download. + - streaming: This is the default scenario. Bandwidth usage on this endpoint will be guaranteed (on the server's end) to be at least the bandwidth reservation given in the decision. If no decision exists, an ad-hoc decision will be created if sufficient bandwidth exists. Clients should not rely on ad-hoc decisions being made as this may be removed in the future. + - download: Indicated if the query parameter indicates this is a download. Bandwidth will be prioritized behind playbacks and will get a fair share of what remains. + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetMediaPartRequest; +import dev.plexapi.sdk.models.operations.GetMediaPartResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetMediaPartRequest req = GetMediaPartRequest.builder() + .partId(877105L) + .changestamp(970622L) + .filename("example.file") + .download(BoolInt.ONE) + .build(); + + GetMediaPartResponse res = sdk.library().getMediaPart() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [GetMediaPartRequest](../../models/operations/GetMediaPartRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetMediaPartResponse](../../models/operations/GetMediaPartResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getImageFromBif + +Extract an image from the BIF for a part at a particular offset + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetImageFromBifRequest req = GetImageFromBifRequest.builder() + .partId(304273L) + .index(PathParamIndex.SD) + .offset(939569L) + .build(); + + GetImageFromBifResponse res = sdk.library().getImageFromBif() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetImageFromBifRequest](../../models/operations/GetImageFromBifRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetImageFromBifResponse](../../models/operations/GetImageFromBifResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/librarycollections/README.md b/docs/sdks/librarycollections/README.md new file mode 100644 index 00000000..b867485c --- /dev/null +++ b/docs/sdks/librarycollections/README.md @@ -0,0 +1,213 @@ +# LibraryCollections +(*libraryCollections()*) + +## Overview + +Endpoints for manipulating collections. In addition to these endpoints, `/library/collections/:collectionId/X` will be rerouted to `/library/metadata/:collectionId/X` and respond to those endpoints as well. + +### Available Operations + +* [addCollectionItems](#addcollectionitems) - Add items to a collection +* [deleteCollectionItem](#deletecollectionitem) - Delete an item from a collection +* [moveCollectionItem](#movecollectionitem) - Reorder an item in the collection + +## addCollectionItems + +Add items to a collection by uri + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AddCollectionItemsRequest; +import dev.plexapi.sdk.models.operations.AddCollectionItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddCollectionItemsRequest req = AddCollectionItemsRequest.builder() + .collectionId(338144L) + .uri("https://expensive-bakeware.com") + .build(); + + AddCollectionItemsResponse res = sdk.libraryCollections().addCollectionItems() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [AddCollectionItemsRequest](../../models/operations/AddCollectionItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddCollectionItemsResponse](../../models/operations/AddCollectionItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteCollectionItem + +Delete an item from a collection + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteCollectionItemRequest; +import dev.plexapi.sdk.models.operations.DeleteCollectionItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteCollectionItemRequest req = DeleteCollectionItemRequest.builder() + .collectionId(320928L) + .itemId(406983L) + .build(); + + DeleteCollectionItemResponse res = sdk.libraryCollections().deleteCollectionItem() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [DeleteCollectionItemRequest](../../models/operations/DeleteCollectionItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteCollectionItemResponse](../../models/operations/DeleteCollectionItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## moveCollectionItem + +Reorder items in a collection with one item after another + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.MoveCollectionItemRequest; +import dev.plexapi.sdk.models.operations.MoveCollectionItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MoveCollectionItemRequest req = MoveCollectionItemRequest.builder() + .collectionId(239532L) + .itemId(513864L) + .build(); + + MoveCollectionItemResponse res = sdk.libraryCollections().moveCollectionItem() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [MoveCollectionItemRequest](../../models/operations/MoveCollectionItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[MoveCollectionItemResponse](../../models/operations/MoveCollectionItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/libraryplaylists/README.md b/docs/sdks/libraryplaylists/README.md new file mode 100644 index 00000000..c31f7eaf --- /dev/null +++ b/docs/sdks/libraryplaylists/README.md @@ -0,0 +1,813 @@ +# LibraryPlaylists +(*libraryPlaylists()*) + +## Overview + +Endpoints for manipulating playlists. + +### Available Operations + +* [createPlaylist](#createplaylist) - Create a Playlist +* [uploadPlaylist](#uploadplaylist) - Upload +* [deletePlaylist](#deleteplaylist) - Delete a Playlist +* [updatePlaylist](#updateplaylist) - Editing a Playlist +* [getPlaylistGenerators](#getplaylistgenerators) - Get a playlist's generators +* [clearPlaylistItems](#clearplaylistitems) - Clearing a playlist +* [addPlaylistItems](#addplaylistitems) - Adding to a Playlist +* [deletePlaylistItem](#deleteplaylistitem) - Delete a Generator +* [getPlaylistGenerator](#getplaylistgenerator) - Get a playlist generator +* [getPlaylistGeneratorItems](#getplaylistgeneratoritems) - Get a playlist generator's items +* [movePlaylistItem](#moveplaylistitem) - Moving items in a playlist +* [refreshPlaylist](#refreshplaylist) - Reprocess a generator + +## createPlaylist + +Create a new playlist. By default the playlist is blank. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.CreatePlaylistRequest; +import dev.plexapi.sdk.models.operations.CreatePlaylistResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreatePlaylistRequest req = CreatePlaylistRequest.builder() + .uri("https://short-term-disconnection.name/") + .build(); + + CreatePlaylistResponse res = sdk.libraryPlaylists().createPlaylist() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [CreatePlaylistRequest](../../models/operations/CreatePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreatePlaylistResponse](../../models/operations/CreatePlaylistResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## uploadPlaylist + +Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.UploadPlaylistRequest; +import dev.plexapi.sdk.models.operations.UploadPlaylistResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UploadPlaylistRequest req = UploadPlaylistRequest.builder() + .path("/home/barkley/playlist.m3u") + .force(BoolInt.ONE) + .build(); + + UploadPlaylistResponse res = sdk.libraryPlaylists().uploadPlaylist() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [UploadPlaylistRequest](../../models/operations/UploadPlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UploadPlaylistResponse](../../models/operations/UploadPlaylistResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deletePlaylist + +Deletes a playlist by provided id + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeletePlaylistRequest; +import dev.plexapi.sdk.models.operations.DeletePlaylistResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeletePlaylistRequest req = DeletePlaylistRequest.builder() + .playlistId(343293L) + .build(); + + DeletePlaylistResponse res = sdk.libraryPlaylists().deletePlaylist() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [DeletePlaylistRequest](../../models/operations/DeletePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeletePlaylistResponse](../../models/operations/DeletePlaylistResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## updatePlaylist + +Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.UpdatePlaylistRequest; +import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UpdatePlaylistRequest req = UpdatePlaylistRequest.builder() + .playlistId(157966L) + .build(); + + UpdatePlaylistResponse res = sdk.libraryPlaylists().updatePlaylist() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [UpdatePlaylistRequest](../../models/operations/UpdatePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UpdatePlaylistResponse](../../models/operations/UpdatePlaylistResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPlaylistGenerators + +Get all the generators in a playlist + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPlaylistGeneratorsRequest req = GetPlaylistGeneratorsRequest.builder() + .playlistId(162342L) + .build(); + + GetPlaylistGeneratorsResponse res = sdk.libraryPlaylists().getPlaylistGenerators() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [GetPlaylistGeneratorsRequest](../../models/operations/GetPlaylistGeneratorsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPlaylistGeneratorsResponse](../../models/operations/GetPlaylistGeneratorsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## clearPlaylistItems + +Clears a playlist, only works with dumb playlists. Returns the playlist. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ClearPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.ClearPlaylistItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ClearPlaylistItemsRequest req = ClearPlaylistItemsRequest.builder() + .playlistId(552140L) + .build(); + + ClearPlaylistItemsResponse res = sdk.libraryPlaylists().clearPlaylistItems() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [ClearPlaylistItemsRequest](../../models/operations/ClearPlaylistItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ClearPlaylistItemsResponse](../../models/operations/ClearPlaylistItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## addPlaylistItems + +Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AddPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.AddPlaylistItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddPlaylistItemsRequest req = AddPlaylistItemsRequest.builder() + .playlistId(533723L) + .build(); + + AddPlaylistItemsResponse res = sdk.libraryPlaylists().addPlaylistItems() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [AddPlaylistItemsRequest](../../models/operations/AddPlaylistItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddPlaylistItemsResponse](../../models/operations/AddPlaylistItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deletePlaylistItem + +Deletes an item from a playlist. Only works with dumb playlists. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeletePlaylistItemRequest; +import dev.plexapi.sdk.models.operations.DeletePlaylistItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeletePlaylistItemRequest req = DeletePlaylistItemRequest.builder() + .playlistId(981646L) + .generatorId(194010L) + .build(); + + DeletePlaylistItemResponse res = sdk.libraryPlaylists().deletePlaylistItem() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [DeletePlaylistItemRequest](../../models/operations/DeletePlaylistItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeletePlaylistItemResponse](../../models/operations/DeletePlaylistItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPlaylistGenerator + +Get a playlist's generator. Only used for optimized versions + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPlaylistGeneratorRequest req = GetPlaylistGeneratorRequest.builder() + .playlistId(744880L) + .generatorId(322168L) + .build(); + + GetPlaylistGeneratorResponse res = sdk.libraryPlaylists().getPlaylistGenerator() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [GetPlaylistGeneratorRequest](../../models/operations/GetPlaylistGeneratorRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPlaylistGeneratorResponse](../../models/operations/GetPlaylistGeneratorResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPlaylistGeneratorItems + +Get a playlist generator's items + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPlaylistGeneratorItemsRequest req = GetPlaylistGeneratorItemsRequest.builder() + .playlistId(77230L) + .generatorId(979714L) + .build(); + + GetPlaylistGeneratorItemsResponse res = sdk.libraryPlaylists().getPlaylistGeneratorItems() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `request` | [GetPlaylistGeneratorItemsRequest](../../models/operations/GetPlaylistGeneratorItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPlaylistGeneratorItemsResponse](../../models/operations/GetPlaylistGeneratorItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## movePlaylistItem + +Moves an item in a playlist. Only works with dumb playlists. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.MovePlaylistItemRequest; +import dev.plexapi.sdk.models.operations.MovePlaylistItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MovePlaylistItemRequest req = MovePlaylistItemRequest.builder() + .playlistId(940298L) + .playlistItemId(375626L) + .build(); + + MovePlaylistItemResponse res = sdk.libraryPlaylists().movePlaylistItem() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [MovePlaylistItemRequest](../../models/operations/MovePlaylistItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[MovePlaylistItemResponse](../../models/operations/MovePlaylistItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## refreshPlaylist + +Make a generator reprocess (refresh) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RefreshPlaylistRequest req = RefreshPlaylistRequest.builder() + .playlistId(895314L) + .generatorId(629742L) + .metadataId(724422L) + .action(Action.DISABLE) + .build(); + + RefreshPlaylistResponse res = sdk.libraryPlaylists().refreshPlaylist() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [RefreshPlaylistRequest](../../models/operations/RefreshPlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[RefreshPlaylistResponse](../../models/operations/RefreshPlaylistResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/livetv/README.md b/docs/sdks/livetv/README.md new file mode 100644 index 00000000..1f576df4 --- /dev/null +++ b/docs/sdks/livetv/README.md @@ -0,0 +1,253 @@ +# LiveTV +(*liveTV()*) + +## Overview + +LiveTV contains the playback sessions of a channel from a DVR device + + +### Available Operations + +* [getSessions](#getsessions) - Get all sessions +* [getLiveTVSession](#getlivetvsession) - Get a single session +* [getSessionPlaylistIndex](#getsessionplaylistindex) - Get a session playlist index +* [getSessionSegment](#getsessionsegment) - Get a single session segment + +## getSessions + +Get all livetv sessions and metadata + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSessionsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSessionsResponse res = sdk.liveTV().getSessions() + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[GetSessionsResponse](../../models/operations/GetSessionsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getLiveTVSession + +Get a single livetv session and metadata + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetLiveTVSessionRequest; +import dev.plexapi.sdk.models.operations.GetLiveTVSessionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetLiveTVSessionRequest req = GetLiveTVSessionRequest.builder() + .sessionId("") + .build(); + + GetLiveTVSessionResponse res = sdk.liveTV().getLiveTVSession() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [GetLiveTVSessionRequest](../../models/operations/GetLiveTVSessionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetLiveTVSessionResponse](../../models/operations/GetLiveTVSessionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSessionPlaylistIndex + +Get a playlist index for playing this session + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexRequest; +import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSessionPlaylistIndexRequest req = GetSessionPlaylistIndexRequest.builder() + .sessionId("") + .consumerId("") + .build(); + + GetSessionPlaylistIndexResponse res = sdk.liveTV().getSessionPlaylistIndex() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `request` | [GetSessionPlaylistIndexRequest](../../models/operations/GetSessionPlaylistIndexRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSessionPlaylistIndexResponse](../../models/operations/GetSessionPlaylistIndexResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSessionSegment + +Get a single LiveTV session segment + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSessionSegmentRequest; +import dev.plexapi.sdk.models.operations.GetSessionSegmentResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSessionSegmentRequest req = GetSessionSegmentRequest.builder() + .sessionId("") + .consumerId("") + .segmentId("") + .build(); + + GetSessionSegmentResponse res = sdk.liveTV().getSessionSegment() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [GetSessionSegmentRequest](../../models/operations/GetSessionSegmentRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSessionSegmentResponse](../../models/operations/GetSessionSegmentResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index 1b651bbb..fe8ca3c0 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -3,121 +3,107 @@ ## Overview -Submit logs to the Log Handler for Plex Media Server - +Logging mechanism to allow clients to log to the server ### Available Operations -* [logLine](#logline) - Logging a single line message. -* [logMultiLine](#logmultiline) - Logging a multi-line message -* [enablePaperTrail](#enablepapertrail) - Enabling Papertrail +* [writeLog](#writelog) - Logging a multi-line message to the Plex Media Server log +* [writeMessage](#writemessage) - Logging a single-line message to the Plex Media Server log +* [enablePapertrail](#enablepapertrail) - Enabling Papertrail -## logLine +## writeLog -This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. +This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.LogLineBadRequest; -import dev.plexapi.sdk.models.errors.LogLineUnauthorized; -import dev.plexapi.sdk.models.operations.Level; -import dev.plexapi.sdk.models.operations.LogLineResponse; +import dev.plexapi.sdk.models.operations.WriteLogResponse; +import dev.plexapi.sdk.utils.Utils; +import java.io.FileInputStream; import java.lang.Exception; public class Application { - public static void main(String[] args) throws LogLineBadRequest, LogLineUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - LogLineResponse res = sdk.log().logLine() - .level(Level.THREE) - .message("Test log message") - .source("Postman") + byte[] req = Utils.readBytesAndClose(new FileInputStream("example.file")); + + WriteLogResponse res = sdk.log().writeLog() + .request(req) .call(); - // handle response } } ``` ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `level` | [Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
| | -| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message | -| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman | +| Parameter | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `request` | [byte[]](../../models//.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[LogLineResponse](../../models/operations/LogLineResponse.md)** +**[WriteLogResponse](../../models/operations/WriteLogResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| models/errors/LogLineBadRequest | 400 | application/json | -| models/errors/LogLineUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | -## logMultiLine +## writeMessage -This endpoint allows for the batch addition of log entries to the main Plex Media Server log. -It accepts a text/plain request body, where each line represents a distinct log entry. -Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. +This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. -Log entries are separated by a newline character (`\n`). -Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. -This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. - -The 'level' parameter specifies the log entry's severity or importance, with the following integer values: -- `0`: Error - Critical issues that require immediate attention. -- `1`: Warning - Important events that are not critical but may indicate potential issues. -- `2`: Info - General informational messages about system operation. -- `3`: Debug - Detailed information useful for debugging purposes. -- `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. - -The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). - -Example of a single log entry format: -`level=4&message=Sample%20log%20entry&source=applicationName` - -Ensure each parameter is properly URL-encoded to avoid interpretation issues. +Note: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.LogMultiLineBadRequest; -import dev.plexapi.sdk.models.errors.LogMultiLineUnauthorized; -import dev.plexapi.sdk.models.operations.LogMultiLineResponse; +import dev.plexapi.sdk.models.operations.WriteMessageRequest; +import dev.plexapi.sdk.models.operations.WriteMessageResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; -import java.lang.String; public class Application { - public static void main(String[] args) throws LogMultiLineBadRequest, LogMultiLineUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman"; + WriteMessageRequest req = WriteMessageRequest.builder() + .build(); - LogMultiLineResponse res = sdk.log().logMultiLine() + WriteMessageResponse res = sdk.log().writeMessage() .request(req) .call(); @@ -128,48 +114,63 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `request` | [String](../../models//.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [WriteMessageRequest](../../models/operations/WriteMessageRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[LogMultiLineResponse](../../models/operations/LogMultiLineResponse.md)** +**[WriteMessageResponse](../../models/operations/WriteMessageResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/LogMultiLineBadRequest | 400 | application/json | -| models/errors/LogMultiLineUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | -## enablePaperTrail +## enablePapertrail -This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. +This endpoint will enable all Plex Media Server logs to be sent to the Papertrail networked logging site for a period of time + +Note: This endpoint responds to all HTTP verbs but POST is preferred ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest; -import dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized; -import dev.plexapi.sdk.models.operations.EnablePaperTrailResponse; +import dev.plexapi.sdk.models.operations.EnablePapertrailRequest; +import dev.plexapi.sdk.models.operations.EnablePapertrailResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws EnablePaperTrailBadRequest, EnablePaperTrailUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - EnablePaperTrailResponse res = sdk.log().enablePaperTrail() + EnablePapertrailRequest req = EnablePapertrailRequest.builder() + .build(); + + EnablePapertrailResponse res = sdk.log().enablePapertrail() + .request(req) .call(); // handle response @@ -177,14 +178,18 @@ public class Application { } ``` +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [EnablePapertrailRequest](../../models/operations/EnablePapertrailRequest.md) | :heavy_check_mark: | The request object to use for the request. | + ### Response -**[EnablePaperTrailResponse](../../models/operations/EnablePaperTrailResponse.md)** +**[EnablePapertrailResponse](../../models/operations/EnablePapertrailResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/EnablePaperTrailBadRequest | 400 | application/json | -| models/errors/EnablePaperTrailUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md deleted file mode 100644 index 27f10d27..00000000 --- a/docs/sdks/media/README.md +++ /dev/null @@ -1,299 +0,0 @@ -# Media -(*media()*) - -## Overview - -API Calls interacting with Plex Media Server Media - - -### Available Operations - -* [markPlayed](#markplayed) - Mark Media Played -* [markUnplayed](#markunplayed) - Mark Media Unplayed -* [updatePlayProgress](#updateplayprogress) - Update Media Play Progress -* [getBannerImage](#getbannerimage) - Get Banner Image -* [getThumbImage](#getthumbimage) - Get Thumb Image - -## markPlayed - -This will mark the provided media key as Played. - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.MarkPlayedBadRequest; -import dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized; -import dev.plexapi.sdk.models.operations.MarkPlayedResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws MarkPlayedBadRequest, MarkPlayedUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - MarkPlayedResponse res = sdk.media().markPlayed() - .key(59398d) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `key` | *double* | :heavy_check_mark: | The media key to mark as played | 59398 | - -### Response - -**[MarkPlayedResponse](../../models/operations/MarkPlayedResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| models/errors/MarkPlayedBadRequest | 400 | application/json | -| models/errors/MarkPlayedUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## markUnplayed - -This will mark the provided media key as Unplayed. - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.MarkUnplayedBadRequest; -import dev.plexapi.sdk.models.errors.MarkUnplayedUnauthorized; -import dev.plexapi.sdk.models.operations.MarkUnplayedResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws MarkUnplayedBadRequest, MarkUnplayedUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - MarkUnplayedResponse res = sdk.media().markUnplayed() - .key(59398d) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `key` | *double* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 | - -### Response - -**[MarkUnplayedResponse](../../models/operations/MarkUnplayedResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/MarkUnplayedBadRequest | 400 | application/json | -| models/errors/MarkUnplayedUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## updatePlayProgress - -This API command can be used to update the play progress of a media item. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest; -import dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized; -import dev.plexapi.sdk.models.operations.UpdatePlayProgressResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws UpdatePlayProgressBadRequest, UpdatePlayProgressUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - UpdatePlayProgressResponse res = sdk.media().updatePlayProgress() - .key("") - .time(90000d) - .state("played") - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `key` | *String* | :heavy_check_mark: | the media key | | -| `time` | *double* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 | -| `state` | *String* | :heavy_check_mark: | The playback state of the media item. | played | - -### Response - -**[UpdatePlayProgressResponse](../../models/operations/UpdatePlayProgressResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| models/errors/UpdatePlayProgressBadRequest | 400 | application/json | -| models/errors/UpdatePlayProgressUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getBannerImage - -Gets the banner image of the media item - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetBannerImageBadRequest; -import dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized; -import dev.plexapi.sdk.models.operations.GetBannerImageRequest; -import dev.plexapi.sdk.models.operations.GetBannerImageResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetBannerImageBadRequest, GetBannerImageUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetBannerImageRequest req = GetBannerImageRequest.builder() - .ratingKey(9518L) - .width(396L) - .height(396L) - .minSize(1L) - .upscale(1L) - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .build(); - - GetBannerImageResponse res = sdk.media().getBannerImage() - .request(req) - .call(); - - if (res.responseStream().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `request` | [GetBannerImageRequest](../../models/operations/GetBannerImageRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[GetBannerImageResponse](../../models/operations/GetBannerImageResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/GetBannerImageBadRequest | 400 | application/json | -| models/errors/GetBannerImageUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getThumbImage - -Gets the thumbnail image of the media item - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetThumbImageBadRequest; -import dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized; -import dev.plexapi.sdk.models.operations.GetThumbImageRequest; -import dev.plexapi.sdk.models.operations.GetThumbImageResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetThumbImageBadRequest, GetThumbImageUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetThumbImageRequest req = GetThumbImageRequest.builder() - .ratingKey(9518L) - .width(396L) - .height(396L) - .minSize(1L) - .upscale(1L) - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .build(); - - GetThumbImageResponse res = sdk.media().getThumbImage() - .request(req) - .call(); - - if (res.responseStream().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `request` | [GetThumbImageRequest](../../models/operations/GetThumbImageRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[GetThumbImageResponse](../../models/operations/GetThumbImageResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/GetThumbImageBadRequest | 400 | application/json | -| models/errors/GetThumbImageUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/playlist/README.md b/docs/sdks/playlist/README.md new file mode 100644 index 00000000..79bbae96 --- /dev/null +++ b/docs/sdks/playlist/README.md @@ -0,0 +1,210 @@ +# Playlist +(*playlist()*) + +## Overview + +Media playlists that can be created and played back + +### Available Operations + +* [listPlaylists](#listplaylists) - List playlists +* [getPlaylist](#getplaylist) - Retrieve Playlist +* [getPlaylistItems](#getplaylistitems) - Retrieve Playlist Contents + +## listPlaylists + +Gets a list of playlists and playlist folders for a user. General filters are permitted, such as `sort=lastViewedAt:desc`. A flat playlist list can be retrieved using `type=15` to limit the collection to just playlists. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListPlaylistsRequest; +import dev.plexapi.sdk.models.operations.ListPlaylistsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListPlaylistsRequest req = ListPlaylistsRequest.builder() + .build(); + + ListPlaylistsResponse res = sdk.playlist().listPlaylists() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [ListPlaylistsRequest](../../models/operations/ListPlaylistsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListPlaylistsResponse](../../models/operations/ListPlaylistsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPlaylist + +Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: +Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetPlaylistRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPlaylistRequest req = GetPlaylistRequest.builder() + .playlistId(841953L) + .build(); + + GetPlaylistResponse res = sdk.playlist().getPlaylist() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [GetPlaylistRequest](../../models/operations/GetPlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPlaylistResponse](../../models/operations/GetPlaylistResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPlaylistItems + +Gets the contents of a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistItemsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPlaylistItemsRequest req = GetPlaylistItemsRequest.builder() + .playlistId(118195L) + .build(); + + GetPlaylistItemsResponse res = sdk.playlist().getPlaylistItems() + .request(req) + .call(); + + if (res.mediaContainerWithMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [GetPlaylistItemsRequest](../../models/operations/GetPlaylistItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPlaylistItemsResponse](../../models/operations/GetPlaylistItemsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md deleted file mode 100644 index 3857b2de..00000000 --- a/docs/sdks/playlists/README.md +++ /dev/null @@ -1,527 +0,0 @@ -# Playlists -(*playlists()*) - -## Overview - -Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). -They can be organized in (optionally nesting) folders. -Retrieving a playlist, or its items, will trigger a refresh of its metadata. -This may cause the duration and number of items to change. - - -### Available Operations - -* [createPlaylist](#createplaylist) - Create a Playlist -* [getPlaylists](#getplaylists) - Get All Playlists -* [getPlaylist](#getplaylist) - Retrieve Playlist -* [deletePlaylist](#deleteplaylist) - Deletes a Playlist -* [updatePlaylist](#updateplaylist) - Update a Playlist -* [getPlaylistContents](#getplaylistcontents) - Retrieve Playlist Contents -* [clearPlaylistContents](#clearplaylistcontents) - Delete Playlist Contents -* [addPlaylistContents](#addplaylistcontents) - Adding to a Playlist -* [uploadPlaylist](#uploadplaylist) - Upload Playlist - -## createPlaylist - -Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: -- `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). -- `playQueueID` - To create a playlist from an existing play queue. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest; -import dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized; -import dev.plexapi.sdk.models.operations.*; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws CreatePlaylistBadRequest, CreatePlaylistUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - CreatePlaylistRequest req = CreatePlaylistRequest.builder() - .title("") - .type(CreatePlaylistQueryParamType.AUDIO) - .smart(Smart.ONE) - .uri("https://short-term-disconnection.name/") - .build(); - - CreatePlaylistResponse res = sdk.playlists().createPlaylist() - .request(req) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `request` | [CreatePlaylistRequest](../../models/operations/CreatePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[CreatePlaylistResponse](../../models/operations/CreatePlaylistResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/CreatePlaylistBadRequest | 400 | application/json | -| models/errors/CreatePlaylistUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getPlaylists - -Get All Playlists given the specified filters. - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest; -import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized; -import dev.plexapi.sdk.models.operations.GetPlaylistsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetPlaylistsBadRequest, GetPlaylistsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetPlaylistsResponse res = sdk.playlists().getPlaylists() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `playlistType` | [Optional\](../../models/operations/PlaylistType.md) | :heavy_minus_sign: | limit to a type of playlist. | -| `smart` | [Optional\](../../models/operations/QueryParamSmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). | - -### Response - -**[GetPlaylistsResponse](../../models/operations/GetPlaylistsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/GetPlaylistsBadRequest | 400 | application/json | -| models/errors/GetPlaylistsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getPlaylist - -Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: -Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetPlaylistBadRequest; -import dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized; -import dev.plexapi.sdk.models.operations.GetPlaylistResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetPlaylistBadRequest, GetPlaylistUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetPlaylistResponse res = sdk.playlists().getPlaylist() - .playlistID(8419.53) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | - -### Response - -**[GetPlaylistResponse](../../models/operations/GetPlaylistResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models/errors/GetPlaylistBadRequest | 400 | application/json | -| models/errors/GetPlaylistUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## deletePlaylist - -This endpoint will delete a playlist - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.DeletePlaylistBadRequest; -import dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized; -import dev.plexapi.sdk.models.operations.DeletePlaylistResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws DeletePlaylistBadRequest, DeletePlaylistUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - DeletePlaylistResponse res = sdk.playlists().deletePlaylist() - .playlistID(3432.93) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | - -### Response - -**[DeletePlaylistResponse](../../models/operations/DeletePlaylistResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/DeletePlaylistBadRequest | 400 | application/json | -| models/errors/DeletePlaylistUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## updatePlaylist - -From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.UpdatePlaylistBadRequest; -import dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized; -import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws UpdatePlaylistBadRequest, UpdatePlaylistUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - UpdatePlaylistResponse res = sdk.playlists().updatePlaylist() - .playlistID(1579.66) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | -| `title` | *Optional\* | :heavy_minus_sign: | name of the playlist | -| `summary` | *Optional\* | :heavy_minus_sign: | summary description of the playlist | - -### Response - -**[UpdatePlaylistResponse](../../models/operations/UpdatePlaylistResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/UpdatePlaylistBadRequest | 400 | application/json | -| models/errors/UpdatePlaylistUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getPlaylistContents - -Gets the contents of a playlist. Should be paged by clients via standard mechanisms. -By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. -For example, you could use this to display a list of recently added albums vis a smart playlist. -Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetPlaylistContentsBadRequest; -import dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsQueryParamType; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetPlaylistContentsBadRequest, GetPlaylistContentsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents() - .playlistID(5535.42) - .type(GetPlaylistContentsQueryParamType.TvShow) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | | -| `type` | [GetPlaylistContentsQueryParamType](../../models/operations/GetPlaylistContentsQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | - -### Response - -**[GetPlaylistContentsResponse](../../models/operations/GetPlaylistContentsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetPlaylistContentsBadRequest | 400 | application/json | -| models/errors/GetPlaylistContentsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## clearPlaylistContents - -Clears a playlist, only works with dumb playlists. Returns the playlist. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.ClearPlaylistContentsBadRequest; -import dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized; -import dev.plexapi.sdk.models.operations.ClearPlaylistContentsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws ClearPlaylistContentsBadRequest, ClearPlaylistContentsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents() - .playlistID(4137.37) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | - -### Response - -**[ClearPlaylistContentsResponse](../../models/operations/ClearPlaylistContentsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| models/errors/ClearPlaylistContentsBadRequest | 400 | application/json | -| models/errors/ClearPlaylistContentsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## addPlaylistContents - -Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. -With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.AddPlaylistContentsBadRequest; -import dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws AddPlaylistContentsBadRequest, AddPlaylistContentsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents() - .playlistID(7013.44) - .uri("server://12345/com.plexapp.plugins.library/library/metadata/1") - .playQueueID(123d) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `playlistID` | *double* | :heavy_check_mark: | the ID of the playlist | | -| `uri` | *String* | :heavy_check_mark: | the content URI for the playlist | server://12345/com.plexapp.plugins.library/library/metadata/1 | -| `playQueueID` | *Optional\* | :heavy_minus_sign: | the play queue to add to a playlist | 123 | - -### Response - -**[AddPlaylistContentsResponse](../../models/operations/AddPlaylistContentsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/AddPlaylistContentsBadRequest | 400 | application/json | -| models/errors/AddPlaylistContentsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## uploadPlaylist - -Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.UploadPlaylistBadRequest; -import dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized; -import dev.plexapi.sdk.models.operations.QueryParamForce; -import dev.plexapi.sdk.models.operations.UploadPlaylistResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws UploadPlaylistBadRequest, UploadPlaylistUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - UploadPlaylistResponse res = sdk.playlists().uploadPlaylist() - .path("/home/barkley/playlist.m3u") - .force(QueryParamForce.ONE) - .sectionID(1L) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
| /home/barkley/playlist.m3u | -| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
| | -| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 | - -### Response - -**[UploadPlaylistResponse](../../models/operations/UploadPlaylistResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/UploadPlaylistBadRequest | 400 | application/json | -| models/errors/UploadPlaylistUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/playqueue/README.md b/docs/sdks/playqueue/README.md new file mode 100644 index 00000000..6d8b042f --- /dev/null +++ b/docs/sdks/playqueue/README.md @@ -0,0 +1,631 @@ +# PlayQueue +(*playQueue()*) + +## Overview + +The playqueue feature within a media provider +A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue. +Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by `playQueueLastAddedItemID` existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed. +You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion. +All created play queues will have an empty "Up Next" area - unless the item is an album and no `key` is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set `key`. This is due to the above implicit queueing of albums when no `key` is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area. +The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item. + +### Available Operations + +* [createPlayQueue](#createplayqueue) - Create a play queue +* [getPlayQueue](#getplayqueue) - Retrieve a play queue +* [addToPlayQueue](#addtoplayqueue) - Add a generator or playlist to a play queue +* [clearPlayQueue](#clearplayqueue) - Clear a play queue +* [resetPlayQueue](#resetplayqueue) - Reset a play queue +* [shuffle](#shuffle) - Shuffle a play queue +* [unshuffle](#unshuffle) - Unshuffle a play queue +* [deletePlayQueueItem](#deleteplayqueueitem) - Delete an item from a play queue +* [movePlayQueueItem](#moveplayqueueitem) - Move an item in a play queue + +## createPlayQueue + +Makes a new play queue for a device. The source of the playqueue can either be a URI, or a playlist. The response is a media container with the initial items in the queue. Each item in the queue will be a regular item but with `playQueueItemID` - a unique ID since the queue could have repeated items with the same `ratingKey`. +Note: Either `uri` or `playlistID` must be specified + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreatePlayQueueRequest req = CreatePlayQueueRequest.builder() + .type(Type.AUDIO) + .shuffle(BoolInt.ONE) + .repeat(BoolInt.ONE) + .continuous(BoolInt.ONE) + .recursive(BoolInt.ONE) + .onDeck(BoolInt.ONE) + .build(); + + CreatePlayQueueResponse res = sdk.playQueue().createPlayQueue() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [CreatePlayQueueRequest](../../models/operations/CreatePlayQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreatePlayQueueResponse](../../models/operations/CreatePlayQueueResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPlayQueue + +Retrieves the play queue, centered at current item. This can be treated as a regular container by play queue-oblivious clients, but they may wish to request a large window onto the queue since they won't know to refresh. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetPlayQueueRequest; +import dev.plexapi.sdk.models.operations.GetPlayQueueResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPlayQueueRequest req = GetPlayQueueRequest.builder() + .playQueueId(210646L) + .own(BoolInt.ONE) + .includeBefore(BoolInt.ONE) + .includeAfter(BoolInt.ONE) + .build(); + + GetPlayQueueResponse res = sdk.playQueue().getPlayQueue() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [GetPlayQueueRequest](../../models/operations/GetPlayQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPlayQueueResponse](../../models/operations/GetPlayQueueResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## addToPlayQueue + +Adds an item to a play queue (e.g. party mode). Increments the version of the play queue. Takes the following parameters (`uri` and `playlistID` are mutually exclusive). Returns the modified play queue. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AddToPlayQueueRequest; +import dev.plexapi.sdk.models.operations.AddToPlayQueueResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddToPlayQueueRequest req = AddToPlayQueueRequest.builder() + .playQueueId(919248L) + .next(BoolInt.ONE) + .build(); + + AddToPlayQueueResponse res = sdk.playQueue().addToPlayQueue() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [AddToPlayQueueRequest](../../models/operations/AddToPlayQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddToPlayQueueResponse](../../models/operations/AddToPlayQueueResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## clearPlayQueue + +Deletes all items in the play queue, and increases the version of the play queue. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ClearPlayQueueRequest; +import dev.plexapi.sdk.models.operations.ClearPlayQueueResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ClearPlayQueueRequest req = ClearPlayQueueRequest.builder() + .playQueueId(86357L) + .build(); + + ClearPlayQueueResponse res = sdk.playQueue().clearPlayQueue() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [ClearPlayQueueRequest](../../models/operations/ClearPlayQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ClearPlayQueueResponse](../../models/operations/ClearPlayQueueResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## resetPlayQueue + +Reset a play queue to the first item being the current item + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ResetPlayQueueRequest; +import dev.plexapi.sdk.models.operations.ResetPlayQueueResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ResetPlayQueueRequest req = ResetPlayQueueRequest.builder() + .playQueueId(581891L) + .build(); + + ResetPlayQueueResponse res = sdk.playQueue().resetPlayQueue() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [ResetPlayQueueRequest](../../models/operations/ResetPlayQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ResetPlayQueueResponse](../../models/operations/ResetPlayQueueResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## shuffle + +Shuffle a play queue (or reshuffles if already shuffled). The currently selected item is maintained. Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ShuffleRequest; +import dev.plexapi.sdk.models.operations.ShuffleResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ShuffleRequest req = ShuffleRequest.builder() + .playQueueId(316150L) + .build(); + + ShuffleResponse res = sdk.playQueue().shuffle() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `request` | [ShuffleRequest](../../models/operations/ShuffleRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ShuffleResponse](../../models/operations/ShuffleResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## unshuffle + +Unshuffles a play queue and restores "natural order". Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.UnshuffleRequest; +import dev.plexapi.sdk.models.operations.UnshuffleResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UnshuffleRequest req = UnshuffleRequest.builder() + .playQueueId(484388L) + .build(); + + UnshuffleResponse res = sdk.playQueue().unshuffle() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [UnshuffleRequest](../../models/operations/UnshuffleRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UnshuffleResponse](../../models/operations/UnshuffleResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deletePlayQueueItem + +Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeletePlayQueueItemRequest; +import dev.plexapi.sdk.models.operations.DeletePlayQueueItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeletePlayQueueItemRequest req = DeletePlayQueueItemRequest.builder() + .playQueueId(285738L) + .playQueueItemId(464354L) + .build(); + + DeletePlayQueueItemResponse res = sdk.playQueue().deletePlayQueueItem() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [DeletePlayQueueItemRequest](../../models/operations/DeletePlayQueueItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeletePlayQueueItemResponse](../../models/operations/DeletePlayQueueItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## movePlayQueueItem + +Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.MovePlayQueueItemRequest; +import dev.plexapi.sdk.models.operations.MovePlayQueueItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MovePlayQueueItemRequest req = MovePlayQueueItemRequest.builder() + .playQueueId(31341L) + .playQueueItemId(495865L) + .build(); + + MovePlayQueueItemResponse res = sdk.playQueue().movePlayQueueItem() + .request(req) + .call(); + + if (res.mediaContainerWithPlaylistMetadata().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [MovePlayQueueItemRequest](../../models/operations/MovePlayQueueItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[MovePlayQueueItemResponse](../../models/operations/MovePlayQueueItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md deleted file mode 100644 index fed5cd76..00000000 --- a/docs/sdks/plex/README.md +++ /dev/null @@ -1,401 +0,0 @@ -# Plex -(*plex()*) - -## Overview - -API Calls that perform operations directly against https://Plex.tv - - -### Available Operations - -* [getCompanionsData](#getcompanionsdata) - Get Companions Data -* [getUserFriends](#getuserfriends) - Get list of friends of the user logged in -* [getGeoData](#getgeodata) - Get Geo Data -* [getHomeData](#gethomedata) - Get Plex Home Data -* [getServerResources](#getserverresources) - Get Server Resources -* [getPin](#getpin) - Get a Pin -* [getTokenByPinId](#gettokenbypinid) - Get Access Token by PinId - -## getCompanionsData - -Get Companions Data - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest; -import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized; -import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetCompanionsDataResponse res = sdk.plex().getCompanionsData() - .call(); - - if (res.responseBodies().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | - -### Response - -**[GetCompanionsDataResponse](../../models/operations/GetCompanionsDataResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetCompanionsDataBadRequest | 400 | application/json | -| models/errors/GetCompanionsDataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getUserFriends - -Get friends of provided auth token. - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetUserFriendsBadRequest; -import dev.plexapi.sdk.models.errors.GetUserFriendsUnauthorized; -import dev.plexapi.sdk.models.operations.GetUserFriendsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetUserFriendsBadRequest, GetUserFriendsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetUserFriendsResponse res = sdk.plex().getUserFriends() - .call(); - - if (res.friends().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | - -### Response - -**[GetUserFriendsResponse](../../models/operations/GetUserFriendsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| models/errors/GetUserFriendsBadRequest | 400 | application/json | -| models/errors/GetUserFriendsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getGeoData - -Returns the geolocation and locale data of the caller - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetGeoDataBadRequest; -import dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized; -import dev.plexapi.sdk.models.operations.GetGeoDataResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetGeoDataBadRequest, GetGeoDataUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .build(); - - GetGeoDataResponse res = sdk.plex().getGeoData() - .call(); - - if (res.geoData().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | - -### Response - -**[GetGeoDataResponse](../../models/operations/GetGeoDataResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| models/errors/GetGeoDataBadRequest | 400 | application/json | -| models/errors/GetGeoDataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getHomeData - -Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetHomeDataBadRequest; -import dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized; -import dev.plexapi.sdk.models.operations.GetHomeDataResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetHomeDataBadRequest, GetHomeDataUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetHomeDataResponse res = sdk.plex().getHomeData() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetHomeDataResponse](../../models/operations/GetHomeDataResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models/errors/GetHomeDataBadRequest | 400 | application/json | -| models/errors/GetHomeDataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getServerResources - -Get Plex server access tokens and server connections - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized; -import dev.plexapi.sdk.models.operations.*; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetServerResourcesBadRequest, GetServerResourcesUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetServerResourcesResponse res = sdk.plex().getServerResources() - .includeHttps(IncludeHttps.Enable) - .includeRelay(IncludeRelay.Enable) - .includeIPv6(IncludeIPv6.Enable) - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .call(); - - if (res.plexDevices().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `includeHttps` | [Optional\](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | -| `includeRelay` | [Optional\](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | -| `includeIPv6` | [Optional\](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | -| `clientID` | *String* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | - -### Response - -**[GetServerResourcesResponse](../../models/operations/GetServerResourcesResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| models/errors/GetServerResourcesBadRequest | 400 | application/json | -| models/errors/GetServerResourcesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getPin - -Retrieve a Pin ID from Plex.tv to use for authentication flows - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetPinBadRequest; -import dev.plexapi.sdk.models.operations.GetPinRequest; -import dev.plexapi.sdk.models.operations.GetPinResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetPinBadRequest, Exception { - - PlexAPI sdk = PlexAPI.builder() - .build(); - - GetPinRequest req = GetPinRequest.builder() - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .clientName("Plex for Roku") - .deviceNickname("Roku 3") - .clientVersion("2.4.1") - .platform("Roku") - .build(); - - GetPinResponse res = sdk.plex().getPin() - .request(req) - .call(); - - if (res.authPinContainer().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `request` | [GetPinRequest](../../models/operations/GetPinRequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | - -### Response - -**[GetPinResponse](../../models/operations/GetPinResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| models/errors/GetPinBadRequest | 400 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getTokenByPinId - -Retrieve an Access Token from Plex.tv after the Pin has been authenticated - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest; -import dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdRequest; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetTokenByPinIdBadRequest, GetTokenByPinIdResponseBody, Exception { - - PlexAPI sdk = PlexAPI.builder() - .build(); - - GetTokenByPinIdRequest req = GetTokenByPinIdRequest.builder() - .pinID(232248L) - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .clientName("Plex for Roku") - .deviceNickname("Roku 3") - .clientVersion("2.4.1") - .platform("Roku") - .build(); - - GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId() - .request(req) - .call(); - - if (res.authPinContainer().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `request` | [GetTokenByPinIdRequest](../../models/operations/GetTokenByPinIdRequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | - -### Response - -**[GetTokenByPinIdResponse](../../models/operations/GetTokenByPinIdResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/GetTokenByPinIdBadRequest | 400 | application/json | -| models/errors/GetTokenByPinIdResponseBody | 404 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/plexapi/README.md b/docs/sdks/plexapi/README.md index 1e395e44..2775fa5d 100644 --- a/docs/sdks/plexapi/README.md +++ b/docs/sdks/plexapi/README.md @@ -2,30 +2,4 @@ ## Overview -# Plex Media Server OpenAPI Specification - -An Open Source OpenAPI Specification for Plex Media Server - -Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/) - -## Documentation - -[API Documentation](https://plexapi.dev) - -## SDKs - -The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec). - -| Language | Repository | Releases | Other | -| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- | -| Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - | -| JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - | -| Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) | -| Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - | -| Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - | -| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - | -| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - | -| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | - - - ### Available Operations diff --git a/docs/sdks/preferences/README.md b/docs/sdks/preferences/README.md new file mode 100644 index 00000000..ffd2e16c --- /dev/null +++ b/docs/sdks/preferences/README.md @@ -0,0 +1,183 @@ +# Preferences +(*preferences()*) + +## Overview + +API Operations against the Preferences + +### Available Operations + +* [getAllPreferences](#getallpreferences) - Get all preferences +* [setPreferences](#setpreferences) - Set preferences +* [getPreference](#getpreference) - Get a preferences + +## getAllPreferences + +Get the list of all preferences + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetAllPreferencesResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAllPreferencesResponse res = sdk.preferences().getAllPreferences() + .call(); + + if (res.mediaContainerWithSettings().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[GetAllPreferencesResponse](../../models/operations/GetAllPreferencesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## setPreferences + +Set a set of preferences in query parameters + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetPreferencesRequest req = SetPreferencesRequest.builder() + .prefs(Prefs.builder() + .build()) + .build(); + + SetPreferencesResponse res = sdk.preferences().setPreferences() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [SetPreferencesRequest](../../models/operations/SetPreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SetPreferencesResponse](../../models/operations/SetPreferencesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getPreference + +Get a single preference and value + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetPreferenceRequest; +import dev.plexapi.sdk.models.operations.GetPreferenceResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetPreferenceRequest req = GetPreferenceRequest.builder() + .build(); + + GetPreferenceResponse res = sdk.preferences().getPreference() + .request(req) + .call(); + + if (res.mediaContainerWithSettings().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [GetPreferenceRequest](../../models/operations/GetPreferenceRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetPreferenceResponse](../../models/operations/GetPreferenceResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/provider/README.md b/docs/sdks/provider/README.md new file mode 100644 index 00000000..ef673df7 --- /dev/null +++ b/docs/sdks/provider/README.md @@ -0,0 +1,223 @@ +# Provider +(*provider()*) + +## Overview + +Media providers are the starting points for the entire Plex Media Server media library API. It defines the paths for the groups of endpoints. The `/media/providers` should be the only hard-coded path in clients when accessing the media library. Non-media library endpoints are outside the scope of the media provider. See the description in See [the section in API Info](#section/API-Info/Media-Providers) for more information on how to use media providers. + +### Available Operations + +* [listProviders](#listproviders) - Get the list of available media providers +* [addProvider](#addprovider) - Add a media provider +* [refreshProviders](#refreshproviders) - Refresh media providers +* [deleteMediaProvider](#deletemediaprovider) - Delete a media provider + +## listProviders + +Get the list of all available media providers for this PMS. This will generally include the library provider and possibly EPG if DVR is set up. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListProvidersResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListProvidersResponse res = sdk.provider().listProviders() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[ListProvidersResponse](../../models/operations/ListProvidersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## addProvider + +This endpoint registers a media provider with the server. Once registered, the media server acts as a reverse proxy to the provider, allowing both local and remote providers to work. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.AddProviderRequest; +import dev.plexapi.sdk.models.operations.AddProviderResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + AddProviderRequest req = AddProviderRequest.builder() + .url("https://steep-obedience.name/") + .build(); + + AddProviderResponse res = sdk.provider().addProvider() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [AddProviderRequest](../../models/operations/AddProviderRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AddProviderResponse](../../models/operations/AddProviderResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## refreshProviders + +Refresh all known media providers. This is useful in case a provider has updated features. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.RefreshProvidersResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + RefreshProvidersResponse res = sdk.provider().refreshProviders() + .call(); + + // handle response + } +} +``` + +### Response + +**[RefreshProvidersResponse](../../models/operations/RefreshProvidersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteMediaProvider + +Deletes a media provider with the given id + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteMediaProviderRequest; +import dev.plexapi.sdk.models.operations.DeleteMediaProviderResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteMediaProviderRequest req = DeleteMediaProviderRequest.builder() + .provider("") + .build(); + + DeleteMediaProviderResponse res = sdk.provider().deleteMediaProvider() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [DeleteMediaProviderRequest](../../models/operations/DeleteMediaProviderRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteMediaProviderResponse](../../models/operations/DeleteMediaProviderResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/rate/README.md b/docs/sdks/rate/README.md new file mode 100644 index 00000000..ef042fb9 --- /dev/null +++ b/docs/sdks/rate/README.md @@ -0,0 +1,77 @@ +# Rate +(*rate()*) + +## Overview + +Operations for rating media items (thumbs up/down, star ratings, etc.) + +### Available Operations + +* [setRating](#setrating) - Rate an item + +## setRating + +Set the rating on an item. +This API does respond to the GET verb but applications should use PUT + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.SetRatingRequest; +import dev.plexapi.sdk.models.operations.SetRatingResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + SetRatingRequest req = SetRatingRequest.builder() + .identifier("") + .key("") + .rating(8722.46) + .build(); + + SetRatingResponse res = sdk.rate().setRating() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [SetRatingRequest](../../models/operations/SetRatingRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SetRatingResponse](../../models/operations/SetRatingResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 637d6a4d..659fc2b8 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -3,16 +3,16 @@ ## Overview -API Calls that perform search operations with Plex Media Server - +The search feature within a media provider ### Available Operations -* [performSearch](#performsearch) - Perform a search -* [performVoiceSearch](#performvoicesearch) - Perform a voice search -* [getSearchResults](#getsearchresults) - Get Search Results +* [searchHubs](#searchhubs) - Search Hub +* [voiceSearchHubs](#voicesearchhubs) - Voice Search Hub -## performSearch +## searchHubs + +Perform a search and get the result as hubs This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). @@ -30,138 +30,42 @@ This request is intended to be very fast, and called as the user types. ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.PerformSearchBadRequest; -import dev.plexapi.sdk.models.errors.PerformSearchUnauthorized; -import dev.plexapi.sdk.models.operations.PerformSearchResponse; +import dev.plexapi.sdk.models.operations.SearchHubsRequest; +import dev.plexapi.sdk.models.operations.SearchHubsResponse; +import dev.plexapi.sdk.models.shared.Accepts; import java.lang.Exception; public class Application { - public static void main(String[] args) throws PerformSearchBadRequest, PerformSearchUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - PerformSearchResponse res = sdk.search().performSearch() - .query("arnold") - .limit(5d) - .call(); + SearchHubsRequest req = SearchHubsRequest.builder() + .query("") + .sectionId(1L) + .build(); - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `query` | *String* | :heavy_check_mark: | The query term | arnold | -| `sectionId` | *Optional\* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | -| `limit` | *Optional\* | :heavy_minus_sign: | The number of items to return per hub | 5 | - -### Response - -**[PerformSearchResponse](../../models/operations/PerformSearchResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/PerformSearchBadRequest | 400 | application/json | -| models/errors/PerformSearchUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## performVoiceSearch - -This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. -It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. -Whenever possible, clients should limit the search to the appropriate type. -Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.PerformVoiceSearchBadRequest; -import dev.plexapi.sdk.models.errors.PerformVoiceSearchUnauthorized; -import dev.plexapi.sdk.models.operations.PerformVoiceSearchResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws PerformVoiceSearchBadRequest, PerformVoiceSearchUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - PerformVoiceSearchResponse res = sdk.search().performVoiceSearch() - .query("dead+poop") - .limit(5d) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `query` | *String* | :heavy_check_mark: | The query term | dead+poop | -| `sectionId` | *Optional\* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | -| `limit` | *Optional\* | :heavy_minus_sign: | The number of items to return per hub | 5 | - -### Response - -**[PerformVoiceSearchResponse](../../models/operations/PerformVoiceSearchResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| models/errors/PerformVoiceSearchBadRequest | 400 | application/json | -| models/errors/PerformVoiceSearchUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getSearchResults - -This will search the database for the string provided. - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest; -import dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized; -import dev.plexapi.sdk.models.operations.GetSearchResultsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetSearchResultsBadRequest, GetSearchResultsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetSearchResultsResponse res = sdk.search().getSearchResults() - .query("110") + SearchHubsResponse res = sdk.search().searchHubs() + .request(req) .call(); if (res.object().isPresent()) { @@ -173,18 +77,87 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `query` | *String* | :heavy_check_mark: | The search query string to use | 110 | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [SearchHubsRequest](../../models/operations/SearchHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetSearchResultsResponse](../../models/operations/GetSearchResultsResponse.md)** +**[SearchHubsResponse](../../models/operations/SearchHubsResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetSearchResultsBadRequest | 400 | application/json | -| models/errors/GetSearchResultsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## voiceSearchHubs + +Perform a search tailored to voice input and get the result as hubs + +This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type. + +Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsRequest; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + VoiceSearchHubsRequest req = VoiceSearchHubsRequest.builder() + .query("") + .build(); + + VoiceSearchHubsResponse res = sdk.search().voiceSearchHubs() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [VoiceSearchHubsRequest](../../models/operations/VoiceSearchHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[VoiceSearchHubsResponse](../../models/operations/VoiceSearchHubsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md deleted file mode 100644 index 80db1c4e..00000000 --- a/docs/sdks/server/README.md +++ /dev/null @@ -1,453 +0,0 @@ -# Server -(*server()*) - -## Overview - -Operations against the Plex Media Server System. - - -### Available Operations - -* [getServerCapabilities](#getservercapabilities) - Get Server Capabilities -* [getServerPreferences](#getserverpreferences) - Get Server Preferences -* [getAvailableClients](#getavailableclients) - Get Available Clients -* [getDevices](#getdevices) - Get Devices -* [getServerIdentity](#getserveridentity) - Get Server Identity -* [getMyPlexAccount](#getmyplexaccount) - Get MyPlex Account -* [getResizedPhoto](#getresizedphoto) - Get a Resized Photo -* [getMediaProviders](#getmediaproviders) - Get Media Providers -* [getServerList](#getserverlist) - Get Server List - -## getServerCapabilities - -Get Server Capabilities - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetServerCapabilitiesResponse](../../models/operations/GetServerCapabilitiesResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| models/errors/GetServerCapabilitiesBadRequest | 400 | application/json | -| models/errors/GetServerCapabilitiesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getServerPreferences - -Get Server Preferences - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized; -import dev.plexapi.sdk.models.operations.GetServerPreferencesResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetServerPreferencesBadRequest, GetServerPreferencesUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetServerPreferencesResponse res = sdk.server().getServerPreferences() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetServerPreferencesResponse](../../models/operations/GetServerPreferencesResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| models/errors/GetServerPreferencesBadRequest | 400 | application/json | -| models/errors/GetServerPreferencesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getAvailableClients - -Get Available Clients - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest; -import dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized; -import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetAvailableClientsBadRequest, GetAvailableClientsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetAvailableClientsResponse res = sdk.server().getAvailableClients() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetAvailableClientsResponse](../../models/operations/GetAvailableClientsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetAvailableClientsBadRequest | 400 | application/json | -| models/errors/GetAvailableClientsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getDevices - -Get Devices - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetDevicesBadRequest; -import dev.plexapi.sdk.models.errors.GetDevicesUnauthorized; -import dev.plexapi.sdk.models.operations.GetDevicesResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetDevicesBadRequest, GetDevicesUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetDevicesResponse res = sdk.server().getDevices() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetDevicesResponse](../../models/operations/GetDevicesResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| models/errors/GetDevicesBadRequest | 400 | application/json | -| models/errors/GetDevicesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getServerIdentity - -This request is useful to determine if the server is online or offline - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout; -import dev.plexapi.sdk.models.operations.GetServerIdentityResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetServerIdentityRequestTimeout, Exception { - - PlexAPI sdk = PlexAPI.builder() - .build(); - - GetServerIdentityResponse res = sdk.server().getServerIdentity() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetServerIdentityResponse](../../models/operations/GetServerIdentityResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| models/errors/GetServerIdentityRequestTimeout | 408 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getMyPlexAccount - -Returns MyPlex Account Information - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest; -import dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized; -import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetMyPlexAccountBadRequest, GetMyPlexAccountUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetMyPlexAccountResponse](../../models/operations/GetMyPlexAccountResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetMyPlexAccountBadRequest | 400 | application/json | -| models/errors/GetMyPlexAccountUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getResizedPhoto - -Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest; -import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized; -import dev.plexapi.sdk.models.operations.*; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetResizedPhotoBadRequest, GetResizedPhotoUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetResizedPhotoRequest req = GetResizedPhotoRequest.builder() - .width(110d) - .height(165d) - .opacity(100L) - .blur(0d) - .minSize(MinSize.ZERO) - .upscale(Upscale.ZERO) - .url("/library/metadata/49564/thumb/1654258204") - .build(); - - GetResizedPhotoResponse res = sdk.server().getResizedPhoto() - .request(req) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `request` | [GetResizedPhotoRequest](../../models/operations/GetResizedPhotoRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[GetResizedPhotoResponse](../../models/operations/GetResizedPhotoResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/GetResizedPhotoBadRequest | 400 | application/json | -| models/errors/GetResizedPhotoUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getMediaProviders - -Retrieves media providers and their features from the Plex server. - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest; -import dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized; -import dev.plexapi.sdk.models.operations.GetMediaProvidersResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetMediaProvidersBadRequest, GetMediaProvidersUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetMediaProvidersResponse res = sdk.server().getMediaProviders() - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `xPlexToken` | *String* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | - -### Response - -**[GetMediaProvidersResponse](../../models/operations/GetMediaProvidersResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetMediaProvidersBadRequest | 400 | application/json | -| models/errors/GetMediaProvidersUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getServerList - -Get Server List - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetServerListBadRequest; -import dev.plexapi.sdk.models.errors.GetServerListUnauthorized; -import dev.plexapi.sdk.models.operations.GetServerListResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetServerListBadRequest, GetServerListUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetServerListResponse res = sdk.server().getServerList() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetServerListResponse](../../models/operations/GetServerListResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/GetServerListBadRequest | 400 | application/json | -| models/errors/GetServerListUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md deleted file mode 100644 index 586a4d03..00000000 --- a/docs/sdks/sessions/README.md +++ /dev/null @@ -1,218 +0,0 @@ -# Sessions -(*sessions()*) - -## Overview - -API Calls that perform search operations with Plex Media Server Sessions - - -### Available Operations - -* [getSessions](#getsessions) - Get Active Sessions -* [getSessionHistory](#getsessionhistory) - Get Session History -* [getTranscodeSessions](#gettranscodesessions) - Get Transcode Sessions -* [stopTranscodeSession](#stoptranscodesession) - Stop a Transcode Session - -## getSessions - -This will retrieve the "Now Playing" Information of the PMS. - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetSessionsBadRequest; -import dev.plexapi.sdk.models.errors.GetSessionsUnauthorized; -import dev.plexapi.sdk.models.operations.GetSessionsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetSessionsBadRequest, GetSessionsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetSessionsResponse res = sdk.sessions().getSessions() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetSessionsResponse](../../models/operations/GetSessionsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models/errors/GetSessionsBadRequest | 400 | application/json | -| models/errors/GetSessionsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getSessionHistory - -This will Retrieve a listing of all history views. - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetSessionHistoryBadRequest; -import dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized; -import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse; -import dev.plexapi.sdk.models.operations.QueryParamFilter; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetSessionHistoryBadRequest, GetSessionHistoryUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() - .sort("viewedAt:desc") - .accountId(1L) - .filter(QueryParamFilter.builder() - .build()) - .librarySectionID(12L) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sort` | *Optional\* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)
| | -| `accountId` | *Optional\* | :heavy_minus_sign: | Filter results by those that are related to a specific users id
| 1 | -| `filter` | [Optional\](../../models/operations/QueryParamFilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | -| `librarySectionID` | *Optional\* | :heavy_minus_sign: | Filters the results based on the id of a valid library section
| 12 | - -### Response - -**[GetSessionHistoryResponse](../../models/operations/GetSessionHistoryResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| models/errors/GetSessionHistoryBadRequest | 400 | application/json | -| models/errors/GetSessionHistoryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getTranscodeSessions - -Get Transcode Sessions - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetTranscodeSessionsBadRequest; -import dev.plexapi.sdk.models.errors.GetTranscodeSessionsUnauthorized; -import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetTranscodeSessionsBadRequest, GetTranscodeSessionsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions() - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Response - -**[GetTranscodeSessionsResponse](../../models/operations/GetTranscodeSessionsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| models/errors/GetTranscodeSessionsBadRequest | 400 | application/json | -| models/errors/GetTranscodeSessionsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## stopTranscodeSession - -Stop a Transcode Session - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest; -import dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized; -import dev.plexapi.sdk.models.operations.StopTranscodeSessionResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws StopTranscodeSessionBadRequest, StopTranscodeSessionUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession() - .sessionKey("zz7llzqlx8w9vnrsbnwhbmep") - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `sessionKey` | *String* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep | - -### Response - -**[StopTranscodeSessionResponse](../../models/operations/StopTranscodeSessionResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| models/errors/StopTranscodeSessionBadRequest | 400 | application/json | -| models/errors/StopTranscodeSessionUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md deleted file mode 100644 index 150fa7e9..00000000 --- a/docs/sdks/statistics/README.md +++ /dev/null @@ -1,172 +0,0 @@ -# Statistics -(*statistics()*) - -## Overview - -API Calls that perform operations with Plex Media Server Statistics - - -### Available Operations - -* [getStatistics](#getstatistics) - Get Media Statistics -* [getResourcesStatistics](#getresourcesstatistics) - Get Resources Statistics -* [getBandwidthStatistics](#getbandwidthstatistics) - Get Bandwidth Statistics - -## getStatistics - -This will return the media statistics for the server - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetStatisticsBadRequest; -import dev.plexapi.sdk.models.errors.GetStatisticsUnauthorized; -import dev.plexapi.sdk.models.operations.GetStatisticsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetStatisticsBadRequest, GetStatisticsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetStatisticsResponse res = sdk.statistics().getStatistics() - .timespan(4L) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `timespan` | *Optional\* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | - -### Response - -**[GetStatisticsResponse](../../models/operations/GetStatisticsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| models/errors/GetStatisticsBadRequest | 400 | application/json | -| models/errors/GetStatisticsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getResourcesStatistics - -This will return the resources for the server - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest; -import dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetResourcesStatisticsBadRequest, GetResourcesStatisticsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics() - .timespan(4L) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `timespan` | *Optional\* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | - -### Response - -**[GetResourcesStatisticsResponse](../../models/operations/GetResourcesStatisticsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| models/errors/GetResourcesStatisticsBadRequest | 400 | application/json | -| models/errors/GetResourcesStatisticsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## getBandwidthStatistics - -This will return the bandwidth statistics for the server - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest; -import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetBandwidthStatisticsBadRequest, GetBandwidthStatisticsUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics() - .timespan(4L) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `timespan` | *Optional\* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | - -### Response - -**[GetBandwidthStatisticsResponse](../../models/operations/GetBandwidthStatisticsResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| models/errors/GetBandwidthStatisticsBadRequest | 400 | application/json | -| models/errors/GetBandwidthStatisticsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/status/README.md b/docs/sdks/status/README.md new file mode 100644 index 00000000..edddc2b7 --- /dev/null +++ b/docs/sdks/status/README.md @@ -0,0 +1,387 @@ +# Status +(*status()*) + +## Overview + +The status endpoints give you information about current playbacks, play history, and even terminating sessions. + +### Available Operations + +* [listSessions](#listsessions) - List Sessions +* [getBackgroundTasks](#getbackgroundtasks) - Get background tasks +* [listPlaybackHistory](#listplaybackhistory) - List Playback History +* [terminateSession](#terminatesession) - Terminate a session +* [deleteHistory](#deletehistory) - Delete Single History Item +* [getHistoryItem](#gethistoryitem) - Get Single History Item + +## listSessions + +List all current playbacks on this server + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListSessionsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListSessionsResponse res = sdk.status().listSessions() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[ListSessionsResponse](../../models/operations/ListSessionsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getBackgroundTasks + +Get the list of all background tasks + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetBackgroundTasksResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetBackgroundTasksResponse res = sdk.status().getBackgroundTasks() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[GetBackgroundTasksResponse](../../models/operations/GetBackgroundTasksResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listPlaybackHistory + +List all playback history (Admin can see all users, others can only see their own). +Pagination should be used on this endpoint. Additionally this endpoint supports `includeFields`, `excludeFields`, `includeElements`, and `excludeElements` parameters. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryRequest; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ListPlaybackHistoryRequest req = ListPlaybackHistoryRequest.builder() + .sort(List.of( + "v", + "i", + "e", + "w", + "e", + "d", + "A", + "t", + ":", + "d", + "e", + "s", + "c", + ",", + "a", + "c", + "c", + "o", + "u", + "n", + "t", + "I", + "D")) + .build(); + + ListPlaybackHistoryResponse res = sdk.status().listPlaybackHistory() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [ListPlaybackHistoryRequest](../../models/operations/ListPlaybackHistoryRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListPlaybackHistoryResponse](../../models/operations/ListPlaybackHistoryResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## terminateSession + +Terminate a playback session kicking off the user + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.TerminateSessionRequest; +import dev.plexapi.sdk.models.operations.TerminateSessionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + TerminateSessionRequest req = TerminateSessionRequest.builder() + .sessionId("cdefghijklmnopqrstuvwxyz") + .reason("Stop Playing") + .build(); + + TerminateSessionResponse res = sdk.status().terminateSession() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [TerminateSessionRequest](../../models/operations/TerminateSessionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[TerminateSessionResponse](../../models/operations/TerminateSessionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteHistory + +Delete a single history item by id + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteHistoryRequest; +import dev.plexapi.sdk.models.operations.DeleteHistoryResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteHistoryRequest req = DeleteHistoryRequest.builder() + .historyId(953579L) + .build(); + + DeleteHistoryResponse res = sdk.status().deleteHistory() + .request(req) + .call(); + + if (res.mediaContainer().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [DeleteHistoryRequest](../../models/operations/DeleteHistoryRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteHistoryResponse](../../models/operations/DeleteHistoryResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getHistoryItem + +Get a single history item by id + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetHistoryItemRequest; +import dev.plexapi.sdk.models.operations.GetHistoryItemResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetHistoryItemRequest req = GetHistoryItemRequest.builder() + .historyId(832213L) + .build(); + + GetHistoryItemResponse res = sdk.status().getHistoryItem() + .request(req) + .call(); + + if (res.historyAllGetResponses200().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [GetHistoryItemRequest](../../models/operations/GetHistoryItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetHistoryItemResponse](../../models/operations/GetHistoryItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/subscriptions/README.md b/docs/sdks/subscriptions/README.md new file mode 100644 index 00000000..c14a1dec --- /dev/null +++ b/docs/sdks/subscriptions/README.md @@ -0,0 +1,640 @@ +# Subscriptions +(*subscriptions()*) + +## Overview + +Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available + + +### Available Operations + +* [getAllSubscriptions](#getallsubscriptions) - Get all subscriptions +* [createSubscription](#createsubscription) - Create a subscription +* [processSubscriptions](#processsubscriptions) - Process all subscriptions +* [getScheduledRecordings](#getscheduledrecordings) - Get all scheduled recordings +* [getTemplate](#gettemplate) - Get the subscription template +* [cancelGrab](#cancelgrab) - Cancel an existing grab +* [deleteSubscription](#deletesubscription) - Delete a subscription +* [getSubscription](#getsubscription) - Get a single subscription +* [editSubscriptionPreferences](#editsubscriptionpreferences) - Edit a subscription +* [reorderSubscription](#reordersubscription) - Re-order a subscription + +## getAllSubscriptions + +Get all subscriptions and potentially the grabs too + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetAllSubscriptionsRequest; +import dev.plexapi.sdk.models.operations.GetAllSubscriptionsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetAllSubscriptionsRequest req = GetAllSubscriptionsRequest.builder() + .includeGrabs(BoolInt.ONE) + .includeStorage(BoolInt.ONE) + .build(); + + GetAllSubscriptionsResponse res = sdk.subscriptions().getAllSubscriptions() + .request(req) + .call(); + + if (res.mediaContainerWithSubscription().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [GetAllSubscriptionsRequest](../../models/operations/GetAllSubscriptionsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetAllSubscriptionsResponse](../../models/operations/GetAllSubscriptionsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## createSubscription + +Create a subscription. The query parameters should be mostly derived from the [template](#tag/Subscriptions/operation/mediaSubscriptionsGetTemplate) + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CreateSubscriptionRequest req = CreateSubscriptionRequest.builder() + .targetLibrarySectionID(1L) + .targetSectionLocationID(3L) + .type(2L) + .hints(Hints.builder() + .build()) + .prefs(CreateSubscriptionQueryParamPrefs.builder() + .build()) + .params(Params.builder() + .build()) + .build(); + + CreateSubscriptionResponse res = sdk.subscriptions().createSubscription() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [CreateSubscriptionRequest](../../models/operations/CreateSubscriptionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateSubscriptionResponse](../../models/operations/CreateSubscriptionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## processSubscriptions + +Process all subscriptions asynchronously + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ProcessSubscriptionsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ProcessSubscriptionsResponse res = sdk.subscriptions().processSubscriptions() + .call(); + + // handle response + } +} +``` + +### Response + +**[ProcessSubscriptionsResponse](../../models/operations/ProcessSubscriptionsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getScheduledRecordings + +Get all scheduled recordings across all subscriptions + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetScheduledRecordingsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetScheduledRecordingsResponse res = sdk.subscriptions().getScheduledRecordings() + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[GetScheduledRecordingsResponse](../../models/operations/GetScheduledRecordingsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getTemplate + +Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetTemplateRequest; +import dev.plexapi.sdk.models.operations.GetTemplateResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetTemplateRequest req = GetTemplateRequest.builder() + .guid("plex://episode/5fc70265c40548002d539d23") + .build(); + + GetTemplateResponse res = sdk.subscriptions().getTemplate() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [GetTemplateRequest](../../models/operations/GetTemplateRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetTemplateResponse](../../models/operations/GetTemplateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## cancelGrab + +Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription. +Note: This cancellation does not persist across a server restart, but neither does a rolling subscription itself. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.CancelGrabRequest; +import dev.plexapi.sdk.models.operations.CancelGrabResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CancelGrabRequest req = CancelGrabRequest.builder() + .operationId("") + .build(); + + CancelGrabResponse res = sdk.subscriptions().cancelGrab() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [CancelGrabRequest](../../models/operations/CancelGrabRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CancelGrabResponse](../../models/operations/CancelGrabResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## deleteSubscription + +Delete a subscription, cancelling all of its grabs as well + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.DeleteSubscriptionRequest; +import dev.plexapi.sdk.models.operations.DeleteSubscriptionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + DeleteSubscriptionRequest req = DeleteSubscriptionRequest.builder() + .subscriptionId(974618L) + .build(); + + DeleteSubscriptionResponse res = sdk.subscriptions().deleteSubscription() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [DeleteSubscriptionRequest](../../models/operations/DeleteSubscriptionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[DeleteSubscriptionResponse](../../models/operations/DeleteSubscriptionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getSubscription + +Get a single subscription and potentially the grabs too + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetSubscriptionRequest; +import dev.plexapi.sdk.models.operations.GetSubscriptionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetSubscriptionRequest req = GetSubscriptionRequest.builder() + .subscriptionId(186713L) + .includeGrabs(BoolInt.ONE) + .includeStorage(BoolInt.ONE) + .build(); + + GetSubscriptionResponse res = sdk.subscriptions().getSubscription() + .request(req) + .call(); + + if (res.mediaContainerWithSubscription().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [GetSubscriptionRequest](../../models/operations/GetSubscriptionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetSubscriptionResponse](../../models/operations/GetSubscriptionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## editSubscriptionPreferences + +Edit a subscription's preferences + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + EditSubscriptionPreferencesRequest req = EditSubscriptionPreferencesRequest.builder() + .subscriptionId(673918L) + .prefs(EditSubscriptionPreferencesQueryParamPrefs.builder() + .build()) + .build(); + + EditSubscriptionPreferencesResponse res = sdk.subscriptions().editSubscriptionPreferences() + .request(req) + .call(); + + if (res.mediaContainerWithSubscription().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `request` | [EditSubscriptionPreferencesRequest](../../models/operations/EditSubscriptionPreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[EditSubscriptionPreferencesResponse](../../models/operations/EditSubscriptionPreferencesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## reorderSubscription + +Re-order a subscription to change its priority + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.ReorderSubscriptionRequest; +import dev.plexapi.sdk.models.operations.ReorderSubscriptionResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ReorderSubscriptionRequest req = ReorderSubscriptionRequest.builder() + .subscriptionId(440634L) + .build(); + + ReorderSubscriptionResponse res = sdk.subscriptions().reorderSubscription() + .request(req) + .call(); + + if (res.mediaContainerWithSubscription().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [ReorderSubscriptionRequest](../../models/operations/ReorderSubscriptionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ReorderSubscriptionResponse](../../models/operations/ReorderSubscriptionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/timeline/README.md b/docs/sdks/timeline/README.md new file mode 100644 index 00000000..9df08298 --- /dev/null +++ b/docs/sdks/timeline/README.md @@ -0,0 +1,223 @@ +# Timeline +(*timeline()*) + +## Overview + +The actions feature within a media provider + +### Available Operations + +* [markPlayed](#markplayed) - Mark an item as played +* [report](#report) - Report media timeline +* [unscrobble](#unscrobble) - Mark an item as unplayed + +## markPlayed + +Mark an item as played. Note, this does not create any view history of this item but rather just sets the state as played. The client must provide either the `key` or `uri` query parameter +This API does respond to the GET verb but applications should use PUT + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.MarkPlayedRequest; +import dev.plexapi.sdk.models.operations.MarkPlayedResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MarkPlayedRequest req = MarkPlayedRequest.builder() + .identifier("") + .key("59398") + .build(); + + MarkPlayedResponse res = sdk.timeline().markPlayed() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [MarkPlayedRequest](../../models/operations/MarkPlayedRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[MarkPlayedResponse](../../models/operations/MarkPlayedResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## report + +This endpoint is hit during media playback for an item. It must be hit whenever the play state changes, or in the absence of a play state change, in a regular fashion (generally this means every 10 seconds on a LAN/WAN, and every 20 seconds over cellular). + + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + ReportRequest req = ReportRequest.builder() + .key("/foo") + .ratingKey("xyz") + .state(State.PLAYING) + .playQueueItemID("123") + .time(0L) + .duration(10000L) + .continuing(BoolInt.ONE) + .updated(14200000L) + .offline(BoolInt.ONE) + .timeToFirstFrame(1000L) + .timeStalled(1000L) + .bandwidth(100L) + .bufferedTime(100L) + .bufferedSize(1024L) + .build(); + + ReportResponse res = sdk.timeline().report() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `request` | [ReportRequest](../../models/operations/ReportRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ReportResponse](../../models/operations/ReportResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## unscrobble + +Mark an item as unplayed. The client must provide either the `key` or `uri` query parameter +This API does respond to the GET verb but applications should use PUT + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.UnscrobbleRequest; +import dev.plexapi.sdk.models.operations.UnscrobbleResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + UnscrobbleRequest req = UnscrobbleRequest.builder() + .identifier("") + .build(); + + UnscrobbleResponse res = sdk.timeline().unscrobble() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [UnscrobbleRequest](../../models/operations/UnscrobbleRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UnscrobbleResponse](../../models/operations/UnscrobbleResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/transcoder/README.md b/docs/sdks/transcoder/README.md new file mode 100644 index 00000000..6e8cbdaa --- /dev/null +++ b/docs/sdks/transcoder/README.md @@ -0,0 +1,426 @@ +# Transcoder +(*transcoder()*) + +## Overview + +API Operations against the Transcoder + +### Available Operations + +* [transcodeImage](#transcodeimage) - Transcode an image +* [makeDecision](#makedecision) - Make a decision on media playback +* [triggerFallback](#triggerfallback) - Manually trigger a transcoder fallback +* [transcodeSubtitles](#transcodesubtitles) - Transcode subtitles +* [startTranscodeSession](#starttranscodesession) - Start A Transcoding Session + +## transcodeImage + +Transcode an image, possibly changing format or size + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.TranscodeImageRequest; +import dev.plexapi.sdk.models.operations.TranscodeImageResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + TranscodeImageRequest req = TranscodeImageRequest.builder() + .url("/library/metadata/265/thumb/1715112705") + .background("#ff5522") + .upscale(BoolInt.ONE) + .minSize(BoolInt.ONE) + .rotate(BoolInt.ONE) + .blendColor("#ff5522") + .build(); + + TranscodeImageResponse res = sdk.transcoder().transcodeImage() + .request(req) + .call(); + + if (res.twoHundredImageJpegResponseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [TranscodeImageRequest](../../models/operations/TranscodeImageRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[TranscodeImageResponse](../../models/operations/TranscodeImageResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## makeDecision + +Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.*; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + MakeDecisionRequest req = MakeDecisionRequest.builder() + .transcodeType(TranscodeType.MUSIC) + .advancedSubtitles(AdvancedSubtitles.BURN) + .audioBoost(50L) + .audioChannelCount(5L) + .autoAdjustQuality(BoolInt.ONE) + .autoAdjustSubtitle(BoolInt.ONE) + .directPlay(BoolInt.ONE) + .directStream(BoolInt.ONE) + .directStreamAudio(BoolInt.ONE) + .disableResolutionRotation(BoolInt.ONE) + .hasMDE(BoolInt.ONE) + .location(Location.WAN) + .mediaBufferSize(102400L) + .mediaIndex(0L) + .musicBitrate(5000L) + .offset(90.5) + .partIndex(0L) + .path("/library/metadata/151671") + .peakBitrate(12000L) + .photoResolution("1080x1080") + .protocol(Protocol.DASH) + .secondsPerSegment(5L) + .subtitleSize(50L) + .videoBitrate(12000L) + .videoQuality(50L) + .videoResolution("1080x1080") + .xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)") + .xPlexClientProfileName("generic") + .build(); + + MakeDecisionResponse res = sdk.transcoder().makeDecision() + .request(req) + .call(); + + if (res.mediaContainerWithDecision().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [MakeDecisionRequest](../../models/operations/MakeDecisionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[MakeDecisionResponse](../../models/operations/MakeDecisionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## triggerFallback + +Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.TriggerFallbackRequest; +import dev.plexapi.sdk.models.operations.TriggerFallbackResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.TranscodeType; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + TriggerFallbackRequest req = TriggerFallbackRequest.builder() + .transcodeType(TranscodeType.AUDIO) + .build(); + + TriggerFallbackResponse res = sdk.transcoder().triggerFallback() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [TriggerFallbackRequest](../../models/operations/TriggerFallbackRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[TriggerFallbackResponse](../../models/operations/TriggerFallbackResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## transcodeSubtitles + +Only transcode subtitle streams. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.*; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + TranscodeSubtitlesRequest req = TranscodeSubtitlesRequest.builder() + .transcodeType(TranscodeType.AUDIO) + .advancedSubtitles(AdvancedSubtitles.BURN) + .audioBoost(50L) + .audioChannelCount(5L) + .autoAdjustQuality(BoolInt.ONE) + .autoAdjustSubtitle(BoolInt.ONE) + .directPlay(BoolInt.ONE) + .directStream(BoolInt.ONE) + .directStreamAudio(BoolInt.ONE) + .disableResolutionRotation(BoolInt.ONE) + .hasMDE(BoolInt.ONE) + .location(QueryParamLocation.WAN) + .mediaBufferSize(102400L) + .mediaIndex(0L) + .musicBitrate(5000L) + .offset(90.5) + .partIndex(0L) + .path("/library/metadata/151671") + .peakBitrate(12000L) + .photoResolution("1080x1080") + .protocol(QueryParamProtocol.DASH) + .secondsPerSegment(5L) + .subtitleSize(50L) + .videoBitrate(12000L) + .videoQuality(50L) + .videoResolution("1080x1080") + .xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)") + .xPlexClientProfileName("generic") + .build(); + + TranscodeSubtitlesResponse res = sdk.transcoder().transcodeSubtitles() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [TranscodeSubtitlesRequest](../../models/operations/TranscodeSubtitlesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[TranscodeSubtitlesResponse](../../models/operations/TranscodeSubtitlesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## startTranscodeSession + +Starts the transcoder and returns the corresponding streaming resource document. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.*; +import dev.plexapi.sdk.models.shared.*; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + StartTranscodeSessionRequest req = StartTranscodeSessionRequest.builder() + .transcodeType(TranscodeType.MUSIC) + .extension(Extension.MPD) + .advancedSubtitles(AdvancedSubtitles.BURN) + .audioBoost(50L) + .audioChannelCount(5L) + .autoAdjustQuality(BoolInt.ONE) + .autoAdjustSubtitle(BoolInt.ONE) + .directPlay(BoolInt.ONE) + .directStream(BoolInt.ONE) + .directStreamAudio(BoolInt.ONE) + .disableResolutionRotation(BoolInt.ONE) + .hasMDE(BoolInt.ONE) + .location(StartTranscodeSessionQueryParamLocation.WAN) + .mediaBufferSize(102400L) + .mediaIndex(0L) + .musicBitrate(5000L) + .offset(90.5) + .partIndex(0L) + .path("/library/metadata/151671") + .peakBitrate(12000L) + .photoResolution("1080x1080") + .protocol(StartTranscodeSessionQueryParamProtocol.DASH) + .secondsPerSegment(5L) + .subtitleSize(50L) + .videoBitrate(12000L) + .videoQuality(50L) + .videoResolution("1080x1080") + .xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)") + .xPlexClientProfileName("generic") + .build(); + + StartTranscodeSessionResponse res = sdk.transcoder().startTranscodeSession() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [StartTranscodeSessionRequest](../../models/operations/StartTranscodeSessionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[StartTranscodeSessionResponse](../../models/operations/StartTranscodeSessionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/ultrablur/README.md b/docs/sdks/ultrablur/README.md new file mode 100644 index 00000000..77d1d908 --- /dev/null +++ b/docs/sdks/ultrablur/README.md @@ -0,0 +1,150 @@ +# UltraBlur +(*ultraBlur()*) + +## Overview + +Service provided to compute UltraBlur colors and images. + +### Available Operations + +* [getColors](#getcolors) - Get UltraBlur Colors +* [getImage](#getimage) - Get UltraBlur Image + +## getColors + +Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetColorsRequest; +import dev.plexapi.sdk.models.operations.GetColorsResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetColorsRequest req = GetColorsRequest.builder() + .url("/library/metadata/217745/art/1718931408") + .build(); + + GetColorsResponse res = sdk.ultraBlur().getColors() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [GetColorsRequest](../../models/operations/GetColorsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetColorsResponse](../../models/operations/GetColorsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getImage + +Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint. + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetImageRequest; +import dev.plexapi.sdk.models.operations.GetImageResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetImageRequest req = GetImageRequest.builder() + .topLeft("3f280a") + .topRight("6b4713") + .bottomRight("0f2a43") + .bottomLeft("1c425d") + .width(1920L) + .height(1080L) + .noise(BoolInt.ONE) + .build(); + + GetImageResponse res = sdk.ultraBlur().getImage() + .request(req) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `request` | [GetImageRequest](../../models/operations/GetImageRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetImageResponse](../../models/operations/GetImageResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index d5ce88f8..4b6863fb 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -9,35 +9,164 @@ Updates to the status can be observed via the Event API. ### Available Operations -* [getUpdateStatus](#getupdatestatus) - Querying status of updates -* [checkForUpdates](#checkforupdates) - Checking for updates -* [applyUpdates](#applyupdates) - Apply Updates +* [applyUpdates](#applyupdates) - Applying updates +* [checkUpdates](#checkupdates) - Checking for updates +* [getUpdatesStatus](#getupdatesstatus) - Querying status of updates -## getUpdateStatus +## applyUpdates -Querying status of updates +Apply any downloaded updates. Note that the two parameters `tonight` and `skip` are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed. ### Example Usage - + ```java package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetUpdateStatusBadRequest; -import dev.plexapi.sdk.models.errors.GetUpdateStatusUnauthorized; -import dev.plexapi.sdk.models.operations.GetUpdateStatusResponse; +import dev.plexapi.sdk.models.operations.ApplyUpdatesRequest; +import dev.plexapi.sdk.models.operations.ApplyUpdatesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; import java.lang.Exception; public class Application { - public static void main(String[] args) throws GetUpdateStatusBadRequest, GetUpdateStatusUnauthorized, Exception { + public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) .build(); - GetUpdateStatusResponse res = sdk.updater().getUpdateStatus() + ApplyUpdatesRequest req = ApplyUpdatesRequest.builder() + .tonight(BoolInt.ONE) + .skip(BoolInt.ONE) + .build(); + + ApplyUpdatesResponse res = sdk.updater().applyUpdates() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [ApplyUpdatesRequest](../../models/operations/ApplyUpdatesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ApplyUpdatesResponse](../../models/operations/ApplyUpdatesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## checkUpdates + +Perform an update check and potentially download + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.CheckUpdatesRequest; +import dev.plexapi.sdk.models.operations.CheckUpdatesResponse; +import dev.plexapi.sdk.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accepts(Accepts.APPLICATION_XML) + .clientIdentifier("abc123") + .product("Plex for Roku") + .version("2.4.1") + .platform("Roku") + .platformVersion("4.3 build 1057") + .device("Roku 3") + .model("4200X") + .deviceVendor("Roku") + .deviceName("Living Room TV") + .marketplace("googlePlay") + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + CheckUpdatesRequest req = CheckUpdatesRequest.builder() + .download(BoolInt.ONE) + .build(); + + CheckUpdatesResponse res = sdk.updater().checkUpdates() + .request(req) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [CheckUpdatesRequest](../../models/operations/CheckUpdatesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CheckUpdatesResponse](../../models/operations/CheckUpdatesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## getUpdatesStatus + +Get the status of updating the server + +### Example Usage + + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetUpdatesStatusResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .token(System.getenv().getOrDefault("TOKEN", "")) + .build(); + + GetUpdatesStatusResponse res = sdk.updater().getUpdatesStatus() .call(); if (res.object().isPresent()) { @@ -49,118 +178,10 @@ public class Application { ### Response -**[GetUpdateStatusResponse](../../models/operations/GetUpdateStatusResponse.md)** +**[GetUpdatesStatusResponse](../../models/operations/GetUpdatesStatusResponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/GetUpdateStatusBadRequest | 400 | application/json | -| models/errors/GetUpdateStatusUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## checkForUpdates - -Checking for updates - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.CheckForUpdatesBadRequest; -import dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized; -import dev.plexapi.sdk.models.operations.CheckForUpdatesResponse; -import dev.plexapi.sdk.models.operations.Download; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws CheckForUpdatesBadRequest, CheckForUpdatesUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - CheckForUpdatesResponse res = sdk.updater().checkForUpdates() - .download(Download.ONE) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `download` | [Optional\](../../models/operations/Download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 | - -### Response - -**[CheckForUpdatesResponse](../../models/operations/CheckForUpdatesResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| models/errors/CheckForUpdatesBadRequest | 400 | application/json | -| models/errors/CheckForUpdatesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## applyUpdates - -Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed - - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest; -import dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized; -import dev.plexapi.sdk.models.operations.*; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws ApplyUpdatesBadRequest, ApplyUpdatesUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - ApplyUpdatesResponse res = sdk.updater().applyUpdates() - .tonight(Tonight.ONE) - .skip(Skip.ONE) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tonight` | [Optional\](../../models/operations/Tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 | -| `skip` | [Optional\](../../models/operations/Skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | 1 | - -### Response - -**[ApplyUpdatesResponse](../../models/operations/ApplyUpdatesResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/ApplyUpdatesBadRequest | 400 | application/json | -| models/errors/ApplyUpdatesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md deleted file mode 100644 index 74785c52..00000000 --- a/docs/sdks/users/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# Users -(*users()*) - -## Overview - -### Available Operations - -* [getUsers](#getusers) - Get list of all connected users - -## getUsers - -Get list of all users that are friends and have library access with the provided Plex authentication token - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetUsersBadRequest; -import dev.plexapi.sdk.models.errors.GetUsersUnauthorized; -import dev.plexapi.sdk.models.operations.GetUsersRequest; -import dev.plexapi.sdk.models.operations.GetUsersResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetUsersBadRequest, GetUsersUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .build(); - - GetUsersRequest req = GetUsersRequest.builder() - .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .clientName("Plex for Roku") - .deviceNickname("Roku 3") - .deviceName("Chrome") - .deviceScreenResolution("1487x1165,2560x1440") - .clientVersion("2.4.1") - .platform("Roku") - .clientFeatures("external-media,indirect-media,hub-style-list") - .model("4200X") - .xPlexSessionId("97e136ef-4ddd-4ff3-89a7-a5820c96c2ca") - .xPlexLanguage("en") - .platformVersion("4.3 build 1057") - .build(); - - GetUsersResponse res = sdk.users().getUsers() - .request(req) - .call(); - - if (res.body().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `request` | [GetUsersRequest](../../models/operations/GetUsersRequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | - -### Response - -**[GetUsersResponse](../../models/operations/GetUsersResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| models/errors/GetUsersBadRequest | 400 | application/json | -| models/errors/GetUsersUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md deleted file mode 100644 index 2eec475c..00000000 --- a/docs/sdks/video/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# Video -(*video()*) - -## Overview - -API Calls that perform operations with Plex Media Server Videos - - -### Available Operations - -* [getTimeline](#gettimeline) - Get the timeline for a media item -* [startUniversalTranscode](#startuniversaltranscode) - Start Universal Transcode - -## getTimeline - -Get the timeline for a media item - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetTimelineBadRequest; -import dev.plexapi.sdk.models.errors.GetTimelineUnauthorized; -import dev.plexapi.sdk.models.operations.*; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetTimelineBadRequest, GetTimelineUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetTimelineRequest req = GetTimelineRequest.builder() - .ratingKey(23409d) - .key("/library/metadata/23409") - .state(State.PLAYING) - .hasMDE(1d) - .time(2000d) - .duration(10000d) - .context("home:hub.continueWatching") - .playQueueItemID(1d) - .playBackTime(2000d) - .row(1d) - .build(); - - GetTimelineResponse res = sdk.video().getTimeline() - .request(req) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `request` | [GetTimelineRequest](../../models/operations/GetTimelineRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[GetTimelineResponse](../../models/operations/GetTimelineResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models/errors/GetTimelineBadRequest | 400 | application/json | -| models/errors/GetTimelineUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## startUniversalTranscode - -Begin a Universal Transcode Session - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest; -import dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws StartUniversalTranscodeBadRequest, StartUniversalTranscodeUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder() - .hasMDE(1d) - .path("/library/metadata/23409") - .mediaIndex(0d) - .partIndex(0d) - .protocol("hls") - .fastSeek(0d) - .directPlay(0d) - .directStream(0d) - .subtitleSize(100d) - .subtites("burn") - .audioBoost(100d) - .location("lan") - .mediaBufferSize(102400d) - .session("zvcage8b7rkioqcm8f4uns4c") - .addDebugOverlay(0d) - .autoAdjustQuality(0d) - .build(); - - StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode() - .request(req) - .call(); - - // handle response - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `request` | [StartUniversalTranscodeRequest](../../models/operations/StartUniversalTranscodeRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[StartUniversalTranscodeResponse](../../models/operations/StartUniversalTranscodeResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| models/errors/StartUniversalTranscodeBadRequest | 400 | application/json | -| models/errors/StartUniversalTranscodeUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md deleted file mode 100644 index 6de6bf7b..00000000 --- a/docs/sdks/watchlist/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Watchlist -(*watchlist()*) - -## Overview - -API Calls that perform operations with Plex Media Server Watchlists - - -### Available Operations - -* [getWatchList](#getwatchlist) - Get User Watchlist - -## getWatchList - -Get User Watchlist - -### Example Usage - - -```java -package hello.world; - -import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetWatchListBadRequest; -import dev.plexapi.sdk.models.errors.GetWatchListUnauthorized; -import dev.plexapi.sdk.models.operations.*; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws GetWatchListBadRequest, GetWatchListUnauthorized, Exception { - - PlexAPI sdk = PlexAPI.builder() - .accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", "")) - .build(); - - GetWatchListRequest req = GetWatchListRequest.builder() - .filter(Filter.RELEASED) - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .build(); - - GetWatchListResponse res = sdk.watchlist().getWatchList() - .request(req) - .call(); - - if (res.object().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `request` | [GetWatchListRequest](../../models/operations/GetWatchListRequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | - -### Response - -**[GetWatchListResponse](../../models/operations/GetWatchListResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| models/errors/GetWatchListBadRequest | 400 | application/json | -| models/errors/GetWatchListUnauthorized | 401 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index d4317d78..b491e413 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=dev.plexapi artifactId=plexapi -version=0.18.0 +version=0.19.1 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/dev/plexapi/sdk/Activities.java b/src/main/java/dev/plexapi/sdk/Activities.java index ddfb0717..c0dd349a 100644 --- a/src/main/java/dev/plexapi/sdk/Activities.java +++ b/src/main/java/dev/plexapi/sdk/Activities.java @@ -6,24 +6,21 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import dev.plexapi.sdk.models.operations.CancelServerActivitiesRequest; -import dev.plexapi.sdk.models.operations.CancelServerActivitiesRequestBuilder; -import dev.plexapi.sdk.models.operations.CancelServerActivitiesResponse; -import dev.plexapi.sdk.models.operations.GetServerActivitiesRequestBuilder; -import dev.plexapi.sdk.models.operations.GetServerActivitiesResponse; -import dev.plexapi.sdk.operations.CancelServerActivities; -import dev.plexapi.sdk.operations.GetServerActivities; +import dev.plexapi.sdk.models.operations.CancelActivityRequest; +import dev.plexapi.sdk.models.operations.CancelActivityRequestBuilder; +import dev.plexapi.sdk.models.operations.CancelActivityResponse; +import dev.plexapi.sdk.models.operations.ListActivitiesRequestBuilder; +import dev.plexapi.sdk.models.operations.ListActivitiesResponse; +import dev.plexapi.sdk.operations.CancelActivity; +import dev.plexapi.sdk.operations.ListActivities; import java.lang.Exception; -import java.lang.String; /** - * Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. - * Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. - * Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: - * - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. - * - They must contain an `type` which is used by clients to distinguish the specific activity. - * - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) - * - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + * Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + * + *

Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + * + *

Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. */ public class Activities { private final SDKConfiguration sdkConfiguration; @@ -44,58 +41,53 @@ public class Activities { } /** - * Get Server Activities + * Get all activities * - *

Get Server Activities + *

List all activities on the server. Admins can see all activities but other users can only see their own * * @return The call builder */ - public GetServerActivitiesRequestBuilder getServerActivities() { - return new GetServerActivitiesRequestBuilder(sdkConfiguration); + public ListActivitiesRequestBuilder listActivities() { + return new ListActivitiesRequestBuilder(sdkConfiguration); } /** - * Get Server Activities + * Get all activities * - *

Get Server Activities + *

List all activities on the server. Admins can see all activities but other users can only see their own * * @return The response from the API call * @throws Exception if the API call fails */ - public GetServerActivitiesResponse getServerActivitiesDirect() throws Exception { - RequestlessOperation operation - = new GetServerActivities.Sync(sdkConfiguration); + public ListActivitiesResponse listActivitiesDirect() throws Exception { + RequestlessOperation operation + = new ListActivities.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest()); } /** - * Cancel Server Activities + * Cancel a running activity * - *

Cancel Server Activities + *

Cancel a running activity. Admins can cancel all activities but other users can only cancel their own * * @return The call builder */ - public CancelServerActivitiesRequestBuilder cancelServerActivities() { - return new CancelServerActivitiesRequestBuilder(sdkConfiguration); + public CancelActivityRequestBuilder cancelActivity() { + return new CancelActivityRequestBuilder(sdkConfiguration); } /** - * Cancel Server Activities + * Cancel a running activity * - *

Cancel Server Activities + *

Cancel a running activity. Admins can cancel all activities but other users can only cancel their own * - * @param activityUUID The UUID of the activity to cancel. + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public CancelServerActivitiesResponse cancelServerActivities(String activityUUID) throws Exception { - CancelServerActivitiesRequest request = - CancelServerActivitiesRequest - .builder() - .activityUUID(activityUUID) - .build(); - RequestOperation operation - = new CancelServerActivities.Sync(sdkConfiguration); + public CancelActivityResponse cancelActivity(CancelActivityRequest request) throws Exception { + RequestOperation operation + = new CancelActivity.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/AsyncActivities.java b/src/main/java/dev/plexapi/sdk/AsyncActivities.java index 6150ce16..f083214b 100644 --- a/src/main/java/dev/plexapi/sdk/AsyncActivities.java +++ b/src/main/java/dev/plexapi/sdk/AsyncActivities.java @@ -6,24 +6,21 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import dev.plexapi.sdk.models.operations.CancelServerActivitiesRequest; -import dev.plexapi.sdk.models.operations.async.CancelServerActivitiesRequestBuilder; -import dev.plexapi.sdk.models.operations.async.CancelServerActivitiesResponse; -import dev.plexapi.sdk.models.operations.async.GetServerActivitiesRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetServerActivitiesResponse; -import dev.plexapi.sdk.operations.CancelServerActivities; -import dev.plexapi.sdk.operations.GetServerActivities; -import java.lang.String; +import dev.plexapi.sdk.models.operations.CancelActivityRequest; +import dev.plexapi.sdk.models.operations.async.CancelActivityRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CancelActivityResponse; +import dev.plexapi.sdk.models.operations.async.ListActivitiesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListActivitiesResponse; +import dev.plexapi.sdk.operations.CancelActivity; +import dev.plexapi.sdk.operations.ListActivities; import java.util.concurrent.CompletableFuture; /** - * Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. - * Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. - * Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: - * - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. - * - They must contain an `type` which is used by clients to distinguish the specific activity. - * - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) - * - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + * Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + * + *

Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + * + *

Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. */ public class AsyncActivities { private final SDKConfiguration sdkConfiguration; @@ -45,58 +42,53 @@ public class AsyncActivities { /** - * Get Server Activities + * Get all activities * - *

Get Server Activities + *

List all activities on the server. Admins can see all activities but other users can only see their own * * @return The async call builder */ - public GetServerActivitiesRequestBuilder getServerActivities() { - return new GetServerActivitiesRequestBuilder(sdkConfiguration); + public ListActivitiesRequestBuilder listActivities() { + return new ListActivitiesRequestBuilder(sdkConfiguration); } /** - * Get Server Activities + * Get all activities * - *

Get Server Activities + *

List all activities on the server. Admins can see all activities but other users can only see their own * - * @return CompletableFuture<GetServerActivitiesResponse> - The async response + * @return CompletableFuture<ListActivitiesResponse> - The async response */ - public CompletableFuture getServerActivitiesDirect() { - AsyncRequestlessOperation operation - = new GetServerActivities.Async(sdkConfiguration); + public CompletableFuture listActivitiesDirect() { + AsyncRequestlessOperation operation + = new ListActivities.Async(sdkConfiguration); return operation.doRequest() .thenCompose(operation::handleResponse); } /** - * Cancel Server Activities + * Cancel a running activity * - *

Cancel Server Activities + *

Cancel a running activity. Admins can cancel all activities but other users can only cancel their own * * @return The async call builder */ - public CancelServerActivitiesRequestBuilder cancelServerActivities() { - return new CancelServerActivitiesRequestBuilder(sdkConfiguration); + public CancelActivityRequestBuilder cancelActivity() { + return new CancelActivityRequestBuilder(sdkConfiguration); } /** - * Cancel Server Activities + * Cancel a running activity * - *

Cancel Server Activities + *

Cancel a running activity. Admins can cancel all activities but other users can only cancel their own * - * @param activityUUID The UUID of the activity to cancel. - * @return CompletableFuture<CancelServerActivitiesResponse> - The async response + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CancelActivityResponse> - The async response */ - public CompletableFuture cancelServerActivities(String activityUUID) { - CancelServerActivitiesRequest request = - CancelServerActivitiesRequest - .builder() - .activityUUID(activityUUID) - .build(); - AsyncRequestOperation operation - = new CancelServerActivities.Async(sdkConfiguration); + public CompletableFuture cancelActivity(CancelActivityRequest request) { + AsyncRequestOperation operation + = new CancelActivity.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } diff --git a/src/main/java/dev/plexapi/sdk/AsyncAuthentication.java b/src/main/java/dev/plexapi/sdk/AsyncAuthentication.java deleted file mode 100644 index 911990c8..00000000 --- a/src/main/java/dev/plexapi/sdk/AsyncAuthentication.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequest; -import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType; -import dev.plexapi.sdk.models.operations.GetTransientTokenRequest; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest; -import dev.plexapi.sdk.models.operations.Scope; -import dev.plexapi.sdk.models.operations.async.GetSourceConnectionInformationRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetSourceConnectionInformationResponse; -import dev.plexapi.sdk.models.operations.async.GetTokenDetailsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetTokenDetailsResponse; -import dev.plexapi.sdk.models.operations.async.GetTransientTokenRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetTransientTokenResponse; -import dev.plexapi.sdk.models.operations.async.PostUsersSignInDataRequestBuilder; -import dev.plexapi.sdk.models.operations.async.PostUsersSignInDataResponse; -import dev.plexapi.sdk.operations.GetSourceConnectionInformation; -import dev.plexapi.sdk.operations.GetTokenDetails; -import dev.plexapi.sdk.operations.GetTransientToken; -import dev.plexapi.sdk.operations.PostUsersSignInData; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -/** - * API Calls regarding authentication for Plex Media Server - */ -public class AsyncAuthentication { - private final SDKConfiguration sdkConfiguration; - private final Authentication syncSDK; - - AsyncAuthentication(Authentication syncSDK, SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.syncSDK = syncSDK; - } - - /** - * Switches to the sync SDK. - * - * @return The sync SDK - */ - public Authentication sync() { - return syncSDK; - } - - - /** - * Get a Transient Token - * - *

This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. - * - * @return The async call builder - */ - public GetTransientTokenRequestBuilder getTransientToken() { - return new GetTransientTokenRequestBuilder(sdkConfiguration); - } - - /** - * Get a Transient Token - * - *

This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. - * - * @param type `delegation` - This is the only supported `type` parameter. - * @param scope `all` - This is the only supported `scope` parameter. - * @return CompletableFuture<GetTransientTokenResponse> - The async response - */ - public CompletableFuture getTransientToken(GetTransientTokenQueryParamType type, Scope scope) { - GetTransientTokenRequest request = - GetTransientTokenRequest - .builder() - .type(type) - .scope(scope) - .build(); - AsyncRequestOperation operation - = new GetTransientToken.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Source Connection Information - * - *

If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. - * Note: requires Plex Media Server >= 1.15.4. - * - * @return The async call builder - */ - public GetSourceConnectionInformationRequestBuilder getSourceConnectionInformation() { - return new GetSourceConnectionInformationRequestBuilder(sdkConfiguration); - } - - /** - * Get Source Connection Information - * - *

If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. - * Note: requires Plex Media Server >= 1.15.4. - * - * @param source The source identifier with an included prefix. - * @return CompletableFuture<GetSourceConnectionInformationResponse> - The async response - */ - public CompletableFuture getSourceConnectionInformation(String source) { - GetSourceConnectionInformationRequest request = - GetSourceConnectionInformationRequest - .builder() - .source(source) - .build(); - AsyncRequestOperation operation - = new GetSourceConnectionInformation.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Token Details - * - *

Get the User data from the provided X-Plex-Token - * - * @return The async call builder - */ - public GetTokenDetailsRequestBuilder getTokenDetails() { - return new GetTokenDetailsRequestBuilder(sdkConfiguration); - } - - /** - * Get Token Details - * - *

Get the User data from the provided X-Plex-Token - * - * @return CompletableFuture<GetTokenDetailsResponse> - The async response - */ - public CompletableFuture getTokenDetailsDirect() { - return getTokenDetails(Optional.empty()); - } - - /** - * Get Token Details - * - *

Get the User data from the provided X-Plex-Token - * - * @param serverURL Overrides the server URL. - * @return CompletableFuture<GetTokenDetailsResponse> - The async response - */ - public CompletableFuture getTokenDetails(Optional serverURL) { - AsyncRequestlessOperation operation - = new GetTokenDetails.Async(sdkConfiguration, serverURL); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get User Sign In Data - * - *

Sign in user with username and password and return user data with Plex authentication token - * - * @return The async call builder - */ - public PostUsersSignInDataRequestBuilder postUsersSignInData() { - return new PostUsersSignInDataRequestBuilder(sdkConfiguration); - } - - /** - * 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 the parameters for the API call. - * @return CompletableFuture<PostUsersSignInDataResponse> - The async response - */ - public CompletableFuture postUsersSignInData(PostUsersSignInDataRequest request) { - return postUsersSignInData(request, Optional.empty()); - } - - /** - * 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 the parameters for the API call. - * @param serverURL Overrides the server URL. - * @return CompletableFuture<PostUsersSignInDataResponse> - The async response - */ - public CompletableFuture postUsersSignInData(PostUsersSignInDataRequest request, Optional serverURL) { - AsyncRequestOperation operation - = new PostUsersSignInData.Async(sdkConfiguration, serverURL); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/AsyncButler.java b/src/main/java/dev/plexapi/sdk/AsyncButler.java index e93b92d9..6710568b 100644 --- a/src/main/java/dev/plexapi/sdk/AsyncButler.java +++ b/src/main/java/dev/plexapi/sdk/AsyncButler.java @@ -6,29 +6,27 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import dev.plexapi.sdk.models.operations.PathParamTaskName; import dev.plexapi.sdk.models.operations.StartTaskRequest; import dev.plexapi.sdk.models.operations.StopTaskRequest; -import dev.plexapi.sdk.models.operations.TaskName; -import dev.plexapi.sdk.models.operations.async.GetButlerTasksRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetButlerTasksResponse; -import dev.plexapi.sdk.models.operations.async.StartAllTasksRequestBuilder; -import dev.plexapi.sdk.models.operations.async.StartAllTasksResponse; +import dev.plexapi.sdk.models.operations.async.GetTasksRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetTasksResponse; import dev.plexapi.sdk.models.operations.async.StartTaskRequestBuilder; import dev.plexapi.sdk.models.operations.async.StartTaskResponse; -import dev.plexapi.sdk.models.operations.async.StopAllTasksRequestBuilder; -import dev.plexapi.sdk.models.operations.async.StopAllTasksResponse; +import dev.plexapi.sdk.models.operations.async.StartTasksRequestBuilder; +import dev.plexapi.sdk.models.operations.async.StartTasksResponse; import dev.plexapi.sdk.models.operations.async.StopTaskRequestBuilder; import dev.plexapi.sdk.models.operations.async.StopTaskResponse; -import dev.plexapi.sdk.operations.GetButlerTasks; -import dev.plexapi.sdk.operations.StartAllTasks; +import dev.plexapi.sdk.models.operations.async.StopTasksRequestBuilder; +import dev.plexapi.sdk.models.operations.async.StopTasksResponse; +import dev.plexapi.sdk.operations.GetTasks; import dev.plexapi.sdk.operations.StartTask; -import dev.plexapi.sdk.operations.StopAllTasks; +import dev.plexapi.sdk.operations.StartTasks; import dev.plexapi.sdk.operations.StopTask; +import dev.plexapi.sdk.operations.StopTasks; import java.util.concurrent.CompletableFuture; /** - * Butler is the task manager of the Plex Media Server Ecosystem. + * The butler is responsible for running periodic tasks. Some tasks run daily, others every few days, and some weekly. These includes database maintenance, metadata updating, thumbnail generation, media analysis, and other tasks. */ public class AsyncButler { private final SDKConfiguration sdkConfiguration; @@ -50,26 +48,52 @@ public class AsyncButler { /** - * Get Butler tasks + * Stop all Butler tasks * - *

Returns a list of butler tasks + *

This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. * * @return The async call builder */ - public GetButlerTasksRequestBuilder getButlerTasks() { - return new GetButlerTasksRequestBuilder(sdkConfiguration); + public StopTasksRequestBuilder stopTasks() { + return new StopTasksRequestBuilder(sdkConfiguration); } /** - * Get Butler tasks + * Stop all Butler tasks * - *

Returns a list of butler tasks + *

This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. * - * @return CompletableFuture<GetButlerTasksResponse> - The async response + * @return CompletableFuture<StopTasksResponse> - The async response */ - public CompletableFuture getButlerTasksDirect() { - AsyncRequestlessOperation operation - = new GetButlerTasks.Async(sdkConfiguration); + public CompletableFuture stopTasksDirect() { + AsyncRequestlessOperation operation + = new StopTasks.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Get all Butler tasks + * + *

Get the list of butler tasks and their scheduling + * + * @return The async call builder + */ + public GetTasksRequestBuilder getTasks() { + return new GetTasksRequestBuilder(sdkConfiguration); + } + + /** + * Get all Butler tasks + * + *

Get the list of butler tasks and their scheduling + * + * @return CompletableFuture<GetTasksResponse> - The async response + */ + public CompletableFuture getTasksDirect() { + AsyncRequestlessOperation operation + = new GetTasks.Async(sdkConfiguration); return operation.doRequest() .thenCompose(operation::handleResponse); } @@ -79,106 +103,42 @@ public class AsyncButler { * Start all Butler tasks * *

This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - * 1. Any tasks not scheduled to run on the current day will be skipped. - * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - * 4. If we are outside the configured window, the task will start immediately. + * + *

1. Any tasks not scheduled to run on the current day will be skipped. + * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + * 4. If we are outside the configured window, the task will start immediately. * * @return The async call builder */ - public StartAllTasksRequestBuilder startAllTasks() { - return new StartAllTasksRequestBuilder(sdkConfiguration); + public StartTasksRequestBuilder startTasks() { + return new StartTasksRequestBuilder(sdkConfiguration); } /** * Start all Butler tasks * *

This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - * 1. Any tasks not scheduled to run on the current day will be skipped. - * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - * 4. If we are outside the configured window, the task will start immediately. * - * @return CompletableFuture<StartAllTasksResponse> - The async response + *

1. Any tasks not scheduled to run on the current day will be skipped. + * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + * 4. If we are outside the configured window, the task will start immediately. + * + * @return CompletableFuture<StartTasksResponse> - The async response */ - public CompletableFuture startAllTasksDirect() { - AsyncRequestlessOperation operation - = new StartAllTasks.Async(sdkConfiguration); + public CompletableFuture startTasksDirect() { + AsyncRequestlessOperation operation + = new StartTasks.Async(sdkConfiguration); return operation.doRequest() .thenCompose(operation::handleResponse); } - /** - * Stop all Butler tasks - * - *

This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - * - * @return The async call builder - */ - public StopAllTasksRequestBuilder stopAllTasks() { - return new StopAllTasksRequestBuilder(sdkConfiguration); - } - - /** - * Stop all Butler tasks - * - *

This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - * - * @return CompletableFuture<StopAllTasksResponse> - The async response - */ - public CompletableFuture stopAllTasksDirect() { - AsyncRequestlessOperation operation - = new StopAllTasks.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Start a single Butler task - * - *

This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - * 1. Any tasks not scheduled to run on the current day will be skipped. - * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - * 4. If we are outside the configured window, the task will start immediately. - * - * @return The async call builder - */ - public StartTaskRequestBuilder startTask() { - return new StartTaskRequestBuilder(sdkConfiguration); - } - - /** - * Start a single Butler task - * - *

This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - * 1. Any tasks not scheduled to run on the current day will be skipped. - * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - * 4. If we are outside the configured window, the task will start immediately. - * - * @param taskName the name of the task to be started. - * @return CompletableFuture<StartTaskResponse> - The async response - */ - public CompletableFuture startTask(TaskName taskName) { - StartTaskRequest request = - StartTaskRequest - .builder() - .taskName(taskName) - .build(); - AsyncRequestOperation operation - = new StartTask.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - /** * Stop a single Butler task * - *

This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. + *

This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists * * @return The async call builder */ @@ -189,21 +149,43 @@ public class AsyncButler { /** * Stop a single Butler task * - *

This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. + *

This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists * - * @param taskName The name of the task to be started. + * @param request The request object containing all the parameters for the API call. * @return CompletableFuture<StopTaskResponse> - The async response */ - public CompletableFuture stopTask(PathParamTaskName taskName) { - StopTaskRequest request = - StopTaskRequest - .builder() - .taskName(taskName) - .build(); + public CompletableFuture stopTask(StopTaskRequest request) { AsyncRequestOperation operation = new StopTask.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } + + /** + * Start a single Butler task + * + *

This endpoint will attempt to start a specific Butler task by name. + * + * @return The async call builder + */ + public StartTaskRequestBuilder startTask() { + return new StartTaskRequestBuilder(sdkConfiguration); + } + + /** + * Start a single Butler task + * + *

This endpoint will attempt to start a specific Butler task by name. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<StartTaskResponse> - The async response + */ + public CompletableFuture startTask(StartTaskRequest request) { + AsyncRequestOperation operation + = new StartTask.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + } diff --git a/src/main/java/dev/plexapi/sdk/AsyncCollections.java b/src/main/java/dev/plexapi/sdk/AsyncCollections.java new file mode 100644 index 00000000..3525bbcf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncCollections.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.CreateCollectionRequest; +import dev.plexapi.sdk.models.operations.async.CreateCollectionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CreateCollectionResponse; +import dev.plexapi.sdk.operations.CreateCollection; +import java.util.concurrent.CompletableFuture; + +/** + * API Operations against the Collections + */ +public class AsyncCollections { + private final SDKConfiguration sdkConfiguration; + private final Collections syncSDK; + + AsyncCollections(Collections syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Collections sync() { + return syncSDK; + } + + + /** + * Create collection + * + *

Create a collection in the library + * + * @return The async call builder + */ + public CreateCollectionRequestBuilder createCollection() { + return new CreateCollectionRequestBuilder(sdkConfiguration); + } + + /** + * Create collection + * + *

Create a collection in the library + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CreateCollectionResponse> - The async response + */ + public CompletableFuture createCollection(CreateCollectionRequest request) { + AsyncRequestOperation operation + = new CreateCollection.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncContent.java b/src/main/java/dev/plexapi/sdk/AsyncContent.java new file mode 100644 index 00000000..2f1e4db4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncContent.java @@ -0,0 +1,434 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.GetAlbumsRequest; +import dev.plexapi.sdk.models.operations.GetAllLeavesRequest; +import dev.plexapi.sdk.models.operations.GetArtsRequest; +import dev.plexapi.sdk.models.operations.GetCategoriesRequest; +import dev.plexapi.sdk.models.operations.GetClusterRequest; +import dev.plexapi.sdk.models.operations.GetCollectionImageRequest; +import dev.plexapi.sdk.models.operations.GetCollectionItemsRequest; +import dev.plexapi.sdk.models.operations.GetFoldersRequest; +import dev.plexapi.sdk.models.operations.GetMetadataItemRequest; +import dev.plexapi.sdk.models.operations.GetSonicPathRequest; +import dev.plexapi.sdk.models.operations.GetSonicallySimilarRequest; +import dev.plexapi.sdk.models.operations.ListContentRequest; +import dev.plexapi.sdk.models.operations.ListMomentsRequest; +import dev.plexapi.sdk.models.operations.async.GetAlbumsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetAlbumsResponse; +import dev.plexapi.sdk.models.operations.async.GetAllLeavesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetAllLeavesResponse; +import dev.plexapi.sdk.models.operations.async.GetArtsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetArtsResponse; +import dev.plexapi.sdk.models.operations.async.GetCategoriesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetCategoriesResponse; +import dev.plexapi.sdk.models.operations.async.GetClusterRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetClusterResponse; +import dev.plexapi.sdk.models.operations.async.GetCollectionImageRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetCollectionImageResponse; +import dev.plexapi.sdk.models.operations.async.GetCollectionItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetCollectionItemsResponse; +import dev.plexapi.sdk.models.operations.async.GetFoldersRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetFoldersResponse; +import dev.plexapi.sdk.models.operations.async.GetMetadataItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetMetadataItemResponse; +import dev.plexapi.sdk.models.operations.async.GetSonicPathRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSonicPathResponse; +import dev.plexapi.sdk.models.operations.async.GetSonicallySimilarRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSonicallySimilarResponse; +import dev.plexapi.sdk.models.operations.async.ListContentRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListContentResponse; +import dev.plexapi.sdk.models.operations.async.ListMomentsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListMomentsResponse; +import dev.plexapi.sdk.operations.GetAlbums; +import dev.plexapi.sdk.operations.GetAllLeaves; +import dev.plexapi.sdk.operations.GetArts; +import dev.plexapi.sdk.operations.GetCategories; +import dev.plexapi.sdk.operations.GetCluster; +import dev.plexapi.sdk.operations.GetCollectionImage; +import dev.plexapi.sdk.operations.GetCollectionItems; +import dev.plexapi.sdk.operations.GetFolders; +import dev.plexapi.sdk.operations.GetMetadataItem; +import dev.plexapi.sdk.operations.GetSonicPath; +import dev.plexapi.sdk.operations.GetSonicallySimilar; +import dev.plexapi.sdk.operations.ListContent; +import dev.plexapi.sdk.operations.ListMoments; +import java.util.concurrent.CompletableFuture; + +/** + * The actual content of the media provider + */ +public class AsyncContent { + private final SDKConfiguration sdkConfiguration; + private final Content syncSDK; + + AsyncContent(Content syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Content sync() { + return syncSDK; + } + + + /** + * Get items in a collection + * + *

Get items in a collection. Note if this collection contains more than 100 items, paging must be used. + * + * @return The async call builder + */ + public GetCollectionItemsRequestBuilder getCollectionItems() { + return new GetCollectionItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get items in a collection + * + *

Get items in a collection. Note if this collection contains more than 100 items, paging must be used. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetCollectionItemsResponse> - The async response + */ + public CompletableFuture getCollectionItems(GetCollectionItemsRequest request) { + AsyncRequestOperation operation + = new GetCollectionItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a metadata item + * + *

Get one or more metadata items. + * + * @return The async call builder + */ + public GetMetadataItemRequestBuilder getMetadataItem() { + return new GetMetadataItemRequestBuilder(sdkConfiguration); + } + + /** + * Get a metadata item + * + *

Get one or more metadata items. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetMetadataItemResponse> - The async response + */ + public CompletableFuture getMetadataItem(GetMetadataItemRequest request) { + AsyncRequestOperation operation + = new GetMetadataItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set section albums + * + *

Get all albums in a music section + * + * @return The async call builder + */ + public GetAlbumsRequestBuilder getAlbums() { + return new GetAlbumsRequestBuilder(sdkConfiguration); + } + + /** + * Set section albums + * + *

Get all albums in a music section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetAlbumsResponse> - The async response + */ + public CompletableFuture getAlbums(GetAlbumsRequest request) { + AsyncRequestOperation operation + = new GetAlbums.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get items in the section + * + *

Get the items in a section, potentially filtering them + * + * @return The async call builder + */ + public ListContentRequestBuilder listContent() { + return new ListContentRequestBuilder(sdkConfiguration); + } + + /** + * Get items in the section + * + *

Get the items in a section, potentially filtering them + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListContentResponse> - The async response + */ + public CompletableFuture listContent(ListContentRequest request) { + AsyncRequestOperation operation + = new ListContent.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set section leaves + * + *

Get all leaves in a section (such as episodes in a show section) + * + * @return The async call builder + */ + public GetAllLeavesRequestBuilder getAllLeaves() { + return new GetAllLeavesRequestBuilder(sdkConfiguration); + } + + /** + * Set section leaves + * + *

Get all leaves in a section (such as episodes in a show section) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetAllLeavesResponse> - The async response + */ + public CompletableFuture getAllLeaves(GetAllLeavesRequest request) { + AsyncRequestOperation operation + = new GetAllLeaves.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set section artwork + * + *

Get artwork for a library section + * + * @return The async call builder + */ + public GetArtsRequestBuilder getArts() { + return new GetArtsRequestBuilder(sdkConfiguration); + } + + /** + * Set section artwork + * + *

Get artwork for a library section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetArtsResponse> - The async response + */ + public CompletableFuture getArts(GetArtsRequest request) { + AsyncRequestOperation operation + = new GetArts.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set section categories + * + *

Get categories in a library section + * + * @return The async call builder + */ + public GetCategoriesRequestBuilder getCategories() { + return new GetCategoriesRequestBuilder(sdkConfiguration); + } + + /** + * Set section categories + * + *

Get categories in a library section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetCategoriesResponse> - The async response + */ + public CompletableFuture getCategories(GetCategoriesRequest request) { + AsyncRequestOperation operation + = new GetCategories.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set section clusters + * + *

Get clusters in a library section (typically for photos) + * + * @return The async call builder + */ + public GetClusterRequestBuilder getCluster() { + return new GetClusterRequestBuilder(sdkConfiguration); + } + + /** + * Set section clusters + * + *

Get clusters in a library section (typically for photos) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetClusterResponse> - The async response + */ + public CompletableFuture getCluster(GetClusterRequest request) { + AsyncRequestOperation operation + = new GetCluster.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Similar tracks to transition from one to another + * + *

Get a list of audio tracks starting at one and ending at another which are similar across the path + * + * @return The async call builder + */ + public GetSonicPathRequestBuilder getSonicPath() { + return new GetSonicPathRequestBuilder(sdkConfiguration); + } + + /** + * Similar tracks to transition from one to another + * + *

Get a list of audio tracks starting at one and ending at another which are similar across the path + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSonicPathResponse> - The async response + */ + public CompletableFuture getSonicPath(GetSonicPathRequest request) { + AsyncRequestOperation operation + = new GetSonicPath.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get all folder locations + * + *

Get all folder locations of the media in a section + * + * @return The async call builder + */ + public GetFoldersRequestBuilder getFolders() { + return new GetFoldersRequestBuilder(sdkConfiguration); + } + + /** + * Get all folder locations + * + *

Get all folder locations of the media in a section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetFoldersResponse> - The async response + */ + public CompletableFuture getFolders(GetFoldersRequest request) { + AsyncRequestOperation operation + = new GetFolders.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set section moments + * + *

Get moments in a library section (typically for photos) + * + * @return The async call builder + */ + public ListMomentsRequestBuilder listMoments() { + return new ListMomentsRequestBuilder(sdkConfiguration); + } + + /** + * Set section moments + * + *

Get moments in a library section (typically for photos) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListMomentsResponse> - The async response + */ + public CompletableFuture listMoments(ListMomentsRequest request) { + AsyncRequestOperation operation + = new ListMoments.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * The nearest audio tracks + * + *

Get the nearest audio tracks to a particular analysis + * + * @return The async call builder + */ + public GetSonicallySimilarRequestBuilder getSonicallySimilar() { + return new GetSonicallySimilarRequestBuilder(sdkConfiguration); + } + + /** + * The nearest audio tracks + * + *

Get the nearest audio tracks to a particular analysis + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSonicallySimilarResponse> - The async response + */ + public CompletableFuture getSonicallySimilar(GetSonicallySimilarRequest request) { + AsyncRequestOperation operation + = new GetSonicallySimilar.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a collection's image + * + *

Get an image for the collection based on the items within + * + * @return The async call builder + */ + public GetCollectionImageRequestBuilder getCollectionImage() { + return new GetCollectionImageRequestBuilder(sdkConfiguration); + } + + /** + * Get a collection's image + * + *

Get an image for the collection based on the items within + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetCollectionImageResponse> - The async response + */ + public CompletableFuture getCollectionImage(GetCollectionImageRequest request) { + AsyncRequestOperation operation + = new GetCollectionImage.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncDVRs.java b/src/main/java/dev/plexapi/sdk/AsyncDVRs.java new file mode 100644 index 00000000..8beb13d3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncDVRs.java @@ -0,0 +1,402 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.AddDeviceToDVRRequest; +import dev.plexapi.sdk.models.operations.AddLineupRequest; +import dev.plexapi.sdk.models.operations.CreateDVRRequest; +import dev.plexapi.sdk.models.operations.DeleteDVRRequest; +import dev.plexapi.sdk.models.operations.DeleteLineupRequest; +import dev.plexapi.sdk.models.operations.GetDVRRequest; +import dev.plexapi.sdk.models.operations.ReloadGuideRequest; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRRequest; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesRequest; +import dev.plexapi.sdk.models.operations.StopDVRReloadRequest; +import dev.plexapi.sdk.models.operations.TuneChannelRequest; +import dev.plexapi.sdk.models.operations.async.AddDeviceToDVRRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddDeviceToDVRResponse; +import dev.plexapi.sdk.models.operations.async.AddLineupRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddLineupResponse; +import dev.plexapi.sdk.models.operations.async.CreateDVRRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CreateDVRResponse; +import dev.plexapi.sdk.models.operations.async.DeleteDVRRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteDVRResponse; +import dev.plexapi.sdk.models.operations.async.DeleteLineupRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteLineupResponse; +import dev.plexapi.sdk.models.operations.async.GetDVRRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetDVRResponse; +import dev.plexapi.sdk.models.operations.async.ListDVRsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListDVRsResponse; +import dev.plexapi.sdk.models.operations.async.ReloadGuideRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ReloadGuideResponse; +import dev.plexapi.sdk.models.operations.async.RemoveDeviceFromDVRRequestBuilder; +import dev.plexapi.sdk.models.operations.async.RemoveDeviceFromDVRResponse; +import dev.plexapi.sdk.models.operations.async.SetDVRPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SetDVRPreferencesResponse; +import dev.plexapi.sdk.models.operations.async.StopDVRReloadRequestBuilder; +import dev.plexapi.sdk.models.operations.async.StopDVRReloadResponse; +import dev.plexapi.sdk.models.operations.async.TuneChannelRequestBuilder; +import dev.plexapi.sdk.models.operations.async.TuneChannelResponse; +import dev.plexapi.sdk.operations.AddDeviceToDVR; +import dev.plexapi.sdk.operations.AddLineup; +import dev.plexapi.sdk.operations.CreateDVR; +import dev.plexapi.sdk.operations.DeleteDVR; +import dev.plexapi.sdk.operations.DeleteLineup; +import dev.plexapi.sdk.operations.GetDVR; +import dev.plexapi.sdk.operations.ListDVRs; +import dev.plexapi.sdk.operations.ReloadGuide; +import dev.plexapi.sdk.operations.RemoveDeviceFromDVR; +import dev.plexapi.sdk.operations.SetDVRPreferences; +import dev.plexapi.sdk.operations.StopDVRReload; +import dev.plexapi.sdk.operations.TuneChannel; +import java.util.concurrent.CompletableFuture; + +/** + * The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself + */ +public class AsyncDVRs { + private final SDKConfiguration sdkConfiguration; + private final DVRs syncSDK; + + AsyncDVRs(DVRs syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public DVRs sync() { + return syncSDK; + } + + + /** + * Get DVRs + * + *

Get the list of all available DVRs + * + * @return The async call builder + */ + public ListDVRsRequestBuilder listDVRs() { + return new ListDVRsRequestBuilder(sdkConfiguration); + } + + /** + * Get DVRs + * + *

Get the list of all available DVRs + * + * @return CompletableFuture<ListDVRsResponse> - The async response + */ + public CompletableFuture listDVRsDirect() { + AsyncRequestlessOperation operation + = new ListDVRs.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Create a DVR + * + *

Creation of a DVR, after creation of a devcie and a lineup is selected + * + * @return The async call builder + */ + public CreateDVRRequestBuilder createDVR() { + return new CreateDVRRequestBuilder(sdkConfiguration); + } + + /** + * Create a DVR + * + *

Creation of a DVR, after creation of a devcie and a lineup is selected + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CreateDVRResponse> - The async response + */ + public CompletableFuture createDVR(CreateDVRRequest request) { + AsyncRequestOperation operation + = new CreateDVR.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a single DVR + * + *

Delete a single DVR by its id (key) + * + * @return The async call builder + */ + public DeleteDVRRequestBuilder deleteDVR() { + return new DeleteDVRRequestBuilder(sdkConfiguration); + } + + /** + * Delete a single DVR + * + *

Delete a single DVR by its id (key) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteDVRResponse> - The async response + */ + public CompletableFuture deleteDVR(DeleteDVRRequest request) { + AsyncRequestOperation operation + = new DeleteDVR.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a single DVR + * + *

Get a single DVR by its id (key) + * + * @return The async call builder + */ + public GetDVRRequestBuilder getDVR() { + return new GetDVRRequestBuilder(sdkConfiguration); + } + + /** + * Get a single DVR + * + *

Get a single DVR by its id (key) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetDVRResponse> - The async response + */ + public CompletableFuture getDVR(GetDVRRequest request) { + AsyncRequestOperation operation + = new GetDVR.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a DVR Lineup + * + *

Deletes a DVR device's lineup. + * + * @return The async call builder + */ + public DeleteLineupRequestBuilder deleteLineup() { + return new DeleteLineupRequestBuilder(sdkConfiguration); + } + + /** + * Delete a DVR Lineup + * + *

Deletes a DVR device's lineup. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteLineupResponse> - The async response + */ + public CompletableFuture deleteLineup(DeleteLineupRequest request) { + AsyncRequestOperation operation + = new DeleteLineup.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Add a DVR Lineup + * + *

Add a lineup to a DVR device's set of lineups. + * + * @return The async call builder + */ + public AddLineupRequestBuilder addLineup() { + return new AddLineupRequestBuilder(sdkConfiguration); + } + + /** + * Add a DVR Lineup + * + *

Add a lineup to a DVR device's set of lineups. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddLineupResponse> - The async response + */ + public CompletableFuture addLineup(AddLineupRequest request) { + AsyncRequestOperation operation + = new AddLineup.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set DVR preferences + * + *

Set DVR preferences by name avd value + * + * @return The async call builder + */ + public SetDVRPreferencesRequestBuilder setDVRPreferences() { + return new SetDVRPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Set DVR preferences + * + *

Set DVR preferences by name avd value + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SetDVRPreferencesResponse> - The async response + */ + public CompletableFuture setDVRPreferences(SetDVRPreferencesRequest request) { + AsyncRequestOperation operation + = new SetDVRPreferences.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Tell a DVR to stop reloading program guide + * + *

Tell a DVR to stop reloading program guide + * + * @return The async call builder + */ + public StopDVRReloadRequestBuilder stopDVRReload() { + return new StopDVRReloadRequestBuilder(sdkConfiguration); + } + + /** + * Tell a DVR to stop reloading program guide + * + *

Tell a DVR to stop reloading program guide + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<StopDVRReloadResponse> - The async response + */ + public CompletableFuture stopDVRReload(StopDVRReloadRequest request) { + AsyncRequestOperation operation + = new StopDVRReload.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Tell a DVR to reload program guide + * + *

Tell a DVR to reload program guide + * + * @return The async call builder + */ + public ReloadGuideRequestBuilder reloadGuide() { + return new ReloadGuideRequestBuilder(sdkConfiguration); + } + + /** + * Tell a DVR to reload program guide + * + *

Tell a DVR to reload program guide + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ReloadGuideResponse> - The async response + */ + public CompletableFuture reloadGuide(ReloadGuideRequest request) { + AsyncRequestOperation operation + = new ReloadGuide.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Tune a channel on a DVR + * + *

Tune a channel on a DVR to the provided channel + * + * @return The async call builder + */ + public TuneChannelRequestBuilder tuneChannel() { + return new TuneChannelRequestBuilder(sdkConfiguration); + } + + /** + * Tune a channel on a DVR + * + *

Tune a channel on a DVR to the provided channel + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<TuneChannelResponse> - The async response + */ + public CompletableFuture tuneChannel(TuneChannelRequest request) { + AsyncRequestOperation operation + = new TuneChannel.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Remove a device from an existing DVR + * + *

Remove a device from an existing DVR + * + * @return The async call builder + */ + public RemoveDeviceFromDVRRequestBuilder removeDeviceFromDVR() { + return new RemoveDeviceFromDVRRequestBuilder(sdkConfiguration); + } + + /** + * Remove a device from an existing DVR + * + *

Remove a device from an existing DVR + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<RemoveDeviceFromDVRResponse> - The async response + */ + public CompletableFuture removeDeviceFromDVR(RemoveDeviceFromDVRRequest request) { + AsyncRequestOperation operation + = new RemoveDeviceFromDVR.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Add a device to an existing DVR + * + *

Add a device to an existing DVR + * + * @return The async call builder + */ + public AddDeviceToDVRRequestBuilder addDeviceToDVR() { + return new AddDeviceToDVRRequestBuilder(sdkConfiguration); + } + + /** + * Add a device to an existing DVR + * + *

Add a device to an existing DVR + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddDeviceToDVRResponse> - The async response + */ + public CompletableFuture addDeviceToDVR(AddDeviceToDVRRequest request) { + AsyncRequestOperation operation + = new AddDeviceToDVR.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncDevices.java b/src/main/java/dev/plexapi/sdk/AsyncDevices.java new file mode 100644 index 00000000..0a4420be --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncDevices.java @@ -0,0 +1,464 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.models.operations.AddDeviceRequest; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersRequest; +import dev.plexapi.sdk.models.operations.GetDeviceDetailsRequest; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsRequest; +import dev.plexapi.sdk.models.operations.GetThumbRequest; +import dev.plexapi.sdk.models.operations.ModifyDeviceRequest; +import dev.plexapi.sdk.models.operations.RemoveDeviceRequest; +import dev.plexapi.sdk.models.operations.ScanRequest; +import dev.plexapi.sdk.models.operations.SetChannelmapRequest; +import dev.plexapi.sdk.models.operations.SetDevicePreferencesRequest; +import dev.plexapi.sdk.models.operations.StopScanRequest; +import dev.plexapi.sdk.models.operations.async.AddDeviceRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddDeviceResponse; +import dev.plexapi.sdk.models.operations.async.DiscoverDevicesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DiscoverDevicesResponse; +import dev.plexapi.sdk.models.operations.async.GetAvailableGrabbersRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetAvailableGrabbersResponse; +import dev.plexapi.sdk.models.operations.async.GetDeviceDetailsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetDeviceDetailsResponse; +import dev.plexapi.sdk.models.operations.async.GetDevicesChannelsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetDevicesChannelsResponse; +import dev.plexapi.sdk.models.operations.async.GetThumbRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetThumbResponse; +import dev.plexapi.sdk.models.operations.async.ListDevicesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListDevicesResponse; +import dev.plexapi.sdk.models.operations.async.ModifyDeviceRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ModifyDeviceResponse; +import dev.plexapi.sdk.models.operations.async.RemoveDeviceRequestBuilder; +import dev.plexapi.sdk.models.operations.async.RemoveDeviceResponse; +import dev.plexapi.sdk.models.operations.async.ScanRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ScanResponse; +import dev.plexapi.sdk.models.operations.async.SetChannelmapRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SetChannelmapResponse; +import dev.plexapi.sdk.models.operations.async.SetDevicePreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SetDevicePreferencesResponse; +import dev.plexapi.sdk.models.operations.async.StopScanRequestBuilder; +import dev.plexapi.sdk.models.operations.async.StopScanResponse; +import dev.plexapi.sdk.operations.AddDevice; +import dev.plexapi.sdk.operations.DiscoverDevices; +import dev.plexapi.sdk.operations.GetAvailableGrabbers; +import dev.plexapi.sdk.operations.GetDeviceDetails; +import dev.plexapi.sdk.operations.GetDevicesChannels; +import dev.plexapi.sdk.operations.GetThumb; +import dev.plexapi.sdk.operations.ListDevices; +import dev.plexapi.sdk.operations.ModifyDevice; +import dev.plexapi.sdk.operations.RemoveDevice; +import dev.plexapi.sdk.operations.Scan; +import dev.plexapi.sdk.operations.SetChannelmap; +import dev.plexapi.sdk.operations.SetDevicePreferences; +import dev.plexapi.sdk.operations.StopScan; +import java.util.concurrent.CompletableFuture; + +/** + * Media grabbers provide ways for media to be obtained for a given protocol. The simplest ones are `stream` and `download`. More complex grabbers can have associated devices + * + *

Network tuners can present themselves on the network using the Simple Service Discovery Protocol and Plex Media Server will discover them. The following XML is an example of the data returned from SSDP. The `deviceType`, `serviceType`, and `serviceId` values must remain as they are in the example in order for PMS to properly discover the device. Other less-obvious fields are described in the parameters section below. + * + *

Example SSDP output + * ``` + * <root xmlns="urn:schemas-upnp-org:device-1-0"> + * <specVersion> + * <major>1</major> + * <minor>0</minor> + * </specVersion> + * <device> + * <deviceType>urn:plex-tv:device:Media:1</deviceType> + * <friendlyName>Turing Hopper 3000</friendlyName> + * <manufacturer>Plex, Inc.</manufacturer> + * <manufacturerURL>https://plex.tv/</manufacturerURL> + * <modelDescription>Turing Hopper 3000 Media Grabber</modelDescription> + * <modelName>Plex Media Grabber</modelName> + * <modelNumber>1</modelNumber> + * <modelURL>https://plex.tv</modelURL> + * <UDN>uuid:42fde8e4-93b6-41e5-8a63-12d848655811</UDN> + * <serviceList> + * <service> + * <URLBase>http://10.0.0.5:8088</URLBase> + * <serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType> + * <serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId> + * </service> + * </serviceList> + * </device> + * </root> + * ``` + * + *

- UDN: (string) A UUID for the device. This should be unique across models of a device at minimum. + * - URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted. + */ +public class AsyncDevices { + private final SDKConfiguration sdkConfiguration; + private final Devices syncSDK; + + AsyncDevices(Devices syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Devices sync() { + return syncSDK; + } + + + /** + * Get available grabbers + * + *

Get available grabbers visible to the server + * + * @return The async call builder + */ + public GetAvailableGrabbersRequestBuilder getAvailableGrabbers() { + return new GetAvailableGrabbersRequestBuilder(sdkConfiguration); + } + + /** + * Get available grabbers + * + *

Get available grabbers visible to the server + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetAvailableGrabbersResponse> - The async response + */ + public CompletableFuture getAvailableGrabbers(GetAvailableGrabbersRequest request) { + AsyncRequestOperation operation + = new GetAvailableGrabbers.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get all devices + * + *

Get the list of all devices present + * + * @return The async call builder + */ + public ListDevicesRequestBuilder listDevices() { + return new ListDevicesRequestBuilder(sdkConfiguration); + } + + /** + * Get all devices + * + *

Get the list of all devices present + * + * @return CompletableFuture<ListDevicesResponse> - The async response + */ + public CompletableFuture listDevicesDirect() { + AsyncRequestlessOperation operation + = new ListDevices.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Add a device + * + *

This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber. + * + * @return The async call builder + */ + public AddDeviceRequestBuilder addDevice() { + return new AddDeviceRequestBuilder(sdkConfiguration); + } + + /** + * Add a device + * + *

This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddDeviceResponse> - The async response + */ + public CompletableFuture addDevice(AddDeviceRequest request) { + AsyncRequestOperation operation + = new AddDevice.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Tell grabbers to discover devices + * + *

Tell grabbers to discover devices + * + * @return The async call builder + */ + public DiscoverDevicesRequestBuilder discoverDevices() { + return new DiscoverDevicesRequestBuilder(sdkConfiguration); + } + + /** + * Tell grabbers to discover devices + * + *

Tell grabbers to discover devices + * + * @return CompletableFuture<DiscoverDevicesResponse> - The async response + */ + public CompletableFuture discoverDevicesDirect() { + AsyncRequestlessOperation operation + = new DiscoverDevices.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Remove a device + * + *

Remove a devices by its id along with its channel mappings + * + * @return The async call builder + */ + public RemoveDeviceRequestBuilder removeDevice() { + return new RemoveDeviceRequestBuilder(sdkConfiguration); + } + + /** + * Remove a device + * + *

Remove a devices by its id along with its channel mappings + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<RemoveDeviceResponse> - The async response + */ + public CompletableFuture removeDevice(RemoveDeviceRequest request) { + AsyncRequestOperation operation + = new RemoveDevice.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get device details + * + *

Get a device's details by its id + * + * @return The async call builder + */ + public GetDeviceDetailsRequestBuilder getDeviceDetails() { + return new GetDeviceDetailsRequestBuilder(sdkConfiguration); + } + + /** + * Get device details + * + *

Get a device's details by its id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetDeviceDetailsResponse> - The async response + */ + public CompletableFuture getDeviceDetails(GetDeviceDetailsRequest request) { + AsyncRequestOperation operation + = new GetDeviceDetails.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Enable or disable a device + * + *

Enable or disable a device by its id + * + * @return The async call builder + */ + public ModifyDeviceRequestBuilder modifyDevice() { + return new ModifyDeviceRequestBuilder(sdkConfiguration); + } + + /** + * Enable or disable a device + * + *

Enable or disable a device by its id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ModifyDeviceResponse> - The async response + */ + public CompletableFuture modifyDevice(ModifyDeviceRequest request) { + AsyncRequestOperation operation + = new ModifyDevice.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set a device's channel mapping + * + *

Set a device's channel mapping + * + * @return The async call builder + */ + public SetChannelmapRequestBuilder setChannelmap() { + return new SetChannelmapRequestBuilder(sdkConfiguration); + } + + /** + * Set a device's channel mapping + * + *

Set a device's channel mapping + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SetChannelmapResponse> - The async response + */ + public CompletableFuture setChannelmap(SetChannelmapRequest request) { + AsyncRequestOperation operation + = new SetChannelmap.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a device's channels + * + *

Get a device's channels by its id + * + * @return The async call builder + */ + public GetDevicesChannelsRequestBuilder getDevicesChannels() { + return new GetDevicesChannelsRequestBuilder(sdkConfiguration); + } + + /** + * Get a device's channels + * + *

Get a device's channels by its id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetDevicesChannelsResponse> - The async response + */ + public CompletableFuture getDevicesChannels(GetDevicesChannelsRequest request) { + AsyncRequestOperation operation + = new GetDevicesChannels.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set device preferences + * + *

Set device preferences by its id + * + * @return The async call builder + */ + public SetDevicePreferencesRequestBuilder setDevicePreferences() { + return new SetDevicePreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Set device preferences + * + *

Set device preferences by its id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SetDevicePreferencesResponse> - The async response + */ + public CompletableFuture setDevicePreferences(SetDevicePreferencesRequest request) { + AsyncRequestOperation operation + = new SetDevicePreferences.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Tell a device to stop scanning for channels + * + *

Tell a device to stop scanning for channels + * + * @return The async call builder + */ + public StopScanRequestBuilder stopScan() { + return new StopScanRequestBuilder(sdkConfiguration); + } + + /** + * Tell a device to stop scanning for channels + * + *

Tell a device to stop scanning for channels + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<StopScanResponse> - The async response + */ + public CompletableFuture stopScan(StopScanRequest request) { + AsyncRequestOperation operation + = new StopScan.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Tell a device to scan for channels + * + *

Tell a device to scan for channels + * + * @return The async call builder + */ + public ScanRequestBuilder scan() { + return new ScanRequestBuilder(sdkConfiguration); + } + + /** + * Tell a device to scan for channels + * + *

Tell a device to scan for channels + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ScanResponse> - The async response + */ + public CompletableFuture scan(ScanRequest request) { + AsyncRequestOperation operation + = new Scan.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get device thumb + * + *

Get a device's thumb for display to the user + * + * @return The async call builder + */ + public GetThumbRequestBuilder getThumb() { + return new GetThumbRequestBuilder(sdkConfiguration); + } + + /** + * Get device thumb + * + *

Get a device's thumb for display to the user + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetThumbResponse> - The async response + */ + public CompletableFuture getThumb(GetThumbRequest request) { + AsyncRequestOperation operation + = new GetThumb.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncDownloadQueue.java b/src/main/java/dev/plexapi/sdk/AsyncDownloadQueue.java new file mode 100644 index 00000000..b96b8722 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncDownloadQueue.java @@ -0,0 +1,341 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueRequest; +import dev.plexapi.sdk.models.operations.GetItemDecisionRequest; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.async.AddDownloadQueueItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.async.CreateDownloadQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CreateDownloadQueueResponse; +import dev.plexapi.sdk.models.operations.async.GetDownloadQueueItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.async.GetDownloadQueueMediaRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetDownloadQueueMediaResponse; +import dev.plexapi.sdk.models.operations.async.GetDownloadQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetDownloadQueueResponse; +import dev.plexapi.sdk.models.operations.async.GetItemDecisionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetItemDecisionResponse; +import dev.plexapi.sdk.models.operations.async.ListDownloadQueueItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.async.RemoveDownloadQueueItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.RemoveDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.async.RestartProcessingDownloadQueueItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.RestartProcessingDownloadQueueItemsResponse; +import dev.plexapi.sdk.operations.AddDownloadQueueItems; +import dev.plexapi.sdk.operations.CreateDownloadQueue; +import dev.plexapi.sdk.operations.GetDownloadQueue; +import dev.plexapi.sdk.operations.GetDownloadQueueItems; +import dev.plexapi.sdk.operations.GetDownloadQueueMedia; +import dev.plexapi.sdk.operations.GetItemDecision; +import dev.plexapi.sdk.operations.ListDownloadQueueItems; +import dev.plexapi.sdk.operations.RemoveDownloadQueueItems; +import dev.plexapi.sdk.operations.RestartProcessingDownloadQueueItems; +import java.util.concurrent.CompletableFuture; + +/** + * API Operations against the Download Queue + */ +public class AsyncDownloadQueue { + private final SDKConfiguration sdkConfiguration; + private final DownloadQueue syncSDK; + + AsyncDownloadQueue(DownloadQueue syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public DownloadQueue sync() { + return syncSDK; + } + + + /** + * Create download queue + * + *

Available: 0.2.0 + * + *

Creates a download queue for this client if one doesn't exist, or returns the existing queue for this client and user. + * + * @return The async call builder + */ + public CreateDownloadQueueRequestBuilder createDownloadQueue() { + return new CreateDownloadQueueRequestBuilder(sdkConfiguration); + } + + /** + * Create download queue + * + *

Available: 0.2.0 + * + *

Creates a download queue for this client if one doesn't exist, or returns the existing queue for this client and user. + * + * @return CompletableFuture<CreateDownloadQueueResponse> - The async response + */ + public CompletableFuture createDownloadQueueDirect() { + AsyncRequestlessOperation operation + = new CreateDownloadQueue.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Get a download queue + * + *

Available: 0.2.0 + * + *

Get a download queue by its id + * + * @return The async call builder + */ + public GetDownloadQueueRequestBuilder getDownloadQueue() { + return new GetDownloadQueueRequestBuilder(sdkConfiguration); + } + + /** + * Get a download queue + * + *

Available: 0.2.0 + * + *

Get a download queue by its id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetDownloadQueueResponse> - The async response + */ + public CompletableFuture getDownloadQueue(GetDownloadQueueRequest request) { + AsyncRequestOperation operation + = new GetDownloadQueue.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Add to download queue + * + *

Available: 0.2.0 + * + *

Add items to the download queue + * + * @return The async call builder + */ + public AddDownloadQueueItemsRequestBuilder addDownloadQueueItems() { + return new AddDownloadQueueItemsRequestBuilder(sdkConfiguration); + } + + /** + * Add to download queue + * + *

Available: 0.2.0 + * + *

Add items to the download queue + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddDownloadQueueItemsResponse> - The async response + */ + public CompletableFuture addDownloadQueueItems(AddDownloadQueueItemsRequest request) { + AsyncRequestOperation operation + = new AddDownloadQueueItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get download queue items + * + *

Available: 0.2.0 + * + *

Get items from a download queue + * + * @return The async call builder + */ + public ListDownloadQueueItemsRequestBuilder listDownloadQueueItems() { + return new ListDownloadQueueItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get download queue items + * + *

Available: 0.2.0 + * + *

Get items from a download queue + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListDownloadQueueItemsResponse> - The async response + */ + public CompletableFuture listDownloadQueueItems(ListDownloadQueueItemsRequest request) { + AsyncRequestOperation operation + = new ListDownloadQueueItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Grab download queue item decision + * + *

Available: 0.2.0 + * + *

Grab the decision for a download queue item + * + * @return The async call builder + */ + public GetItemDecisionRequestBuilder getItemDecision() { + return new GetItemDecisionRequestBuilder(sdkConfiguration); + } + + /** + * Grab download queue item decision + * + *

Available: 0.2.0 + * + *

Grab the decision for a download queue item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetItemDecisionResponse> - The async response + */ + public CompletableFuture getItemDecision(GetItemDecisionRequest request) { + AsyncRequestOperation operation + = new GetItemDecision.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Grab download queue media + * + *

Available: 0.2.0 + * + *

Grab the media for a download queue item + * + * @return The async call builder + */ + public GetDownloadQueueMediaRequestBuilder getDownloadQueueMedia() { + return new GetDownloadQueueMediaRequestBuilder(sdkConfiguration); + } + + /** + * Grab download queue media + * + *

Available: 0.2.0 + * + *

Grab the media for a download queue item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetDownloadQueueMediaResponse> - The async response + */ + public CompletableFuture getDownloadQueueMedia(GetDownloadQueueMediaRequest request) { + AsyncRequestOperation operation + = new GetDownloadQueueMedia.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete download queue items + * + *

delete items from a download queue + * + * @return The async call builder + */ + public RemoveDownloadQueueItemsRequestBuilder removeDownloadQueueItems() { + return new RemoveDownloadQueueItemsRequestBuilder(sdkConfiguration); + } + + /** + * Delete download queue items + * + *

delete items from a download queue + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<RemoveDownloadQueueItemsResponse> - The async response + */ + public CompletableFuture removeDownloadQueueItems(RemoveDownloadQueueItemsRequest request) { + AsyncRequestOperation operation + = new RemoveDownloadQueueItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get download queue items + * + *

Available: 0.2.0 + * + *

Get items from a download queue + * + * @return The async call builder + */ + public GetDownloadQueueItemsRequestBuilder getDownloadQueueItems() { + return new GetDownloadQueueItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get download queue items + * + *

Available: 0.2.0 + * + *

Get items from a download queue + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetDownloadQueueItemsResponse> - The async response + */ + public CompletableFuture getDownloadQueueItems(GetDownloadQueueItemsRequest request) { + AsyncRequestOperation operation + = new GetDownloadQueueItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Restart processing of items from the decision + * + *

Available: 0.2.0 + * + *

Reprocess download queue items with previous decision parameters + * + * @return The async call builder + */ + public RestartProcessingDownloadQueueItemsRequestBuilder restartProcessingDownloadQueueItems() { + return new RestartProcessingDownloadQueueItemsRequestBuilder(sdkConfiguration); + } + + /** + * Restart processing of items from the decision + * + *

Available: 0.2.0 + * + *

Reprocess download queue items with previous decision parameters + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<RestartProcessingDownloadQueueItemsResponse> - The async response + */ + public CompletableFuture restartProcessingDownloadQueueItems(RestartProcessingDownloadQueueItemsRequest request) { + AsyncRequestOperation operation + = new RestartProcessingDownloadQueueItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncEpg.java b/src/main/java/dev/plexapi/sdk/AsyncEpg.java new file mode 100644 index 00000000..95f7036e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncEpg.java @@ -0,0 +1,307 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.models.operations.ComputeChannelMapRequest; +import dev.plexapi.sdk.models.operations.GetChannelsRequest; +import dev.plexapi.sdk.models.operations.GetCountriesLineupsRequest; +import dev.plexapi.sdk.models.operations.GetCountryRegionsRequest; +import dev.plexapi.sdk.models.operations.GetLineupChannelsRequest; +import dev.plexapi.sdk.models.operations.GetLineupRequest; +import dev.plexapi.sdk.models.operations.ListLineupsRequest; +import dev.plexapi.sdk.models.operations.async.ComputeChannelMapRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ComputeChannelMapResponse; +import dev.plexapi.sdk.models.operations.async.GetAllLanguagesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetAllLanguagesResponse; +import dev.plexapi.sdk.models.operations.async.GetChannelsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetChannelsResponse; +import dev.plexapi.sdk.models.operations.async.GetCountriesLineupsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetCountriesLineupsResponse; +import dev.plexapi.sdk.models.operations.async.GetCountriesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetCountriesResponse; +import dev.plexapi.sdk.models.operations.async.GetCountryRegionsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetCountryRegionsResponse; +import dev.plexapi.sdk.models.operations.async.GetLineupChannelsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetLineupChannelsResponse; +import dev.plexapi.sdk.models.operations.async.GetLineupRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetLineupResponse; +import dev.plexapi.sdk.models.operations.async.ListLineupsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListLineupsResponse; +import dev.plexapi.sdk.operations.ComputeChannelMap; +import dev.plexapi.sdk.operations.GetAllLanguages; +import dev.plexapi.sdk.operations.GetChannels; +import dev.plexapi.sdk.operations.GetCountries; +import dev.plexapi.sdk.operations.GetCountriesLineups; +import dev.plexapi.sdk.operations.GetCountryRegions; +import dev.plexapi.sdk.operations.GetLineup; +import dev.plexapi.sdk.operations.GetLineupChannels; +import dev.plexapi.sdk.operations.ListLineups; +import java.util.concurrent.CompletableFuture; + +/** + * The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when + */ +public class AsyncEpg { + private final SDKConfiguration sdkConfiguration; + private final Epg syncSDK; + + AsyncEpg(Epg syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Epg sync() { + return syncSDK; + } + + + /** + * Compute the best channel map + * + *

Compute the best channel map, given device and lineup + * + * @return The async call builder + */ + public ComputeChannelMapRequestBuilder computeChannelMap() { + return new ComputeChannelMapRequestBuilder(sdkConfiguration); + } + + /** + * Compute the best channel map + * + *

Compute the best channel map, given device and lineup + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ComputeChannelMapResponse> - The async response + */ + public CompletableFuture computeChannelMap(ComputeChannelMapRequest request) { + AsyncRequestOperation operation + = new ComputeChannelMap.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get channels for a lineup + * + *

Get channels for a lineup within an EPG provider + * + * @return The async call builder + */ + public GetChannelsRequestBuilder getChannels() { + return new GetChannelsRequestBuilder(sdkConfiguration); + } + + /** + * Get channels for a lineup + * + *

Get channels for a lineup within an EPG provider + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetChannelsResponse> - The async response + */ + public CompletableFuture getChannels(GetChannelsRequest request) { + AsyncRequestOperation operation + = new GetChannels.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get all countries + * + *

This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute + * + * @return The async call builder + */ + public GetCountriesRequestBuilder getCountries() { + return new GetCountriesRequestBuilder(sdkConfiguration); + } + + /** + * Get all countries + * + *

This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute + * + * @return CompletableFuture<GetCountriesResponse> - The async response + */ + public CompletableFuture getCountriesDirect() { + AsyncRequestlessOperation operation + = new GetCountries.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Get all languages + * + *

Returns a list of all possible languages for EPG data. + * + * @return The async call builder + */ + public GetAllLanguagesRequestBuilder getAllLanguages() { + return new GetAllLanguagesRequestBuilder(sdkConfiguration); + } + + /** + * Get all languages + * + *

Returns a list of all possible languages for EPG data. + * + * @return CompletableFuture<GetAllLanguagesResponse> - The async response + */ + public CompletableFuture getAllLanguagesDirect() { + AsyncRequestlessOperation operation + = new GetAllLanguages.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Compute the best lineup + * + *

Compute the best lineup, given lineup group and device + * + * @return The async call builder + */ + public GetLineupRequestBuilder getLineup() { + return new GetLineupRequestBuilder(sdkConfiguration); + } + + /** + * Compute the best lineup + * + *

Compute the best lineup, given lineup group and device + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetLineupResponse> - The async response + */ + public CompletableFuture getLineup(GetLineupRequest request) { + AsyncRequestOperation operation + = new GetLineup.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get the channels for mulitple lineups + * + *

Get the channels across multiple lineups + * + * @return The async call builder + */ + public GetLineupChannelsRequestBuilder getLineupChannels() { + return new GetLineupChannelsRequestBuilder(sdkConfiguration); + } + + /** + * Get the channels for mulitple lineups + * + *

Get the channels across multiple lineups + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetLineupChannelsResponse> - The async response + */ + public CompletableFuture getLineupChannels(GetLineupChannelsRequest request) { + AsyncRequestOperation operation + = new GetLineupChannels.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get lineups for a country via postal code + * + *

Returns a list of lineups for a given country, EPG provider and postal code + * + * @return The async call builder + */ + public GetCountriesLineupsRequestBuilder getCountriesLineups() { + return new GetCountriesLineupsRequestBuilder(sdkConfiguration); + } + + /** + * Get lineups for a country via postal code + * + *

Returns a list of lineups for a given country, EPG provider and postal code + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetCountriesLineupsResponse> - The async response + */ + public CompletableFuture getCountriesLineups(GetCountriesLineupsRequest request) { + AsyncRequestOperation operation + = new GetCountriesLineups.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get regions for a country + * + *

Get regions for a country within an EPG provider + * + * @return The async call builder + */ + public GetCountryRegionsRequestBuilder getCountryRegions() { + return new GetCountryRegionsRequestBuilder(sdkConfiguration); + } + + /** + * Get regions for a country + * + *

Get regions for a country within an EPG provider + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetCountryRegionsResponse> - The async response + */ + public CompletableFuture getCountryRegions(GetCountryRegionsRequest request) { + AsyncRequestOperation operation + = new GetCountryRegions.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get lineups for a region + * + *

Get lineups for a region within an EPG provider + * + * @return The async call builder + */ + public ListLineupsRequestBuilder listLineups() { + return new ListLineupsRequestBuilder(sdkConfiguration); + } + + /** + * Get lineups for a region + * + *

Get lineups for a region within an EPG provider + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListLineupsResponse> - The async response + */ + public CompletableFuture listLineups(ListLineupsRequest request) { + AsyncRequestOperation operation + = new ListLineups.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncEvents.java b/src/main/java/dev/plexapi/sdk/AsyncEvents.java new file mode 100644 index 00000000..20cf2366 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncEvents.java @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.ConnectWebSocketRequest; +import dev.plexapi.sdk.models.operations.GetNotificationsRequest; +import dev.plexapi.sdk.models.operations.async.ConnectWebSocketRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ConnectWebSocketResponse; +import dev.plexapi.sdk.models.operations.async.GetNotificationsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetNotificationsResponse; +import dev.plexapi.sdk.operations.ConnectWebSocket; +import dev.plexapi.sdk.operations.GetNotifications; +import java.util.concurrent.CompletableFuture; + +/** + * The server can notify clients in real-time of a wide range of events, from library scanning, to preferences being modified, to changes to media, and many other things. This is also the mechanism by which activity progress is reported. + * + *

Two protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket. + */ +public class AsyncEvents { + private final SDKConfiguration sdkConfiguration; + private final Events syncSDK; + + AsyncEvents(Events syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Events sync() { + return syncSDK; + } + + + /** + * Connect to Eventsource + * + *

Connect to the event source to get a stream of events + * + * @return The async call builder + */ + public GetNotificationsRequestBuilder getNotifications() { + return new GetNotificationsRequestBuilder(sdkConfiguration); + } + + /** + * Connect to Eventsource + * + *

Connect to the event source to get a stream of events + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetNotificationsResponse> - The async response + */ + public CompletableFuture getNotifications(GetNotificationsRequest request) { + AsyncRequestOperation operation + = new GetNotifications.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Connect to WebSocket + * + *

Connect to the web socket to get a stream of events + * + * @return The async call builder + */ + public ConnectWebSocketRequestBuilder connectWebSocket() { + return new ConnectWebSocketRequestBuilder(sdkConfiguration); + } + + /** + * Connect to WebSocket + * + *

Connect to the web socket to get a stream of events + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ConnectWebSocketResponse> - The async response + */ + public CompletableFuture connectWebSocket(ConnectWebSocketRequest request) { + AsyncRequestOperation operation + = new ConnectWebSocket.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncGeneral.java b/src/main/java/dev/plexapi/sdk/AsyncGeneral.java new file mode 100644 index 00000000..9a455150 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncGeneral.java @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.models.operations.GetServerInfoRequest; +import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequest; +import dev.plexapi.sdk.models.operations.GetTransientTokenRequest; +import dev.plexapi.sdk.models.operations.async.GetIdentityRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetIdentityResponse; +import dev.plexapi.sdk.models.operations.async.GetServerInfoRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetServerInfoResponse; +import dev.plexapi.sdk.models.operations.async.GetSourceConnectionInformationRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSourceConnectionInformationResponse; +import dev.plexapi.sdk.models.operations.async.GetTransientTokenRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetTransientTokenResponse; +import dev.plexapi.sdk.operations.GetIdentity; +import dev.plexapi.sdk.operations.GetServerInfo; +import dev.plexapi.sdk.operations.GetSourceConnectionInformation; +import dev.plexapi.sdk.operations.GetTransientToken; +import java.util.concurrent.CompletableFuture; + +/** + * General endpoints for basic PMS operation not specific to any media provider + */ +public class AsyncGeneral { + private final SDKConfiguration sdkConfiguration; + private final General syncSDK; + + AsyncGeneral(General syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public General sync() { + return syncSDK; + } + + + /** + * Get PMS info + * + *

Information about this PMS setup and configuration + * + * @return The async call builder + */ + public GetServerInfoRequestBuilder getServerInfo() { + return new GetServerInfoRequestBuilder(sdkConfiguration); + } + + /** + * Get PMS info + * + *

Information about this PMS setup and configuration + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetServerInfoResponse> - The async response + */ + public CompletableFuture getServerInfo(GetServerInfoRequest request) { + AsyncRequestOperation operation + = new GetServerInfo.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get PMS identity + * + *

Get details about this PMS's identity + * + * @return The async call builder + */ + public GetIdentityRequestBuilder getIdentity() { + return new GetIdentityRequestBuilder(sdkConfiguration); + } + + /** + * Get PMS identity + * + *

Get details about this PMS's identity + * + * @return CompletableFuture<GetIdentityResponse> - The async response + */ + public CompletableFuture getIdentityDirect() { + AsyncRequestlessOperation operation + = new GetIdentity.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Get Source Connection Information + * + *

If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. + * + * @return The async call builder + */ + public GetSourceConnectionInformationRequestBuilder getSourceConnectionInformation() { + return new GetSourceConnectionInformationRequestBuilder(sdkConfiguration); + } + + /** + * Get Source Connection Information + * + *

If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSourceConnectionInformationResponse> - The async response + */ + public CompletableFuture getSourceConnectionInformation(GetSourceConnectionInformationRequest request) { + AsyncRequestOperation operation + = new GetSourceConnectionInformation.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get Transient Tokens + * + *

This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. + * Note: This endpoint responds to all HTTP verbs but POST in preferred + * + * @return The async call builder + */ + public GetTransientTokenRequestBuilder getTransientToken() { + return new GetTransientTokenRequestBuilder(sdkConfiguration); + } + + /** + * Get Transient Tokens + * + *

This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. + * Note: This endpoint responds to all HTTP verbs but POST in preferred + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetTransientTokenResponse> - The async response + */ + public CompletableFuture getTransientToken(GetTransientTokenRequest request) { + AsyncRequestOperation operation + = new GetTransientToken.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncHubs.java b/src/main/java/dev/plexapi/sdk/AsyncHubs.java index 0e1b6a8c..f84916ff 100644 --- a/src/main/java/dev/plexapi/sdk/AsyncHubs.java +++ b/src/main/java/dev/plexapi/sdk/AsyncHubs.java @@ -5,26 +5,66 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import dev.plexapi.sdk.models.operations.GetGlobalHubsRequest; -import dev.plexapi.sdk.models.operations.GetLibraryHubsRequest; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequest; -import dev.plexapi.sdk.models.operations.OnlyTransient; -import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient; -import dev.plexapi.sdk.models.operations.async.GetGlobalHubsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetGlobalHubsResponse; -import dev.plexapi.sdk.models.operations.async.GetLibraryHubsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetLibraryHubsResponse; -import dev.plexapi.sdk.models.operations.async.GetRecentlyAddedRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetRecentlyAddedResponse; -import dev.plexapi.sdk.operations.GetGlobalHubs; -import dev.plexapi.sdk.operations.GetLibraryHubs; -import dev.plexapi.sdk.operations.GetRecentlyAdded; -import java.lang.Double; -import java.util.Optional; +import dev.plexapi.sdk.models.operations.CreateCustomHubRequest; +import dev.plexapi.sdk.models.operations.DeleteCustomHubRequest; +import dev.plexapi.sdk.models.operations.GetAllHubsRequest; +import dev.plexapi.sdk.models.operations.GetContinueWatchingRequest; +import dev.plexapi.sdk.models.operations.GetHubItemsRequest; +import dev.plexapi.sdk.models.operations.GetMetadataHubsRequest; +import dev.plexapi.sdk.models.operations.GetPostplayHubsRequest; +import dev.plexapi.sdk.models.operations.GetPromotedHubsRequest; +import dev.plexapi.sdk.models.operations.GetRelatedHubsRequest; +import dev.plexapi.sdk.models.operations.GetSectionHubsRequest; +import dev.plexapi.sdk.models.operations.ListHubsRequest; +import dev.plexapi.sdk.models.operations.MoveHubRequest; +import dev.plexapi.sdk.models.operations.ResetSectionDefaultsRequest; +import dev.plexapi.sdk.models.operations.UpdateHubVisibilityRequest; +import dev.plexapi.sdk.models.operations.async.CreateCustomHubRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CreateCustomHubResponse; +import dev.plexapi.sdk.models.operations.async.DeleteCustomHubRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteCustomHubResponse; +import dev.plexapi.sdk.models.operations.async.GetAllHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetAllHubsResponse; +import dev.plexapi.sdk.models.operations.async.GetContinueWatchingRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetContinueWatchingResponse; +import dev.plexapi.sdk.models.operations.async.GetHubItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetHubItemsResponse; +import dev.plexapi.sdk.models.operations.async.GetMetadataHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetMetadataHubsResponse; +import dev.plexapi.sdk.models.operations.async.GetPostplayHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPostplayHubsResponse; +import dev.plexapi.sdk.models.operations.async.GetPromotedHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPromotedHubsResponse; +import dev.plexapi.sdk.models.operations.async.GetRelatedHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetRelatedHubsResponse; +import dev.plexapi.sdk.models.operations.async.GetSectionHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSectionHubsResponse; +import dev.plexapi.sdk.models.operations.async.ListHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListHubsResponse; +import dev.plexapi.sdk.models.operations.async.MoveHubRequestBuilder; +import dev.plexapi.sdk.models.operations.async.MoveHubResponse; +import dev.plexapi.sdk.models.operations.async.ResetSectionDefaultsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ResetSectionDefaultsResponse; +import dev.plexapi.sdk.models.operations.async.UpdateHubVisibilityRequestBuilder; +import dev.plexapi.sdk.models.operations.async.UpdateHubVisibilityResponse; +import dev.plexapi.sdk.operations.CreateCustomHub; +import dev.plexapi.sdk.operations.DeleteCustomHub; +import dev.plexapi.sdk.operations.GetAllHubs; +import dev.plexapi.sdk.operations.GetContinueWatching; +import dev.plexapi.sdk.operations.GetHubItems; +import dev.plexapi.sdk.operations.GetMetadataHubs; +import dev.plexapi.sdk.operations.GetPostplayHubs; +import dev.plexapi.sdk.operations.GetPromotedHubs; +import dev.plexapi.sdk.operations.GetRelatedHubs; +import dev.plexapi.sdk.operations.GetSectionHubs; +import dev.plexapi.sdk.operations.ListHubs; +import dev.plexapi.sdk.operations.MoveHub; +import dev.plexapi.sdk.operations.ResetSectionDefaults; +import dev.plexapi.sdk.operations.UpdateHubVisibility; import java.util.concurrent.CompletableFuture; /** - * Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + * The hubs within a media provider */ public class AsyncHubs { private final SDKConfiguration sdkConfiguration; @@ -46,122 +86,378 @@ public class AsyncHubs { /** - * Get Global Hubs + * Get global hubs * - *

Get Global Hubs filtered by the parameters provided. + *

Get the global hubs in this PMS * * @return The async call builder */ - public GetGlobalHubsRequestBuilder getGlobalHubs() { - return new GetGlobalHubsRequestBuilder(sdkConfiguration); + public GetAllHubsRequestBuilder getAllHubs() { + return new GetAllHubsRequestBuilder(sdkConfiguration); } /** - * Get Global Hubs + * Get global hubs * - *

Get Global Hubs filtered by the parameters provided. - * - * @return CompletableFuture<GetGlobalHubsResponse> - The async response - */ - public CompletableFuture getGlobalHubsDirect() { - return getGlobalHubs(Optional.empty(), Optional.empty()); - } - - /** - * Get Global Hubs - * - *

Get Global Hubs filtered by the parameters provided. - * - * @param count The number of items to return with each hub. - * @param onlyTransient Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - * @return CompletableFuture<GetGlobalHubsResponse> - The async response - */ - public CompletableFuture getGlobalHubs(Optional count, Optional onlyTransient) { - GetGlobalHubsRequest request = - GetGlobalHubsRequest - .builder() - .count(count) - .onlyTransient(onlyTransient) - .build(); - AsyncRequestOperation operation - = new GetGlobalHubs.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Recently Added - * - *

This endpoint will return the recently added content. - * - * @return The async call builder - */ - public GetRecentlyAddedRequestBuilder getRecentlyAdded() { - return new GetRecentlyAddedRequestBuilder(sdkConfiguration); - } - - /** - * Get Recently Added - * - *

This endpoint will return the recently added content. + *

Get the global hubs in this PMS * * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetRecentlyAddedResponse> - The async response + * @return CompletableFuture<GetAllHubsResponse> - The async response */ - public CompletableFuture getRecentlyAdded(GetRecentlyAddedRequest request) { - AsyncRequestOperation operation - = new GetRecentlyAdded.Async(sdkConfiguration); + public CompletableFuture getAllHubs(GetAllHubsRequest request) { + AsyncRequestOperation operation + = new GetAllHubs.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } /** - * Get library specific hubs + * Get the continue watching hub * - *

This endpoint will return a list of library specific hubs + *

Get the global continue watching hub * * @return The async call builder */ - public GetLibraryHubsRequestBuilder getLibraryHubs() { - return new GetLibraryHubsRequestBuilder(sdkConfiguration); + public GetContinueWatchingRequestBuilder getContinueWatching() { + return new GetContinueWatchingRequestBuilder(sdkConfiguration); } /** - * Get library specific hubs + * Get the continue watching hub * - *

This endpoint will return a list of library specific hubs + *

Get the global continue watching hub * - * @param sectionId the Id of the library to query - * @return CompletableFuture<GetLibraryHubsResponse> - The async response + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetContinueWatchingResponse> - The async response */ - public CompletableFuture getLibraryHubs(double sectionId) { - return getLibraryHubs(sectionId, Optional.empty(), Optional.empty()); + public CompletableFuture getContinueWatching(GetContinueWatchingRequest request) { + AsyncRequestOperation operation + = new GetContinueWatching.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a hub's items + * + *

Get the items within a single hub specified by identifier + * + * @return The async call builder + */ + public GetHubItemsRequestBuilder getHubItems() { + return new GetHubItemsRequestBuilder(sdkConfiguration); } /** - * Get library specific hubs + * Get a hub's items * - *

This endpoint will return a list of library specific hubs + *

Get the items within a single hub specified by identifier * - * @param sectionId the Id of the library to query - * @param count The number of items to return with each hub. - * @param onlyTransient Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - * @return CompletableFuture<GetLibraryHubsResponse> - The async response + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetHubItemsResponse> - The async response */ - public CompletableFuture getLibraryHubs( - double sectionId, Optional count, - Optional onlyTransient) { - GetLibraryHubsRequest request = - GetLibraryHubsRequest - .builder() - .sectionId(sectionId) - .count(count) - .onlyTransient(onlyTransient) - .build(); - AsyncRequestOperation operation - = new GetLibraryHubs.Async(sdkConfiguration); + public CompletableFuture getHubItems(GetHubItemsRequest request) { + AsyncRequestOperation operation + = new GetHubItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get the hubs which are promoted + * + *

Get the global hubs which are promoted (should be displayed on the home screen) + * + * @return The async call builder + */ + public GetPromotedHubsRequestBuilder getPromotedHubs() { + return new GetPromotedHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get the hubs which are promoted + * + *

Get the global hubs which are promoted (should be displayed on the home screen) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPromotedHubsResponse> - The async response + */ + public CompletableFuture getPromotedHubs(GetPromotedHubsRequest request) { + AsyncRequestOperation operation + = new GetPromotedHubs.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get hubs for section by metadata item + * + *

Get the hubs for a section by metadata item. Currently only for music sections + * + * @return The async call builder + */ + public GetMetadataHubsRequestBuilder getMetadataHubs() { + return new GetMetadataHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get hubs for section by metadata item + * + *

Get the hubs for a section by metadata item. Currently only for music sections + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetMetadataHubsResponse> - The async response + */ + public CompletableFuture getMetadataHubs(GetMetadataHubsRequest request) { + AsyncRequestOperation operation + = new GetMetadataHubs.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get postplay hubs + * + *

Get the hubs for a metadata to be displayed in post play + * + * @return The async call builder + */ + public GetPostplayHubsRequestBuilder getPostplayHubs() { + return new GetPostplayHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get postplay hubs + * + *

Get the hubs for a metadata to be displayed in post play + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPostplayHubsResponse> - The async response + */ + public CompletableFuture getPostplayHubs(GetPostplayHubsRequest request) { + AsyncRequestOperation operation + = new GetPostplayHubs.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get related hubs + * + *

Get the hubs for a metadata related to the provided metadata item + * + * @return The async call builder + */ + public GetRelatedHubsRequestBuilder getRelatedHubs() { + return new GetRelatedHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get related hubs + * + *

Get the hubs for a metadata related to the provided metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetRelatedHubsResponse> - The async response + */ + public CompletableFuture getRelatedHubs(GetRelatedHubsRequest request) { + AsyncRequestOperation operation + = new GetRelatedHubs.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get section hubs + * + *

Get the hubs for a single section + * + * @return The async call builder + */ + public GetSectionHubsRequestBuilder getSectionHubs() { + return new GetSectionHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get section hubs + * + *

Get the hubs for a single section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSectionHubsResponse> - The async response + */ + public CompletableFuture getSectionHubs(GetSectionHubsRequest request) { + AsyncRequestOperation operation + = new GetSectionHubs.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Reset hubs to defaults + * + *

Reset hubs for this section to defaults and delete custom hubs + * + * @return The async call builder + */ + public ResetSectionDefaultsRequestBuilder resetSectionDefaults() { + return new ResetSectionDefaultsRequestBuilder(sdkConfiguration); + } + + /** + * Reset hubs to defaults + * + *

Reset hubs for this section to defaults and delete custom hubs + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ResetSectionDefaultsResponse> - The async response + */ + public CompletableFuture resetSectionDefaults(ResetSectionDefaultsRequest request) { + AsyncRequestOperation operation + = new ResetSectionDefaults.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get hubs + * + *

Get the list of hubs including both built-in and custom + * + * @return The async call builder + */ + public ListHubsRequestBuilder listHubs() { + return new ListHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get hubs + * + *

Get the list of hubs including both built-in and custom + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListHubsResponse> - The async response + */ + public CompletableFuture listHubs(ListHubsRequest request) { + AsyncRequestOperation operation + = new ListHubs.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Create a custom hub + * + *

Create a custom hub based on a metadata item + * + * @return The async call builder + */ + public CreateCustomHubRequestBuilder createCustomHub() { + return new CreateCustomHubRequestBuilder(sdkConfiguration); + } + + /** + * Create a custom hub + * + *

Create a custom hub based on a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CreateCustomHubResponse> - The async response + */ + public CompletableFuture createCustomHub(CreateCustomHubRequest request) { + AsyncRequestOperation operation + = new CreateCustomHub.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Move Hub + * + *

Changed the ordering of a hub among others hubs + * + * @return The async call builder + */ + public MoveHubRequestBuilder moveHub() { + return new MoveHubRequestBuilder(sdkConfiguration); + } + + /** + * Move Hub + * + *

Changed the ordering of a hub among others hubs + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<MoveHubResponse> - The async response + */ + public CompletableFuture moveHub(MoveHubRequest request) { + AsyncRequestOperation operation + = new MoveHub.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a custom hub + * + *

Delete a custom hub from the server + * + * @return The async call builder + */ + public DeleteCustomHubRequestBuilder deleteCustomHub() { + return new DeleteCustomHubRequestBuilder(sdkConfiguration); + } + + /** + * Delete a custom hub + * + *

Delete a custom hub from the server + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteCustomHubResponse> - The async response + */ + public CompletableFuture deleteCustomHub(DeleteCustomHubRequest request) { + AsyncRequestOperation operation + = new DeleteCustomHub.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Change hub visibility + * + *

Changed the visibility of a hub for both the admin and shared users + * + * @return The async call builder + */ + public UpdateHubVisibilityRequestBuilder updateHubVisibility() { + return new UpdateHubVisibilityRequestBuilder(sdkConfiguration); + } + + /** + * Change hub visibility + * + *

Changed the visibility of a hub for both the admin and shared users + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<UpdateHubVisibilityResponse> - The async response + */ + public CompletableFuture updateHubVisibility(UpdateHubVisibilityRequest request) { + AsyncRequestOperation operation + = new UpdateHubVisibility.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } diff --git a/src/main/java/dev/plexapi/sdk/AsyncLibrary.java b/src/main/java/dev/plexapi/sdk/AsyncLibrary.java index ec837ef3..c532330f 100644 --- a/src/main/java/dev/plexapi/sdk/AsyncLibrary.java +++ b/src/main/java/dev/plexapi/sdk/AsyncLibrary.java @@ -6,100 +6,322 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; -import dev.plexapi.sdk.models.operations.DeleteLibraryRequest; -import dev.plexapi.sdk.models.operations.Force; -import dev.plexapi.sdk.models.operations.GetActorsLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetActorsLibraryRequest; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryRequest; -import dev.plexapi.sdk.models.operations.GetFileHashRequest; -import dev.plexapi.sdk.models.operations.GetGenresLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetGenresLibraryRequest; +import dev.plexapi.sdk.models.operations.AddExtrasRequest; +import dev.plexapi.sdk.models.operations.AddSectionRequest; +import dev.plexapi.sdk.models.operations.AddSubtitlesRequest; +import dev.plexapi.sdk.models.operations.AnalyzeMetadataRequest; +import dev.plexapi.sdk.models.operations.AutocompleteRequest; +import dev.plexapi.sdk.models.operations.CancelRefreshRequest; +import dev.plexapi.sdk.models.operations.CreateMarkerRequest; +import dev.plexapi.sdk.models.operations.DeleteCollectionRequest; +import dev.plexapi.sdk.models.operations.DeleteIndexesRequest; +import dev.plexapi.sdk.models.operations.DeleteIntrosRequest; +import dev.plexapi.sdk.models.operations.DeleteLibrarySectionRequest; +import dev.plexapi.sdk.models.operations.DeleteMarkerRequest; +import dev.plexapi.sdk.models.operations.DeleteMediaItemRequest; +import dev.plexapi.sdk.models.operations.DeleteMetadataItemRequest; +import dev.plexapi.sdk.models.operations.DeleteStreamRequest; +import dev.plexapi.sdk.models.operations.DetectAdsRequest; +import dev.plexapi.sdk.models.operations.DetectCreditsRequest; +import dev.plexapi.sdk.models.operations.DetectIntrosRequest; +import dev.plexapi.sdk.models.operations.DetectVoiceActivityRequest; +import dev.plexapi.sdk.models.operations.EditMarkerRequest; +import dev.plexapi.sdk.models.operations.EditMetadataItemRequest; +import dev.plexapi.sdk.models.operations.EditSectionRequest; +import dev.plexapi.sdk.models.operations.EmptyTrashRequest; +import dev.plexapi.sdk.models.operations.GenerateThumbsRequest; +import dev.plexapi.sdk.models.operations.GetAllItemLeavesRequest; +import dev.plexapi.sdk.models.operations.GetAugmentationStatusRequest; +import dev.plexapi.sdk.models.operations.GetAvailableSortsRequest; +import dev.plexapi.sdk.models.operations.GetChapterImageRequest; +import dev.plexapi.sdk.models.operations.GetCollectionsRequest; +import dev.plexapi.sdk.models.operations.GetCommonRequest; +import dev.plexapi.sdk.models.operations.GetExtrasRequest; +import dev.plexapi.sdk.models.operations.GetFileRequest; +import dev.plexapi.sdk.models.operations.GetFirstCharactersRequest; +import dev.plexapi.sdk.models.operations.GetImageFromBifRequest; +import dev.plexapi.sdk.models.operations.GetItemArtworkRequest; +import dev.plexapi.sdk.models.operations.GetItemTreeRequest; import dev.plexapi.sdk.models.operations.GetLibraryDetailsRequest; import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest; -import dev.plexapi.sdk.models.operations.GetLibrarySectionsAllRequest; -import dev.plexapi.sdk.models.operations.GetMediaArtsRequest; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequest; -import dev.plexapi.sdk.models.operations.GetMediaPostersRequest; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequest; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRequest; -import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataRequest; -import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesRequest; -import dev.plexapi.sdk.models.operations.GetSearchLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetSearchLibraryRequest; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamIncludeGuids; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamType; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentRequest; -import dev.plexapi.sdk.models.operations.IncludeDetails; -import dev.plexapi.sdk.models.operations.PostMediaArtsRequest; -import dev.plexapi.sdk.models.operations.PostMediaPosterRequest; -import dev.plexapi.sdk.models.operations.async.DeleteLibraryRequestBuilder; -import dev.plexapi.sdk.models.operations.async.DeleteLibraryResponse; -import dev.plexapi.sdk.models.operations.async.GetActorsLibraryRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetActorsLibraryResponse; -import dev.plexapi.sdk.models.operations.async.GetAllLibrariesRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetAllLibrariesResponse; -import dev.plexapi.sdk.models.operations.async.GetCountriesLibraryRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetCountriesLibraryResponse; -import dev.plexapi.sdk.models.operations.async.GetFileHashRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetFileHashResponse; -import dev.plexapi.sdk.models.operations.async.GetGenresLibraryRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetGenresLibraryResponse; +import dev.plexapi.sdk.models.operations.GetLibraryMatchesRequest; +import dev.plexapi.sdk.models.operations.GetMediaPartRequest; +import dev.plexapi.sdk.models.operations.GetPartIndexRequest; +import dev.plexapi.sdk.models.operations.GetPersonRequest; +import dev.plexapi.sdk.models.operations.GetRandomArtworkRequest; +import dev.plexapi.sdk.models.operations.GetRelatedItemsRequest; +import dev.plexapi.sdk.models.operations.GetSectionFiltersRequest; +import dev.plexapi.sdk.models.operations.GetSectionImageRequest; +import dev.plexapi.sdk.models.operations.GetSectionPreferencesRequest; +import dev.plexapi.sdk.models.operations.GetSectionsPrefsRequest; +import dev.plexapi.sdk.models.operations.GetStreamLevelsRequest; +import dev.plexapi.sdk.models.operations.GetStreamLoudnessRequest; +import dev.plexapi.sdk.models.operations.GetStreamRequest; +import dev.plexapi.sdk.models.operations.GetTagsRequest; +import dev.plexapi.sdk.models.operations.IngestTransientItemRequest; +import dev.plexapi.sdk.models.operations.ListMatchesRequest; +import dev.plexapi.sdk.models.operations.ListPersonMediaRequest; +import dev.plexapi.sdk.models.operations.ListSimilarRequest; +import dev.plexapi.sdk.models.operations.ListSonicallySimilarRequest; +import dev.plexapi.sdk.models.operations.ListTopUsersRequest; +import dev.plexapi.sdk.models.operations.MatchItemRequest; +import dev.plexapi.sdk.models.operations.MergeItemsRequest; +import dev.plexapi.sdk.models.operations.OptimizeDatabaseRequest; +import dev.plexapi.sdk.models.operations.RefreshItemsMetadataRequest; +import dev.plexapi.sdk.models.operations.RefreshSectionRequest; +import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataRequest; +import dev.plexapi.sdk.models.operations.SetItemArtworkRequest; +import dev.plexapi.sdk.models.operations.SetItemPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetSectionPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetStreamOffsetRequest; +import dev.plexapi.sdk.models.operations.SetStreamSelectionRequest; +import dev.plexapi.sdk.models.operations.SplitItemRequest; +import dev.plexapi.sdk.models.operations.StartAnalysisRequest; +import dev.plexapi.sdk.models.operations.StartBifGenerationRequest; +import dev.plexapi.sdk.models.operations.UnmatchRequest; +import dev.plexapi.sdk.models.operations.UpdateItemArtworkRequest; +import dev.plexapi.sdk.models.operations.UpdateItemsRequest; +import dev.plexapi.sdk.models.operations.async.AddExtrasRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddExtrasResponse; +import dev.plexapi.sdk.models.operations.async.AddSectionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddSectionResponse; +import dev.plexapi.sdk.models.operations.async.AddSubtitlesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddSubtitlesResponse; +import dev.plexapi.sdk.models.operations.async.AnalyzeMetadataRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AnalyzeMetadataResponse; +import dev.plexapi.sdk.models.operations.async.AutocompleteRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AutocompleteResponse; +import dev.plexapi.sdk.models.operations.async.CancelRefreshRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CancelRefreshResponse; +import dev.plexapi.sdk.models.operations.async.CleanBundlesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CleanBundlesResponse; +import dev.plexapi.sdk.models.operations.async.CreateMarkerRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CreateMarkerResponse; +import dev.plexapi.sdk.models.operations.async.DeleteCachesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteCachesResponse; +import dev.plexapi.sdk.models.operations.async.DeleteCollectionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteCollectionResponse; +import dev.plexapi.sdk.models.operations.async.DeleteIndexesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteIndexesResponse; +import dev.plexapi.sdk.models.operations.async.DeleteIntrosRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteIntrosResponse; +import dev.plexapi.sdk.models.operations.async.DeleteLibrarySectionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteLibrarySectionResponse; +import dev.plexapi.sdk.models.operations.async.DeleteMarkerRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteMarkerResponse; +import dev.plexapi.sdk.models.operations.async.DeleteMediaItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteMediaItemResponse; +import dev.plexapi.sdk.models.operations.async.DeleteMetadataItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteMetadataItemResponse; +import dev.plexapi.sdk.models.operations.async.DeleteStreamRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteStreamResponse; +import dev.plexapi.sdk.models.operations.async.DetectAdsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DetectAdsResponse; +import dev.plexapi.sdk.models.operations.async.DetectCreditsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DetectCreditsResponse; +import dev.plexapi.sdk.models.operations.async.DetectIntrosRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DetectIntrosResponse; +import dev.plexapi.sdk.models.operations.async.DetectVoiceActivityRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DetectVoiceActivityResponse; +import dev.plexapi.sdk.models.operations.async.EditMarkerRequestBuilder; +import dev.plexapi.sdk.models.operations.async.EditMarkerResponse; +import dev.plexapi.sdk.models.operations.async.EditMetadataItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.EditMetadataItemResponse; +import dev.plexapi.sdk.models.operations.async.EditSectionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.EditSectionResponse; +import dev.plexapi.sdk.models.operations.async.EmptyTrashRequestBuilder; +import dev.plexapi.sdk.models.operations.async.EmptyTrashResponse; +import dev.plexapi.sdk.models.operations.async.GenerateThumbsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GenerateThumbsResponse; +import dev.plexapi.sdk.models.operations.async.GetAllItemLeavesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetAllItemLeavesResponse; +import dev.plexapi.sdk.models.operations.async.GetAugmentationStatusRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetAugmentationStatusResponse; +import dev.plexapi.sdk.models.operations.async.GetAvailableSortsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetAvailableSortsResponse; +import dev.plexapi.sdk.models.operations.async.GetChapterImageRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetChapterImageResponse; +import dev.plexapi.sdk.models.operations.async.GetCollectionsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetCollectionsResponse; +import dev.plexapi.sdk.models.operations.async.GetCommonRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetCommonResponse; +import dev.plexapi.sdk.models.operations.async.GetExtrasRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetExtrasResponse; +import dev.plexapi.sdk.models.operations.async.GetFileRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetFileResponse; +import dev.plexapi.sdk.models.operations.async.GetFirstCharactersRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetFirstCharactersResponse; +import dev.plexapi.sdk.models.operations.async.GetImageFromBifRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetImageFromBifResponse; +import dev.plexapi.sdk.models.operations.async.GetItemArtworkRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetItemArtworkResponse; +import dev.plexapi.sdk.models.operations.async.GetItemTreeRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetItemTreeResponse; import dev.plexapi.sdk.models.operations.async.GetLibraryDetailsRequestBuilder; import dev.plexapi.sdk.models.operations.async.GetLibraryDetailsResponse; import dev.plexapi.sdk.models.operations.async.GetLibraryItemsRequestBuilder; import dev.plexapi.sdk.models.operations.async.GetLibraryItemsResponse; -import dev.plexapi.sdk.models.operations.async.GetLibrarySectionsAllRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetLibrarySectionsAllResponse; -import dev.plexapi.sdk.models.operations.async.GetMediaArtsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetMediaArtsResponse; -import dev.plexapi.sdk.models.operations.async.GetMediaMetaDataRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetMediaMetaDataResponse; -import dev.plexapi.sdk.models.operations.async.GetMediaPostersRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetMediaPostersResponse; -import dev.plexapi.sdk.models.operations.async.GetMetadataChildrenRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetMetadataChildrenResponse; -import dev.plexapi.sdk.models.operations.async.GetRecentlyAddedLibraryRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetRecentlyAddedLibraryResponse; -import dev.plexapi.sdk.models.operations.async.GetRefreshLibraryMetadataRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetRefreshLibraryMetadataResponse; -import dev.plexapi.sdk.models.operations.async.GetSearchAllLibrariesRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetSearchAllLibrariesResponse; -import dev.plexapi.sdk.models.operations.async.GetSearchLibraryRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetSearchLibraryResponse; -import dev.plexapi.sdk.models.operations.async.GetTopWatchedContentRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetTopWatchedContentResponse; -import dev.plexapi.sdk.models.operations.async.PostMediaArtsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.PostMediaArtsResponse; -import dev.plexapi.sdk.models.operations.async.PostMediaPosterRequestBuilder; -import dev.plexapi.sdk.models.operations.async.PostMediaPosterResponse; -import dev.plexapi.sdk.operations.DeleteLibrary; -import dev.plexapi.sdk.operations.GetActorsLibrary; -import dev.plexapi.sdk.operations.GetAllLibraries; -import dev.plexapi.sdk.operations.GetCountriesLibrary; -import dev.plexapi.sdk.operations.GetFileHash; -import dev.plexapi.sdk.operations.GetGenresLibrary; +import dev.plexapi.sdk.models.operations.async.GetLibraryMatchesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetLibraryMatchesResponse; +import dev.plexapi.sdk.models.operations.async.GetMediaPartRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetMediaPartResponse; +import dev.plexapi.sdk.models.operations.async.GetPartIndexRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPartIndexResponse; +import dev.plexapi.sdk.models.operations.async.GetPersonRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPersonResponse; +import dev.plexapi.sdk.models.operations.async.GetRandomArtworkRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetRandomArtworkResponse; +import dev.plexapi.sdk.models.operations.async.GetRelatedItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetRelatedItemsResponse; +import dev.plexapi.sdk.models.operations.async.GetSectionFiltersRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSectionFiltersResponse; +import dev.plexapi.sdk.models.operations.async.GetSectionImageRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSectionImageResponse; +import dev.plexapi.sdk.models.operations.async.GetSectionPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSectionPreferencesResponse; +import dev.plexapi.sdk.models.operations.async.GetSectionsPrefsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSectionsPrefsResponse; +import dev.plexapi.sdk.models.operations.async.GetSectionsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSectionsResponse; +import dev.plexapi.sdk.models.operations.async.GetStreamLevelsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetStreamLevelsResponse; +import dev.plexapi.sdk.models.operations.async.GetStreamLoudnessRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetStreamLoudnessResponse; +import dev.plexapi.sdk.models.operations.async.GetStreamRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetStreamResponse; +import dev.plexapi.sdk.models.operations.async.GetTagsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetTagsResponse; +import dev.plexapi.sdk.models.operations.async.IngestTransientItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.IngestTransientItemResponse; +import dev.plexapi.sdk.models.operations.async.ListMatchesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListMatchesResponse; +import dev.plexapi.sdk.models.operations.async.ListPersonMediaRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListPersonMediaResponse; +import dev.plexapi.sdk.models.operations.async.ListSimilarRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListSimilarResponse; +import dev.plexapi.sdk.models.operations.async.ListSonicallySimilarRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListSonicallySimilarResponse; +import dev.plexapi.sdk.models.operations.async.ListTopUsersRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListTopUsersResponse; +import dev.plexapi.sdk.models.operations.async.MatchItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.MatchItemResponse; +import dev.plexapi.sdk.models.operations.async.MergeItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.MergeItemsResponse; +import dev.plexapi.sdk.models.operations.async.OptimizeDatabaseRequestBuilder; +import dev.plexapi.sdk.models.operations.async.OptimizeDatabaseResponse; +import dev.plexapi.sdk.models.operations.async.RefreshItemsMetadataRequestBuilder; +import dev.plexapi.sdk.models.operations.async.RefreshItemsMetadataResponse; +import dev.plexapi.sdk.models.operations.async.RefreshSectionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.RefreshSectionResponse; +import dev.plexapi.sdk.models.operations.async.RefreshSectionsMetadataRequestBuilder; +import dev.plexapi.sdk.models.operations.async.RefreshSectionsMetadataResponse; +import dev.plexapi.sdk.models.operations.async.SetItemArtworkRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SetItemArtworkResponse; +import dev.plexapi.sdk.models.operations.async.SetItemPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SetItemPreferencesResponse; +import dev.plexapi.sdk.models.operations.async.SetSectionPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SetSectionPreferencesResponse; +import dev.plexapi.sdk.models.operations.async.SetStreamOffsetRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SetStreamOffsetResponse; +import dev.plexapi.sdk.models.operations.async.SetStreamSelectionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SetStreamSelectionResponse; +import dev.plexapi.sdk.models.operations.async.SplitItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SplitItemResponse; +import dev.plexapi.sdk.models.operations.async.StartAnalysisRequestBuilder; +import dev.plexapi.sdk.models.operations.async.StartAnalysisResponse; +import dev.plexapi.sdk.models.operations.async.StartBifGenerationRequestBuilder; +import dev.plexapi.sdk.models.operations.async.StartBifGenerationResponse; +import dev.plexapi.sdk.models.operations.async.StopAllRefreshesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.StopAllRefreshesResponse; +import dev.plexapi.sdk.models.operations.async.UnmatchRequestBuilder; +import dev.plexapi.sdk.models.operations.async.UnmatchResponse; +import dev.plexapi.sdk.models.operations.async.UpdateItemArtworkRequestBuilder; +import dev.plexapi.sdk.models.operations.async.UpdateItemArtworkResponse; +import dev.plexapi.sdk.models.operations.async.UpdateItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.UpdateItemsResponse; +import dev.plexapi.sdk.operations.AddExtras; +import dev.plexapi.sdk.operations.AddSection; +import dev.plexapi.sdk.operations.AddSubtitles; +import dev.plexapi.sdk.operations.AnalyzeMetadata; +import dev.plexapi.sdk.operations.Autocomplete; +import dev.plexapi.sdk.operations.CancelRefresh; +import dev.plexapi.sdk.operations.CleanBundles; +import dev.plexapi.sdk.operations.CreateMarker; +import dev.plexapi.sdk.operations.DeleteCaches; +import dev.plexapi.sdk.operations.DeleteCollection; +import dev.plexapi.sdk.operations.DeleteIndexes; +import dev.plexapi.sdk.operations.DeleteIntros; +import dev.plexapi.sdk.operations.DeleteLibrarySection; +import dev.plexapi.sdk.operations.DeleteMarker; +import dev.plexapi.sdk.operations.DeleteMediaItem; +import dev.plexapi.sdk.operations.DeleteMetadataItem; +import dev.plexapi.sdk.operations.DeleteStream; +import dev.plexapi.sdk.operations.DetectAds; +import dev.plexapi.sdk.operations.DetectCredits; +import dev.plexapi.sdk.operations.DetectIntros; +import dev.plexapi.sdk.operations.DetectVoiceActivity; +import dev.plexapi.sdk.operations.EditMarker; +import dev.plexapi.sdk.operations.EditMetadataItem; +import dev.plexapi.sdk.operations.EditSection; +import dev.plexapi.sdk.operations.EmptyTrash; +import dev.plexapi.sdk.operations.GenerateThumbs; +import dev.plexapi.sdk.operations.GetAllItemLeaves; +import dev.plexapi.sdk.operations.GetAugmentationStatus; +import dev.plexapi.sdk.operations.GetAvailableSorts; +import dev.plexapi.sdk.operations.GetChapterImage; +import dev.plexapi.sdk.operations.GetCollections; +import dev.plexapi.sdk.operations.GetCommon; +import dev.plexapi.sdk.operations.GetExtras; +import dev.plexapi.sdk.operations.GetFile; +import dev.plexapi.sdk.operations.GetFirstCharacters; +import dev.plexapi.sdk.operations.GetImageFromBif; +import dev.plexapi.sdk.operations.GetItemArtwork; +import dev.plexapi.sdk.operations.GetItemTree; import dev.plexapi.sdk.operations.GetLibraryDetails; import dev.plexapi.sdk.operations.GetLibraryItems; -import dev.plexapi.sdk.operations.GetLibrarySectionsAll; -import dev.plexapi.sdk.operations.GetMediaArts; -import dev.plexapi.sdk.operations.GetMediaMetaData; -import dev.plexapi.sdk.operations.GetMediaPosters; -import dev.plexapi.sdk.operations.GetMetadataChildren; -import dev.plexapi.sdk.operations.GetRecentlyAddedLibrary; -import dev.plexapi.sdk.operations.GetRefreshLibraryMetadata; -import dev.plexapi.sdk.operations.GetSearchAllLibraries; -import dev.plexapi.sdk.operations.GetSearchLibrary; -import dev.plexapi.sdk.operations.GetTopWatchedContent; -import dev.plexapi.sdk.operations.PostMediaArts; -import dev.plexapi.sdk.operations.PostMediaPoster; -import java.lang.Double; -import java.lang.String; -import java.util.Optional; +import dev.plexapi.sdk.operations.GetLibraryMatches; +import dev.plexapi.sdk.operations.GetMediaPart; +import dev.plexapi.sdk.operations.GetPartIndex; +import dev.plexapi.sdk.operations.GetPerson; +import dev.plexapi.sdk.operations.GetRandomArtwork; +import dev.plexapi.sdk.operations.GetRelatedItems; +import dev.plexapi.sdk.operations.GetSectionFilters; +import dev.plexapi.sdk.operations.GetSectionImage; +import dev.plexapi.sdk.operations.GetSectionPreferences; +import dev.plexapi.sdk.operations.GetSections; +import dev.plexapi.sdk.operations.GetSectionsPrefs; +import dev.plexapi.sdk.operations.GetStream; +import dev.plexapi.sdk.operations.GetStreamLevels; +import dev.plexapi.sdk.operations.GetStreamLoudness; +import dev.plexapi.sdk.operations.GetTags; +import dev.plexapi.sdk.operations.IngestTransientItem; +import dev.plexapi.sdk.operations.ListMatches; +import dev.plexapi.sdk.operations.ListPersonMedia; +import dev.plexapi.sdk.operations.ListSimilar; +import dev.plexapi.sdk.operations.ListSonicallySimilar; +import dev.plexapi.sdk.operations.ListTopUsers; +import dev.plexapi.sdk.operations.MatchItem; +import dev.plexapi.sdk.operations.MergeItems; +import dev.plexapi.sdk.operations.OptimizeDatabase; +import dev.plexapi.sdk.operations.RefreshItemsMetadata; +import dev.plexapi.sdk.operations.RefreshSection; +import dev.plexapi.sdk.operations.RefreshSectionsMetadata; +import dev.plexapi.sdk.operations.SetItemArtwork; +import dev.plexapi.sdk.operations.SetItemPreferences; +import dev.plexapi.sdk.operations.SetSectionPreferences; +import dev.plexapi.sdk.operations.SetStreamOffset; +import dev.plexapi.sdk.operations.SetStreamSelection; +import dev.plexapi.sdk.operations.SplitItem; +import dev.plexapi.sdk.operations.StartAnalysis; +import dev.plexapi.sdk.operations.StartBifGeneration; +import dev.plexapi.sdk.operations.StopAllRefreshes; +import dev.plexapi.sdk.operations.Unmatch; +import dev.plexapi.sdk.operations.UpdateItemArtwork; +import dev.plexapi.sdk.operations.UpdateItems; import java.util.concurrent.CompletableFuture; /** - * API Calls interacting with Plex Media Server Libraries + * Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc). */ public class AsyncLibrary { private final SDKConfiguration sdkConfiguration; @@ -121,338 +343,9 @@ public class AsyncLibrary { /** - * Get Hash Value + * Get all items in library * - *

This resource returns hash values for local files - * - * @return The async call builder - */ - public GetFileHashRequestBuilder getFileHash() { - return new GetFileHashRequestBuilder(sdkConfiguration); - } - - /** - * Get Hash Value - * - *

This resource returns hash values for local files - * - * @param url This is the path to the local file, must be prefixed by `file://` - * @return CompletableFuture<GetFileHashResponse> - The async response - */ - public CompletableFuture getFileHash(String url) { - return getFileHash(url, Optional.empty()); - } - - /** - * Get Hash Value - * - *

This resource returns hash values for local files - * - * @param url This is the path to the local file, must be prefixed by `file://` - * @param type Item type - * @return CompletableFuture<GetFileHashResponse> - The async response - */ - public CompletableFuture getFileHash(String url, Optional type) { - GetFileHashRequest request = - GetFileHashRequest - .builder() - .url(url) - .type(type) - .build(); - AsyncRequestOperation operation - = new GetFileHash.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Recently Added - * - *

This endpoint will return the recently added content. - * - * @return The async call builder - */ - public GetRecentlyAddedLibraryRequestBuilder getRecentlyAddedLibrary() { - return new GetRecentlyAddedLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Get Recently Added - * - *

This endpoint will return the recently added content. - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetRecentlyAddedLibraryResponse> - The async response - */ - public CompletableFuture getRecentlyAddedLibrary(GetRecentlyAddedLibraryRequest request) { - AsyncRequestOperation operation - = new GetRecentlyAddedLibrary.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get All Libraries - * - *

A library section (commonly referred to as just a library) is a collection of media. - * Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. - * For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. - * - *

Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. - * This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). - * - * @return The async call builder - */ - public GetAllLibrariesRequestBuilder getAllLibraries() { - return new GetAllLibrariesRequestBuilder(sdkConfiguration); - } - - /** - * Get All Libraries - * - *

A library section (commonly referred to as just a library) is a collection of media. - * Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. - * For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. - * - *

Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. - * This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). - * - * @return CompletableFuture<GetAllLibrariesResponse> - The async response - */ - public CompletableFuture getAllLibrariesDirect() { - AsyncRequestlessOperation operation - = new GetAllLibraries.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get Library Details - * - *

## Library Details Endpoint - * - *

This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. - * - *

The details include: - * - *

### Directories - * Organized into three categories: - * - *

- **Primary Directories**: - * - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). - * - Most can be replicated via media queries. - * - Customizable by users. - * - *

- **Secondary Directories**: - * - Marked with `secondary="1"`. - * - Used in older clients for structured navigation. - * - *

- **Special Directories**: - * - Includes a "By Folder" entry for filesystem-based browsing. - * - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation. - * - *

### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - *

- **Type Object Attributes**: - * - `key`: Endpoint for the media list of this type. - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - *

- **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - *

- **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - *

> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - * @return The async call builder - */ - public GetLibraryDetailsRequestBuilder getLibraryDetails() { - return new GetLibraryDetailsRequestBuilder(sdkConfiguration); - } - - /** - * Get Library Details - * - *

## Library Details Endpoint - * - *

This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. - * - *

The details include: - * - *

### Directories - * Organized into three categories: - * - *

- **Primary Directories**: - * - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). - * - Most can be replicated via media queries. - * - Customizable by users. - * - *

- **Secondary Directories**: - * - Marked with `secondary="1"`. - * - Used in older clients for structured navigation. - * - *

- **Special Directories**: - * - Includes a "By Folder" entry for filesystem-based browsing. - * - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation. - * - *

### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - *

- **Type Object Attributes**: - * - `key`: Endpoint for the media list of this type. - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - *

- **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - *

- **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - *

> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @return CompletableFuture<GetLibraryDetailsResponse> - The async response - */ - public CompletableFuture getLibraryDetails(int sectionKey) { - return getLibraryDetails(Optional.empty(), sectionKey); - } - - /** - * Get Library Details - * - *

## Library Details Endpoint - * - *

This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. - * - *

The details include: - * - *

### Directories - * Organized into three categories: - * - *

- **Primary Directories**: - * - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). - * - Most can be replicated via media queries. - * - Customizable by users. - * - *

- **Secondary Directories**: - * - Marked with `secondary="1"`. - * - Used in older clients for structured navigation. - * - *

- **Special Directories**: - * - Includes a "By Folder" entry for filesystem-based browsing. - * - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation. - * - *

### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - *

- **Type Object Attributes**: - * - `key`: Endpoint for the media list of this type. - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - *

- **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - *

- **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - *

> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - * @param includeDetails Whether or not to include details for a section (types, filters, and sorts). - * Only exists for backwards compatibility, media providers other than the server libraries have it on always. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @return CompletableFuture<GetLibraryDetailsResponse> - The async response - */ - public CompletableFuture getLibraryDetails(Optional includeDetails, int sectionKey) { - GetLibraryDetailsRequest request = - GetLibraryDetailsRequest - .builder() - .includeDetails(includeDetails) - .sectionKey(sectionKey) - .build(); - AsyncRequestOperation operation - = new GetLibraryDetails.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Delete Library Section - * - *

Delete a library using a specific section id - * - * @return The async call builder - */ - public DeleteLibraryRequestBuilder deleteLibrary() { - return new DeleteLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Delete Library Section - * - *

Delete a library using a specific section id - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @return CompletableFuture<DeleteLibraryResponse> - The async response - */ - public CompletableFuture deleteLibrary(int sectionKey) { - DeleteLibraryRequest request = - DeleteLibraryRequest - .builder() - .sectionKey(sectionKey) - .build(); - AsyncRequestOperation operation - = new DeleteLibrary.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Library Items - * - *

Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: - * - `all`: All items in the section. - * - `unwatched`: Items that have not been played. - * - `newest`: Items that are recently released. - * - `recentlyAdded`: Items that are recently added to the library. - * - `recentlyViewed`: Items that were recently viewed. - * - `onDeck`: Items to continue watching. - * - `collection`: Items categorized by collection. - * - `edition`: Items categorized by edition. - * - `genre`: Items categorized by genre. - * - `year`: Items categorized by year of release. - * - `decade`: Items categorized by decade. - * - `director`: Items categorized by director. - * - `actor`: Items categorized by starring actor. - * - `country`: Items categorized by country of origin. - * - `contentRating`: Items categorized by content rating. - * - `rating`: Items categorized by rating. - * - `resolution`: Items categorized by resolution. - * - `firstCharacter`: Items categorized by the first letter. - * - `folder`: Items categorized by folder. - * - `albums`: Items categorized by album. + *

Request all metadata items according to a query. * * @return The async call builder */ @@ -461,29 +354,9 @@ public class AsyncLibrary { } /** - * Get Library Items + * Get all items in library * - *

Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: - * - `all`: All items in the section. - * - `unwatched`: Items that have not been played. - * - `newest`: Items that are recently released. - * - `recentlyAdded`: Items that are recently added to the library. - * - `recentlyViewed`: Items that were recently viewed. - * - `onDeck`: Items to continue watching. - * - `collection`: Items categorized by collection. - * - `edition`: Items categorized by edition. - * - `genre`: Items categorized by genre. - * - `year`: Items categorized by year of release. - * - `decade`: Items categorized by decade. - * - `director`: Items categorized by director. - * - `actor`: Items categorized by starring actor. - * - `country`: Items categorized by country of origin. - * - `contentRating`: Items categorized by content rating. - * - `rating`: Items categorized by rating. - * - `resolution`: Items categorized by resolution. - * - `firstCharacter`: Items categorized by the first letter. - * - `folder`: Items categorized by folder. - * - `albums`: Items categorized by album. + *

Request all metadata items according to a query. * * @param request The request object containing all the parameters for the API call. * @return CompletableFuture<GetLibraryItemsResponse> - The async response @@ -497,605 +370,2218 @@ public class AsyncLibrary { /** - * Get Library section media by tag ALL + * Delete library caches * - *

Retrieves a list of all general media data for this library. + *

Delete the hub caches so they are recomputed on next request * * @return The async call builder */ - public GetLibrarySectionsAllRequestBuilder getLibrarySectionsAll() { - return new GetLibrarySectionsAllRequestBuilder(sdkConfiguration); + public DeleteCachesRequestBuilder deleteCaches() { + return new DeleteCachesRequestBuilder(sdkConfiguration); } /** - * Get Library section media by tag ALL + * Delete library caches * - *

Retrieves a list of all general media data for this library. + *

Delete the hub caches so they are recomputed on next request + * + * @return CompletableFuture<DeleteCachesResponse> - The async response + */ + public CompletableFuture deleteCachesDirect() { + AsyncRequestlessOperation operation + = new DeleteCaches.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Clean bundles + * + *

Clean out any now unused bundles. Bundles can become unused when media is deleted + * + * @return The async call builder + */ + public CleanBundlesRequestBuilder cleanBundles() { + return new CleanBundlesRequestBuilder(sdkConfiguration); + } + + /** + * Clean bundles + * + *

Clean out any now unused bundles. Bundles can become unused when media is deleted + * + * @return CompletableFuture<CleanBundlesResponse> - The async response + */ + public CompletableFuture cleanBundlesDirect() { + AsyncRequestlessOperation operation + = new CleanBundles.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Ingest a transient item + * + *

This endpoint takes a file path specified in the `url` parameter, matches it using the scanner's match mechanism, downloads rich metadata, and then ingests the item as a transient item (without a library section). In the case where the file represents an episode, the entire tree (show, season, and episode) is added as transient items. At this time, movies and episodes are the only supported types, which are gleaned automatically from the file path. + * Note that any of the parameters passed to the metadata details endpoint (e.g. `includeExtras=1`) work here. + * + * @return The async call builder + */ + public IngestTransientItemRequestBuilder ingestTransientItem() { + return new IngestTransientItemRequestBuilder(sdkConfiguration); + } + + /** + * Ingest a transient item + * + *

This endpoint takes a file path specified in the `url` parameter, matches it using the scanner's match mechanism, downloads rich metadata, and then ingests the item as a transient item (without a library section). In the case where the file represents an episode, the entire tree (show, season, and episode) is added as transient items. At this time, movies and episodes are the only supported types, which are gleaned automatically from the file path. + * Note that any of the parameters passed to the metadata details endpoint (e.g. `includeExtras=1`) work here. * * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetLibrarySectionsAllResponse> - The async response + * @return CompletableFuture<IngestTransientItemResponse> - The async response */ - public CompletableFuture getLibrarySectionsAll(GetLibrarySectionsAllRequest request) { - AsyncRequestOperation operation - = new GetLibrarySectionsAll.Async(sdkConfiguration); + public CompletableFuture ingestTransientItem(IngestTransientItemRequest request) { + AsyncRequestOperation operation + = new IngestTransientItem.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } /** - * Refresh Metadata Of The Library + * Get library matches * - *

This endpoint Refreshes all the Metadata of the library. + *

The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints. + * This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata. + * The endpoint response can including multiple matches, if there is ambiguity, each one containing a `score` from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching). + * The `guid` hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB `ttXXX`) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of `Jane Eyre`, which could refer to the 1943 or the 2011 version). + * Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title * * @return The async call builder */ - public GetRefreshLibraryMetadataRequestBuilder getRefreshLibraryMetadata() { - return new GetRefreshLibraryMetadataRequestBuilder(sdkConfiguration); + public GetLibraryMatchesRequestBuilder getLibraryMatches() { + return new GetLibraryMatchesRequestBuilder(sdkConfiguration); } /** - * Refresh Metadata Of The Library + * Get library matches * - *

This endpoint Refreshes all the Metadata of the library. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @return CompletableFuture<GetRefreshLibraryMetadataResponse> - The async response - */ - public CompletableFuture getRefreshLibraryMetadata(int sectionKey) { - return getRefreshLibraryMetadata(Optional.empty(), sectionKey); - } - - /** - * Refresh Metadata Of The Library - * - *

This endpoint Refreshes all the Metadata of the library. - * - * @param force Force the refresh even if the library is already being refreshed. - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @return CompletableFuture<GetRefreshLibraryMetadataResponse> - The async response - */ - public CompletableFuture getRefreshLibraryMetadata(Optional force, int sectionKey) { - GetRefreshLibraryMetadataRequest request = - GetRefreshLibraryMetadataRequest - .builder() - .force(force) - .sectionKey(sectionKey) - .build(); - AsyncRequestOperation operation - = new GetRefreshLibraryMetadata.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Search Library - * - *

Search for content within a specific section of the library. - * - *

### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - *

- **Type Object Attributes**: - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - *

- **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - *

- **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - *

> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - * @return The async call builder - */ - public GetSearchLibraryRequestBuilder getSearchLibrary() { - return new GetSearchLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Search Library - * - *

Search for content within a specific section of the library. - * - *

### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - *

- **Type Object Attributes**: - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - *

- **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - *

- **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - *

> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return CompletableFuture<GetSearchLibraryResponse> - The async response - */ - public CompletableFuture getSearchLibrary(int sectionKey, GetSearchLibraryQueryParamType type) { - GetSearchLibraryRequest request = - GetSearchLibraryRequest - .builder() - .sectionKey(sectionKey) - .type(type) - .build(); - AsyncRequestOperation operation - = new GetSearchLibrary.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Genres of library media - * - *

Retrieves a list of all the genres that are found for the media in this library. - * - * @return The async call builder - */ - public GetGenresLibraryRequestBuilder getGenresLibrary() { - return new GetGenresLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Get Genres of library media - * - *

Retrieves a list of all the genres that are found for the media in this library. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return CompletableFuture<GetGenresLibraryResponse> - The async response - */ - public CompletableFuture getGenresLibrary(int sectionKey, GetGenresLibraryQueryParamType type) { - GetGenresLibraryRequest request = - GetGenresLibraryRequest - .builder() - .sectionKey(sectionKey) - .type(type) - .build(); - AsyncRequestOperation operation - = new GetGenresLibrary.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Countries of library media - * - *

Retrieves a list of all the countries that are found for the media in this library. - * - * @return The async call builder - */ - public GetCountriesLibraryRequestBuilder getCountriesLibrary() { - return new GetCountriesLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Get Countries of library media - * - *

Retrieves a list of all the countries that are found for the media in this library. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return CompletableFuture<GetCountriesLibraryResponse> - The async response - */ - public CompletableFuture getCountriesLibrary(int sectionKey, GetCountriesLibraryQueryParamType type) { - GetCountriesLibraryRequest request = - GetCountriesLibraryRequest - .builder() - .sectionKey(sectionKey) - .type(type) - .build(); - AsyncRequestOperation operation - = new GetCountriesLibrary.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Actors of library media - * - *

Retrieves a list of all the actors that are found for the media in this library. - * - * @return The async call builder - */ - public GetActorsLibraryRequestBuilder getActorsLibrary() { - return new GetActorsLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Get Actors of library media - * - *

Retrieves a list of all the actors that are found for the media in this library. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return CompletableFuture<GetActorsLibraryResponse> - The async response - */ - public CompletableFuture getActorsLibrary(int sectionKey, GetActorsLibraryQueryParamType type) { - GetActorsLibraryRequest request = - GetActorsLibraryRequest - .builder() - .sectionKey(sectionKey) - .type(type) - .build(); - AsyncRequestOperation operation - = new GetActorsLibrary.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Search All Libraries - * - *

Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. - * - * @return The async call builder - */ - public GetSearchAllLibrariesRequestBuilder getSearchAllLibraries() { - return new GetSearchAllLibrariesRequestBuilder(sdkConfiguration); - } - - /** - * Search All Libraries - * - *

Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. + *

The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints. + * This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata. + * The endpoint response can including multiple matches, if there is ambiguity, each one containing a `score` from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching). + * The `guid` hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB `ttXXX`) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of `Jane Eyre`, which could refer to the 1943 or the 2011 version). + * Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title * * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetSearchAllLibrariesResponse> - The async response + * @return CompletableFuture<GetLibraryMatchesResponse> - The async response */ - public CompletableFuture getSearchAllLibraries(GetSearchAllLibrariesRequest request) { - AsyncRequestOperation operation - = new GetSearchAllLibraries.Async(sdkConfiguration); + public CompletableFuture getLibraryMatches(GetLibraryMatchesRequest request) { + AsyncRequestOperation operation + = new GetLibraryMatches.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } /** - * Get Media Metadata + * Optimize the Database * - *

This endpoint will return all the (meta)data of one or more library items specified by the ratingKey. - * Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617"). + *

Initiate optimize on the database. * * @return The async call builder */ - public GetMediaMetaDataRequestBuilder getMediaMetaData() { - return new GetMediaMetaDataRequestBuilder(sdkConfiguration); + public OptimizeDatabaseRequestBuilder optimizeDatabase() { + return new OptimizeDatabaseRequestBuilder(sdkConfiguration); } /** - * Get Media Metadata + * Optimize the Database * - *

This endpoint will return all the (meta)data of one or more library items specified by the ratingKey. - * Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617"). + *

Initiate optimize on the database. * * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetMediaMetaDataResponse> - The async response + * @return CompletableFuture<OptimizeDatabaseResponse> - The async response */ - public CompletableFuture getMediaMetaData(GetMediaMetaDataRequest request) { - AsyncRequestOperation operation - = new GetMediaMetaData.Async(sdkConfiguration); + public CompletableFuture optimizeDatabase(OptimizeDatabaseRequest request) { + AsyncRequestOperation operation + = new OptimizeDatabase.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } /** - * Get Media Background Artwork + * Get random artwork * - *

Returns the background artwork for a library item. + *

Get random artwork across sections. This is commonly used for a screensaver. + * + *

This retrieves 100 random artwork paths in the specified sections and returns them. Restrictions are put in place to not return artwork for items the user is not allowed to access. Artwork will be for Movies, Shows, and Artists only. * * @return The async call builder */ - public GetMediaArtsRequestBuilder getMediaArts() { - return new GetMediaArtsRequestBuilder(sdkConfiguration); + public GetRandomArtworkRequestBuilder getRandomArtwork() { + return new GetRandomArtworkRequestBuilder(sdkConfiguration); } /** - * Get Media Background Artwork + * Get random artwork * - *

Returns the background artwork for a library item. + *

Get random artwork across sections. This is commonly used for a screensaver. * - * @param ratingKey the id of the library item to return the artwork of. - * @return CompletableFuture<GetMediaArtsResponse> - The async response + *

This retrieves 100 random artwork paths in the specified sections and returns them. Restrictions are put in place to not return artwork for items the user is not allowed to access. Artwork will be for Movies, Shows, and Artists only. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetRandomArtworkResponse> - The async response */ - public CompletableFuture getMediaArts(long ratingKey) { - GetMediaArtsRequest request = - GetMediaArtsRequest - .builder() - .ratingKey(ratingKey) - .build(); - AsyncRequestOperation operation - = new GetMediaArts.Async(sdkConfiguration); + public CompletableFuture getRandomArtwork(GetRandomArtworkRequest request) { + AsyncRequestOperation operation + = new GetRandomArtwork.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } /** - * Upload Media Background Artwork + * Get library sections (main Media Provider Only) * - *

Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + *

A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. + * Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). * * @return The async call builder */ - public PostMediaArtsRequestBuilder postMediaArts() { - return new PostMediaArtsRequestBuilder(sdkConfiguration); + public GetSectionsRequestBuilder getSections() { + return new GetSectionsRequestBuilder(sdkConfiguration); } /** - * Upload Media Background Artwork + * Get library sections (main Media Provider Only) * - *

Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + *

A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. + * Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). * - * @param ratingKey the id of the library item to return the posters of. - * @return CompletableFuture<PostMediaArtsResponse> - The async response + * @return CompletableFuture<GetSectionsResponse> - The async response */ - public CompletableFuture postMediaArts(long ratingKey) { - return postMediaArts(ratingKey, Optional.empty(), Optional.empty()); + public CompletableFuture getSectionsDirect() { + AsyncRequestlessOperation operation + = new GetSections.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Add a library section + * + *

Add a new library section to the server + * + * @return The async call builder + */ + public AddSectionRequestBuilder addSection() { + return new AddSectionRequestBuilder(sdkConfiguration); } /** - * Upload Media Background Artwork + * Add a library section * - *

Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + *

Add a new library section to the server * - * @param ratingKey the id of the library item to return the posters of. - * @param url The URL of the image, if uploading a remote image - * @param requestBody The contents of the image, if uploading a local file - * @return CompletableFuture<PostMediaArtsResponse> - The async response + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddSectionResponse> - The async response */ - public CompletableFuture postMediaArts( - long ratingKey, Optional url, - Optional requestBody) { - PostMediaArtsRequest request = - PostMediaArtsRequest - .builder() - .ratingKey(ratingKey) - .url(url) - .requestBody(requestBody) - .build(); - AsyncRequestOperation operation - = new PostMediaArts.Async(sdkConfiguration); + public CompletableFuture addSection(AddSectionRequest request) { + AsyncRequestOperation operation + = new AddSection.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } /** - * Get Media Posters + * Stop refresh * - *

Returns the available posters for a library item. + *

Stop all refreshes across all sections * * @return The async call builder */ - public GetMediaPostersRequestBuilder getMediaPosters() { - return new GetMediaPostersRequestBuilder(sdkConfiguration); + public StopAllRefreshesRequestBuilder stopAllRefreshes() { + return new StopAllRefreshesRequestBuilder(sdkConfiguration); } /** - * Get Media Posters + * Stop refresh * - *

Returns the available posters for a library item. + *

Stop all refreshes across all sections * - * @param ratingKey the id of the library item to return the posters of. - * @return CompletableFuture<GetMediaPostersResponse> - The async response + * @return CompletableFuture<StopAllRefreshesResponse> - The async response */ - public CompletableFuture getMediaPosters(long ratingKey) { - GetMediaPostersRequest request = - GetMediaPostersRequest - .builder() - .ratingKey(ratingKey) - .build(); - AsyncRequestOperation operation - = new GetMediaPosters.Async(sdkConfiguration); + public CompletableFuture stopAllRefreshesDirect() { + AsyncRequestlessOperation operation + = new StopAllRefreshes.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Get section prefs + * + *

Get a section's preferences for a metadata type + * + * @return The async call builder + */ + public GetSectionsPrefsRequestBuilder getSectionsPrefs() { + return new GetSectionsPrefsRequestBuilder(sdkConfiguration); + } + + /** + * Get section prefs + * + *

Get a section's preferences for a metadata type + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSectionsPrefsResponse> - The async response + */ + public CompletableFuture getSectionsPrefs(GetSectionsPrefsRequest request) { + AsyncRequestOperation operation + = new GetSectionsPrefs.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } /** - * Upload Media Poster + * Refresh all sections * - *

Uploads a poster to a library item, either from a local file or a remote URL + *

Tell PMS to refresh all section metadata * * @return The async call builder */ - public PostMediaPosterRequestBuilder postMediaPoster() { - return new PostMediaPosterRequestBuilder(sdkConfiguration); + public RefreshSectionsMetadataRequestBuilder refreshSectionsMetadata() { + return new RefreshSectionsMetadataRequestBuilder(sdkConfiguration); } /** - * Upload Media Poster + * Refresh all sections * - *

Uploads a poster to a library item, either from a local file or a remote URL + *

Tell PMS to refresh all section metadata * - * @param ratingKey the id of the library item to return the posters of. - * @return CompletableFuture<PostMediaPosterResponse> - The async response + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<RefreshSectionsMetadataResponse> - The async response */ - public CompletableFuture postMediaPoster(long ratingKey) { - return postMediaPoster(ratingKey, Optional.empty(), Optional.empty()); - } - - /** - * Upload Media Poster - * - *

Uploads a poster to a library item, either from a local file or a remote URL - * - * @param ratingKey the id of the library item to return the posters of. - * @param url The URL of the image, if uploading a remote image - * @param requestBody The contents of the image, if uploading a local file - * @return CompletableFuture<PostMediaPosterResponse> - The async response - */ - public CompletableFuture postMediaPoster( - long ratingKey, Optional url, - Optional requestBody) { - PostMediaPosterRequest request = - PostMediaPosterRequest - .builder() - .ratingKey(ratingKey) - .url(url) - .requestBody(requestBody) - .build(); - AsyncRequestOperation operation - = new PostMediaPoster.Async(sdkConfiguration); + public CompletableFuture refreshSectionsMetadata(RefreshSectionsMetadataRequest request) { + AsyncRequestOperation operation + = new RefreshSectionsMetadata.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } /** - * Get Items Children + * Get all library tags of a type * - *

This endpoint will return the children of of a library item specified with the ratingKey. + *

Get all library tags of a type * * @return The async call builder */ - public GetMetadataChildrenRequestBuilder getMetadataChildren() { - return new GetMetadataChildrenRequestBuilder(sdkConfiguration); + public GetTagsRequestBuilder getTags() { + return new GetTagsRequestBuilder(sdkConfiguration); } /** - * Get Items Children + * Get all library tags of a type * - *

This endpoint will return the children of of a library item specified with the ratingKey. + *

Get all library tags of a type * - * @param ratingKey the id of the library item to return the children of. - * @return CompletableFuture<GetMetadataChildrenResponse> - The async response + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetTagsResponse> - The async response */ - public CompletableFuture getMetadataChildren(double ratingKey) { - return getMetadataChildren(ratingKey, Optional.empty()); - } - - /** - * Get Items Children - * - *

This endpoint will return the children of of a library item specified with the ratingKey. - * - * @param ratingKey the id of the library item to return the children of. - * @param includeElements Adds additional elements to the response. Supported types are (Stream) - * - * @return CompletableFuture<GetMetadataChildrenResponse> - The async response - */ - public CompletableFuture getMetadataChildren(double ratingKey, Optional includeElements) { - GetMetadataChildrenRequest request = - GetMetadataChildrenRequest - .builder() - .ratingKey(ratingKey) - .includeElements(includeElements) - .build(); - AsyncRequestOperation operation - = new GetMetadataChildren.Async(sdkConfiguration); + public CompletableFuture getTags(GetTagsRequest request) { + AsyncRequestOperation operation + = new GetTags.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } /** - * Get Top Watched Content + * Delete a metadata item * - *

This endpoint will return the top watched content from libraries of a certain type + *

Delete a single metadata item from the library, deleting media as well * * @return The async call builder */ - public GetTopWatchedContentRequestBuilder getTopWatchedContent() { - return new GetTopWatchedContentRequestBuilder(sdkConfiguration); + public DeleteMetadataItemRequestBuilder deleteMetadataItem() { + return new DeleteMetadataItemRequestBuilder(sdkConfiguration); } /** - * Get Top Watched Content + * Delete a metadata item * - *

This endpoint will return the top watched content from libraries of a certain type + *

Delete a single metadata item from the library, deleting media as well * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return CompletableFuture<GetTopWatchedContentResponse> - The async response + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteMetadataItemResponse> - The async response */ - public CompletableFuture getTopWatchedContent(GetTopWatchedContentQueryParamType type) { - return getTopWatchedContent(type, Optional.empty()); + public CompletableFuture deleteMetadataItem(DeleteMetadataItemRequest request) { + AsyncRequestOperation operation + = new DeleteMetadataItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Edit a metadata item + * + *

Edit metadata items setting fields + * + * @return The async call builder + */ + public EditMetadataItemRequestBuilder editMetadataItem() { + return new EditMetadataItemRequestBuilder(sdkConfiguration); } /** - * Get Top Watched Content + * Edit a metadata item * - *

This endpoint will return the top watched content from libraries of a certain type + *

Edit metadata items setting fields * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @param includeGuids Adds the Guid object to the response - * - * @return CompletableFuture<GetTopWatchedContentResponse> - The async response + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<EditMetadataItemResponse> - The async response */ - public CompletableFuture getTopWatchedContent(GetTopWatchedContentQueryParamType type, Optional includeGuids) { - GetTopWatchedContentRequest request = - GetTopWatchedContentRequest - .builder() - .type(type) - .includeGuids(includeGuids) - .build(); - AsyncRequestOperation operation - = new GetTopWatchedContent.Async(sdkConfiguration); + public CompletableFuture editMetadataItem(EditMetadataItemRequest request) { + AsyncRequestOperation operation + = new EditMetadataItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Ad-detect an item + * + *

Start the detection of ads in a metadata item + * + * @return The async call builder + */ + public DetectAdsRequestBuilder detectAds() { + return new DetectAdsRequestBuilder(sdkConfiguration); + } + + /** + * Ad-detect an item + * + *

Start the detection of ads in a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DetectAdsResponse> - The async response + */ + public CompletableFuture detectAds(DetectAdsRequest request) { + AsyncRequestOperation operation + = new DetectAds.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get the leaves of an item + * + *

Get the leaves for a metadata item such as the episodes in a show + * + * @return The async call builder + */ + public GetAllItemLeavesRequestBuilder getAllItemLeaves() { + return new GetAllItemLeavesRequestBuilder(sdkConfiguration); + } + + /** + * Get the leaves of an item + * + *

Get the leaves for a metadata item such as the episodes in a show + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetAllItemLeavesResponse> - The async response + */ + public CompletableFuture getAllItemLeaves(GetAllItemLeavesRequest request) { + AsyncRequestOperation operation + = new GetAllItemLeaves.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Analyze an item + * + *

Start the analysis of a metadata item + * + * @return The async call builder + */ + public AnalyzeMetadataRequestBuilder analyzeMetadata() { + return new AnalyzeMetadataRequestBuilder(sdkConfiguration); + } + + /** + * Analyze an item + * + *

Start the analysis of a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AnalyzeMetadataResponse> - The async response + */ + public CompletableFuture analyzeMetadata(AnalyzeMetadataRequest request) { + AsyncRequestOperation operation + = new AnalyzeMetadata.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Generate thumbs of chapters for an item + * + *

Start the chapter thumb generation for an item + * + * @return The async call builder + */ + public GenerateThumbsRequestBuilder generateThumbs() { + return new GenerateThumbsRequestBuilder(sdkConfiguration); + } + + /** + * Generate thumbs of chapters for an item + * + *

Start the chapter thumb generation for an item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GenerateThumbsResponse> - The async response + */ + public CompletableFuture generateThumbs(GenerateThumbsRequest request) { + AsyncRequestOperation operation + = new GenerateThumbs.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Credit detect a metadata item + * + *

Start credit detection on a metadata item + * + * @return The async call builder + */ + public DetectCreditsRequestBuilder detectCredits() { + return new DetectCreditsRequestBuilder(sdkConfiguration); + } + + /** + * Credit detect a metadata item + * + *

Start credit detection on a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DetectCreditsResponse> - The async response + */ + public CompletableFuture detectCredits(DetectCreditsRequest request) { + AsyncRequestOperation operation + = new DetectCredits.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get an item's extras + * + *

Get the extras for a metadata item + * + * @return The async call builder + */ + public GetExtrasRequestBuilder getExtras() { + return new GetExtrasRequestBuilder(sdkConfiguration); + } + + /** + * Get an item's extras + * + *

Get the extras for a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetExtrasResponse> - The async response + */ + public CompletableFuture getExtras(GetExtrasRequest request) { + AsyncRequestOperation operation + = new GetExtras.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Add to an item's extras + * + *

Add an extra to a metadata item + * + * @return The async call builder + */ + public AddExtrasRequestBuilder addExtras() { + return new AddExtrasRequestBuilder(sdkConfiguration); + } + + /** + * Add to an item's extras + * + *

Add an extra to a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddExtrasResponse> - The async response + */ + public CompletableFuture addExtras(AddExtrasRequest request) { + AsyncRequestOperation operation + = new AddExtras.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a file from a metadata or media bundle + * + *

Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme) + * + * @return The async call builder + */ + public GetFileRequestBuilder getFile() { + return new GetFileRequestBuilder(sdkConfiguration); + } + + /** + * Get a file from a metadata or media bundle + * + *

Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetFileResponse> - The async response + */ + public CompletableFuture getFile(GetFileRequest request) { + AsyncRequestOperation operation + = new GetFile.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Start BIF generation of an item + * + *

Start the indexing (BIF generation) of an item + * + * @return The async call builder + */ + public StartBifGenerationRequestBuilder startBifGeneration() { + return new StartBifGenerationRequestBuilder(sdkConfiguration); + } + + /** + * Start BIF generation of an item + * + *

Start the indexing (BIF generation) of an item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<StartBifGenerationResponse> - The async response + */ + public CompletableFuture startBifGeneration(StartBifGenerationRequest request) { + AsyncRequestOperation operation + = new StartBifGeneration.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Intro detect an item + * + *

Start the detection of intros in a metadata item + * + * @return The async call builder + */ + public DetectIntrosRequestBuilder detectIntros() { + return new DetectIntrosRequestBuilder(sdkConfiguration); + } + + /** + * Intro detect an item + * + *

Start the detection of intros in a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DetectIntrosResponse> - The async response + */ + public CompletableFuture detectIntros(DetectIntrosRequest request) { + AsyncRequestOperation operation + = new DetectIntros.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Create a marker + * + *

Create a marker for this user on the metadata item + * + * @return The async call builder + */ + public CreateMarkerRequestBuilder createMarker() { + return new CreateMarkerRequestBuilder(sdkConfiguration); + } + + /** + * Create a marker + * + *

Create a marker for this user on the metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CreateMarkerResponse> - The async response + */ + public CompletableFuture createMarker(CreateMarkerRequest request) { + AsyncRequestOperation operation + = new CreateMarker.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Match a metadata item + * + *

Match a metadata item to a guid + * + * @return The async call builder + */ + public MatchItemRequestBuilder matchItem() { + return new MatchItemRequestBuilder(sdkConfiguration); + } + + /** + * Match a metadata item + * + *

Match a metadata item to a guid + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<MatchItemResponse> - The async response + */ + public CompletableFuture matchItem(MatchItemRequest request) { + AsyncRequestOperation operation + = new MatchItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get metadata matches for an item + * + *

Get the list of metadata matches for a metadata item + * + * @return The async call builder + */ + public ListMatchesRequestBuilder listMatches() { + return new ListMatchesRequestBuilder(sdkConfiguration); + } + + /** + * Get metadata matches for an item + * + *

Get the list of metadata matches for a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListMatchesResponse> - The async response + */ + public CompletableFuture listMatches(ListMatchesRequest request) { + AsyncRequestOperation operation + = new ListMatches.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Merge a metadata item + * + *

Merge a metadata item with other items + * + * @return The async call builder + */ + public MergeItemsRequestBuilder mergeItems() { + return new MergeItemsRequestBuilder(sdkConfiguration); + } + + /** + * Merge a metadata item + * + *

Merge a metadata item with other items + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<MergeItemsResponse> - The async response + */ + public CompletableFuture mergeItems(MergeItemsRequest request) { + AsyncRequestOperation operation + = new MergeItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get nearest tracks to metadata item + * + *

Get the nearest tracks, sonically, to the provided track + * + * @return The async call builder + */ + public ListSonicallySimilarRequestBuilder listSonicallySimilar() { + return new ListSonicallySimilarRequestBuilder(sdkConfiguration); + } + + /** + * Get nearest tracks to metadata item + * + *

Get the nearest tracks, sonically, to the provided track + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListSonicallySimilarResponse> - The async response + */ + public CompletableFuture listSonicallySimilar(ListSonicallySimilarRequest request) { + AsyncRequestOperation operation + = new ListSonicallySimilar.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set metadata preferences + * + *

Set the preferences on a metadata item + * + * @return The async call builder + */ + public SetItemPreferencesRequestBuilder setItemPreferences() { + return new SetItemPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Set metadata preferences + * + *

Set the preferences on a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SetItemPreferencesResponse> - The async response + */ + public CompletableFuture setItemPreferences(SetItemPreferencesRequest request) { + AsyncRequestOperation operation + = new SetItemPreferences.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Refresh a metadata item + * + *

Refresh a metadata item from the agent + * + * @return The async call builder + */ + public RefreshItemsMetadataRequestBuilder refreshItemsMetadata() { + return new RefreshItemsMetadataRequestBuilder(sdkConfiguration); + } + + /** + * Refresh a metadata item + * + *

Refresh a metadata item from the agent + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<RefreshItemsMetadataResponse> - The async response + */ + public CompletableFuture refreshItemsMetadata(RefreshItemsMetadataRequest request) { + AsyncRequestOperation operation + = new RefreshItemsMetadata.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get related items + * + *

Get a hub of related items to a metadata item + * + * @return The async call builder + */ + public GetRelatedItemsRequestBuilder getRelatedItems() { + return new GetRelatedItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get related items + * + *

Get a hub of related items to a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetRelatedItemsResponse> - The async response + */ + public CompletableFuture getRelatedItems(GetRelatedItemsRequest request) { + AsyncRequestOperation operation + = new GetRelatedItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get similar items + * + *

Get a list of similar items to a metadata item + * + * @return The async call builder + */ + public ListSimilarRequestBuilder listSimilar() { + return new ListSimilarRequestBuilder(sdkConfiguration); + } + + /** + * Get similar items + * + *

Get a list of similar items to a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListSimilarResponse> - The async response + */ + public CompletableFuture listSimilar(ListSimilarRequest request) { + AsyncRequestOperation operation + = new ListSimilar.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Split a metadata item + * + *

Split a metadata item into multiple items + * + * @return The async call builder + */ + public SplitItemRequestBuilder splitItem() { + return new SplitItemRequestBuilder(sdkConfiguration); + } + + /** + * Split a metadata item + * + *

Split a metadata item into multiple items + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SplitItemResponse> - The async response + */ + public CompletableFuture splitItem(SplitItemRequest request) { + AsyncRequestOperation operation + = new SplitItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Add subtitles + * + *

Add a subtitle to a metadata item + * + * @return The async call builder + */ + public AddSubtitlesRequestBuilder addSubtitles() { + return new AddSubtitlesRequestBuilder(sdkConfiguration); + } + + /** + * Add subtitles + * + *

Add a subtitle to a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddSubtitlesResponse> - The async response + */ + public CompletableFuture addSubtitles(AddSubtitlesRequest request) { + AsyncRequestOperation operation + = new AddSubtitles.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get metadata items as a tree + * + *

Get a tree of metadata items, such as the seasons/episodes of a show + * + * @return The async call builder + */ + public GetItemTreeRequestBuilder getItemTree() { + return new GetItemTreeRequestBuilder(sdkConfiguration); + } + + /** + * Get metadata items as a tree + * + *

Get a tree of metadata items, such as the seasons/episodes of a show + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetItemTreeResponse> - The async response + */ + public CompletableFuture getItemTree(GetItemTreeRequest request) { + AsyncRequestOperation operation + = new GetItemTree.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Unmatch a metadata item + * + *

Unmatch a metadata item to info fetched from the agent + * + * @return The async call builder + */ + public UnmatchRequestBuilder unmatch() { + return new UnmatchRequestBuilder(sdkConfiguration); + } + + /** + * Unmatch a metadata item + * + *

Unmatch a metadata item to info fetched from the agent + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<UnmatchResponse> - The async response + */ + public CompletableFuture unmatch(UnmatchRequest request) { + AsyncRequestOperation operation + = new Unmatch.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get metadata top users + * + *

Get the list of users which have played this item starting with the most + * + * @return The async call builder + */ + public ListTopUsersRequestBuilder listTopUsers() { + return new ListTopUsersRequestBuilder(sdkConfiguration); + } + + /** + * Get metadata top users + * + *

Get the list of users which have played this item starting with the most + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListTopUsersResponse> - The async response + */ + public CompletableFuture listTopUsers(ListTopUsersRequest request) { + AsyncRequestOperation operation + = new ListTopUsers.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Detect voice activity + * + *

Start the detection of voice in a metadata item + * + * @return The async call builder + */ + public DetectVoiceActivityRequestBuilder detectVoiceActivity() { + return new DetectVoiceActivityRequestBuilder(sdkConfiguration); + } + + /** + * Detect voice activity + * + *

Start the detection of voice in a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DetectVoiceActivityResponse> - The async response + */ + public CompletableFuture detectVoiceActivity(DetectVoiceActivityRequest request) { + AsyncRequestOperation operation + = new DetectVoiceActivity.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get augmentation status + * + *

Get augmentation status and potentially wait for completion + * + * @return The async call builder + */ + public GetAugmentationStatusRequestBuilder getAugmentationStatus() { + return new GetAugmentationStatusRequestBuilder(sdkConfiguration); + } + + /** + * Get augmentation status + * + *

Get augmentation status and potentially wait for completion + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetAugmentationStatusResponse> - The async response + */ + public CompletableFuture getAugmentationStatus(GetAugmentationStatusRequest request) { + AsyncRequestOperation operation + = new GetAugmentationStatus.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set stream selection + * + *

Set which streams (audio/subtitle) are selected by this user + * + * @return The async call builder + */ + public SetStreamSelectionRequestBuilder setStreamSelection() { + return new SetStreamSelectionRequestBuilder(sdkConfiguration); + } + + /** + * Set stream selection + * + *

Set which streams (audio/subtitle) are selected by this user + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SetStreamSelectionResponse> - The async response + */ + public CompletableFuture setStreamSelection(SetStreamSelectionRequest request) { + AsyncRequestOperation operation + = new SetStreamSelection.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get person details + * + *

Get details for a single actor. + * + * @return The async call builder + */ + public GetPersonRequestBuilder getPerson() { + return new GetPersonRequestBuilder(sdkConfiguration); + } + + /** + * Get person details + * + *

Get details for a single actor. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPersonResponse> - The async response + */ + public CompletableFuture getPerson(GetPersonRequest request) { + AsyncRequestOperation operation + = new GetPerson.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get media for a person + * + *

Get all the media for a single actor. + * + * @return The async call builder + */ + public ListPersonMediaRequestBuilder listPersonMedia() { + return new ListPersonMediaRequestBuilder(sdkConfiguration); + } + + /** + * Get media for a person + * + *

Get all the media for a single actor. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListPersonMediaResponse> - The async response + */ + public CompletableFuture listPersonMedia(ListPersonMediaRequest request) { + AsyncRequestOperation operation + = new ListPersonMedia.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a library section + * + *

Delete a library section by id + * + * @return The async call builder + */ + public DeleteLibrarySectionRequestBuilder deleteLibrarySection() { + return new DeleteLibrarySectionRequestBuilder(sdkConfiguration); + } + + /** + * Delete a library section + * + *

Delete a library section by id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteLibrarySectionResponse> - The async response + */ + public CompletableFuture deleteLibrarySection(DeleteLibrarySectionRequest request) { + AsyncRequestOperation operation + = new DeleteLibrarySection.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a library section by id + * + *

Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. It often contains a list of `Directory` metadata objects: These used to be used by clients to build a menuing system. + * + * @return The async call builder + */ + public GetLibraryDetailsRequestBuilder getLibraryDetails() { + return new GetLibraryDetailsRequestBuilder(sdkConfiguration); + } + + /** + * Get a library section by id + * + *

Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. It often contains a list of `Directory` metadata objects: These used to be used by clients to build a menuing system. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetLibraryDetailsResponse> - The async response + */ + public CompletableFuture getLibraryDetails(GetLibraryDetailsRequest request) { + AsyncRequestOperation operation + = new GetLibraryDetails.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Edit a library section + * + *

Edit a library section by id setting parameters + * + * @return The async call builder + */ + public EditSectionRequestBuilder editSection() { + return new EditSectionRequestBuilder(sdkConfiguration); + } + + /** + * Edit a library section + * + *

Edit a library section by id setting parameters + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<EditSectionResponse> - The async response + */ + public CompletableFuture editSection(EditSectionRequest request) { + AsyncRequestOperation operation + = new EditSection.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set the fields of the filtered items + * + *

This endpoint takes an large possible set of values. Here are some examples. + * - **Parameters, extra documentation** + * - artist.title.value + * - When used with track, both artist.title.value and album.title.value need to be specified + * - title.value usage + * - Summary + * - Tracks always rename and never merge + * - Albums and Artists + * - if single item and item without title does not exist, it is renamed. + * - if single item and item with title does exist they are merged. + * - if multiple they are always merged. + * - Tracks + * - Works as expected will update the track's title + * - Single track: `/library/sections/{id}/all?type=10&id=42&title.value=NewName` + * - Multiple tracks: `/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName` + * - All tracks: `/library/sections/{id}/all?type=10&title.value=NewName` + * - Albums + * - Functionality changes depending on the existence of an album with the same title + * - Album exists + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=Album 2` + * - Album with id 42 is merged into album titled "Album 2" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=Moo Album` + * - All albums are merged into the existing album titled "Moo Album" + * - Album does not exist + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle` + * - Album with id 42 has title modified to "NewAlbumTitle" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=NewAlbumTitle` + * - All albums are merged into a new album with title="NewAlbumTitle" + * - Artists + * - Functionaly changes depending on the existence of an artist with the same title. + * - Artist exists + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=Artist 2` + * - Artist with id 42 is merged into existing artist titled "Artist 2" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=Artist 3` + * - All artists are merged into the existing artist titled "Artist 3" + * - Artist does not exist + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle` + * - Artist with id 42 has title modified to "NewArtistTitle" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=NewArtistTitle` + * - All artists are merged into a new artist with title="NewArtistTitle" + * + *

- **Notes** + * - Technically square brackets are not allowed in an URI except the Internet Protocol Literal Address + * - RFC3513: A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is the only place where square bracket characters are allowed in the URI syntax. + * - Escaped square brackets are allowed, but don't render well + * + * @return The async call builder + */ + public UpdateItemsRequestBuilder updateItems() { + return new UpdateItemsRequestBuilder(sdkConfiguration); + } + + /** + * Set the fields of the filtered items + * + *

This endpoint takes an large possible set of values. Here are some examples. + * - **Parameters, extra documentation** + * - artist.title.value + * - When used with track, both artist.title.value and album.title.value need to be specified + * - title.value usage + * - Summary + * - Tracks always rename and never merge + * - Albums and Artists + * - if single item and item without title does not exist, it is renamed. + * - if single item and item with title does exist they are merged. + * - if multiple they are always merged. + * - Tracks + * - Works as expected will update the track's title + * - Single track: `/library/sections/{id}/all?type=10&id=42&title.value=NewName` + * - Multiple tracks: `/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName` + * - All tracks: `/library/sections/{id}/all?type=10&title.value=NewName` + * - Albums + * - Functionality changes depending on the existence of an album with the same title + * - Album exists + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=Album 2` + * - Album with id 42 is merged into album titled "Album 2" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=Moo Album` + * - All albums are merged into the existing album titled "Moo Album" + * - Album does not exist + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle` + * - Album with id 42 has title modified to "NewAlbumTitle" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=NewAlbumTitle` + * - All albums are merged into a new album with title="NewAlbumTitle" + * - Artists + * - Functionaly changes depending on the existence of an artist with the same title. + * - Artist exists + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=Artist 2` + * - Artist with id 42 is merged into existing artist titled "Artist 2" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=Artist 3` + * - All artists are merged into the existing artist titled "Artist 3" + * - Artist does not exist + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle` + * - Artist with id 42 has title modified to "NewArtistTitle" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=NewArtistTitle` + * - All artists are merged into a new artist with title="NewArtistTitle" + * + *

- **Notes** + * - Technically square brackets are not allowed in an URI except the Internet Protocol Literal Address + * - RFC3513: A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is the only place where square bracket characters are allowed in the URI syntax. + * - Escaped square brackets are allowed, but don't render well + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<UpdateItemsResponse> - The async response + */ + public CompletableFuture updateItems(UpdateItemsRequest request) { + AsyncRequestOperation operation + = new UpdateItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Analyze a section + * + *

Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section + * + * @return The async call builder + */ + public StartAnalysisRequestBuilder startAnalysis() { + return new StartAnalysisRequestBuilder(sdkConfiguration); + } + + /** + * Analyze a section + * + *

Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<StartAnalysisResponse> - The async response + */ + public CompletableFuture startAnalysis(StartAnalysisRequest request) { + AsyncRequestOperation operation + = new StartAnalysis.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get autocompletions for search + * + *

The field to autocomplete on is specified by the {field}.query parameter. For example `genre.query` or `title.query`. + * Returns a set of items from the filtered items whose {field} starts with {field}.query. In the results, a {field}.queryRange will be present to express the range of the match + * + * @return The async call builder + */ + public AutocompleteRequestBuilder autocomplete() { + return new AutocompleteRequestBuilder(sdkConfiguration); + } + + /** + * Get autocompletions for search + * + *

The field to autocomplete on is specified by the {field}.query parameter. For example `genre.query` or `title.query`. + * Returns a set of items from the filtered items whose {field} starts with {field}.query. In the results, a {field}.queryRange will be present to express the range of the match + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AutocompleteResponse> - The async response + */ + public CompletableFuture autocomplete(AutocompleteRequest request) { + AsyncRequestOperation operation + = new Autocomplete.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get collections in a section + * + *

Get all collections in a section + * + * @return The async call builder + */ + public GetCollectionsRequestBuilder getCollections() { + return new GetCollectionsRequestBuilder(sdkConfiguration); + } + + /** + * Get collections in a section + * + *

Get all collections in a section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetCollectionsResponse> - The async response + */ + public CompletableFuture getCollections(GetCollectionsRequest request) { + AsyncRequestOperation operation + = new GetCollections.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get common fields for items + * + *

Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter + * Fields which are not common will be expressed in the `mixedFields` field + * + * @return The async call builder + */ + public GetCommonRequestBuilder getCommon() { + return new GetCommonRequestBuilder(sdkConfiguration); + } + + /** + * Get common fields for items + * + *

Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter + * Fields which are not common will be expressed in the `mixedFields` field + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetCommonResponse> - The async response + */ + public CompletableFuture getCommon(GetCommonRequest request) { + AsyncRequestOperation operation + = new GetCommon.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Empty section trash + * + *

Empty trash in the section, permanently deleting media/metadata for missing media + * + * @return The async call builder + */ + public EmptyTrashRequestBuilder emptyTrash() { + return new EmptyTrashRequestBuilder(sdkConfiguration); + } + + /** + * Empty section trash + * + *

Empty trash in the section, permanently deleting media/metadata for missing media + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<EmptyTrashResponse> - The async response + */ + public CompletableFuture emptyTrash(EmptyTrashRequest request) { + AsyncRequestOperation operation + = new EmptyTrash.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get section filters + * + *

Get common filters on a section + * + * @return The async call builder + */ + public GetSectionFiltersRequestBuilder getSectionFilters() { + return new GetSectionFiltersRequestBuilder(sdkConfiguration); + } + + /** + * Get section filters + * + *

Get common filters on a section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSectionFiltersResponse> - The async response + */ + public CompletableFuture getSectionFilters(GetSectionFiltersRequest request) { + AsyncRequestOperation operation + = new GetSectionFilters.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get list of first characters + * + *

Get list of first characters in this section + * + * @return The async call builder + */ + public GetFirstCharactersRequestBuilder getFirstCharacters() { + return new GetFirstCharactersRequestBuilder(sdkConfiguration); + } + + /** + * Get list of first characters + * + *

Get list of first characters in this section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetFirstCharactersResponse> - The async response + */ + public CompletableFuture getFirstCharacters(GetFirstCharactersRequest request) { + AsyncRequestOperation operation + = new GetFirstCharacters.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete section indexes + * + *

Delete all the indexes in a section + * + * @return The async call builder + */ + public DeleteIndexesRequestBuilder deleteIndexes() { + return new DeleteIndexesRequestBuilder(sdkConfiguration); + } + + /** + * Delete section indexes + * + *

Delete all the indexes in a section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteIndexesResponse> - The async response + */ + public CompletableFuture deleteIndexes(DeleteIndexesRequest request) { + AsyncRequestOperation operation + = new DeleteIndexes.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete section intro markers + * + *

Delete all the intro markers in a section + * + * @return The async call builder + */ + public DeleteIntrosRequestBuilder deleteIntros() { + return new DeleteIntrosRequestBuilder(sdkConfiguration); + } + + /** + * Delete section intro markers + * + *

Delete all the intro markers in a section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteIntrosResponse> - The async response + */ + public CompletableFuture deleteIntros(DeleteIntrosRequest request) { + AsyncRequestOperation operation + = new DeleteIntros.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get section prefs + * + *

Get the prefs for a section by id and potentially overriding the agent + * + * @return The async call builder + */ + public GetSectionPreferencesRequestBuilder getSectionPreferences() { + return new GetSectionPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Get section prefs + * + *

Get the prefs for a section by id and potentially overriding the agent + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSectionPreferencesResponse> - The async response + */ + public CompletableFuture getSectionPreferences(GetSectionPreferencesRequest request) { + AsyncRequestOperation operation + = new GetSectionPreferences.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set section prefs + * + *

Set the prefs for a section by id + * + * @return The async call builder + */ + public SetSectionPreferencesRequestBuilder setSectionPreferences() { + return new SetSectionPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Set section prefs + * + *

Set the prefs for a section by id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SetSectionPreferencesResponse> - The async response + */ + public CompletableFuture setSectionPreferences(SetSectionPreferencesRequest request) { + AsyncRequestOperation operation + = new SetSectionPreferences.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Cancel section refresh + * + *

Cancel the refresh of a section + * + * @return The async call builder + */ + public CancelRefreshRequestBuilder cancelRefresh() { + return new CancelRefreshRequestBuilder(sdkConfiguration); + } + + /** + * Cancel section refresh + * + *

Cancel the refresh of a section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CancelRefreshResponse> - The async response + */ + public CompletableFuture cancelRefresh(CancelRefreshRequest request) { + AsyncRequestOperation operation + = new CancelRefresh.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Refresh section + * + *

Start a refresh of this section + * + * @return The async call builder + */ + public RefreshSectionRequestBuilder refreshSection() { + return new RefreshSectionRequestBuilder(sdkConfiguration); + } + + /** + * Refresh section + * + *

Start a refresh of this section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<RefreshSectionResponse> - The async response + */ + public CompletableFuture refreshSection(RefreshSectionRequest request) { + AsyncRequestOperation operation + = new RefreshSection.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a section sorts + * + *

Get the sort mechanisms available in a section + * + * @return The async call builder + */ + public GetAvailableSortsRequestBuilder getAvailableSorts() { + return new GetAvailableSortsRequestBuilder(sdkConfiguration); + } + + /** + * Get a section sorts + * + *

Get the sort mechanisms available in a section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetAvailableSortsResponse> - The async response + */ + public CompletableFuture getAvailableSorts(GetAvailableSortsRequest request) { + AsyncRequestOperation operation + = new GetAvailableSorts.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get loudness about a stream in json + * + *

The the loudness of a stream in db, one entry per 100ms + * + * @return The async call builder + */ + public GetStreamLevelsRequestBuilder getStreamLevels() { + return new GetStreamLevelsRequestBuilder(sdkConfiguration); + } + + /** + * Get loudness about a stream in json + * + *

The the loudness of a stream in db, one entry per 100ms + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetStreamLevelsResponse> - The async response + */ + public CompletableFuture getStreamLevels(GetStreamLevelsRequest request) { + AsyncRequestOperation operation + = new GetStreamLevels.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get loudness about a stream + * + *

The the loudness of a stream in db, one number per line, one entry per 100ms + * + * @return The async call builder + */ + public GetStreamLoudnessRequestBuilder getStreamLoudness() { + return new GetStreamLoudnessRequestBuilder(sdkConfiguration); + } + + /** + * Get loudness about a stream + * + *

The the loudness of a stream in db, one number per line, one entry per 100ms + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetStreamLoudnessResponse> - The async response + */ + public CompletableFuture getStreamLoudness(GetStreamLoudnessRequest request) { + AsyncRequestOperation operation + = new GetStreamLoudness.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a chapter image + * + *

Get a single chapter image for a piece of media + * + * @return The async call builder + */ + public GetChapterImageRequestBuilder getChapterImage() { + return new GetChapterImageRequestBuilder(sdkConfiguration); + } + + /** + * Get a chapter image + * + *

Get a single chapter image for a piece of media + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetChapterImageResponse> - The async response + */ + public CompletableFuture getChapterImage(GetChapterImageRequest request) { + AsyncRequestOperation operation + = new GetChapterImage.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set an item's artwork, theme, etc + * + *

Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + * + * @return The async call builder + */ + public SetItemArtworkRequestBuilder setItemArtwork() { + return new SetItemArtworkRequestBuilder(sdkConfiguration); + } + + /** + * Set an item's artwork, theme, etc + * + *

Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SetItemArtworkResponse> - The async response + */ + public CompletableFuture setItemArtwork(SetItemArtworkRequest request) { + AsyncRequestOperation operation + = new SetItemArtwork.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set an item's artwork, theme, etc + * + *

Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + * + * @return The async call builder + */ + public UpdateItemArtworkRequestBuilder updateItemArtwork() { + return new UpdateItemArtworkRequestBuilder(sdkConfiguration); + } + + /** + * Set an item's artwork, theme, etc + * + *

Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<UpdateItemArtworkResponse> - The async response + */ + public CompletableFuture updateItemArtwork(UpdateItemArtworkRequest request) { + AsyncRequestOperation operation + = new UpdateItemArtwork.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a marker + * + *

Delete a marker for this user on the metadata item + * + * @return The async call builder + */ + public DeleteMarkerRequestBuilder deleteMarker() { + return new DeleteMarkerRequestBuilder(sdkConfiguration); + } + + /** + * Delete a marker + * + *

Delete a marker for this user on the metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteMarkerResponse> - The async response + */ + public CompletableFuture deleteMarker(DeleteMarkerRequest request) { + AsyncRequestOperation operation + = new DeleteMarker.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Edit a marker + * + *

Edit a marker for this user on the metadata item + * + * @return The async call builder + */ + public EditMarkerRequestBuilder editMarker() { + return new EditMarkerRequestBuilder(sdkConfiguration); + } + + /** + * Edit a marker + * + *

Edit a marker for this user on the metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<EditMarkerResponse> - The async response + */ + public CompletableFuture editMarker(EditMarkerRequest request) { + AsyncRequestOperation operation + = new EditMarker.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a media item + * + *

Delete a single media from a metadata item in the library + * + * @return The async call builder + */ + public DeleteMediaItemRequestBuilder deleteMediaItem() { + return new DeleteMediaItemRequestBuilder(sdkConfiguration); + } + + /** + * Delete a media item + * + *

Delete a single media from a metadata item in the library + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteMediaItemResponse> - The async response + */ + public CompletableFuture deleteMediaItem(DeleteMediaItemRequest request) { + AsyncRequestOperation operation + = new DeleteMediaItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get BIF index for a part + * + *

Get BIF index for a part by index type + * + * @return The async call builder + */ + public GetPartIndexRequestBuilder getPartIndex() { + return new GetPartIndexRequestBuilder(sdkConfiguration); + } + + /** + * Get BIF index for a part + * + *

Get BIF index for a part by index type + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPartIndexResponse> - The async response + */ + public CompletableFuture getPartIndex(GetPartIndexRequest request) { + AsyncRequestOperation operation + = new GetPartIndex.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a collection + * + *

Delete a library collection from the PMS + * + * @return The async call builder + */ + public DeleteCollectionRequestBuilder deleteCollection() { + return new DeleteCollectionRequestBuilder(sdkConfiguration); + } + + /** + * Delete a collection + * + *

Delete a library collection from the PMS + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteCollectionResponse> - The async response + */ + public CompletableFuture deleteCollection(DeleteCollectionRequest request) { + AsyncRequestOperation operation + = new DeleteCollection.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a section composite image + * + *

Get a composite image of images in this section + * + * @return The async call builder + */ + public GetSectionImageRequestBuilder getSectionImage() { + return new GetSectionImageRequestBuilder(sdkConfiguration); + } + + /** + * Get a section composite image + * + *

Get a composite image of images in this section + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSectionImageResponse> - The async response + */ + public CompletableFuture getSectionImage(GetSectionImageRequest request) { + AsyncRequestOperation operation + = new GetSectionImage.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a stream + * + *

Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled. + * + * @return The async call builder + */ + public DeleteStreamRequestBuilder deleteStream() { + return new DeleteStreamRequestBuilder(sdkConfiguration); + } + + /** + * Delete a stream + * + *

Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteStreamResponse> - The async response + */ + public CompletableFuture deleteStream(DeleteStreamRequest request) { + AsyncRequestOperation operation + = new DeleteStream.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a stream + * + *

Get a stream (such as a sidecar subtitle stream) + * + * @return The async call builder + */ + public GetStreamRequestBuilder getStream() { + return new GetStreamRequestBuilder(sdkConfiguration); + } + + /** + * Get a stream + * + *

Get a stream (such as a sidecar subtitle stream) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetStreamResponse> - The async response + */ + public CompletableFuture getStream(GetStreamRequest request) { + AsyncRequestOperation operation + = new GetStream.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Set a stream offset + * + *

Set a stream offset in ms. This may not be respected by all clients + * + * @return The async call builder + */ + public SetStreamOffsetRequestBuilder setStreamOffset() { + return new SetStreamOffsetRequestBuilder(sdkConfiguration); + } + + /** + * Set a stream offset + * + *

Set a stream offset in ms. This may not be respected by all clients + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SetStreamOffsetResponse> - The async response + */ + public CompletableFuture setStreamOffset(SetStreamOffsetRequest request) { + AsyncRequestOperation operation + = new SetStreamOffset.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get an item's artwork, theme, etc + * + *

Get the artwork, thumb, element for a metadata item + * + * @return The async call builder + */ + public GetItemArtworkRequestBuilder getItemArtwork() { + return new GetItemArtworkRequestBuilder(sdkConfiguration); + } + + /** + * Get an item's artwork, theme, etc + * + *

Get the artwork, thumb, element for a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetItemArtworkResponse> - The async response + */ + public CompletableFuture getItemArtwork(GetItemArtworkRequest request) { + AsyncRequestOperation operation + = new GetItemArtwork.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a media part + * + *

Get a media part for streaming or download. + * - streaming: This is the default scenario. Bandwidth usage on this endpoint will be guaranteed (on the server's end) to be at least the bandwidth reservation given in the decision. If no decision exists, an ad-hoc decision will be created if sufficient bandwidth exists. Clients should not rely on ad-hoc decisions being made as this may be removed in the future. + * - download: Indicated if the query parameter indicates this is a download. Bandwidth will be prioritized behind playbacks and will get a fair share of what remains. + * + * @return The async call builder + */ + public GetMediaPartRequestBuilder getMediaPart() { + return new GetMediaPartRequestBuilder(sdkConfiguration); + } + + /** + * Get a media part + * + *

Get a media part for streaming or download. + * - streaming: This is the default scenario. Bandwidth usage on this endpoint will be guaranteed (on the server's end) to be at least the bandwidth reservation given in the decision. If no decision exists, an ad-hoc decision will be created if sufficient bandwidth exists. Clients should not rely on ad-hoc decisions being made as this may be removed in the future. + * - download: Indicated if the query parameter indicates this is a download. Bandwidth will be prioritized behind playbacks and will get a fair share of what remains. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetMediaPartResponse> - The async response + */ + public CompletableFuture getMediaPart(GetMediaPartRequest request) { + AsyncRequestOperation operation + = new GetMediaPart.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get an image from part BIF + * + *

Extract an image from the BIF for a part at a particular offset + * + * @return The async call builder + */ + public GetImageFromBifRequestBuilder getImageFromBif() { + return new GetImageFromBifRequestBuilder(sdkConfiguration); + } + + /** + * Get an image from part BIF + * + *

Extract an image from the BIF for a part at a particular offset + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetImageFromBifResponse> - The async response + */ + public CompletableFuture getImageFromBif(GetImageFromBifRequest request) { + AsyncRequestOperation operation + = new GetImageFromBif.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } diff --git a/src/main/java/dev/plexapi/sdk/AsyncLibraryCollections.java b/src/main/java/dev/plexapi/sdk/AsyncLibraryCollections.java new file mode 100644 index 00000000..32335884 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncLibraryCollections.java @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.AddCollectionItemsRequest; +import dev.plexapi.sdk.models.operations.DeleteCollectionItemRequest; +import dev.plexapi.sdk.models.operations.MoveCollectionItemRequest; +import dev.plexapi.sdk.models.operations.async.AddCollectionItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddCollectionItemsResponse; +import dev.plexapi.sdk.models.operations.async.DeleteCollectionItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteCollectionItemResponse; +import dev.plexapi.sdk.models.operations.async.MoveCollectionItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.MoveCollectionItemResponse; +import dev.plexapi.sdk.operations.AddCollectionItems; +import dev.plexapi.sdk.operations.DeleteCollectionItem; +import dev.plexapi.sdk.operations.MoveCollectionItem; +import java.util.concurrent.CompletableFuture; + +/** + * Endpoints for manipulating collections. In addition to these endpoints, `/library/collections/:collectionId/X` will be rerouted to `/library/metadata/:collectionId/X` and respond to those endpoints as well. + */ +public class AsyncLibraryCollections { + private final SDKConfiguration sdkConfiguration; + private final LibraryCollections syncSDK; + + AsyncLibraryCollections(LibraryCollections syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public LibraryCollections sync() { + return syncSDK; + } + + + /** + * Add items to a collection + * + *

Add items to a collection by uri + * + * @return The async call builder + */ + public AddCollectionItemsRequestBuilder addCollectionItems() { + return new AddCollectionItemsRequestBuilder(sdkConfiguration); + } + + /** + * Add items to a collection + * + *

Add items to a collection by uri + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddCollectionItemsResponse> - The async response + */ + public CompletableFuture addCollectionItems(AddCollectionItemsRequest request) { + AsyncRequestOperation operation + = new AddCollectionItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete an item from a collection + * + *

Delete an item from a collection + * + * @return The async call builder + */ + public DeleteCollectionItemRequestBuilder deleteCollectionItem() { + return new DeleteCollectionItemRequestBuilder(sdkConfiguration); + } + + /** + * Delete an item from a collection + * + *

Delete an item from a collection + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteCollectionItemResponse> - The async response + */ + public CompletableFuture deleteCollectionItem(DeleteCollectionItemRequest request) { + AsyncRequestOperation operation + = new DeleteCollectionItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Reorder an item in the collection + * + *

Reorder items in a collection with one item after another + * + * @return The async call builder + */ + public MoveCollectionItemRequestBuilder moveCollectionItem() { + return new MoveCollectionItemRequestBuilder(sdkConfiguration); + } + + /** + * Reorder an item in the collection + * + *

Reorder items in a collection with one item after another + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<MoveCollectionItemResponse> - The async response + */ + public CompletableFuture moveCollectionItem(MoveCollectionItemRequest request) { + AsyncRequestOperation operation + = new MoveCollectionItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncLibraryPlaylists.java b/src/main/java/dev/plexapi/sdk/AsyncLibraryPlaylists.java new file mode 100644 index 00000000..917ed967 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncLibraryPlaylists.java @@ -0,0 +1,403 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.AddPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.ClearPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.CreatePlaylistRequest; +import dev.plexapi.sdk.models.operations.DeletePlaylistItemRequest; +import dev.plexapi.sdk.models.operations.DeletePlaylistRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsRequest; +import dev.plexapi.sdk.models.operations.MovePlaylistItemRequest; +import dev.plexapi.sdk.models.operations.RefreshPlaylistRequest; +import dev.plexapi.sdk.models.operations.UpdatePlaylistRequest; +import dev.plexapi.sdk.models.operations.UploadPlaylistRequest; +import dev.plexapi.sdk.models.operations.async.AddPlaylistItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddPlaylistItemsResponse; +import dev.plexapi.sdk.models.operations.async.ClearPlaylistItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ClearPlaylistItemsResponse; +import dev.plexapi.sdk.models.operations.async.CreatePlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CreatePlaylistResponse; +import dev.plexapi.sdk.models.operations.async.DeletePlaylistItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeletePlaylistItemResponse; +import dev.plexapi.sdk.models.operations.async.DeletePlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeletePlaylistResponse; +import dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorItemsResponse; +import dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorResponse; +import dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorsResponse; +import dev.plexapi.sdk.models.operations.async.MovePlaylistItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.MovePlaylistItemResponse; +import dev.plexapi.sdk.models.operations.async.RefreshPlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.async.RefreshPlaylistResponse; +import dev.plexapi.sdk.models.operations.async.UpdatePlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.async.UpdatePlaylistResponse; +import dev.plexapi.sdk.models.operations.async.UploadPlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.async.UploadPlaylistResponse; +import dev.plexapi.sdk.operations.AddPlaylistItems; +import dev.plexapi.sdk.operations.ClearPlaylistItems; +import dev.plexapi.sdk.operations.CreatePlaylist; +import dev.plexapi.sdk.operations.DeletePlaylist; +import dev.plexapi.sdk.operations.DeletePlaylistItem; +import dev.plexapi.sdk.operations.GetPlaylistGenerator; +import dev.plexapi.sdk.operations.GetPlaylistGeneratorItems; +import dev.plexapi.sdk.operations.GetPlaylistGenerators; +import dev.plexapi.sdk.operations.MovePlaylistItem; +import dev.plexapi.sdk.operations.RefreshPlaylist; +import dev.plexapi.sdk.operations.UpdatePlaylist; +import dev.plexapi.sdk.operations.UploadPlaylist; +import java.util.concurrent.CompletableFuture; + +/** + * Endpoints for manipulating playlists. + */ +public class AsyncLibraryPlaylists { + private final SDKConfiguration sdkConfiguration; + private final LibraryPlaylists syncSDK; + + AsyncLibraryPlaylists(LibraryPlaylists syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public LibraryPlaylists sync() { + return syncSDK; + } + + + /** + * Create a Playlist + * + *

Create a new playlist. By default the playlist is blank. + * + * @return The async call builder + */ + public CreatePlaylistRequestBuilder createPlaylist() { + return new CreatePlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Create a Playlist + * + *

Create a new playlist. By default the playlist is blank. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CreatePlaylistResponse> - The async response + */ + public CompletableFuture createPlaylist(CreatePlaylistRequest request) { + AsyncRequestOperation operation + = new CreatePlaylist.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Upload + * + *

Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + * + * @return The async call builder + */ + public UploadPlaylistRequestBuilder uploadPlaylist() { + return new UploadPlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Upload + * + *

Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<UploadPlaylistResponse> - The async response + */ + public CompletableFuture uploadPlaylist(UploadPlaylistRequest request) { + AsyncRequestOperation operation + = new UploadPlaylist.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a Playlist + * + *

Deletes a playlist by provided id + * + * @return The async call builder + */ + public DeletePlaylistRequestBuilder deletePlaylist() { + return new DeletePlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Delete a Playlist + * + *

Deletes a playlist by provided id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeletePlaylistResponse> - The async response + */ + public CompletableFuture deletePlaylist(DeletePlaylistRequest request) { + AsyncRequestOperation operation + = new DeletePlaylist.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Editing a Playlist + * + *

Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem) + * + * @return The async call builder + */ + public UpdatePlaylistRequestBuilder updatePlaylist() { + return new UpdatePlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Editing a Playlist + * + *

Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<UpdatePlaylistResponse> - The async response + */ + public CompletableFuture updatePlaylist(UpdatePlaylistRequest request) { + AsyncRequestOperation operation + = new UpdatePlaylist.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a playlist's generators + * + *

Get all the generators in a playlist + * + * @return The async call builder + */ + public GetPlaylistGeneratorsRequestBuilder getPlaylistGenerators() { + return new GetPlaylistGeneratorsRequestBuilder(sdkConfiguration); + } + + /** + * Get a playlist's generators + * + *

Get all the generators in a playlist + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPlaylistGeneratorsResponse> - The async response + */ + public CompletableFuture getPlaylistGenerators(GetPlaylistGeneratorsRequest request) { + AsyncRequestOperation operation + = new GetPlaylistGenerators.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Clearing a playlist + * + *

Clears a playlist, only works with dumb playlists. Returns the playlist. + * + * @return The async call builder + */ + public ClearPlaylistItemsRequestBuilder clearPlaylistItems() { + return new ClearPlaylistItemsRequestBuilder(sdkConfiguration); + } + + /** + * Clearing a playlist + * + *

Clears a playlist, only works with dumb playlists. Returns the playlist. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ClearPlaylistItemsResponse> - The async response + */ + public CompletableFuture clearPlaylistItems(ClearPlaylistItemsRequest request) { + AsyncRequestOperation operation + = new ClearPlaylistItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Adding to a Playlist + * + *

Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + * + * @return The async call builder + */ + public AddPlaylistItemsRequestBuilder addPlaylistItems() { + return new AddPlaylistItemsRequestBuilder(sdkConfiguration); + } + + /** + * Adding to a Playlist + * + *

Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddPlaylistItemsResponse> - The async response + */ + public CompletableFuture addPlaylistItems(AddPlaylistItemsRequest request) { + AsyncRequestOperation operation + = new AddPlaylistItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a Generator + * + *

Deletes an item from a playlist. Only works with dumb playlists. + * + * @return The async call builder + */ + public DeletePlaylistItemRequestBuilder deletePlaylistItem() { + return new DeletePlaylistItemRequestBuilder(sdkConfiguration); + } + + /** + * Delete a Generator + * + *

Deletes an item from a playlist. Only works with dumb playlists. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeletePlaylistItemResponse> - The async response + */ + public CompletableFuture deletePlaylistItem(DeletePlaylistItemRequest request) { + AsyncRequestOperation operation + = new DeletePlaylistItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a playlist generator + * + *

Get a playlist's generator. Only used for optimized versions + * + * @return The async call builder + */ + public GetPlaylistGeneratorRequestBuilder getPlaylistGenerator() { + return new GetPlaylistGeneratorRequestBuilder(sdkConfiguration); + } + + /** + * Get a playlist generator + * + *

Get a playlist's generator. Only used for optimized versions + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPlaylistGeneratorResponse> - The async response + */ + public CompletableFuture getPlaylistGenerator(GetPlaylistGeneratorRequest request) { + AsyncRequestOperation operation + = new GetPlaylistGenerator.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a playlist generator's items + * + *

Get a playlist generator's items + * + * @return The async call builder + */ + public GetPlaylistGeneratorItemsRequestBuilder getPlaylistGeneratorItems() { + return new GetPlaylistGeneratorItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get a playlist generator's items + * + *

Get a playlist generator's items + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPlaylistGeneratorItemsResponse> - The async response + */ + public CompletableFuture getPlaylistGeneratorItems(GetPlaylistGeneratorItemsRequest request) { + AsyncRequestOperation operation + = new GetPlaylistGeneratorItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Moving items in a playlist + * + *

Moves an item in a playlist. Only works with dumb playlists. + * + * @return The async call builder + */ + public MovePlaylistItemRequestBuilder movePlaylistItem() { + return new MovePlaylistItemRequestBuilder(sdkConfiguration); + } + + /** + * Moving items in a playlist + * + *

Moves an item in a playlist. Only works with dumb playlists. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<MovePlaylistItemResponse> - The async response + */ + public CompletableFuture movePlaylistItem(MovePlaylistItemRequest request) { + AsyncRequestOperation operation + = new MovePlaylistItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Reprocess a generator + * + *

Make a generator reprocess (refresh) + * + * @return The async call builder + */ + public RefreshPlaylistRequestBuilder refreshPlaylist() { + return new RefreshPlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Reprocess a generator + * + *

Make a generator reprocess (refresh) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<RefreshPlaylistResponse> - The async response + */ + public CompletableFuture refreshPlaylist(RefreshPlaylistRequest request) { + AsyncRequestOperation operation + = new RefreshPlaylist.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncLiveTV.java b/src/main/java/dev/plexapi/sdk/AsyncLiveTV.java new file mode 100644 index 00000000..4804fd22 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncLiveTV.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.GetLiveTVSessionRequest; +import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexRequest; +import dev.plexapi.sdk.models.operations.GetSessionSegmentRequest; +import dev.plexapi.sdk.models.operations.async.GetLiveTVSessionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetLiveTVSessionResponse; +import dev.plexapi.sdk.models.operations.async.GetSessionPlaylistIndexRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSessionPlaylistIndexResponse; +import dev.plexapi.sdk.models.operations.async.GetSessionSegmentRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSessionSegmentResponse; +import dev.plexapi.sdk.models.operations.async.GetSessionsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSessionsResponse; +import dev.plexapi.sdk.operations.GetLiveTVSession; +import dev.plexapi.sdk.operations.GetSessionPlaylistIndex; +import dev.plexapi.sdk.operations.GetSessionSegment; +import dev.plexapi.sdk.operations.GetSessions; +import java.util.concurrent.CompletableFuture; + +/** + * LiveTV contains the playback sessions of a channel from a DVR device + */ +public class AsyncLiveTV { + private final SDKConfiguration sdkConfiguration; + private final LiveTV syncSDK; + + AsyncLiveTV(LiveTV syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public LiveTV sync() { + return syncSDK; + } + + + /** + * Get all sessions + * + *

Get all livetv sessions and metadata + * + * @return The async call builder + */ + public GetSessionsRequestBuilder getSessions() { + return new GetSessionsRequestBuilder(sdkConfiguration); + } + + /** + * Get all sessions + * + *

Get all livetv sessions and metadata + * + * @return CompletableFuture<GetSessionsResponse> - The async response + */ + public CompletableFuture getSessionsDirect() { + AsyncRequestlessOperation operation + = new GetSessions.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Get a single session + * + *

Get a single livetv session and metadata + * + * @return The async call builder + */ + public GetLiveTVSessionRequestBuilder getLiveTVSession() { + return new GetLiveTVSessionRequestBuilder(sdkConfiguration); + } + + /** + * Get a single session + * + *

Get a single livetv session and metadata + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetLiveTVSessionResponse> - The async response + */ + public CompletableFuture getLiveTVSession(GetLiveTVSessionRequest request) { + AsyncRequestOperation operation + = new GetLiveTVSession.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a session playlist index + * + *

Get a playlist index for playing this session + * + * @return The async call builder + */ + public GetSessionPlaylistIndexRequestBuilder getSessionPlaylistIndex() { + return new GetSessionPlaylistIndexRequestBuilder(sdkConfiguration); + } + + /** + * Get a session playlist index + * + *

Get a playlist index for playing this session + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSessionPlaylistIndexResponse> - The async response + */ + public CompletableFuture getSessionPlaylistIndex(GetSessionPlaylistIndexRequest request) { + AsyncRequestOperation operation + = new GetSessionPlaylistIndex.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a single session segment + * + *

Get a single LiveTV session segment + * + * @return The async call builder + */ + public GetSessionSegmentRequestBuilder getSessionSegment() { + return new GetSessionSegmentRequestBuilder(sdkConfiguration); + } + + /** + * Get a single session segment + * + *

Get a single LiveTV session segment + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSessionSegmentResponse> - The async response + */ + public CompletableFuture getSessionSegment(GetSessionSegmentRequest request) { + AsyncRequestOperation operation + = new GetSessionSegment.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncLog.java b/src/main/java/dev/plexapi/sdk/AsyncLog.java index 110f8a82..5a9736da 100644 --- a/src/main/java/dev/plexapi/sdk/AsyncLog.java +++ b/src/main/java/dev/plexapi/sdk/AsyncLog.java @@ -4,24 +4,22 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; -import dev.plexapi.sdk.models.operations.Level; -import dev.plexapi.sdk.models.operations.LogLineRequest; -import dev.plexapi.sdk.models.operations.async.EnablePaperTrailRequestBuilder; -import dev.plexapi.sdk.models.operations.async.EnablePaperTrailResponse; -import dev.plexapi.sdk.models.operations.async.LogLineRequestBuilder; -import dev.plexapi.sdk.models.operations.async.LogLineResponse; -import dev.plexapi.sdk.models.operations.async.LogMultiLineRequestBuilder; -import dev.plexapi.sdk.models.operations.async.LogMultiLineResponse; -import dev.plexapi.sdk.operations.EnablePaperTrail; -import dev.plexapi.sdk.operations.LogLine; -import dev.plexapi.sdk.operations.LogMultiLine; -import java.lang.String; +import dev.plexapi.sdk.models.operations.EnablePapertrailRequest; +import dev.plexapi.sdk.models.operations.WriteMessageRequest; +import dev.plexapi.sdk.models.operations.async.EnablePapertrailRequestBuilder; +import dev.plexapi.sdk.models.operations.async.EnablePapertrailResponse; +import dev.plexapi.sdk.models.operations.async.WriteLogRequestBuilder; +import dev.plexapi.sdk.models.operations.async.WriteLogResponse; +import dev.plexapi.sdk.models.operations.async.WriteMessageRequestBuilder; +import dev.plexapi.sdk.models.operations.async.WriteMessageResponse; +import dev.plexapi.sdk.operations.EnablePapertrail; +import dev.plexapi.sdk.operations.WriteLog; +import dev.plexapi.sdk.operations.WriteMessage; import java.util.concurrent.CompletableFuture; /** - * Submit logs to the Log Handler for Plex Media Server + * Logging mechanism to allow clients to log to the server */ public class AsyncLog { private final SDKConfiguration sdkConfiguration; @@ -43,111 +41,58 @@ public class AsyncLog { /** - * Logging a single line message. + * Logging a multi-line message to the Plex Media Server log * - *

This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + *

This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. * * @return The async call builder */ - public LogLineRequestBuilder logLine() { - return new LogLineRequestBuilder(sdkConfiguration); + public WriteLogRequestBuilder writeLog() { + return new WriteLogRequestBuilder(sdkConfiguration); } /** - * Logging a single line message. + * Logging a multi-line message to the Plex Media Server log * - *

This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. - * - * @param level An integer log level to write to the PMS log with. - * 0: Error - * 1: Warning - * 2: Info - * 3: Debug - * 4: Verbose - * - * @param message The text of the message to write to the log. - * @param source a string indicating the source of the message. - * @return CompletableFuture<LogLineResponse> - The async response - */ - public CompletableFuture logLine( - Level level, String message, - String source) { - LogLineRequest request = - LogLineRequest - .builder() - .level(level) - .message(message) - .source(source) - .build(); - AsyncRequestOperation operation - = new LogLine.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Logging a multi-line message - * - *

This endpoint allows for the batch addition of log entries to the main Plex Media Server log. - * It accepts a text/plain request body, where each line represents a distinct log entry. - * Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. - * - *

Log entries are separated by a newline character (`\n`). - * Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. - * This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. - * - *

The 'level' parameter specifies the log entry's severity or importance, with the following integer values: - * - `0`: Error - Critical issues that require immediate attention. - * - `1`: Warning - Important events that are not critical but may indicate potential issues. - * - `2`: Info - General informational messages about system operation. - * - `3`: Debug - Detailed information useful for debugging purposes. - * - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. - * - *

The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). - * - *

Example of a single log entry format: - * `level=4&message=Sample%20log%20entry&source=applicationName` - * - *

Ensure each parameter is properly URL-encoded to avoid interpretation issues. - * - * @return The async call builder - */ - public LogMultiLineRequestBuilder logMultiLine() { - return new LogMultiLineRequestBuilder(sdkConfiguration); - } - - /** - * Logging a multi-line message - * - *

This endpoint allows for the batch addition of log entries to the main Plex Media Server log. - * It accepts a text/plain request body, where each line represents a distinct log entry. - * Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. - * - *

Log entries are separated by a newline character (`\n`). - * Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. - * This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. - * - *

The 'level' parameter specifies the log entry's severity or importance, with the following integer values: - * - `0`: Error - Critical issues that require immediate attention. - * - `1`: Warning - Important events that are not critical but may indicate potential issues. - * - `2`: Info - General informational messages about system operation. - * - `3`: Debug - Detailed information useful for debugging purposes. - * - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. - * - *

The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). - * - *

Example of a single log entry format: - * `level=4&message=Sample%20log%20entry&source=applicationName` - * - *

Ensure each parameter is properly URL-encoded to avoid interpretation issues. + *

This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. * * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<LogMultiLineResponse> - The async response + * @return CompletableFuture<WriteLogResponse> - The async response */ - public CompletableFuture logMultiLine(String request) { - AsyncRequestOperation operation - = new LogMultiLine.Async(sdkConfiguration); + public CompletableFuture writeLog(byte[] request) { + AsyncRequestOperation operation + = new WriteLog.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Logging a single-line message to the Plex Media Server log + * + *

This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + * + *

Note: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred + * + * @return The async call builder + */ + public WriteMessageRequestBuilder writeMessage() { + return new WriteMessageRequestBuilder(sdkConfiguration); + } + + /** + * Logging a single-line message to the Plex Media Server log + * + *

This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + * + *

Note: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<WriteMessageResponse> - The async response + */ + public CompletableFuture writeMessage(WriteMessageRequest request) { + AsyncRequestOperation operation + = new WriteMessage.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } @@ -156,25 +101,30 @@ public class AsyncLog { /** * Enabling Papertrail * - *

This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. + *

This endpoint will enable all Plex Media Server logs to be sent to the Papertrail networked logging site for a period of time + * + *

Note: This endpoint responds to all HTTP verbs but POST is preferred * * @return The async call builder */ - public EnablePaperTrailRequestBuilder enablePaperTrail() { - return new EnablePaperTrailRequestBuilder(sdkConfiguration); + public EnablePapertrailRequestBuilder enablePapertrail() { + return new EnablePapertrailRequestBuilder(sdkConfiguration); } /** * Enabling Papertrail * - *

This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. + *

This endpoint will enable all Plex Media Server logs to be sent to the Papertrail networked logging site for a period of time * - * @return CompletableFuture<EnablePaperTrailResponse> - The async response + *

Note: This endpoint responds to all HTTP verbs but POST is preferred + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<EnablePapertrailResponse> - The async response */ - public CompletableFuture enablePaperTrailDirect() { - AsyncRequestlessOperation operation - = new EnablePaperTrail.Async(sdkConfiguration); - return operation.doRequest() + public CompletableFuture enablePapertrail(EnablePapertrailRequest request) { + AsyncRequestOperation operation + = new EnablePapertrail.Async(sdkConfiguration); + return operation.doRequest(request) .thenCompose(operation::handleResponse); } diff --git a/src/main/java/dev/plexapi/sdk/AsyncMedia.java b/src/main/java/dev/plexapi/sdk/AsyncMedia.java deleted file mode 100644 index cec32df2..00000000 --- a/src/main/java/dev/plexapi/sdk/AsyncMedia.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.models.operations.GetBannerImageRequest; -import dev.plexapi.sdk.models.operations.GetThumbImageRequest; -import dev.plexapi.sdk.models.operations.MarkPlayedRequest; -import dev.plexapi.sdk.models.operations.MarkUnplayedRequest; -import dev.plexapi.sdk.models.operations.UpdatePlayProgressRequest; -import dev.plexapi.sdk.models.operations.async.GetBannerImageRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetBannerImageResponse; -import dev.plexapi.sdk.models.operations.async.GetThumbImageRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetThumbImageResponse; -import dev.plexapi.sdk.models.operations.async.MarkPlayedRequestBuilder; -import dev.plexapi.sdk.models.operations.async.MarkPlayedResponse; -import dev.plexapi.sdk.models.operations.async.MarkUnplayedRequestBuilder; -import dev.plexapi.sdk.models.operations.async.MarkUnplayedResponse; -import dev.plexapi.sdk.models.operations.async.UpdatePlayProgressRequestBuilder; -import dev.plexapi.sdk.models.operations.async.UpdatePlayProgressResponse; -import dev.plexapi.sdk.operations.GetBannerImage; -import dev.plexapi.sdk.operations.GetThumbImage; -import dev.plexapi.sdk.operations.MarkPlayed; -import dev.plexapi.sdk.operations.MarkUnplayed; -import dev.plexapi.sdk.operations.UpdatePlayProgress; -import java.lang.String; -import java.util.concurrent.CompletableFuture; - -/** - * API Calls interacting with Plex Media Server Media - */ -public class AsyncMedia { - private final SDKConfiguration sdkConfiguration; - private final Media syncSDK; - - AsyncMedia(Media syncSDK, SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.syncSDK = syncSDK; - } - - /** - * Switches to the sync SDK. - * - * @return The sync SDK - */ - public Media sync() { - return syncSDK; - } - - - /** - * Mark Media Played - * - *

This will mark the provided media key as Played. - * - * @return The async call builder - */ - public MarkPlayedRequestBuilder markPlayed() { - return new MarkPlayedRequestBuilder(sdkConfiguration); - } - - /** - * Mark Media Played - * - *

This will mark the provided media key as Played. - * - * @param key The media key to mark as played - * @return CompletableFuture<MarkPlayedResponse> - The async response - */ - public CompletableFuture markPlayed(double key) { - MarkPlayedRequest request = - MarkPlayedRequest - .builder() - .key(key) - .build(); - AsyncRequestOperation operation - = new MarkPlayed.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Mark Media Unplayed - * - *

This will mark the provided media key as Unplayed. - * - * @return The async call builder - */ - public MarkUnplayedRequestBuilder markUnplayed() { - return new MarkUnplayedRequestBuilder(sdkConfiguration); - } - - /** - * Mark Media Unplayed - * - *

This will mark the provided media key as Unplayed. - * - * @param key The media key to mark as Unplayed - * @return CompletableFuture<MarkUnplayedResponse> - The async response - */ - public CompletableFuture markUnplayed(double key) { - MarkUnplayedRequest request = - MarkUnplayedRequest - .builder() - .key(key) - .build(); - AsyncRequestOperation operation - = new MarkUnplayed.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Update Media Play Progress - * - *

This API command can be used to update the play progress of a media item. - * - * @return The async call builder - */ - public UpdatePlayProgressRequestBuilder updatePlayProgress() { - return new UpdatePlayProgressRequestBuilder(sdkConfiguration); - } - - /** - * Update Media Play Progress - * - *

This API command can be used to update the play progress of a media item. - * - * @param key the media key - * @param time The time, in milliseconds, used to set the media playback progress. - * @param state The playback state of the media item. - * @return CompletableFuture<UpdatePlayProgressResponse> - The async response - */ - public CompletableFuture updatePlayProgress( - String key, double time, - String state) { - UpdatePlayProgressRequest request = - UpdatePlayProgressRequest - .builder() - .key(key) - .time(time) - .state(state) - .build(); - AsyncRequestOperation operation - = new UpdatePlayProgress.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Banner Image - * - *

Gets the banner image of the media item - * - * @return The async call builder - */ - public GetBannerImageRequestBuilder getBannerImage() { - return new GetBannerImageRequestBuilder(sdkConfiguration); - } - - /** - * Get Banner Image - * - *

Gets the banner image of the media item - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetBannerImageResponse> - The async response - */ - public CompletableFuture getBannerImage(GetBannerImageRequest request) { - AsyncRequestOperation operation - = new GetBannerImage.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Thumb Image - * - *

Gets the thumbnail image of the media item - * - * @return The async call builder - */ - public GetThumbImageRequestBuilder getThumbImage() { - return new GetThumbImageRequestBuilder(sdkConfiguration); - } - - /** - * Get Thumb Image - * - *

Gets the thumbnail image of the media item - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetThumbImageResponse> - The async response - */ - public CompletableFuture getThumbImage(GetThumbImageRequest request) { - AsyncRequestOperation operation - = new GetThumbImage.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/AsyncPlayQueue.java b/src/main/java/dev/plexapi/sdk/AsyncPlayQueue.java new file mode 100644 index 00000000..c8eee864 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncPlayQueue.java @@ -0,0 +1,317 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.AddToPlayQueueRequest; +import dev.plexapi.sdk.models.operations.ClearPlayQueueRequest; +import dev.plexapi.sdk.models.operations.CreatePlayQueueRequest; +import dev.plexapi.sdk.models.operations.DeletePlayQueueItemRequest; +import dev.plexapi.sdk.models.operations.GetPlayQueueRequest; +import dev.plexapi.sdk.models.operations.MovePlayQueueItemRequest; +import dev.plexapi.sdk.models.operations.ResetPlayQueueRequest; +import dev.plexapi.sdk.models.operations.ShuffleRequest; +import dev.plexapi.sdk.models.operations.UnshuffleRequest; +import dev.plexapi.sdk.models.operations.async.AddToPlayQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddToPlayQueueResponse; +import dev.plexapi.sdk.models.operations.async.ClearPlayQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ClearPlayQueueResponse; +import dev.plexapi.sdk.models.operations.async.CreatePlayQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CreatePlayQueueResponse; +import dev.plexapi.sdk.models.operations.async.DeletePlayQueueItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeletePlayQueueItemResponse; +import dev.plexapi.sdk.models.operations.async.GetPlayQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPlayQueueResponse; +import dev.plexapi.sdk.models.operations.async.MovePlayQueueItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.MovePlayQueueItemResponse; +import dev.plexapi.sdk.models.operations.async.ResetPlayQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ResetPlayQueueResponse; +import dev.plexapi.sdk.models.operations.async.ShuffleRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ShuffleResponse; +import dev.plexapi.sdk.models.operations.async.UnshuffleRequestBuilder; +import dev.plexapi.sdk.models.operations.async.UnshuffleResponse; +import dev.plexapi.sdk.operations.AddToPlayQueue; +import dev.plexapi.sdk.operations.ClearPlayQueue; +import dev.plexapi.sdk.operations.CreatePlayQueue; +import dev.plexapi.sdk.operations.DeletePlayQueueItem; +import dev.plexapi.sdk.operations.GetPlayQueue; +import dev.plexapi.sdk.operations.MovePlayQueueItem; +import dev.plexapi.sdk.operations.ResetPlayQueue; +import dev.plexapi.sdk.operations.Shuffle; +import dev.plexapi.sdk.operations.Unshuffle; +import java.util.concurrent.CompletableFuture; + +/** + * The playqueue feature within a media provider + * A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue. + * Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by `playQueueLastAddedItemID` existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed. + * You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion. + * All created play queues will have an empty "Up Next" area - unless the item is an album and no `key` is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set `key`. This is due to the above implicit queueing of albums when no `key` is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area. + * The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item. + */ +public class AsyncPlayQueue { + private final SDKConfiguration sdkConfiguration; + private final PlayQueue syncSDK; + + AsyncPlayQueue(PlayQueue syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public PlayQueue sync() { + return syncSDK; + } + + + /** + * Create a play queue + * + *

Makes a new play queue for a device. The source of the playqueue can either be a URI, or a playlist. The response is a media container with the initial items in the queue. Each item in the queue will be a regular item but with `playQueueItemID` - a unique ID since the queue could have repeated items with the same `ratingKey`. + * Note: Either `uri` or `playlistID` must be specified + * + * @return The async call builder + */ + public CreatePlayQueueRequestBuilder createPlayQueue() { + return new CreatePlayQueueRequestBuilder(sdkConfiguration); + } + + /** + * Create a play queue + * + *

Makes a new play queue for a device. The source of the playqueue can either be a URI, or a playlist. The response is a media container with the initial items in the queue. Each item in the queue will be a regular item but with `playQueueItemID` - a unique ID since the queue could have repeated items with the same `ratingKey`. + * Note: Either `uri` or `playlistID` must be specified + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CreatePlayQueueResponse> - The async response + */ + public CompletableFuture createPlayQueue(CreatePlayQueueRequest request) { + AsyncRequestOperation operation + = new CreatePlayQueue.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Retrieve a play queue + * + *

Retrieves the play queue, centered at current item. This can be treated as a regular container by play queue-oblivious clients, but they may wish to request a large window onto the queue since they won't know to refresh. + * + * @return The async call builder + */ + public GetPlayQueueRequestBuilder getPlayQueue() { + return new GetPlayQueueRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve a play queue + * + *

Retrieves the play queue, centered at current item. This can be treated as a regular container by play queue-oblivious clients, but they may wish to request a large window onto the queue since they won't know to refresh. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPlayQueueResponse> - The async response + */ + public CompletableFuture getPlayQueue(GetPlayQueueRequest request) { + AsyncRequestOperation operation + = new GetPlayQueue.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Add a generator or playlist to a play queue + * + *

Adds an item to a play queue (e.g. party mode). Increments the version of the play queue. Takes the following parameters (`uri` and `playlistID` are mutually exclusive). Returns the modified play queue. + * + * @return The async call builder + */ + public AddToPlayQueueRequestBuilder addToPlayQueue() { + return new AddToPlayQueueRequestBuilder(sdkConfiguration); + } + + /** + * Add a generator or playlist to a play queue + * + *

Adds an item to a play queue (e.g. party mode). Increments the version of the play queue. Takes the following parameters (`uri` and `playlistID` are mutually exclusive). Returns the modified play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddToPlayQueueResponse> - The async response + */ + public CompletableFuture addToPlayQueue(AddToPlayQueueRequest request) { + AsyncRequestOperation operation + = new AddToPlayQueue.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Clear a play queue + * + *

Deletes all items in the play queue, and increases the version of the play queue. + * + * @return The async call builder + */ + public ClearPlayQueueRequestBuilder clearPlayQueue() { + return new ClearPlayQueueRequestBuilder(sdkConfiguration); + } + + /** + * Clear a play queue + * + *

Deletes all items in the play queue, and increases the version of the play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ClearPlayQueueResponse> - The async response + */ + public CompletableFuture clearPlayQueue(ClearPlayQueueRequest request) { + AsyncRequestOperation operation + = new ClearPlayQueue.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Reset a play queue + * + *

Reset a play queue to the first item being the current item + * + * @return The async call builder + */ + public ResetPlayQueueRequestBuilder resetPlayQueue() { + return new ResetPlayQueueRequestBuilder(sdkConfiguration); + } + + /** + * Reset a play queue + * + *

Reset a play queue to the first item being the current item + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ResetPlayQueueResponse> - The async response + */ + public CompletableFuture resetPlayQueue(ResetPlayQueueRequest request) { + AsyncRequestOperation operation + = new ResetPlayQueue.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Shuffle a play queue + * + *

Shuffle a play queue (or reshuffles if already shuffled). The currently selected item is maintained. Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + * + * @return The async call builder + */ + public ShuffleRequestBuilder shuffle() { + return new ShuffleRequestBuilder(sdkConfiguration); + } + + /** + * Shuffle a play queue + * + *

Shuffle a play queue (or reshuffles if already shuffled). The currently selected item is maintained. Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ShuffleResponse> - The async response + */ + public CompletableFuture shuffle(ShuffleRequest request) { + AsyncRequestOperation operation + = new Shuffle.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Unshuffle a play queue + * + *

Unshuffles a play queue and restores "natural order". Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + * + * @return The async call builder + */ + public UnshuffleRequestBuilder unshuffle() { + return new UnshuffleRequestBuilder(sdkConfiguration); + } + + /** + * Unshuffle a play queue + * + *

Unshuffles a play queue and restores "natural order". Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<UnshuffleResponse> - The async response + */ + public CompletableFuture unshuffle(UnshuffleRequest request) { + AsyncRequestOperation operation + = new Unshuffle.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete an item from a play queue + * + *

Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue. + * + * @return The async call builder + */ + public DeletePlayQueueItemRequestBuilder deletePlayQueueItem() { + return new DeletePlayQueueItemRequestBuilder(sdkConfiguration); + } + + /** + * Delete an item from a play queue + * + *

Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeletePlayQueueItemResponse> - The async response + */ + public CompletableFuture deletePlayQueueItem(DeletePlayQueueItemRequest request) { + AsyncRequestOperation operation + = new DeletePlayQueueItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Move an item in a play queue + * + *

Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue. + * + * @return The async call builder + */ + public MovePlayQueueItemRequestBuilder movePlayQueueItem() { + return new MovePlayQueueItemRequestBuilder(sdkConfiguration); + } + + /** + * Move an item in a play queue + * + *

Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<MovePlayQueueItemResponse> - The async response + */ + public CompletableFuture movePlayQueueItem(MovePlayQueueItemRequest request) { + AsyncRequestOperation operation + = new MovePlayQueueItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncPlaylist.java b/src/main/java/dev/plexapi/sdk/AsyncPlaylist.java new file mode 100644 index 00000000..1b20178f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncPlaylist.java @@ -0,0 +1,126 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.GetPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistRequest; +import dev.plexapi.sdk.models.operations.ListPlaylistsRequest; +import dev.plexapi.sdk.models.operations.async.GetPlaylistItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPlaylistItemsResponse; +import dev.plexapi.sdk.models.operations.async.GetPlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPlaylistResponse; +import dev.plexapi.sdk.models.operations.async.ListPlaylistsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListPlaylistsResponse; +import dev.plexapi.sdk.operations.GetPlaylist; +import dev.plexapi.sdk.operations.GetPlaylistItems; +import dev.plexapi.sdk.operations.ListPlaylists; +import java.util.concurrent.CompletableFuture; + +/** + * Media playlists that can be created and played back + */ +public class AsyncPlaylist { + private final SDKConfiguration sdkConfiguration; + private final Playlist syncSDK; + + AsyncPlaylist(Playlist syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Playlist sync() { + return syncSDK; + } + + + /** + * List playlists + * + *

Gets a list of playlists and playlist folders for a user. General filters are permitted, such as `sort=lastViewedAt:desc`. A flat playlist list can be retrieved using `type=15` to limit the collection to just playlists. + * + * @return The async call builder + */ + public ListPlaylistsRequestBuilder listPlaylists() { + return new ListPlaylistsRequestBuilder(sdkConfiguration); + } + + /** + * List playlists + * + *

Gets a list of playlists and playlist folders for a user. General filters are permitted, such as `sort=lastViewedAt:desc`. A flat playlist list can be retrieved using `type=15` to limit the collection to just playlists. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListPlaylistsResponse> - The async response + */ + public CompletableFuture listPlaylists(ListPlaylistsRequest request) { + AsyncRequestOperation operation + = new ListPlaylists.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Retrieve Playlist + * + *

Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: + * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + * + * @return The async call builder + */ + public GetPlaylistRequestBuilder getPlaylist() { + return new GetPlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve Playlist + * + *

Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: + * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPlaylistResponse> - The async response + */ + public CompletableFuture getPlaylist(GetPlaylistRequest request) { + AsyncRequestOperation operation + = new GetPlaylist.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Retrieve Playlist Contents + * + *

Gets the contents of a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + * + * @return The async call builder + */ + public GetPlaylistItemsRequestBuilder getPlaylistItems() { + return new GetPlaylistItemsRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve Playlist Contents + * + *

Gets the contents of a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPlaylistItemsResponse> - The async response + */ + public CompletableFuture getPlaylistItems(GetPlaylistItemsRequest request) { + AsyncRequestOperation operation + = new GetPlaylistItems.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncPlaylists.java b/src/main/java/dev/plexapi/sdk/AsyncPlaylists.java deleted file mode 100644 index f24f520e..00000000 --- a/src/main/java/dev/plexapi/sdk/AsyncPlaylists.java +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.models.operations.AddPlaylistContentsRequest; -import dev.plexapi.sdk.models.operations.ClearPlaylistContentsRequest; -import dev.plexapi.sdk.models.operations.CreatePlaylistRequest; -import dev.plexapi.sdk.models.operations.DeletePlaylistRequest; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsQueryParamType; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsRequest; -import dev.plexapi.sdk.models.operations.GetPlaylistRequest; -import dev.plexapi.sdk.models.operations.GetPlaylistsRequest; -import dev.plexapi.sdk.models.operations.PlaylistType; -import dev.plexapi.sdk.models.operations.QueryParamForce; -import dev.plexapi.sdk.models.operations.QueryParamSmart; -import dev.plexapi.sdk.models.operations.UpdatePlaylistRequest; -import dev.plexapi.sdk.models.operations.UploadPlaylistRequest; -import dev.plexapi.sdk.models.operations.async.AddPlaylistContentsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.AddPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.async.ClearPlaylistContentsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.ClearPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.async.CreatePlaylistRequestBuilder; -import dev.plexapi.sdk.models.operations.async.CreatePlaylistResponse; -import dev.plexapi.sdk.models.operations.async.DeletePlaylistRequestBuilder; -import dev.plexapi.sdk.models.operations.async.DeletePlaylistResponse; -import dev.plexapi.sdk.models.operations.async.GetPlaylistContentsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.async.GetPlaylistRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetPlaylistResponse; -import dev.plexapi.sdk.models.operations.async.GetPlaylistsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetPlaylistsResponse; -import dev.plexapi.sdk.models.operations.async.UpdatePlaylistRequestBuilder; -import dev.plexapi.sdk.models.operations.async.UpdatePlaylistResponse; -import dev.plexapi.sdk.models.operations.async.UploadPlaylistRequestBuilder; -import dev.plexapi.sdk.models.operations.async.UploadPlaylistResponse; -import dev.plexapi.sdk.operations.AddPlaylistContents; -import dev.plexapi.sdk.operations.ClearPlaylistContents; -import dev.plexapi.sdk.operations.CreatePlaylist; -import dev.plexapi.sdk.operations.DeletePlaylist; -import dev.plexapi.sdk.operations.GetPlaylist; -import dev.plexapi.sdk.operations.GetPlaylistContents; -import dev.plexapi.sdk.operations.GetPlaylists; -import dev.plexapi.sdk.operations.UpdatePlaylist; -import dev.plexapi.sdk.operations.UploadPlaylist; -import java.lang.Double; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -/** - * Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). - * They can be organized in (optionally nesting) folders. - * Retrieving a playlist, or its items, will trigger a refresh of its metadata. - * This may cause the duration and number of items to change. - */ -public class AsyncPlaylists { - private final SDKConfiguration sdkConfiguration; - private final Playlists syncSDK; - - AsyncPlaylists(Playlists syncSDK, SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.syncSDK = syncSDK; - } - - /** - * Switches to the sync SDK. - * - * @return The sync SDK - */ - public Playlists sync() { - return syncSDK; - } - - - /** - * Create a Playlist - * - *

Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - * - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). - * - `playQueueID` - To create a playlist from an existing play queue. - * - * @return The async call builder - */ - public CreatePlaylistRequestBuilder createPlaylist() { - return new CreatePlaylistRequestBuilder(sdkConfiguration); - } - - /** - * Create a Playlist - * - *

Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - * - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). - * - `playQueueID` - To create a playlist from an existing play queue. - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<CreatePlaylistResponse> - The async response - */ - public CompletableFuture createPlaylist(CreatePlaylistRequest request) { - AsyncRequestOperation operation - = new CreatePlaylist.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get All Playlists - * - *

Get All Playlists given the specified filters. - * - * @return The async call builder - */ - public GetPlaylistsRequestBuilder getPlaylists() { - return new GetPlaylistsRequestBuilder(sdkConfiguration); - } - - /** - * Get All Playlists - * - *

Get All Playlists given the specified filters. - * - * @return CompletableFuture<GetPlaylistsResponse> - The async response - */ - public CompletableFuture getPlaylistsDirect() { - return getPlaylists(Optional.empty(), Optional.empty()); - } - - /** - * Get All Playlists - * - *

Get All Playlists given the specified filters. - * - * @param playlistType limit to a type of playlist. - * @param smart type of playlists to return (default is all). - * @return CompletableFuture<GetPlaylistsResponse> - The async response - */ - public CompletableFuture getPlaylists(Optional playlistType, Optional smart) { - GetPlaylistsRequest request = - GetPlaylistsRequest - .builder() - .playlistType(playlistType) - .smart(smart) - .build(); - AsyncRequestOperation operation - = new GetPlaylists.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Retrieve Playlist - * - *

Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: - * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. - * - * @return The async call builder - */ - public GetPlaylistRequestBuilder getPlaylist() { - return new GetPlaylistRequestBuilder(sdkConfiguration); - } - - /** - * Retrieve Playlist - * - *

Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: - * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. - * - * @param playlistID the ID of the playlist - * @return CompletableFuture<GetPlaylistResponse> - The async response - */ - public CompletableFuture getPlaylist(double playlistID) { - GetPlaylistRequest request = - GetPlaylistRequest - .builder() - .playlistID(playlistID) - .build(); - AsyncRequestOperation operation - = new GetPlaylist.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Deletes a Playlist - * - *

This endpoint will delete a playlist - * - * @return The async call builder - */ - public DeletePlaylistRequestBuilder deletePlaylist() { - return new DeletePlaylistRequestBuilder(sdkConfiguration); - } - - /** - * Deletes a Playlist - * - *

This endpoint will delete a playlist - * - * @param playlistID the ID of the playlist - * @return CompletableFuture<DeletePlaylistResponse> - The async response - */ - public CompletableFuture deletePlaylist(double playlistID) { - DeletePlaylistRequest request = - DeletePlaylistRequest - .builder() - .playlistID(playlistID) - .build(); - AsyncRequestOperation operation - = new DeletePlaylist.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Update a Playlist - * - *

From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - * - * @return The async call builder - */ - public UpdatePlaylistRequestBuilder updatePlaylist() { - return new UpdatePlaylistRequestBuilder(sdkConfiguration); - } - - /** - * Update a Playlist - * - *

From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - * - * @param playlistID the ID of the playlist - * @return CompletableFuture<UpdatePlaylistResponse> - The async response - */ - public CompletableFuture updatePlaylist(double playlistID) { - return updatePlaylist(playlistID, Optional.empty(), Optional.empty()); - } - - /** - * Update a Playlist - * - *

From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - * - * @param playlistID the ID of the playlist - * @param title name of the playlist - * @param summary summary description of the playlist - * @return CompletableFuture<UpdatePlaylistResponse> - The async response - */ - public CompletableFuture updatePlaylist( - double playlistID, Optional title, - Optional summary) { - UpdatePlaylistRequest request = - UpdatePlaylistRequest - .builder() - .playlistID(playlistID) - .title(title) - .summary(summary) - .build(); - AsyncRequestOperation operation - = new UpdatePlaylist.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Retrieve Playlist Contents - * - *

Gets the contents of a playlist. Should be paged by clients via standard mechanisms. - * By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. - * For example, you could use this to display a list of recently added albums vis a smart playlist. - * Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. - * - * @return The async call builder - */ - public GetPlaylistContentsRequestBuilder getPlaylistContents() { - return new GetPlaylistContentsRequestBuilder(sdkConfiguration); - } - - /** - * Retrieve Playlist Contents - * - *

Gets the contents of a playlist. Should be paged by clients via standard mechanisms. - * By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. - * For example, you could use this to display a list of recently added albums vis a smart playlist. - * Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. - * - * @param playlistID the ID of the playlist - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return CompletableFuture<GetPlaylistContentsResponse> - The async response - */ - public CompletableFuture getPlaylistContents(double playlistID, GetPlaylistContentsQueryParamType type) { - GetPlaylistContentsRequest request = - GetPlaylistContentsRequest - .builder() - .playlistID(playlistID) - .type(type) - .build(); - AsyncRequestOperation operation - = new GetPlaylistContents.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Delete Playlist Contents - * - *

Clears a playlist, only works with dumb playlists. Returns the playlist. - * - * @return The async call builder - */ - public ClearPlaylistContentsRequestBuilder clearPlaylistContents() { - return new ClearPlaylistContentsRequestBuilder(sdkConfiguration); - } - - /** - * Delete Playlist Contents - * - *

Clears a playlist, only works with dumb playlists. Returns the playlist. - * - * @param playlistID the ID of the playlist - * @return CompletableFuture<ClearPlaylistContentsResponse> - The async response - */ - public CompletableFuture clearPlaylistContents(double playlistID) { - ClearPlaylistContentsRequest request = - ClearPlaylistContentsRequest - .builder() - .playlistID(playlistID) - .build(); - AsyncRequestOperation operation - = new ClearPlaylistContents.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Adding to a Playlist - * - *

Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. - * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - * - * @return The async call builder - */ - public AddPlaylistContentsRequestBuilder addPlaylistContents() { - return new AddPlaylistContentsRequestBuilder(sdkConfiguration); - } - - /** - * Adding to a Playlist - * - *

Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. - * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - * - * @param playlistID the ID of the playlist - * @param uri the content URI for the playlist - * @return CompletableFuture<AddPlaylistContentsResponse> - The async response - */ - public CompletableFuture addPlaylistContents(double playlistID, String uri) { - return addPlaylistContents(playlistID, uri, Optional.empty()); - } - - /** - * Adding to a Playlist - * - *

Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. - * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - * - * @param playlistID the ID of the playlist - * @param uri the content URI for the playlist - * @param playQueueID the play queue to add to a playlist - * @return CompletableFuture<AddPlaylistContentsResponse> - The async response - */ - public CompletableFuture addPlaylistContents( - double playlistID, String uri, - Optional playQueueID) { - AddPlaylistContentsRequest request = - AddPlaylistContentsRequest - .builder() - .playlistID(playlistID) - .uri(uri) - .playQueueID(playQueueID) - .build(); - AsyncRequestOperation operation - = new AddPlaylistContents.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Upload Playlist - * - *

Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. - * - * @return The async call builder - */ - public UploadPlaylistRequestBuilder uploadPlaylist() { - return new UploadPlaylistRequestBuilder(sdkConfiguration); - } - - /** - * Upload Playlist - * - *

Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. - * - * @param path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. - * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. - * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. - * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. - * - * @param force Force overwriting of duplicate playlists. - * By default, a playlist file uploaded with the same path will overwrite the existing playlist. - * The `force` argument is used to disable overwriting. - * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. - * - * @param sectionID Possibly the section ID to upload the playlist to, we are not certain. - * @return CompletableFuture<UploadPlaylistResponse> - The async response - */ - public CompletableFuture uploadPlaylist( - String path, QueryParamForce force, - long sectionID) { - UploadPlaylistRequest request = - UploadPlaylistRequest - .builder() - .path(path) - .force(force) - .sectionID(sectionID) - .build(); - AsyncRequestOperation operation - = new UploadPlaylist.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/AsyncPlex.java b/src/main/java/dev/plexapi/sdk/AsyncPlex.java deleted file mode 100644 index bea03384..00000000 --- a/src/main/java/dev/plexapi/sdk/AsyncPlex.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.models.operations.GetPinRequest; -import dev.plexapi.sdk.models.operations.GetServerResourcesRequest; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdRequest; -import dev.plexapi.sdk.models.operations.IncludeHttps; -import dev.plexapi.sdk.models.operations.IncludeIPv6; -import dev.plexapi.sdk.models.operations.IncludeRelay; -import dev.plexapi.sdk.models.operations.async.GetCompanionsDataRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetCompanionsDataResponse; -import dev.plexapi.sdk.models.operations.async.GetGeoDataRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetGeoDataResponse; -import dev.plexapi.sdk.models.operations.async.GetHomeDataRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetHomeDataResponse; -import dev.plexapi.sdk.models.operations.async.GetPinRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetPinResponse; -import dev.plexapi.sdk.models.operations.async.GetServerResourcesRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetServerResourcesResponse; -import dev.plexapi.sdk.models.operations.async.GetTokenByPinIdRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetTokenByPinIdResponse; -import dev.plexapi.sdk.models.operations.async.GetUserFriendsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetUserFriendsResponse; -import dev.plexapi.sdk.operations.GetCompanionsData; -import dev.plexapi.sdk.operations.GetGeoData; -import dev.plexapi.sdk.operations.GetHomeData; -import dev.plexapi.sdk.operations.GetPin; -import dev.plexapi.sdk.operations.GetServerResources; -import dev.plexapi.sdk.operations.GetTokenByPinId; -import dev.plexapi.sdk.operations.GetUserFriends; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -/** - * API Calls that perform operations directly against https://Plex.tv - */ -public class AsyncPlex { - private final SDKConfiguration sdkConfiguration; - private final Plex syncSDK; - - AsyncPlex(Plex syncSDK, SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.syncSDK = syncSDK; - } - - /** - * Switches to the sync SDK. - * - * @return The sync SDK - */ - public Plex sync() { - return syncSDK; - } - - - /** - * Get Companions Data - * - *

Get Companions Data - * - * @return The async call builder - */ - public GetCompanionsDataRequestBuilder getCompanionsData() { - return new GetCompanionsDataRequestBuilder(sdkConfiguration); - } - - /** - * Get Companions Data - * - *

Get Companions Data - * - * @return CompletableFuture<GetCompanionsDataResponse> - The async response - */ - public CompletableFuture getCompanionsDataDirect() { - return getCompanionsData(Optional.empty()); - } - - /** - * Get Companions Data - * - *

Get Companions Data - * - * @param serverURL Overrides the server URL. - * @return CompletableFuture<GetCompanionsDataResponse> - The async response - */ - public CompletableFuture getCompanionsData(Optional serverURL) { - AsyncRequestlessOperation operation - = new GetCompanionsData.Async(sdkConfiguration, serverURL); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get list of friends of the user logged in - * - *

Get friends of provided auth token. - * - * @return The async call builder - */ - public GetUserFriendsRequestBuilder getUserFriends() { - return new GetUserFriendsRequestBuilder(sdkConfiguration); - } - - /** - * Get list of friends of the user logged in - * - *

Get friends of provided auth token. - * - * @return CompletableFuture<GetUserFriendsResponse> - The async response - */ - public CompletableFuture getUserFriendsDirect() { - return getUserFriends(Optional.empty()); - } - - /** - * Get list of friends of the user logged in - * - *

Get friends of provided auth token. - * - * @param serverURL Overrides the server URL. - * @return CompletableFuture<GetUserFriendsResponse> - The async response - */ - public CompletableFuture getUserFriends(Optional serverURL) { - AsyncRequestlessOperation operation - = new GetUserFriends.Async(sdkConfiguration, serverURL); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get Geo Data - * - *

Returns the geolocation and locale data of the caller - * - * @return The async call builder - */ - public GetGeoDataRequestBuilder getGeoData() { - return new GetGeoDataRequestBuilder(sdkConfiguration); - } - - /** - * Get Geo Data - * - *

Returns the geolocation and locale data of the caller - * - * @return CompletableFuture<GetGeoDataResponse> - The async response - */ - public CompletableFuture getGeoDataDirect() { - return getGeoData(Optional.empty()); - } - - /** - * Get Geo Data - * - *

Returns the geolocation and locale data of the caller - * - * @param serverURL Overrides the server URL. - * @return CompletableFuture<GetGeoDataResponse> - The async response - */ - public CompletableFuture getGeoData(Optional serverURL) { - AsyncRequestlessOperation operation - = new GetGeoData.Async(sdkConfiguration, serverURL); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get Plex Home Data - * - *

Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. - * - * @return The async call builder - */ - public GetHomeDataRequestBuilder getHomeData() { - return new GetHomeDataRequestBuilder(sdkConfiguration); - } - - /** - * Get Plex Home Data - * - *

Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. - * - * @return CompletableFuture<GetHomeDataResponse> - The async response - */ - public CompletableFuture getHomeDataDirect() { - AsyncRequestlessOperation operation - = new GetHomeData.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get Server Resources - * - *

Get Plex server access tokens and server connections - * - * @return The async call builder - */ - public GetServerResourcesRequestBuilder getServerResources() { - return new GetServerResourcesRequestBuilder(sdkConfiguration); - } - - /** - * Get Server Resources - * - *

Get Plex server access tokens and server connections - * - * @param clientID An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - * @return CompletableFuture<GetServerResourcesResponse> - The async response - */ - public CompletableFuture getServerResources(String clientID) { - return getServerResources( - Optional.empty(), Optional.empty(), Optional.empty(), - clientID, Optional.empty()); - } - - /** - * Get Server Resources - * - *

Get Plex server access tokens and server connections - * - * @param includeHttps Include Https entries in the results - * @param includeRelay Include Relay addresses in the results - * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - * - * @param includeIPv6 Include IPv6 entries in the results - * @param clientID An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - * @param serverURL Overrides the server URL. - * @return CompletableFuture<GetServerResourcesResponse> - The async response - */ - public CompletableFuture getServerResources( - Optional includeHttps, Optional includeRelay, - Optional includeIPv6, String clientID, - Optional serverURL) { - GetServerResourcesRequest request = - GetServerResourcesRequest - .builder() - .includeHttps(includeHttps) - .includeRelay(includeRelay) - .includeIPv6(includeIPv6) - .clientID(clientID) - .build(); - AsyncRequestOperation operation - = new GetServerResources.Async(sdkConfiguration, serverURL); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get a Pin - * - *

Retrieve a Pin ID from Plex.tv to use for authentication flows - * - * @return The async call builder - */ - public GetPinRequestBuilder getPin() { - return new GetPinRequestBuilder(sdkConfiguration); - } - - /** - * Get a Pin - * - *

Retrieve a Pin ID from Plex.tv to use for authentication flows - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetPinResponse> - The async response - */ - public CompletableFuture getPin(GetPinRequest request) { - return getPin(request, Optional.empty()); - } - - /** - * Get a Pin - * - *

Retrieve a Pin ID from Plex.tv to use for authentication flows - * - * @param request The request object containing all the parameters for the API call. - * @param serverURL Overrides the server URL. - * @return CompletableFuture<GetPinResponse> - The async response - */ - public CompletableFuture getPin(GetPinRequest request, Optional serverURL) { - AsyncRequestOperation operation - = new GetPin.Async(sdkConfiguration, serverURL); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Access Token by PinId - * - *

Retrieve an Access Token from Plex.tv after the Pin has been authenticated - * - * @return The async call builder - */ - public GetTokenByPinIdRequestBuilder getTokenByPinId() { - return new GetTokenByPinIdRequestBuilder(sdkConfiguration); - } - - /** - * Get Access Token by PinId - * - *

Retrieve an Access Token from Plex.tv after the Pin has been authenticated - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetTokenByPinIdResponse> - The async response - */ - public CompletableFuture getTokenByPinId(GetTokenByPinIdRequest request) { - return getTokenByPinId(request, Optional.empty()); - } - - /** - * Get Access Token by PinId - * - *

Retrieve an Access Token from Plex.tv after the Pin has been authenticated - * - * @param request The request object containing all the parameters for the API call. - * @param serverURL Overrides the server URL. - * @return CompletableFuture<GetTokenByPinIdResponse> - The async response - */ - public CompletableFuture getTokenByPinId(GetTokenByPinIdRequest request, Optional serverURL) { - AsyncRequestOperation operation - = new GetTokenByPinId.Async(sdkConfiguration, serverURL); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/AsyncPlexAPI.java b/src/main/java/dev/plexapi/sdk/AsyncPlexAPI.java index a14d12f0..5be5d422 100644 --- a/src/main/java/dev/plexapi/sdk/AsyncPlexAPI.java +++ b/src/main/java/dev/plexapi/sdk/AsyncPlexAPI.java @@ -2,209 +2,357 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ package dev.plexapi.sdk; -/** - * Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server - * - *

# Plex Media Server OpenAPI Specification - * - *

An Open Source OpenAPI Specification for Plex Media Server - * - *

Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/) - * - *

## Documentation - * - *

[API Documentation](https://plexapi.dev) - * - *

## SDKs - * - *

The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec). - * - *

| Language | Repository | Releases | Other | - * | --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- | - * | Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - | - * | JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - | - * | Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) | - * | Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - | - * | Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - | - * | PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - | - * | Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - | - * | C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | - - */ public class AsyncPlexAPI { /** - * Operations against the Plex Media Server System. + * General endpoints for basic PMS operation not specific to any media provider */ - private final AsyncServer server; + private final AsyncGeneral general; /** - * API Calls interacting with Plex Media Server Media + * The server can notify clients in real-time of a wide range of events, from library scanning, to preferences being modified, to changes to media, and many other things. This is also the mechanism by which activity progress is reported. + * + *

Two protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket. */ - private final AsyncMedia media; + private final AsyncEvents events; /** - * API Calls that perform operations with Plex Media Server Videos + * API Operations against the Preferences */ - private final AsyncVideo video; + private final AsyncPreferences preferences; /** - * Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. - * Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. - * Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: - * - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. - * - They must contain an `type` which is used by clients to distinguish the specific activity. - * - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) - * - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + * Operations for rating media items (thumbs up/down, star ratings, etc.) + */ + private final AsyncRate rate; + /** + * The actions feature within a media provider + */ + private final AsyncTimeline timeline; + /** + * Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + * + *

Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + * + *

Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. */ private final AsyncActivities activities; /** - * Butler is the task manager of the Plex Media Server Ecosystem. + * The butler is responsible for running periodic tasks. Some tasks run daily, others every few days, and some weekly. These includes database maintenance, metadata updating, thumbnail generation, media analysis, and other tasks. */ private final AsyncButler butler; /** - * API Calls that perform operations directly against https://Plex.tv + * API Operations against the Download Queue */ - private final AsyncPlex plex; + private final AsyncDownloadQueue downloadQueue; /** - * Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + * The hubs within a media provider */ private final AsyncHubs hubs; /** - * API Calls that perform search operations with Plex Media Server + * The search feature within a media provider */ private final AsyncSearch search; /** - * API Calls interacting with Plex Media Server Libraries + * Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc). */ private final AsyncLibrary library; /** - * API Calls that perform operations with Plex Media Server Watchlists + * API Operations against the Collections */ - private final AsyncWatchlist watchlist; + private final AsyncCollections collections; /** - * Submit logs to the Log Handler for Plex Media Server + * The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself + */ + private final AsyncDVRs dvRs; + /** + * The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when + */ + private final AsyncEpg epg; + /** + * LiveTV contains the playback sessions of a channel from a DVR device + */ + private final AsyncLiveTV liveTV; + /** + * Logging mechanism to allow clients to log to the server */ private final AsyncLog log; /** - * Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). - * They can be organized in (optionally nesting) folders. - * Retrieving a playlist, or its items, will trigger a refresh of its metadata. - * This may cause the duration and number of items to change. + * Media grabbers provide ways for media to be obtained for a given protocol. The simplest ones are `stream` and `download`. More complex grabbers can have associated devices + * + *

Network tuners can present themselves on the network using the Simple Service Discovery Protocol and Plex Media Server will discover them. The following XML is an example of the data returned from SSDP. The `deviceType`, `serviceType`, and `serviceId` values must remain as they are in the example in order for PMS to properly discover the device. Other less-obvious fields are described in the parameters section below. + * + *

Example SSDP output + * ``` + * <root xmlns="urn:schemas-upnp-org:device-1-0"> + * <specVersion> + * <major>1</major> + * <minor>0</minor> + * </specVersion> + * <device> + * <deviceType>urn:plex-tv:device:Media:1</deviceType> + * <friendlyName>Turing Hopper 3000</friendlyName> + * <manufacturer>Plex, Inc.</manufacturer> + * <manufacturerURL>https://plex.tv/</manufacturerURL> + * <modelDescription>Turing Hopper 3000 Media Grabber</modelDescription> + * <modelName>Plex Media Grabber</modelName> + * <modelNumber>1</modelNumber> + * <modelURL>https://plex.tv</modelURL> + * <UDN>uuid:42fde8e4-93b6-41e5-8a63-12d848655811</UDN> + * <serviceList> + * <service> + * <URLBase>http://10.0.0.5:8088</URLBase> + * <serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType> + * <serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId> + * </service> + * </serviceList> + * </device> + * </root> + * ``` + * + *

- UDN: (string) A UUID for the device. This should be unique across models of a device at minimum. + * - URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted. */ - private final AsyncPlaylists playlists; + private final AsyncDevices devices; /** - * API Calls regarding authentication for Plex Media Server + * Media providers are the starting points for the entire Plex Media Server media library API. It defines the paths for the groups of endpoints. The `/media/providers` should be the only hard-coded path in clients when accessing the media library. Non-media library endpoints are outside the scope of the media provider. See the description in See [the section in API Info](#section/API-Info/Media-Providers) for more information on how to use media providers. */ - private final AsyncAuthentication authentication; + private final AsyncProvider provider; /** - * API Calls that perform operations with Plex Media Server Statistics + * Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available */ - private final AsyncStatistics statistics; + private final AsyncSubscriptions subscriptions; /** - * API Calls that perform search operations with Plex Media Server Sessions + * API Operations against the Transcoder */ - private final AsyncSessions sessions; + private final AsyncTranscoder transcoder; + /** + * Media playlists that can be created and played back + */ + private final AsyncPlaylist playlist; + /** + * Endpoints for manipulating playlists. + */ + private final AsyncLibraryPlaylists libraryPlaylists; + /** + * The playqueue feature within a media provider + * A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue. + * Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by `playQueueLastAddedItemID` existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed. + * You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion. + * All created play queues will have an empty "Up Next" area - unless the item is an album and no `key` is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set `key`. This is due to the above implicit queueing of albums when no `key` is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area. + * The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item. + */ + private final AsyncPlayQueue playQueue; + /** + * Service provided to compute UltraBlur colors and images. + */ + private final AsyncUltraBlur ultraBlur; + /** + * The status endpoints give you information about current playbacks, play history, and even terminating sessions. + */ + private final AsyncStatus status; /** * This describes the API for searching and applying updates to the Plex Media Server. * Updates to the status can be observed via the Event API. */ private final AsyncUpdater updater; - - private final AsyncUsers users; /** - * Operations against the Plex Media Server System. + * The actual content of the media provider */ - public AsyncServer server() { - return server; + private final AsyncContent content; + /** + * Endpoints for manipulating collections. In addition to these endpoints, `/library/collections/:collectionId/X` will be rerouted to `/library/metadata/:collectionId/X` and respond to those endpoints as well. + */ + private final AsyncLibraryCollections libraryCollections; + /** + * General endpoints for basic PMS operation not specific to any media provider + */ + public AsyncGeneral general() { + return general; } /** - * API Calls interacting with Plex Media Server Media + * The server can notify clients in real-time of a wide range of events, from library scanning, to preferences being modified, to changes to media, and many other things. This is also the mechanism by which activity progress is reported. + * + *

Two protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket. */ - public AsyncMedia media() { - return media; + public AsyncEvents events() { + return events; } /** - * API Calls that perform operations with Plex Media Server Videos + * API Operations against the Preferences */ - public AsyncVideo video() { - return video; + public AsyncPreferences preferences() { + return preferences; } /** - * Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. - * Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. - * Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: - * - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. - * - They must contain an `type` which is used by clients to distinguish the specific activity. - * - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) - * - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + * Operations for rating media items (thumbs up/down, star ratings, etc.) + */ + public AsyncRate rate() { + return rate; + } + /** + * The actions feature within a media provider + */ + public AsyncTimeline timeline() { + return timeline; + } + /** + * Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + * + *

Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + * + *

Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. */ public AsyncActivities activities() { return activities; } /** - * Butler is the task manager of the Plex Media Server Ecosystem. + * The butler is responsible for running periodic tasks. Some tasks run daily, others every few days, and some weekly. These includes database maintenance, metadata updating, thumbnail generation, media analysis, and other tasks. */ public AsyncButler butler() { return butler; } /** - * API Calls that perform operations directly against https://Plex.tv + * API Operations against the Download Queue */ - public AsyncPlex plex() { - return plex; + public AsyncDownloadQueue downloadQueue() { + return downloadQueue; } /** - * Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + * The hubs within a media provider */ public AsyncHubs hubs() { return hubs; } /** - * API Calls that perform search operations with Plex Media Server + * The search feature within a media provider */ public AsyncSearch search() { return search; } /** - * API Calls interacting with Plex Media Server Libraries + * Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc). */ public AsyncLibrary library() { return library; } /** - * API Calls that perform operations with Plex Media Server Watchlists + * API Operations against the Collections */ - public AsyncWatchlist watchlist() { - return watchlist; + public AsyncCollections collections() { + return collections; } /** - * Submit logs to the Log Handler for Plex Media Server + * The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself + */ + public AsyncDVRs dvRs() { + return dvRs; + } + /** + * The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when + */ + public AsyncEpg epg() { + return epg; + } + /** + * LiveTV contains the playback sessions of a channel from a DVR device + */ + public AsyncLiveTV liveTV() { + return liveTV; + } + /** + * Logging mechanism to allow clients to log to the server */ public AsyncLog log() { return log; } /** - * Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). - * They can be organized in (optionally nesting) folders. - * Retrieving a playlist, or its items, will trigger a refresh of its metadata. - * This may cause the duration and number of items to change. + * Media grabbers provide ways for media to be obtained for a given protocol. The simplest ones are `stream` and `download`. More complex grabbers can have associated devices + * + *

Network tuners can present themselves on the network using the Simple Service Discovery Protocol and Plex Media Server will discover them. The following XML is an example of the data returned from SSDP. The `deviceType`, `serviceType`, and `serviceId` values must remain as they are in the example in order for PMS to properly discover the device. Other less-obvious fields are described in the parameters section below. + * + *

Example SSDP output + * ``` + * <root xmlns="urn:schemas-upnp-org:device-1-0"> + * <specVersion> + * <major>1</major> + * <minor>0</minor> + * </specVersion> + * <device> + * <deviceType>urn:plex-tv:device:Media:1</deviceType> + * <friendlyName>Turing Hopper 3000</friendlyName> + * <manufacturer>Plex, Inc.</manufacturer> + * <manufacturerURL>https://plex.tv/</manufacturerURL> + * <modelDescription>Turing Hopper 3000 Media Grabber</modelDescription> + * <modelName>Plex Media Grabber</modelName> + * <modelNumber>1</modelNumber> + * <modelURL>https://plex.tv</modelURL> + * <UDN>uuid:42fde8e4-93b6-41e5-8a63-12d848655811</UDN> + * <serviceList> + * <service> + * <URLBase>http://10.0.0.5:8088</URLBase> + * <serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType> + * <serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId> + * </service> + * </serviceList> + * </device> + * </root> + * ``` + * + *

- UDN: (string) A UUID for the device. This should be unique across models of a device at minimum. + * - URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted. */ - public AsyncPlaylists playlists() { - return playlists; + public AsyncDevices devices() { + return devices; } /** - * API Calls regarding authentication for Plex Media Server + * Media providers are the starting points for the entire Plex Media Server media library API. It defines the paths for the groups of endpoints. The `/media/providers` should be the only hard-coded path in clients when accessing the media library. Non-media library endpoints are outside the scope of the media provider. See the description in See [the section in API Info](#section/API-Info/Media-Providers) for more information on how to use media providers. */ - public AsyncAuthentication authentication() { - return authentication; + public AsyncProvider provider() { + return provider; } /** - * API Calls that perform operations with Plex Media Server Statistics + * Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available */ - public AsyncStatistics statistics() { - return statistics; + public AsyncSubscriptions subscriptions() { + return subscriptions; } /** - * API Calls that perform search operations with Plex Media Server Sessions + * API Operations against the Transcoder */ - public AsyncSessions sessions() { - return sessions; + public AsyncTranscoder transcoder() { + return transcoder; + } + /** + * Media playlists that can be created and played back + */ + public AsyncPlaylist playlist() { + return playlist; + } + /** + * Endpoints for manipulating playlists. + */ + public AsyncLibraryPlaylists libraryPlaylists() { + return libraryPlaylists; + } + /** + * The playqueue feature within a media provider + * A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue. + * Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by `playQueueLastAddedItemID` existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed. + * You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion. + * All created play queues will have an empty "Up Next" area - unless the item is an album and no `key` is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set `key`. This is due to the above implicit queueing of albums when no `key` is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area. + * The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item. + */ + public AsyncPlayQueue playQueue() { + return playQueue; + } + /** + * Service provided to compute UltraBlur colors and images. + */ + public AsyncUltraBlur ultraBlur() { + return ultraBlur; + } + /** + * The status endpoints give you information about current playbacks, play history, and even terminating sessions. + */ + public AsyncStatus status() { + return status; } /** * This describes the API for searching and applying updates to the Plex Media Server. @@ -213,9 +361,17 @@ public class AsyncPlexAPI { public AsyncUpdater updater() { return updater; } - - public AsyncUsers users() { - return users; + /** + * The actual content of the media provider + */ + public AsyncContent content() { + return content; + } + /** + * Endpoints for manipulating collections. In addition to these endpoints, `/library/collections/:collectionId/X` will be rerouted to `/library/metadata/:collectionId/X` and respond to those endpoints as well. + */ + public AsyncLibraryCollections libraryCollections() { + return libraryCollections; } private final SDKConfiguration sdkConfiguration; @@ -224,23 +380,34 @@ public class AsyncPlexAPI { AsyncPlexAPI(PlexAPI syncSDK, SDKConfiguration sdkConfiguration) { this.syncSDK = syncSDK; this.sdkConfiguration = sdkConfiguration; - this.server = new AsyncServer(syncSDK.server(), sdkConfiguration); - this.media = new AsyncMedia(syncSDK.media(), sdkConfiguration); - this.video = new AsyncVideo(syncSDK.video(), sdkConfiguration); + this.general = new AsyncGeneral(syncSDK.general(), sdkConfiguration); + this.events = new AsyncEvents(syncSDK.events(), sdkConfiguration); + this.preferences = new AsyncPreferences(syncSDK.preferences(), sdkConfiguration); + this.rate = new AsyncRate(syncSDK.rate(), sdkConfiguration); + this.timeline = new AsyncTimeline(syncSDK.timeline(), sdkConfiguration); this.activities = new AsyncActivities(syncSDK.activities(), sdkConfiguration); this.butler = new AsyncButler(syncSDK.butler(), sdkConfiguration); - this.plex = new AsyncPlex(syncSDK.plex(), sdkConfiguration); + this.downloadQueue = new AsyncDownloadQueue(syncSDK.downloadQueue(), sdkConfiguration); this.hubs = new AsyncHubs(syncSDK.hubs(), sdkConfiguration); this.search = new AsyncSearch(syncSDK.search(), sdkConfiguration); this.library = new AsyncLibrary(syncSDK.library(), sdkConfiguration); - this.watchlist = new AsyncWatchlist(syncSDK.watchlist(), sdkConfiguration); + this.collections = new AsyncCollections(syncSDK.collections(), sdkConfiguration); + this.dvRs = new AsyncDVRs(syncSDK.dvRs(), sdkConfiguration); + this.epg = new AsyncEpg(syncSDK.epg(), sdkConfiguration); + this.liveTV = new AsyncLiveTV(syncSDK.liveTV(), sdkConfiguration); this.log = new AsyncLog(syncSDK.log(), sdkConfiguration); - this.playlists = new AsyncPlaylists(syncSDK.playlists(), sdkConfiguration); - this.authentication = new AsyncAuthentication(syncSDK.authentication(), sdkConfiguration); - this.statistics = new AsyncStatistics(syncSDK.statistics(), sdkConfiguration); - this.sessions = new AsyncSessions(syncSDK.sessions(), sdkConfiguration); + this.devices = new AsyncDevices(syncSDK.devices(), sdkConfiguration); + this.provider = new AsyncProvider(syncSDK.provider(), sdkConfiguration); + this.subscriptions = new AsyncSubscriptions(syncSDK.subscriptions(), sdkConfiguration); + this.transcoder = new AsyncTranscoder(syncSDK.transcoder(), sdkConfiguration); + this.playlist = new AsyncPlaylist(syncSDK.playlist(), sdkConfiguration); + this.libraryPlaylists = new AsyncLibraryPlaylists(syncSDK.libraryPlaylists(), sdkConfiguration); + this.playQueue = new AsyncPlayQueue(syncSDK.playQueue(), sdkConfiguration); + this.ultraBlur = new AsyncUltraBlur(syncSDK.ultraBlur(), sdkConfiguration); + this.status = new AsyncStatus(syncSDK.status(), sdkConfiguration); this.updater = new AsyncUpdater(syncSDK.updater(), sdkConfiguration); - this.users = new AsyncUsers(syncSDK.users(), sdkConfiguration); + this.content = new AsyncContent(syncSDK.content(), sdkConfiguration); + this.libraryCollections = new AsyncLibraryCollections(syncSDK.libraryCollections(), sdkConfiguration); } /** diff --git a/src/main/java/dev/plexapi/sdk/AsyncPreferences.java b/src/main/java/dev/plexapi/sdk/AsyncPreferences.java new file mode 100644 index 00000000..6956354d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncPreferences.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.GetPreferenceRequest; +import dev.plexapi.sdk.models.operations.SetPreferencesRequest; +import dev.plexapi.sdk.models.operations.async.GetAllPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetAllPreferencesResponse; +import dev.plexapi.sdk.models.operations.async.GetPreferenceRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetPreferenceResponse; +import dev.plexapi.sdk.models.operations.async.SetPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SetPreferencesResponse; +import dev.plexapi.sdk.operations.GetAllPreferences; +import dev.plexapi.sdk.operations.GetPreference; +import dev.plexapi.sdk.operations.SetPreferences; +import java.util.concurrent.CompletableFuture; + +/** + * API Operations against the Preferences + */ +public class AsyncPreferences { + private final SDKConfiguration sdkConfiguration; + private final Preferences syncSDK; + + AsyncPreferences(Preferences syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Preferences sync() { + return syncSDK; + } + + + /** + * Get all preferences + * + *

Get the list of all preferences + * + * @return The async call builder + */ + public GetAllPreferencesRequestBuilder getAllPreferences() { + return new GetAllPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Get all preferences + * + *

Get the list of all preferences + * + * @return CompletableFuture<GetAllPreferencesResponse> - The async response + */ + public CompletableFuture getAllPreferencesDirect() { + AsyncRequestlessOperation operation + = new GetAllPreferences.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Set preferences + * + *

Set a set of preferences in query parameters + * + * @return The async call builder + */ + public SetPreferencesRequestBuilder setPreferences() { + return new SetPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Set preferences + * + *

Set a set of preferences in query parameters + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SetPreferencesResponse> - The async response + */ + public CompletableFuture setPreferences(SetPreferencesRequest request) { + AsyncRequestOperation operation + = new SetPreferences.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a preferences + * + *

Get a single preference and value + * + * @return The async call builder + */ + public GetPreferenceRequestBuilder getPreference() { + return new GetPreferenceRequestBuilder(sdkConfiguration); + } + + /** + * Get a preferences + * + *

Get a single preference and value + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetPreferenceResponse> - The async response + */ + public CompletableFuture getPreference(GetPreferenceRequest request) { + AsyncRequestOperation operation + = new GetPreference.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncProvider.java b/src/main/java/dev/plexapi/sdk/AsyncProvider.java new file mode 100644 index 00000000..4129435e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncProvider.java @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.AddProviderRequest; +import dev.plexapi.sdk.models.operations.DeleteMediaProviderRequest; +import dev.plexapi.sdk.models.operations.async.AddProviderRequestBuilder; +import dev.plexapi.sdk.models.operations.async.AddProviderResponse; +import dev.plexapi.sdk.models.operations.async.DeleteMediaProviderRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteMediaProviderResponse; +import dev.plexapi.sdk.models.operations.async.ListProvidersRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListProvidersResponse; +import dev.plexapi.sdk.models.operations.async.RefreshProvidersRequestBuilder; +import dev.plexapi.sdk.models.operations.async.RefreshProvidersResponse; +import dev.plexapi.sdk.operations.AddProvider; +import dev.plexapi.sdk.operations.DeleteMediaProvider; +import dev.plexapi.sdk.operations.ListProviders; +import dev.plexapi.sdk.operations.RefreshProviders; +import java.util.concurrent.CompletableFuture; + +/** + * Media providers are the starting points for the entire Plex Media Server media library API. It defines the paths for the groups of endpoints. The `/media/providers` should be the only hard-coded path in clients when accessing the media library. Non-media library endpoints are outside the scope of the media provider. See the description in See [the section in API Info](#section/API-Info/Media-Providers) for more information on how to use media providers. + */ +public class AsyncProvider { + private final SDKConfiguration sdkConfiguration; + private final Provider syncSDK; + + AsyncProvider(Provider syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Provider sync() { + return syncSDK; + } + + + /** + * Get the list of available media providers + * + *

Get the list of all available media providers for this PMS. This will generally include the library provider and possibly EPG if DVR is set up. + * + * @return The async call builder + */ + public ListProvidersRequestBuilder listProviders() { + return new ListProvidersRequestBuilder(sdkConfiguration); + } + + /** + * Get the list of available media providers + * + *

Get the list of all available media providers for this PMS. This will generally include the library provider and possibly EPG if DVR is set up. + * + * @return CompletableFuture<ListProvidersResponse> - The async response + */ + public CompletableFuture listProvidersDirect() { + AsyncRequestlessOperation operation + = new ListProviders.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Add a media provider + * + *

This endpoint registers a media provider with the server. Once registered, the media server acts as a reverse proxy to the provider, allowing both local and remote providers to work. + * + * @return The async call builder + */ + public AddProviderRequestBuilder addProvider() { + return new AddProviderRequestBuilder(sdkConfiguration); + } + + /** + * Add a media provider + * + *

This endpoint registers a media provider with the server. Once registered, the media server acts as a reverse proxy to the provider, allowing both local and remote providers to work. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<AddProviderResponse> - The async response + */ + public CompletableFuture addProvider(AddProviderRequest request) { + AsyncRequestOperation operation + = new AddProvider.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Refresh media providers + * + *

Refresh all known media providers. This is useful in case a provider has updated features. + * + * @return The async call builder + */ + public RefreshProvidersRequestBuilder refreshProviders() { + return new RefreshProvidersRequestBuilder(sdkConfiguration); + } + + /** + * Refresh media providers + * + *

Refresh all known media providers. This is useful in case a provider has updated features. + * + * @return CompletableFuture<RefreshProvidersResponse> - The async response + */ + public CompletableFuture refreshProvidersDirect() { + AsyncRequestlessOperation operation + = new RefreshProviders.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a media provider + * + *

Deletes a media provider with the given id + * + * @return The async call builder + */ + public DeleteMediaProviderRequestBuilder deleteMediaProvider() { + return new DeleteMediaProviderRequestBuilder(sdkConfiguration); + } + + /** + * Delete a media provider + * + *

Deletes a media provider with the given id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteMediaProviderResponse> - The async response + */ + public CompletableFuture deleteMediaProvider(DeleteMediaProviderRequest request) { + AsyncRequestOperation operation + = new DeleteMediaProvider.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncRate.java b/src/main/java/dev/plexapi/sdk/AsyncRate.java new file mode 100644 index 00000000..efe4e5fa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncRate.java @@ -0,0 +1,64 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.SetRatingRequest; +import dev.plexapi.sdk.models.operations.async.SetRatingRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SetRatingResponse; +import dev.plexapi.sdk.operations.SetRating; +import java.util.concurrent.CompletableFuture; + +/** + * Operations for rating media items (thumbs up/down, star ratings, etc.) + */ +public class AsyncRate { + private final SDKConfiguration sdkConfiguration; + private final Rate syncSDK; + + AsyncRate(Rate syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Rate sync() { + return syncSDK; + } + + + /** + * Rate an item + * + *

Set the rating on an item. + * This API does respond to the GET verb but applications should use PUT + * + * @return The async call builder + */ + public SetRatingRequestBuilder setRating() { + return new SetRatingRequestBuilder(sdkConfiguration); + } + + /** + * Rate an item + * + *

Set the rating on an item. + * This API does respond to the GET verb but applications should use PUT + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SetRatingResponse> - The async response + */ + public CompletableFuture setRating(SetRatingRequest request) { + AsyncRequestOperation operation + = new SetRating.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncSearch.java b/src/main/java/dev/plexapi/sdk/AsyncSearch.java index add2a3df..113e03ae 100644 --- a/src/main/java/dev/plexapi/sdk/AsyncSearch.java +++ b/src/main/java/dev/plexapi/sdk/AsyncSearch.java @@ -5,25 +5,18 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import dev.plexapi.sdk.models.operations.GetSearchResultsRequest; -import dev.plexapi.sdk.models.operations.PerformSearchRequest; -import dev.plexapi.sdk.models.operations.PerformVoiceSearchRequest; -import dev.plexapi.sdk.models.operations.async.GetSearchResultsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetSearchResultsResponse; -import dev.plexapi.sdk.models.operations.async.PerformSearchRequestBuilder; -import dev.plexapi.sdk.models.operations.async.PerformSearchResponse; -import dev.plexapi.sdk.models.operations.async.PerformVoiceSearchRequestBuilder; -import dev.plexapi.sdk.models.operations.async.PerformVoiceSearchResponse; -import dev.plexapi.sdk.operations.GetSearchResults; -import dev.plexapi.sdk.operations.PerformSearch; -import dev.plexapi.sdk.operations.PerformVoiceSearch; -import java.lang.Double; -import java.lang.String; -import java.util.Optional; +import dev.plexapi.sdk.models.operations.SearchHubsRequest; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsRequest; +import dev.plexapi.sdk.models.operations.async.SearchHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.SearchHubsResponse; +import dev.plexapi.sdk.models.operations.async.VoiceSearchHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.VoiceSearchHubsResponse; +import dev.plexapi.sdk.operations.SearchHubs; +import dev.plexapi.sdk.operations.VoiceSearchHubs; import java.util.concurrent.CompletableFuture; /** - * API Calls that perform search operations with Plex Media Server + * The search feature within a media provider */ public class AsyncSearch { private final SDKConfiguration sdkConfiguration; @@ -45,7 +38,9 @@ public class AsyncSearch { /** - * Perform a search + * Search Hub + * + *

Perform a search and get the result as hubs * *

This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). * @@ -62,12 +57,14 @@ public class AsyncSearch { * * @return The async call builder */ - public PerformSearchRequestBuilder performSearch() { - return new PerformSearchRequestBuilder(sdkConfiguration); + public SearchHubsRequestBuilder searchHubs() { + return new SearchHubsRequestBuilder(sdkConfiguration); } /** - * Perform a search + * Search Hub + * + *

Perform a search and get the result as hubs * *

This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). * @@ -82,137 +79,47 @@ public class AsyncSearch { * *

This request is intended to be very fast, and called as the user types. * - * @param query The query term - * @return CompletableFuture<PerformSearchResponse> - The async response + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<SearchHubsResponse> - The async response */ - public CompletableFuture performSearch(String query) { - return performSearch(query, Optional.empty(), Optional.empty()); - } - - /** - * Perform a search - * - *

This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). - * - *

In the response's items, the following extra attributes are returned to further describe or disambiguate the result: - * - *

- `reason`: The reason for the result, if not because of a direct search term match; can be either: - * - `section`: There are multiple identical results from different sections. - * - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). - * - `<hub identifier>`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor` - * - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold"). - * - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. - * - *

This request is intended to be very fast, and called as the user types. - * - * @param query The query term - * @param sectionId This gives context to the search, and can result in re-ordering of search result hubs - * @param limit The number of items to return per hub - * @return CompletableFuture<PerformSearchResponse> - The async response - */ - public CompletableFuture performSearch( - String query, Optional sectionId, - Optional limit) { - PerformSearchRequest request = - PerformSearchRequest - .builder() - .query(query) - .sectionId(sectionId) - .limit(limit) - .build(); - AsyncRequestOperation operation - = new PerformSearch.Async(sdkConfiguration); + public CompletableFuture searchHubs(SearchHubsRequest request) { + AsyncRequestOperation operation + = new SearchHubs.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } /** - * Perform a voice search + * Voice Search Hub * - *

This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. - * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. - * Whenever possible, clients should limit the search to the appropriate type. - * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + *

Perform a search tailored to voice input and get the result as hubs + * + *

This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type. + * + *

Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. * * @return The async call builder */ - public PerformVoiceSearchRequestBuilder performVoiceSearch() { - return new PerformVoiceSearchRequestBuilder(sdkConfiguration); + public VoiceSearchHubsRequestBuilder voiceSearchHubs() { + return new VoiceSearchHubsRequestBuilder(sdkConfiguration); } /** - * Perform a voice search + * Voice Search Hub * - *

This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. - * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. - * Whenever possible, clients should limit the search to the appropriate type. - * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + *

Perform a search tailored to voice input and get the result as hubs * - * @param query The query term - * @return CompletableFuture<PerformVoiceSearchResponse> - The async response + *

This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type. + * + *

Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<VoiceSearchHubsResponse> - The async response */ - public CompletableFuture performVoiceSearch(String query) { - return performVoiceSearch(query, Optional.empty(), Optional.empty()); - } - - /** - * Perform a voice search - * - *

This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. - * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. - * Whenever possible, clients should limit the search to the appropriate type. - * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. - * - * @param query The query term - * @param sectionId This gives context to the search, and can result in re-ordering of search result hubs - * @param limit The number of items to return per hub - * @return CompletableFuture<PerformVoiceSearchResponse> - The async response - */ - public CompletableFuture performVoiceSearch( - String query, Optional sectionId, - Optional limit) { - PerformVoiceSearchRequest request = - PerformVoiceSearchRequest - .builder() - .query(query) - .sectionId(sectionId) - .limit(limit) - .build(); - AsyncRequestOperation operation - = new PerformVoiceSearch.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Search Results - * - *

This will search the database for the string provided. - * - * @return The async call builder - */ - public GetSearchResultsRequestBuilder getSearchResults() { - return new GetSearchResultsRequestBuilder(sdkConfiguration); - } - - /** - * Get Search Results - * - *

This will search the database for the string provided. - * - * @param query The search query string to use - * @return CompletableFuture<GetSearchResultsResponse> - The async response - */ - public CompletableFuture getSearchResults(String query) { - GetSearchResultsRequest request = - GetSearchResultsRequest - .builder() - .query(query) - .build(); - AsyncRequestOperation operation - = new GetSearchResults.Async(sdkConfiguration); + public CompletableFuture voiceSearchHubs(VoiceSearchHubsRequest request) { + AsyncRequestOperation operation + = new VoiceSearchHubs.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } diff --git a/src/main/java/dev/plexapi/sdk/AsyncServer.java b/src/main/java/dev/plexapi/sdk/AsyncServer.java deleted file mode 100644 index 201c1659..00000000 --- a/src/main/java/dev/plexapi/sdk/AsyncServer.java +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.models.operations.GetMediaProvidersRequest; -import dev.plexapi.sdk.models.operations.GetResizedPhotoRequest; -import dev.plexapi.sdk.models.operations.async.GetAvailableClientsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetAvailableClientsResponse; -import dev.plexapi.sdk.models.operations.async.GetDevicesRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetDevicesResponse; -import dev.plexapi.sdk.models.operations.async.GetMediaProvidersRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetMediaProvidersResponse; -import dev.plexapi.sdk.models.operations.async.GetMyPlexAccountRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetMyPlexAccountResponse; -import dev.plexapi.sdk.models.operations.async.GetResizedPhotoRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetResizedPhotoResponse; -import dev.plexapi.sdk.models.operations.async.GetServerCapabilitiesRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetServerCapabilitiesResponse; -import dev.plexapi.sdk.models.operations.async.GetServerIdentityRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetServerIdentityResponse; -import dev.plexapi.sdk.models.operations.async.GetServerListRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetServerListResponse; -import dev.plexapi.sdk.models.operations.async.GetServerPreferencesRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetServerPreferencesResponse; -import dev.plexapi.sdk.operations.GetAvailableClients; -import dev.plexapi.sdk.operations.GetDevices; -import dev.plexapi.sdk.operations.GetMediaProviders; -import dev.plexapi.sdk.operations.GetMyPlexAccount; -import dev.plexapi.sdk.operations.GetResizedPhoto; -import dev.plexapi.sdk.operations.GetServerCapabilities; -import dev.plexapi.sdk.operations.GetServerIdentity; -import dev.plexapi.sdk.operations.GetServerList; -import dev.plexapi.sdk.operations.GetServerPreferences; -import java.lang.String; -import java.util.concurrent.CompletableFuture; - -/** - * Operations against the Plex Media Server System. - */ -public class AsyncServer { - private final SDKConfiguration sdkConfiguration; - private final Server syncSDK; - - AsyncServer(Server syncSDK, SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.syncSDK = syncSDK; - } - - /** - * Switches to the sync SDK. - * - * @return The sync SDK - */ - public Server sync() { - return syncSDK; - } - - - /** - * Get Server Capabilities - * - *

Get Server Capabilities - * - * @return The async call builder - */ - public GetServerCapabilitiesRequestBuilder getServerCapabilities() { - return new GetServerCapabilitiesRequestBuilder(sdkConfiguration); - } - - /** - * Get Server Capabilities - * - *

Get Server Capabilities - * - * @return CompletableFuture<GetServerCapabilitiesResponse> - The async response - */ - public CompletableFuture getServerCapabilitiesDirect() { - AsyncRequestlessOperation operation - = new GetServerCapabilities.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get Server Preferences - * - *

Get Server Preferences - * - * @return The async call builder - */ - public GetServerPreferencesRequestBuilder getServerPreferences() { - return new GetServerPreferencesRequestBuilder(sdkConfiguration); - } - - /** - * Get Server Preferences - * - *

Get Server Preferences - * - * @return CompletableFuture<GetServerPreferencesResponse> - The async response - */ - public CompletableFuture getServerPreferencesDirect() { - AsyncRequestlessOperation operation - = new GetServerPreferences.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get Available Clients - * - *

Get Available Clients - * - * @return The async call builder - */ - public GetAvailableClientsRequestBuilder getAvailableClients() { - return new GetAvailableClientsRequestBuilder(sdkConfiguration); - } - - /** - * Get Available Clients - * - *

Get Available Clients - * - * @return CompletableFuture<GetAvailableClientsResponse> - The async response - */ - public CompletableFuture getAvailableClientsDirect() { - AsyncRequestlessOperation operation - = new GetAvailableClients.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get Devices - * - *

Get Devices - * - * @return The async call builder - */ - public GetDevicesRequestBuilder getDevices() { - return new GetDevicesRequestBuilder(sdkConfiguration); - } - - /** - * Get Devices - * - *

Get Devices - * - * @return CompletableFuture<GetDevicesResponse> - The async response - */ - public CompletableFuture getDevicesDirect() { - AsyncRequestlessOperation operation - = new GetDevices.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get Server Identity - * - *

This request is useful to determine if the server is online or offline - * - * @return The async call builder - */ - public GetServerIdentityRequestBuilder getServerIdentity() { - return new GetServerIdentityRequestBuilder(sdkConfiguration); - } - - /** - * Get Server Identity - * - *

This request is useful to determine if the server is online or offline - * - * @return CompletableFuture<GetServerIdentityResponse> - The async response - */ - public CompletableFuture getServerIdentityDirect() { - AsyncRequestlessOperation operation - = new GetServerIdentity.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get MyPlex Account - * - *

Returns MyPlex Account Information - * - * @return The async call builder - */ - public GetMyPlexAccountRequestBuilder getMyPlexAccount() { - return new GetMyPlexAccountRequestBuilder(sdkConfiguration); - } - - /** - * Get MyPlex Account - * - *

Returns MyPlex Account Information - * - * @return CompletableFuture<GetMyPlexAccountResponse> - The async response - */ - public CompletableFuture getMyPlexAccountDirect() { - AsyncRequestlessOperation operation - = new GetMyPlexAccount.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get a Resized Photo - * - *

Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - * - * @return The async call builder - */ - public GetResizedPhotoRequestBuilder getResizedPhoto() { - return new GetResizedPhotoRequestBuilder(sdkConfiguration); - } - - /** - * Get a Resized Photo - * - *

Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetResizedPhotoResponse> - The async response - */ - public CompletableFuture getResizedPhoto(GetResizedPhotoRequest request) { - AsyncRequestOperation operation - = new GetResizedPhoto.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Media Providers - * - *

Retrieves media providers and their features from the Plex server. - * - * @return The async call builder - */ - public GetMediaProvidersRequestBuilder getMediaProviders() { - return new GetMediaProvidersRequestBuilder(sdkConfiguration); - } - - /** - * Get Media Providers - * - *

Retrieves media providers and their features from the Plex server. - * - * @param xPlexToken An authentication token, obtained from plex.tv - * @return CompletableFuture<GetMediaProvidersResponse> - The async response - */ - public CompletableFuture getMediaProviders(String xPlexToken) { - GetMediaProvidersRequest request = - GetMediaProvidersRequest - .builder() - .xPlexToken(xPlexToken) - .build(); - AsyncRequestOperation operation - = new GetMediaProviders.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Server List - * - *

Get Server List - * - * @return The async call builder - */ - public GetServerListRequestBuilder getServerList() { - return new GetServerListRequestBuilder(sdkConfiguration); - } - - /** - * Get Server List - * - *

Get Server List - * - * @return CompletableFuture<GetServerListResponse> - The async response - */ - public CompletableFuture getServerListDirect() { - AsyncRequestlessOperation operation - = new GetServerList.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/AsyncSessions.java b/src/main/java/dev/plexapi/sdk/AsyncSessions.java deleted file mode 100644 index a4d2da57..00000000 --- a/src/main/java/dev/plexapi/sdk/AsyncSessions.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.models.operations.GetSessionHistoryRequest; -import dev.plexapi.sdk.models.operations.QueryParamFilter; -import dev.plexapi.sdk.models.operations.StopTranscodeSessionRequest; -import dev.plexapi.sdk.models.operations.async.GetSessionHistoryRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetSessionHistoryResponse; -import dev.plexapi.sdk.models.operations.async.GetSessionsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetSessionsResponse; -import dev.plexapi.sdk.models.operations.async.GetTranscodeSessionsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetTranscodeSessionsResponse; -import dev.plexapi.sdk.models.operations.async.StopTranscodeSessionRequestBuilder; -import dev.plexapi.sdk.models.operations.async.StopTranscodeSessionResponse; -import dev.plexapi.sdk.operations.GetSessionHistory; -import dev.plexapi.sdk.operations.GetSessions; -import dev.plexapi.sdk.operations.GetTranscodeSessions; -import dev.plexapi.sdk.operations.StopTranscodeSession; -import java.lang.Long; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -/** - * API Calls that perform search operations with Plex Media Server Sessions - */ -public class AsyncSessions { - private final SDKConfiguration sdkConfiguration; - private final Sessions syncSDK; - - AsyncSessions(Sessions syncSDK, SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.syncSDK = syncSDK; - } - - /** - * Switches to the sync SDK. - * - * @return The sync SDK - */ - public Sessions sync() { - return syncSDK; - } - - - /** - * Get Active Sessions - * - *

This will retrieve the "Now Playing" Information of the PMS. - * - * @return The async call builder - */ - public GetSessionsRequestBuilder getSessions() { - return new GetSessionsRequestBuilder(sdkConfiguration); - } - - /** - * Get Active Sessions - * - *

This will retrieve the "Now Playing" Information of the PMS. - * - * @return CompletableFuture<GetSessionsResponse> - The async response - */ - public CompletableFuture getSessionsDirect() { - AsyncRequestlessOperation operation - = new GetSessions.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Get Session History - * - *

This will Retrieve a listing of all history views. - * - * @return The async call builder - */ - public GetSessionHistoryRequestBuilder getSessionHistory() { - return new GetSessionHistoryRequestBuilder(sdkConfiguration); - } - - /** - * Get Session History - * - *

This will Retrieve a listing of all history views. - * - * @return CompletableFuture<GetSessionHistoryResponse> - The async response - */ - public CompletableFuture getSessionHistoryDirect() { - return getSessionHistory( - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Get Session History - * - *

This will Retrieve a listing of all history views. - * - * @param sort Sorts the results by the specified field followed by the direction (asc, desc) - * - * @param accountId Filter results by those that are related to a specific users id - * - * @param filter Filters content by field and direction/equality - * (Unknown if viewedAt is the only supported column) - * - * @param librarySectionID Filters the results based on the id of a valid library section - * - * @return CompletableFuture<GetSessionHistoryResponse> - The async response - */ - public CompletableFuture getSessionHistory( - Optional sort, Optional accountId, - Optional filter, Optional librarySectionID) { - GetSessionHistoryRequest request = - GetSessionHistoryRequest - .builder() - .sort(sort) - .accountId(accountId) - .filter(filter) - .librarySectionID(librarySectionID) - .build(); - AsyncRequestOperation operation - = new GetSessionHistory.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Transcode Sessions - * - *

Get Transcode Sessions - * - * @return The async call builder - */ - public GetTranscodeSessionsRequestBuilder getTranscodeSessions() { - return new GetTranscodeSessionsRequestBuilder(sdkConfiguration); - } - - /** - * Get Transcode Sessions - * - *

Get Transcode Sessions - * - * @return CompletableFuture<GetTranscodeSessionsResponse> - The async response - */ - public CompletableFuture getTranscodeSessionsDirect() { - AsyncRequestlessOperation operation - = new GetTranscodeSessions.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Stop a Transcode Session - * - *

Stop a Transcode Session - * - * @return The async call builder - */ - public StopTranscodeSessionRequestBuilder stopTranscodeSession() { - return new StopTranscodeSessionRequestBuilder(sdkConfiguration); - } - - /** - * Stop a Transcode Session - * - *

Stop a Transcode Session - * - * @param sessionKey the Key of the transcode session to stop - * @return CompletableFuture<StopTranscodeSessionResponse> - The async response - */ - public CompletableFuture stopTranscodeSession(String sessionKey) { - StopTranscodeSessionRequest request = - StopTranscodeSessionRequest - .builder() - .sessionKey(sessionKey) - .build(); - AsyncRequestOperation operation - = new StopTranscodeSession.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/AsyncStatistics.java b/src/main/java/dev/plexapi/sdk/AsyncStatistics.java deleted file mode 100644 index 519c4ffd..00000000 --- a/src/main/java/dev/plexapi/sdk/AsyncStatistics.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsRequest; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsRequest; -import dev.plexapi.sdk.models.operations.GetStatisticsRequest; -import dev.plexapi.sdk.models.operations.async.GetBandwidthStatisticsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetBandwidthStatisticsResponse; -import dev.plexapi.sdk.models.operations.async.GetResourcesStatisticsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetResourcesStatisticsResponse; -import dev.plexapi.sdk.models.operations.async.GetStatisticsRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetStatisticsResponse; -import dev.plexapi.sdk.operations.GetBandwidthStatistics; -import dev.plexapi.sdk.operations.GetResourcesStatistics; -import dev.plexapi.sdk.operations.GetStatistics; -import java.lang.Long; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -/** - * API Calls that perform operations with Plex Media Server Statistics - */ -public class AsyncStatistics { - private final SDKConfiguration sdkConfiguration; - private final Statistics syncSDK; - - AsyncStatistics(Statistics syncSDK, SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.syncSDK = syncSDK; - } - - /** - * Switches to the sync SDK. - * - * @return The sync SDK - */ - public Statistics sync() { - return syncSDK; - } - - - /** - * Get Media Statistics - * - *

This will return the media statistics for the server - * - * @return The async call builder - */ - public GetStatisticsRequestBuilder getStatistics() { - return new GetStatisticsRequestBuilder(sdkConfiguration); - } - - /** - * Get Media Statistics - * - *

This will return the media statistics for the server - * - * @return CompletableFuture<GetStatisticsResponse> - The async response - */ - public CompletableFuture getStatisticsDirect() { - return getStatistics(Optional.empty()); - } - - /** - * Get Media Statistics - * - *

This will return the media statistics for the server - * - * @param timespan The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - * - * @return CompletableFuture<GetStatisticsResponse> - The async response - */ - public CompletableFuture getStatistics(Optional timespan) { - GetStatisticsRequest request = - GetStatisticsRequest - .builder() - .timespan(timespan) - .build(); - AsyncRequestOperation operation - = new GetStatistics.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Resources Statistics - * - *

This will return the resources for the server - * - * @return The async call builder - */ - public GetResourcesStatisticsRequestBuilder getResourcesStatistics() { - return new GetResourcesStatisticsRequestBuilder(sdkConfiguration); - } - - /** - * Get Resources Statistics - * - *

This will return the resources for the server - * - * @return CompletableFuture<GetResourcesStatisticsResponse> - The async response - */ - public CompletableFuture getResourcesStatisticsDirect() { - return getResourcesStatistics(Optional.empty()); - } - - /** - * Get Resources Statistics - * - *

This will return the resources for the server - * - * @param timespan The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - * - * @return CompletableFuture<GetResourcesStatisticsResponse> - The async response - */ - public CompletableFuture getResourcesStatistics(Optional timespan) { - GetResourcesStatisticsRequest request = - GetResourcesStatisticsRequest - .builder() - .timespan(timespan) - .build(); - AsyncRequestOperation operation - = new GetResourcesStatistics.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Get Bandwidth Statistics - * - *

This will return the bandwidth statistics for the server - * - * @return The async call builder - */ - public GetBandwidthStatisticsRequestBuilder getBandwidthStatistics() { - return new GetBandwidthStatisticsRequestBuilder(sdkConfiguration); - } - - /** - * Get Bandwidth Statistics - * - *

This will return the bandwidth statistics for the server - * - * @return CompletableFuture<GetBandwidthStatisticsResponse> - The async response - */ - public CompletableFuture getBandwidthStatisticsDirect() { - return getBandwidthStatistics(Optional.empty()); - } - - /** - * Get Bandwidth Statistics - * - *

This will return the bandwidth statistics for the server - * - * @param timespan The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - * - * @return CompletableFuture<GetBandwidthStatisticsResponse> - The async response - */ - public CompletableFuture getBandwidthStatistics(Optional timespan) { - GetBandwidthStatisticsRequest request = - GetBandwidthStatisticsRequest - .builder() - .timespan(timespan) - .build(); - AsyncRequestOperation operation - = new GetBandwidthStatistics.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/AsyncStatus.java b/src/main/java/dev/plexapi/sdk/AsyncStatus.java new file mode 100644 index 00000000..3a38e1bb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncStatus.java @@ -0,0 +1,216 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.DeleteHistoryRequest; +import dev.plexapi.sdk.models.operations.GetHistoryItemRequest; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryRequest; +import dev.plexapi.sdk.models.operations.TerminateSessionRequest; +import dev.plexapi.sdk.models.operations.async.DeleteHistoryRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteHistoryResponse; +import dev.plexapi.sdk.models.operations.async.GetBackgroundTasksRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetBackgroundTasksResponse; +import dev.plexapi.sdk.models.operations.async.GetHistoryItemRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetHistoryItemResponse; +import dev.plexapi.sdk.models.operations.async.ListPlaybackHistoryRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListPlaybackHistoryResponse; +import dev.plexapi.sdk.models.operations.async.ListSessionsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ListSessionsResponse; +import dev.plexapi.sdk.models.operations.async.TerminateSessionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.TerminateSessionResponse; +import dev.plexapi.sdk.operations.DeleteHistory; +import dev.plexapi.sdk.operations.GetBackgroundTasks; +import dev.plexapi.sdk.operations.GetHistoryItem; +import dev.plexapi.sdk.operations.ListPlaybackHistory; +import dev.plexapi.sdk.operations.ListSessions; +import dev.plexapi.sdk.operations.TerminateSession; +import java.util.concurrent.CompletableFuture; + +/** + * The status endpoints give you information about current playbacks, play history, and even terminating sessions. + */ +public class AsyncStatus { + private final SDKConfiguration sdkConfiguration; + private final Status syncSDK; + + AsyncStatus(Status syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Status sync() { + return syncSDK; + } + + + /** + * List Sessions + * + *

List all current playbacks on this server + * + * @return The async call builder + */ + public ListSessionsRequestBuilder listSessions() { + return new ListSessionsRequestBuilder(sdkConfiguration); + } + + /** + * List Sessions + * + *

List all current playbacks on this server + * + * @return CompletableFuture<ListSessionsResponse> - The async response + */ + public CompletableFuture listSessionsDirect() { + AsyncRequestlessOperation operation + = new ListSessions.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Get background tasks + * + *

Get the list of all background tasks + * + * @return The async call builder + */ + public GetBackgroundTasksRequestBuilder getBackgroundTasks() { + return new GetBackgroundTasksRequestBuilder(sdkConfiguration); + } + + /** + * Get background tasks + * + *

Get the list of all background tasks + * + * @return CompletableFuture<GetBackgroundTasksResponse> - The async response + */ + public CompletableFuture getBackgroundTasksDirect() { + AsyncRequestlessOperation operation + = new GetBackgroundTasks.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * List Playback History + * + *

List all playback history (Admin can see all users, others can only see their own). + * Pagination should be used on this endpoint. Additionally this endpoint supports `includeFields`, `excludeFields`, `includeElements`, and `excludeElements` parameters. + * + * @return The async call builder + */ + public ListPlaybackHistoryRequestBuilder listPlaybackHistory() { + return new ListPlaybackHistoryRequestBuilder(sdkConfiguration); + } + + /** + * List Playback History + * + *

List all playback history (Admin can see all users, others can only see their own). + * Pagination should be used on this endpoint. Additionally this endpoint supports `includeFields`, `excludeFields`, `includeElements`, and `excludeElements` parameters. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ListPlaybackHistoryResponse> - The async response + */ + public CompletableFuture listPlaybackHistory(ListPlaybackHistoryRequest request) { + AsyncRequestOperation operation + = new ListPlaybackHistory.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Terminate a session + * + *

Terminate a playback session kicking off the user + * + * @return The async call builder + */ + public TerminateSessionRequestBuilder terminateSession() { + return new TerminateSessionRequestBuilder(sdkConfiguration); + } + + /** + * Terminate a session + * + *

Terminate a playback session kicking off the user + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<TerminateSessionResponse> - The async response + */ + public CompletableFuture terminateSession(TerminateSessionRequest request) { + AsyncRequestOperation operation + = new TerminateSession.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete Single History Item + * + *

Delete a single history item by id + * + * @return The async call builder + */ + public DeleteHistoryRequestBuilder deleteHistory() { + return new DeleteHistoryRequestBuilder(sdkConfiguration); + } + + /** + * Delete Single History Item + * + *

Delete a single history item by id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteHistoryResponse> - The async response + */ + public CompletableFuture deleteHistory(DeleteHistoryRequest request) { + AsyncRequestOperation operation + = new DeleteHistory.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get Single History Item + * + *

Get a single history item by id + * + * @return The async call builder + */ + public GetHistoryItemRequestBuilder getHistoryItem() { + return new GetHistoryItemRequestBuilder(sdkConfiguration); + } + + /** + * Get Single History Item + * + *

Get a single history item by id + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetHistoryItemResponse> - The async response + */ + public CompletableFuture getHistoryItem(GetHistoryItemRequest request) { + AsyncRequestOperation operation + = new GetHistoryItem.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncSubscriptions.java b/src/main/java/dev/plexapi/sdk/AsyncSubscriptions.java new file mode 100644 index 00000000..c4e597e1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncSubscriptions.java @@ -0,0 +1,340 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.models.operations.CancelGrabRequest; +import dev.plexapi.sdk.models.operations.CreateSubscriptionRequest; +import dev.plexapi.sdk.models.operations.DeleteSubscriptionRequest; +import dev.plexapi.sdk.models.operations.EditSubscriptionPreferencesRequest; +import dev.plexapi.sdk.models.operations.GetAllSubscriptionsRequest; +import dev.plexapi.sdk.models.operations.GetSubscriptionRequest; +import dev.plexapi.sdk.models.operations.GetTemplateRequest; +import dev.plexapi.sdk.models.operations.ReorderSubscriptionRequest; +import dev.plexapi.sdk.models.operations.async.CancelGrabRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CancelGrabResponse; +import dev.plexapi.sdk.models.operations.async.CreateSubscriptionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CreateSubscriptionResponse; +import dev.plexapi.sdk.models.operations.async.DeleteSubscriptionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.DeleteSubscriptionResponse; +import dev.plexapi.sdk.models.operations.async.EditSubscriptionPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.EditSubscriptionPreferencesResponse; +import dev.plexapi.sdk.models.operations.async.GetAllSubscriptionsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetAllSubscriptionsResponse; +import dev.plexapi.sdk.models.operations.async.GetScheduledRecordingsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetScheduledRecordingsResponse; +import dev.plexapi.sdk.models.operations.async.GetSubscriptionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetSubscriptionResponse; +import dev.plexapi.sdk.models.operations.async.GetTemplateRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetTemplateResponse; +import dev.plexapi.sdk.models.operations.async.ProcessSubscriptionsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ProcessSubscriptionsResponse; +import dev.plexapi.sdk.models.operations.async.ReorderSubscriptionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ReorderSubscriptionResponse; +import dev.plexapi.sdk.operations.CancelGrab; +import dev.plexapi.sdk.operations.CreateSubscription; +import dev.plexapi.sdk.operations.DeleteSubscription; +import dev.plexapi.sdk.operations.EditSubscriptionPreferences; +import dev.plexapi.sdk.operations.GetAllSubscriptions; +import dev.plexapi.sdk.operations.GetScheduledRecordings; +import dev.plexapi.sdk.operations.GetSubscription; +import dev.plexapi.sdk.operations.GetTemplate; +import dev.plexapi.sdk.operations.ProcessSubscriptions; +import dev.plexapi.sdk.operations.ReorderSubscription; +import java.util.concurrent.CompletableFuture; + +/** + * Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available + */ +public class AsyncSubscriptions { + private final SDKConfiguration sdkConfiguration; + private final Subscriptions syncSDK; + + AsyncSubscriptions(Subscriptions syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Subscriptions sync() { + return syncSDK; + } + + + /** + * Get all subscriptions + * + *

Get all subscriptions and potentially the grabs too + * + * @return The async call builder + */ + public GetAllSubscriptionsRequestBuilder getAllSubscriptions() { + return new GetAllSubscriptionsRequestBuilder(sdkConfiguration); + } + + /** + * Get all subscriptions + * + *

Get all subscriptions and potentially the grabs too + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetAllSubscriptionsResponse> - The async response + */ + public CompletableFuture getAllSubscriptions(GetAllSubscriptionsRequest request) { + AsyncRequestOperation operation + = new GetAllSubscriptions.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Create a subscription + * + *

Create a subscription. The query parameters should be mostly derived from the [template](#tag/Subscriptions/operation/mediaSubscriptionsGetTemplate) + * + * @return The async call builder + */ + public CreateSubscriptionRequestBuilder createSubscription() { + return new CreateSubscriptionRequestBuilder(sdkConfiguration); + } + + /** + * Create a subscription + * + *

Create a subscription. The query parameters should be mostly derived from the [template](#tag/Subscriptions/operation/mediaSubscriptionsGetTemplate) + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CreateSubscriptionResponse> - The async response + */ + public CompletableFuture createSubscription(CreateSubscriptionRequest request) { + AsyncRequestOperation operation + = new CreateSubscription.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Process all subscriptions + * + *

Process all subscriptions asynchronously + * + * @return The async call builder + */ + public ProcessSubscriptionsRequestBuilder processSubscriptions() { + return new ProcessSubscriptionsRequestBuilder(sdkConfiguration); + } + + /** + * Process all subscriptions + * + *

Process all subscriptions asynchronously + * + * @return CompletableFuture<ProcessSubscriptionsResponse> - The async response + */ + public CompletableFuture processSubscriptionsDirect() { + AsyncRequestlessOperation operation + = new ProcessSubscriptions.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Get all scheduled recordings + * + *

Get all scheduled recordings across all subscriptions + * + * @return The async call builder + */ + public GetScheduledRecordingsRequestBuilder getScheduledRecordings() { + return new GetScheduledRecordingsRequestBuilder(sdkConfiguration); + } + + /** + * Get all scheduled recordings + * + *

Get all scheduled recordings across all subscriptions + * + * @return CompletableFuture<GetScheduledRecordingsResponse> - The async response + */ + public CompletableFuture getScheduledRecordingsDirect() { + AsyncRequestlessOperation operation + = new GetScheduledRecordings.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + + + /** + * Get the subscription template + * + *

Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc. + * + * @return The async call builder + */ + public GetTemplateRequestBuilder getTemplate() { + return new GetTemplateRequestBuilder(sdkConfiguration); + } + + /** + * Get the subscription template + * + *

Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetTemplateResponse> - The async response + */ + public CompletableFuture getTemplate(GetTemplateRequest request) { + AsyncRequestOperation operation + = new GetTemplate.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Cancel an existing grab + * + *

Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription. + * Note: This cancellation does not persist across a server restart, but neither does a rolling subscription itself. + * + * @return The async call builder + */ + public CancelGrabRequestBuilder cancelGrab() { + return new CancelGrabRequestBuilder(sdkConfiguration); + } + + /** + * Cancel an existing grab + * + *

Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription. + * Note: This cancellation does not persist across a server restart, but neither does a rolling subscription itself. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CancelGrabResponse> - The async response + */ + public CompletableFuture cancelGrab(CancelGrabRequest request) { + AsyncRequestOperation operation + = new CancelGrab.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a subscription + * + *

Delete a subscription, cancelling all of its grabs as well + * + * @return The async call builder + */ + public DeleteSubscriptionRequestBuilder deleteSubscription() { + return new DeleteSubscriptionRequestBuilder(sdkConfiguration); + } + + /** + * Delete a subscription + * + *

Delete a subscription, cancelling all of its grabs as well + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<DeleteSubscriptionResponse> - The async response + */ + public CompletableFuture deleteSubscription(DeleteSubscriptionRequest request) { + AsyncRequestOperation operation + = new DeleteSubscription.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get a single subscription + * + *

Get a single subscription and potentially the grabs too + * + * @return The async call builder + */ + public GetSubscriptionRequestBuilder getSubscription() { + return new GetSubscriptionRequestBuilder(sdkConfiguration); + } + + /** + * Get a single subscription + * + *

Get a single subscription and potentially the grabs too + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetSubscriptionResponse> - The async response + */ + public CompletableFuture getSubscription(GetSubscriptionRequest request) { + AsyncRequestOperation operation + = new GetSubscription.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Edit a subscription + * + *

Edit a subscription's preferences + * + * @return The async call builder + */ + public EditSubscriptionPreferencesRequestBuilder editSubscriptionPreferences() { + return new EditSubscriptionPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Edit a subscription + * + *

Edit a subscription's preferences + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<EditSubscriptionPreferencesResponse> - The async response + */ + public CompletableFuture editSubscriptionPreferences(EditSubscriptionPreferencesRequest request) { + AsyncRequestOperation operation + = new EditSubscriptionPreferences.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Re-order a subscription + * + *

Re-order a subscription to change its priority + * + * @return The async call builder + */ + public ReorderSubscriptionRequestBuilder reorderSubscription() { + return new ReorderSubscriptionRequestBuilder(sdkConfiguration); + } + + /** + * Re-order a subscription + * + *

Re-order a subscription to change its priority + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ReorderSubscriptionResponse> - The async response + */ + public CompletableFuture reorderSubscription(ReorderSubscriptionRequest request) { + AsyncRequestOperation operation + = new ReorderSubscription.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncTimeline.java b/src/main/java/dev/plexapi/sdk/AsyncTimeline.java new file mode 100644 index 00000000..f8215552 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncTimeline.java @@ -0,0 +1,128 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.MarkPlayedRequest; +import dev.plexapi.sdk.models.operations.ReportRequest; +import dev.plexapi.sdk.models.operations.UnscrobbleRequest; +import dev.plexapi.sdk.models.operations.async.MarkPlayedRequestBuilder; +import dev.plexapi.sdk.models.operations.async.MarkPlayedResponse; +import dev.plexapi.sdk.models.operations.async.ReportRequestBuilder; +import dev.plexapi.sdk.models.operations.async.ReportResponse; +import dev.plexapi.sdk.models.operations.async.UnscrobbleRequestBuilder; +import dev.plexapi.sdk.models.operations.async.UnscrobbleResponse; +import dev.plexapi.sdk.operations.MarkPlayed; +import dev.plexapi.sdk.operations.Report; +import dev.plexapi.sdk.operations.Unscrobble; +import java.util.concurrent.CompletableFuture; + +/** + * The actions feature within a media provider + */ +public class AsyncTimeline { + private final SDKConfiguration sdkConfiguration; + private final Timeline syncSDK; + + AsyncTimeline(Timeline syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Timeline sync() { + return syncSDK; + } + + + /** + * Mark an item as played + * + *

Mark an item as played. Note, this does not create any view history of this item but rather just sets the state as played. The client must provide either the `key` or `uri` query parameter + * This API does respond to the GET verb but applications should use PUT + * + * @return The async call builder + */ + public MarkPlayedRequestBuilder markPlayed() { + return new MarkPlayedRequestBuilder(sdkConfiguration); + } + + /** + * Mark an item as played + * + *

Mark an item as played. Note, this does not create any view history of this item but rather just sets the state as played. The client must provide either the `key` or `uri` query parameter + * This API does respond to the GET verb but applications should use PUT + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<MarkPlayedResponse> - The async response + */ + public CompletableFuture markPlayed(MarkPlayedRequest request) { + AsyncRequestOperation operation + = new MarkPlayed.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Report media timeline + * + *

This endpoint is hit during media playback for an item. It must be hit whenever the play state changes, or in the absence of a play state change, in a regular fashion (generally this means every 10 seconds on a LAN/WAN, and every 20 seconds over cellular). + * + * @return The async call builder + */ + public ReportRequestBuilder report() { + return new ReportRequestBuilder(sdkConfiguration); + } + + /** + * Report media timeline + * + *

This endpoint is hit during media playback for an item. It must be hit whenever the play state changes, or in the absence of a play state change, in a regular fashion (generally this means every 10 seconds on a LAN/WAN, and every 20 seconds over cellular). + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<ReportResponse> - The async response + */ + public CompletableFuture report(ReportRequest request) { + AsyncRequestOperation operation + = new Report.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Mark an item as unplayed + * + *

Mark an item as unplayed. The client must provide either the `key` or `uri` query parameter + * This API does respond to the GET verb but applications should use PUT + * + * @return The async call builder + */ + public UnscrobbleRequestBuilder unscrobble() { + return new UnscrobbleRequestBuilder(sdkConfiguration); + } + + /** + * Mark an item as unplayed + * + *

Mark an item as unplayed. The client must provide either the `key` or `uri` query parameter + * This API does respond to the GET verb but applications should use PUT + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<UnscrobbleResponse> - The async response + */ + public CompletableFuture unscrobble(UnscrobbleRequest request) { + AsyncRequestOperation operation + = new Unscrobble.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncTranscoder.java b/src/main/java/dev/plexapi/sdk/AsyncTranscoder.java new file mode 100644 index 00000000..6c31b2a6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncTranscoder.java @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.MakeDecisionRequest; +import dev.plexapi.sdk.models.operations.StartTranscodeSessionRequest; +import dev.plexapi.sdk.models.operations.TranscodeImageRequest; +import dev.plexapi.sdk.models.operations.TranscodeSubtitlesRequest; +import dev.plexapi.sdk.models.operations.TriggerFallbackRequest; +import dev.plexapi.sdk.models.operations.async.MakeDecisionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.MakeDecisionResponse; +import dev.plexapi.sdk.models.operations.async.StartTranscodeSessionRequestBuilder; +import dev.plexapi.sdk.models.operations.async.StartTranscodeSessionResponse; +import dev.plexapi.sdk.models.operations.async.TranscodeImageRequestBuilder; +import dev.plexapi.sdk.models.operations.async.TranscodeImageResponse; +import dev.plexapi.sdk.models.operations.async.TranscodeSubtitlesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.TranscodeSubtitlesResponse; +import dev.plexapi.sdk.models.operations.async.TriggerFallbackRequestBuilder; +import dev.plexapi.sdk.models.operations.async.TriggerFallbackResponse; +import dev.plexapi.sdk.operations.MakeDecision; +import dev.plexapi.sdk.operations.StartTranscodeSession; +import dev.plexapi.sdk.operations.TranscodeImage; +import dev.plexapi.sdk.operations.TranscodeSubtitles; +import dev.plexapi.sdk.operations.TriggerFallback; +import java.util.concurrent.CompletableFuture; + +/** + * API Operations against the Transcoder + */ +public class AsyncTranscoder { + private final SDKConfiguration sdkConfiguration; + private final Transcoder syncSDK; + + AsyncTranscoder(Transcoder syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Transcoder sync() { + return syncSDK; + } + + + /** + * Transcode an image + * + *

Transcode an image, possibly changing format or size + * + * @return The async call builder + */ + public TranscodeImageRequestBuilder transcodeImage() { + return new TranscodeImageRequestBuilder(sdkConfiguration); + } + + /** + * Transcode an image + * + *

Transcode an image, possibly changing format or size + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<TranscodeImageResponse> - The async response + */ + public CompletableFuture transcodeImage(TranscodeImageRequest request) { + AsyncRequestOperation operation + = new TranscodeImage.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Make a decision on media playback + * + *

Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution. + * + * @return The async call builder + */ + public MakeDecisionRequestBuilder makeDecision() { + return new MakeDecisionRequestBuilder(sdkConfiguration); + } + + /** + * Make a decision on media playback + * + *

Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<MakeDecisionResponse> - The async response + */ + public CompletableFuture makeDecision(MakeDecisionRequest request) { + AsyncRequestOperation operation + = new MakeDecision.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Manually trigger a transcoder fallback + * + *

Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw + * + * @return The async call builder + */ + public TriggerFallbackRequestBuilder triggerFallback() { + return new TriggerFallbackRequestBuilder(sdkConfiguration); + } + + /** + * Manually trigger a transcoder fallback + * + *

Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<TriggerFallbackResponse> - The async response + */ + public CompletableFuture triggerFallback(TriggerFallbackRequest request) { + AsyncRequestOperation operation + = new TriggerFallback.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Transcode subtitles + * + *

Only transcode subtitle streams. + * + * @return The async call builder + */ + public TranscodeSubtitlesRequestBuilder transcodeSubtitles() { + return new TranscodeSubtitlesRequestBuilder(sdkConfiguration); + } + + /** + * Transcode subtitles + * + *

Only transcode subtitle streams. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<TranscodeSubtitlesResponse> - The async response + */ + public CompletableFuture transcodeSubtitles(TranscodeSubtitlesRequest request) { + AsyncRequestOperation operation + = new TranscodeSubtitles.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Start A Transcoding Session + * + *

Starts the transcoder and returns the corresponding streaming resource document. + * + * @return The async call builder + */ + public StartTranscodeSessionRequestBuilder startTranscodeSession() { + return new StartTranscodeSessionRequestBuilder(sdkConfiguration); + } + + /** + * Start A Transcoding Session + * + *

Starts the transcoder and returns the corresponding streaming resource document. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<StartTranscodeSessionResponse> - The async response + */ + public CompletableFuture startTranscodeSession(StartTranscodeSessionRequest request) { + AsyncRequestOperation operation + = new StartTranscodeSession.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncUltraBlur.java b/src/main/java/dev/plexapi/sdk/AsyncUltraBlur.java new file mode 100644 index 00000000..e4c88cff --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/AsyncUltraBlur.java @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.models.operations.GetColorsRequest; +import dev.plexapi.sdk.models.operations.GetImageRequest; +import dev.plexapi.sdk.models.operations.async.GetColorsRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetColorsResponse; +import dev.plexapi.sdk.models.operations.async.GetImageRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetImageResponse; +import dev.plexapi.sdk.operations.GetColors; +import dev.plexapi.sdk.operations.GetImage; +import java.util.concurrent.CompletableFuture; + +/** + * Service provided to compute UltraBlur colors and images. + */ +public class AsyncUltraBlur { + private final SDKConfiguration sdkConfiguration; + private final UltraBlur syncSDK; + + AsyncUltraBlur(UltraBlur syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public UltraBlur sync() { + return syncSDK; + } + + + /** + * Get UltraBlur Colors + * + *

Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image. + * + * @return The async call builder + */ + public GetColorsRequestBuilder getColors() { + return new GetColorsRequestBuilder(sdkConfiguration); + } + + /** + * Get UltraBlur Colors + * + *

Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetColorsResponse> - The async response + */ + public CompletableFuture getColors(GetColorsRequest request) { + AsyncRequestOperation operation + = new GetColors.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get UltraBlur Image + * + *

Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint. + * + * @return The async call builder + */ + public GetImageRequestBuilder getImage() { + return new GetImageRequestBuilder(sdkConfiguration); + } + + /** + * Get UltraBlur Image + * + *

Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint. + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<GetImageResponse> - The async response + */ + public CompletableFuture getImage(GetImageRequest request) { + AsyncRequestOperation operation + = new GetImage.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/AsyncUpdater.java b/src/main/java/dev/plexapi/sdk/AsyncUpdater.java index b597fdaf..27e53077 100644 --- a/src/main/java/dev/plexapi/sdk/AsyncUpdater.java +++ b/src/main/java/dev/plexapi/sdk/AsyncUpdater.java @@ -3,24 +3,20 @@ */ package dev.plexapi.sdk; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; import dev.plexapi.sdk.models.operations.ApplyUpdatesRequest; -import dev.plexapi.sdk.models.operations.CheckForUpdatesRequest; -import dev.plexapi.sdk.models.operations.Download; -import dev.plexapi.sdk.models.operations.Skip; -import dev.plexapi.sdk.models.operations.Tonight; +import dev.plexapi.sdk.models.operations.CheckUpdatesRequest; import dev.plexapi.sdk.models.operations.async.ApplyUpdatesRequestBuilder; import dev.plexapi.sdk.models.operations.async.ApplyUpdatesResponse; -import dev.plexapi.sdk.models.operations.async.CheckForUpdatesRequestBuilder; -import dev.plexapi.sdk.models.operations.async.CheckForUpdatesResponse; -import dev.plexapi.sdk.models.operations.async.GetUpdateStatusRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetUpdateStatusResponse; +import dev.plexapi.sdk.models.operations.async.CheckUpdatesRequestBuilder; +import dev.plexapi.sdk.models.operations.async.CheckUpdatesResponse; +import dev.plexapi.sdk.models.operations.async.GetUpdatesStatusRequestBuilder; +import dev.plexapi.sdk.models.operations.async.GetUpdatesStatusResponse; import dev.plexapi.sdk.operations.ApplyUpdates; -import dev.plexapi.sdk.operations.CheckForUpdates; -import dev.plexapi.sdk.operations.GetUpdateStatus; -import java.util.Optional; +import dev.plexapi.sdk.operations.CheckUpdates; +import dev.plexapi.sdk.operations.GetUpdatesStatus; import java.util.concurrent.CompletableFuture; /** @@ -47,78 +43,9 @@ public class AsyncUpdater { /** - * Querying status of updates + * Applying updates * - *

Querying status of updates - * - * @return The async call builder - */ - public GetUpdateStatusRequestBuilder getUpdateStatus() { - return new GetUpdateStatusRequestBuilder(sdkConfiguration); - } - - /** - * Querying status of updates - * - *

Querying status of updates - * - * @return CompletableFuture<GetUpdateStatusResponse> - The async response - */ - public CompletableFuture getUpdateStatusDirect() { - AsyncRequestlessOperation operation - = new GetUpdateStatus.Async(sdkConfiguration); - return operation.doRequest() - .thenCompose(operation::handleResponse); - } - - - /** - * Checking for updates - * - *

Checking for updates - * - * @return The async call builder - */ - public CheckForUpdatesRequestBuilder checkForUpdates() { - return new CheckForUpdatesRequestBuilder(sdkConfiguration); - } - - /** - * Checking for updates - * - *

Checking for updates - * - * @return CompletableFuture<CheckForUpdatesResponse> - The async response - */ - public CompletableFuture checkForUpdatesDirect() { - return checkForUpdates(Optional.empty()); - } - - /** - * Checking for updates - * - *

Checking for updates - * - * @param download Indicate that you want to start download any updates found. - * @return CompletableFuture<CheckForUpdatesResponse> - The async response - */ - public CompletableFuture checkForUpdates(Optional download) { - CheckForUpdatesRequest request = - CheckForUpdatesRequest - .builder() - .download(download) - .build(); - AsyncRequestOperation operation - = new CheckForUpdates.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Apply Updates - * - *

Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed + *

Apply any downloaded updates. Note that the two parameters `tonight` and `skip` are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed. * * @return The async call builder */ @@ -127,36 +54,71 @@ public class AsyncUpdater { } /** - * Apply Updates + * Applying updates * - *

Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed + *

Apply any downloaded updates. Note that the two parameters `tonight` and `skip` are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed. * + * @param request The request object containing all the parameters for the API call. * @return CompletableFuture<ApplyUpdatesResponse> - The async response */ - public CompletableFuture applyUpdatesDirect() { - return applyUpdates(Optional.empty(), Optional.empty()); - } - - /** - * Apply Updates - * - *

Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed - * - * @param tonight Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install - * @param skip Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. - * @return CompletableFuture<ApplyUpdatesResponse> - The async response - */ - public CompletableFuture applyUpdates(Optional tonight, Optional skip) { - ApplyUpdatesRequest request = - ApplyUpdatesRequest - .builder() - .tonight(tonight) - .skip(skip) - .build(); + public CompletableFuture applyUpdates(ApplyUpdatesRequest request) { AsyncRequestOperation operation = new ApplyUpdates.Async(sdkConfiguration); return operation.doRequest(request) .thenCompose(operation::handleResponse); } + + /** + * Checking for updates + * + *

Perform an update check and potentially download + * + * @return The async call builder + */ + public CheckUpdatesRequestBuilder checkUpdates() { + return new CheckUpdatesRequestBuilder(sdkConfiguration); + } + + /** + * Checking for updates + * + *

Perform an update check and potentially download + * + * @param request The request object containing all the parameters for the API call. + * @return CompletableFuture<CheckUpdatesResponse> - The async response + */ + public CompletableFuture checkUpdates(CheckUpdatesRequest request) { + AsyncRequestOperation operation + = new CheckUpdates.Async(sdkConfiguration); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Querying status of updates + * + *

Get the status of updating the server + * + * @return The async call builder + */ + public GetUpdatesStatusRequestBuilder getUpdatesStatus() { + return new GetUpdatesStatusRequestBuilder(sdkConfiguration); + } + + /** + * Querying status of updates + * + *

Get the status of updating the server + * + * @return CompletableFuture<GetUpdatesStatusResponse> - The async response + */ + public CompletableFuture getUpdatesStatusDirect() { + AsyncRequestlessOperation operation + = new GetUpdatesStatus.Async(sdkConfiguration); + return operation.doRequest() + .thenCompose(operation::handleResponse); + } + } diff --git a/src/main/java/dev/plexapi/sdk/AsyncUsers.java b/src/main/java/dev/plexapi/sdk/AsyncUsers.java deleted file mode 100644 index 982c0b35..00000000 --- a/src/main/java/dev/plexapi/sdk/AsyncUsers.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.models.operations.GetUsersRequest; -import dev.plexapi.sdk.models.operations.async.GetUsersRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetUsersResponse; -import dev.plexapi.sdk.operations.GetUsers; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - - -public class AsyncUsers { - private final SDKConfiguration sdkConfiguration; - private final Users syncSDK; - - AsyncUsers(Users syncSDK, SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.syncSDK = syncSDK; - } - - /** - * Switches to the sync SDK. - * - * @return The sync SDK - */ - public Users sync() { - return syncSDK; - } - - - /** - * Get list of all connected users - * - *

Get list of all users that are friends and have library access with the provided Plex authentication token - * - * @return The async call builder - */ - public GetUsersRequestBuilder getUsers() { - return new GetUsersRequestBuilder(sdkConfiguration); - } - - /** - * Get list of all connected users - * - *

Get list of all users that are friends and have library access with the provided Plex authentication token - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetUsersResponse> - The async response - */ - public CompletableFuture getUsers(GetUsersRequest request) { - return getUsers(request, Optional.empty()); - } - - /** - * Get list of all connected users - * - *

Get list of all users that are friends and have library access with the provided Plex authentication token - * - * @param request The request object containing all the parameters for the API call. - * @param serverURL Overrides the server URL. - * @return CompletableFuture<GetUsersResponse> - The async response - */ - public CompletableFuture getUsers(GetUsersRequest request, Optional serverURL) { - AsyncRequestOperation operation - = new GetUsers.Async(sdkConfiguration, serverURL); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/AsyncVideo.java b/src/main/java/dev/plexapi/sdk/AsyncVideo.java deleted file mode 100644 index dc5651ea..00000000 --- a/src/main/java/dev/plexapi/sdk/AsyncVideo.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.models.operations.GetTimelineRequest; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest; -import dev.plexapi.sdk.models.operations.async.GetTimelineRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetTimelineResponse; -import dev.plexapi.sdk.models.operations.async.StartUniversalTranscodeRequestBuilder; -import dev.plexapi.sdk.models.operations.async.StartUniversalTranscodeResponse; -import dev.plexapi.sdk.operations.GetTimeline; -import dev.plexapi.sdk.operations.StartUniversalTranscode; -import java.util.concurrent.CompletableFuture; - -/** - * API Calls that perform operations with Plex Media Server Videos - */ -public class AsyncVideo { - private final SDKConfiguration sdkConfiguration; - private final Video syncSDK; - - AsyncVideo(Video syncSDK, SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.syncSDK = syncSDK; - } - - /** - * Switches to the sync SDK. - * - * @return The sync SDK - */ - public Video sync() { - return syncSDK; - } - - - /** - * Get the timeline for a media item - * - *

Get the timeline for a media item - * - * @return The async call builder - */ - public GetTimelineRequestBuilder getTimeline() { - return new GetTimelineRequestBuilder(sdkConfiguration); - } - - /** - * Get the timeline for a media item - * - *

Get the timeline for a media item - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetTimelineResponse> - The async response - */ - public CompletableFuture getTimeline(GetTimelineRequest request) { - AsyncRequestOperation operation - = new GetTimeline.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - - /** - * Start Universal Transcode - * - *

Begin a Universal Transcode Session - * - * @return The async call builder - */ - public StartUniversalTranscodeRequestBuilder startUniversalTranscode() { - return new StartUniversalTranscodeRequestBuilder(sdkConfiguration); - } - - /** - * Start Universal Transcode - * - *

Begin a Universal Transcode Session - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<StartUniversalTranscodeResponse> - The async response - */ - public CompletableFuture startUniversalTranscode(StartUniversalTranscodeRequest request) { - AsyncRequestOperation operation - = new StartUniversalTranscode.Async(sdkConfiguration); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/AsyncWatchlist.java b/src/main/java/dev/plexapi/sdk/AsyncWatchlist.java deleted file mode 100644 index aa44b2b4..00000000 --- a/src/main/java/dev/plexapi/sdk/AsyncWatchlist.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.models.operations.GetWatchListRequest; -import dev.plexapi.sdk.models.operations.async.GetWatchListRequestBuilder; -import dev.plexapi.sdk.models.operations.async.GetWatchListResponse; -import dev.plexapi.sdk.operations.GetWatchList; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -/** - * API Calls that perform operations with Plex Media Server Watchlists - */ -public class AsyncWatchlist { - private final SDKConfiguration sdkConfiguration; - private final Watchlist syncSDK; - - AsyncWatchlist(Watchlist syncSDK, SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.syncSDK = syncSDK; - } - - /** - * Switches to the sync SDK. - * - * @return The sync SDK - */ - public Watchlist sync() { - return syncSDK; - } - - - /** - * Get User Watchlist - * - *

Get User Watchlist - * - * @return The async call builder - */ - public GetWatchListRequestBuilder getWatchList() { - return new GetWatchListRequestBuilder(sdkConfiguration); - } - - /** - * Get User Watchlist - * - *

Get User Watchlist - * - * @param request The request object containing all the parameters for the API call. - * @return CompletableFuture<GetWatchListResponse> - The async response - */ - public CompletableFuture getWatchList(GetWatchListRequest request) { - return getWatchList(request, Optional.empty()); - } - - /** - * Get User Watchlist - * - *

Get User Watchlist - * - * @param request The request object containing all the parameters for the API call. - * @param serverURL Overrides the server URL. - * @return CompletableFuture<GetWatchListResponse> - The async response - */ - public CompletableFuture getWatchList(GetWatchListRequest request, Optional serverURL) { - AsyncRequestOperation operation - = new GetWatchList.Async(sdkConfiguration, serverURL); - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/Authentication.java b/src/main/java/dev/plexapi/sdk/Authentication.java deleted file mode 100644 index 30f1ec61..00000000 --- a/src/main/java/dev/plexapi/sdk/Authentication.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequest; -import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequestBuilder; -import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse; -import dev.plexapi.sdk.models.operations.GetTokenDetailsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse; -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.PostUsersSignInDataRequest; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBuilder; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse; -import dev.plexapi.sdk.models.operations.Scope; -import dev.plexapi.sdk.operations.GetSourceConnectionInformation; -import dev.plexapi.sdk.operations.GetTokenDetails; -import dev.plexapi.sdk.operations.GetTransientToken; -import dev.plexapi.sdk.operations.PostUsersSignInData; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -/** - * API Calls regarding authentication for Plex Media Server - */ -public class Authentication { - private final SDKConfiguration sdkConfiguration; - private final AsyncAuthentication asyncSDK; - - Authentication(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.asyncSDK = new AsyncAuthentication(this, sdkConfiguration); - } - - /** - * Switches to the async SDK. - * - * @return The async SDK - */ - public AsyncAuthentication async() { - return asyncSDK; - } - - /** - * Get a Transient Token - * - *

This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. - * - * @return The call builder - */ - public GetTransientTokenRequestBuilder getTransientToken() { - return new GetTransientTokenRequestBuilder(sdkConfiguration); - } - - /** - * Get a Transient Token - * - *

This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. - * - * @param type `delegation` - This is the only supported `type` parameter. - * @param scope `all` - This is the only supported `scope` parameter. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetTransientTokenResponse getTransientToken(GetTransientTokenQueryParamType type, Scope scope) throws Exception { - GetTransientTokenRequest request = - GetTransientTokenRequest - .builder() - .type(type) - .scope(scope) - .build(); - RequestOperation operation - = new GetTransientToken.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Source Connection Information - * - *

If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. - * Note: requires Plex Media Server >= 1.15.4. - * - * @return The call builder - */ - public GetSourceConnectionInformationRequestBuilder getSourceConnectionInformation() { - return new GetSourceConnectionInformationRequestBuilder(sdkConfiguration); - } - - /** - * Get Source Connection Information - * - *

If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. - * Note: requires Plex Media Server >= 1.15.4. - * - * @param source The source identifier with an included prefix. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetSourceConnectionInformationResponse getSourceConnectionInformation(String source) throws Exception { - GetSourceConnectionInformationRequest request = - GetSourceConnectionInformationRequest - .builder() - .source(source) - .build(); - RequestOperation operation - = new GetSourceConnectionInformation.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Token Details - * - *

Get the User data from the provided X-Plex-Token - * - * @return The call builder - */ - public GetTokenDetailsRequestBuilder getTokenDetails() { - return new GetTokenDetailsRequestBuilder(sdkConfiguration); - } - - /** - * Get Token Details - * - *

Get the User data from the provided X-Plex-Token - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetTokenDetailsResponse getTokenDetailsDirect() throws Exception { - return getTokenDetails(Optional.empty()); - } - - /** - * Get Token Details - * - *

Get the User data from the provided X-Plex-Token - * - * @param serverURL Overrides the server URL. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetTokenDetailsResponse getTokenDetails(Optional serverURL) throws Exception { - RequestlessOperation operation - = new GetTokenDetails.Sync(sdkConfiguration, serverURL); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get User Sign In Data - * - *

Sign in user with username and password and return user data with Plex authentication token - * - * @return The call builder - */ - public PostUsersSignInDataRequestBuilder postUsersSignInData() { - return new PostUsersSignInDataRequestBuilder(sdkConfiguration); - } - - /** - * 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 the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public PostUsersSignInDataResponse postUsersSignInData(PostUsersSignInDataRequest request) throws Exception { - return postUsersSignInData(request, Optional.empty()); - } - - /** - * 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 the parameters for the API call. - * @param serverURL Overrides the server URL. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public PostUsersSignInDataResponse postUsersSignInData(PostUsersSignInDataRequest request, Optional serverURL) throws Exception { - RequestOperation operation - = new PostUsersSignInData.Sync(sdkConfiguration, serverURL); - return operation.handleResponse(operation.doRequest(request)); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/Butler.java b/src/main/java/dev/plexapi/sdk/Butler.java index 27c19b82..80d9674d 100644 --- a/src/main/java/dev/plexapi/sdk/Butler.java +++ b/src/main/java/dev/plexapi/sdk/Butler.java @@ -6,29 +6,27 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import dev.plexapi.sdk.models.operations.GetButlerTasksRequestBuilder; -import dev.plexapi.sdk.models.operations.GetButlerTasksResponse; -import dev.plexapi.sdk.models.operations.PathParamTaskName; -import dev.plexapi.sdk.models.operations.StartAllTasksRequestBuilder; -import dev.plexapi.sdk.models.operations.StartAllTasksResponse; +import dev.plexapi.sdk.models.operations.GetTasksRequestBuilder; +import dev.plexapi.sdk.models.operations.GetTasksResponse; import dev.plexapi.sdk.models.operations.StartTaskRequest; import dev.plexapi.sdk.models.operations.StartTaskRequestBuilder; import dev.plexapi.sdk.models.operations.StartTaskResponse; -import dev.plexapi.sdk.models.operations.StopAllTasksRequestBuilder; -import dev.plexapi.sdk.models.operations.StopAllTasksResponse; +import dev.plexapi.sdk.models.operations.StartTasksRequestBuilder; +import dev.plexapi.sdk.models.operations.StartTasksResponse; import dev.plexapi.sdk.models.operations.StopTaskRequest; import dev.plexapi.sdk.models.operations.StopTaskRequestBuilder; import dev.plexapi.sdk.models.operations.StopTaskResponse; -import dev.plexapi.sdk.models.operations.TaskName; -import dev.plexapi.sdk.operations.GetButlerTasks; -import dev.plexapi.sdk.operations.StartAllTasks; +import dev.plexapi.sdk.models.operations.StopTasksRequestBuilder; +import dev.plexapi.sdk.models.operations.StopTasksResponse; +import dev.plexapi.sdk.operations.GetTasks; import dev.plexapi.sdk.operations.StartTask; -import dev.plexapi.sdk.operations.StopAllTasks; +import dev.plexapi.sdk.operations.StartTasks; import dev.plexapi.sdk.operations.StopTask; +import dev.plexapi.sdk.operations.StopTasks; import java.lang.Exception; /** - * Butler is the task manager of the Plex Media Server Ecosystem. + * The butler is responsible for running periodic tasks. Some tasks run daily, others every few days, and some weekly. These includes database maintenance, metadata updating, thumbnail generation, media analysis, and other tasks. */ public class Butler { private final SDKConfiguration sdkConfiguration; @@ -48,64 +46,6 @@ public class Butler { return asyncSDK; } - /** - * Get Butler tasks - * - *

Returns a list of butler tasks - * - * @return The call builder - */ - public GetButlerTasksRequestBuilder getButlerTasks() { - return new GetButlerTasksRequestBuilder(sdkConfiguration); - } - - /** - * Get Butler tasks - * - *

Returns a list of butler tasks - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetButlerTasksResponse getButlerTasksDirect() throws Exception { - RequestlessOperation operation - = new GetButlerTasks.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Start all Butler tasks - * - *

This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - * 1. Any tasks not scheduled to run on the current day will be skipped. - * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - * 4. If we are outside the configured window, the task will start immediately. - * - * @return The call builder - */ - public StartAllTasksRequestBuilder startAllTasks() { - return new StartAllTasksRequestBuilder(sdkConfiguration); - } - - /** - * Start all Butler tasks - * - *

This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - * 1. Any tasks not scheduled to run on the current day will be skipped. - * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - * 4. If we are outside the configured window, the task will start immediately. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public StartAllTasksResponse startAllTasksDirect() throws Exception { - RequestlessOperation operation - = new StartAllTasks.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - /** * Stop all Butler tasks * @@ -113,8 +53,8 @@ public class Butler { * * @return The call builder */ - public StopAllTasksRequestBuilder stopAllTasks() { - return new StopAllTasksRequestBuilder(sdkConfiguration); + public StopTasksRequestBuilder stopTasks() { + return new StopTasksRequestBuilder(sdkConfiguration); } /** @@ -125,55 +65,76 @@ public class Butler { * @return The response from the API call * @throws Exception if the API call fails */ - public StopAllTasksResponse stopAllTasksDirect() throws Exception { - RequestlessOperation operation - = new StopAllTasks.Sync(sdkConfiguration); + public StopTasksResponse stopTasksDirect() throws Exception { + RequestlessOperation operation + = new StopTasks.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest()); } /** - * Start a single Butler task + * Get all Butler tasks * - *

This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - * 1. Any tasks not scheduled to run on the current day will be skipped. - * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - * 4. If we are outside the configured window, the task will start immediately. + *

Get the list of butler tasks and their scheduling * * @return The call builder */ - public StartTaskRequestBuilder startTask() { - return new StartTaskRequestBuilder(sdkConfiguration); + public GetTasksRequestBuilder getTasks() { + return new GetTasksRequestBuilder(sdkConfiguration); } /** - * Start a single Butler task + * Get all Butler tasks * - *

This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - * 1. Any tasks not scheduled to run on the current day will be skipped. - * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - * 4. If we are outside the configured window, the task will start immediately. + *

Get the list of butler tasks and their scheduling * - * @param taskName the name of the task to be started. * @return The response from the API call * @throws Exception if the API call fails */ - public StartTaskResponse startTask(TaskName taskName) throws Exception { - StartTaskRequest request = - StartTaskRequest - .builder() - .taskName(taskName) - .build(); - RequestOperation operation - = new StartTask.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); + public GetTasksResponse getTasksDirect() throws Exception { + RequestlessOperation operation + = new GetTasks.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Start all Butler tasks + * + *

This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + * + *

1. Any tasks not scheduled to run on the current day will be skipped. + * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + * 4. If we are outside the configured window, the task will start immediately. + * + * @return The call builder + */ + public StartTasksRequestBuilder startTasks() { + return new StartTasksRequestBuilder(sdkConfiguration); + } + + /** + * Start all Butler tasks + * + *

This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + * + *

1. Any tasks not scheduled to run on the current day will be skipped. + * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + * 4. If we are outside the configured window, the task will start immediately. + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public StartTasksResponse startTasksDirect() throws Exception { + RequestlessOperation operation + = new StartTasks.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); } /** * Stop a single Butler task * - *

This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. + *

This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists * * @return The call builder */ @@ -184,21 +145,42 @@ public class Butler { /** * Stop a single Butler task * - *

This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. + *

This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists * - * @param taskName The name of the task to be started. + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public StopTaskResponse stopTask(PathParamTaskName taskName) throws Exception { - StopTaskRequest request = - StopTaskRequest - .builder() - .taskName(taskName) - .build(); + public StopTaskResponse stopTask(StopTaskRequest request) throws Exception { RequestOperation operation = new StopTask.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } + /** + * Start a single Butler task + * + *

This endpoint will attempt to start a specific Butler task by name. + * + * @return The call builder + */ + public StartTaskRequestBuilder startTask() { + return new StartTaskRequestBuilder(sdkConfiguration); + } + + /** + * Start a single Butler task + * + *

This endpoint will attempt to start a specific Butler task by name. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public StartTaskResponse startTask(StartTaskRequest request) throws Exception { + RequestOperation operation + = new StartTask.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + } diff --git a/src/main/java/dev/plexapi/sdk/Collections.java b/src/main/java/dev/plexapi/sdk/Collections.java new file mode 100644 index 00000000..c447706f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Collections.java @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.CreateCollectionRequest; +import dev.plexapi.sdk.models.operations.CreateCollectionRequestBuilder; +import dev.plexapi.sdk.models.operations.CreateCollectionResponse; +import dev.plexapi.sdk.operations.CreateCollection; +import java.lang.Exception; + +/** + * API Operations against the Collections + */ +public class Collections { + private final SDKConfiguration sdkConfiguration; + private final AsyncCollections asyncSDK; + + Collections(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncCollections(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncCollections async() { + return asyncSDK; + } + + /** + * Create collection + * + *

Create a collection in the library + * + * @return The call builder + */ + public CreateCollectionRequestBuilder createCollection() { + return new CreateCollectionRequestBuilder(sdkConfiguration); + } + + /** + * Create collection + * + *

Create a collection in the library + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateCollectionResponse createCollection(CreateCollectionRequest request) throws Exception { + RequestOperation operation + = new CreateCollection.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Content.java b/src/main/java/dev/plexapi/sdk/Content.java new file mode 100644 index 00000000..4d0b9a4e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Content.java @@ -0,0 +1,421 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.GetAlbumsRequest; +import dev.plexapi.sdk.models.operations.GetAlbumsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetAlbumsResponse; +import dev.plexapi.sdk.models.operations.GetAllLeavesRequest; +import dev.plexapi.sdk.models.operations.GetAllLeavesRequestBuilder; +import dev.plexapi.sdk.models.operations.GetAllLeavesResponse; +import dev.plexapi.sdk.models.operations.GetArtsRequest; +import dev.plexapi.sdk.models.operations.GetArtsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetArtsResponse; +import dev.plexapi.sdk.models.operations.GetCategoriesRequest; +import dev.plexapi.sdk.models.operations.GetCategoriesRequestBuilder; +import dev.plexapi.sdk.models.operations.GetCategoriesResponse; +import dev.plexapi.sdk.models.operations.GetClusterRequest; +import dev.plexapi.sdk.models.operations.GetClusterRequestBuilder; +import dev.plexapi.sdk.models.operations.GetClusterResponse; +import dev.plexapi.sdk.models.operations.GetCollectionImageRequest; +import dev.plexapi.sdk.models.operations.GetCollectionImageRequestBuilder; +import dev.plexapi.sdk.models.operations.GetCollectionImageResponse; +import dev.plexapi.sdk.models.operations.GetCollectionItemsRequest; +import dev.plexapi.sdk.models.operations.GetCollectionItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetCollectionItemsResponse; +import dev.plexapi.sdk.models.operations.GetFoldersRequest; +import dev.plexapi.sdk.models.operations.GetFoldersRequestBuilder; +import dev.plexapi.sdk.models.operations.GetFoldersResponse; +import dev.plexapi.sdk.models.operations.GetMetadataItemRequest; +import dev.plexapi.sdk.models.operations.GetMetadataItemRequestBuilder; +import dev.plexapi.sdk.models.operations.GetMetadataItemResponse; +import dev.plexapi.sdk.models.operations.GetSonicPathRequest; +import dev.plexapi.sdk.models.operations.GetSonicPathRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSonicPathResponse; +import dev.plexapi.sdk.models.operations.GetSonicallySimilarRequest; +import dev.plexapi.sdk.models.operations.GetSonicallySimilarRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSonicallySimilarResponse; +import dev.plexapi.sdk.models.operations.ListContentRequest; +import dev.plexapi.sdk.models.operations.ListContentRequestBuilder; +import dev.plexapi.sdk.models.operations.ListContentResponse; +import dev.plexapi.sdk.models.operations.ListMomentsRequest; +import dev.plexapi.sdk.models.operations.ListMomentsRequestBuilder; +import dev.plexapi.sdk.models.operations.ListMomentsResponse; +import dev.plexapi.sdk.operations.GetAlbums; +import dev.plexapi.sdk.operations.GetAllLeaves; +import dev.plexapi.sdk.operations.GetArts; +import dev.plexapi.sdk.operations.GetCategories; +import dev.plexapi.sdk.operations.GetCluster; +import dev.plexapi.sdk.operations.GetCollectionImage; +import dev.plexapi.sdk.operations.GetCollectionItems; +import dev.plexapi.sdk.operations.GetFolders; +import dev.plexapi.sdk.operations.GetMetadataItem; +import dev.plexapi.sdk.operations.GetSonicPath; +import dev.plexapi.sdk.operations.GetSonicallySimilar; +import dev.plexapi.sdk.operations.ListContent; +import dev.plexapi.sdk.operations.ListMoments; +import java.lang.Exception; + +/** + * The actual content of the media provider + */ +public class Content { + private final SDKConfiguration sdkConfiguration; + private final AsyncContent asyncSDK; + + Content(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncContent(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncContent async() { + return asyncSDK; + } + + /** + * Get items in a collection + * + *

Get items in a collection. Note if this collection contains more than 100 items, paging must be used. + * + * @return The call builder + */ + public GetCollectionItemsRequestBuilder getCollectionItems() { + return new GetCollectionItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get items in a collection + * + *

Get items in a collection. Note if this collection contains more than 100 items, paging must be used. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetCollectionItemsResponse getCollectionItems(GetCollectionItemsRequest request) throws Exception { + RequestOperation operation + = new GetCollectionItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a metadata item + * + *

Get one or more metadata items. + * + * @return The call builder + */ + public GetMetadataItemRequestBuilder getMetadataItem() { + return new GetMetadataItemRequestBuilder(sdkConfiguration); + } + + /** + * Get a metadata item + * + *

Get one or more metadata items. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetMetadataItemResponse getMetadataItem(GetMetadataItemRequest request) throws Exception { + RequestOperation operation + = new GetMetadataItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set section albums + * + *

Get all albums in a music section + * + * @return The call builder + */ + public GetAlbumsRequestBuilder getAlbums() { + return new GetAlbumsRequestBuilder(sdkConfiguration); + } + + /** + * Set section albums + * + *

Get all albums in a music section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAlbumsResponse getAlbums(GetAlbumsRequest request) throws Exception { + RequestOperation operation + = new GetAlbums.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get items in the section + * + *

Get the items in a section, potentially filtering them + * + * @return The call builder + */ + public ListContentRequestBuilder listContent() { + return new ListContentRequestBuilder(sdkConfiguration); + } + + /** + * Get items in the section + * + *

Get the items in a section, potentially filtering them + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListContentResponse listContent(ListContentRequest request) throws Exception { + RequestOperation operation + = new ListContent.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set section leaves + * + *

Get all leaves in a section (such as episodes in a show section) + * + * @return The call builder + */ + public GetAllLeavesRequestBuilder getAllLeaves() { + return new GetAllLeavesRequestBuilder(sdkConfiguration); + } + + /** + * Set section leaves + * + *

Get all leaves in a section (such as episodes in a show section) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAllLeavesResponse getAllLeaves(GetAllLeavesRequest request) throws Exception { + RequestOperation operation + = new GetAllLeaves.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set section artwork + * + *

Get artwork for a library section + * + * @return The call builder + */ + public GetArtsRequestBuilder getArts() { + return new GetArtsRequestBuilder(sdkConfiguration); + } + + /** + * Set section artwork + * + *

Get artwork for a library section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetArtsResponse getArts(GetArtsRequest request) throws Exception { + RequestOperation operation + = new GetArts.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set section categories + * + *

Get categories in a library section + * + * @return The call builder + */ + public GetCategoriesRequestBuilder getCategories() { + return new GetCategoriesRequestBuilder(sdkConfiguration); + } + + /** + * Set section categories + * + *

Get categories in a library section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetCategoriesResponse getCategories(GetCategoriesRequest request) throws Exception { + RequestOperation operation + = new GetCategories.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set section clusters + * + *

Get clusters in a library section (typically for photos) + * + * @return The call builder + */ + public GetClusterRequestBuilder getCluster() { + return new GetClusterRequestBuilder(sdkConfiguration); + } + + /** + * Set section clusters + * + *

Get clusters in a library section (typically for photos) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetClusterResponse getCluster(GetClusterRequest request) throws Exception { + RequestOperation operation + = new GetCluster.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Similar tracks to transition from one to another + * + *

Get a list of audio tracks starting at one and ending at another which are similar across the path + * + * @return The call builder + */ + public GetSonicPathRequestBuilder getSonicPath() { + return new GetSonicPathRequestBuilder(sdkConfiguration); + } + + /** + * Similar tracks to transition from one to another + * + *

Get a list of audio tracks starting at one and ending at another which are similar across the path + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSonicPathResponse getSonicPath(GetSonicPathRequest request) throws Exception { + RequestOperation operation + = new GetSonicPath.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get all folder locations + * + *

Get all folder locations of the media in a section + * + * @return The call builder + */ + public GetFoldersRequestBuilder getFolders() { + return new GetFoldersRequestBuilder(sdkConfiguration); + } + + /** + * Get all folder locations + * + *

Get all folder locations of the media in a section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetFoldersResponse getFolders(GetFoldersRequest request) throws Exception { + RequestOperation operation + = new GetFolders.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set section moments + * + *

Get moments in a library section (typically for photos) + * + * @return The call builder + */ + public ListMomentsRequestBuilder listMoments() { + return new ListMomentsRequestBuilder(sdkConfiguration); + } + + /** + * Set section moments + * + *

Get moments in a library section (typically for photos) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListMomentsResponse listMoments(ListMomentsRequest request) throws Exception { + RequestOperation operation + = new ListMoments.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * The nearest audio tracks + * + *

Get the nearest audio tracks to a particular analysis + * + * @return The call builder + */ + public GetSonicallySimilarRequestBuilder getSonicallySimilar() { + return new GetSonicallySimilarRequestBuilder(sdkConfiguration); + } + + /** + * The nearest audio tracks + * + *

Get the nearest audio tracks to a particular analysis + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSonicallySimilarResponse getSonicallySimilar(GetSonicallySimilarRequest request) throws Exception { + RequestOperation operation + = new GetSonicallySimilar.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a collection's image + * + *

Get an image for the collection based on the items within + * + * @return The call builder + */ + public GetCollectionImageRequestBuilder getCollectionImage() { + return new GetCollectionImageRequestBuilder(sdkConfiguration); + } + + /** + * Get a collection's image + * + *

Get an image for the collection based on the items within + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetCollectionImageResponse getCollectionImage(GetCollectionImageRequest request) throws Exception { + RequestOperation operation + = new GetCollectionImage.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/DVRs.java b/src/main/java/dev/plexapi/sdk/DVRs.java new file mode 100644 index 00000000..e56a620e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/DVRs.java @@ -0,0 +1,390 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.AddDeviceToDVRRequest; +import dev.plexapi.sdk.models.operations.AddDeviceToDVRRequestBuilder; +import dev.plexapi.sdk.models.operations.AddDeviceToDVRResponse; +import dev.plexapi.sdk.models.operations.AddLineupRequest; +import dev.plexapi.sdk.models.operations.AddLineupRequestBuilder; +import dev.plexapi.sdk.models.operations.AddLineupResponse; +import dev.plexapi.sdk.models.operations.CreateDVRRequest; +import dev.plexapi.sdk.models.operations.CreateDVRRequestBuilder; +import dev.plexapi.sdk.models.operations.CreateDVRResponse; +import dev.plexapi.sdk.models.operations.DeleteDVRRequest; +import dev.plexapi.sdk.models.operations.DeleteDVRRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteDVRResponse; +import dev.plexapi.sdk.models.operations.DeleteLineupRequest; +import dev.plexapi.sdk.models.operations.DeleteLineupRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteLineupResponse; +import dev.plexapi.sdk.models.operations.GetDVRRequest; +import dev.plexapi.sdk.models.operations.GetDVRRequestBuilder; +import dev.plexapi.sdk.models.operations.GetDVRResponse; +import dev.plexapi.sdk.models.operations.ListDVRsRequestBuilder; +import dev.plexapi.sdk.models.operations.ListDVRsResponse; +import dev.plexapi.sdk.models.operations.ReloadGuideRequest; +import dev.plexapi.sdk.models.operations.ReloadGuideRequestBuilder; +import dev.plexapi.sdk.models.operations.ReloadGuideResponse; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRRequest; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRRequestBuilder; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRResponse; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesResponse; +import dev.plexapi.sdk.models.operations.StopDVRReloadRequest; +import dev.plexapi.sdk.models.operations.StopDVRReloadRequestBuilder; +import dev.plexapi.sdk.models.operations.StopDVRReloadResponse; +import dev.plexapi.sdk.models.operations.TuneChannelRequest; +import dev.plexapi.sdk.models.operations.TuneChannelRequestBuilder; +import dev.plexapi.sdk.models.operations.TuneChannelResponse; +import dev.plexapi.sdk.operations.AddDeviceToDVR; +import dev.plexapi.sdk.operations.AddLineup; +import dev.plexapi.sdk.operations.CreateDVR; +import dev.plexapi.sdk.operations.DeleteDVR; +import dev.plexapi.sdk.operations.DeleteLineup; +import dev.plexapi.sdk.operations.GetDVR; +import dev.plexapi.sdk.operations.ListDVRs; +import dev.plexapi.sdk.operations.ReloadGuide; +import dev.plexapi.sdk.operations.RemoveDeviceFromDVR; +import dev.plexapi.sdk.operations.SetDVRPreferences; +import dev.plexapi.sdk.operations.StopDVRReload; +import dev.plexapi.sdk.operations.TuneChannel; +import java.lang.Exception; + +/** + * The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself + */ +public class DVRs { + private final SDKConfiguration sdkConfiguration; + private final AsyncDVRs asyncSDK; + + DVRs(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncDVRs(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncDVRs async() { + return asyncSDK; + } + + /** + * Get DVRs + * + *

Get the list of all available DVRs + * + * @return The call builder + */ + public ListDVRsRequestBuilder listDVRs() { + return new ListDVRsRequestBuilder(sdkConfiguration); + } + + /** + * Get DVRs + * + *

Get the list of all available DVRs + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListDVRsResponse listDVRsDirect() throws Exception { + RequestlessOperation operation + = new ListDVRs.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Create a DVR + * + *

Creation of a DVR, after creation of a devcie and a lineup is selected + * + * @return The call builder + */ + public CreateDVRRequestBuilder createDVR() { + return new CreateDVRRequestBuilder(sdkConfiguration); + } + + /** + * Create a DVR + * + *

Creation of a DVR, after creation of a devcie and a lineup is selected + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateDVRResponse createDVR(CreateDVRRequest request) throws Exception { + RequestOperation operation + = new CreateDVR.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a single DVR + * + *

Delete a single DVR by its id (key) + * + * @return The call builder + */ + public DeleteDVRRequestBuilder deleteDVR() { + return new DeleteDVRRequestBuilder(sdkConfiguration); + } + + /** + * Delete a single DVR + * + *

Delete a single DVR by its id (key) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteDVRResponse deleteDVR(DeleteDVRRequest request) throws Exception { + RequestOperation operation + = new DeleteDVR.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a single DVR + * + *

Get a single DVR by its id (key) + * + * @return The call builder + */ + public GetDVRRequestBuilder getDVR() { + return new GetDVRRequestBuilder(sdkConfiguration); + } + + /** + * Get a single DVR + * + *

Get a single DVR by its id (key) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetDVRResponse getDVR(GetDVRRequest request) throws Exception { + RequestOperation operation + = new GetDVR.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a DVR Lineup + * + *

Deletes a DVR device's lineup. + * + * @return The call builder + */ + public DeleteLineupRequestBuilder deleteLineup() { + return new DeleteLineupRequestBuilder(sdkConfiguration); + } + + /** + * Delete a DVR Lineup + * + *

Deletes a DVR device's lineup. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteLineupResponse deleteLineup(DeleteLineupRequest request) throws Exception { + RequestOperation operation + = new DeleteLineup.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Add a DVR Lineup + * + *

Add a lineup to a DVR device's set of lineups. + * + * @return The call builder + */ + public AddLineupRequestBuilder addLineup() { + return new AddLineupRequestBuilder(sdkConfiguration); + } + + /** + * Add a DVR Lineup + * + *

Add a lineup to a DVR device's set of lineups. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddLineupResponse addLineup(AddLineupRequest request) throws Exception { + RequestOperation operation + = new AddLineup.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set DVR preferences + * + *

Set DVR preferences by name avd value + * + * @return The call builder + */ + public SetDVRPreferencesRequestBuilder setDVRPreferences() { + return new SetDVRPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Set DVR preferences + * + *

Set DVR preferences by name avd value + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SetDVRPreferencesResponse setDVRPreferences(SetDVRPreferencesRequest request) throws Exception { + RequestOperation operation + = new SetDVRPreferences.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Tell a DVR to stop reloading program guide + * + *

Tell a DVR to stop reloading program guide + * + * @return The call builder + */ + public StopDVRReloadRequestBuilder stopDVRReload() { + return new StopDVRReloadRequestBuilder(sdkConfiguration); + } + + /** + * Tell a DVR to stop reloading program guide + * + *

Tell a DVR to stop reloading program guide + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public StopDVRReloadResponse stopDVRReload(StopDVRReloadRequest request) throws Exception { + RequestOperation operation + = new StopDVRReload.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Tell a DVR to reload program guide + * + *

Tell a DVR to reload program guide + * + * @return The call builder + */ + public ReloadGuideRequestBuilder reloadGuide() { + return new ReloadGuideRequestBuilder(sdkConfiguration); + } + + /** + * Tell a DVR to reload program guide + * + *

Tell a DVR to reload program guide + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ReloadGuideResponse reloadGuide(ReloadGuideRequest request) throws Exception { + RequestOperation operation + = new ReloadGuide.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Tune a channel on a DVR + * + *

Tune a channel on a DVR to the provided channel + * + * @return The call builder + */ + public TuneChannelRequestBuilder tuneChannel() { + return new TuneChannelRequestBuilder(sdkConfiguration); + } + + /** + * Tune a channel on a DVR + * + *

Tune a channel on a DVR to the provided channel + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public TuneChannelResponse tuneChannel(TuneChannelRequest request) throws Exception { + RequestOperation operation + = new TuneChannel.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Remove a device from an existing DVR + * + *

Remove a device from an existing DVR + * + * @return The call builder + */ + public RemoveDeviceFromDVRRequestBuilder removeDeviceFromDVR() { + return new RemoveDeviceFromDVRRequestBuilder(sdkConfiguration); + } + + /** + * Remove a device from an existing DVR + * + *

Remove a device from an existing DVR + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public RemoveDeviceFromDVRResponse removeDeviceFromDVR(RemoveDeviceFromDVRRequest request) throws Exception { + RequestOperation operation + = new RemoveDeviceFromDVR.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Add a device to an existing DVR + * + *

Add a device to an existing DVR + * + * @return The call builder + */ + public AddDeviceToDVRRequestBuilder addDeviceToDVR() { + return new AddDeviceToDVRRequestBuilder(sdkConfiguration); + } + + /** + * Add a device to an existing DVR + * + *

Add a device to an existing DVR + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddDeviceToDVRResponse addDeviceToDVR(AddDeviceToDVRRequest request) throws Exception { + RequestOperation operation + = new AddDeviceToDVR.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Devices.java b/src/main/java/dev/plexapi/sdk/Devices.java new file mode 100644 index 00000000..6144de2d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Devices.java @@ -0,0 +1,451 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.models.operations.AddDeviceRequest; +import dev.plexapi.sdk.models.operations.AddDeviceRequestBuilder; +import dev.plexapi.sdk.models.operations.AddDeviceResponse; +import dev.plexapi.sdk.models.operations.DiscoverDevicesRequestBuilder; +import dev.plexapi.sdk.models.operations.DiscoverDevicesResponse; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersRequest; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersRequestBuilder; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersResponse; +import dev.plexapi.sdk.models.operations.GetDeviceDetailsRequest; +import dev.plexapi.sdk.models.operations.GetDeviceDetailsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetDeviceDetailsResponse; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsRequest; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsResponse; +import dev.plexapi.sdk.models.operations.GetThumbRequest; +import dev.plexapi.sdk.models.operations.GetThumbRequestBuilder; +import dev.plexapi.sdk.models.operations.GetThumbResponse; +import dev.plexapi.sdk.models.operations.ListDevicesRequestBuilder; +import dev.plexapi.sdk.models.operations.ListDevicesResponse; +import dev.plexapi.sdk.models.operations.ModifyDeviceRequest; +import dev.plexapi.sdk.models.operations.ModifyDeviceRequestBuilder; +import dev.plexapi.sdk.models.operations.ModifyDeviceResponse; +import dev.plexapi.sdk.models.operations.RemoveDeviceRequest; +import dev.plexapi.sdk.models.operations.RemoveDeviceRequestBuilder; +import dev.plexapi.sdk.models.operations.RemoveDeviceResponse; +import dev.plexapi.sdk.models.operations.ScanRequest; +import dev.plexapi.sdk.models.operations.ScanRequestBuilder; +import dev.plexapi.sdk.models.operations.ScanResponse; +import dev.plexapi.sdk.models.operations.SetChannelmapRequest; +import dev.plexapi.sdk.models.operations.SetChannelmapRequestBuilder; +import dev.plexapi.sdk.models.operations.SetChannelmapResponse; +import dev.plexapi.sdk.models.operations.SetDevicePreferencesRequest; +import dev.plexapi.sdk.models.operations.SetDevicePreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.SetDevicePreferencesResponse; +import dev.plexapi.sdk.models.operations.StopScanRequest; +import dev.plexapi.sdk.models.operations.StopScanRequestBuilder; +import dev.plexapi.sdk.models.operations.StopScanResponse; +import dev.plexapi.sdk.operations.AddDevice; +import dev.plexapi.sdk.operations.DiscoverDevices; +import dev.plexapi.sdk.operations.GetAvailableGrabbers; +import dev.plexapi.sdk.operations.GetDeviceDetails; +import dev.plexapi.sdk.operations.GetDevicesChannels; +import dev.plexapi.sdk.operations.GetThumb; +import dev.plexapi.sdk.operations.ListDevices; +import dev.plexapi.sdk.operations.ModifyDevice; +import dev.plexapi.sdk.operations.RemoveDevice; +import dev.plexapi.sdk.operations.Scan; +import dev.plexapi.sdk.operations.SetChannelmap; +import dev.plexapi.sdk.operations.SetDevicePreferences; +import dev.plexapi.sdk.operations.StopScan; +import java.lang.Exception; + +/** + * Media grabbers provide ways for media to be obtained for a given protocol. The simplest ones are `stream` and `download`. More complex grabbers can have associated devices + * + *

Network tuners can present themselves on the network using the Simple Service Discovery Protocol and Plex Media Server will discover them. The following XML is an example of the data returned from SSDP. The `deviceType`, `serviceType`, and `serviceId` values must remain as they are in the example in order for PMS to properly discover the device. Other less-obvious fields are described in the parameters section below. + * + *

Example SSDP output + * ``` + * <root xmlns="urn:schemas-upnp-org:device-1-0"> + * <specVersion> + * <major>1</major> + * <minor>0</minor> + * </specVersion> + * <device> + * <deviceType>urn:plex-tv:device:Media:1</deviceType> + * <friendlyName>Turing Hopper 3000</friendlyName> + * <manufacturer>Plex, Inc.</manufacturer> + * <manufacturerURL>https://plex.tv/</manufacturerURL> + * <modelDescription>Turing Hopper 3000 Media Grabber</modelDescription> + * <modelName>Plex Media Grabber</modelName> + * <modelNumber>1</modelNumber> + * <modelURL>https://plex.tv</modelURL> + * <UDN>uuid:42fde8e4-93b6-41e5-8a63-12d848655811</UDN> + * <serviceList> + * <service> + * <URLBase>http://10.0.0.5:8088</URLBase> + * <serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType> + * <serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId> + * </service> + * </serviceList> + * </device> + * </root> + * ``` + * + *

- UDN: (string) A UUID for the device. This should be unique across models of a device at minimum. + * - URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted. + */ +public class Devices { + private final SDKConfiguration sdkConfiguration; + private final AsyncDevices asyncSDK; + + Devices(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncDevices(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncDevices async() { + return asyncSDK; + } + + /** + * Get available grabbers + * + *

Get available grabbers visible to the server + * + * @return The call builder + */ + public GetAvailableGrabbersRequestBuilder getAvailableGrabbers() { + return new GetAvailableGrabbersRequestBuilder(sdkConfiguration); + } + + /** + * Get available grabbers + * + *

Get available grabbers visible to the server + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAvailableGrabbersResponse getAvailableGrabbers(GetAvailableGrabbersRequest request) throws Exception { + RequestOperation operation + = new GetAvailableGrabbers.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get all devices + * + *

Get the list of all devices present + * + * @return The call builder + */ + public ListDevicesRequestBuilder listDevices() { + return new ListDevicesRequestBuilder(sdkConfiguration); + } + + /** + * Get all devices + * + *

Get the list of all devices present + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListDevicesResponse listDevicesDirect() throws Exception { + RequestlessOperation operation + = new ListDevices.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Add a device + * + *

This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber. + * + * @return The call builder + */ + public AddDeviceRequestBuilder addDevice() { + return new AddDeviceRequestBuilder(sdkConfiguration); + } + + /** + * Add a device + * + *

This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddDeviceResponse addDevice(AddDeviceRequest request) throws Exception { + RequestOperation operation + = new AddDevice.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Tell grabbers to discover devices + * + *

Tell grabbers to discover devices + * + * @return The call builder + */ + public DiscoverDevicesRequestBuilder discoverDevices() { + return new DiscoverDevicesRequestBuilder(sdkConfiguration); + } + + /** + * Tell grabbers to discover devices + * + *

Tell grabbers to discover devices + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DiscoverDevicesResponse discoverDevicesDirect() throws Exception { + RequestlessOperation operation + = new DiscoverDevices.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Remove a device + * + *

Remove a devices by its id along with its channel mappings + * + * @return The call builder + */ + public RemoveDeviceRequestBuilder removeDevice() { + return new RemoveDeviceRequestBuilder(sdkConfiguration); + } + + /** + * Remove a device + * + *

Remove a devices by its id along with its channel mappings + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public RemoveDeviceResponse removeDevice(RemoveDeviceRequest request) throws Exception { + RequestOperation operation + = new RemoveDevice.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get device details + * + *

Get a device's details by its id + * + * @return The call builder + */ + public GetDeviceDetailsRequestBuilder getDeviceDetails() { + return new GetDeviceDetailsRequestBuilder(sdkConfiguration); + } + + /** + * Get device details + * + *

Get a device's details by its id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetDeviceDetailsResponse getDeviceDetails(GetDeviceDetailsRequest request) throws Exception { + RequestOperation operation + = new GetDeviceDetails.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Enable or disable a device + * + *

Enable or disable a device by its id + * + * @return The call builder + */ + public ModifyDeviceRequestBuilder modifyDevice() { + return new ModifyDeviceRequestBuilder(sdkConfiguration); + } + + /** + * Enable or disable a device + * + *

Enable or disable a device by its id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ModifyDeviceResponse modifyDevice(ModifyDeviceRequest request) throws Exception { + RequestOperation operation + = new ModifyDevice.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set a device's channel mapping + * + *

Set a device's channel mapping + * + * @return The call builder + */ + public SetChannelmapRequestBuilder setChannelmap() { + return new SetChannelmapRequestBuilder(sdkConfiguration); + } + + /** + * Set a device's channel mapping + * + *

Set a device's channel mapping + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SetChannelmapResponse setChannelmap(SetChannelmapRequest request) throws Exception { + RequestOperation operation + = new SetChannelmap.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a device's channels + * + *

Get a device's channels by its id + * + * @return The call builder + */ + public GetDevicesChannelsRequestBuilder getDevicesChannels() { + return new GetDevicesChannelsRequestBuilder(sdkConfiguration); + } + + /** + * Get a device's channels + * + *

Get a device's channels by its id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetDevicesChannelsResponse getDevicesChannels(GetDevicesChannelsRequest request) throws Exception { + RequestOperation operation + = new GetDevicesChannels.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set device preferences + * + *

Set device preferences by its id + * + * @return The call builder + */ + public SetDevicePreferencesRequestBuilder setDevicePreferences() { + return new SetDevicePreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Set device preferences + * + *

Set device preferences by its id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SetDevicePreferencesResponse setDevicePreferences(SetDevicePreferencesRequest request) throws Exception { + RequestOperation operation + = new SetDevicePreferences.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Tell a device to stop scanning for channels + * + *

Tell a device to stop scanning for channels + * + * @return The call builder + */ + public StopScanRequestBuilder stopScan() { + return new StopScanRequestBuilder(sdkConfiguration); + } + + /** + * Tell a device to stop scanning for channels + * + *

Tell a device to stop scanning for channels + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public StopScanResponse stopScan(StopScanRequest request) throws Exception { + RequestOperation operation + = new StopScan.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Tell a device to scan for channels + * + *

Tell a device to scan for channels + * + * @return The call builder + */ + public ScanRequestBuilder scan() { + return new ScanRequestBuilder(sdkConfiguration); + } + + /** + * Tell a device to scan for channels + * + *

Tell a device to scan for channels + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ScanResponse scan(ScanRequest request) throws Exception { + RequestOperation operation + = new Scan.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get device thumb + * + *

Get a device's thumb for display to the user + * + * @return The call builder + */ + public GetThumbRequestBuilder getThumb() { + return new GetThumbRequestBuilder(sdkConfiguration); + } + + /** + * Get device thumb + * + *

Get a device's thumb for display to the user + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetThumbResponse getThumb(GetThumbRequest request) throws Exception { + RequestOperation operation + = new GetThumb.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/DownloadQueue.java b/src/main/java/dev/plexapi/sdk/DownloadQueue.java new file mode 100644 index 00000000..980b89e3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/DownloadQueue.java @@ -0,0 +1,332 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.CreateDownloadQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.CreateDownloadQueueResponse; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaRequestBuilder; +import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaResponse; +import dev.plexapi.sdk.models.operations.GetDownloadQueueRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.GetDownloadQueueResponse; +import dev.plexapi.sdk.models.operations.GetItemDecisionRequest; +import dev.plexapi.sdk.models.operations.GetItemDecisionRequestBuilder; +import dev.plexapi.sdk.models.operations.GetItemDecisionResponse; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsResponse; +import dev.plexapi.sdk.operations.AddDownloadQueueItems; +import dev.plexapi.sdk.operations.CreateDownloadQueue; +import dev.plexapi.sdk.operations.GetDownloadQueue; +import dev.plexapi.sdk.operations.GetDownloadQueueItems; +import dev.plexapi.sdk.operations.GetDownloadQueueMedia; +import dev.plexapi.sdk.operations.GetItemDecision; +import dev.plexapi.sdk.operations.ListDownloadQueueItems; +import dev.plexapi.sdk.operations.RemoveDownloadQueueItems; +import dev.plexapi.sdk.operations.RestartProcessingDownloadQueueItems; +import java.lang.Exception; + +/** + * API Operations against the Download Queue + */ +public class DownloadQueue { + private final SDKConfiguration sdkConfiguration; + private final AsyncDownloadQueue asyncSDK; + + DownloadQueue(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncDownloadQueue(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncDownloadQueue async() { + return asyncSDK; + } + + /** + * Create download queue + * + *

Available: 0.2.0 + * + *

Creates a download queue for this client if one doesn't exist, or returns the existing queue for this client and user. + * + * @return The call builder + */ + public CreateDownloadQueueRequestBuilder createDownloadQueue() { + return new CreateDownloadQueueRequestBuilder(sdkConfiguration); + } + + /** + * Create download queue + * + *

Available: 0.2.0 + * + *

Creates a download queue for this client if one doesn't exist, or returns the existing queue for this client and user. + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateDownloadQueueResponse createDownloadQueueDirect() throws Exception { + RequestlessOperation operation + = new CreateDownloadQueue.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Get a download queue + * + *

Available: 0.2.0 + * + *

Get a download queue by its id + * + * @return The call builder + */ + public GetDownloadQueueRequestBuilder getDownloadQueue() { + return new GetDownloadQueueRequestBuilder(sdkConfiguration); + } + + /** + * Get a download queue + * + *

Available: 0.2.0 + * + *

Get a download queue by its id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetDownloadQueueResponse getDownloadQueue(GetDownloadQueueRequest request) throws Exception { + RequestOperation operation + = new GetDownloadQueue.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Add to download queue + * + *

Available: 0.2.0 + * + *

Add items to the download queue + * + * @return The call builder + */ + public AddDownloadQueueItemsRequestBuilder addDownloadQueueItems() { + return new AddDownloadQueueItemsRequestBuilder(sdkConfiguration); + } + + /** + * Add to download queue + * + *

Available: 0.2.0 + * + *

Add items to the download queue + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddDownloadQueueItemsResponse addDownloadQueueItems(AddDownloadQueueItemsRequest request) throws Exception { + RequestOperation operation + = new AddDownloadQueueItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get download queue items + * + *

Available: 0.2.0 + * + *

Get items from a download queue + * + * @return The call builder + */ + public ListDownloadQueueItemsRequestBuilder listDownloadQueueItems() { + return new ListDownloadQueueItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get download queue items + * + *

Available: 0.2.0 + * + *

Get items from a download queue + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListDownloadQueueItemsResponse listDownloadQueueItems(ListDownloadQueueItemsRequest request) throws Exception { + RequestOperation operation + = new ListDownloadQueueItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Grab download queue item decision + * + *

Available: 0.2.0 + * + *

Grab the decision for a download queue item + * + * @return The call builder + */ + public GetItemDecisionRequestBuilder getItemDecision() { + return new GetItemDecisionRequestBuilder(sdkConfiguration); + } + + /** + * Grab download queue item decision + * + *

Available: 0.2.0 + * + *

Grab the decision for a download queue item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetItemDecisionResponse getItemDecision(GetItemDecisionRequest request) throws Exception { + RequestOperation operation + = new GetItemDecision.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Grab download queue media + * + *

Available: 0.2.0 + * + *

Grab the media for a download queue item + * + * @return The call builder + */ + public GetDownloadQueueMediaRequestBuilder getDownloadQueueMedia() { + return new GetDownloadQueueMediaRequestBuilder(sdkConfiguration); + } + + /** + * Grab download queue media + * + *

Available: 0.2.0 + * + *

Grab the media for a download queue item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetDownloadQueueMediaResponse getDownloadQueueMedia(GetDownloadQueueMediaRequest request) throws Exception { + RequestOperation operation + = new GetDownloadQueueMedia.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete download queue items + * + *

delete items from a download queue + * + * @return The call builder + */ + public RemoveDownloadQueueItemsRequestBuilder removeDownloadQueueItems() { + return new RemoveDownloadQueueItemsRequestBuilder(sdkConfiguration); + } + + /** + * Delete download queue items + * + *

delete items from a download queue + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public RemoveDownloadQueueItemsResponse removeDownloadQueueItems(RemoveDownloadQueueItemsRequest request) throws Exception { + RequestOperation operation + = new RemoveDownloadQueueItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get download queue items + * + *

Available: 0.2.0 + * + *

Get items from a download queue + * + * @return The call builder + */ + public GetDownloadQueueItemsRequestBuilder getDownloadQueueItems() { + return new GetDownloadQueueItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get download queue items + * + *

Available: 0.2.0 + * + *

Get items from a download queue + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetDownloadQueueItemsResponse getDownloadQueueItems(GetDownloadQueueItemsRequest request) throws Exception { + RequestOperation operation + = new GetDownloadQueueItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Restart processing of items from the decision + * + *

Available: 0.2.0 + * + *

Reprocess download queue items with previous decision parameters + * + * @return The call builder + */ + public RestartProcessingDownloadQueueItemsRequestBuilder restartProcessingDownloadQueueItems() { + return new RestartProcessingDownloadQueueItemsRequestBuilder(sdkConfiguration); + } + + /** + * Restart processing of items from the decision + * + *

Available: 0.2.0 + * + *

Reprocess download queue items with previous decision parameters + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public RestartProcessingDownloadQueueItemsResponse restartProcessingDownloadQueueItems(RestartProcessingDownloadQueueItemsRequest request) throws Exception { + RequestOperation operation + = new RestartProcessingDownloadQueueItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Epg.java b/src/main/java/dev/plexapi/sdk/Epg.java new file mode 100644 index 00000000..dcb94e88 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Epg.java @@ -0,0 +1,298 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.models.operations.ComputeChannelMapRequest; +import dev.plexapi.sdk.models.operations.ComputeChannelMapRequestBuilder; +import dev.plexapi.sdk.models.operations.ComputeChannelMapResponse; +import dev.plexapi.sdk.models.operations.GetAllLanguagesRequestBuilder; +import dev.plexapi.sdk.models.operations.GetAllLanguagesResponse; +import dev.plexapi.sdk.models.operations.GetChannelsRequest; +import dev.plexapi.sdk.models.operations.GetChannelsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetChannelsResponse; +import dev.plexapi.sdk.models.operations.GetCountriesLineupsRequest; +import dev.plexapi.sdk.models.operations.GetCountriesLineupsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetCountriesLineupsResponse; +import dev.plexapi.sdk.models.operations.GetCountriesRequestBuilder; +import dev.plexapi.sdk.models.operations.GetCountriesResponse; +import dev.plexapi.sdk.models.operations.GetCountryRegionsRequest; +import dev.plexapi.sdk.models.operations.GetCountryRegionsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetCountryRegionsResponse; +import dev.plexapi.sdk.models.operations.GetLineupChannelsRequest; +import dev.plexapi.sdk.models.operations.GetLineupChannelsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetLineupChannelsResponse; +import dev.plexapi.sdk.models.operations.GetLineupRequest; +import dev.plexapi.sdk.models.operations.GetLineupRequestBuilder; +import dev.plexapi.sdk.models.operations.GetLineupResponse; +import dev.plexapi.sdk.models.operations.ListLineupsRequest; +import dev.plexapi.sdk.models.operations.ListLineupsRequestBuilder; +import dev.plexapi.sdk.models.operations.ListLineupsResponse; +import dev.plexapi.sdk.operations.ComputeChannelMap; +import dev.plexapi.sdk.operations.GetAllLanguages; +import dev.plexapi.sdk.operations.GetChannels; +import dev.plexapi.sdk.operations.GetCountries; +import dev.plexapi.sdk.operations.GetCountriesLineups; +import dev.plexapi.sdk.operations.GetCountryRegions; +import dev.plexapi.sdk.operations.GetLineup; +import dev.plexapi.sdk.operations.GetLineupChannels; +import dev.plexapi.sdk.operations.ListLineups; +import java.lang.Exception; + +/** + * The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when + */ +public class Epg { + private final SDKConfiguration sdkConfiguration; + private final AsyncEpg asyncSDK; + + Epg(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncEpg(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncEpg async() { + return asyncSDK; + } + + /** + * Compute the best channel map + * + *

Compute the best channel map, given device and lineup + * + * @return The call builder + */ + public ComputeChannelMapRequestBuilder computeChannelMap() { + return new ComputeChannelMapRequestBuilder(sdkConfiguration); + } + + /** + * Compute the best channel map + * + *

Compute the best channel map, given device and lineup + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ComputeChannelMapResponse computeChannelMap(ComputeChannelMapRequest request) throws Exception { + RequestOperation operation + = new ComputeChannelMap.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get channels for a lineup + * + *

Get channels for a lineup within an EPG provider + * + * @return The call builder + */ + public GetChannelsRequestBuilder getChannels() { + return new GetChannelsRequestBuilder(sdkConfiguration); + } + + /** + * Get channels for a lineup + * + *

Get channels for a lineup within an EPG provider + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetChannelsResponse getChannels(GetChannelsRequest request) throws Exception { + RequestOperation operation + = new GetChannels.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get all countries + * + *

This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute + * + * @return The call builder + */ + public GetCountriesRequestBuilder getCountries() { + return new GetCountriesRequestBuilder(sdkConfiguration); + } + + /** + * Get all countries + * + *

This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetCountriesResponse getCountriesDirect() throws Exception { + RequestlessOperation operation + = new GetCountries.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Get all languages + * + *

Returns a list of all possible languages for EPG data. + * + * @return The call builder + */ + public GetAllLanguagesRequestBuilder getAllLanguages() { + return new GetAllLanguagesRequestBuilder(sdkConfiguration); + } + + /** + * Get all languages + * + *

Returns a list of all possible languages for EPG data. + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAllLanguagesResponse getAllLanguagesDirect() throws Exception { + RequestlessOperation operation + = new GetAllLanguages.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Compute the best lineup + * + *

Compute the best lineup, given lineup group and device + * + * @return The call builder + */ + public GetLineupRequestBuilder getLineup() { + return new GetLineupRequestBuilder(sdkConfiguration); + } + + /** + * Compute the best lineup + * + *

Compute the best lineup, given lineup group and device + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetLineupResponse getLineup(GetLineupRequest request) throws Exception { + RequestOperation operation + = new GetLineup.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get the channels for mulitple lineups + * + *

Get the channels across multiple lineups + * + * @return The call builder + */ + public GetLineupChannelsRequestBuilder getLineupChannels() { + return new GetLineupChannelsRequestBuilder(sdkConfiguration); + } + + /** + * Get the channels for mulitple lineups + * + *

Get the channels across multiple lineups + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetLineupChannelsResponse getLineupChannels(GetLineupChannelsRequest request) throws Exception { + RequestOperation operation + = new GetLineupChannels.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get lineups for a country via postal code + * + *

Returns a list of lineups for a given country, EPG provider and postal code + * + * @return The call builder + */ + public GetCountriesLineupsRequestBuilder getCountriesLineups() { + return new GetCountriesLineupsRequestBuilder(sdkConfiguration); + } + + /** + * Get lineups for a country via postal code + * + *

Returns a list of lineups for a given country, EPG provider and postal code + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetCountriesLineupsResponse getCountriesLineups(GetCountriesLineupsRequest request) throws Exception { + RequestOperation operation + = new GetCountriesLineups.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get regions for a country + * + *

Get regions for a country within an EPG provider + * + * @return The call builder + */ + public GetCountryRegionsRequestBuilder getCountryRegions() { + return new GetCountryRegionsRequestBuilder(sdkConfiguration); + } + + /** + * Get regions for a country + * + *

Get regions for a country within an EPG provider + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetCountryRegionsResponse getCountryRegions(GetCountryRegionsRequest request) throws Exception { + RequestOperation operation + = new GetCountryRegions.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get lineups for a region + * + *

Get lineups for a region within an EPG provider + * + * @return The call builder + */ + public ListLineupsRequestBuilder listLineups() { + return new ListLineupsRequestBuilder(sdkConfiguration); + } + + /** + * Get lineups for a region + * + *

Get lineups for a region within an EPG provider + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListLineupsResponse listLineups(ListLineupsRequest request) throws Exception { + RequestOperation operation + = new ListLineups.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Events.java b/src/main/java/dev/plexapi/sdk/Events.java new file mode 100644 index 00000000..0989bce3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Events.java @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.ConnectWebSocketRequest; +import dev.plexapi.sdk.models.operations.ConnectWebSocketRequestBuilder; +import dev.plexapi.sdk.models.operations.ConnectWebSocketResponse; +import dev.plexapi.sdk.models.operations.GetNotificationsRequest; +import dev.plexapi.sdk.models.operations.GetNotificationsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetNotificationsResponse; +import dev.plexapi.sdk.operations.ConnectWebSocket; +import dev.plexapi.sdk.operations.GetNotifications; +import java.lang.Exception; + +/** + * The server can notify clients in real-time of a wide range of events, from library scanning, to preferences being modified, to changes to media, and many other things. This is also the mechanism by which activity progress is reported. + * + *

Two protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket. + */ +public class Events { + private final SDKConfiguration sdkConfiguration; + private final AsyncEvents asyncSDK; + + Events(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncEvents(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncEvents async() { + return asyncSDK; + } + + /** + * Connect to Eventsource + * + *

Connect to the event source to get a stream of events + * + * @return The call builder + */ + public GetNotificationsRequestBuilder getNotifications() { + return new GetNotificationsRequestBuilder(sdkConfiguration); + } + + /** + * Connect to Eventsource + * + *

Connect to the event source to get a stream of events + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetNotificationsResponse getNotifications(GetNotificationsRequest request) throws Exception { + RequestOperation operation + = new GetNotifications.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Connect to WebSocket + * + *

Connect to the web socket to get a stream of events + * + * @return The call builder + */ + public ConnectWebSocketRequestBuilder connectWebSocket() { + return new ConnectWebSocketRequestBuilder(sdkConfiguration); + } + + /** + * Connect to WebSocket + * + *

Connect to the web socket to get a stream of events + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ConnectWebSocketResponse connectWebSocket(ConnectWebSocketRequest request) throws Exception { + RequestOperation operation + = new ConnectWebSocket.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/General.java b/src/main/java/dev/plexapi/sdk/General.java new file mode 100644 index 00000000..b7a0492a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/General.java @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.models.operations.GetIdentityRequestBuilder; +import dev.plexapi.sdk.models.operations.GetIdentityResponse; +import dev.plexapi.sdk.models.operations.GetServerInfoRequest; +import dev.plexapi.sdk.models.operations.GetServerInfoRequestBuilder; +import dev.plexapi.sdk.models.operations.GetServerInfoResponse; +import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequest; +import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse; +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.operations.GetIdentity; +import dev.plexapi.sdk.operations.GetServerInfo; +import dev.plexapi.sdk.operations.GetSourceConnectionInformation; +import dev.plexapi.sdk.operations.GetTransientToken; +import java.lang.Exception; + +/** + * General endpoints for basic PMS operation not specific to any media provider + */ +public class General { + private final SDKConfiguration sdkConfiguration; + private final AsyncGeneral asyncSDK; + + General(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncGeneral(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncGeneral async() { + return asyncSDK; + } + + /** + * Get PMS info + * + *

Information about this PMS setup and configuration + * + * @return The call builder + */ + public GetServerInfoRequestBuilder getServerInfo() { + return new GetServerInfoRequestBuilder(sdkConfiguration); + } + + /** + * Get PMS info + * + *

Information about this PMS setup and configuration + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetServerInfoResponse getServerInfo(GetServerInfoRequest request) throws Exception { + RequestOperation operation + = new GetServerInfo.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get PMS identity + * + *

Get details about this PMS's identity + * + * @return The call builder + */ + public GetIdentityRequestBuilder getIdentity() { + return new GetIdentityRequestBuilder(sdkConfiguration); + } + + /** + * Get PMS identity + * + *

Get details about this PMS's identity + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetIdentityResponse getIdentityDirect() throws Exception { + RequestlessOperation operation + = new GetIdentity.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Get Source Connection Information + * + *

If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. + * + * @return The call builder + */ + public GetSourceConnectionInformationRequestBuilder getSourceConnectionInformation() { + return new GetSourceConnectionInformationRequestBuilder(sdkConfiguration); + } + + /** + * Get Source Connection Information + * + *

If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSourceConnectionInformationResponse getSourceConnectionInformation(GetSourceConnectionInformationRequest request) throws Exception { + RequestOperation operation + = new GetSourceConnectionInformation.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get Transient Tokens + * + *

This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. + * Note: This endpoint responds to all HTTP verbs but POST in preferred + * + * @return The call builder + */ + public GetTransientTokenRequestBuilder getTransientToken() { + return new GetTransientTokenRequestBuilder(sdkConfiguration); + } + + /** + * Get Transient Tokens + * + *

This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. + * Note: This endpoint responds to all HTTP verbs but POST in preferred + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetTransientTokenResponse getTransientToken(GetTransientTokenRequest request) throws Exception { + RequestOperation operation + = new GetTransientToken.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Hubs.java b/src/main/java/dev/plexapi/sdk/Hubs.java index db6dbd88..f68b3d33 100644 --- a/src/main/java/dev/plexapi/sdk/Hubs.java +++ b/src/main/java/dev/plexapi/sdk/Hubs.java @@ -5,26 +5,66 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import dev.plexapi.sdk.models.operations.GetGlobalHubsRequest; -import dev.plexapi.sdk.models.operations.GetGlobalHubsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse; -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.GetRecentlyAddedRequest; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequestBuilder; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse; -import dev.plexapi.sdk.models.operations.OnlyTransient; -import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient; -import dev.plexapi.sdk.operations.GetGlobalHubs; -import dev.plexapi.sdk.operations.GetLibraryHubs; -import dev.plexapi.sdk.operations.GetRecentlyAdded; -import java.lang.Double; +import dev.plexapi.sdk.models.operations.CreateCustomHubRequest; +import dev.plexapi.sdk.models.operations.CreateCustomHubRequestBuilder; +import dev.plexapi.sdk.models.operations.CreateCustomHubResponse; +import dev.plexapi.sdk.models.operations.DeleteCustomHubRequest; +import dev.plexapi.sdk.models.operations.DeleteCustomHubRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteCustomHubResponse; +import dev.plexapi.sdk.models.operations.GetAllHubsRequest; +import dev.plexapi.sdk.models.operations.GetAllHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetAllHubsResponse; +import dev.plexapi.sdk.models.operations.GetContinueWatchingRequest; +import dev.plexapi.sdk.models.operations.GetContinueWatchingRequestBuilder; +import dev.plexapi.sdk.models.operations.GetContinueWatchingResponse; +import dev.plexapi.sdk.models.operations.GetHubItemsRequest; +import dev.plexapi.sdk.models.operations.GetHubItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetHubItemsResponse; +import dev.plexapi.sdk.models.operations.GetMetadataHubsRequest; +import dev.plexapi.sdk.models.operations.GetMetadataHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetMetadataHubsResponse; +import dev.plexapi.sdk.models.operations.GetPostplayHubsRequest; +import dev.plexapi.sdk.models.operations.GetPostplayHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPostplayHubsResponse; +import dev.plexapi.sdk.models.operations.GetPromotedHubsRequest; +import dev.plexapi.sdk.models.operations.GetPromotedHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPromotedHubsResponse; +import dev.plexapi.sdk.models.operations.GetRelatedHubsRequest; +import dev.plexapi.sdk.models.operations.GetRelatedHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetRelatedHubsResponse; +import dev.plexapi.sdk.models.operations.GetSectionHubsRequest; +import dev.plexapi.sdk.models.operations.GetSectionHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSectionHubsResponse; +import dev.plexapi.sdk.models.operations.ListHubsRequest; +import dev.plexapi.sdk.models.operations.ListHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.ListHubsResponse; +import dev.plexapi.sdk.models.operations.MoveHubRequest; +import dev.plexapi.sdk.models.operations.MoveHubRequestBuilder; +import dev.plexapi.sdk.models.operations.MoveHubResponse; +import dev.plexapi.sdk.models.operations.ResetSectionDefaultsRequest; +import dev.plexapi.sdk.models.operations.ResetSectionDefaultsRequestBuilder; +import dev.plexapi.sdk.models.operations.ResetSectionDefaultsResponse; +import dev.plexapi.sdk.models.operations.UpdateHubVisibilityRequest; +import dev.plexapi.sdk.models.operations.UpdateHubVisibilityRequestBuilder; +import dev.plexapi.sdk.models.operations.UpdateHubVisibilityResponse; +import dev.plexapi.sdk.operations.CreateCustomHub; +import dev.plexapi.sdk.operations.DeleteCustomHub; +import dev.plexapi.sdk.operations.GetAllHubs; +import dev.plexapi.sdk.operations.GetContinueWatching; +import dev.plexapi.sdk.operations.GetHubItems; +import dev.plexapi.sdk.operations.GetMetadataHubs; +import dev.plexapi.sdk.operations.GetPostplayHubs; +import dev.plexapi.sdk.operations.GetPromotedHubs; +import dev.plexapi.sdk.operations.GetRelatedHubs; +import dev.plexapi.sdk.operations.GetSectionHubs; +import dev.plexapi.sdk.operations.ListHubs; +import dev.plexapi.sdk.operations.MoveHub; +import dev.plexapi.sdk.operations.ResetSectionDefaults; +import dev.plexapi.sdk.operations.UpdateHubVisibility; import java.lang.Exception; -import java.util.Optional; /** - * Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + * The hubs within a media provider */ public class Hubs { private final SDKConfiguration sdkConfiguration; @@ -45,123 +85,366 @@ public class Hubs { } /** - * Get Global Hubs + * Get global hubs * - *

Get Global Hubs filtered by the parameters provided. + *

Get the global hubs in this PMS * * @return The call builder */ - public GetGlobalHubsRequestBuilder getGlobalHubs() { - return new GetGlobalHubsRequestBuilder(sdkConfiguration); + public GetAllHubsRequestBuilder getAllHubs() { + return new GetAllHubsRequestBuilder(sdkConfiguration); } /** - * Get Global Hubs + * Get global hubs * - *

Get Global Hubs filtered by the parameters provided. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetGlobalHubsResponse getGlobalHubsDirect() throws Exception { - return getGlobalHubs(Optional.empty(), Optional.empty()); - } - - /** - * Get Global Hubs - * - *

Get Global Hubs filtered by the parameters provided. - * - * @param count The number of items to return with each hub. - * @param onlyTransient Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetGlobalHubsResponse getGlobalHubs(Optional count, Optional onlyTransient) throws Exception { - GetGlobalHubsRequest request = - GetGlobalHubsRequest - .builder() - .count(count) - .onlyTransient(onlyTransient) - .build(); - RequestOperation operation - = new GetGlobalHubs.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Recently Added - * - *

This endpoint will return the recently added content. - * - * @return The call builder - */ - public GetRecentlyAddedRequestBuilder getRecentlyAdded() { - return new GetRecentlyAddedRequestBuilder(sdkConfiguration); - } - - /** - * Get Recently Added - * - *

This endpoint will return the recently added content. + *

Get the global hubs in this PMS * * @param request The request object containing all 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 { - RequestOperation operation - = new GetRecentlyAdded.Sync(sdkConfiguration); + public GetAllHubsResponse getAllHubs(GetAllHubsRequest request) throws Exception { + RequestOperation operation + = new GetAllHubs.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** - * Get library specific hubs + * Get the continue watching hub * - *

This endpoint will return a list of library specific hubs + *

Get the global continue watching hub * * @return The call builder */ - public GetLibraryHubsRequestBuilder getLibraryHubs() { - return new GetLibraryHubsRequestBuilder(sdkConfiguration); + public GetContinueWatchingRequestBuilder getContinueWatching() { + return new GetContinueWatchingRequestBuilder(sdkConfiguration); } /** - * Get library specific hubs + * Get the continue watching hub * - *

This endpoint will return a list of library specific hubs + *

Get the global continue watching hub * - * @param sectionId the Id of the library to query + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetLibraryHubsResponse getLibraryHubs(double sectionId) throws Exception { - return getLibraryHubs(sectionId, Optional.empty(), Optional.empty()); + public GetContinueWatchingResponse getContinueWatching(GetContinueWatchingRequest request) throws Exception { + RequestOperation operation + = new GetContinueWatching.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); } /** - * Get library specific hubs + * Get a hub's items * - *

This endpoint will return a list of library specific hubs + *

Get the items within a single hub specified by identifier * - * @param sectionId the Id of the library to query - * @param count The number of items to return with each hub. - * @param onlyTransient Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + * @return The call builder + */ + public GetHubItemsRequestBuilder getHubItems() { + return new GetHubItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get a hub's items + * + *

Get the items within a single hub specified by identifier + * + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetLibraryHubsResponse getLibraryHubs( - double sectionId, Optional count, - Optional onlyTransient) throws Exception { - GetLibraryHubsRequest request = - GetLibraryHubsRequest - .builder() - .sectionId(sectionId) - .count(count) - .onlyTransient(onlyTransient) - .build(); - RequestOperation operation - = new GetLibraryHubs.Sync(sdkConfiguration); + public GetHubItemsResponse getHubItems(GetHubItemsRequest request) throws Exception { + RequestOperation operation + = new GetHubItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get the hubs which are promoted + * + *

Get the global hubs which are promoted (should be displayed on the home screen) + * + * @return The call builder + */ + public GetPromotedHubsRequestBuilder getPromotedHubs() { + return new GetPromotedHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get the hubs which are promoted + * + *

Get the global hubs which are promoted (should be displayed on the home screen) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPromotedHubsResponse getPromotedHubs(GetPromotedHubsRequest request) throws Exception { + RequestOperation operation + = new GetPromotedHubs.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get hubs for section by metadata item + * + *

Get the hubs for a section by metadata item. Currently only for music sections + * + * @return The call builder + */ + public GetMetadataHubsRequestBuilder getMetadataHubs() { + return new GetMetadataHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get hubs for section by metadata item + * + *

Get the hubs for a section by metadata item. Currently only for music sections + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetMetadataHubsResponse getMetadataHubs(GetMetadataHubsRequest request) throws Exception { + RequestOperation operation + = new GetMetadataHubs.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get postplay hubs + * + *

Get the hubs for a metadata to be displayed in post play + * + * @return The call builder + */ + public GetPostplayHubsRequestBuilder getPostplayHubs() { + return new GetPostplayHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get postplay hubs + * + *

Get the hubs for a metadata to be displayed in post play + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPostplayHubsResponse getPostplayHubs(GetPostplayHubsRequest request) throws Exception { + RequestOperation operation + = new GetPostplayHubs.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get related hubs + * + *

Get the hubs for a metadata related to the provided metadata item + * + * @return The call builder + */ + public GetRelatedHubsRequestBuilder getRelatedHubs() { + return new GetRelatedHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get related hubs + * + *

Get the hubs for a metadata related to the provided metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetRelatedHubsResponse getRelatedHubs(GetRelatedHubsRequest request) throws Exception { + RequestOperation operation + = new GetRelatedHubs.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get section hubs + * + *

Get the hubs for a single section + * + * @return The call builder + */ + public GetSectionHubsRequestBuilder getSectionHubs() { + return new GetSectionHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get section hubs + * + *

Get the hubs for a single section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSectionHubsResponse getSectionHubs(GetSectionHubsRequest request) throws Exception { + RequestOperation operation + = new GetSectionHubs.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Reset hubs to defaults + * + *

Reset hubs for this section to defaults and delete custom hubs + * + * @return The call builder + */ + public ResetSectionDefaultsRequestBuilder resetSectionDefaults() { + return new ResetSectionDefaultsRequestBuilder(sdkConfiguration); + } + + /** + * Reset hubs to defaults + * + *

Reset hubs for this section to defaults and delete custom hubs + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ResetSectionDefaultsResponse resetSectionDefaults(ResetSectionDefaultsRequest request) throws Exception { + RequestOperation operation + = new ResetSectionDefaults.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get hubs + * + *

Get the list of hubs including both built-in and custom + * + * @return The call builder + */ + public ListHubsRequestBuilder listHubs() { + return new ListHubsRequestBuilder(sdkConfiguration); + } + + /** + * Get hubs + * + *

Get the list of hubs including both built-in and custom + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListHubsResponse listHubs(ListHubsRequest request) throws Exception { + RequestOperation operation + = new ListHubs.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Create a custom hub + * + *

Create a custom hub based on a metadata item + * + * @return The call builder + */ + public CreateCustomHubRequestBuilder createCustomHub() { + return new CreateCustomHubRequestBuilder(sdkConfiguration); + } + + /** + * Create a custom hub + * + *

Create a custom hub based on a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateCustomHubResponse createCustomHub(CreateCustomHubRequest request) throws Exception { + RequestOperation operation + = new CreateCustomHub.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Move Hub + * + *

Changed the ordering of a hub among others hubs + * + * @return The call builder + */ + public MoveHubRequestBuilder moveHub() { + return new MoveHubRequestBuilder(sdkConfiguration); + } + + /** + * Move Hub + * + *

Changed the ordering of a hub among others hubs + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public MoveHubResponse moveHub(MoveHubRequest request) throws Exception { + RequestOperation operation + = new MoveHub.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a custom hub + * + *

Delete a custom hub from the server + * + * @return The call builder + */ + public DeleteCustomHubRequestBuilder deleteCustomHub() { + return new DeleteCustomHubRequestBuilder(sdkConfiguration); + } + + /** + * Delete a custom hub + * + *

Delete a custom hub from the server + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteCustomHubResponse deleteCustomHub(DeleteCustomHubRequest request) throws Exception { + RequestOperation operation + = new DeleteCustomHub.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Change hub visibility + * + *

Changed the visibility of a hub for both the admin and shared users + * + * @return The call builder + */ + public UpdateHubVisibilityRequestBuilder updateHubVisibility() { + return new UpdateHubVisibilityRequestBuilder(sdkConfiguration); + } + + /** + * Change hub visibility + * + *

Changed the visibility of a hub for both the admin and shared users + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateHubVisibilityResponse updateHubVisibility(UpdateHubVisibilityRequest request) throws Exception { + RequestOperation operation + = new UpdateHubVisibility.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/Library.java b/src/main/java/dev/plexapi/sdk/Library.java index c29792ca..3d205722 100644 --- a/src/main/java/dev/plexapi/sdk/Library.java +++ b/src/main/java/dev/plexapi/sdk/Library.java @@ -6,100 +6,322 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.RequestOperation; import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import dev.plexapi.sdk.models.operations.DeleteLibraryRequest; -import dev.plexapi.sdk.models.operations.DeleteLibraryRequestBuilder; -import dev.plexapi.sdk.models.operations.DeleteLibraryResponse; -import dev.plexapi.sdk.models.operations.Force; -import dev.plexapi.sdk.models.operations.GetActorsLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetActorsLibraryRequest; -import dev.plexapi.sdk.models.operations.GetActorsLibraryRequestBuilder; -import dev.plexapi.sdk.models.operations.GetActorsLibraryResponse; -import dev.plexapi.sdk.models.operations.GetAllLibrariesRequestBuilder; -import dev.plexapi.sdk.models.operations.GetAllLibrariesResponse; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryRequest; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryRequestBuilder; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryResponse; -import dev.plexapi.sdk.models.operations.GetFileHashRequest; -import dev.plexapi.sdk.models.operations.GetFileHashRequestBuilder; -import dev.plexapi.sdk.models.operations.GetFileHashResponse; -import dev.plexapi.sdk.models.operations.GetGenresLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetGenresLibraryRequest; -import dev.plexapi.sdk.models.operations.GetGenresLibraryRequestBuilder; -import dev.plexapi.sdk.models.operations.GetGenresLibraryResponse; +import dev.plexapi.sdk.models.operations.AddExtrasRequest; +import dev.plexapi.sdk.models.operations.AddExtrasRequestBuilder; +import dev.plexapi.sdk.models.operations.AddExtrasResponse; +import dev.plexapi.sdk.models.operations.AddSectionRequest; +import dev.plexapi.sdk.models.operations.AddSectionRequestBuilder; +import dev.plexapi.sdk.models.operations.AddSectionResponse; +import dev.plexapi.sdk.models.operations.AddSubtitlesRequest; +import dev.plexapi.sdk.models.operations.AddSubtitlesRequestBuilder; +import dev.plexapi.sdk.models.operations.AddSubtitlesResponse; +import dev.plexapi.sdk.models.operations.AnalyzeMetadataRequest; +import dev.plexapi.sdk.models.operations.AnalyzeMetadataRequestBuilder; +import dev.plexapi.sdk.models.operations.AnalyzeMetadataResponse; +import dev.plexapi.sdk.models.operations.AutocompleteRequest; +import dev.plexapi.sdk.models.operations.AutocompleteRequestBuilder; +import dev.plexapi.sdk.models.operations.AutocompleteResponse; +import dev.plexapi.sdk.models.operations.CancelRefreshRequest; +import dev.plexapi.sdk.models.operations.CancelRefreshRequestBuilder; +import dev.plexapi.sdk.models.operations.CancelRefreshResponse; +import dev.plexapi.sdk.models.operations.CleanBundlesRequestBuilder; +import dev.plexapi.sdk.models.operations.CleanBundlesResponse; +import dev.plexapi.sdk.models.operations.CreateMarkerRequest; +import dev.plexapi.sdk.models.operations.CreateMarkerRequestBuilder; +import dev.plexapi.sdk.models.operations.CreateMarkerResponse; +import dev.plexapi.sdk.models.operations.DeleteCachesRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteCachesResponse; +import dev.plexapi.sdk.models.operations.DeleteCollectionRequest; +import dev.plexapi.sdk.models.operations.DeleteCollectionRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteCollectionResponse; +import dev.plexapi.sdk.models.operations.DeleteIndexesRequest; +import dev.plexapi.sdk.models.operations.DeleteIndexesRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteIndexesResponse; +import dev.plexapi.sdk.models.operations.DeleteIntrosRequest; +import dev.plexapi.sdk.models.operations.DeleteIntrosRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteIntrosResponse; +import dev.plexapi.sdk.models.operations.DeleteLibrarySectionRequest; +import dev.plexapi.sdk.models.operations.DeleteLibrarySectionRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteLibrarySectionResponse; +import dev.plexapi.sdk.models.operations.DeleteMarkerRequest; +import dev.plexapi.sdk.models.operations.DeleteMarkerRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteMarkerResponse; +import dev.plexapi.sdk.models.operations.DeleteMediaItemRequest; +import dev.plexapi.sdk.models.operations.DeleteMediaItemRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteMediaItemResponse; +import dev.plexapi.sdk.models.operations.DeleteMetadataItemRequest; +import dev.plexapi.sdk.models.operations.DeleteMetadataItemRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteMetadataItemResponse; +import dev.plexapi.sdk.models.operations.DeleteStreamRequest; +import dev.plexapi.sdk.models.operations.DeleteStreamRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteStreamResponse; +import dev.plexapi.sdk.models.operations.DetectAdsRequest; +import dev.plexapi.sdk.models.operations.DetectAdsRequestBuilder; +import dev.plexapi.sdk.models.operations.DetectAdsResponse; +import dev.plexapi.sdk.models.operations.DetectCreditsRequest; +import dev.plexapi.sdk.models.operations.DetectCreditsRequestBuilder; +import dev.plexapi.sdk.models.operations.DetectCreditsResponse; +import dev.plexapi.sdk.models.operations.DetectIntrosRequest; +import dev.plexapi.sdk.models.operations.DetectIntrosRequestBuilder; +import dev.plexapi.sdk.models.operations.DetectIntrosResponse; +import dev.plexapi.sdk.models.operations.DetectVoiceActivityRequest; +import dev.plexapi.sdk.models.operations.DetectVoiceActivityRequestBuilder; +import dev.plexapi.sdk.models.operations.DetectVoiceActivityResponse; +import dev.plexapi.sdk.models.operations.EditMarkerRequest; +import dev.plexapi.sdk.models.operations.EditMarkerRequestBuilder; +import dev.plexapi.sdk.models.operations.EditMarkerResponse; +import dev.plexapi.sdk.models.operations.EditMetadataItemRequest; +import dev.plexapi.sdk.models.operations.EditMetadataItemRequestBuilder; +import dev.plexapi.sdk.models.operations.EditMetadataItemResponse; +import dev.plexapi.sdk.models.operations.EditSectionRequest; +import dev.plexapi.sdk.models.operations.EditSectionRequestBuilder; +import dev.plexapi.sdk.models.operations.EditSectionResponse; +import dev.plexapi.sdk.models.operations.EmptyTrashRequest; +import dev.plexapi.sdk.models.operations.EmptyTrashRequestBuilder; +import dev.plexapi.sdk.models.operations.EmptyTrashResponse; +import dev.plexapi.sdk.models.operations.GenerateThumbsRequest; +import dev.plexapi.sdk.models.operations.GenerateThumbsRequestBuilder; +import dev.plexapi.sdk.models.operations.GenerateThumbsResponse; +import dev.plexapi.sdk.models.operations.GetAllItemLeavesRequest; +import dev.plexapi.sdk.models.operations.GetAllItemLeavesRequestBuilder; +import dev.plexapi.sdk.models.operations.GetAllItemLeavesResponse; +import dev.plexapi.sdk.models.operations.GetAugmentationStatusRequest; +import dev.plexapi.sdk.models.operations.GetAugmentationStatusRequestBuilder; +import dev.plexapi.sdk.models.operations.GetAugmentationStatusResponse; +import dev.plexapi.sdk.models.operations.GetAvailableSortsRequest; +import dev.plexapi.sdk.models.operations.GetAvailableSortsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetAvailableSortsResponse; +import dev.plexapi.sdk.models.operations.GetChapterImageRequest; +import dev.plexapi.sdk.models.operations.GetChapterImageRequestBuilder; +import dev.plexapi.sdk.models.operations.GetChapterImageResponse; +import dev.plexapi.sdk.models.operations.GetCollectionsRequest; +import dev.plexapi.sdk.models.operations.GetCollectionsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetCollectionsResponse; +import dev.plexapi.sdk.models.operations.GetCommonRequest; +import dev.plexapi.sdk.models.operations.GetCommonRequestBuilder; +import dev.plexapi.sdk.models.operations.GetCommonResponse; +import dev.plexapi.sdk.models.operations.GetExtrasRequest; +import dev.plexapi.sdk.models.operations.GetExtrasRequestBuilder; +import dev.plexapi.sdk.models.operations.GetExtrasResponse; +import dev.plexapi.sdk.models.operations.GetFileRequest; +import dev.plexapi.sdk.models.operations.GetFileRequestBuilder; +import dev.plexapi.sdk.models.operations.GetFileResponse; +import dev.plexapi.sdk.models.operations.GetFirstCharactersRequest; +import dev.plexapi.sdk.models.operations.GetFirstCharactersRequestBuilder; +import dev.plexapi.sdk.models.operations.GetFirstCharactersResponse; +import dev.plexapi.sdk.models.operations.GetImageFromBifRequest; +import dev.plexapi.sdk.models.operations.GetImageFromBifRequestBuilder; +import dev.plexapi.sdk.models.operations.GetImageFromBifResponse; +import dev.plexapi.sdk.models.operations.GetItemArtworkRequest; +import dev.plexapi.sdk.models.operations.GetItemArtworkRequestBuilder; +import dev.plexapi.sdk.models.operations.GetItemArtworkResponse; +import dev.plexapi.sdk.models.operations.GetItemTreeRequest; +import dev.plexapi.sdk.models.operations.GetItemTreeRequestBuilder; +import dev.plexapi.sdk.models.operations.GetItemTreeResponse; import dev.plexapi.sdk.models.operations.GetLibraryDetailsRequest; import dev.plexapi.sdk.models.operations.GetLibraryDetailsRequestBuilder; import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse; import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest; import dev.plexapi.sdk.models.operations.GetLibraryItemsRequestBuilder; import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse; -import dev.plexapi.sdk.models.operations.GetLibrarySectionsAllRequest; -import dev.plexapi.sdk.models.operations.GetLibrarySectionsAllRequestBuilder; -import dev.plexapi.sdk.models.operations.GetLibrarySectionsAllResponse; -import dev.plexapi.sdk.models.operations.GetMediaArtsRequest; -import dev.plexapi.sdk.models.operations.GetMediaArtsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetMediaArtsResponse; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequest; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequestBuilder; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponse; -import dev.plexapi.sdk.models.operations.GetMediaPostersRequest; -import dev.plexapi.sdk.models.operations.GetMediaPostersRequestBuilder; -import dev.plexapi.sdk.models.operations.GetMediaPostersResponse; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequest; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequestBuilder; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse; -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.GetRefreshLibraryMetadataRequest; -import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataRequestBuilder; -import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse; -import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesRequest; -import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesRequestBuilder; -import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesResponse; -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; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamIncludeGuids; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamType; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentRequest; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentRequestBuilder; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse; -import dev.plexapi.sdk.models.operations.IncludeDetails; -import dev.plexapi.sdk.models.operations.PostMediaArtsRequest; -import dev.plexapi.sdk.models.operations.PostMediaArtsRequestBuilder; -import dev.plexapi.sdk.models.operations.PostMediaArtsResponse; -import dev.plexapi.sdk.models.operations.PostMediaPosterRequest; -import dev.plexapi.sdk.models.operations.PostMediaPosterRequestBuilder; -import dev.plexapi.sdk.models.operations.PostMediaPosterResponse; -import dev.plexapi.sdk.operations.DeleteLibrary; -import dev.plexapi.sdk.operations.GetActorsLibrary; -import dev.plexapi.sdk.operations.GetAllLibraries; -import dev.plexapi.sdk.operations.GetCountriesLibrary; -import dev.plexapi.sdk.operations.GetFileHash; -import dev.plexapi.sdk.operations.GetGenresLibrary; +import dev.plexapi.sdk.models.operations.GetLibraryMatchesRequest; +import dev.plexapi.sdk.models.operations.GetLibraryMatchesRequestBuilder; +import dev.plexapi.sdk.models.operations.GetLibraryMatchesResponse; +import dev.plexapi.sdk.models.operations.GetMediaPartRequest; +import dev.plexapi.sdk.models.operations.GetMediaPartRequestBuilder; +import dev.plexapi.sdk.models.operations.GetMediaPartResponse; +import dev.plexapi.sdk.models.operations.GetPartIndexRequest; +import dev.plexapi.sdk.models.operations.GetPartIndexRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPartIndexResponse; +import dev.plexapi.sdk.models.operations.GetPersonRequest; +import dev.plexapi.sdk.models.operations.GetPersonRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPersonResponse; +import dev.plexapi.sdk.models.operations.GetRandomArtworkRequest; +import dev.plexapi.sdk.models.operations.GetRandomArtworkRequestBuilder; +import dev.plexapi.sdk.models.operations.GetRandomArtworkResponse; +import dev.plexapi.sdk.models.operations.GetRelatedItemsRequest; +import dev.plexapi.sdk.models.operations.GetRelatedItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetRelatedItemsResponse; +import dev.plexapi.sdk.models.operations.GetSectionFiltersRequest; +import dev.plexapi.sdk.models.operations.GetSectionFiltersRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSectionFiltersResponse; +import dev.plexapi.sdk.models.operations.GetSectionImageRequest; +import dev.plexapi.sdk.models.operations.GetSectionImageRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSectionImageResponse; +import dev.plexapi.sdk.models.operations.GetSectionPreferencesRequest; +import dev.plexapi.sdk.models.operations.GetSectionPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSectionPreferencesResponse; +import dev.plexapi.sdk.models.operations.GetSectionsPrefsRequest; +import dev.plexapi.sdk.models.operations.GetSectionsPrefsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSectionsPrefsResponse; +import dev.plexapi.sdk.models.operations.GetSectionsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSectionsResponse; +import dev.plexapi.sdk.models.operations.GetStreamLevelsRequest; +import dev.plexapi.sdk.models.operations.GetStreamLevelsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetStreamLevelsResponse; +import dev.plexapi.sdk.models.operations.GetStreamLoudnessRequest; +import dev.plexapi.sdk.models.operations.GetStreamLoudnessRequestBuilder; +import dev.plexapi.sdk.models.operations.GetStreamLoudnessResponse; +import dev.plexapi.sdk.models.operations.GetStreamRequest; +import dev.plexapi.sdk.models.operations.GetStreamRequestBuilder; +import dev.plexapi.sdk.models.operations.GetStreamResponse; +import dev.plexapi.sdk.models.operations.GetTagsRequest; +import dev.plexapi.sdk.models.operations.GetTagsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetTagsResponse; +import dev.plexapi.sdk.models.operations.IngestTransientItemRequest; +import dev.plexapi.sdk.models.operations.IngestTransientItemRequestBuilder; +import dev.plexapi.sdk.models.operations.IngestTransientItemResponse; +import dev.plexapi.sdk.models.operations.ListMatchesRequest; +import dev.plexapi.sdk.models.operations.ListMatchesRequestBuilder; +import dev.plexapi.sdk.models.operations.ListMatchesResponse; +import dev.plexapi.sdk.models.operations.ListPersonMediaRequest; +import dev.plexapi.sdk.models.operations.ListPersonMediaRequestBuilder; +import dev.plexapi.sdk.models.operations.ListPersonMediaResponse; +import dev.plexapi.sdk.models.operations.ListSimilarRequest; +import dev.plexapi.sdk.models.operations.ListSimilarRequestBuilder; +import dev.plexapi.sdk.models.operations.ListSimilarResponse; +import dev.plexapi.sdk.models.operations.ListSonicallySimilarRequest; +import dev.plexapi.sdk.models.operations.ListSonicallySimilarRequestBuilder; +import dev.plexapi.sdk.models.operations.ListSonicallySimilarResponse; +import dev.plexapi.sdk.models.operations.ListTopUsersRequest; +import dev.plexapi.sdk.models.operations.ListTopUsersRequestBuilder; +import dev.plexapi.sdk.models.operations.ListTopUsersResponse; +import dev.plexapi.sdk.models.operations.MatchItemRequest; +import dev.plexapi.sdk.models.operations.MatchItemRequestBuilder; +import dev.plexapi.sdk.models.operations.MatchItemResponse; +import dev.plexapi.sdk.models.operations.MergeItemsRequest; +import dev.plexapi.sdk.models.operations.MergeItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.MergeItemsResponse; +import dev.plexapi.sdk.models.operations.OptimizeDatabaseRequest; +import dev.plexapi.sdk.models.operations.OptimizeDatabaseRequestBuilder; +import dev.plexapi.sdk.models.operations.OptimizeDatabaseResponse; +import dev.plexapi.sdk.models.operations.RefreshItemsMetadataRequest; +import dev.plexapi.sdk.models.operations.RefreshItemsMetadataRequestBuilder; +import dev.plexapi.sdk.models.operations.RefreshItemsMetadataResponse; +import dev.plexapi.sdk.models.operations.RefreshSectionRequest; +import dev.plexapi.sdk.models.operations.RefreshSectionRequestBuilder; +import dev.plexapi.sdk.models.operations.RefreshSectionResponse; +import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataRequest; +import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataRequestBuilder; +import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataResponse; +import dev.plexapi.sdk.models.operations.SetItemArtworkRequest; +import dev.plexapi.sdk.models.operations.SetItemArtworkRequestBuilder; +import dev.plexapi.sdk.models.operations.SetItemArtworkResponse; +import dev.plexapi.sdk.models.operations.SetItemPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetItemPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.SetItemPreferencesResponse; +import dev.plexapi.sdk.models.operations.SetSectionPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetSectionPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.SetSectionPreferencesResponse; +import dev.plexapi.sdk.models.operations.SetStreamOffsetRequest; +import dev.plexapi.sdk.models.operations.SetStreamOffsetRequestBuilder; +import dev.plexapi.sdk.models.operations.SetStreamOffsetResponse; +import dev.plexapi.sdk.models.operations.SetStreamSelectionRequest; +import dev.plexapi.sdk.models.operations.SetStreamSelectionRequestBuilder; +import dev.plexapi.sdk.models.operations.SetStreamSelectionResponse; +import dev.plexapi.sdk.models.operations.SplitItemRequest; +import dev.plexapi.sdk.models.operations.SplitItemRequestBuilder; +import dev.plexapi.sdk.models.operations.SplitItemResponse; +import dev.plexapi.sdk.models.operations.StartAnalysisRequest; +import dev.plexapi.sdk.models.operations.StartAnalysisRequestBuilder; +import dev.plexapi.sdk.models.operations.StartAnalysisResponse; +import dev.plexapi.sdk.models.operations.StartBifGenerationRequest; +import dev.plexapi.sdk.models.operations.StartBifGenerationRequestBuilder; +import dev.plexapi.sdk.models.operations.StartBifGenerationResponse; +import dev.plexapi.sdk.models.operations.StopAllRefreshesRequestBuilder; +import dev.plexapi.sdk.models.operations.StopAllRefreshesResponse; +import dev.plexapi.sdk.models.operations.UnmatchRequest; +import dev.plexapi.sdk.models.operations.UnmatchRequestBuilder; +import dev.plexapi.sdk.models.operations.UnmatchResponse; +import dev.plexapi.sdk.models.operations.UpdateItemArtworkRequest; +import dev.plexapi.sdk.models.operations.UpdateItemArtworkRequestBuilder; +import dev.plexapi.sdk.models.operations.UpdateItemArtworkResponse; +import dev.plexapi.sdk.models.operations.UpdateItemsRequest; +import dev.plexapi.sdk.models.operations.UpdateItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.UpdateItemsResponse; +import dev.plexapi.sdk.operations.AddExtras; +import dev.plexapi.sdk.operations.AddSection; +import dev.plexapi.sdk.operations.AddSubtitles; +import dev.plexapi.sdk.operations.AnalyzeMetadata; +import dev.plexapi.sdk.operations.Autocomplete; +import dev.plexapi.sdk.operations.CancelRefresh; +import dev.plexapi.sdk.operations.CleanBundles; +import dev.plexapi.sdk.operations.CreateMarker; +import dev.plexapi.sdk.operations.DeleteCaches; +import dev.plexapi.sdk.operations.DeleteCollection; +import dev.plexapi.sdk.operations.DeleteIndexes; +import dev.plexapi.sdk.operations.DeleteIntros; +import dev.plexapi.sdk.operations.DeleteLibrarySection; +import dev.plexapi.sdk.operations.DeleteMarker; +import dev.plexapi.sdk.operations.DeleteMediaItem; +import dev.plexapi.sdk.operations.DeleteMetadataItem; +import dev.plexapi.sdk.operations.DeleteStream; +import dev.plexapi.sdk.operations.DetectAds; +import dev.plexapi.sdk.operations.DetectCredits; +import dev.plexapi.sdk.operations.DetectIntros; +import dev.plexapi.sdk.operations.DetectVoiceActivity; +import dev.plexapi.sdk.operations.EditMarker; +import dev.plexapi.sdk.operations.EditMetadataItem; +import dev.plexapi.sdk.operations.EditSection; +import dev.plexapi.sdk.operations.EmptyTrash; +import dev.plexapi.sdk.operations.GenerateThumbs; +import dev.plexapi.sdk.operations.GetAllItemLeaves; +import dev.plexapi.sdk.operations.GetAugmentationStatus; +import dev.plexapi.sdk.operations.GetAvailableSorts; +import dev.plexapi.sdk.operations.GetChapterImage; +import dev.plexapi.sdk.operations.GetCollections; +import dev.plexapi.sdk.operations.GetCommon; +import dev.plexapi.sdk.operations.GetExtras; +import dev.plexapi.sdk.operations.GetFile; +import dev.plexapi.sdk.operations.GetFirstCharacters; +import dev.plexapi.sdk.operations.GetImageFromBif; +import dev.plexapi.sdk.operations.GetItemArtwork; +import dev.plexapi.sdk.operations.GetItemTree; import dev.plexapi.sdk.operations.GetLibraryDetails; import dev.plexapi.sdk.operations.GetLibraryItems; -import dev.plexapi.sdk.operations.GetLibrarySectionsAll; -import dev.plexapi.sdk.operations.GetMediaArts; -import dev.plexapi.sdk.operations.GetMediaMetaData; -import dev.plexapi.sdk.operations.GetMediaPosters; -import dev.plexapi.sdk.operations.GetMetadataChildren; -import dev.plexapi.sdk.operations.GetRecentlyAddedLibrary; -import dev.plexapi.sdk.operations.GetRefreshLibraryMetadata; -import dev.plexapi.sdk.operations.GetSearchAllLibraries; -import dev.plexapi.sdk.operations.GetSearchLibrary; -import dev.plexapi.sdk.operations.GetTopWatchedContent; -import dev.plexapi.sdk.operations.PostMediaArts; -import dev.plexapi.sdk.operations.PostMediaPoster; -import java.lang.Double; +import dev.plexapi.sdk.operations.GetLibraryMatches; +import dev.plexapi.sdk.operations.GetMediaPart; +import dev.plexapi.sdk.operations.GetPartIndex; +import dev.plexapi.sdk.operations.GetPerson; +import dev.plexapi.sdk.operations.GetRandomArtwork; +import dev.plexapi.sdk.operations.GetRelatedItems; +import dev.plexapi.sdk.operations.GetSectionFilters; +import dev.plexapi.sdk.operations.GetSectionImage; +import dev.plexapi.sdk.operations.GetSectionPreferences; +import dev.plexapi.sdk.operations.GetSections; +import dev.plexapi.sdk.operations.GetSectionsPrefs; +import dev.plexapi.sdk.operations.GetStream; +import dev.plexapi.sdk.operations.GetStreamLevels; +import dev.plexapi.sdk.operations.GetStreamLoudness; +import dev.plexapi.sdk.operations.GetTags; +import dev.plexapi.sdk.operations.IngestTransientItem; +import dev.plexapi.sdk.operations.ListMatches; +import dev.plexapi.sdk.operations.ListPersonMedia; +import dev.plexapi.sdk.operations.ListSimilar; +import dev.plexapi.sdk.operations.ListSonicallySimilar; +import dev.plexapi.sdk.operations.ListTopUsers; +import dev.plexapi.sdk.operations.MatchItem; +import dev.plexapi.sdk.operations.MergeItems; +import dev.plexapi.sdk.operations.OptimizeDatabase; +import dev.plexapi.sdk.operations.RefreshItemsMetadata; +import dev.plexapi.sdk.operations.RefreshSection; +import dev.plexapi.sdk.operations.RefreshSectionsMetadata; +import dev.plexapi.sdk.operations.SetItemArtwork; +import dev.plexapi.sdk.operations.SetItemPreferences; +import dev.plexapi.sdk.operations.SetSectionPreferences; +import dev.plexapi.sdk.operations.SetStreamOffset; +import dev.plexapi.sdk.operations.SetStreamSelection; +import dev.plexapi.sdk.operations.SplitItem; +import dev.plexapi.sdk.operations.StartAnalysis; +import dev.plexapi.sdk.operations.StartBifGeneration; +import dev.plexapi.sdk.operations.StopAllRefreshes; +import dev.plexapi.sdk.operations.Unmatch; +import dev.plexapi.sdk.operations.UpdateItemArtwork; +import dev.plexapi.sdk.operations.UpdateItems; import java.lang.Exception; -import java.lang.String; -import java.util.Optional; /** - * API Calls interacting with Plex Media Server Libraries + * Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc). */ public class Library { private final SDKConfiguration sdkConfiguration; @@ -120,335 +342,9 @@ public class Library { } /** - * Get Hash Value + * Get all items in library * - *

This resource returns hash values for local files - * - * @return The call builder - */ - public GetFileHashRequestBuilder getFileHash() { - return new GetFileHashRequestBuilder(sdkConfiguration); - } - - /** - * Get Hash Value - * - *

This resource returns hash values for local files - * - * @param url This is the path to the local file, must be prefixed by `file://` - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetFileHashResponse getFileHash(String url) throws Exception { - return getFileHash(url, Optional.empty()); - } - - /** - * Get Hash Value - * - *

This resource returns hash values for local files - * - * @param url This is the path to the local file, must be prefixed by `file://` - * @param type Item type - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetFileHashResponse getFileHash(String url, Optional type) throws Exception { - GetFileHashRequest request = - GetFileHashRequest - .builder() - .url(url) - .type(type) - .build(); - RequestOperation operation - = new GetFileHash.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Recently Added - * - *

This endpoint will return the recently added content. - * - * @return The call builder - */ - public GetRecentlyAddedLibraryRequestBuilder getRecentlyAddedLibrary() { - return new GetRecentlyAddedLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Get Recently Added - * - *

This endpoint will return the recently added content. - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetRecentlyAddedLibraryResponse getRecentlyAddedLibrary(GetRecentlyAddedLibraryRequest request) throws Exception { - RequestOperation operation - = new GetRecentlyAddedLibrary.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get All Libraries - * - *

A library section (commonly referred to as just a library) is a collection of media. - * Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. - * For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. - * - *

Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. - * This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). - * - * @return The call builder - */ - public GetAllLibrariesRequestBuilder getAllLibraries() { - return new GetAllLibrariesRequestBuilder(sdkConfiguration); - } - - /** - * Get All Libraries - * - *

A library section (commonly referred to as just a library) is a collection of media. - * Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. - * For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. - * - *

Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. - * This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetAllLibrariesResponse getAllLibrariesDirect() throws Exception { - RequestlessOperation operation - = new GetAllLibraries.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get Library Details - * - *

## Library Details Endpoint - * - *

This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. - * - *

The details include: - * - *

### Directories - * Organized into three categories: - * - *

- **Primary Directories**: - * - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). - * - Most can be replicated via media queries. - * - Customizable by users. - * - *

- **Secondary Directories**: - * - Marked with `secondary="1"`. - * - Used in older clients for structured navigation. - * - *

- **Special Directories**: - * - Includes a "By Folder" entry for filesystem-based browsing. - * - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation. - * - *

### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - *

- **Type Object Attributes**: - * - `key`: Endpoint for the media list of this type. - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - *

- **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - *

- **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - *

> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - * @return The call builder - */ - public GetLibraryDetailsRequestBuilder getLibraryDetails() { - return new GetLibraryDetailsRequestBuilder(sdkConfiguration); - } - - /** - * Get Library Details - * - *

## Library Details Endpoint - * - *

This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. - * - *

The details include: - * - *

### Directories - * Organized into three categories: - * - *

- **Primary Directories**: - * - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). - * - Most can be replicated via media queries. - * - Customizable by users. - * - *

- **Secondary Directories**: - * - Marked with `secondary="1"`. - * - Used in older clients for structured navigation. - * - *

- **Special Directories**: - * - Includes a "By Folder" entry for filesystem-based browsing. - * - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation. - * - *

### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - *

- **Type Object Attributes**: - * - `key`: Endpoint for the media list of this type. - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - *

- **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - *

- **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - *

> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetLibraryDetailsResponse getLibraryDetails(int sectionKey) throws Exception { - return getLibraryDetails(Optional.empty(), sectionKey); - } - - /** - * Get Library Details - * - *

## Library Details Endpoint - * - *

This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. - * - *

The details include: - * - *

### Directories - * Organized into three categories: - * - *

- **Primary Directories**: - * - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). - * - Most can be replicated via media queries. - * - Customizable by users. - * - *

- **Secondary Directories**: - * - Marked with `secondary="1"`. - * - Used in older clients for structured navigation. - * - *

- **Special Directories**: - * - Includes a "By Folder" entry for filesystem-based browsing. - * - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation. - * - *

### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - *

- **Type Object Attributes**: - * - `key`: Endpoint for the media list of this type. - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - *

- **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - *

- **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - *

> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - * @param includeDetails Whether or not to include details for a section (types, filters, and sorts). - * Only exists for backwards compatibility, media providers other than the server libraries have it on always. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetLibraryDetailsResponse getLibraryDetails(Optional includeDetails, int sectionKey) throws Exception { - GetLibraryDetailsRequest request = - GetLibraryDetailsRequest - .builder() - .includeDetails(includeDetails) - .sectionKey(sectionKey) - .build(); - RequestOperation operation - = new GetLibraryDetails.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Delete Library Section - * - *

Delete a library using a specific section id - * - * @return The call builder - */ - public DeleteLibraryRequestBuilder deleteLibrary() { - return new DeleteLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Delete Library Section - * - *

Delete a library using a specific section id - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public DeleteLibraryResponse deleteLibrary(int sectionKey) throws Exception { - DeleteLibraryRequest request = - DeleteLibraryRequest - .builder() - .sectionKey(sectionKey) - .build(); - RequestOperation operation - = new DeleteLibrary.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Library Items - * - *

Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: - * - `all`: All items in the section. - * - `unwatched`: Items that have not been played. - * - `newest`: Items that are recently released. - * - `recentlyAdded`: Items that are recently added to the library. - * - `recentlyViewed`: Items that were recently viewed. - * - `onDeck`: Items to continue watching. - * - `collection`: Items categorized by collection. - * - `edition`: Items categorized by edition. - * - `genre`: Items categorized by genre. - * - `year`: Items categorized by year of release. - * - `decade`: Items categorized by decade. - * - `director`: Items categorized by director. - * - `actor`: Items categorized by starring actor. - * - `country`: Items categorized by country of origin. - * - `contentRating`: Items categorized by content rating. - * - `rating`: Items categorized by rating. - * - `resolution`: Items categorized by resolution. - * - `firstCharacter`: Items categorized by the first letter. - * - `folder`: Items categorized by folder. - * - `albums`: Items categorized by album. + *

Request all metadata items according to a query. * * @return The call builder */ @@ -457,29 +353,9 @@ public class Library { } /** - * Get Library Items + * Get all items in library * - *

Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: - * - `all`: All items in the section. - * - `unwatched`: Items that have not been played. - * - `newest`: Items that are recently released. - * - `recentlyAdded`: Items that are recently added to the library. - * - `recentlyViewed`: Items that were recently viewed. - * - `onDeck`: Items to continue watching. - * - `collection`: Items categorized by collection. - * - `edition`: Items categorized by edition. - * - `genre`: Items categorized by genre. - * - `year`: Items categorized by year of release. - * - `decade`: Items categorized by decade. - * - `director`: Items categorized by director. - * - `actor`: Items categorized by starring actor. - * - `country`: Items categorized by country of origin. - * - `contentRating`: Items categorized by content rating. - * - `rating`: Items categorized by rating. - * - `resolution`: Items categorized by resolution. - * - `firstCharacter`: Items categorized by the first letter. - * - `folder`: Items categorized by folder. - * - `albums`: Items categorized by album. + *

Request all metadata items according to a query. * * @param request The request object containing all the parameters for the API call. * @return The response from the API call @@ -492,598 +368,2142 @@ public class Library { } /** - * Get Library section media by tag ALL + * Delete library caches * - *

Retrieves a list of all general media data for this library. + *

Delete the hub caches so they are recomputed on next request * * @return The call builder */ - public GetLibrarySectionsAllRequestBuilder getLibrarySectionsAll() { - return new GetLibrarySectionsAllRequestBuilder(sdkConfiguration); + public DeleteCachesRequestBuilder deleteCaches() { + return new DeleteCachesRequestBuilder(sdkConfiguration); } /** - * Get Library section media by tag ALL + * Delete library caches * - *

Retrieves a list of all general media data for this library. + *

Delete the hub caches so they are recomputed on next request + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteCachesResponse deleteCachesDirect() throws Exception { + RequestlessOperation operation + = new DeleteCaches.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Clean bundles + * + *

Clean out any now unused bundles. Bundles can become unused when media is deleted + * + * @return The call builder + */ + public CleanBundlesRequestBuilder cleanBundles() { + return new CleanBundlesRequestBuilder(sdkConfiguration); + } + + /** + * Clean bundles + * + *

Clean out any now unused bundles. Bundles can become unused when media is deleted + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CleanBundlesResponse cleanBundlesDirect() throws Exception { + RequestlessOperation operation + = new CleanBundles.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Ingest a transient item + * + *

This endpoint takes a file path specified in the `url` parameter, matches it using the scanner's match mechanism, downloads rich metadata, and then ingests the item as a transient item (without a library section). In the case where the file represents an episode, the entire tree (show, season, and episode) is added as transient items. At this time, movies and episodes are the only supported types, which are gleaned automatically from the file path. + * Note that any of the parameters passed to the metadata details endpoint (e.g. `includeExtras=1`) work here. + * + * @return The call builder + */ + public IngestTransientItemRequestBuilder ingestTransientItem() { + return new IngestTransientItemRequestBuilder(sdkConfiguration); + } + + /** + * Ingest a transient item + * + *

This endpoint takes a file path specified in the `url` parameter, matches it using the scanner's match mechanism, downloads rich metadata, and then ingests the item as a transient item (without a library section). In the case where the file represents an episode, the entire tree (show, season, and episode) is added as transient items. At this time, movies and episodes are the only supported types, which are gleaned automatically from the file path. + * Note that any of the parameters passed to the metadata details endpoint (e.g. `includeExtras=1`) work here. * * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetLibrarySectionsAllResponse getLibrarySectionsAll(GetLibrarySectionsAllRequest request) throws Exception { - RequestOperation operation - = new GetLibrarySectionsAll.Sync(sdkConfiguration); + public IngestTransientItemResponse ingestTransientItem(IngestTransientItemRequest request) throws Exception { + RequestOperation operation + = new IngestTransientItem.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** - * Refresh Metadata Of The Library + * Get library matches * - *

This endpoint Refreshes all the Metadata of the library. + *

The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints. + * This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata. + * The endpoint response can including multiple matches, if there is ambiguity, each one containing a `score` from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching). + * The `guid` hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB `ttXXX`) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of `Jane Eyre`, which could refer to the 1943 or the 2011 version). + * Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title * * @return The call builder */ - public GetRefreshLibraryMetadataRequestBuilder getRefreshLibraryMetadata() { - return new GetRefreshLibraryMetadataRequestBuilder(sdkConfiguration); + public GetLibraryMatchesRequestBuilder getLibraryMatches() { + return new GetLibraryMatchesRequestBuilder(sdkConfiguration); } /** - * Refresh Metadata Of The Library + * Get library matches * - *

This endpoint Refreshes all the Metadata of the library. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetRefreshLibraryMetadataResponse getRefreshLibraryMetadata(int sectionKey) throws Exception { - return getRefreshLibraryMetadata(Optional.empty(), sectionKey); - } - - /** - * Refresh Metadata Of The Library - * - *

This endpoint Refreshes all the Metadata of the library. - * - * @param force Force the refresh even if the library is already being refreshed. - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetRefreshLibraryMetadataResponse getRefreshLibraryMetadata(Optional force, int sectionKey) throws Exception { - GetRefreshLibraryMetadataRequest request = - GetRefreshLibraryMetadataRequest - .builder() - .force(force) - .sectionKey(sectionKey) - .build(); - RequestOperation operation - = new GetRefreshLibraryMetadata.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Search Library - * - *

Search for content within a specific section of the library. - * - *

### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - *

- **Type Object Attributes**: - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - *

- **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - *

- **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - *

> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - * @return The call builder - */ - public GetSearchLibraryRequestBuilder getSearchLibrary() { - return new GetSearchLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Search Library - * - *

Search for content within a specific section of the library. - * - *

### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - *

- **Type Object Attributes**: - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - *

- **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - *

- **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - *

> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetSearchLibraryResponse getSearchLibrary(int sectionKey, GetSearchLibraryQueryParamType type) throws Exception { - GetSearchLibraryRequest request = - GetSearchLibraryRequest - .builder() - .sectionKey(sectionKey) - .type(type) - .build(); - RequestOperation operation - = new GetSearchLibrary.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Genres of library media - * - *

Retrieves a list of all the genres that are found for the media in this library. - * - * @return The call builder - */ - public GetGenresLibraryRequestBuilder getGenresLibrary() { - return new GetGenresLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Get Genres of library media - * - *

Retrieves a list of all the genres that are found for the media in this library. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetGenresLibraryResponse getGenresLibrary(int sectionKey, GetGenresLibraryQueryParamType type) throws Exception { - GetGenresLibraryRequest request = - GetGenresLibraryRequest - .builder() - .sectionKey(sectionKey) - .type(type) - .build(); - RequestOperation operation - = new GetGenresLibrary.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Countries of library media - * - *

Retrieves a list of all the countries that are found for the media in this library. - * - * @return The call builder - */ - public GetCountriesLibraryRequestBuilder getCountriesLibrary() { - return new GetCountriesLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Get Countries of library media - * - *

Retrieves a list of all the countries that are found for the media in this library. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetCountriesLibraryResponse getCountriesLibrary(int sectionKey, GetCountriesLibraryQueryParamType type) throws Exception { - GetCountriesLibraryRequest request = - GetCountriesLibraryRequest - .builder() - .sectionKey(sectionKey) - .type(type) - .build(); - RequestOperation operation - = new GetCountriesLibrary.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Actors of library media - * - *

Retrieves a list of all the actors that are found for the media in this library. - * - * @return The call builder - */ - public GetActorsLibraryRequestBuilder getActorsLibrary() { - return new GetActorsLibraryRequestBuilder(sdkConfiguration); - } - - /** - * Get Actors of library media - * - *

Retrieves a list of all the actors that are found for the media in this library. - * - * @param sectionKey The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetActorsLibraryResponse getActorsLibrary(int sectionKey, GetActorsLibraryQueryParamType type) throws Exception { - GetActorsLibraryRequest request = - GetActorsLibraryRequest - .builder() - .sectionKey(sectionKey) - .type(type) - .build(); - RequestOperation operation - = new GetActorsLibrary.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Search All Libraries - * - *

Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. - * - * @return The call builder - */ - public GetSearchAllLibrariesRequestBuilder getSearchAllLibraries() { - return new GetSearchAllLibrariesRequestBuilder(sdkConfiguration); - } - - /** - * Search All Libraries - * - *

Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. + *

The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints. + * This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata. + * The endpoint response can including multiple matches, if there is ambiguity, each one containing a `score` from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching). + * The `guid` hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB `ttXXX`) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of `Jane Eyre`, which could refer to the 1943 or the 2011 version). + * Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title * * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetSearchAllLibrariesResponse getSearchAllLibraries(GetSearchAllLibrariesRequest request) throws Exception { - RequestOperation operation - = new GetSearchAllLibraries.Sync(sdkConfiguration); + public GetLibraryMatchesResponse getLibraryMatches(GetLibraryMatchesRequest request) throws Exception { + RequestOperation operation + = new GetLibraryMatches.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** - * Get Media Metadata + * Optimize the Database * - *

This endpoint will return all the (meta)data of one or more library items specified by the ratingKey. - * Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617"). + *

Initiate optimize on the database. * * @return The call builder */ - public GetMediaMetaDataRequestBuilder getMediaMetaData() { - return new GetMediaMetaDataRequestBuilder(sdkConfiguration); + public OptimizeDatabaseRequestBuilder optimizeDatabase() { + return new OptimizeDatabaseRequestBuilder(sdkConfiguration); } /** - * Get Media Metadata + * Optimize the Database * - *

This endpoint will return all the (meta)data of one or more library items specified by the ratingKey. - * Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617"). + *

Initiate optimize on the database. * * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetMediaMetaDataResponse getMediaMetaData(GetMediaMetaDataRequest request) throws Exception { - RequestOperation operation - = new GetMediaMetaData.Sync(sdkConfiguration); + public OptimizeDatabaseResponse optimizeDatabase(OptimizeDatabaseRequest request) throws Exception { + RequestOperation operation + = new OptimizeDatabase.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** - * Get Media Background Artwork + * Get random artwork * - *

Returns the background artwork for a library item. + *

Get random artwork across sections. This is commonly used for a screensaver. + * + *

This retrieves 100 random artwork paths in the specified sections and returns them. Restrictions are put in place to not return artwork for items the user is not allowed to access. Artwork will be for Movies, Shows, and Artists only. * * @return The call builder */ - public GetMediaArtsRequestBuilder getMediaArts() { - return new GetMediaArtsRequestBuilder(sdkConfiguration); + public GetRandomArtworkRequestBuilder getRandomArtwork() { + return new GetRandomArtworkRequestBuilder(sdkConfiguration); } /** - * Get Media Background Artwork + * Get random artwork * - *

Returns the background artwork for a library item. + *

Get random artwork across sections. This is commonly used for a screensaver. * - * @param ratingKey the id of the library item to return the artwork of. + *

This retrieves 100 random artwork paths in the specified sections and returns them. Restrictions are put in place to not return artwork for items the user is not allowed to access. Artwork will be for Movies, Shows, and Artists only. + * + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetMediaArtsResponse getMediaArts(long ratingKey) throws Exception { - GetMediaArtsRequest request = - GetMediaArtsRequest - .builder() - .ratingKey(ratingKey) - .build(); - RequestOperation operation - = new GetMediaArts.Sync(sdkConfiguration); + public GetRandomArtworkResponse getRandomArtwork(GetRandomArtworkRequest request) throws Exception { + RequestOperation operation + = new GetRandomArtwork.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** - * Upload Media Background Artwork + * Get library sections (main Media Provider Only) * - *

Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + *

A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. + * Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). * * @return The call builder */ - public PostMediaArtsRequestBuilder postMediaArts() { - return new PostMediaArtsRequestBuilder(sdkConfiguration); + public GetSectionsRequestBuilder getSections() { + return new GetSectionsRequestBuilder(sdkConfiguration); } /** - * Upload Media Background Artwork + * Get library sections (main Media Provider Only) * - *

Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + *

A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. + * Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). * - * @param ratingKey the id of the library item to return the posters of. * @return The response from the API call * @throws Exception if the API call fails */ - public PostMediaArtsResponse postMediaArts(long ratingKey) throws Exception { - return postMediaArts(ratingKey, Optional.empty(), Optional.empty()); + public GetSectionsResponse getSectionsDirect() throws Exception { + RequestlessOperation operation + = new GetSections.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); } /** - * Upload Media Background Artwork + * Add a library section * - *

Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + *

Add a new library section to the server * - * @param ratingKey the id of the library item to return the posters of. - * @param url The URL of the image, if uploading a remote image - * @param requestBody The contents of the image, if uploading a local file + * @return The call builder + */ + public AddSectionRequestBuilder addSection() { + return new AddSectionRequestBuilder(sdkConfiguration); + } + + /** + * Add a library section + * + *

Add a new library section to the server + * + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public PostMediaArtsResponse postMediaArts( - long ratingKey, Optional url, - Optional requestBody) throws Exception { - PostMediaArtsRequest request = - PostMediaArtsRequest - .builder() - .ratingKey(ratingKey) - .url(url) - .requestBody(requestBody) - .build(); - RequestOperation operation - = new PostMediaArts.Sync(sdkConfiguration); + public AddSectionResponse addSection(AddSectionRequest request) throws Exception { + RequestOperation operation + = new AddSection.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** - * Get Media Posters + * Stop refresh * - *

Returns the available posters for a library item. + *

Stop all refreshes across all sections * * @return The call builder */ - public GetMediaPostersRequestBuilder getMediaPosters() { - return new GetMediaPostersRequestBuilder(sdkConfiguration); + public StopAllRefreshesRequestBuilder stopAllRefreshes() { + return new StopAllRefreshesRequestBuilder(sdkConfiguration); } /** - * Get Media Posters + * Stop refresh * - *

Returns the available posters for a library item. + *

Stop all refreshes across all sections * - * @param ratingKey the id of the library item to return the posters of. * @return The response from the API call * @throws Exception if the API call fails */ - public GetMediaPostersResponse getMediaPosters(long ratingKey) throws Exception { - GetMediaPostersRequest request = - GetMediaPostersRequest - .builder() - .ratingKey(ratingKey) - .build(); - RequestOperation operation - = new GetMediaPosters.Sync(sdkConfiguration); + public StopAllRefreshesResponse stopAllRefreshesDirect() throws Exception { + RequestlessOperation operation + = new StopAllRefreshes.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Get section prefs + * + *

Get a section's preferences for a metadata type + * + * @return The call builder + */ + public GetSectionsPrefsRequestBuilder getSectionsPrefs() { + return new GetSectionsPrefsRequestBuilder(sdkConfiguration); + } + + /** + * Get section prefs + * + *

Get a section's preferences for a metadata type + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSectionsPrefsResponse getSectionsPrefs(GetSectionsPrefsRequest request) throws Exception { + RequestOperation operation + = new GetSectionsPrefs.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** - * Upload Media Poster + * Refresh all sections * - *

Uploads a poster to a library item, either from a local file or a remote URL + *

Tell PMS to refresh all section metadata * * @return The call builder */ - public PostMediaPosterRequestBuilder postMediaPoster() { - return new PostMediaPosterRequestBuilder(sdkConfiguration); + public RefreshSectionsMetadataRequestBuilder refreshSectionsMetadata() { + return new RefreshSectionsMetadataRequestBuilder(sdkConfiguration); } /** - * Upload Media Poster + * Refresh all sections * - *

Uploads a poster to a library item, either from a local file or a remote URL + *

Tell PMS to refresh all section metadata * - * @param ratingKey the id of the library item to return the posters of. + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public PostMediaPosterResponse postMediaPoster(long ratingKey) throws Exception { - return postMediaPoster(ratingKey, Optional.empty(), Optional.empty()); - } - - /** - * Upload Media Poster - * - *

Uploads a poster to a library item, either from a local file or a remote URL - * - * @param ratingKey the id of the library item to return the posters of. - * @param url The URL of the image, if uploading a remote image - * @param requestBody The contents of the image, if uploading a local file - * @return The response from the API call - * @throws Exception if the API call fails - */ - public PostMediaPosterResponse postMediaPoster( - long ratingKey, Optional url, - Optional requestBody) throws Exception { - PostMediaPosterRequest request = - PostMediaPosterRequest - .builder() - .ratingKey(ratingKey) - .url(url) - .requestBody(requestBody) - .build(); - RequestOperation operation - = new PostMediaPoster.Sync(sdkConfiguration); + public RefreshSectionsMetadataResponse refreshSectionsMetadata(RefreshSectionsMetadataRequest request) throws Exception { + RequestOperation operation + = new RefreshSectionsMetadata.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** - * Get Items Children + * Get all library tags of a type * - *

This endpoint will return the children of of a library item specified with the ratingKey. + *

Get all library tags of a type * * @return The call builder */ - public GetMetadataChildrenRequestBuilder getMetadataChildren() { - return new GetMetadataChildrenRequestBuilder(sdkConfiguration); + public GetTagsRequestBuilder getTags() { + return new GetTagsRequestBuilder(sdkConfiguration); } /** - * Get Items Children + * Get all library tags of a type * - *

This endpoint will return the children of of a library item specified with the ratingKey. + *

Get all library tags of a type * - * @param ratingKey the id of the library item to return the children of. + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetMetadataChildrenResponse getMetadataChildren(double ratingKey) throws Exception { - return getMetadataChildren(ratingKey, Optional.empty()); - } - - /** - * Get Items Children - * - *

This endpoint will return the children of of a library item specified with the ratingKey. - * - * @param ratingKey the id of the library item to return the children of. - * @param includeElements Adds additional elements to the response. Supported types are (Stream) - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetMetadataChildrenResponse getMetadataChildren(double ratingKey, Optional includeElements) throws Exception { - GetMetadataChildrenRequest request = - GetMetadataChildrenRequest - .builder() - .ratingKey(ratingKey) - .includeElements(includeElements) - .build(); - RequestOperation operation - = new GetMetadataChildren.Sync(sdkConfiguration); + public GetTagsResponse getTags(GetTagsRequest request) throws Exception { + RequestOperation operation + = new GetTags.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** - * Get Top Watched Content + * Delete a metadata item * - *

This endpoint will return the top watched content from libraries of a certain type + *

Delete a single metadata item from the library, deleting media as well * * @return The call builder */ - public GetTopWatchedContentRequestBuilder getTopWatchedContent() { - return new GetTopWatchedContentRequestBuilder(sdkConfiguration); + public DeleteMetadataItemRequestBuilder deleteMetadataItem() { + return new DeleteMetadataItemRequestBuilder(sdkConfiguration); } /** - * Get Top Watched Content + * Delete a metadata item * - *

This endpoint will return the top watched content from libraries of a certain type + *

Delete a single metadata item from the library, deleting media as well * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetTopWatchedContentResponse getTopWatchedContent(GetTopWatchedContentQueryParamType type) throws Exception { - return getTopWatchedContent(type, Optional.empty()); + public DeleteMetadataItemResponse deleteMetadataItem(DeleteMetadataItemRequest request) throws Exception { + RequestOperation operation + = new DeleteMetadataItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); } /** - * Get Top Watched Content + * Edit a metadata item * - *

This endpoint will return the top watched content from libraries of a certain type + *

Edit metadata items setting fields * - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @param includeGuids Adds the Guid object to the response - * + * @return The call builder + */ + public EditMetadataItemRequestBuilder editMetadataItem() { + return new EditMetadataItemRequestBuilder(sdkConfiguration); + } + + /** + * Edit a metadata item + * + *

Edit metadata items setting fields + * + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetTopWatchedContentResponse getTopWatchedContent(GetTopWatchedContentQueryParamType type, Optional includeGuids) throws Exception { - GetTopWatchedContentRequest request = - GetTopWatchedContentRequest - .builder() - .type(type) - .includeGuids(includeGuids) - .build(); - RequestOperation operation - = new GetTopWatchedContent.Sync(sdkConfiguration); + public EditMetadataItemResponse editMetadataItem(EditMetadataItemRequest request) throws Exception { + RequestOperation operation + = new EditMetadataItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Ad-detect an item + * + *

Start the detection of ads in a metadata item + * + * @return The call builder + */ + public DetectAdsRequestBuilder detectAds() { + return new DetectAdsRequestBuilder(sdkConfiguration); + } + + /** + * Ad-detect an item + * + *

Start the detection of ads in a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DetectAdsResponse detectAds(DetectAdsRequest request) throws Exception { + RequestOperation operation + = new DetectAds.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get the leaves of an item + * + *

Get the leaves for a metadata item such as the episodes in a show + * + * @return The call builder + */ + public GetAllItemLeavesRequestBuilder getAllItemLeaves() { + return new GetAllItemLeavesRequestBuilder(sdkConfiguration); + } + + /** + * Get the leaves of an item + * + *

Get the leaves for a metadata item such as the episodes in a show + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAllItemLeavesResponse getAllItemLeaves(GetAllItemLeavesRequest request) throws Exception { + RequestOperation operation + = new GetAllItemLeaves.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Analyze an item + * + *

Start the analysis of a metadata item + * + * @return The call builder + */ + public AnalyzeMetadataRequestBuilder analyzeMetadata() { + return new AnalyzeMetadataRequestBuilder(sdkConfiguration); + } + + /** + * Analyze an item + * + *

Start the analysis of a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AnalyzeMetadataResponse analyzeMetadata(AnalyzeMetadataRequest request) throws Exception { + RequestOperation operation + = new AnalyzeMetadata.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Generate thumbs of chapters for an item + * + *

Start the chapter thumb generation for an item + * + * @return The call builder + */ + public GenerateThumbsRequestBuilder generateThumbs() { + return new GenerateThumbsRequestBuilder(sdkConfiguration); + } + + /** + * Generate thumbs of chapters for an item + * + *

Start the chapter thumb generation for an item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GenerateThumbsResponse generateThumbs(GenerateThumbsRequest request) throws Exception { + RequestOperation operation + = new GenerateThumbs.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Credit detect a metadata item + * + *

Start credit detection on a metadata item + * + * @return The call builder + */ + public DetectCreditsRequestBuilder detectCredits() { + return new DetectCreditsRequestBuilder(sdkConfiguration); + } + + /** + * Credit detect a metadata item + * + *

Start credit detection on a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DetectCreditsResponse detectCredits(DetectCreditsRequest request) throws Exception { + RequestOperation operation + = new DetectCredits.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get an item's extras + * + *

Get the extras for a metadata item + * + * @return The call builder + */ + public GetExtrasRequestBuilder getExtras() { + return new GetExtrasRequestBuilder(sdkConfiguration); + } + + /** + * Get an item's extras + * + *

Get the extras for a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetExtrasResponse getExtras(GetExtrasRequest request) throws Exception { + RequestOperation operation + = new GetExtras.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Add to an item's extras + * + *

Add an extra to a metadata item + * + * @return The call builder + */ + public AddExtrasRequestBuilder addExtras() { + return new AddExtrasRequestBuilder(sdkConfiguration); + } + + /** + * Add to an item's extras + * + *

Add an extra to a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddExtrasResponse addExtras(AddExtrasRequest request) throws Exception { + RequestOperation operation + = new AddExtras.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a file from a metadata or media bundle + * + *

Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme) + * + * @return The call builder + */ + public GetFileRequestBuilder getFile() { + return new GetFileRequestBuilder(sdkConfiguration); + } + + /** + * Get a file from a metadata or media bundle + * + *

Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetFileResponse getFile(GetFileRequest request) throws Exception { + RequestOperation operation + = new GetFile.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Start BIF generation of an item + * + *

Start the indexing (BIF generation) of an item + * + * @return The call builder + */ + public StartBifGenerationRequestBuilder startBifGeneration() { + return new StartBifGenerationRequestBuilder(sdkConfiguration); + } + + /** + * Start BIF generation of an item + * + *

Start the indexing (BIF generation) of an item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public StartBifGenerationResponse startBifGeneration(StartBifGenerationRequest request) throws Exception { + RequestOperation operation + = new StartBifGeneration.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Intro detect an item + * + *

Start the detection of intros in a metadata item + * + * @return The call builder + */ + public DetectIntrosRequestBuilder detectIntros() { + return new DetectIntrosRequestBuilder(sdkConfiguration); + } + + /** + * Intro detect an item + * + *

Start the detection of intros in a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DetectIntrosResponse detectIntros(DetectIntrosRequest request) throws Exception { + RequestOperation operation + = new DetectIntros.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Create a marker + * + *

Create a marker for this user on the metadata item + * + * @return The call builder + */ + public CreateMarkerRequestBuilder createMarker() { + return new CreateMarkerRequestBuilder(sdkConfiguration); + } + + /** + * Create a marker + * + *

Create a marker for this user on the metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateMarkerResponse createMarker(CreateMarkerRequest request) throws Exception { + RequestOperation operation + = new CreateMarker.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Match a metadata item + * + *

Match a metadata item to a guid + * + * @return The call builder + */ + public MatchItemRequestBuilder matchItem() { + return new MatchItemRequestBuilder(sdkConfiguration); + } + + /** + * Match a metadata item + * + *

Match a metadata item to a guid + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public MatchItemResponse matchItem(MatchItemRequest request) throws Exception { + RequestOperation operation + = new MatchItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get metadata matches for an item + * + *

Get the list of metadata matches for a metadata item + * + * @return The call builder + */ + public ListMatchesRequestBuilder listMatches() { + return new ListMatchesRequestBuilder(sdkConfiguration); + } + + /** + * Get metadata matches for an item + * + *

Get the list of metadata matches for a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListMatchesResponse listMatches(ListMatchesRequest request) throws Exception { + RequestOperation operation + = new ListMatches.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Merge a metadata item + * + *

Merge a metadata item with other items + * + * @return The call builder + */ + public MergeItemsRequestBuilder mergeItems() { + return new MergeItemsRequestBuilder(sdkConfiguration); + } + + /** + * Merge a metadata item + * + *

Merge a metadata item with other items + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public MergeItemsResponse mergeItems(MergeItemsRequest request) throws Exception { + RequestOperation operation + = new MergeItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get nearest tracks to metadata item + * + *

Get the nearest tracks, sonically, to the provided track + * + * @return The call builder + */ + public ListSonicallySimilarRequestBuilder listSonicallySimilar() { + return new ListSonicallySimilarRequestBuilder(sdkConfiguration); + } + + /** + * Get nearest tracks to metadata item + * + *

Get the nearest tracks, sonically, to the provided track + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListSonicallySimilarResponse listSonicallySimilar(ListSonicallySimilarRequest request) throws Exception { + RequestOperation operation + = new ListSonicallySimilar.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set metadata preferences + * + *

Set the preferences on a metadata item + * + * @return The call builder + */ + public SetItemPreferencesRequestBuilder setItemPreferences() { + return new SetItemPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Set metadata preferences + * + *

Set the preferences on a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SetItemPreferencesResponse setItemPreferences(SetItemPreferencesRequest request) throws Exception { + RequestOperation operation + = new SetItemPreferences.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Refresh a metadata item + * + *

Refresh a metadata item from the agent + * + * @return The call builder + */ + public RefreshItemsMetadataRequestBuilder refreshItemsMetadata() { + return new RefreshItemsMetadataRequestBuilder(sdkConfiguration); + } + + /** + * Refresh a metadata item + * + *

Refresh a metadata item from the agent + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public RefreshItemsMetadataResponse refreshItemsMetadata(RefreshItemsMetadataRequest request) throws Exception { + RequestOperation operation + = new RefreshItemsMetadata.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get related items + * + *

Get a hub of related items to a metadata item + * + * @return The call builder + */ + public GetRelatedItemsRequestBuilder getRelatedItems() { + return new GetRelatedItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get related items + * + *

Get a hub of related items to a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetRelatedItemsResponse getRelatedItems(GetRelatedItemsRequest request) throws Exception { + RequestOperation operation + = new GetRelatedItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get similar items + * + *

Get a list of similar items to a metadata item + * + * @return The call builder + */ + public ListSimilarRequestBuilder listSimilar() { + return new ListSimilarRequestBuilder(sdkConfiguration); + } + + /** + * Get similar items + * + *

Get a list of similar items to a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListSimilarResponse listSimilar(ListSimilarRequest request) throws Exception { + RequestOperation operation + = new ListSimilar.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Split a metadata item + * + *

Split a metadata item into multiple items + * + * @return The call builder + */ + public SplitItemRequestBuilder splitItem() { + return new SplitItemRequestBuilder(sdkConfiguration); + } + + /** + * Split a metadata item + * + *

Split a metadata item into multiple items + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SplitItemResponse splitItem(SplitItemRequest request) throws Exception { + RequestOperation operation + = new SplitItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Add subtitles + * + *

Add a subtitle to a metadata item + * + * @return The call builder + */ + public AddSubtitlesRequestBuilder addSubtitles() { + return new AddSubtitlesRequestBuilder(sdkConfiguration); + } + + /** + * Add subtitles + * + *

Add a subtitle to a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddSubtitlesResponse addSubtitles(AddSubtitlesRequest request) throws Exception { + RequestOperation operation + = new AddSubtitles.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get metadata items as a tree + * + *

Get a tree of metadata items, such as the seasons/episodes of a show + * + * @return The call builder + */ + public GetItemTreeRequestBuilder getItemTree() { + return new GetItemTreeRequestBuilder(sdkConfiguration); + } + + /** + * Get metadata items as a tree + * + *

Get a tree of metadata items, such as the seasons/episodes of a show + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetItemTreeResponse getItemTree(GetItemTreeRequest request) throws Exception { + RequestOperation operation + = new GetItemTree.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Unmatch a metadata item + * + *

Unmatch a metadata item to info fetched from the agent + * + * @return The call builder + */ + public UnmatchRequestBuilder unmatch() { + return new UnmatchRequestBuilder(sdkConfiguration); + } + + /** + * Unmatch a metadata item + * + *

Unmatch a metadata item to info fetched from the agent + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UnmatchResponse unmatch(UnmatchRequest request) throws Exception { + RequestOperation operation + = new Unmatch.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get metadata top users + * + *

Get the list of users which have played this item starting with the most + * + * @return The call builder + */ + public ListTopUsersRequestBuilder listTopUsers() { + return new ListTopUsersRequestBuilder(sdkConfiguration); + } + + /** + * Get metadata top users + * + *

Get the list of users which have played this item starting with the most + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListTopUsersResponse listTopUsers(ListTopUsersRequest request) throws Exception { + RequestOperation operation + = new ListTopUsers.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Detect voice activity + * + *

Start the detection of voice in a metadata item + * + * @return The call builder + */ + public DetectVoiceActivityRequestBuilder detectVoiceActivity() { + return new DetectVoiceActivityRequestBuilder(sdkConfiguration); + } + + /** + * Detect voice activity + * + *

Start the detection of voice in a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DetectVoiceActivityResponse detectVoiceActivity(DetectVoiceActivityRequest request) throws Exception { + RequestOperation operation + = new DetectVoiceActivity.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get augmentation status + * + *

Get augmentation status and potentially wait for completion + * + * @return The call builder + */ + public GetAugmentationStatusRequestBuilder getAugmentationStatus() { + return new GetAugmentationStatusRequestBuilder(sdkConfiguration); + } + + /** + * Get augmentation status + * + *

Get augmentation status and potentially wait for completion + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAugmentationStatusResponse getAugmentationStatus(GetAugmentationStatusRequest request) throws Exception { + RequestOperation operation + = new GetAugmentationStatus.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set stream selection + * + *

Set which streams (audio/subtitle) are selected by this user + * + * @return The call builder + */ + public SetStreamSelectionRequestBuilder setStreamSelection() { + return new SetStreamSelectionRequestBuilder(sdkConfiguration); + } + + /** + * Set stream selection + * + *

Set which streams (audio/subtitle) are selected by this user + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SetStreamSelectionResponse setStreamSelection(SetStreamSelectionRequest request) throws Exception { + RequestOperation operation + = new SetStreamSelection.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get person details + * + *

Get details for a single actor. + * + * @return The call builder + */ + public GetPersonRequestBuilder getPerson() { + return new GetPersonRequestBuilder(sdkConfiguration); + } + + /** + * Get person details + * + *

Get details for a single actor. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPersonResponse getPerson(GetPersonRequest request) throws Exception { + RequestOperation operation + = new GetPerson.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get media for a person + * + *

Get all the media for a single actor. + * + * @return The call builder + */ + public ListPersonMediaRequestBuilder listPersonMedia() { + return new ListPersonMediaRequestBuilder(sdkConfiguration); + } + + /** + * Get media for a person + * + *

Get all the media for a single actor. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListPersonMediaResponse listPersonMedia(ListPersonMediaRequest request) throws Exception { + RequestOperation operation + = new ListPersonMedia.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a library section + * + *

Delete a library section by id + * + * @return The call builder + */ + public DeleteLibrarySectionRequestBuilder deleteLibrarySection() { + return new DeleteLibrarySectionRequestBuilder(sdkConfiguration); + } + + /** + * Delete a library section + * + *

Delete a library section by id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteLibrarySectionResponse deleteLibrarySection(DeleteLibrarySectionRequest request) throws Exception { + RequestOperation operation + = new DeleteLibrarySection.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a library section by id + * + *

Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. It often contains a list of `Directory` metadata objects: These used to be used by clients to build a menuing system. + * + * @return The call builder + */ + public GetLibraryDetailsRequestBuilder getLibraryDetails() { + return new GetLibraryDetailsRequestBuilder(sdkConfiguration); + } + + /** + * Get a library section by id + * + *

Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. It often contains a list of `Directory` metadata objects: These used to be used by clients to build a menuing system. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetLibraryDetailsResponse getLibraryDetails(GetLibraryDetailsRequest request) throws Exception { + RequestOperation operation + = new GetLibraryDetails.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Edit a library section + * + *

Edit a library section by id setting parameters + * + * @return The call builder + */ + public EditSectionRequestBuilder editSection() { + return new EditSectionRequestBuilder(sdkConfiguration); + } + + /** + * Edit a library section + * + *

Edit a library section by id setting parameters + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public EditSectionResponse editSection(EditSectionRequest request) throws Exception { + RequestOperation operation + = new EditSection.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set the fields of the filtered items + * + *

This endpoint takes an large possible set of values. Here are some examples. + * - **Parameters, extra documentation** + * - artist.title.value + * - When used with track, both artist.title.value and album.title.value need to be specified + * - title.value usage + * - Summary + * - Tracks always rename and never merge + * - Albums and Artists + * - if single item and item without title does not exist, it is renamed. + * - if single item and item with title does exist they are merged. + * - if multiple they are always merged. + * - Tracks + * - Works as expected will update the track's title + * - Single track: `/library/sections/{id}/all?type=10&id=42&title.value=NewName` + * - Multiple tracks: `/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName` + * - All tracks: `/library/sections/{id}/all?type=10&title.value=NewName` + * - Albums + * - Functionality changes depending on the existence of an album with the same title + * - Album exists + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=Album 2` + * - Album with id 42 is merged into album titled "Album 2" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=Moo Album` + * - All albums are merged into the existing album titled "Moo Album" + * - Album does not exist + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle` + * - Album with id 42 has title modified to "NewAlbumTitle" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=NewAlbumTitle` + * - All albums are merged into a new album with title="NewAlbumTitle" + * - Artists + * - Functionaly changes depending on the existence of an artist with the same title. + * - Artist exists + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=Artist 2` + * - Artist with id 42 is merged into existing artist titled "Artist 2" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=Artist 3` + * - All artists are merged into the existing artist titled "Artist 3" + * - Artist does not exist + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle` + * - Artist with id 42 has title modified to "NewArtistTitle" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=NewArtistTitle` + * - All artists are merged into a new artist with title="NewArtistTitle" + * + *

- **Notes** + * - Technically square brackets are not allowed in an URI except the Internet Protocol Literal Address + * - RFC3513: A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is the only place where square bracket characters are allowed in the URI syntax. + * - Escaped square brackets are allowed, but don't render well + * + * @return The call builder + */ + public UpdateItemsRequestBuilder updateItems() { + return new UpdateItemsRequestBuilder(sdkConfiguration); + } + + /** + * Set the fields of the filtered items + * + *

This endpoint takes an large possible set of values. Here are some examples. + * - **Parameters, extra documentation** + * - artist.title.value + * - When used with track, both artist.title.value and album.title.value need to be specified + * - title.value usage + * - Summary + * - Tracks always rename and never merge + * - Albums and Artists + * - if single item and item without title does not exist, it is renamed. + * - if single item and item with title does exist they are merged. + * - if multiple they are always merged. + * - Tracks + * - Works as expected will update the track's title + * - Single track: `/library/sections/{id}/all?type=10&id=42&title.value=NewName` + * - Multiple tracks: `/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName` + * - All tracks: `/library/sections/{id}/all?type=10&title.value=NewName` + * - Albums + * - Functionality changes depending on the existence of an album with the same title + * - Album exists + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=Album 2` + * - Album with id 42 is merged into album titled "Album 2" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=Moo Album` + * - All albums are merged into the existing album titled "Moo Album" + * - Album does not exist + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle` + * - Album with id 42 has title modified to "NewAlbumTitle" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=NewAlbumTitle` + * - All albums are merged into a new album with title="NewAlbumTitle" + * - Artists + * - Functionaly changes depending on the existence of an artist with the same title. + * - Artist exists + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=Artist 2` + * - Artist with id 42 is merged into existing artist titled "Artist 2" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=Artist 3` + * - All artists are merged into the existing artist titled "Artist 3" + * - Artist does not exist + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle` + * - Artist with id 42 has title modified to "NewArtistTitle" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=NewArtistTitle` + * - All artists are merged into a new artist with title="NewArtistTitle" + * + *

- **Notes** + * - Technically square brackets are not allowed in an URI except the Internet Protocol Literal Address + * - RFC3513: A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is the only place where square bracket characters are allowed in the URI syntax. + * - Escaped square brackets are allowed, but don't render well + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateItemsResponse updateItems(UpdateItemsRequest request) throws Exception { + RequestOperation operation + = new UpdateItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Analyze a section + * + *

Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section + * + * @return The call builder + */ + public StartAnalysisRequestBuilder startAnalysis() { + return new StartAnalysisRequestBuilder(sdkConfiguration); + } + + /** + * Analyze a section + * + *

Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public StartAnalysisResponse startAnalysis(StartAnalysisRequest request) throws Exception { + RequestOperation operation + = new StartAnalysis.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get autocompletions for search + * + *

The field to autocomplete on is specified by the {field}.query parameter. For example `genre.query` or `title.query`. + * Returns a set of items from the filtered items whose {field} starts with {field}.query. In the results, a {field}.queryRange will be present to express the range of the match + * + * @return The call builder + */ + public AutocompleteRequestBuilder autocomplete() { + return new AutocompleteRequestBuilder(sdkConfiguration); + } + + /** + * Get autocompletions for search + * + *

The field to autocomplete on is specified by the {field}.query parameter. For example `genre.query` or `title.query`. + * Returns a set of items from the filtered items whose {field} starts with {field}.query. In the results, a {field}.queryRange will be present to express the range of the match + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AutocompleteResponse autocomplete(AutocompleteRequest request) throws Exception { + RequestOperation operation + = new Autocomplete.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get collections in a section + * + *

Get all collections in a section + * + * @return The call builder + */ + public GetCollectionsRequestBuilder getCollections() { + return new GetCollectionsRequestBuilder(sdkConfiguration); + } + + /** + * Get collections in a section + * + *

Get all collections in a section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetCollectionsResponse getCollections(GetCollectionsRequest request) throws Exception { + RequestOperation operation + = new GetCollections.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get common fields for items + * + *

Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter + * Fields which are not common will be expressed in the `mixedFields` field + * + * @return The call builder + */ + public GetCommonRequestBuilder getCommon() { + return new GetCommonRequestBuilder(sdkConfiguration); + } + + /** + * Get common fields for items + * + *

Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter + * Fields which are not common will be expressed in the `mixedFields` field + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetCommonResponse getCommon(GetCommonRequest request) throws Exception { + RequestOperation operation + = new GetCommon.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Empty section trash + * + *

Empty trash in the section, permanently deleting media/metadata for missing media + * + * @return The call builder + */ + public EmptyTrashRequestBuilder emptyTrash() { + return new EmptyTrashRequestBuilder(sdkConfiguration); + } + + /** + * Empty section trash + * + *

Empty trash in the section, permanently deleting media/metadata for missing media + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public EmptyTrashResponse emptyTrash(EmptyTrashRequest request) throws Exception { + RequestOperation operation + = new EmptyTrash.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get section filters + * + *

Get common filters on a section + * + * @return The call builder + */ + public GetSectionFiltersRequestBuilder getSectionFilters() { + return new GetSectionFiltersRequestBuilder(sdkConfiguration); + } + + /** + * Get section filters + * + *

Get common filters on a section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSectionFiltersResponse getSectionFilters(GetSectionFiltersRequest request) throws Exception { + RequestOperation operation + = new GetSectionFilters.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get list of first characters + * + *

Get list of first characters in this section + * + * @return The call builder + */ + public GetFirstCharactersRequestBuilder getFirstCharacters() { + return new GetFirstCharactersRequestBuilder(sdkConfiguration); + } + + /** + * Get list of first characters + * + *

Get list of first characters in this section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetFirstCharactersResponse getFirstCharacters(GetFirstCharactersRequest request) throws Exception { + RequestOperation operation + = new GetFirstCharacters.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete section indexes + * + *

Delete all the indexes in a section + * + * @return The call builder + */ + public DeleteIndexesRequestBuilder deleteIndexes() { + return new DeleteIndexesRequestBuilder(sdkConfiguration); + } + + /** + * Delete section indexes + * + *

Delete all the indexes in a section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteIndexesResponse deleteIndexes(DeleteIndexesRequest request) throws Exception { + RequestOperation operation + = new DeleteIndexes.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete section intro markers + * + *

Delete all the intro markers in a section + * + * @return The call builder + */ + public DeleteIntrosRequestBuilder deleteIntros() { + return new DeleteIntrosRequestBuilder(sdkConfiguration); + } + + /** + * Delete section intro markers + * + *

Delete all the intro markers in a section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteIntrosResponse deleteIntros(DeleteIntrosRequest request) throws Exception { + RequestOperation operation + = new DeleteIntros.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get section prefs + * + *

Get the prefs for a section by id and potentially overriding the agent + * + * @return The call builder + */ + public GetSectionPreferencesRequestBuilder getSectionPreferences() { + return new GetSectionPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Get section prefs + * + *

Get the prefs for a section by id and potentially overriding the agent + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSectionPreferencesResponse getSectionPreferences(GetSectionPreferencesRequest request) throws Exception { + RequestOperation operation + = new GetSectionPreferences.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set section prefs + * + *

Set the prefs for a section by id + * + * @return The call builder + */ + public SetSectionPreferencesRequestBuilder setSectionPreferences() { + return new SetSectionPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Set section prefs + * + *

Set the prefs for a section by id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SetSectionPreferencesResponse setSectionPreferences(SetSectionPreferencesRequest request) throws Exception { + RequestOperation operation + = new SetSectionPreferences.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Cancel section refresh + * + *

Cancel the refresh of a section + * + * @return The call builder + */ + public CancelRefreshRequestBuilder cancelRefresh() { + return new CancelRefreshRequestBuilder(sdkConfiguration); + } + + /** + * Cancel section refresh + * + *

Cancel the refresh of a section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CancelRefreshResponse cancelRefresh(CancelRefreshRequest request) throws Exception { + RequestOperation operation + = new CancelRefresh.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Refresh section + * + *

Start a refresh of this section + * + * @return The call builder + */ + public RefreshSectionRequestBuilder refreshSection() { + return new RefreshSectionRequestBuilder(sdkConfiguration); + } + + /** + * Refresh section + * + *

Start a refresh of this section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public RefreshSectionResponse refreshSection(RefreshSectionRequest request) throws Exception { + RequestOperation operation + = new RefreshSection.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a section sorts + * + *

Get the sort mechanisms available in a section + * + * @return The call builder + */ + public GetAvailableSortsRequestBuilder getAvailableSorts() { + return new GetAvailableSortsRequestBuilder(sdkConfiguration); + } + + /** + * Get a section sorts + * + *

Get the sort mechanisms available in a section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAvailableSortsResponse getAvailableSorts(GetAvailableSortsRequest request) throws Exception { + RequestOperation operation + = new GetAvailableSorts.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get loudness about a stream in json + * + *

The the loudness of a stream in db, one entry per 100ms + * + * @return The call builder + */ + public GetStreamLevelsRequestBuilder getStreamLevels() { + return new GetStreamLevelsRequestBuilder(sdkConfiguration); + } + + /** + * Get loudness about a stream in json + * + *

The the loudness of a stream in db, one entry per 100ms + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetStreamLevelsResponse getStreamLevels(GetStreamLevelsRequest request) throws Exception { + RequestOperation operation + = new GetStreamLevels.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get loudness about a stream + * + *

The the loudness of a stream in db, one number per line, one entry per 100ms + * + * @return The call builder + */ + public GetStreamLoudnessRequestBuilder getStreamLoudness() { + return new GetStreamLoudnessRequestBuilder(sdkConfiguration); + } + + /** + * Get loudness about a stream + * + *

The the loudness of a stream in db, one number per line, one entry per 100ms + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetStreamLoudnessResponse getStreamLoudness(GetStreamLoudnessRequest request) throws Exception { + RequestOperation operation + = new GetStreamLoudness.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a chapter image + * + *

Get a single chapter image for a piece of media + * + * @return The call builder + */ + public GetChapterImageRequestBuilder getChapterImage() { + return new GetChapterImageRequestBuilder(sdkConfiguration); + } + + /** + * Get a chapter image + * + *

Get a single chapter image for a piece of media + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetChapterImageResponse getChapterImage(GetChapterImageRequest request) throws Exception { + RequestOperation operation + = new GetChapterImage.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set an item's artwork, theme, etc + * + *

Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + * + * @return The call builder + */ + public SetItemArtworkRequestBuilder setItemArtwork() { + return new SetItemArtworkRequestBuilder(sdkConfiguration); + } + + /** + * Set an item's artwork, theme, etc + * + *

Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SetItemArtworkResponse setItemArtwork(SetItemArtworkRequest request) throws Exception { + RequestOperation operation + = new SetItemArtwork.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set an item's artwork, theme, etc + * + *

Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + * + * @return The call builder + */ + public UpdateItemArtworkRequestBuilder updateItemArtwork() { + return new UpdateItemArtworkRequestBuilder(sdkConfiguration); + } + + /** + * Set an item's artwork, theme, etc + * + *

Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateItemArtworkResponse updateItemArtwork(UpdateItemArtworkRequest request) throws Exception { + RequestOperation operation + = new UpdateItemArtwork.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a marker + * + *

Delete a marker for this user on the metadata item + * + * @return The call builder + */ + public DeleteMarkerRequestBuilder deleteMarker() { + return new DeleteMarkerRequestBuilder(sdkConfiguration); + } + + /** + * Delete a marker + * + *

Delete a marker for this user on the metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteMarkerResponse deleteMarker(DeleteMarkerRequest request) throws Exception { + RequestOperation operation + = new DeleteMarker.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Edit a marker + * + *

Edit a marker for this user on the metadata item + * + * @return The call builder + */ + public EditMarkerRequestBuilder editMarker() { + return new EditMarkerRequestBuilder(sdkConfiguration); + } + + /** + * Edit a marker + * + *

Edit a marker for this user on the metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public EditMarkerResponse editMarker(EditMarkerRequest request) throws Exception { + RequestOperation operation + = new EditMarker.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a media item + * + *

Delete a single media from a metadata item in the library + * + * @return The call builder + */ + public DeleteMediaItemRequestBuilder deleteMediaItem() { + return new DeleteMediaItemRequestBuilder(sdkConfiguration); + } + + /** + * Delete a media item + * + *

Delete a single media from a metadata item in the library + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteMediaItemResponse deleteMediaItem(DeleteMediaItemRequest request) throws Exception { + RequestOperation operation + = new DeleteMediaItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get BIF index for a part + * + *

Get BIF index for a part by index type + * + * @return The call builder + */ + public GetPartIndexRequestBuilder getPartIndex() { + return new GetPartIndexRequestBuilder(sdkConfiguration); + } + + /** + * Get BIF index for a part + * + *

Get BIF index for a part by index type + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPartIndexResponse getPartIndex(GetPartIndexRequest request) throws Exception { + RequestOperation operation + = new GetPartIndex.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a collection + * + *

Delete a library collection from the PMS + * + * @return The call builder + */ + public DeleteCollectionRequestBuilder deleteCollection() { + return new DeleteCollectionRequestBuilder(sdkConfiguration); + } + + /** + * Delete a collection + * + *

Delete a library collection from the PMS + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteCollectionResponse deleteCollection(DeleteCollectionRequest request) throws Exception { + RequestOperation operation + = new DeleteCollection.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a section composite image + * + *

Get a composite image of images in this section + * + * @return The call builder + */ + public GetSectionImageRequestBuilder getSectionImage() { + return new GetSectionImageRequestBuilder(sdkConfiguration); + } + + /** + * Get a section composite image + * + *

Get a composite image of images in this section + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSectionImageResponse getSectionImage(GetSectionImageRequest request) throws Exception { + RequestOperation operation + = new GetSectionImage.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a stream + * + *

Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled. + * + * @return The call builder + */ + public DeleteStreamRequestBuilder deleteStream() { + return new DeleteStreamRequestBuilder(sdkConfiguration); + } + + /** + * Delete a stream + * + *

Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteStreamResponse deleteStream(DeleteStreamRequest request) throws Exception { + RequestOperation operation + = new DeleteStream.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a stream + * + *

Get a stream (such as a sidecar subtitle stream) + * + * @return The call builder + */ + public GetStreamRequestBuilder getStream() { + return new GetStreamRequestBuilder(sdkConfiguration); + } + + /** + * Get a stream + * + *

Get a stream (such as a sidecar subtitle stream) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetStreamResponse getStream(GetStreamRequest request) throws Exception { + RequestOperation operation + = new GetStream.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Set a stream offset + * + *

Set a stream offset in ms. This may not be respected by all clients + * + * @return The call builder + */ + public SetStreamOffsetRequestBuilder setStreamOffset() { + return new SetStreamOffsetRequestBuilder(sdkConfiguration); + } + + /** + * Set a stream offset + * + *

Set a stream offset in ms. This may not be respected by all clients + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SetStreamOffsetResponse setStreamOffset(SetStreamOffsetRequest request) throws Exception { + RequestOperation operation + = new SetStreamOffset.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get an item's artwork, theme, etc + * + *

Get the artwork, thumb, element for a metadata item + * + * @return The call builder + */ + public GetItemArtworkRequestBuilder getItemArtwork() { + return new GetItemArtworkRequestBuilder(sdkConfiguration); + } + + /** + * Get an item's artwork, theme, etc + * + *

Get the artwork, thumb, element for a metadata item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetItemArtworkResponse getItemArtwork(GetItemArtworkRequest request) throws Exception { + RequestOperation operation + = new GetItemArtwork.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a media part + * + *

Get a media part for streaming or download. + * - streaming: This is the default scenario. Bandwidth usage on this endpoint will be guaranteed (on the server's end) to be at least the bandwidth reservation given in the decision. If no decision exists, an ad-hoc decision will be created if sufficient bandwidth exists. Clients should not rely on ad-hoc decisions being made as this may be removed in the future. + * - download: Indicated if the query parameter indicates this is a download. Bandwidth will be prioritized behind playbacks and will get a fair share of what remains. + * + * @return The call builder + */ + public GetMediaPartRequestBuilder getMediaPart() { + return new GetMediaPartRequestBuilder(sdkConfiguration); + } + + /** + * Get a media part + * + *

Get a media part for streaming or download. + * - streaming: This is the default scenario. Bandwidth usage on this endpoint will be guaranteed (on the server's end) to be at least the bandwidth reservation given in the decision. If no decision exists, an ad-hoc decision will be created if sufficient bandwidth exists. Clients should not rely on ad-hoc decisions being made as this may be removed in the future. + * - download: Indicated if the query parameter indicates this is a download. Bandwidth will be prioritized behind playbacks and will get a fair share of what remains. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetMediaPartResponse getMediaPart(GetMediaPartRequest request) throws Exception { + RequestOperation operation + = new GetMediaPart.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get an image from part BIF + * + *

Extract an image from the BIF for a part at a particular offset + * + * @return The call builder + */ + public GetImageFromBifRequestBuilder getImageFromBif() { + return new GetImageFromBifRequestBuilder(sdkConfiguration); + } + + /** + * Get an image from part BIF + * + *

Extract an image from the BIF for a part at a particular offset + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetImageFromBifResponse getImageFromBif(GetImageFromBifRequest request) throws Exception { + RequestOperation operation + = new GetImageFromBif.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/LibraryCollections.java b/src/main/java/dev/plexapi/sdk/LibraryCollections.java new file mode 100644 index 00000000..eb93136f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/LibraryCollections.java @@ -0,0 +1,121 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.AddCollectionItemsRequest; +import dev.plexapi.sdk.models.operations.AddCollectionItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.AddCollectionItemsResponse; +import dev.plexapi.sdk.models.operations.DeleteCollectionItemRequest; +import dev.plexapi.sdk.models.operations.DeleteCollectionItemRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteCollectionItemResponse; +import dev.plexapi.sdk.models.operations.MoveCollectionItemRequest; +import dev.plexapi.sdk.models.operations.MoveCollectionItemRequestBuilder; +import dev.plexapi.sdk.models.operations.MoveCollectionItemResponse; +import dev.plexapi.sdk.operations.AddCollectionItems; +import dev.plexapi.sdk.operations.DeleteCollectionItem; +import dev.plexapi.sdk.operations.MoveCollectionItem; +import java.lang.Exception; + +/** + * Endpoints for manipulating collections. In addition to these endpoints, `/library/collections/:collectionId/X` will be rerouted to `/library/metadata/:collectionId/X` and respond to those endpoints as well. + */ +public class LibraryCollections { + private final SDKConfiguration sdkConfiguration; + private final AsyncLibraryCollections asyncSDK; + + LibraryCollections(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncLibraryCollections(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncLibraryCollections async() { + return asyncSDK; + } + + /** + * Add items to a collection + * + *

Add items to a collection by uri + * + * @return The call builder + */ + public AddCollectionItemsRequestBuilder addCollectionItems() { + return new AddCollectionItemsRequestBuilder(sdkConfiguration); + } + + /** + * Add items to a collection + * + *

Add items to a collection by uri + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddCollectionItemsResponse addCollectionItems(AddCollectionItemsRequest request) throws Exception { + RequestOperation operation + = new AddCollectionItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete an item from a collection + * + *

Delete an item from a collection + * + * @return The call builder + */ + public DeleteCollectionItemRequestBuilder deleteCollectionItem() { + return new DeleteCollectionItemRequestBuilder(sdkConfiguration); + } + + /** + * Delete an item from a collection + * + *

Delete an item from a collection + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteCollectionItemResponse deleteCollectionItem(DeleteCollectionItemRequest request) throws Exception { + RequestOperation operation + = new DeleteCollectionItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Reorder an item in the collection + * + *

Reorder items in a collection with one item after another + * + * @return The call builder + */ + public MoveCollectionItemRequestBuilder moveCollectionItem() { + return new MoveCollectionItemRequestBuilder(sdkConfiguration); + } + + /** + * Reorder an item in the collection + * + *

Reorder items in a collection with one item after another + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public MoveCollectionItemResponse moveCollectionItem(MoveCollectionItemRequest request) throws Exception { + RequestOperation operation + = new MoveCollectionItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/LibraryPlaylists.java b/src/main/java/dev/plexapi/sdk/LibraryPlaylists.java new file mode 100644 index 00000000..11ea459e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/LibraryPlaylists.java @@ -0,0 +1,391 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.AddPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.AddPlaylistItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.AddPlaylistItemsResponse; +import dev.plexapi.sdk.models.operations.ClearPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.ClearPlaylistItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.ClearPlaylistItemsResponse; +import dev.plexapi.sdk.models.operations.CreatePlaylistRequest; +import dev.plexapi.sdk.models.operations.CreatePlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.CreatePlaylistResponse; +import dev.plexapi.sdk.models.operations.DeletePlaylistItemRequest; +import dev.plexapi.sdk.models.operations.DeletePlaylistItemRequestBuilder; +import dev.plexapi.sdk.models.operations.DeletePlaylistItemResponse; +import dev.plexapi.sdk.models.operations.DeletePlaylistRequest; +import dev.plexapi.sdk.models.operations.DeletePlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.DeletePlaylistResponse; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsResponse; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorResponse; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsResponse; +import dev.plexapi.sdk.models.operations.MovePlaylistItemRequest; +import dev.plexapi.sdk.models.operations.MovePlaylistItemRequestBuilder; +import dev.plexapi.sdk.models.operations.MovePlaylistItemResponse; +import dev.plexapi.sdk.models.operations.RefreshPlaylistRequest; +import dev.plexapi.sdk.models.operations.RefreshPlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.RefreshPlaylistResponse; +import dev.plexapi.sdk.models.operations.UpdatePlaylistRequest; +import dev.plexapi.sdk.models.operations.UpdatePlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse; +import dev.plexapi.sdk.models.operations.UploadPlaylistRequest; +import dev.plexapi.sdk.models.operations.UploadPlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.UploadPlaylistResponse; +import dev.plexapi.sdk.operations.AddPlaylistItems; +import dev.plexapi.sdk.operations.ClearPlaylistItems; +import dev.plexapi.sdk.operations.CreatePlaylist; +import dev.plexapi.sdk.operations.DeletePlaylist; +import dev.plexapi.sdk.operations.DeletePlaylistItem; +import dev.plexapi.sdk.operations.GetPlaylistGenerator; +import dev.plexapi.sdk.operations.GetPlaylistGeneratorItems; +import dev.plexapi.sdk.operations.GetPlaylistGenerators; +import dev.plexapi.sdk.operations.MovePlaylistItem; +import dev.plexapi.sdk.operations.RefreshPlaylist; +import dev.plexapi.sdk.operations.UpdatePlaylist; +import dev.plexapi.sdk.operations.UploadPlaylist; +import java.lang.Exception; + +/** + * Endpoints for manipulating playlists. + */ +public class LibraryPlaylists { + private final SDKConfiguration sdkConfiguration; + private final AsyncLibraryPlaylists asyncSDK; + + LibraryPlaylists(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncLibraryPlaylists(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncLibraryPlaylists async() { + return asyncSDK; + } + + /** + * Create a Playlist + * + *

Create a new playlist. By default the playlist is blank. + * + * @return The call builder + */ + public CreatePlaylistRequestBuilder createPlaylist() { + return new CreatePlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Create a Playlist + * + *

Create a new playlist. By default the playlist is blank. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreatePlaylistResponse createPlaylist(CreatePlaylistRequest request) throws Exception { + RequestOperation operation + = new CreatePlaylist.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Upload + * + *

Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + * + * @return The call builder + */ + public UploadPlaylistRequestBuilder uploadPlaylist() { + return new UploadPlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Upload + * + *

Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UploadPlaylistResponse uploadPlaylist(UploadPlaylistRequest request) throws Exception { + RequestOperation operation + = new UploadPlaylist.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a Playlist + * + *

Deletes a playlist by provided id + * + * @return The call builder + */ + public DeletePlaylistRequestBuilder deletePlaylist() { + return new DeletePlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Delete a Playlist + * + *

Deletes a playlist by provided id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeletePlaylistResponse deletePlaylist(DeletePlaylistRequest request) throws Exception { + RequestOperation operation + = new DeletePlaylist.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Editing a Playlist + * + *

Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem) + * + * @return The call builder + */ + public UpdatePlaylistRequestBuilder updatePlaylist() { + return new UpdatePlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Editing a Playlist + * + *

Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdatePlaylistResponse updatePlaylist(UpdatePlaylistRequest request) throws Exception { + RequestOperation operation + = new UpdatePlaylist.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a playlist's generators + * + *

Get all the generators in a playlist + * + * @return The call builder + */ + public GetPlaylistGeneratorsRequestBuilder getPlaylistGenerators() { + return new GetPlaylistGeneratorsRequestBuilder(sdkConfiguration); + } + + /** + * Get a playlist's generators + * + *

Get all the generators in a playlist + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPlaylistGeneratorsResponse getPlaylistGenerators(GetPlaylistGeneratorsRequest request) throws Exception { + RequestOperation operation + = new GetPlaylistGenerators.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Clearing a playlist + * + *

Clears a playlist, only works with dumb playlists. Returns the playlist. + * + * @return The call builder + */ + public ClearPlaylistItemsRequestBuilder clearPlaylistItems() { + return new ClearPlaylistItemsRequestBuilder(sdkConfiguration); + } + + /** + * Clearing a playlist + * + *

Clears a playlist, only works with dumb playlists. Returns the playlist. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ClearPlaylistItemsResponse clearPlaylistItems(ClearPlaylistItemsRequest request) throws Exception { + RequestOperation operation + = new ClearPlaylistItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Adding to a Playlist + * + *

Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + * + * @return The call builder + */ + public AddPlaylistItemsRequestBuilder addPlaylistItems() { + return new AddPlaylistItemsRequestBuilder(sdkConfiguration); + } + + /** + * Adding to a Playlist + * + *

Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddPlaylistItemsResponse addPlaylistItems(AddPlaylistItemsRequest request) throws Exception { + RequestOperation operation + = new AddPlaylistItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a Generator + * + *

Deletes an item from a playlist. Only works with dumb playlists. + * + * @return The call builder + */ + public DeletePlaylistItemRequestBuilder deletePlaylistItem() { + return new DeletePlaylistItemRequestBuilder(sdkConfiguration); + } + + /** + * Delete a Generator + * + *

Deletes an item from a playlist. Only works with dumb playlists. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeletePlaylistItemResponse deletePlaylistItem(DeletePlaylistItemRequest request) throws Exception { + RequestOperation operation + = new DeletePlaylistItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a playlist generator + * + *

Get a playlist's generator. Only used for optimized versions + * + * @return The call builder + */ + public GetPlaylistGeneratorRequestBuilder getPlaylistGenerator() { + return new GetPlaylistGeneratorRequestBuilder(sdkConfiguration); + } + + /** + * Get a playlist generator + * + *

Get a playlist's generator. Only used for optimized versions + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPlaylistGeneratorResponse getPlaylistGenerator(GetPlaylistGeneratorRequest request) throws Exception { + RequestOperation operation + = new GetPlaylistGenerator.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a playlist generator's items + * + *

Get a playlist generator's items + * + * @return The call builder + */ + public GetPlaylistGeneratorItemsRequestBuilder getPlaylistGeneratorItems() { + return new GetPlaylistGeneratorItemsRequestBuilder(sdkConfiguration); + } + + /** + * Get a playlist generator's items + * + *

Get a playlist generator's items + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPlaylistGeneratorItemsResponse getPlaylistGeneratorItems(GetPlaylistGeneratorItemsRequest request) throws Exception { + RequestOperation operation + = new GetPlaylistGeneratorItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Moving items in a playlist + * + *

Moves an item in a playlist. Only works with dumb playlists. + * + * @return The call builder + */ + public MovePlaylistItemRequestBuilder movePlaylistItem() { + return new MovePlaylistItemRequestBuilder(sdkConfiguration); + } + + /** + * Moving items in a playlist + * + *

Moves an item in a playlist. Only works with dumb playlists. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public MovePlaylistItemResponse movePlaylistItem(MovePlaylistItemRequest request) throws Exception { + RequestOperation operation + = new MovePlaylistItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Reprocess a generator + * + *

Make a generator reprocess (refresh) + * + * @return The call builder + */ + public RefreshPlaylistRequestBuilder refreshPlaylist() { + return new RefreshPlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Reprocess a generator + * + *

Make a generator reprocess (refresh) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public RefreshPlaylistResponse refreshPlaylist(RefreshPlaylistRequest request) throws Exception { + RequestOperation operation + = new RefreshPlaylist.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/LiveTV.java b/src/main/java/dev/plexapi/sdk/LiveTV.java new file mode 100644 index 00000000..d2da9926 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/LiveTV.java @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.GetLiveTVSessionRequest; +import dev.plexapi.sdk.models.operations.GetLiveTVSessionRequestBuilder; +import dev.plexapi.sdk.models.operations.GetLiveTVSessionResponse; +import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexRequest; +import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexResponse; +import dev.plexapi.sdk.models.operations.GetSessionSegmentRequest; +import dev.plexapi.sdk.models.operations.GetSessionSegmentRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSessionSegmentResponse; +import dev.plexapi.sdk.models.operations.GetSessionsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSessionsResponse; +import dev.plexapi.sdk.operations.GetLiveTVSession; +import dev.plexapi.sdk.operations.GetSessionPlaylistIndex; +import dev.plexapi.sdk.operations.GetSessionSegment; +import dev.plexapi.sdk.operations.GetSessions; +import java.lang.Exception; + +/** + * LiveTV contains the playback sessions of a channel from a DVR device + */ +public class LiveTV { + private final SDKConfiguration sdkConfiguration; + private final AsyncLiveTV asyncSDK; + + LiveTV(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncLiveTV(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncLiveTV async() { + return asyncSDK; + } + + /** + * Get all sessions + * + *

Get all livetv sessions and metadata + * + * @return The call builder + */ + public GetSessionsRequestBuilder getSessions() { + return new GetSessionsRequestBuilder(sdkConfiguration); + } + + /** + * Get all sessions + * + *

Get all livetv sessions and metadata + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSessionsResponse getSessionsDirect() throws Exception { + RequestlessOperation operation + = new GetSessions.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Get a single session + * + *

Get a single livetv session and metadata + * + * @return The call builder + */ + public GetLiveTVSessionRequestBuilder getLiveTVSession() { + return new GetLiveTVSessionRequestBuilder(sdkConfiguration); + } + + /** + * Get a single session + * + *

Get a single livetv session and metadata + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetLiveTVSessionResponse getLiveTVSession(GetLiveTVSessionRequest request) throws Exception { + RequestOperation operation + = new GetLiveTVSession.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a session playlist index + * + *

Get a playlist index for playing this session + * + * @return The call builder + */ + public GetSessionPlaylistIndexRequestBuilder getSessionPlaylistIndex() { + return new GetSessionPlaylistIndexRequestBuilder(sdkConfiguration); + } + + /** + * Get a session playlist index + * + *

Get a playlist index for playing this session + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSessionPlaylistIndexResponse getSessionPlaylistIndex(GetSessionPlaylistIndexRequest request) throws Exception { + RequestOperation operation + = new GetSessionPlaylistIndex.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a single session segment + * + *

Get a single LiveTV session segment + * + * @return The call builder + */ + public GetSessionSegmentRequestBuilder getSessionSegment() { + return new GetSessionSegmentRequestBuilder(sdkConfiguration); + } + + /** + * Get a single session segment + * + *

Get a single LiveTV session segment + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSessionSegmentResponse getSessionSegment(GetSessionSegmentRequest request) throws Exception { + RequestOperation operation + = new GetSessionSegment.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Log.java b/src/main/java/dev/plexapi/sdk/Log.java index 169429c1..27e03010 100644 --- a/src/main/java/dev/plexapi/sdk/Log.java +++ b/src/main/java/dev/plexapi/sdk/Log.java @@ -4,24 +4,22 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import dev.plexapi.sdk.models.operations.EnablePaperTrailRequestBuilder; -import dev.plexapi.sdk.models.operations.EnablePaperTrailResponse; -import dev.plexapi.sdk.models.operations.Level; -import dev.plexapi.sdk.models.operations.LogLineRequest; -import dev.plexapi.sdk.models.operations.LogLineRequestBuilder; -import dev.plexapi.sdk.models.operations.LogLineResponse; -import dev.plexapi.sdk.models.operations.LogMultiLineRequestBuilder; -import dev.plexapi.sdk.models.operations.LogMultiLineResponse; -import dev.plexapi.sdk.operations.EnablePaperTrail; -import dev.plexapi.sdk.operations.LogLine; -import dev.plexapi.sdk.operations.LogMultiLine; +import dev.plexapi.sdk.models.operations.EnablePapertrailRequest; +import dev.plexapi.sdk.models.operations.EnablePapertrailRequestBuilder; +import dev.plexapi.sdk.models.operations.EnablePapertrailResponse; +import dev.plexapi.sdk.models.operations.WriteLogRequestBuilder; +import dev.plexapi.sdk.models.operations.WriteLogResponse; +import dev.plexapi.sdk.models.operations.WriteMessageRequest; +import dev.plexapi.sdk.models.operations.WriteMessageRequestBuilder; +import dev.plexapi.sdk.models.operations.WriteMessageResponse; +import dev.plexapi.sdk.operations.EnablePapertrail; +import dev.plexapi.sdk.operations.WriteLog; +import dev.plexapi.sdk.operations.WriteMessage; import java.lang.Exception; -import java.lang.String; /** - * Submit logs to the Log Handler for Plex Media Server + * Logging mechanism to allow clients to log to the server */ public class Log { private final SDKConfiguration sdkConfiguration; @@ -42,137 +40,89 @@ public class Log { } /** - * Logging a single line message. + * Logging a multi-line message to the Plex Media Server log * - *

This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + *

This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. * * @return The call builder */ - public LogLineRequestBuilder logLine() { - return new LogLineRequestBuilder(sdkConfiguration); + public WriteLogRequestBuilder writeLog() { + return new WriteLogRequestBuilder(sdkConfiguration); } /** - * Logging a single line message. + * Logging a multi-line message to the Plex Media Server log * - *

This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. - * - * @param level An integer log level to write to the PMS log with. - * 0: Error - * 1: Warning - * 2: Info - * 3: Debug - * 4: Verbose - * - * @param message The text of the message to write to the log. - * @param source a string indicating the source of the message. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public LogLineResponse logLine( - Level level, String message, - String source) throws Exception { - LogLineRequest request = - LogLineRequest - .builder() - .level(level) - .message(message) - .source(source) - .build(); - RequestOperation operation - = new LogLine.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Logging a multi-line message - * - *

This endpoint allows for the batch addition of log entries to the main Plex Media Server log. - * It accepts a text/plain request body, where each line represents a distinct log entry. - * Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. - * - *

Log entries are separated by a newline character (`\n`). - * Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. - * This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. - * - *

The 'level' parameter specifies the log entry's severity or importance, with the following integer values: - * - `0`: Error - Critical issues that require immediate attention. - * - `1`: Warning - Important events that are not critical but may indicate potential issues. - * - `2`: Info - General informational messages about system operation. - * - `3`: Debug - Detailed information useful for debugging purposes. - * - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. - * - *

The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). - * - *

Example of a single log entry format: - * `level=4&message=Sample%20log%20entry&source=applicationName` - * - *

Ensure each parameter is properly URL-encoded to avoid interpretation issues. - * - * @return The call builder - */ - public LogMultiLineRequestBuilder logMultiLine() { - return new LogMultiLineRequestBuilder(sdkConfiguration); - } - - /** - * Logging a multi-line message - * - *

This endpoint allows for the batch addition of log entries to the main Plex Media Server log. - * It accepts a text/plain request body, where each line represents a distinct log entry. - * Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. - * - *

Log entries are separated by a newline character (`\n`). - * Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. - * This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. - * - *

The 'level' parameter specifies the log entry's severity or importance, with the following integer values: - * - `0`: Error - Critical issues that require immediate attention. - * - `1`: Warning - Important events that are not critical but may indicate potential issues. - * - `2`: Info - General informational messages about system operation. - * - `3`: Debug - Detailed information useful for debugging purposes. - * - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. - * - *

The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). - * - *

Example of a single log entry format: - * `level=4&message=Sample%20log%20entry&source=applicationName` - * - *

Ensure each parameter is properly URL-encoded to avoid interpretation issues. + *

This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. * * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public LogMultiLineResponse logMultiLine(String request) throws Exception { - RequestOperation operation - = new LogMultiLine.Sync(sdkConfiguration); + public WriteLogResponse writeLog(byte[] request) throws Exception { + RequestOperation operation + = new WriteLog.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Logging a single-line message to the Plex Media Server log + * + *

This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + * + *

Note: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred + * + * @return The call builder + */ + public WriteMessageRequestBuilder writeMessage() { + return new WriteMessageRequestBuilder(sdkConfiguration); + } + + /** + * Logging a single-line message to the Plex Media Server log + * + *

This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + * + *

Note: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public WriteMessageResponse writeMessage(WriteMessageRequest request) throws Exception { + RequestOperation operation + = new WriteMessage.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** * Enabling Papertrail * - *

This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. + *

This endpoint will enable all Plex Media Server logs to be sent to the Papertrail networked logging site for a period of time + * + *

Note: This endpoint responds to all HTTP verbs but POST is preferred * * @return The call builder */ - public EnablePaperTrailRequestBuilder enablePaperTrail() { - return new EnablePaperTrailRequestBuilder(sdkConfiguration); + public EnablePapertrailRequestBuilder enablePapertrail() { + return new EnablePapertrailRequestBuilder(sdkConfiguration); } /** * Enabling Papertrail * - *

This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. + *

This endpoint will enable all Plex Media Server logs to be sent to the Papertrail networked logging site for a period of time * + *

Note: This endpoint responds to all HTTP verbs but POST is preferred + * + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public EnablePaperTrailResponse enablePaperTrailDirect() throws Exception { - RequestlessOperation operation - = new EnablePaperTrail.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); + public EnablePapertrailResponse enablePapertrail(EnablePapertrailRequest request) throws Exception { + RequestOperation operation + = new EnablePapertrail.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); } } diff --git a/src/main/java/dev/plexapi/sdk/Media.java b/src/main/java/dev/plexapi/sdk/Media.java deleted file mode 100644 index e376a214..00000000 --- a/src/main/java/dev/plexapi/sdk/Media.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.models.operations.GetBannerImageRequest; -import dev.plexapi.sdk.models.operations.GetBannerImageRequestBuilder; -import dev.plexapi.sdk.models.operations.GetBannerImageResponse; -import dev.plexapi.sdk.models.operations.GetThumbImageRequest; -import dev.plexapi.sdk.models.operations.GetThumbImageRequestBuilder; -import dev.plexapi.sdk.models.operations.GetThumbImageResponse; -import dev.plexapi.sdk.models.operations.MarkPlayedRequest; -import dev.plexapi.sdk.models.operations.MarkPlayedRequestBuilder; -import dev.plexapi.sdk.models.operations.MarkPlayedResponse; -import dev.plexapi.sdk.models.operations.MarkUnplayedRequest; -import dev.plexapi.sdk.models.operations.MarkUnplayedRequestBuilder; -import dev.plexapi.sdk.models.operations.MarkUnplayedResponse; -import dev.plexapi.sdk.models.operations.UpdatePlayProgressRequest; -import dev.plexapi.sdk.models.operations.UpdatePlayProgressRequestBuilder; -import dev.plexapi.sdk.models.operations.UpdatePlayProgressResponse; -import dev.plexapi.sdk.operations.GetBannerImage; -import dev.plexapi.sdk.operations.GetThumbImage; -import dev.plexapi.sdk.operations.MarkPlayed; -import dev.plexapi.sdk.operations.MarkUnplayed; -import dev.plexapi.sdk.operations.UpdatePlayProgress; -import java.lang.Exception; -import java.lang.String; - -/** - * API Calls interacting with Plex Media Server Media - */ -public class Media { - private final SDKConfiguration sdkConfiguration; - private final AsyncMedia asyncSDK; - - Media(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.asyncSDK = new AsyncMedia(this, sdkConfiguration); - } - - /** - * Switches to the async SDK. - * - * @return The async SDK - */ - public AsyncMedia async() { - return asyncSDK; - } - - /** - * Mark Media Played - * - *

This will mark the provided media key as Played. - * - * @return The call builder - */ - public MarkPlayedRequestBuilder markPlayed() { - return new MarkPlayedRequestBuilder(sdkConfiguration); - } - - /** - * Mark Media Played - * - *

This will mark the provided media key as Played. - * - * @param key The media key to mark as played - * @return The response from the API call - * @throws Exception if the API call fails - */ - public MarkPlayedResponse markPlayed(double key) throws Exception { - MarkPlayedRequest request = - MarkPlayedRequest - .builder() - .key(key) - .build(); - RequestOperation operation - = new MarkPlayed.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Mark Media Unplayed - * - *

This will mark the provided media key as Unplayed. - * - * @return The call builder - */ - public MarkUnplayedRequestBuilder markUnplayed() { - return new MarkUnplayedRequestBuilder(sdkConfiguration); - } - - /** - * Mark Media Unplayed - * - *

This will mark the provided media key as Unplayed. - * - * @param key The media key to mark as Unplayed - * @return The response from the API call - * @throws Exception if the API call fails - */ - public MarkUnplayedResponse markUnplayed(double key) throws Exception { - MarkUnplayedRequest request = - MarkUnplayedRequest - .builder() - .key(key) - .build(); - RequestOperation operation - = new MarkUnplayed.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Update Media Play Progress - * - *

This API command can be used to update the play progress of a media item. - * - * @return The call builder - */ - public UpdatePlayProgressRequestBuilder updatePlayProgress() { - return new UpdatePlayProgressRequestBuilder(sdkConfiguration); - } - - /** - * Update Media Play Progress - * - *

This API command can be used to update the play progress of a media item. - * - * @param key the media key - * @param time The time, in milliseconds, used to set the media playback progress. - * @param state The playback state of the media item. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public UpdatePlayProgressResponse updatePlayProgress( - String key, double time, - String state) throws Exception { - UpdatePlayProgressRequest request = - UpdatePlayProgressRequest - .builder() - .key(key) - .time(time) - .state(state) - .build(); - RequestOperation operation - = new UpdatePlayProgress.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Banner Image - * - *

Gets the banner image of the media item - * - * @return The call builder - */ - public GetBannerImageRequestBuilder getBannerImage() { - return new GetBannerImageRequestBuilder(sdkConfiguration); - } - - /** - * Get Banner Image - * - *

Gets the banner image of the media item - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetBannerImageResponse getBannerImage(GetBannerImageRequest request) throws Exception { - RequestOperation operation - = new GetBannerImage.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Thumb Image - * - *

Gets the thumbnail image of the media item - * - * @return The call builder - */ - public GetThumbImageRequestBuilder getThumbImage() { - return new GetThumbImageRequestBuilder(sdkConfiguration); - } - - /** - * Get Thumb Image - * - *

Gets the thumbnail image of the media item - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetThumbImageResponse getThumbImage(GetThumbImageRequest request) throws Exception { - RequestOperation operation - = new GetThumbImage.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/PlayQueue.java b/src/main/java/dev/plexapi/sdk/PlayQueue.java new file mode 100644 index 00000000..32242f37 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/PlayQueue.java @@ -0,0 +1,308 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.AddToPlayQueueRequest; +import dev.plexapi.sdk.models.operations.AddToPlayQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.AddToPlayQueueResponse; +import dev.plexapi.sdk.models.operations.ClearPlayQueueRequest; +import dev.plexapi.sdk.models.operations.ClearPlayQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.ClearPlayQueueResponse; +import dev.plexapi.sdk.models.operations.CreatePlayQueueRequest; +import dev.plexapi.sdk.models.operations.CreatePlayQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.CreatePlayQueueResponse; +import dev.plexapi.sdk.models.operations.DeletePlayQueueItemRequest; +import dev.plexapi.sdk.models.operations.DeletePlayQueueItemRequestBuilder; +import dev.plexapi.sdk.models.operations.DeletePlayQueueItemResponse; +import dev.plexapi.sdk.models.operations.GetPlayQueueRequest; +import dev.plexapi.sdk.models.operations.GetPlayQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPlayQueueResponse; +import dev.plexapi.sdk.models.operations.MovePlayQueueItemRequest; +import dev.plexapi.sdk.models.operations.MovePlayQueueItemRequestBuilder; +import dev.plexapi.sdk.models.operations.MovePlayQueueItemResponse; +import dev.plexapi.sdk.models.operations.ResetPlayQueueRequest; +import dev.plexapi.sdk.models.operations.ResetPlayQueueRequestBuilder; +import dev.plexapi.sdk.models.operations.ResetPlayQueueResponse; +import dev.plexapi.sdk.models.operations.ShuffleRequest; +import dev.plexapi.sdk.models.operations.ShuffleRequestBuilder; +import dev.plexapi.sdk.models.operations.ShuffleResponse; +import dev.plexapi.sdk.models.operations.UnshuffleRequest; +import dev.plexapi.sdk.models.operations.UnshuffleRequestBuilder; +import dev.plexapi.sdk.models.operations.UnshuffleResponse; +import dev.plexapi.sdk.operations.AddToPlayQueue; +import dev.plexapi.sdk.operations.ClearPlayQueue; +import dev.plexapi.sdk.operations.CreatePlayQueue; +import dev.plexapi.sdk.operations.DeletePlayQueueItem; +import dev.plexapi.sdk.operations.GetPlayQueue; +import dev.plexapi.sdk.operations.MovePlayQueueItem; +import dev.plexapi.sdk.operations.ResetPlayQueue; +import dev.plexapi.sdk.operations.Shuffle; +import dev.plexapi.sdk.operations.Unshuffle; +import java.lang.Exception; + +/** + * The playqueue feature within a media provider + * A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue. + * Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by `playQueueLastAddedItemID` existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed. + * You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion. + * All created play queues will have an empty "Up Next" area - unless the item is an album and no `key` is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set `key`. This is due to the above implicit queueing of albums when no `key` is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area. + * The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item. + */ +public class PlayQueue { + private final SDKConfiguration sdkConfiguration; + private final AsyncPlayQueue asyncSDK; + + PlayQueue(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncPlayQueue(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncPlayQueue async() { + return asyncSDK; + } + + /** + * Create a play queue + * + *

Makes a new play queue for a device. The source of the playqueue can either be a URI, or a playlist. The response is a media container with the initial items in the queue. Each item in the queue will be a regular item but with `playQueueItemID` - a unique ID since the queue could have repeated items with the same `ratingKey`. + * Note: Either `uri` or `playlistID` must be specified + * + * @return The call builder + */ + public CreatePlayQueueRequestBuilder createPlayQueue() { + return new CreatePlayQueueRequestBuilder(sdkConfiguration); + } + + /** + * Create a play queue + * + *

Makes a new play queue for a device. The source of the playqueue can either be a URI, or a playlist. The response is a media container with the initial items in the queue. Each item in the queue will be a regular item but with `playQueueItemID` - a unique ID since the queue could have repeated items with the same `ratingKey`. + * Note: Either `uri` or `playlistID` must be specified + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreatePlayQueueResponse createPlayQueue(CreatePlayQueueRequest request) throws Exception { + RequestOperation operation + = new CreatePlayQueue.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Retrieve a play queue + * + *

Retrieves the play queue, centered at current item. This can be treated as a regular container by play queue-oblivious clients, but they may wish to request a large window onto the queue since they won't know to refresh. + * + * @return The call builder + */ + public GetPlayQueueRequestBuilder getPlayQueue() { + return new GetPlayQueueRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve a play queue + * + *

Retrieves the play queue, centered at current item. This can be treated as a regular container by play queue-oblivious clients, but they may wish to request a large window onto the queue since they won't know to refresh. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPlayQueueResponse getPlayQueue(GetPlayQueueRequest request) throws Exception { + RequestOperation operation + = new GetPlayQueue.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Add a generator or playlist to a play queue + * + *

Adds an item to a play queue (e.g. party mode). Increments the version of the play queue. Takes the following parameters (`uri` and `playlistID` are mutually exclusive). Returns the modified play queue. + * + * @return The call builder + */ + public AddToPlayQueueRequestBuilder addToPlayQueue() { + return new AddToPlayQueueRequestBuilder(sdkConfiguration); + } + + /** + * Add a generator or playlist to a play queue + * + *

Adds an item to a play queue (e.g. party mode). Increments the version of the play queue. Takes the following parameters (`uri` and `playlistID` are mutually exclusive). Returns the modified play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddToPlayQueueResponse addToPlayQueue(AddToPlayQueueRequest request) throws Exception { + RequestOperation operation + = new AddToPlayQueue.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Clear a play queue + * + *

Deletes all items in the play queue, and increases the version of the play queue. + * + * @return The call builder + */ + public ClearPlayQueueRequestBuilder clearPlayQueue() { + return new ClearPlayQueueRequestBuilder(sdkConfiguration); + } + + /** + * Clear a play queue + * + *

Deletes all items in the play queue, and increases the version of the play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ClearPlayQueueResponse clearPlayQueue(ClearPlayQueueRequest request) throws Exception { + RequestOperation operation + = new ClearPlayQueue.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Reset a play queue + * + *

Reset a play queue to the first item being the current item + * + * @return The call builder + */ + public ResetPlayQueueRequestBuilder resetPlayQueue() { + return new ResetPlayQueueRequestBuilder(sdkConfiguration); + } + + /** + * Reset a play queue + * + *

Reset a play queue to the first item being the current item + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ResetPlayQueueResponse resetPlayQueue(ResetPlayQueueRequest request) throws Exception { + RequestOperation operation + = new ResetPlayQueue.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Shuffle a play queue + * + *

Shuffle a play queue (or reshuffles if already shuffled). The currently selected item is maintained. Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + * + * @return The call builder + */ + public ShuffleRequestBuilder shuffle() { + return new ShuffleRequestBuilder(sdkConfiguration); + } + + /** + * Shuffle a play queue + * + *

Shuffle a play queue (or reshuffles if already shuffled). The currently selected item is maintained. Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ShuffleResponse shuffle(ShuffleRequest request) throws Exception { + RequestOperation operation + = new Shuffle.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Unshuffle a play queue + * + *

Unshuffles a play queue and restores "natural order". Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + * + * @return The call builder + */ + public UnshuffleRequestBuilder unshuffle() { + return new UnshuffleRequestBuilder(sdkConfiguration); + } + + /** + * Unshuffle a play queue + * + *

Unshuffles a play queue and restores "natural order". Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UnshuffleResponse unshuffle(UnshuffleRequest request) throws Exception { + RequestOperation operation + = new Unshuffle.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete an item from a play queue + * + *

Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue. + * + * @return The call builder + */ + public DeletePlayQueueItemRequestBuilder deletePlayQueueItem() { + return new DeletePlayQueueItemRequestBuilder(sdkConfiguration); + } + + /** + * Delete an item from a play queue + * + *

Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeletePlayQueueItemResponse deletePlayQueueItem(DeletePlayQueueItemRequest request) throws Exception { + RequestOperation operation + = new DeletePlayQueueItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Move an item in a play queue + * + *

Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue. + * + * @return The call builder + */ + public MovePlayQueueItemRequestBuilder movePlayQueueItem() { + return new MovePlayQueueItemRequestBuilder(sdkConfiguration); + } + + /** + * Move an item in a play queue + * + *

Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public MovePlayQueueItemResponse movePlayQueueItem(MovePlayQueueItemRequest request) throws Exception { + RequestOperation operation + = new MovePlayQueueItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Playlist.java b/src/main/java/dev/plexapi/sdk/Playlist.java new file mode 100644 index 00000000..30a6d8bb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Playlist.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.GetPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistItemsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPlaylistItemsResponse; +import dev.plexapi.sdk.models.operations.GetPlaylistRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPlaylistResponse; +import dev.plexapi.sdk.models.operations.ListPlaylistsRequest; +import dev.plexapi.sdk.models.operations.ListPlaylistsRequestBuilder; +import dev.plexapi.sdk.models.operations.ListPlaylistsResponse; +import dev.plexapi.sdk.operations.GetPlaylist; +import dev.plexapi.sdk.operations.GetPlaylistItems; +import dev.plexapi.sdk.operations.ListPlaylists; +import java.lang.Exception; + +/** + * Media playlists that can be created and played back + */ +public class Playlist { + private final SDKConfiguration sdkConfiguration; + private final AsyncPlaylist asyncSDK; + + Playlist(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncPlaylist(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncPlaylist async() { + return asyncSDK; + } + + /** + * List playlists + * + *

Gets a list of playlists and playlist folders for a user. General filters are permitted, such as `sort=lastViewedAt:desc`. A flat playlist list can be retrieved using `type=15` to limit the collection to just playlists. + * + * @return The call builder + */ + public ListPlaylistsRequestBuilder listPlaylists() { + return new ListPlaylistsRequestBuilder(sdkConfiguration); + } + + /** + * List playlists + * + *

Gets a list of playlists and playlist folders for a user. General filters are permitted, such as `sort=lastViewedAt:desc`. A flat playlist list can be retrieved using `type=15` to limit the collection to just playlists. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListPlaylistsResponse listPlaylists(ListPlaylistsRequest request) throws Exception { + RequestOperation operation + = new ListPlaylists.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Retrieve Playlist + * + *

Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: + * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + * + * @return The call builder + */ + public GetPlaylistRequestBuilder getPlaylist() { + return new GetPlaylistRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve Playlist + * + *

Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: + * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPlaylistResponse getPlaylist(GetPlaylistRequest request) throws Exception { + RequestOperation operation + = new GetPlaylist.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Retrieve Playlist Contents + * + *

Gets the contents of a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + * + * @return The call builder + */ + public GetPlaylistItemsRequestBuilder getPlaylistItems() { + return new GetPlaylistItemsRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve Playlist Contents + * + *

Gets the contents of a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPlaylistItemsResponse getPlaylistItems(GetPlaylistItemsRequest request) throws Exception { + RequestOperation operation + = new GetPlaylistItems.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Playlists.java b/src/main/java/dev/plexapi/sdk/Playlists.java deleted file mode 100644 index eca4fdc0..00000000 --- a/src/main/java/dev/plexapi/sdk/Playlists.java +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.models.operations.AddPlaylistContentsRequest; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsRequestBuilder; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.ClearPlaylistContentsRequest; -import dev.plexapi.sdk.models.operations.ClearPlaylistContentsRequestBuilder; -import dev.plexapi.sdk.models.operations.ClearPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.CreatePlaylistRequest; -import dev.plexapi.sdk.models.operations.CreatePlaylistRequestBuilder; -import dev.plexapi.sdk.models.operations.CreatePlaylistResponse; -import dev.plexapi.sdk.models.operations.DeletePlaylistRequest; -import dev.plexapi.sdk.models.operations.DeletePlaylistRequestBuilder; -import dev.plexapi.sdk.models.operations.DeletePlaylistResponse; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsQueryParamType; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsRequest; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.GetPlaylistRequest; -import dev.plexapi.sdk.models.operations.GetPlaylistRequestBuilder; -import dev.plexapi.sdk.models.operations.GetPlaylistResponse; -import dev.plexapi.sdk.models.operations.GetPlaylistsRequest; -import dev.plexapi.sdk.models.operations.GetPlaylistsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetPlaylistsResponse; -import dev.plexapi.sdk.models.operations.PlaylistType; -import dev.plexapi.sdk.models.operations.QueryParamForce; -import dev.plexapi.sdk.models.operations.QueryParamSmart; -import dev.plexapi.sdk.models.operations.UpdatePlaylistRequest; -import dev.plexapi.sdk.models.operations.UpdatePlaylistRequestBuilder; -import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse; -import dev.plexapi.sdk.models.operations.UploadPlaylistRequest; -import dev.plexapi.sdk.models.operations.UploadPlaylistRequestBuilder; -import dev.plexapi.sdk.models.operations.UploadPlaylistResponse; -import dev.plexapi.sdk.operations.AddPlaylistContents; -import dev.plexapi.sdk.operations.ClearPlaylistContents; -import dev.plexapi.sdk.operations.CreatePlaylist; -import dev.plexapi.sdk.operations.DeletePlaylist; -import dev.plexapi.sdk.operations.GetPlaylist; -import dev.plexapi.sdk.operations.GetPlaylistContents; -import dev.plexapi.sdk.operations.GetPlaylists; -import dev.plexapi.sdk.operations.UpdatePlaylist; -import dev.plexapi.sdk.operations.UploadPlaylist; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -/** - * Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). - * They can be organized in (optionally nesting) folders. - * Retrieving a playlist, or its items, will trigger a refresh of its metadata. - * This may cause the duration and number of items to change. - */ -public class Playlists { - private final SDKConfiguration sdkConfiguration; - private final AsyncPlaylists asyncSDK; - - Playlists(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.asyncSDK = new AsyncPlaylists(this, sdkConfiguration); - } - - /** - * Switches to the async SDK. - * - * @return The async SDK - */ - public AsyncPlaylists async() { - return asyncSDK; - } - - /** - * Create a Playlist - * - *

Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - * - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). - * - `playQueueID` - To create a playlist from an existing play queue. - * - * @return The call builder - */ - public CreatePlaylistRequestBuilder createPlaylist() { - return new CreatePlaylistRequestBuilder(sdkConfiguration); - } - - /** - * Create a Playlist - * - *

Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - * - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). - * - `playQueueID` - To create a playlist from an existing play queue. - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public CreatePlaylistResponse createPlaylist(CreatePlaylistRequest request) throws Exception { - RequestOperation operation - = new CreatePlaylist.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get All Playlists - * - *

Get All Playlists given the specified filters. - * - * @return The call builder - */ - public GetPlaylistsRequestBuilder getPlaylists() { - return new GetPlaylistsRequestBuilder(sdkConfiguration); - } - - /** - * Get All Playlists - * - *

Get All Playlists given the specified filters. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetPlaylistsResponse getPlaylistsDirect() throws Exception { - return getPlaylists(Optional.empty(), Optional.empty()); - } - - /** - * Get All Playlists - * - *

Get All Playlists given the specified filters. - * - * @param playlistType limit to a type of playlist. - * @param smart type of playlists to return (default is all). - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetPlaylistsResponse getPlaylists(Optional playlistType, Optional smart) throws Exception { - GetPlaylistsRequest request = - GetPlaylistsRequest - .builder() - .playlistType(playlistType) - .smart(smart) - .build(); - RequestOperation operation - = new GetPlaylists.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Retrieve Playlist - * - *

Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: - * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. - * - * @return The call builder - */ - public GetPlaylistRequestBuilder getPlaylist() { - return new GetPlaylistRequestBuilder(sdkConfiguration); - } - - /** - * Retrieve Playlist - * - *

Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: - * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. - * - * @param playlistID the ID of the playlist - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetPlaylistResponse getPlaylist(double playlistID) throws Exception { - GetPlaylistRequest request = - GetPlaylistRequest - .builder() - .playlistID(playlistID) - .build(); - RequestOperation operation - = new GetPlaylist.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Deletes a Playlist - * - *

This endpoint will delete a playlist - * - * @return The call builder - */ - public DeletePlaylistRequestBuilder deletePlaylist() { - return new DeletePlaylistRequestBuilder(sdkConfiguration); - } - - /** - * Deletes a Playlist - * - *

This endpoint will delete a playlist - * - * @param playlistID the ID of the playlist - * @return The response from the API call - * @throws Exception if the API call fails - */ - public DeletePlaylistResponse deletePlaylist(double playlistID) throws Exception { - DeletePlaylistRequest request = - DeletePlaylistRequest - .builder() - .playlistID(playlistID) - .build(); - RequestOperation operation - = new DeletePlaylist.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Update a Playlist - * - *

From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - * - * @return The call builder - */ - public UpdatePlaylistRequestBuilder updatePlaylist() { - return new UpdatePlaylistRequestBuilder(sdkConfiguration); - } - - /** - * Update a Playlist - * - *

From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - * - * @param playlistID the ID of the playlist - * @return The response from the API call - * @throws Exception if the API call fails - */ - public UpdatePlaylistResponse updatePlaylist(double playlistID) throws Exception { - return updatePlaylist(playlistID, Optional.empty(), Optional.empty()); - } - - /** - * Update a Playlist - * - *

From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - * - * @param playlistID the ID of the playlist - * @param title name of the playlist - * @param summary summary description of the playlist - * @return The response from the API call - * @throws Exception if the API call fails - */ - public UpdatePlaylistResponse updatePlaylist( - double playlistID, Optional title, - Optional summary) throws Exception { - UpdatePlaylistRequest request = - UpdatePlaylistRequest - .builder() - .playlistID(playlistID) - .title(title) - .summary(summary) - .build(); - RequestOperation operation - = new UpdatePlaylist.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Retrieve Playlist Contents - * - *

Gets the contents of a playlist. Should be paged by clients via standard mechanisms. - * By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. - * For example, you could use this to display a list of recently added albums vis a smart playlist. - * Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. - * - * @return The call builder - */ - public GetPlaylistContentsRequestBuilder getPlaylistContents() { - return new GetPlaylistContentsRequestBuilder(sdkConfiguration); - } - - /** - * Retrieve Playlist Contents - * - *

Gets the contents of a playlist. Should be paged by clients via standard mechanisms. - * By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. - * For example, you could use this to display a list of recently added albums vis a smart playlist. - * Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. - * - * @param playlistID the ID of the playlist - * @param type The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetPlaylistContentsResponse getPlaylistContents(double playlistID, GetPlaylistContentsQueryParamType type) throws Exception { - GetPlaylistContentsRequest request = - GetPlaylistContentsRequest - .builder() - .playlistID(playlistID) - .type(type) - .build(); - RequestOperation operation - = new GetPlaylistContents.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Delete Playlist Contents - * - *

Clears a playlist, only works with dumb playlists. Returns the playlist. - * - * @return The call builder - */ - public ClearPlaylistContentsRequestBuilder clearPlaylistContents() { - return new ClearPlaylistContentsRequestBuilder(sdkConfiguration); - } - - /** - * Delete Playlist Contents - * - *

Clears a playlist, only works with dumb playlists. Returns the playlist. - * - * @param playlistID the ID of the playlist - * @return The response from the API call - * @throws Exception if the API call fails - */ - public ClearPlaylistContentsResponse clearPlaylistContents(double playlistID) throws Exception { - ClearPlaylistContentsRequest request = - ClearPlaylistContentsRequest - .builder() - .playlistID(playlistID) - .build(); - RequestOperation operation - = new ClearPlaylistContents.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Adding to a Playlist - * - *

Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. - * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - * - * @return The call builder - */ - public AddPlaylistContentsRequestBuilder addPlaylistContents() { - return new AddPlaylistContentsRequestBuilder(sdkConfiguration); - } - - /** - * Adding to a Playlist - * - *

Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. - * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - * - * @param playlistID the ID of the playlist - * @param uri the content URI for the playlist - * @return The response from the API call - * @throws Exception if the API call fails - */ - public AddPlaylistContentsResponse addPlaylistContents(double playlistID, String uri) throws Exception { - return addPlaylistContents(playlistID, uri, Optional.empty()); - } - - /** - * Adding to a Playlist - * - *

Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. - * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - * - * @param playlistID the ID of the playlist - * @param uri the content URI for the playlist - * @param playQueueID the play queue to add to a playlist - * @return The response from the API call - * @throws Exception if the API call fails - */ - public AddPlaylistContentsResponse addPlaylistContents( - double playlistID, String uri, - Optional playQueueID) throws Exception { - AddPlaylistContentsRequest request = - AddPlaylistContentsRequest - .builder() - .playlistID(playlistID) - .uri(uri) - .playQueueID(playQueueID) - .build(); - RequestOperation operation - = new AddPlaylistContents.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Upload Playlist - * - *

Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. - * - * @return The call builder - */ - public UploadPlaylistRequestBuilder uploadPlaylist() { - return new UploadPlaylistRequestBuilder(sdkConfiguration); - } - - /** - * Upload Playlist - * - *

Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. - * - * @param path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. - * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. - * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. - * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. - * - * @param force Force overwriting of duplicate playlists. - * By default, a playlist file uploaded with the same path will overwrite the existing playlist. - * The `force` argument is used to disable overwriting. - * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. - * - * @param sectionID Possibly the section ID to upload the playlist to, we are not certain. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public UploadPlaylistResponse uploadPlaylist( - String path, QueryParamForce force, - long sectionID) throws Exception { - UploadPlaylistRequest request = - UploadPlaylistRequest - .builder() - .path(path) - .force(force) - .sectionID(sectionID) - .build(); - RequestOperation operation - = new UploadPlaylist.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/Plex.java b/src/main/java/dev/plexapi/sdk/Plex.java deleted file mode 100644 index ce9b4319..00000000 --- a/src/main/java/dev/plexapi/sdk/Plex.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.models.operations.GetCompanionsDataRequestBuilder; -import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse; -import dev.plexapi.sdk.models.operations.GetGeoDataRequestBuilder; -import dev.plexapi.sdk.models.operations.GetGeoDataResponse; -import dev.plexapi.sdk.models.operations.GetHomeDataRequestBuilder; -import dev.plexapi.sdk.models.operations.GetHomeDataResponse; -import dev.plexapi.sdk.models.operations.GetPinRequest; -import dev.plexapi.sdk.models.operations.GetPinRequestBuilder; -import dev.plexapi.sdk.models.operations.GetPinResponse; -import dev.plexapi.sdk.models.operations.GetServerResourcesRequest; -import dev.plexapi.sdk.models.operations.GetServerResourcesRequestBuilder; -import dev.plexapi.sdk.models.operations.GetServerResourcesResponse; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdRequest; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdRequestBuilder; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse; -import dev.plexapi.sdk.models.operations.GetUserFriendsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetUserFriendsResponse; -import dev.plexapi.sdk.models.operations.IncludeHttps; -import dev.plexapi.sdk.models.operations.IncludeIPv6; -import dev.plexapi.sdk.models.operations.IncludeRelay; -import dev.plexapi.sdk.operations.GetCompanionsData; -import dev.plexapi.sdk.operations.GetGeoData; -import dev.plexapi.sdk.operations.GetHomeData; -import dev.plexapi.sdk.operations.GetPin; -import dev.plexapi.sdk.operations.GetServerResources; -import dev.plexapi.sdk.operations.GetTokenByPinId; -import dev.plexapi.sdk.operations.GetUserFriends; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -/** - * API Calls that perform operations directly against https://Plex.tv - */ -public class Plex { - private final SDKConfiguration sdkConfiguration; - private final AsyncPlex asyncSDK; - - Plex(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.asyncSDK = new AsyncPlex(this, sdkConfiguration); - } - - /** - * Switches to the async SDK. - * - * @return The async SDK - */ - public AsyncPlex async() { - return asyncSDK; - } - - /** - * Get Companions Data - * - *

Get Companions Data - * - * @return The call builder - */ - public GetCompanionsDataRequestBuilder getCompanionsData() { - return new GetCompanionsDataRequestBuilder(sdkConfiguration); - } - - /** - * Get Companions Data - * - *

Get Companions Data - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetCompanionsDataResponse getCompanionsDataDirect() throws Exception { - return getCompanionsData(Optional.empty()); - } - - /** - * Get Companions Data - * - *

Get Companions Data - * - * @param serverURL Overrides the server URL. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetCompanionsDataResponse getCompanionsData(Optional serverURL) throws Exception { - RequestlessOperation operation - = new GetCompanionsData.Sync(sdkConfiguration, serverURL); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get list of friends of the user logged in - * - *

Get friends of provided auth token. - * - * @return The call builder - */ - public GetUserFriendsRequestBuilder getUserFriends() { - return new GetUserFriendsRequestBuilder(sdkConfiguration); - } - - /** - * Get list of friends of the user logged in - * - *

Get friends of provided auth token. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetUserFriendsResponse getUserFriendsDirect() throws Exception { - return getUserFriends(Optional.empty()); - } - - /** - * Get list of friends of the user logged in - * - *

Get friends of provided auth token. - * - * @param serverURL Overrides the server URL. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetUserFriendsResponse getUserFriends(Optional serverURL) throws Exception { - RequestlessOperation operation - = new GetUserFriends.Sync(sdkConfiguration, serverURL); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get Geo Data - * - *

Returns the geolocation and locale data of the caller - * - * @return The call builder - */ - public GetGeoDataRequestBuilder getGeoData() { - return new GetGeoDataRequestBuilder(sdkConfiguration); - } - - /** - * Get Geo Data - * - *

Returns the geolocation and locale data of the caller - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetGeoDataResponse getGeoDataDirect() throws Exception { - return getGeoData(Optional.empty()); - } - - /** - * Get Geo Data - * - *

Returns the geolocation and locale data of the caller - * - * @param serverURL Overrides the server URL. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetGeoDataResponse getGeoData(Optional serverURL) throws Exception { - RequestlessOperation operation - = new GetGeoData.Sync(sdkConfiguration, serverURL); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get Plex Home Data - * - *

Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. - * - * @return The call builder - */ - public GetHomeDataRequestBuilder getHomeData() { - return new GetHomeDataRequestBuilder(sdkConfiguration); - } - - /** - * Get Plex Home Data - * - *

Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetHomeDataResponse getHomeDataDirect() throws Exception { - RequestlessOperation operation - = new GetHomeData.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get Server Resources - * - *

Get Plex server access tokens and server connections - * - * @return The call builder - */ - public GetServerResourcesRequestBuilder getServerResources() { - return new GetServerResourcesRequestBuilder(sdkConfiguration); - } - - /** - * Get Server Resources - * - *

Get Plex server access tokens and server connections - * - * @param clientID An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetServerResourcesResponse getServerResources(String clientID) throws Exception { - return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), - clientID, Optional.empty()); - } - - /** - * Get Server Resources - * - *

Get Plex server access tokens and server connections - * - * @param includeHttps Include Https entries in the results - * @param includeRelay Include Relay addresses in the results - * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - * - * @param includeIPv6 Include IPv6 entries in the results - * @param clientID An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - * @param serverURL Overrides the server URL. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetServerResourcesResponse getServerResources( - Optional includeHttps, Optional includeRelay, - Optional includeIPv6, String clientID, - Optional serverURL) throws Exception { - GetServerResourcesRequest request = - GetServerResourcesRequest - .builder() - .includeHttps(includeHttps) - .includeRelay(includeRelay) - .includeIPv6(includeIPv6) - .clientID(clientID) - .build(); - RequestOperation operation - = new GetServerResources.Sync(sdkConfiguration, serverURL); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get a Pin - * - *

Retrieve a Pin ID from Plex.tv to use for authentication flows - * - * @return The call builder - */ - public GetPinRequestBuilder getPin() { - return new GetPinRequestBuilder(sdkConfiguration); - } - - /** - * Get a Pin - * - *

Retrieve a Pin ID from Plex.tv to use for authentication flows - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetPinResponse getPin(GetPinRequest request) throws Exception { - return getPin(request, Optional.empty()); - } - - /** - * Get a Pin - * - *

Retrieve a Pin ID from Plex.tv to use for authentication flows - * - * @param request The request object containing all the parameters for the API call. - * @param serverURL Overrides the server URL. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetPinResponse getPin(GetPinRequest request, Optional serverURL) throws Exception { - RequestOperation operation - = new GetPin.Sync(sdkConfiguration, serverURL); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Access Token by PinId - * - *

Retrieve an Access Token from Plex.tv after the Pin has been authenticated - * - * @return The call builder - */ - public GetTokenByPinIdRequestBuilder getTokenByPinId() { - return new GetTokenByPinIdRequestBuilder(sdkConfiguration); - } - - /** - * Get Access Token by PinId - * - *

Retrieve an Access Token from Plex.tv after the Pin has been authenticated - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetTokenByPinIdResponse getTokenByPinId(GetTokenByPinIdRequest request) throws Exception { - return getTokenByPinId(request, Optional.empty()); - } - - /** - * Get Access Token by PinId - * - *

Retrieve an Access Token from Plex.tv after the Pin has been authenticated - * - * @param request The request object containing all the parameters for the API call. - * @param serverURL Overrides the server URL. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetTokenByPinIdResponse getTokenByPinId(GetTokenByPinIdRequest request, Optional serverURL) throws Exception { - RequestOperation operation - = new GetTokenByPinId.Sync(sdkConfiguration, serverURL); - return operation.handleResponse(operation.doRequest(request)); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/PlexAPI.java b/src/main/java/dev/plexapi/sdk/PlexAPI.java index 0e10ff2b..0cb8ee6e 100644 --- a/src/main/java/dev/plexapi/sdk/PlexAPI.java +++ b/src/main/java/dev/plexapi/sdk/PlexAPI.java @@ -3,7 +3,7 @@ */ package dev.plexapi.sdk; -import com.fasterxml.jackson.annotation.JsonValue; +import dev.plexapi.sdk.models.shared.Accepts; import dev.plexapi.sdk.utils.HTTPClient; import dev.plexapi.sdk.utils.Hook.SdkInitData; import dev.plexapi.sdk.utils.RetryConfig; @@ -11,38 +11,9 @@ import dev.plexapi.sdk.utils.SpeakeasyHTTPClient; import dev.plexapi.sdk.utils.Utils; import java.lang.String; import java.util.Map; -import java.util.Objects; import java.util.Optional; import java.util.function.Consumer; -/** - * Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server - * - *

# Plex Media Server OpenAPI Specification - * - *

An Open Source OpenAPI Specification for Plex Media Server - * - *

Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/) - * - *

## Documentation - * - *

[API Documentation](https://plexapi.dev) - * - *

## SDKs - * - *

The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec). - * - *

| Language | Repository | Releases | Other | - * | --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- | - * | Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - | - * | JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - | - * | Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) | - * | Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - | - * | Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - | - * | PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - | - * | Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - | - * | C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | - - */ public class PlexAPI { @@ -50,95 +21,182 @@ public class PlexAPI { * SERVERS contains the list of server urls available to the SDK. */ public static final String[] SERVERS = { - /** - * The full address of your Plex Server - */ - "{protocol}://{ip}:{port}", + + "https://{IP-description}.{identifier}.plex.direct:{port}", + + "{protocol}://{host}:{port}", + + "https://{server_url}", }; /** - * Operations against the Plex Media Server System. + * General endpoints for basic PMS operation not specific to any media provider */ - private final Server server; + private final General general; /** - * API Calls interacting with Plex Media Server Media + * The server can notify clients in real-time of a wide range of events, from library scanning, to preferences being modified, to changes to media, and many other things. This is also the mechanism by which activity progress is reported. + * + *

Two protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket. */ - private final Media media; + private final Events events; /** - * API Calls that perform operations with Plex Media Server Videos + * API Operations against the Preferences */ - private final Video video; + private final Preferences preferences; /** - * Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. - * Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. - * Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: - * - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. - * - They must contain an `type` which is used by clients to distinguish the specific activity. - * - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) - * - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + * Operations for rating media items (thumbs up/down, star ratings, etc.) + */ + private final Rate rate; + + /** + * The actions feature within a media provider + */ + private final Timeline timeline; + + /** + * Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + * + *

Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + * + *

Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. */ private final Activities activities; /** - * Butler is the task manager of the Plex Media Server Ecosystem. + * The butler is responsible for running periodic tasks. Some tasks run daily, others every few days, and some weekly. These includes database maintenance, metadata updating, thumbnail generation, media analysis, and other tasks. */ private final Butler butler; /** - * API Calls that perform operations directly against https://Plex.tv + * API Operations against the Download Queue */ - private final Plex plex; + private final DownloadQueue downloadQueue; /** - * Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + * The hubs within a media provider */ private final Hubs hubs; /** - * API Calls that perform search operations with Plex Media Server + * The search feature within a media provider */ private final Search search; /** - * API Calls interacting with Plex Media Server Libraries + * Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc). */ private final Library library; /** - * API Calls that perform operations with Plex Media Server Watchlists + * API Operations against the Collections */ - private final Watchlist watchlist; + private final Collections collections; /** - * Submit logs to the Log Handler for Plex Media Server + * The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself + */ + private final DVRs dvRs; + + /** + * The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when + */ + private final Epg epg; + + /** + * LiveTV contains the playback sessions of a channel from a DVR device + */ + private final LiveTV liveTV; + + /** + * Logging mechanism to allow clients to log to the server */ private final Log log; /** - * Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). - * They can be organized in (optionally nesting) folders. - * Retrieving a playlist, or its items, will trigger a refresh of its metadata. - * This may cause the duration and number of items to change. + * Media grabbers provide ways for media to be obtained for a given protocol. The simplest ones are `stream` and `download`. More complex grabbers can have associated devices + * + *

Network tuners can present themselves on the network using the Simple Service Discovery Protocol and Plex Media Server will discover them. The following XML is an example of the data returned from SSDP. The `deviceType`, `serviceType`, and `serviceId` values must remain as they are in the example in order for PMS to properly discover the device. Other less-obvious fields are described in the parameters section below. + * + *

Example SSDP output + * ``` + * <root xmlns="urn:schemas-upnp-org:device-1-0"> + * <specVersion> + * <major>1</major> + * <minor>0</minor> + * </specVersion> + * <device> + * <deviceType>urn:plex-tv:device:Media:1</deviceType> + * <friendlyName>Turing Hopper 3000</friendlyName> + * <manufacturer>Plex, Inc.</manufacturer> + * <manufacturerURL>https://plex.tv/</manufacturerURL> + * <modelDescription>Turing Hopper 3000 Media Grabber</modelDescription> + * <modelName>Plex Media Grabber</modelName> + * <modelNumber>1</modelNumber> + * <modelURL>https://plex.tv</modelURL> + * <UDN>uuid:42fde8e4-93b6-41e5-8a63-12d848655811</UDN> + * <serviceList> + * <service> + * <URLBase>http://10.0.0.5:8088</URLBase> + * <serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType> + * <serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId> + * </service> + * </serviceList> + * </device> + * </root> + * ``` + * + *

- UDN: (string) A UUID for the device. This should be unique across models of a device at minimum. + * - URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted. */ - private final Playlists playlists; + private final Devices devices; /** - * API Calls regarding authentication for Plex Media Server + * Media providers are the starting points for the entire Plex Media Server media library API. It defines the paths for the groups of endpoints. The `/media/providers` should be the only hard-coded path in clients when accessing the media library. Non-media library endpoints are outside the scope of the media provider. See the description in See [the section in API Info](#section/API-Info/Media-Providers) for more information on how to use media providers. */ - private final Authentication authentication; + private final Provider provider; /** - * API Calls that perform operations with Plex Media Server Statistics + * Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available */ - private final Statistics statistics; + private final Subscriptions subscriptions; /** - * API Calls that perform search operations with Plex Media Server Sessions + * API Operations against the Transcoder */ - private final Sessions sessions; + private final Transcoder transcoder; + + /** + * Media playlists that can be created and played back + */ + private final Playlist playlist; + + /** + * Endpoints for manipulating playlists. + */ + private final LibraryPlaylists libraryPlaylists; + + /** + * The playqueue feature within a media provider + * A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue. + * Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by `playQueueLastAddedItemID` existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed. + * You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion. + * All created play queues will have an empty "Up Next" area - unless the item is an album and no `key` is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set `key`. This is due to the above implicit queueing of albums when no `key` is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area. + * The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item. + */ + private final PlayQueue playQueue; + + /** + * Service provided to compute UltraBlur colors and images. + */ + private final UltraBlur ultraBlur; + + /** + * The status endpoints give you information about current playbacks, play history, and even terminating sessions. + */ + private final Status status; /** * This describes the API for searching and applying updates to the Plex Media Server. @@ -146,121 +204,233 @@ public class PlexAPI { */ private final Updater updater; - - private final Users users; + /** + * The actual content of the media provider + */ + private final Content content; /** - * Operations against the Plex Media Server System. + * Endpoints for manipulating collections. In addition to these endpoints, `/library/collections/:collectionId/X` will be rerouted to `/library/metadata/:collectionId/X` and respond to those endpoints as well. */ - public Server server() { - return server; + private final LibraryCollections libraryCollections; + + /** + * General endpoints for basic PMS operation not specific to any media provider + */ + public General general() { + return general; } /** - * API Calls interacting with Plex Media Server Media + * The server can notify clients in real-time of a wide range of events, from library scanning, to preferences being modified, to changes to media, and many other things. This is also the mechanism by which activity progress is reported. + * + *

Two protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket. */ - public Media media() { - return media; + public Events events() { + return events; } /** - * API Calls that perform operations with Plex Media Server Videos + * API Operations against the Preferences */ - public Video video() { - return video; + public Preferences preferences() { + return preferences; } /** - * Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. - * Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. - * Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: - * - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. - * - They must contain an `type` which is used by clients to distinguish the specific activity. - * - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) - * - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + * Operations for rating media items (thumbs up/down, star ratings, etc.) + */ + public Rate rate() { + return rate; + } + + /** + * The actions feature within a media provider + */ + public Timeline timeline() { + return timeline; + } + + /** + * Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + * + *

Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. + * + *

Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. */ public Activities activities() { return activities; } /** - * Butler is the task manager of the Plex Media Server Ecosystem. + * The butler is responsible for running periodic tasks. Some tasks run daily, others every few days, and some weekly. These includes database maintenance, metadata updating, thumbnail generation, media analysis, and other tasks. */ public Butler butler() { return butler; } /** - * API Calls that perform operations directly against https://Plex.tv + * API Operations against the Download Queue */ - public Plex plex() { - return plex; + public DownloadQueue downloadQueue() { + return downloadQueue; } /** - * Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. + * The hubs within a media provider */ public Hubs hubs() { return hubs; } /** - * API Calls that perform search operations with Plex Media Server + * The search feature within a media provider */ public Search search() { return search; } /** - * API Calls interacting with Plex Media Server Libraries + * Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc). */ public Library library() { return library; } /** - * API Calls that perform operations with Plex Media Server Watchlists + * API Operations against the Collections */ - public Watchlist watchlist() { - return watchlist; + public Collections collections() { + return collections; } /** - * Submit logs to the Log Handler for Plex Media Server + * The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself + */ + public DVRs dvRs() { + return dvRs; + } + + /** + * The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when + */ + public Epg epg() { + return epg; + } + + /** + * LiveTV contains the playback sessions of a channel from a DVR device + */ + public LiveTV liveTV() { + return liveTV; + } + + /** + * Logging mechanism to allow clients to log to the server */ public Log log() { return log; } /** - * Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). - * They can be organized in (optionally nesting) folders. - * Retrieving a playlist, or its items, will trigger a refresh of its metadata. - * This may cause the duration and number of items to change. + * Media grabbers provide ways for media to be obtained for a given protocol. The simplest ones are `stream` and `download`. More complex grabbers can have associated devices + * + *

Network tuners can present themselves on the network using the Simple Service Discovery Protocol and Plex Media Server will discover them. The following XML is an example of the data returned from SSDP. The `deviceType`, `serviceType`, and `serviceId` values must remain as they are in the example in order for PMS to properly discover the device. Other less-obvious fields are described in the parameters section below. + * + *

Example SSDP output + * ``` + * <root xmlns="urn:schemas-upnp-org:device-1-0"> + * <specVersion> + * <major>1</major> + * <minor>0</minor> + * </specVersion> + * <device> + * <deviceType>urn:plex-tv:device:Media:1</deviceType> + * <friendlyName>Turing Hopper 3000</friendlyName> + * <manufacturer>Plex, Inc.</manufacturer> + * <manufacturerURL>https://plex.tv/</manufacturerURL> + * <modelDescription>Turing Hopper 3000 Media Grabber</modelDescription> + * <modelName>Plex Media Grabber</modelName> + * <modelNumber>1</modelNumber> + * <modelURL>https://plex.tv</modelURL> + * <UDN>uuid:42fde8e4-93b6-41e5-8a63-12d848655811</UDN> + * <serviceList> + * <service> + * <URLBase>http://10.0.0.5:8088</URLBase> + * <serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType> + * <serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId> + * </service> + * </serviceList> + * </device> + * </root> + * ``` + * + *

- UDN: (string) A UUID for the device. This should be unique across models of a device at minimum. + * - URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted. */ - public Playlists playlists() { - return playlists; + public Devices devices() { + return devices; } /** - * API Calls regarding authentication for Plex Media Server + * Media providers are the starting points for the entire Plex Media Server media library API. It defines the paths for the groups of endpoints. The `/media/providers` should be the only hard-coded path in clients when accessing the media library. Non-media library endpoints are outside the scope of the media provider. See the description in See [the section in API Info](#section/API-Info/Media-Providers) for more information on how to use media providers. */ - public Authentication authentication() { - return authentication; + public Provider provider() { + return provider; } /** - * API Calls that perform operations with Plex Media Server Statistics + * Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available */ - public Statistics statistics() { - return statistics; + public Subscriptions subscriptions() { + return subscriptions; } /** - * API Calls that perform search operations with Plex Media Server Sessions + * API Operations against the Transcoder */ - public Sessions sessions() { - return sessions; + public Transcoder transcoder() { + return transcoder; + } + + /** + * Media playlists that can be created and played back + */ + public Playlist playlist() { + return playlist; + } + + /** + * Endpoints for manipulating playlists. + */ + public LibraryPlaylists libraryPlaylists() { + return libraryPlaylists; + } + + /** + * The playqueue feature within a media provider + * A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue. + * Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by `playQueueLastAddedItemID` existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed. + * You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion. + * All created play queues will have an empty "Up Next" area - unless the item is an album and no `key` is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set `key`. This is due to the above implicit queueing of albums when no `key` is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area. + * The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item. + */ + public PlayQueue playQueue() { + return playQueue; + } + + /** + * Service provided to compute UltraBlur colors and images. + */ + public UltraBlur ultraBlur() { + return ultraBlur; + } + + /** + * The status endpoints give you information about current playbacks, play history, and even terminating sessions. + */ + public Status status() { + return status; } /** @@ -271,9 +441,18 @@ public class PlexAPI { return updater; } + /** + * The actual content of the media provider + */ + public Content content() { + return content; + } - public Users users() { - return users; + /** + * Endpoints for manipulating collections. In addition to these endpoints, `/library/collections/:collectionId/X` will be rerouted to `/library/metadata/:collectionId/X` and respond to those endpoints as well. + */ + public LibraryCollections libraryCollections() { + return libraryCollections; } private final SDKConfiguration sdkConfiguration; @@ -305,12 +484,12 @@ public class PlexAPI { /** * Configures the SDK security to use the provided secret. * - * @param accessToken The secret to use for all requests. + * @param token The secret to use for all requests. * @return The builder instance. */ - public Builder accessToken(String accessToken) { + public Builder token(String token) { this.sdkConfiguration.setSecuritySource(SecuritySource.of(dev.plexapi.sdk.models.shared.Security.builder() - .accessToken(accessToken) + .token(token) .build())); return this; } @@ -390,63 +569,34 @@ public class PlexAPI { } /** - * ServerProtocol - * - *

The protocol to use for the server connection - */ - public enum ServerProtocol { - HTTP("http"), - HTTPS("https"); - - @JsonValue - private final String value; - - private ServerProtocol(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (ServerProtocol o: ServerProtocol.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } - } - /** - * Sets the protocol variable for url substitution. + * Sets the identifier variable for url substitution. * - * @param protocol The value to set. + * @param identifier The value to set. * @return The builder instance. */ - public Builder protocol(ServerProtocol protocol) { + public Builder identifier(String identifier) { for (Map server : this.sdkConfiguration.serverVariables()) { - if (!server.containsKey("protocol")) { + if (!server.containsKey("identifier")) { continue; } - server.put("protocol", protocol.toString()); + server.put("identifier", identifier.toString()); } return this; } /** - * Sets the ip variable for url substitution. + * Sets the IP-description variable for url substitution. * - * @param ip The value to set. + * @param ipDescription The value to set. * @return The builder instance. */ - public Builder ip(String ip) { + public Builder ipDescription(String ipDescription) { for (Map server : this.sdkConfiguration.serverVariables()) { - if (!server.containsKey("ip")) { + if (!server.containsKey("IP-description")) { continue; } - server.put("ip", ip.toString()); + server.put("IP-description", ipDescription.toString()); } return this; @@ -469,6 +619,178 @@ public class PlexAPI { return this; } + /** + * Sets the protocol variable for url substitution. + * + * @param protocol The value to set. + * @return The builder instance. + */ + public Builder protocol(String protocol) { + for (Map server : this.sdkConfiguration.serverVariables()) { + if (!server.containsKey("protocol")) { + continue; + } + server.put("protocol", protocol.toString()); + } + + return this; + } + + /** + * Sets the host variable for url substitution. + * + * @param host The value to set. + * @return The builder instance. + */ + public Builder host(String host) { + for (Map server : this.sdkConfiguration.serverVariables()) { + if (!server.containsKey("host")) { + continue; + } + server.put("host", host.toString()); + } + + return this; + } + + /** + * Sets the server_url variable for url substitution. + * + * @param serverUrl The value to set. + * @return The builder instance. + */ + public Builder serverUrl(String serverUrl) { + for (Map server : this.sdkConfiguration.serverVariables()) { + if (!server.containsKey("server_url")) { + continue; + } + server.put("server_url", serverUrl.toString()); + } + + return this; + } + + /** + * Allows setting the accepts parameter for all supported operations. + * + * @param accepts The value to set. + * @return The builder instance. + */ + public Builder accepts(Accepts accepts) { + this.sdkConfiguration.globals.putParam("header", "accepts", accepts); + return this; + } + + /** + * Allows setting the clientIdentifier parameter for all supported operations. + * + * @param clientIdentifier The value to set. + * @return The builder instance. + */ + public Builder clientIdentifier(String clientIdentifier) { + this.sdkConfiguration.globals.putParam("header", "clientIdentifier", clientIdentifier); + return this; + } + + /** + * Allows setting the product parameter for all supported operations. + * + * @param product The value to set. + * @return The builder instance. + */ + public Builder product(String product) { + this.sdkConfiguration.globals.putParam("header", "product", product); + return this; + } + + /** + * Allows setting the version parameter for all supported operations. + * + * @param version The value to set. + * @return The builder instance. + */ + public Builder version(String version) { + this.sdkConfiguration.globals.putParam("header", "version", version); + return this; + } + + /** + * Allows setting the platform parameter for all supported operations. + * + * @param platform The value to set. + * @return The builder instance. + */ + public Builder platform(String platform) { + this.sdkConfiguration.globals.putParam("header", "platform", platform); + return this; + } + + /** + * Allows setting the platformVersion parameter for all supported operations. + * + * @param platformVersion The value to set. + * @return The builder instance. + */ + public Builder platformVersion(String platformVersion) { + this.sdkConfiguration.globals.putParam("header", "platformVersion", platformVersion); + return this; + } + + /** + * Allows setting the device parameter for all supported operations. + * + * @param device The value to set. + * @return The builder instance. + */ + public Builder device(String device) { + this.sdkConfiguration.globals.putParam("header", "device", device); + return this; + } + + /** + * Allows setting the model parameter for all supported operations. + * + * @param model The value to set. + * @return The builder instance. + */ + public Builder model(String model) { + this.sdkConfiguration.globals.putParam("header", "model", model); + return this; + } + + /** + * Allows setting the deviceVendor parameter for all supported operations. + * + * @param deviceVendor The value to set. + * @return The builder instance. + */ + public Builder deviceVendor(String deviceVendor) { + this.sdkConfiguration.globals.putParam("header", "deviceVendor", deviceVendor); + return this; + } + + /** + * Allows setting the deviceName parameter for all supported operations. + * + * @param deviceName The value to set. + * @return The builder instance. + */ + public Builder deviceName(String deviceName) { + this.sdkConfiguration.globals.putParam("header", "deviceName", deviceName); + return this; + } + + /** + * Allows setting the marketplace parameter for all supported operations. + * + * @param marketplace The value to set. + * @return The builder instance. + */ + public Builder marketplace(String marketplace) { + this.sdkConfiguration.globals.putParam("header", "marketplace", marketplace); + return this; + } + // Visible for testing, may be accessed via reflection in tests Builder _hooks(dev.plexapi.sdk.utils.Hooks hooks) { sdkConfiguration.setHooks(hooks); @@ -508,23 +830,34 @@ public class PlexAPI { private PlexAPI(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; this.sdkConfiguration.initialize(); - this.server = new Server(sdkConfiguration); - this.media = new Media(sdkConfiguration); - this.video = new Video(sdkConfiguration); + this.general = new General(sdkConfiguration); + this.events = new Events(sdkConfiguration); + this.preferences = new Preferences(sdkConfiguration); + this.rate = new Rate(sdkConfiguration); + this.timeline = new Timeline(sdkConfiguration); this.activities = new Activities(sdkConfiguration); this.butler = new Butler(sdkConfiguration); - this.plex = new Plex(sdkConfiguration); + this.downloadQueue = new DownloadQueue(sdkConfiguration); this.hubs = new Hubs(sdkConfiguration); this.search = new Search(sdkConfiguration); this.library = new Library(sdkConfiguration); - this.watchlist = new Watchlist(sdkConfiguration); + this.collections = new Collections(sdkConfiguration); + this.dvRs = new DVRs(sdkConfiguration); + this.epg = new Epg(sdkConfiguration); + this.liveTV = new LiveTV(sdkConfiguration); this.log = new Log(sdkConfiguration); - this.playlists = new Playlists(sdkConfiguration); - this.authentication = new Authentication(sdkConfiguration); - this.statistics = new Statistics(sdkConfiguration); - this.sessions = new Sessions(sdkConfiguration); + this.devices = new Devices(sdkConfiguration); + this.provider = new Provider(sdkConfiguration); + this.subscriptions = new Subscriptions(sdkConfiguration); + this.transcoder = new Transcoder(sdkConfiguration); + this.playlist = new Playlist(sdkConfiguration); + this.libraryPlaylists = new LibraryPlaylists(sdkConfiguration); + this.playQueue = new PlayQueue(sdkConfiguration); + this.ultraBlur = new UltraBlur(sdkConfiguration); + this.status = new Status(sdkConfiguration); this.updater = new Updater(sdkConfiguration); - this.users = new Users(sdkConfiguration); + this.content = new Content(sdkConfiguration); + this.libraryCollections = new LibraryCollections(sdkConfiguration); SdkInitData data = this.sdkConfiguration.hooks().sdkInit( new SdkInitData( this.sdkConfiguration.resolvedServerUrl(), diff --git a/src/main/java/dev/plexapi/sdk/Preferences.java b/src/main/java/dev/plexapi/sdk/Preferences.java new file mode 100644 index 00000000..50e35ffd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Preferences.java @@ -0,0 +1,120 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.GetAllPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.GetAllPreferencesResponse; +import dev.plexapi.sdk.models.operations.GetPreferenceRequest; +import dev.plexapi.sdk.models.operations.GetPreferenceRequestBuilder; +import dev.plexapi.sdk.models.operations.GetPreferenceResponse; +import dev.plexapi.sdk.models.operations.SetPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.SetPreferencesResponse; +import dev.plexapi.sdk.operations.GetAllPreferences; +import dev.plexapi.sdk.operations.GetPreference; +import dev.plexapi.sdk.operations.SetPreferences; +import java.lang.Exception; + +/** + * API Operations against the Preferences + */ +public class Preferences { + private final SDKConfiguration sdkConfiguration; + private final AsyncPreferences asyncSDK; + + Preferences(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncPreferences(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncPreferences async() { + return asyncSDK; + } + + /** + * Get all preferences + * + *

Get the list of all preferences + * + * @return The call builder + */ + public GetAllPreferencesRequestBuilder getAllPreferences() { + return new GetAllPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Get all preferences + * + *

Get the list of all preferences + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAllPreferencesResponse getAllPreferencesDirect() throws Exception { + RequestlessOperation operation + = new GetAllPreferences.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Set preferences + * + *

Set a set of preferences in query parameters + * + * @return The call builder + */ + public SetPreferencesRequestBuilder setPreferences() { + return new SetPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Set preferences + * + *

Set a set of preferences in query parameters + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SetPreferencesResponse setPreferences(SetPreferencesRequest request) throws Exception { + RequestOperation operation + = new SetPreferences.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a preferences + * + *

Get a single preference and value + * + * @return The call builder + */ + public GetPreferenceRequestBuilder getPreference() { + return new GetPreferenceRequestBuilder(sdkConfiguration); + } + + /** + * Get a preferences + * + *

Get a single preference and value + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetPreferenceResponse getPreference(GetPreferenceRequest request) throws Exception { + RequestOperation operation + = new GetPreference.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Provider.java b/src/main/java/dev/plexapi/sdk/Provider.java new file mode 100644 index 00000000..995c2bf9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Provider.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.AddProviderRequest; +import dev.plexapi.sdk.models.operations.AddProviderRequestBuilder; +import dev.plexapi.sdk.models.operations.AddProviderResponse; +import dev.plexapi.sdk.models.operations.DeleteMediaProviderRequest; +import dev.plexapi.sdk.models.operations.DeleteMediaProviderRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteMediaProviderResponse; +import dev.plexapi.sdk.models.operations.ListProvidersRequestBuilder; +import dev.plexapi.sdk.models.operations.ListProvidersResponse; +import dev.plexapi.sdk.models.operations.RefreshProvidersRequestBuilder; +import dev.plexapi.sdk.models.operations.RefreshProvidersResponse; +import dev.plexapi.sdk.operations.AddProvider; +import dev.plexapi.sdk.operations.DeleteMediaProvider; +import dev.plexapi.sdk.operations.ListProviders; +import dev.plexapi.sdk.operations.RefreshProviders; +import java.lang.Exception; + +/** + * Media providers are the starting points for the entire Plex Media Server media library API. It defines the paths for the groups of endpoints. The `/media/providers` should be the only hard-coded path in clients when accessing the media library. Non-media library endpoints are outside the scope of the media provider. See the description in See [the section in API Info](#section/API-Info/Media-Providers) for more information on how to use media providers. + */ +public class Provider { + private final SDKConfiguration sdkConfiguration; + private final AsyncProvider asyncSDK; + + Provider(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncProvider(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncProvider async() { + return asyncSDK; + } + + /** + * Get the list of available media providers + * + *

Get the list of all available media providers for this PMS. This will generally include the library provider and possibly EPG if DVR is set up. + * + * @return The call builder + */ + public ListProvidersRequestBuilder listProviders() { + return new ListProvidersRequestBuilder(sdkConfiguration); + } + + /** + * Get the list of available media providers + * + *

Get the list of all available media providers for this PMS. This will generally include the library provider and possibly EPG if DVR is set up. + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListProvidersResponse listProvidersDirect() throws Exception { + RequestlessOperation operation + = new ListProviders.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Add a media provider + * + *

This endpoint registers a media provider with the server. Once registered, the media server acts as a reverse proxy to the provider, allowing both local and remote providers to work. + * + * @return The call builder + */ + public AddProviderRequestBuilder addProvider() { + return new AddProviderRequestBuilder(sdkConfiguration); + } + + /** + * Add a media provider + * + *

This endpoint registers a media provider with the server. Once registered, the media server acts as a reverse proxy to the provider, allowing both local and remote providers to work. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddProviderResponse addProvider(AddProviderRequest request) throws Exception { + RequestOperation operation + = new AddProvider.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Refresh media providers + * + *

Refresh all known media providers. This is useful in case a provider has updated features. + * + * @return The call builder + */ + public RefreshProvidersRequestBuilder refreshProviders() { + return new RefreshProvidersRequestBuilder(sdkConfiguration); + } + + /** + * Refresh media providers + * + *

Refresh all known media providers. This is useful in case a provider has updated features. + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public RefreshProvidersResponse refreshProvidersDirect() throws Exception { + RequestlessOperation operation + = new RefreshProviders.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Delete a media provider + * + *

Deletes a media provider with the given id + * + * @return The call builder + */ + public DeleteMediaProviderRequestBuilder deleteMediaProvider() { + return new DeleteMediaProviderRequestBuilder(sdkConfiguration); + } + + /** + * Delete a media provider + * + *

Deletes a media provider with the given id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteMediaProviderResponse deleteMediaProvider(DeleteMediaProviderRequest request) throws Exception { + RequestOperation operation + = new DeleteMediaProvider.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Rate.java b/src/main/java/dev/plexapi/sdk/Rate.java new file mode 100644 index 00000000..f4a48a7b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Rate.java @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.SetRatingRequest; +import dev.plexapi.sdk.models.operations.SetRatingRequestBuilder; +import dev.plexapi.sdk.models.operations.SetRatingResponse; +import dev.plexapi.sdk.operations.SetRating; +import java.lang.Exception; + +/** + * Operations for rating media items (thumbs up/down, star ratings, etc.) + */ +public class Rate { + private final SDKConfiguration sdkConfiguration; + private final AsyncRate asyncSDK; + + Rate(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncRate(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncRate async() { + return asyncSDK; + } + + /** + * Rate an item + * + *

Set the rating on an item. + * This API does respond to the GET verb but applications should use PUT + * + * @return The call builder + */ + public SetRatingRequestBuilder setRating() { + return new SetRatingRequestBuilder(sdkConfiguration); + } + + /** + * Rate an item + * + *

Set the rating on an item. + * This API does respond to the GET verb but applications should use PUT + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SetRatingResponse setRating(SetRatingRequest request) throws Exception { + RequestOperation operation + = new SetRating.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java index 50f27882..efdde4ad 100644 --- a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java +++ b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java @@ -5,6 +5,7 @@ package dev.plexapi.sdk; import dev.plexapi.sdk.hooks.SDKHooks; import dev.plexapi.sdk.utils.AsyncHooks; +import dev.plexapi.sdk.utils.Globals; import dev.plexapi.sdk.utils.HTTPClient; import dev.plexapi.sdk.utils.Hooks; import dev.plexapi.sdk.utils.RetryConfig; @@ -23,8 +24,8 @@ import java.util.concurrent.ScheduledExecutorService; public class SDKConfiguration { private static final String LANGUAGE = "java"; - public static final String OPENAPI_DOC_VERSION = "0.0.3"; - public static final String SDK_VERSION = "0.18.0"; + public static final String OPENAPI_DOC_VERSION = "1.1.1"; + public static final String SDK_VERSION = "0.19.1"; public static final String GEN_VERSION = "2.698.4"; private static final String BASE_PACKAGE = "dev.plexapi.sdk"; public static final String USER_AGENT = @@ -91,10 +92,18 @@ public class SDKConfiguration { @SuppressWarnings("serial") private List> serverVariables = new ArrayList<>(){ { add(new HashMap<>(){ { - put("protocol", "https"); - put("ip", "10.10.10.47"); + put("identifier", "0123456789abcdef0123456789abcdef"); + put("IP-description", "1-2-3-4"); put("port", "32400"); } }); + add(new HashMap<>(){ { + put("protocol", "http"); + put("host", "localhost"); + put("port", "32400"); + } }); + add(new HashMap<>(){ { + put("server_url", "http://localhost:32400"); + } }); } }; public List> serverVariables() { @@ -124,7 +133,8 @@ public class SDKConfiguration { SDKHooks.initialize(_asyncHooks); } - + @SuppressWarnings("serial") + public Globals globals = new Globals(); public Map getServerVariableDefaults() { return serverVariables.get(this.serverIdx); diff --git a/src/main/java/dev/plexapi/sdk/Search.java b/src/main/java/dev/plexapi/sdk/Search.java index 97f7b80c..d09ac420 100644 --- a/src/main/java/dev/plexapi/sdk/Search.java +++ b/src/main/java/dev/plexapi/sdk/Search.java @@ -5,25 +5,18 @@ package dev.plexapi.sdk; import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import dev.plexapi.sdk.models.operations.GetSearchResultsRequest; -import dev.plexapi.sdk.models.operations.GetSearchResultsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetSearchResultsResponse; -import dev.plexapi.sdk.models.operations.PerformSearchRequest; -import dev.plexapi.sdk.models.operations.PerformSearchRequestBuilder; -import dev.plexapi.sdk.models.operations.PerformSearchResponse; -import dev.plexapi.sdk.models.operations.PerformVoiceSearchRequest; -import dev.plexapi.sdk.models.operations.PerformVoiceSearchRequestBuilder; -import dev.plexapi.sdk.models.operations.PerformVoiceSearchResponse; -import dev.plexapi.sdk.operations.GetSearchResults; -import dev.plexapi.sdk.operations.PerformSearch; -import dev.plexapi.sdk.operations.PerformVoiceSearch; -import java.lang.Double; +import dev.plexapi.sdk.models.operations.SearchHubsRequest; +import dev.plexapi.sdk.models.operations.SearchHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.SearchHubsResponse; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsRequest; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsRequestBuilder; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsResponse; +import dev.plexapi.sdk.operations.SearchHubs; +import dev.plexapi.sdk.operations.VoiceSearchHubs; import java.lang.Exception; -import java.lang.String; -import java.util.Optional; /** - * API Calls that perform search operations with Plex Media Server + * The search feature within a media provider */ public class Search { private final SDKConfiguration sdkConfiguration; @@ -44,7 +37,9 @@ public class Search { } /** - * Perform a search + * Search Hub + * + *

Perform a search and get the result as hubs * *

This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). * @@ -61,12 +56,14 @@ public class Search { * * @return The call builder */ - public PerformSearchRequestBuilder performSearch() { - return new PerformSearchRequestBuilder(sdkConfiguration); + public SearchHubsRequestBuilder searchHubs() { + return new SearchHubsRequestBuilder(sdkConfiguration); } /** - * Perform a search + * Search Hub + * + *

Perform a search and get the result as hubs * *

This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). * @@ -81,138 +78,47 @@ public class Search { * *

This request is intended to be very fast, and called as the user types. * - * @param query The query term + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public PerformSearchResponse performSearch(String query) throws Exception { - return performSearch(query, Optional.empty(), Optional.empty()); - } - - /** - * Perform a search - * - *

This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). - * - *

In the response's items, the following extra attributes are returned to further describe or disambiguate the result: - * - *

- `reason`: The reason for the result, if not because of a direct search term match; can be either: - * - `section`: There are multiple identical results from different sections. - * - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). - * - `<hub identifier>`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor` - * - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold"). - * - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. - * - *

This request is intended to be very fast, and called as the user types. - * - * @param query The query term - * @param sectionId This gives context to the search, and can result in re-ordering of search result hubs - * @param limit The number of items to return per hub - * @return The response from the API call - * @throws Exception if the API call fails - */ - public PerformSearchResponse performSearch( - String query, Optional sectionId, - Optional limit) throws Exception { - PerformSearchRequest request = - PerformSearchRequest - .builder() - .query(query) - .sectionId(sectionId) - .limit(limit) - .build(); - RequestOperation operation - = new PerformSearch.Sync(sdkConfiguration); + public SearchHubsResponse searchHubs(SearchHubsRequest request) throws Exception { + RequestOperation operation + = new SearchHubs.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } /** - * Perform a voice search + * Voice Search Hub * - *

This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. - * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. - * Whenever possible, clients should limit the search to the appropriate type. - * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + *

Perform a search tailored to voice input and get the result as hubs + * + *

This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type. + * + *

Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. * * @return The call builder */ - public PerformVoiceSearchRequestBuilder performVoiceSearch() { - return new PerformVoiceSearchRequestBuilder(sdkConfiguration); + public VoiceSearchHubsRequestBuilder voiceSearchHubs() { + return new VoiceSearchHubsRequestBuilder(sdkConfiguration); } /** - * Perform a voice search + * Voice Search Hub * - *

This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. - * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. - * Whenever possible, clients should limit the search to the appropriate type. - * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + *

Perform a search tailored to voice input and get the result as hubs * - * @param query The query term + *

This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type. + * + *

Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + * + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public PerformVoiceSearchResponse performVoiceSearch(String query) throws Exception { - return performVoiceSearch(query, Optional.empty(), Optional.empty()); - } - - /** - * Perform a voice search - * - *

This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. - * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. - * Whenever possible, clients should limit the search to the appropriate type. - * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. - * - * @param query The query term - * @param sectionId This gives context to the search, and can result in re-ordering of search result hubs - * @param limit The number of items to return per hub - * @return The response from the API call - * @throws Exception if the API call fails - */ - public PerformVoiceSearchResponse performVoiceSearch( - String query, Optional sectionId, - Optional limit) throws Exception { - PerformVoiceSearchRequest request = - PerformVoiceSearchRequest - .builder() - .query(query) - .sectionId(sectionId) - .limit(limit) - .build(); - RequestOperation operation - = new PerformVoiceSearch.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Search Results - * - *

This will search the database for the string provided. - * - * @return The call builder - */ - public GetSearchResultsRequestBuilder getSearchResults() { - return new GetSearchResultsRequestBuilder(sdkConfiguration); - } - - /** - * Get Search Results - * - *

This will search the database for the string provided. - * - * @param query The search query string to use - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetSearchResultsResponse getSearchResults(String query) throws Exception { - GetSearchResultsRequest request = - GetSearchResultsRequest - .builder() - .query(query) - .build(); - RequestOperation operation - = new GetSearchResults.Sync(sdkConfiguration); + public VoiceSearchHubsResponse voiceSearchHubs(VoiceSearchHubsRequest request) throws Exception { + RequestOperation operation + = new VoiceSearchHubs.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/Server.java b/src/main/java/dev/plexapi/sdk/Server.java deleted file mode 100644 index 27772da6..00000000 --- a/src/main/java/dev/plexapi/sdk/Server.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.models.operations.GetAvailableClientsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse; -import dev.plexapi.sdk.models.operations.GetDevicesRequestBuilder; -import dev.plexapi.sdk.models.operations.GetDevicesResponse; -import dev.plexapi.sdk.models.operations.GetMediaProvidersRequest; -import dev.plexapi.sdk.models.operations.GetMediaProvidersRequestBuilder; -import dev.plexapi.sdk.models.operations.GetMediaProvidersResponse; -import dev.plexapi.sdk.models.operations.GetMyPlexAccountRequestBuilder; -import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponse; -import dev.plexapi.sdk.models.operations.GetResizedPhotoRequest; -import dev.plexapi.sdk.models.operations.GetResizedPhotoRequestBuilder; -import dev.plexapi.sdk.models.operations.GetResizedPhotoResponse; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesRequestBuilder; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; -import dev.plexapi.sdk.models.operations.GetServerIdentityRequestBuilder; -import dev.plexapi.sdk.models.operations.GetServerIdentityResponse; -import dev.plexapi.sdk.models.operations.GetServerListRequestBuilder; -import dev.plexapi.sdk.models.operations.GetServerListResponse; -import dev.plexapi.sdk.models.operations.GetServerPreferencesRequestBuilder; -import dev.plexapi.sdk.models.operations.GetServerPreferencesResponse; -import dev.plexapi.sdk.operations.GetAvailableClients; -import dev.plexapi.sdk.operations.GetDevices; -import dev.plexapi.sdk.operations.GetMediaProviders; -import dev.plexapi.sdk.operations.GetMyPlexAccount; -import dev.plexapi.sdk.operations.GetResizedPhoto; -import dev.plexapi.sdk.operations.GetServerCapabilities; -import dev.plexapi.sdk.operations.GetServerIdentity; -import dev.plexapi.sdk.operations.GetServerList; -import dev.plexapi.sdk.operations.GetServerPreferences; -import java.lang.Exception; -import java.lang.String; - -/** - * Operations against the Plex Media Server System. - */ -public class Server { - private final SDKConfiguration sdkConfiguration; - private final AsyncServer asyncSDK; - - Server(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.asyncSDK = new AsyncServer(this, sdkConfiguration); - } - - /** - * Switches to the async SDK. - * - * @return The async SDK - */ - public AsyncServer async() { - return asyncSDK; - } - - /** - * Get Server Capabilities - * - *

Get Server Capabilities - * - * @return The call builder - */ - public GetServerCapabilitiesRequestBuilder getServerCapabilities() { - return new GetServerCapabilitiesRequestBuilder(sdkConfiguration); - } - - /** - * Get Server Capabilities - * - *

Get Server Capabilities - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetServerCapabilitiesResponse getServerCapabilitiesDirect() throws Exception { - RequestlessOperation operation - = new GetServerCapabilities.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get Server Preferences - * - *

Get Server Preferences - * - * @return The call builder - */ - public GetServerPreferencesRequestBuilder getServerPreferences() { - return new GetServerPreferencesRequestBuilder(sdkConfiguration); - } - - /** - * Get Server Preferences - * - *

Get Server Preferences - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetServerPreferencesResponse getServerPreferencesDirect() throws Exception { - RequestlessOperation operation - = new GetServerPreferences.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get Available Clients - * - *

Get Available Clients - * - * @return The call builder - */ - public GetAvailableClientsRequestBuilder getAvailableClients() { - return new GetAvailableClientsRequestBuilder(sdkConfiguration); - } - - /** - * Get Available Clients - * - *

Get Available Clients - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetAvailableClientsResponse getAvailableClientsDirect() throws Exception { - RequestlessOperation operation - = new GetAvailableClients.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get Devices - * - *

Get Devices - * - * @return The call builder - */ - public GetDevicesRequestBuilder getDevices() { - return new GetDevicesRequestBuilder(sdkConfiguration); - } - - /** - * Get Devices - * - *

Get Devices - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetDevicesResponse getDevicesDirect() throws Exception { - RequestlessOperation operation - = new GetDevices.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get Server Identity - * - *

This request is useful to determine if the server is online or offline - * - * @return The call builder - */ - public GetServerIdentityRequestBuilder getServerIdentity() { - return new GetServerIdentityRequestBuilder(sdkConfiguration); - } - - /** - * Get Server Identity - * - *

This request is useful to determine if the server is online or offline - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetServerIdentityResponse getServerIdentityDirect() throws Exception { - RequestlessOperation operation - = new GetServerIdentity.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get MyPlex Account - * - *

Returns MyPlex Account Information - * - * @return The call builder - */ - public GetMyPlexAccountRequestBuilder getMyPlexAccount() { - return new GetMyPlexAccountRequestBuilder(sdkConfiguration); - } - - /** - * Get MyPlex Account - * - *

Returns MyPlex Account Information - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetMyPlexAccountResponse getMyPlexAccountDirect() throws Exception { - RequestlessOperation operation - = new GetMyPlexAccount.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get a Resized Photo - * - *

Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - * - * @return The call builder - */ - public GetResizedPhotoRequestBuilder getResizedPhoto() { - return new GetResizedPhotoRequestBuilder(sdkConfiguration); - } - - /** - * Get a Resized Photo - * - *

Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetResizedPhotoResponse getResizedPhoto(GetResizedPhotoRequest request) throws Exception { - RequestOperation operation - = new GetResizedPhoto.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Media Providers - * - *

Retrieves media providers and their features from the Plex server. - * - * @return The call builder - */ - public GetMediaProvidersRequestBuilder getMediaProviders() { - return new GetMediaProvidersRequestBuilder(sdkConfiguration); - } - - /** - * Get Media Providers - * - *

Retrieves media providers and their features from the Plex server. - * - * @param xPlexToken An authentication token, obtained from plex.tv - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetMediaProvidersResponse getMediaProviders(String xPlexToken) throws Exception { - GetMediaProvidersRequest request = - GetMediaProvidersRequest - .builder() - .xPlexToken(xPlexToken) - .build(); - RequestOperation operation - = new GetMediaProviders.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Server List - * - *

Get Server List - * - * @return The call builder - */ - public GetServerListRequestBuilder getServerList() { - return new GetServerListRequestBuilder(sdkConfiguration); - } - - /** - * Get Server List - * - *

Get Server List - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetServerListResponse getServerListDirect() throws Exception { - RequestlessOperation operation - = new GetServerList.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/Sessions.java b/src/main/java/dev/plexapi/sdk/Sessions.java deleted file mode 100644 index a536e30a..00000000 --- a/src/main/java/dev/plexapi/sdk/Sessions.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.models.operations.GetSessionHistoryRequest; -import dev.plexapi.sdk.models.operations.GetSessionHistoryRequestBuilder; -import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse; -import dev.plexapi.sdk.models.operations.GetSessionsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetSessionsResponse; -import dev.plexapi.sdk.models.operations.GetTranscodeSessionsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponse; -import dev.plexapi.sdk.models.operations.QueryParamFilter; -import dev.plexapi.sdk.models.operations.StopTranscodeSessionRequest; -import dev.plexapi.sdk.models.operations.StopTranscodeSessionRequestBuilder; -import dev.plexapi.sdk.models.operations.StopTranscodeSessionResponse; -import dev.plexapi.sdk.operations.GetSessionHistory; -import dev.plexapi.sdk.operations.GetSessions; -import dev.plexapi.sdk.operations.GetTranscodeSessions; -import dev.plexapi.sdk.operations.StopTranscodeSession; -import java.lang.Exception; -import java.lang.Long; -import java.lang.String; -import java.util.Optional; - -/** - * API Calls that perform search operations with Plex Media Server Sessions - */ -public class Sessions { - private final SDKConfiguration sdkConfiguration; - private final AsyncSessions asyncSDK; - - Sessions(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.asyncSDK = new AsyncSessions(this, sdkConfiguration); - } - - /** - * Switches to the async SDK. - * - * @return The async SDK - */ - public AsyncSessions async() { - return asyncSDK; - } - - /** - * Get Active Sessions - * - *

This will retrieve the "Now Playing" Information of the PMS. - * - * @return The call builder - */ - public GetSessionsRequestBuilder getSessions() { - return new GetSessionsRequestBuilder(sdkConfiguration); - } - - /** - * Get Active Sessions - * - *

This will retrieve the "Now Playing" Information of the PMS. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetSessionsResponse getSessionsDirect() throws Exception { - RequestlessOperation operation - = new GetSessions.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Get Session History - * - *

This will Retrieve a listing of all history views. - * - * @return The call builder - */ - public GetSessionHistoryRequestBuilder getSessionHistory() { - return new GetSessionHistoryRequestBuilder(sdkConfiguration); - } - - /** - * Get Session History - * - *

This will Retrieve a listing of all history views. - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetSessionHistoryResponse getSessionHistoryDirect() throws Exception { - return getSessionHistory(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Get Session History - * - *

This will Retrieve a listing of all history views. - * - * @param sort Sorts the results by the specified field followed by the direction (asc, desc) - * - * @param accountId Filter results by those that are related to a specific users id - * - * @param filter Filters content by field and direction/equality - * (Unknown if viewedAt is the only supported column) - * - * @param librarySectionID Filters the results based on the id of a valid library section - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetSessionHistoryResponse getSessionHistory( - Optional sort, Optional accountId, - Optional filter, Optional librarySectionID) throws Exception { - GetSessionHistoryRequest request = - GetSessionHistoryRequest - .builder() - .sort(sort) - .accountId(accountId) - .filter(filter) - .librarySectionID(librarySectionID) - .build(); - RequestOperation operation - = new GetSessionHistory.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Transcode Sessions - * - *

Get Transcode Sessions - * - * @return The call builder - */ - public GetTranscodeSessionsRequestBuilder getTranscodeSessions() { - return new GetTranscodeSessionsRequestBuilder(sdkConfiguration); - } - - /** - * Get Transcode Sessions - * - *

Get Transcode Sessions - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetTranscodeSessionsResponse getTranscodeSessionsDirect() throws Exception { - RequestlessOperation operation - = new GetTranscodeSessions.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Stop a Transcode Session - * - *

Stop a Transcode Session - * - * @return The call builder - */ - public StopTranscodeSessionRequestBuilder stopTranscodeSession() { - return new StopTranscodeSessionRequestBuilder(sdkConfiguration); - } - - /** - * Stop a Transcode Session - * - *

Stop a Transcode Session - * - * @param sessionKey the Key of the transcode session to stop - * @return The response from the API call - * @throws Exception if the API call fails - */ - public StopTranscodeSessionResponse stopTranscodeSession(String sessionKey) throws Exception { - StopTranscodeSessionRequest request = - StopTranscodeSessionRequest - .builder() - .sessionKey(sessionKey) - .build(); - RequestOperation operation - = new StopTranscodeSession.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/Statistics.java b/src/main/java/dev/plexapi/sdk/Statistics.java deleted file mode 100644 index 521b1d8c..00000000 --- a/src/main/java/dev/plexapi/sdk/Statistics.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsRequest; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponse; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsRequest; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponse; -import dev.plexapi.sdk.models.operations.GetStatisticsRequest; -import dev.plexapi.sdk.models.operations.GetStatisticsRequestBuilder; -import dev.plexapi.sdk.models.operations.GetStatisticsResponse; -import dev.plexapi.sdk.operations.GetBandwidthStatistics; -import dev.plexapi.sdk.operations.GetResourcesStatistics; -import dev.plexapi.sdk.operations.GetStatistics; -import java.lang.Exception; -import java.lang.Long; -import java.util.Optional; - -/** - * API Calls that perform operations with Plex Media Server Statistics - */ -public class Statistics { - private final SDKConfiguration sdkConfiguration; - private final AsyncStatistics asyncSDK; - - Statistics(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.asyncSDK = new AsyncStatistics(this, sdkConfiguration); - } - - /** - * Switches to the async SDK. - * - * @return The async SDK - */ - public AsyncStatistics async() { - return asyncSDK; - } - - /** - * Get Media Statistics - * - *

This will return the media statistics for the server - * - * @return The call builder - */ - public GetStatisticsRequestBuilder getStatistics() { - return new GetStatisticsRequestBuilder(sdkConfiguration); - } - - /** - * Get Media Statistics - * - *

This will return the media statistics for the server - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetStatisticsResponse getStatisticsDirect() throws Exception { - return getStatistics(Optional.empty()); - } - - /** - * Get Media Statistics - * - *

This will return the media statistics for the server - * - * @param timespan The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetStatisticsResponse getStatistics(Optional timespan) throws Exception { - GetStatisticsRequest request = - GetStatisticsRequest - .builder() - .timespan(timespan) - .build(); - RequestOperation operation - = new GetStatistics.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Resources Statistics - * - *

This will return the resources for the server - * - * @return The call builder - */ - public GetResourcesStatisticsRequestBuilder getResourcesStatistics() { - return new GetResourcesStatisticsRequestBuilder(sdkConfiguration); - } - - /** - * Get Resources Statistics - * - *

This will return the resources for the server - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetResourcesStatisticsResponse getResourcesStatisticsDirect() throws Exception { - return getResourcesStatistics(Optional.empty()); - } - - /** - * Get Resources Statistics - * - *

This will return the resources for the server - * - * @param timespan The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetResourcesStatisticsResponse getResourcesStatistics(Optional timespan) throws Exception { - GetResourcesStatisticsRequest request = - GetResourcesStatisticsRequest - .builder() - .timespan(timespan) - .build(); - RequestOperation operation - = new GetResourcesStatistics.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Get Bandwidth Statistics - * - *

This will return the bandwidth statistics for the server - * - * @return The call builder - */ - public GetBandwidthStatisticsRequestBuilder getBandwidthStatistics() { - return new GetBandwidthStatisticsRequestBuilder(sdkConfiguration); - } - - /** - * Get Bandwidth Statistics - * - *

This will return the bandwidth statistics for the server - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetBandwidthStatisticsResponse getBandwidthStatisticsDirect() throws Exception { - return getBandwidthStatistics(Optional.empty()); - } - - /** - * Get Bandwidth Statistics - * - *

This will return the bandwidth statistics for the server - * - * @param timespan The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetBandwidthStatisticsResponse getBandwidthStatistics(Optional timespan) throws Exception { - GetBandwidthStatisticsRequest request = - GetBandwidthStatisticsRequest - .builder() - .timespan(timespan) - .build(); - RequestOperation operation - = new GetBandwidthStatistics.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/Status.java b/src/main/java/dev/plexapi/sdk/Status.java new file mode 100644 index 00000000..7f27c5e4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Status.java @@ -0,0 +1,210 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.DeleteHistoryRequest; +import dev.plexapi.sdk.models.operations.DeleteHistoryRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteHistoryResponse; +import dev.plexapi.sdk.models.operations.GetBackgroundTasksRequestBuilder; +import dev.plexapi.sdk.models.operations.GetBackgroundTasksResponse; +import dev.plexapi.sdk.models.operations.GetHistoryItemRequest; +import dev.plexapi.sdk.models.operations.GetHistoryItemRequestBuilder; +import dev.plexapi.sdk.models.operations.GetHistoryItemResponse; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryRequest; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryRequestBuilder; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryResponse; +import dev.plexapi.sdk.models.operations.ListSessionsRequestBuilder; +import dev.plexapi.sdk.models.operations.ListSessionsResponse; +import dev.plexapi.sdk.models.operations.TerminateSessionRequest; +import dev.plexapi.sdk.models.operations.TerminateSessionRequestBuilder; +import dev.plexapi.sdk.models.operations.TerminateSessionResponse; +import dev.plexapi.sdk.operations.DeleteHistory; +import dev.plexapi.sdk.operations.GetBackgroundTasks; +import dev.plexapi.sdk.operations.GetHistoryItem; +import dev.plexapi.sdk.operations.ListPlaybackHistory; +import dev.plexapi.sdk.operations.ListSessions; +import dev.plexapi.sdk.operations.TerminateSession; +import java.lang.Exception; + +/** + * The status endpoints give you information about current playbacks, play history, and even terminating sessions. + */ +public class Status { + private final SDKConfiguration sdkConfiguration; + private final AsyncStatus asyncSDK; + + Status(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncStatus(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncStatus async() { + return asyncSDK; + } + + /** + * List Sessions + * + *

List all current playbacks on this server + * + * @return The call builder + */ + public ListSessionsRequestBuilder listSessions() { + return new ListSessionsRequestBuilder(sdkConfiguration); + } + + /** + * List Sessions + * + *

List all current playbacks on this server + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListSessionsResponse listSessionsDirect() throws Exception { + RequestlessOperation operation + = new ListSessions.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Get background tasks + * + *

Get the list of all background tasks + * + * @return The call builder + */ + public GetBackgroundTasksRequestBuilder getBackgroundTasks() { + return new GetBackgroundTasksRequestBuilder(sdkConfiguration); + } + + /** + * Get background tasks + * + *

Get the list of all background tasks + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetBackgroundTasksResponse getBackgroundTasksDirect() throws Exception { + RequestlessOperation operation + = new GetBackgroundTasks.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * List Playback History + * + *

List all playback history (Admin can see all users, others can only see their own). + * Pagination should be used on this endpoint. Additionally this endpoint supports `includeFields`, `excludeFields`, `includeElements`, and `excludeElements` parameters. + * + * @return The call builder + */ + public ListPlaybackHistoryRequestBuilder listPlaybackHistory() { + return new ListPlaybackHistoryRequestBuilder(sdkConfiguration); + } + + /** + * List Playback History + * + *

List all playback history (Admin can see all users, others can only see their own). + * Pagination should be used on this endpoint. Additionally this endpoint supports `includeFields`, `excludeFields`, `includeElements`, and `excludeElements` parameters. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListPlaybackHistoryResponse listPlaybackHistory(ListPlaybackHistoryRequest request) throws Exception { + RequestOperation operation + = new ListPlaybackHistory.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Terminate a session + * + *

Terminate a playback session kicking off the user + * + * @return The call builder + */ + public TerminateSessionRequestBuilder terminateSession() { + return new TerminateSessionRequestBuilder(sdkConfiguration); + } + + /** + * Terminate a session + * + *

Terminate a playback session kicking off the user + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public TerminateSessionResponse terminateSession(TerminateSessionRequest request) throws Exception { + RequestOperation operation + = new TerminateSession.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete Single History Item + * + *

Delete a single history item by id + * + * @return The call builder + */ + public DeleteHistoryRequestBuilder deleteHistory() { + return new DeleteHistoryRequestBuilder(sdkConfiguration); + } + + /** + * Delete Single History Item + * + *

Delete a single history item by id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteHistoryResponse deleteHistory(DeleteHistoryRequest request) throws Exception { + RequestOperation operation + = new DeleteHistory.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get Single History Item + * + *

Get a single history item by id + * + * @return The call builder + */ + public GetHistoryItemRequestBuilder getHistoryItem() { + return new GetHistoryItemRequestBuilder(sdkConfiguration); + } + + /** + * Get Single History Item + * + *

Get a single history item by id + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetHistoryItemResponse getHistoryItem(GetHistoryItemRequest request) throws Exception { + RequestOperation operation + = new GetHistoryItem.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Subscriptions.java b/src/main/java/dev/plexapi/sdk/Subscriptions.java new file mode 100644 index 00000000..cb776cca --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Subscriptions.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.models.operations.CancelGrabRequest; +import dev.plexapi.sdk.models.operations.CancelGrabRequestBuilder; +import dev.plexapi.sdk.models.operations.CancelGrabResponse; +import dev.plexapi.sdk.models.operations.CreateSubscriptionRequest; +import dev.plexapi.sdk.models.operations.CreateSubscriptionRequestBuilder; +import dev.plexapi.sdk.models.operations.CreateSubscriptionResponse; +import dev.plexapi.sdk.models.operations.DeleteSubscriptionRequest; +import dev.plexapi.sdk.models.operations.DeleteSubscriptionRequestBuilder; +import dev.plexapi.sdk.models.operations.DeleteSubscriptionResponse; +import dev.plexapi.sdk.models.operations.EditSubscriptionPreferencesRequest; +import dev.plexapi.sdk.models.operations.EditSubscriptionPreferencesRequestBuilder; +import dev.plexapi.sdk.models.operations.EditSubscriptionPreferencesResponse; +import dev.plexapi.sdk.models.operations.GetAllSubscriptionsRequest; +import dev.plexapi.sdk.models.operations.GetAllSubscriptionsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetAllSubscriptionsResponse; +import dev.plexapi.sdk.models.operations.GetScheduledRecordingsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetScheduledRecordingsResponse; +import dev.plexapi.sdk.models.operations.GetSubscriptionRequest; +import dev.plexapi.sdk.models.operations.GetSubscriptionRequestBuilder; +import dev.plexapi.sdk.models.operations.GetSubscriptionResponse; +import dev.plexapi.sdk.models.operations.GetTemplateRequest; +import dev.plexapi.sdk.models.operations.GetTemplateRequestBuilder; +import dev.plexapi.sdk.models.operations.GetTemplateResponse; +import dev.plexapi.sdk.models.operations.ProcessSubscriptionsRequestBuilder; +import dev.plexapi.sdk.models.operations.ProcessSubscriptionsResponse; +import dev.plexapi.sdk.models.operations.ReorderSubscriptionRequest; +import dev.plexapi.sdk.models.operations.ReorderSubscriptionRequestBuilder; +import dev.plexapi.sdk.models.operations.ReorderSubscriptionResponse; +import dev.plexapi.sdk.operations.CancelGrab; +import dev.plexapi.sdk.operations.CreateSubscription; +import dev.plexapi.sdk.operations.DeleteSubscription; +import dev.plexapi.sdk.operations.EditSubscriptionPreferences; +import dev.plexapi.sdk.operations.GetAllSubscriptions; +import dev.plexapi.sdk.operations.GetScheduledRecordings; +import dev.plexapi.sdk.operations.GetSubscription; +import dev.plexapi.sdk.operations.GetTemplate; +import dev.plexapi.sdk.operations.ProcessSubscriptions; +import dev.plexapi.sdk.operations.ReorderSubscription; +import java.lang.Exception; + +/** + * Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available + */ +public class Subscriptions { + private final SDKConfiguration sdkConfiguration; + private final AsyncSubscriptions asyncSDK; + + Subscriptions(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncSubscriptions(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncSubscriptions async() { + return asyncSDK; + } + + /** + * Get all subscriptions + * + *

Get all subscriptions and potentially the grabs too + * + * @return The call builder + */ + public GetAllSubscriptionsRequestBuilder getAllSubscriptions() { + return new GetAllSubscriptionsRequestBuilder(sdkConfiguration); + } + + /** + * Get all subscriptions + * + *

Get all subscriptions and potentially the grabs too + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAllSubscriptionsResponse getAllSubscriptions(GetAllSubscriptionsRequest request) throws Exception { + RequestOperation operation + = new GetAllSubscriptions.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Create a subscription + * + *

Create a subscription. The query parameters should be mostly derived from the [template](#tag/Subscriptions/operation/mediaSubscriptionsGetTemplate) + * + * @return The call builder + */ + public CreateSubscriptionRequestBuilder createSubscription() { + return new CreateSubscriptionRequestBuilder(sdkConfiguration); + } + + /** + * Create a subscription + * + *

Create a subscription. The query parameters should be mostly derived from the [template](#tag/Subscriptions/operation/mediaSubscriptionsGetTemplate) + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateSubscriptionResponse createSubscription(CreateSubscriptionRequest request) throws Exception { + RequestOperation operation + = new CreateSubscription.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Process all subscriptions + * + *

Process all subscriptions asynchronously + * + * @return The call builder + */ + public ProcessSubscriptionsRequestBuilder processSubscriptions() { + return new ProcessSubscriptionsRequestBuilder(sdkConfiguration); + } + + /** + * Process all subscriptions + * + *

Process all subscriptions asynchronously + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ProcessSubscriptionsResponse processSubscriptionsDirect() throws Exception { + RequestlessOperation operation + = new ProcessSubscriptions.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Get all scheduled recordings + * + *

Get all scheduled recordings across all subscriptions + * + * @return The call builder + */ + public GetScheduledRecordingsRequestBuilder getScheduledRecordings() { + return new GetScheduledRecordingsRequestBuilder(sdkConfiguration); + } + + /** + * Get all scheduled recordings + * + *

Get all scheduled recordings across all subscriptions + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetScheduledRecordingsResponse getScheduledRecordingsDirect() throws Exception { + RequestlessOperation operation + = new GetScheduledRecordings.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Get the subscription template + * + *

Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc. + * + * @return The call builder + */ + public GetTemplateRequestBuilder getTemplate() { + return new GetTemplateRequestBuilder(sdkConfiguration); + } + + /** + * Get the subscription template + * + *

Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetTemplateResponse getTemplate(GetTemplateRequest request) throws Exception { + RequestOperation operation + = new GetTemplate.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Cancel an existing grab + * + *

Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription. + * Note: This cancellation does not persist across a server restart, but neither does a rolling subscription itself. + * + * @return The call builder + */ + public CancelGrabRequestBuilder cancelGrab() { + return new CancelGrabRequestBuilder(sdkConfiguration); + } + + /** + * Cancel an existing grab + * + *

Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription. + * Note: This cancellation does not persist across a server restart, but neither does a rolling subscription itself. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CancelGrabResponse cancelGrab(CancelGrabRequest request) throws Exception { + RequestOperation operation + = new CancelGrab.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a subscription + * + *

Delete a subscription, cancelling all of its grabs as well + * + * @return The call builder + */ + public DeleteSubscriptionRequestBuilder deleteSubscription() { + return new DeleteSubscriptionRequestBuilder(sdkConfiguration); + } + + /** + * Delete a subscription + * + *

Delete a subscription, cancelling all of its grabs as well + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteSubscriptionResponse deleteSubscription(DeleteSubscriptionRequest request) throws Exception { + RequestOperation operation + = new DeleteSubscription.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get a single subscription + * + *

Get a single subscription and potentially the grabs too + * + * @return The call builder + */ + public GetSubscriptionRequestBuilder getSubscription() { + return new GetSubscriptionRequestBuilder(sdkConfiguration); + } + + /** + * Get a single subscription + * + *

Get a single subscription and potentially the grabs too + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSubscriptionResponse getSubscription(GetSubscriptionRequest request) throws Exception { + RequestOperation operation + = new GetSubscription.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Edit a subscription + * + *

Edit a subscription's preferences + * + * @return The call builder + */ + public EditSubscriptionPreferencesRequestBuilder editSubscriptionPreferences() { + return new EditSubscriptionPreferencesRequestBuilder(sdkConfiguration); + } + + /** + * Edit a subscription + * + *

Edit a subscription's preferences + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public EditSubscriptionPreferencesResponse editSubscriptionPreferences(EditSubscriptionPreferencesRequest request) throws Exception { + RequestOperation operation + = new EditSubscriptionPreferences.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Re-order a subscription + * + *

Re-order a subscription to change its priority + * + * @return The call builder + */ + public ReorderSubscriptionRequestBuilder reorderSubscription() { + return new ReorderSubscriptionRequestBuilder(sdkConfiguration); + } + + /** + * Re-order a subscription + * + *

Re-order a subscription to change its priority + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ReorderSubscriptionResponse reorderSubscription(ReorderSubscriptionRequest request) throws Exception { + RequestOperation operation + = new ReorderSubscription.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Timeline.java b/src/main/java/dev/plexapi/sdk/Timeline.java new file mode 100644 index 00000000..66ae1acd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Timeline.java @@ -0,0 +1,125 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.MarkPlayedRequest; +import dev.plexapi.sdk.models.operations.MarkPlayedRequestBuilder; +import dev.plexapi.sdk.models.operations.MarkPlayedResponse; +import dev.plexapi.sdk.models.operations.ReportRequest; +import dev.plexapi.sdk.models.operations.ReportRequestBuilder; +import dev.plexapi.sdk.models.operations.ReportResponse; +import dev.plexapi.sdk.models.operations.UnscrobbleRequest; +import dev.plexapi.sdk.models.operations.UnscrobbleRequestBuilder; +import dev.plexapi.sdk.models.operations.UnscrobbleResponse; +import dev.plexapi.sdk.operations.MarkPlayed; +import dev.plexapi.sdk.operations.Report; +import dev.plexapi.sdk.operations.Unscrobble; +import java.lang.Exception; + +/** + * The actions feature within a media provider + */ +public class Timeline { + private final SDKConfiguration sdkConfiguration; + private final AsyncTimeline asyncSDK; + + Timeline(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncTimeline(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncTimeline async() { + return asyncSDK; + } + + /** + * Mark an item as played + * + *

Mark an item as played. Note, this does not create any view history of this item but rather just sets the state as played. The client must provide either the `key` or `uri` query parameter + * This API does respond to the GET verb but applications should use PUT + * + * @return The call builder + */ + public MarkPlayedRequestBuilder markPlayed() { + return new MarkPlayedRequestBuilder(sdkConfiguration); + } + + /** + * Mark an item as played + * + *

Mark an item as played. Note, this does not create any view history of this item but rather just sets the state as played. The client must provide either the `key` or `uri` query parameter + * This API does respond to the GET verb but applications should use PUT + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public MarkPlayedResponse markPlayed(MarkPlayedRequest request) throws Exception { + RequestOperation operation + = new MarkPlayed.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Report media timeline + * + *

This endpoint is hit during media playback for an item. It must be hit whenever the play state changes, or in the absence of a play state change, in a regular fashion (generally this means every 10 seconds on a LAN/WAN, and every 20 seconds over cellular). + * + * @return The call builder + */ + public ReportRequestBuilder report() { + return new ReportRequestBuilder(sdkConfiguration); + } + + /** + * Report media timeline + * + *

This endpoint is hit during media playback for an item. It must be hit whenever the play state changes, or in the absence of a play state change, in a regular fashion (generally this means every 10 seconds on a LAN/WAN, and every 20 seconds over cellular). + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ReportResponse report(ReportRequest request) throws Exception { + RequestOperation operation + = new Report.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Mark an item as unplayed + * + *

Mark an item as unplayed. The client must provide either the `key` or `uri` query parameter + * This API does respond to the GET verb but applications should use PUT + * + * @return The call builder + */ + public UnscrobbleRequestBuilder unscrobble() { + return new UnscrobbleRequestBuilder(sdkConfiguration); + } + + /** + * Mark an item as unplayed + * + *

Mark an item as unplayed. The client must provide either the `key` or `uri` query parameter + * This API does respond to the GET verb but applications should use PUT + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UnscrobbleResponse unscrobble(UnscrobbleRequest request) throws Exception { + RequestOperation operation + = new Unscrobble.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Transcoder.java b/src/main/java/dev/plexapi/sdk/Transcoder.java new file mode 100644 index 00000000..38710ada --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/Transcoder.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.MakeDecisionRequest; +import dev.plexapi.sdk.models.operations.MakeDecisionRequestBuilder; +import dev.plexapi.sdk.models.operations.MakeDecisionResponse; +import dev.plexapi.sdk.models.operations.StartTranscodeSessionRequest; +import dev.plexapi.sdk.models.operations.StartTranscodeSessionRequestBuilder; +import dev.plexapi.sdk.models.operations.StartTranscodeSessionResponse; +import dev.plexapi.sdk.models.operations.TranscodeImageRequest; +import dev.plexapi.sdk.models.operations.TranscodeImageRequestBuilder; +import dev.plexapi.sdk.models.operations.TranscodeImageResponse; +import dev.plexapi.sdk.models.operations.TranscodeSubtitlesRequest; +import dev.plexapi.sdk.models.operations.TranscodeSubtitlesRequestBuilder; +import dev.plexapi.sdk.models.operations.TranscodeSubtitlesResponse; +import dev.plexapi.sdk.models.operations.TriggerFallbackRequest; +import dev.plexapi.sdk.models.operations.TriggerFallbackRequestBuilder; +import dev.plexapi.sdk.models.operations.TriggerFallbackResponse; +import dev.plexapi.sdk.operations.MakeDecision; +import dev.plexapi.sdk.operations.StartTranscodeSession; +import dev.plexapi.sdk.operations.TranscodeImage; +import dev.plexapi.sdk.operations.TranscodeSubtitles; +import dev.plexapi.sdk.operations.TriggerFallback; +import java.lang.Exception; + +/** + * API Operations against the Transcoder + */ +public class Transcoder { + private final SDKConfiguration sdkConfiguration; + private final AsyncTranscoder asyncSDK; + + Transcoder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncTranscoder(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncTranscoder async() { + return asyncSDK; + } + + /** + * Transcode an image + * + *

Transcode an image, possibly changing format or size + * + * @return The call builder + */ + public TranscodeImageRequestBuilder transcodeImage() { + return new TranscodeImageRequestBuilder(sdkConfiguration); + } + + /** + * Transcode an image + * + *

Transcode an image, possibly changing format or size + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public TranscodeImageResponse transcodeImage(TranscodeImageRequest request) throws Exception { + RequestOperation operation + = new TranscodeImage.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Make a decision on media playback + * + *

Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution. + * + * @return The call builder + */ + public MakeDecisionRequestBuilder makeDecision() { + return new MakeDecisionRequestBuilder(sdkConfiguration); + } + + /** + * Make a decision on media playback + * + *

Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public MakeDecisionResponse makeDecision(MakeDecisionRequest request) throws Exception { + RequestOperation operation + = new MakeDecision.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Manually trigger a transcoder fallback + * + *

Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw + * + * @return The call builder + */ + public TriggerFallbackRequestBuilder triggerFallback() { + return new TriggerFallbackRequestBuilder(sdkConfiguration); + } + + /** + * Manually trigger a transcoder fallback + * + *

Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public TriggerFallbackResponse triggerFallback(TriggerFallbackRequest request) throws Exception { + RequestOperation operation + = new TriggerFallback.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Transcode subtitles + * + *

Only transcode subtitle streams. + * + * @return The call builder + */ + public TranscodeSubtitlesRequestBuilder transcodeSubtitles() { + return new TranscodeSubtitlesRequestBuilder(sdkConfiguration); + } + + /** + * Transcode subtitles + * + *

Only transcode subtitle streams. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public TranscodeSubtitlesResponse transcodeSubtitles(TranscodeSubtitlesRequest request) throws Exception { + RequestOperation operation + = new TranscodeSubtitles.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Start A Transcoding Session + * + *

Starts the transcoder and returns the corresponding streaming resource document. + * + * @return The call builder + */ + public StartTranscodeSessionRequestBuilder startTranscodeSession() { + return new StartTranscodeSessionRequestBuilder(sdkConfiguration); + } + + /** + * Start A Transcoding Session + * + *

Starts the transcoder and returns the corresponding streaming resource document. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public StartTranscodeSessionResponse startTranscodeSession(StartTranscodeSessionRequest request) throws Exception { + RequestOperation operation + = new StartTranscodeSession.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/UltraBlur.java b/src/main/java/dev/plexapi/sdk/UltraBlur.java new file mode 100644 index 00000000..f71ca044 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/UltraBlur.java @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.models.operations.GetColorsRequest; +import dev.plexapi.sdk.models.operations.GetColorsRequestBuilder; +import dev.plexapi.sdk.models.operations.GetColorsResponse; +import dev.plexapi.sdk.models.operations.GetImageRequest; +import dev.plexapi.sdk.models.operations.GetImageRequestBuilder; +import dev.plexapi.sdk.models.operations.GetImageResponse; +import dev.plexapi.sdk.operations.GetColors; +import dev.plexapi.sdk.operations.GetImage; +import java.lang.Exception; + +/** + * Service provided to compute UltraBlur colors and images. + */ +public class UltraBlur { + private final SDKConfiguration sdkConfiguration; + private final AsyncUltraBlur asyncSDK; + + UltraBlur(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncUltraBlur(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncUltraBlur async() { + return asyncSDK; + } + + /** + * Get UltraBlur Colors + * + *

Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image. + * + * @return The call builder + */ + public GetColorsRequestBuilder getColors() { + return new GetColorsRequestBuilder(sdkConfiguration); + } + + /** + * Get UltraBlur Colors + * + *

Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetColorsResponse getColors(GetColorsRequest request) throws Exception { + RequestOperation operation + = new GetColors.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get UltraBlur Image + * + *

Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint. + * + * @return The call builder + */ + public GetImageRequestBuilder getImage() { + return new GetImageRequestBuilder(sdkConfiguration); + } + + /** + * Get UltraBlur Image + * + *

Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetImageResponse getImage(GetImageRequest request) throws Exception { + RequestOperation operation + = new GetImage.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/dev/plexapi/sdk/Updater.java b/src/main/java/dev/plexapi/sdk/Updater.java index 4f7c6b0c..b9d6fe2c 100644 --- a/src/main/java/dev/plexapi/sdk/Updater.java +++ b/src/main/java/dev/plexapi/sdk/Updater.java @@ -3,25 +3,21 @@ */ package dev.plexapi.sdk; -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; import dev.plexapi.sdk.models.operations.ApplyUpdatesRequest; import dev.plexapi.sdk.models.operations.ApplyUpdatesRequestBuilder; import dev.plexapi.sdk.models.operations.ApplyUpdatesResponse; -import dev.plexapi.sdk.models.operations.CheckForUpdatesRequest; -import dev.plexapi.sdk.models.operations.CheckForUpdatesRequestBuilder; -import dev.plexapi.sdk.models.operations.CheckForUpdatesResponse; -import dev.plexapi.sdk.models.operations.Download; -import dev.plexapi.sdk.models.operations.GetUpdateStatusRequestBuilder; -import dev.plexapi.sdk.models.operations.GetUpdateStatusResponse; -import dev.plexapi.sdk.models.operations.Skip; -import dev.plexapi.sdk.models.operations.Tonight; +import dev.plexapi.sdk.models.operations.CheckUpdatesRequest; +import dev.plexapi.sdk.models.operations.CheckUpdatesRequestBuilder; +import dev.plexapi.sdk.models.operations.CheckUpdatesResponse; +import dev.plexapi.sdk.models.operations.GetUpdatesStatusRequestBuilder; +import dev.plexapi.sdk.models.operations.GetUpdatesStatusResponse; import dev.plexapi.sdk.operations.ApplyUpdates; -import dev.plexapi.sdk.operations.CheckForUpdates; -import dev.plexapi.sdk.operations.GetUpdateStatus; +import dev.plexapi.sdk.operations.CheckUpdates; +import dev.plexapi.sdk.operations.GetUpdatesStatus; import java.lang.Exception; -import java.util.Optional; /** * This describes the API for searching and applying updates to the Plex Media Server. @@ -46,77 +42,9 @@ public class Updater { } /** - * Querying status of updates + * Applying updates * - *

Querying status of updates - * - * @return The call builder - */ - public GetUpdateStatusRequestBuilder getUpdateStatus() { - return new GetUpdateStatusRequestBuilder(sdkConfiguration); - } - - /** - * Querying status of updates - * - *

Querying status of updates - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetUpdateStatusResponse getUpdateStatusDirect() throws Exception { - RequestlessOperation operation - = new GetUpdateStatus.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest()); - } - - /** - * Checking for updates - * - *

Checking for updates - * - * @return The call builder - */ - public CheckForUpdatesRequestBuilder checkForUpdates() { - return new CheckForUpdatesRequestBuilder(sdkConfiguration); - } - - /** - * Checking for updates - * - *

Checking for updates - * - * @return The response from the API call - * @throws Exception if the API call fails - */ - public CheckForUpdatesResponse checkForUpdatesDirect() throws Exception { - return checkForUpdates(Optional.empty()); - } - - /** - * Checking for updates - * - *

Checking for updates - * - * @param download Indicate that you want to start download any updates found. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public CheckForUpdatesResponse checkForUpdates(Optional download) throws Exception { - CheckForUpdatesRequest request = - CheckForUpdatesRequest - .builder() - .download(download) - .build(); - RequestOperation operation - = new CheckForUpdates.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Apply Updates - * - *

Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed + *

Apply any downloaded updates. Note that the two parameters `tonight` and `skip` are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed. * * @return The call builder */ @@ -125,37 +53,69 @@ public class Updater { } /** - * Apply Updates + * Applying updates * - *

Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed + *

Apply any downloaded updates. Note that the two parameters `tonight` and `skip` are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed. * + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public ApplyUpdatesResponse applyUpdatesDirect() throws Exception { - return applyUpdates(Optional.empty(), Optional.empty()); - } - - /** - * Apply Updates - * - *

Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed - * - * @param tonight Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install - * @param skip Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public ApplyUpdatesResponse applyUpdates(Optional tonight, Optional skip) throws Exception { - ApplyUpdatesRequest request = - ApplyUpdatesRequest - .builder() - .tonight(tonight) - .skip(skip) - .build(); + public ApplyUpdatesResponse applyUpdates(ApplyUpdatesRequest request) throws Exception { RequestOperation operation = new ApplyUpdates.Sync(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } + /** + * Checking for updates + * + *

Perform an update check and potentially download + * + * @return The call builder + */ + public CheckUpdatesRequestBuilder checkUpdates() { + return new CheckUpdatesRequestBuilder(sdkConfiguration); + } + + /** + * Checking for updates + * + *

Perform an update check and potentially download + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CheckUpdatesResponse checkUpdates(CheckUpdatesRequest request) throws Exception { + RequestOperation operation + = new CheckUpdates.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Querying status of updates + * + *

Get the status of updating the server + * + * @return The call builder + */ + public GetUpdatesStatusRequestBuilder getUpdatesStatus() { + return new GetUpdatesStatusRequestBuilder(sdkConfiguration); + } + + /** + * Querying status of updates + * + *

Get the status of updating the server + * + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetUpdatesStatusResponse getUpdatesStatusDirect() throws Exception { + RequestlessOperation operation + = new GetUpdatesStatus.Sync(sdkConfiguration); + return operation.handleResponse(operation.doRequest()); + } + } diff --git a/src/main/java/dev/plexapi/sdk/Users.java b/src/main/java/dev/plexapi/sdk/Users.java deleted file mode 100644 index c307aa47..00000000 --- a/src/main/java/dev/plexapi/sdk/Users.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.models.operations.GetUsersRequest; -import dev.plexapi.sdk.models.operations.GetUsersRequestBuilder; -import dev.plexapi.sdk.models.operations.GetUsersResponse; -import dev.plexapi.sdk.operations.GetUsers; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - - -public class Users { - private final SDKConfiguration sdkConfiguration; - private final AsyncUsers asyncSDK; - - Users(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.asyncSDK = new AsyncUsers(this, sdkConfiguration); - } - - /** - * Switches to the async SDK. - * - * @return The async SDK - */ - public AsyncUsers async() { - return asyncSDK; - } - - /** - * Get list of all connected users - * - *

Get list of all users that are friends and have library access with the provided Plex authentication token - * - * @return The call builder - */ - public GetUsersRequestBuilder getUsers() { - return new GetUsersRequestBuilder(sdkConfiguration); - } - - /** - * Get list of all connected users - * - *

Get list of all users that are friends and have library access with the provided Plex authentication token - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetUsersResponse getUsers(GetUsersRequest request) throws Exception { - return getUsers(request, Optional.empty()); - } - - /** - * Get list of all connected users - * - *

Get list of all users that are friends and have library access with the provided Plex authentication token - * - * @param request The request object containing all the parameters for the API call. - * @param serverURL Overrides the server URL. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetUsersResponse getUsers(GetUsersRequest request, Optional serverURL) throws Exception { - RequestOperation operation - = new GetUsers.Sync(sdkConfiguration, serverURL); - return operation.handleResponse(operation.doRequest(request)); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/Video.java b/src/main/java/dev/plexapi/sdk/Video.java deleted file mode 100644 index ebc1f0ea..00000000 --- a/src/main/java/dev/plexapi/sdk/Video.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.models.operations.GetTimelineRequest; -import dev.plexapi.sdk.models.operations.GetTimelineRequestBuilder; -import dev.plexapi.sdk.models.operations.GetTimelineResponse; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequestBuilder; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse; -import dev.plexapi.sdk.operations.GetTimeline; -import dev.plexapi.sdk.operations.StartUniversalTranscode; -import java.lang.Exception; - -/** - * API Calls that perform operations with Plex Media Server Videos - */ -public class Video { - private final SDKConfiguration sdkConfiguration; - private final AsyncVideo asyncSDK; - - Video(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.asyncSDK = new AsyncVideo(this, sdkConfiguration); - } - - /** - * Switches to the async SDK. - * - * @return The async SDK - */ - public AsyncVideo async() { - return asyncSDK; - } - - /** - * Get the timeline for a media item - * - *

Get the timeline for a media item - * - * @return The call builder - */ - public GetTimelineRequestBuilder getTimeline() { - return new GetTimelineRequestBuilder(sdkConfiguration); - } - - /** - * Get the timeline for a media item - * - *

Get the timeline for a media item - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetTimelineResponse getTimeline(GetTimelineRequest request) throws Exception { - RequestOperation operation - = new GetTimeline.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - - /** - * Start Universal Transcode - * - *

Begin a Universal Transcode Session - * - * @return The call builder - */ - public StartUniversalTranscodeRequestBuilder startUniversalTranscode() { - return new StartUniversalTranscodeRequestBuilder(sdkConfiguration); - } - - /** - * Start Universal Transcode - * - *

Begin a Universal Transcode Session - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public StartUniversalTranscodeResponse startUniversalTranscode(StartUniversalTranscodeRequest request) throws Exception { - RequestOperation operation - = new StartUniversalTranscode.Sync(sdkConfiguration); - return operation.handleResponse(operation.doRequest(request)); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/Watchlist.java b/src/main/java/dev/plexapi/sdk/Watchlist.java deleted file mode 100644 index 267ae6f8..00000000 --- a/src/main/java/dev/plexapi/sdk/Watchlist.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.models.operations.GetWatchListRequest; -import dev.plexapi.sdk.models.operations.GetWatchListRequestBuilder; -import dev.plexapi.sdk.models.operations.GetWatchListResponse; -import dev.plexapi.sdk.operations.GetWatchList; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -/** - * API Calls that perform operations with Plex Media Server Watchlists - */ -public class Watchlist { - private final SDKConfiguration sdkConfiguration; - private final AsyncWatchlist asyncSDK; - - Watchlist(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.asyncSDK = new AsyncWatchlist(this, sdkConfiguration); - } - - /** - * Switches to the async SDK. - * - * @return The async SDK - */ - public AsyncWatchlist async() { - return asyncSDK; - } - - /** - * Get User Watchlist - * - *

Get User Watchlist - * - * @return The call builder - */ - public GetWatchListRequestBuilder getWatchList() { - return new GetWatchListRequestBuilder(sdkConfiguration); - } - - /** - * Get User Watchlist - * - *

Get User Watchlist - * - * @param request The request object containing all the parameters for the API call. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetWatchListResponse getWatchList(GetWatchListRequest request) throws Exception { - return getWatchList(request, Optional.empty()); - } - - /** - * Get User Watchlist - * - *

Get User Watchlist - * - * @param request The request object containing all the parameters for the API call. - * @param serverURL Overrides the server URL. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetWatchListResponse getWatchList(GetWatchListRequest request, Optional serverURL) throws Exception { - RequestOperation operation - = new GetWatchList.Sync(sdkConfiguration, serverURL); - return operation.handleResponse(operation.doRequest(request)); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsBadRequest.java deleted file mode 100644 index e1952547..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * AddPlaylistContentsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class AddPlaylistContentsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public AddPlaylistContentsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public AddPlaylistContentsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public AddPlaylistContentsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public AddPlaylistContentsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public AddPlaylistContentsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public AddPlaylistContentsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddPlaylistContentsBadRequest other = (AddPlaylistContentsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public AddPlaylistContentsBadRequest build() { - - return new AddPlaylistContentsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsErrors.java deleted file mode 100644 index a7197914..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class AddPlaylistContentsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public AddPlaylistContentsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public AddPlaylistContentsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public AddPlaylistContentsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public AddPlaylistContentsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public AddPlaylistContentsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public AddPlaylistContentsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public AddPlaylistContentsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public AddPlaylistContentsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddPlaylistContentsErrors other = (AddPlaylistContentsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public AddPlaylistContentsErrors build() { - - return new AddPlaylistContentsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsPlaylistsErrors.java deleted file mode 100644 index ea88f896..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsPlaylistsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class AddPlaylistContentsPlaylistsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public AddPlaylistContentsPlaylistsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public AddPlaylistContentsPlaylistsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public AddPlaylistContentsPlaylistsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public AddPlaylistContentsPlaylistsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public AddPlaylistContentsPlaylistsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public AddPlaylistContentsPlaylistsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public AddPlaylistContentsPlaylistsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public AddPlaylistContentsPlaylistsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddPlaylistContentsPlaylistsErrors other = (AddPlaylistContentsPlaylistsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsPlaylistsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public AddPlaylistContentsPlaylistsErrors build() { - - return new AddPlaylistContentsPlaylistsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsUnauthorized.java deleted file mode 100644 index 7332e436..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/AddPlaylistContentsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * AddPlaylistContentsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class AddPlaylistContentsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public AddPlaylistContentsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public AddPlaylistContentsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public AddPlaylistContentsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public AddPlaylistContentsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public AddPlaylistContentsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public AddPlaylistContentsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddPlaylistContentsUnauthorized other = (AddPlaylistContentsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public AddPlaylistContentsUnauthorized build() { - - return new AddPlaylistContentsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesBadRequest.java deleted file mode 100644 index 60585026..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * ApplyUpdatesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class ApplyUpdatesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public ApplyUpdatesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public ApplyUpdatesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public ApplyUpdatesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public ApplyUpdatesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ApplyUpdatesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ApplyUpdatesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplyUpdatesBadRequest other = (ApplyUpdatesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(ApplyUpdatesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public ApplyUpdatesBadRequest build() { - - return new ApplyUpdatesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesErrors.java deleted file mode 100644 index 2e324b32..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class ApplyUpdatesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public ApplyUpdatesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public ApplyUpdatesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public ApplyUpdatesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public ApplyUpdatesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public ApplyUpdatesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public ApplyUpdatesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public ApplyUpdatesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public ApplyUpdatesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplyUpdatesErrors other = (ApplyUpdatesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(ApplyUpdatesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public ApplyUpdatesErrors build() { - - return new ApplyUpdatesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUnauthorized.java deleted file mode 100644 index 9b8584d4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * ApplyUpdatesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class ApplyUpdatesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public ApplyUpdatesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public ApplyUpdatesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public ApplyUpdatesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public ApplyUpdatesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ApplyUpdatesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ApplyUpdatesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplyUpdatesUnauthorized other = (ApplyUpdatesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(ApplyUpdatesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public ApplyUpdatesUnauthorized build() { - - return new ApplyUpdatesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUpdaterErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUpdaterErrors.java deleted file mode 100644 index 0ab7d992..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/ApplyUpdatesUpdaterErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class ApplyUpdatesUpdaterErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public ApplyUpdatesUpdaterErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public ApplyUpdatesUpdaterErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public ApplyUpdatesUpdaterErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public ApplyUpdatesUpdaterErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public ApplyUpdatesUpdaterErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public ApplyUpdatesUpdaterErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public ApplyUpdatesUpdaterErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public ApplyUpdatesUpdaterErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplyUpdatesUpdaterErrors other = (ApplyUpdatesUpdaterErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(ApplyUpdatesUpdaterErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public ApplyUpdatesUpdaterErrors build() { - - return new ApplyUpdatesUpdaterErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesActivitiesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesActivitiesErrors.java deleted file mode 100644 index 36767f3d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesActivitiesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class CancelServerActivitiesActivitiesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public CancelServerActivitiesActivitiesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public CancelServerActivitiesActivitiesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public CancelServerActivitiesActivitiesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public CancelServerActivitiesActivitiesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public CancelServerActivitiesActivitiesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public CancelServerActivitiesActivitiesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public CancelServerActivitiesActivitiesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public CancelServerActivitiesActivitiesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelServerActivitiesActivitiesErrors other = (CancelServerActivitiesActivitiesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(CancelServerActivitiesActivitiesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public CancelServerActivitiesActivitiesErrors build() { - - return new CancelServerActivitiesActivitiesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesBadRequest.java deleted file mode 100644 index 93840642..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CancelServerActivitiesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class CancelServerActivitiesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CancelServerActivitiesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CancelServerActivitiesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CancelServerActivitiesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CancelServerActivitiesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CancelServerActivitiesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CancelServerActivitiesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelServerActivitiesBadRequest other = (CancelServerActivitiesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CancelServerActivitiesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CancelServerActivitiesBadRequest build() { - - return new CancelServerActivitiesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesErrors.java deleted file mode 100644 index 1488b30f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class CancelServerActivitiesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public CancelServerActivitiesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public CancelServerActivitiesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public CancelServerActivitiesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public CancelServerActivitiesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public CancelServerActivitiesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public CancelServerActivitiesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public CancelServerActivitiesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public CancelServerActivitiesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelServerActivitiesErrors other = (CancelServerActivitiesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(CancelServerActivitiesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public CancelServerActivitiesErrors build() { - - return new CancelServerActivitiesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesUnauthorized.java deleted file mode 100644 index a2e94573..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CancelServerActivitiesUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CancelServerActivitiesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class CancelServerActivitiesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CancelServerActivitiesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CancelServerActivitiesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CancelServerActivitiesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CancelServerActivitiesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CancelServerActivitiesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CancelServerActivitiesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelServerActivitiesUnauthorized other = (CancelServerActivitiesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CancelServerActivitiesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CancelServerActivitiesUnauthorized build() { - - return new CancelServerActivitiesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesBadRequest.java deleted file mode 100644 index c29b63eb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CheckForUpdatesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class CheckForUpdatesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CheckForUpdatesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CheckForUpdatesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CheckForUpdatesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CheckForUpdatesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CheckForUpdatesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CheckForUpdatesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckForUpdatesBadRequest other = (CheckForUpdatesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CheckForUpdatesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CheckForUpdatesBadRequest build() { - - return new CheckForUpdatesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesErrors.java deleted file mode 100644 index c94ddc75..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class CheckForUpdatesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public CheckForUpdatesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public CheckForUpdatesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public CheckForUpdatesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public CheckForUpdatesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public CheckForUpdatesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public CheckForUpdatesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public CheckForUpdatesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public CheckForUpdatesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckForUpdatesErrors other = (CheckForUpdatesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(CheckForUpdatesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public CheckForUpdatesErrors build() { - - return new CheckForUpdatesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUnauthorized.java deleted file mode 100644 index a7d8cd3b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CheckForUpdatesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class CheckForUpdatesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CheckForUpdatesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CheckForUpdatesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CheckForUpdatesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CheckForUpdatesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CheckForUpdatesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CheckForUpdatesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckForUpdatesUnauthorized other = (CheckForUpdatesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CheckForUpdatesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CheckForUpdatesUnauthorized build() { - - return new CheckForUpdatesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUpdaterErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUpdaterErrors.java deleted file mode 100644 index 57008969..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CheckForUpdatesUpdaterErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class CheckForUpdatesUpdaterErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public CheckForUpdatesUpdaterErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public CheckForUpdatesUpdaterErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public CheckForUpdatesUpdaterErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public CheckForUpdatesUpdaterErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public CheckForUpdatesUpdaterErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public CheckForUpdatesUpdaterErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public CheckForUpdatesUpdaterErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public CheckForUpdatesUpdaterErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckForUpdatesUpdaterErrors other = (CheckForUpdatesUpdaterErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(CheckForUpdatesUpdaterErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public CheckForUpdatesUpdaterErrors build() { - - return new CheckForUpdatesUpdaterErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsBadRequest.java deleted file mode 100644 index 7277f2be..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * ClearPlaylistContentsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class ClearPlaylistContentsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public ClearPlaylistContentsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public ClearPlaylistContentsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public ClearPlaylistContentsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public ClearPlaylistContentsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ClearPlaylistContentsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ClearPlaylistContentsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClearPlaylistContentsBadRequest other = (ClearPlaylistContentsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(ClearPlaylistContentsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public ClearPlaylistContentsBadRequest build() { - - return new ClearPlaylistContentsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsErrors.java deleted file mode 100644 index d50ad808..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class ClearPlaylistContentsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public ClearPlaylistContentsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public ClearPlaylistContentsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public ClearPlaylistContentsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public ClearPlaylistContentsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public ClearPlaylistContentsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public ClearPlaylistContentsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public ClearPlaylistContentsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public ClearPlaylistContentsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClearPlaylistContentsErrors other = (ClearPlaylistContentsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(ClearPlaylistContentsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public ClearPlaylistContentsErrors build() { - - return new ClearPlaylistContentsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsPlaylistsErrors.java deleted file mode 100644 index c1abdc94..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsPlaylistsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class ClearPlaylistContentsPlaylistsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public ClearPlaylistContentsPlaylistsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public ClearPlaylistContentsPlaylistsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public ClearPlaylistContentsPlaylistsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public ClearPlaylistContentsPlaylistsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public ClearPlaylistContentsPlaylistsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public ClearPlaylistContentsPlaylistsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public ClearPlaylistContentsPlaylistsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public ClearPlaylistContentsPlaylistsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClearPlaylistContentsPlaylistsErrors other = (ClearPlaylistContentsPlaylistsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(ClearPlaylistContentsPlaylistsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public ClearPlaylistContentsPlaylistsErrors build() { - - return new ClearPlaylistContentsPlaylistsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsUnauthorized.java deleted file mode 100644 index 423debe9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/ClearPlaylistContentsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * ClearPlaylistContentsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class ClearPlaylistContentsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public ClearPlaylistContentsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public ClearPlaylistContentsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public ClearPlaylistContentsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public ClearPlaylistContentsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ClearPlaylistContentsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ClearPlaylistContentsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClearPlaylistContentsUnauthorized other = (ClearPlaylistContentsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(ClearPlaylistContentsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public ClearPlaylistContentsUnauthorized build() { - - return new ClearPlaylistContentsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistBadRequest.java deleted file mode 100644 index 4f8a7c99..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CreatePlaylistBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class CreatePlaylistBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CreatePlaylistBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CreatePlaylistBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CreatePlaylistBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CreatePlaylistBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CreatePlaylistBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CreatePlaylistBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePlaylistBadRequest other = (CreatePlaylistBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CreatePlaylistBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CreatePlaylistBadRequest build() { - - return new CreatePlaylistBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistErrors.java deleted file mode 100644 index 98dbebf1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class CreatePlaylistErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public CreatePlaylistErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public CreatePlaylistErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public CreatePlaylistErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public CreatePlaylistErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public CreatePlaylistErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public CreatePlaylistErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public CreatePlaylistErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public CreatePlaylistErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePlaylistErrors other = (CreatePlaylistErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(CreatePlaylistErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public CreatePlaylistErrors build() { - - return new CreatePlaylistErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistPlaylistsErrors.java deleted file mode 100644 index 30cecbab..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistPlaylistsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class CreatePlaylistPlaylistsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public CreatePlaylistPlaylistsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public CreatePlaylistPlaylistsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public CreatePlaylistPlaylistsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public CreatePlaylistPlaylistsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public CreatePlaylistPlaylistsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public CreatePlaylistPlaylistsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public CreatePlaylistPlaylistsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public CreatePlaylistPlaylistsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePlaylistPlaylistsErrors other = (CreatePlaylistPlaylistsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(CreatePlaylistPlaylistsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public CreatePlaylistPlaylistsErrors build() { - - return new CreatePlaylistPlaylistsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistUnauthorized.java deleted file mode 100644 index 2b3500d0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/CreatePlaylistUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CreatePlaylistUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class CreatePlaylistUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CreatePlaylistUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CreatePlaylistUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CreatePlaylistUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CreatePlaylistUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CreatePlaylistUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CreatePlaylistUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePlaylistUnauthorized other = (CreatePlaylistUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CreatePlaylistUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CreatePlaylistUnauthorized build() { - - return new CreatePlaylistUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryBadRequest.java deleted file mode 100644 index 7b6761d9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * DeleteLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class DeleteLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public DeleteLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public DeleteLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeleteLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public DeleteLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeleteLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeleteLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLibraryBadRequest other = (DeleteLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(DeleteLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public DeleteLibraryBadRequest build() { - - return new DeleteLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryErrors.java deleted file mode 100644 index b24fce2e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class DeleteLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public DeleteLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public DeleteLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeleteLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public DeleteLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public DeleteLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public DeleteLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public DeleteLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public DeleteLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLibraryErrors other = (DeleteLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(DeleteLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public DeleteLibraryErrors build() { - - return new DeleteLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryLibraryErrors.java deleted file mode 100644 index 4f955b16..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class DeleteLibraryLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public DeleteLibraryLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public DeleteLibraryLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeleteLibraryLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public DeleteLibraryLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public DeleteLibraryLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public DeleteLibraryLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public DeleteLibraryLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public DeleteLibraryLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLibraryLibraryErrors other = (DeleteLibraryLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(DeleteLibraryLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public DeleteLibraryLibraryErrors build() { - - return new DeleteLibraryLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryUnauthorized.java deleted file mode 100644 index 798d97e4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeleteLibraryUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * DeleteLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class DeleteLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public DeleteLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public DeleteLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeleteLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public DeleteLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeleteLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeleteLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLibraryUnauthorized other = (DeleteLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(DeleteLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public DeleteLibraryUnauthorized build() { - - return new DeleteLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistBadRequest.java deleted file mode 100644 index 2eeb94f4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * DeletePlaylistBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class DeletePlaylistBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public DeletePlaylistBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public DeletePlaylistBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeletePlaylistBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public DeletePlaylistBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeletePlaylistBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeletePlaylistBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePlaylistBadRequest other = (DeletePlaylistBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(DeletePlaylistBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public DeletePlaylistBadRequest build() { - - return new DeletePlaylistBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistErrors.java deleted file mode 100644 index dae50a3a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class DeletePlaylistErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public DeletePlaylistErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public DeletePlaylistErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeletePlaylistErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public DeletePlaylistErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public DeletePlaylistErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public DeletePlaylistErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public DeletePlaylistErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public DeletePlaylistErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePlaylistErrors other = (DeletePlaylistErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(DeletePlaylistErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public DeletePlaylistErrors build() { - - return new DeletePlaylistErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistPlaylistsErrors.java deleted file mode 100644 index 5e67df77..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistPlaylistsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class DeletePlaylistPlaylistsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public DeletePlaylistPlaylistsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public DeletePlaylistPlaylistsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeletePlaylistPlaylistsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public DeletePlaylistPlaylistsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public DeletePlaylistPlaylistsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public DeletePlaylistPlaylistsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public DeletePlaylistPlaylistsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public DeletePlaylistPlaylistsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePlaylistPlaylistsErrors other = (DeletePlaylistPlaylistsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(DeletePlaylistPlaylistsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public DeletePlaylistPlaylistsErrors build() { - - return new DeletePlaylistPlaylistsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistUnauthorized.java deleted file mode 100644 index f2185eef..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/DeletePlaylistUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * DeletePlaylistUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class DeletePlaylistUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public DeletePlaylistUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public DeletePlaylistUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeletePlaylistUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public DeletePlaylistUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeletePlaylistUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeletePlaylistUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePlaylistUnauthorized other = (DeletePlaylistUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(DeletePlaylistUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public DeletePlaylistUnauthorized build() { - - return new DeletePlaylistUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailBadRequest.java deleted file mode 100644 index 44acc000..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * EnablePaperTrailBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class EnablePaperTrailBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public EnablePaperTrailBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public EnablePaperTrailBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public EnablePaperTrailBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public EnablePaperTrailBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public EnablePaperTrailBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public EnablePaperTrailBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnablePaperTrailBadRequest other = (EnablePaperTrailBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(EnablePaperTrailBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public EnablePaperTrailBadRequest build() { - - return new EnablePaperTrailBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailErrors.java deleted file mode 100644 index e17cadf9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class EnablePaperTrailErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public EnablePaperTrailErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public EnablePaperTrailErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public EnablePaperTrailErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public EnablePaperTrailErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public EnablePaperTrailErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public EnablePaperTrailErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public EnablePaperTrailErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public EnablePaperTrailErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnablePaperTrailErrors other = (EnablePaperTrailErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(EnablePaperTrailErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public EnablePaperTrailErrors build() { - - return new EnablePaperTrailErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailLogErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailLogErrors.java deleted file mode 100644 index 687383f4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailLogErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class EnablePaperTrailLogErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public EnablePaperTrailLogErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public EnablePaperTrailLogErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public EnablePaperTrailLogErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public EnablePaperTrailLogErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public EnablePaperTrailLogErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public EnablePaperTrailLogErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public EnablePaperTrailLogErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public EnablePaperTrailLogErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnablePaperTrailLogErrors other = (EnablePaperTrailLogErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(EnablePaperTrailLogErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public EnablePaperTrailLogErrors build() { - - return new EnablePaperTrailLogErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailUnauthorized.java deleted file mode 100644 index 2e12fc70..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/EnablePaperTrailUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * EnablePaperTrailUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class EnablePaperTrailUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public EnablePaperTrailUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public EnablePaperTrailUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public EnablePaperTrailUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public EnablePaperTrailUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public EnablePaperTrailUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public EnablePaperTrailUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnablePaperTrailUnauthorized other = (EnablePaperTrailUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(EnablePaperTrailUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public EnablePaperTrailUnauthorized build() { - - return new EnablePaperTrailUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/Errors.java b/src/main/java/dev/plexapi/sdk/models/errors/Errors.java deleted file mode 100644 index b29dd1e6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/Errors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Errors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public Errors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public Errors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public Errors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public Errors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public Errors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public Errors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public Errors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public Errors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Errors other = (Errors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(Errors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public Errors build() { - - return new Errors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryBadRequest.java deleted file mode 100644 index 99110603..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetActorsLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetActorsLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetActorsLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetActorsLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetActorsLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetActorsLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetActorsLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetActorsLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetActorsLibraryBadRequest other = (GetActorsLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetActorsLibraryBadRequest build() { - - return new GetActorsLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryErrors.java deleted file mode 100644 index cdb3bc19..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetActorsLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetActorsLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetActorsLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetActorsLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetActorsLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetActorsLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetActorsLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetActorsLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetActorsLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetActorsLibraryErrors other = (GetActorsLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetActorsLibraryErrors build() { - - return new GetActorsLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryLibraryErrors.java deleted file mode 100644 index 70d6e20f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetActorsLibraryLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetActorsLibraryLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetActorsLibraryLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetActorsLibraryLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetActorsLibraryLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetActorsLibraryLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetActorsLibraryLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetActorsLibraryLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetActorsLibraryLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetActorsLibraryLibraryErrors other = (GetActorsLibraryLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetActorsLibraryLibraryErrors build() { - - return new GetActorsLibraryLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryUnauthorized.java deleted file mode 100644 index e4e27a7f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetActorsLibraryUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetActorsLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetActorsLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetActorsLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetActorsLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetActorsLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetActorsLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetActorsLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetActorsLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetActorsLibraryUnauthorized other = (GetActorsLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetActorsLibraryUnauthorized build() { - - return new GetActorsLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesBadRequest.java deleted file mode 100644 index 3e4832b8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetAllLibrariesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetAllLibrariesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetAllLibrariesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetAllLibrariesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAllLibrariesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetAllLibrariesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAllLibrariesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAllLibrariesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAllLibrariesBadRequest other = (GetAllLibrariesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetAllLibrariesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetAllLibrariesBadRequest build() { - - return new GetAllLibrariesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesErrors.java deleted file mode 100644 index a012e902..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetAllLibrariesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetAllLibrariesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetAllLibrariesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAllLibrariesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetAllLibrariesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetAllLibrariesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetAllLibrariesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetAllLibrariesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetAllLibrariesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAllLibrariesErrors other = (GetAllLibrariesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetAllLibrariesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetAllLibrariesErrors build() { - - return new GetAllLibrariesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesLibraryErrors.java deleted file mode 100644 index 892c76b9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetAllLibrariesLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetAllLibrariesLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetAllLibrariesLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAllLibrariesLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetAllLibrariesLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetAllLibrariesLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetAllLibrariesLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetAllLibrariesLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetAllLibrariesLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAllLibrariesLibraryErrors other = (GetAllLibrariesLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetAllLibrariesLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetAllLibrariesLibraryErrors build() { - - return new GetAllLibrariesLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesUnauthorized.java deleted file mode 100644 index 0669636c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAllLibrariesUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetAllLibrariesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetAllLibrariesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetAllLibrariesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetAllLibrariesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAllLibrariesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetAllLibrariesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAllLibrariesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAllLibrariesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAllLibrariesUnauthorized other = (GetAllLibrariesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetAllLibrariesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetAllLibrariesUnauthorized build() { - - return new GetAllLibrariesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsBadRequest.java deleted file mode 100644 index 9a4aff5b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetAvailableClientsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetAvailableClientsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetAvailableClientsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetAvailableClientsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAvailableClientsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetAvailableClientsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAvailableClientsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAvailableClientsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAvailableClientsBadRequest other = (GetAvailableClientsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetAvailableClientsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetAvailableClientsBadRequest build() { - - return new GetAvailableClientsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsErrors.java deleted file mode 100644 index 972f521b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetAvailableClientsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetAvailableClientsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetAvailableClientsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAvailableClientsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetAvailableClientsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetAvailableClientsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetAvailableClientsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetAvailableClientsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetAvailableClientsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAvailableClientsErrors other = (GetAvailableClientsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetAvailableClientsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetAvailableClientsErrors build() { - - return new GetAvailableClientsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsServerErrors.java deleted file mode 100644 index a2bd023e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsServerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetAvailableClientsServerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetAvailableClientsServerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetAvailableClientsServerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAvailableClientsServerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetAvailableClientsServerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetAvailableClientsServerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetAvailableClientsServerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetAvailableClientsServerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetAvailableClientsServerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAvailableClientsServerErrors other = (GetAvailableClientsServerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetAvailableClientsServerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetAvailableClientsServerErrors build() { - - return new GetAvailableClientsServerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsUnauthorized.java deleted file mode 100644 index 8107956c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetAvailableClientsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetAvailableClientsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetAvailableClientsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetAvailableClientsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetAvailableClientsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAvailableClientsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetAvailableClientsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAvailableClientsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAvailableClientsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAvailableClientsUnauthorized other = (GetAvailableClientsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetAvailableClientsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetAvailableClientsUnauthorized build() { - - return new GetAvailableClientsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsBadRequest.java deleted file mode 100644 index 98a80ba0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetBandwidthStatisticsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetBandwidthStatisticsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetBandwidthStatisticsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetBandwidthStatisticsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBandwidthStatisticsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetBandwidthStatisticsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBandwidthStatisticsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBandwidthStatisticsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBandwidthStatisticsBadRequest other = (GetBandwidthStatisticsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetBandwidthStatisticsBadRequest build() { - - return new GetBandwidthStatisticsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsErrors.java deleted file mode 100644 index cf0e1a21..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetBandwidthStatisticsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetBandwidthStatisticsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetBandwidthStatisticsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBandwidthStatisticsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetBandwidthStatisticsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetBandwidthStatisticsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetBandwidthStatisticsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetBandwidthStatisticsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetBandwidthStatisticsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBandwidthStatisticsErrors other = (GetBandwidthStatisticsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetBandwidthStatisticsErrors build() { - - return new GetBandwidthStatisticsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsStatisticsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsStatisticsErrors.java deleted file mode 100644 index b6103c9d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsStatisticsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetBandwidthStatisticsStatisticsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetBandwidthStatisticsStatisticsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetBandwidthStatisticsStatisticsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBandwidthStatisticsStatisticsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetBandwidthStatisticsStatisticsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetBandwidthStatisticsStatisticsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetBandwidthStatisticsStatisticsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetBandwidthStatisticsStatisticsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetBandwidthStatisticsStatisticsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBandwidthStatisticsStatisticsErrors other = (GetBandwidthStatisticsStatisticsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsStatisticsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetBandwidthStatisticsStatisticsErrors build() { - - return new GetBandwidthStatisticsStatisticsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsUnauthorized.java deleted file mode 100644 index dd9944a0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBandwidthStatisticsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetBandwidthStatisticsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetBandwidthStatisticsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetBandwidthStatisticsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetBandwidthStatisticsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBandwidthStatisticsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetBandwidthStatisticsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBandwidthStatisticsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBandwidthStatisticsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBandwidthStatisticsUnauthorized other = (GetBandwidthStatisticsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetBandwidthStatisticsUnauthorized build() { - - return new GetBandwidthStatisticsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageBadRequest.java deleted file mode 100644 index 8ac925cf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetBannerImageBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetBannerImageBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetBannerImageBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetBannerImageBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBannerImageBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetBannerImageBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBannerImageBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBannerImageBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBannerImageBadRequest other = (GetBannerImageBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetBannerImageBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetBannerImageBadRequest build() { - - return new GetBannerImageBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageErrors.java deleted file mode 100644 index a37e99fa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetBannerImageErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetBannerImageErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetBannerImageErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBannerImageErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetBannerImageErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetBannerImageErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetBannerImageErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetBannerImageErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetBannerImageErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBannerImageErrors other = (GetBannerImageErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetBannerImageErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetBannerImageErrors build() { - - return new GetBannerImageErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageMediaErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageMediaErrors.java deleted file mode 100644 index 554e42db..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageMediaErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetBannerImageMediaErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetBannerImageMediaErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetBannerImageMediaErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBannerImageMediaErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetBannerImageMediaErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetBannerImageMediaErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetBannerImageMediaErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetBannerImageMediaErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetBannerImageMediaErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBannerImageMediaErrors other = (GetBannerImageMediaErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetBannerImageMediaErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetBannerImageMediaErrors build() { - - return new GetBannerImageMediaErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageUnauthorized.java deleted file mode 100644 index a77bacbb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetBannerImageUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetBannerImageUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetBannerImageUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetBannerImageUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetBannerImageUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBannerImageUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetBannerImageUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBannerImageUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBannerImageUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBannerImageUnauthorized other = (GetBannerImageUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetBannerImageUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetBannerImageUnauthorized build() { - - return new GetBannerImageUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksBadRequest.java deleted file mode 100644 index d5221f8b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetButlerTasksBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetButlerTasksBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetButlerTasksBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetButlerTasksBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetButlerTasksBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetButlerTasksBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetButlerTasksBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetButlerTasksBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetButlerTasksBadRequest other = (GetButlerTasksBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetButlerTasksBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetButlerTasksBadRequest build() { - - return new GetButlerTasksBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksButlerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksButlerErrors.java deleted file mode 100644 index 7dd7af78..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksButlerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetButlerTasksButlerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetButlerTasksButlerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetButlerTasksButlerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetButlerTasksButlerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetButlerTasksButlerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetButlerTasksButlerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetButlerTasksButlerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetButlerTasksButlerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetButlerTasksButlerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetButlerTasksButlerErrors other = (GetButlerTasksButlerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetButlerTasksButlerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetButlerTasksButlerErrors build() { - - return new GetButlerTasksButlerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksErrors.java deleted file mode 100644 index 2fcb9d2d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetButlerTasksErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetButlerTasksErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetButlerTasksErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetButlerTasksErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetButlerTasksErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetButlerTasksErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetButlerTasksErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetButlerTasksErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetButlerTasksErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetButlerTasksErrors other = (GetButlerTasksErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetButlerTasksErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetButlerTasksErrors build() { - - return new GetButlerTasksErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksUnauthorized.java deleted file mode 100644 index 654f4ea3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetButlerTasksUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetButlerTasksUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetButlerTasksUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetButlerTasksUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetButlerTasksUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetButlerTasksUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetButlerTasksUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetButlerTasksUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetButlerTasksUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetButlerTasksUnauthorized other = (GetButlerTasksUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetButlerTasksUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetButlerTasksUnauthorized build() { - - return new GetButlerTasksUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataBadRequest.java deleted file mode 100644 index 107ee7de..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetCompanionsDataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetCompanionsDataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetCompanionsDataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetCompanionsDataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCompanionsDataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetCompanionsDataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCompanionsDataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCompanionsDataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCompanionsDataBadRequest other = (GetCompanionsDataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetCompanionsDataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetCompanionsDataBadRequest build() { - - return new GetCompanionsDataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataErrors.java deleted file mode 100644 index dca6ceb2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetCompanionsDataErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetCompanionsDataErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetCompanionsDataErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCompanionsDataErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetCompanionsDataErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetCompanionsDataErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetCompanionsDataErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetCompanionsDataErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetCompanionsDataErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCompanionsDataErrors other = (GetCompanionsDataErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetCompanionsDataErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetCompanionsDataErrors build() { - - return new GetCompanionsDataErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataPlexErrors.java deleted file mode 100644 index 60e31290..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataPlexErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetCompanionsDataPlexErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetCompanionsDataPlexErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetCompanionsDataPlexErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCompanionsDataPlexErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetCompanionsDataPlexErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetCompanionsDataPlexErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetCompanionsDataPlexErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetCompanionsDataPlexErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetCompanionsDataPlexErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCompanionsDataPlexErrors other = (GetCompanionsDataPlexErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetCompanionsDataPlexErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetCompanionsDataPlexErrors build() { - - return new GetCompanionsDataPlexErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataUnauthorized.java deleted file mode 100644 index 1afd04ba..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetCompanionsDataUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetCompanionsDataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetCompanionsDataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetCompanionsDataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetCompanionsDataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCompanionsDataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetCompanionsDataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCompanionsDataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCompanionsDataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCompanionsDataUnauthorized other = (GetCompanionsDataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetCompanionsDataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetCompanionsDataUnauthorized build() { - - return new GetCompanionsDataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryBadRequest.java deleted file mode 100644 index f78062d9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetCountriesLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetCountriesLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetCountriesLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetCountriesLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCountriesLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetCountriesLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCountriesLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCountriesLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCountriesLibraryBadRequest other = (GetCountriesLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetCountriesLibraryBadRequest build() { - - return new GetCountriesLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryErrors.java deleted file mode 100644 index 4736952a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetCountriesLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetCountriesLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetCountriesLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCountriesLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetCountriesLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetCountriesLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetCountriesLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetCountriesLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetCountriesLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCountriesLibraryErrors other = (GetCountriesLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetCountriesLibraryErrors build() { - - return new GetCountriesLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryLibraryErrors.java deleted file mode 100644 index 97fde4de..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetCountriesLibraryLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetCountriesLibraryLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetCountriesLibraryLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCountriesLibraryLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetCountriesLibraryLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetCountriesLibraryLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetCountriesLibraryLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetCountriesLibraryLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetCountriesLibraryLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCountriesLibraryLibraryErrors other = (GetCountriesLibraryLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetCountriesLibraryLibraryErrors build() { - - return new GetCountriesLibraryLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryUnauthorized.java deleted file mode 100644 index 13608436..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetCountriesLibraryUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetCountriesLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetCountriesLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetCountriesLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetCountriesLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCountriesLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetCountriesLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCountriesLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCountriesLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCountriesLibraryUnauthorized other = (GetCountriesLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetCountriesLibraryUnauthorized build() { - - return new GetCountriesLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesBadRequest.java deleted file mode 100644 index a9e2b4c0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetDevicesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetDevicesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetDevicesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetDevicesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetDevicesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetDevicesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetDevicesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetDevicesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetDevicesBadRequest other = (GetDevicesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetDevicesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetDevicesBadRequest build() { - - return new GetDevicesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesErrors.java deleted file mode 100644 index 0e0026f4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetDevicesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetDevicesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetDevicesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetDevicesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetDevicesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetDevicesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetDevicesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetDevicesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetDevicesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetDevicesErrors other = (GetDevicesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetDevicesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetDevicesErrors build() { - - return new GetDevicesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesServerErrors.java deleted file mode 100644 index 249007d7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesServerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetDevicesServerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetDevicesServerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetDevicesServerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetDevicesServerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetDevicesServerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetDevicesServerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetDevicesServerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetDevicesServerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetDevicesServerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetDevicesServerErrors other = (GetDevicesServerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetDevicesServerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetDevicesServerErrors build() { - - return new GetDevicesServerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesUnauthorized.java deleted file mode 100644 index 4daa5800..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetDevicesUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetDevicesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetDevicesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetDevicesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetDevicesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetDevicesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetDevicesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetDevicesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetDevicesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetDevicesUnauthorized other = (GetDevicesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetDevicesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetDevicesUnauthorized build() { - - return new GetDevicesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashBadRequest.java deleted file mode 100644 index 95d71399..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetFileHashBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetFileHashBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetFileHashBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetFileHashBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetFileHashBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetFileHashBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetFileHashBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetFileHashBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetFileHashBadRequest other = (GetFileHashBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetFileHashBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetFileHashBadRequest build() { - - return new GetFileHashBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashErrors.java deleted file mode 100644 index 26a3b1eb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetFileHashErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetFileHashErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetFileHashErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetFileHashErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetFileHashErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetFileHashErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetFileHashErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetFileHashErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetFileHashErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetFileHashErrors other = (GetFileHashErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetFileHashErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetFileHashErrors build() { - - return new GetFileHashErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashLibraryErrors.java deleted file mode 100644 index 1f7c69a8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetFileHashLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetFileHashLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetFileHashLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetFileHashLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetFileHashLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetFileHashLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetFileHashLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetFileHashLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetFileHashLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetFileHashLibraryErrors other = (GetFileHashLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetFileHashLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetFileHashLibraryErrors build() { - - return new GetFileHashLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashUnauthorized.java deleted file mode 100644 index c7bea188..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetFileHashUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetFileHashUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetFileHashUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetFileHashUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetFileHashUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetFileHashUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetFileHashUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetFileHashUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetFileHashUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetFileHashUnauthorized other = (GetFileHashUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetFileHashUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetFileHashUnauthorized build() { - - return new GetFileHashUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryBadRequest.java deleted file mode 100644 index 1188c5ed..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGenresLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetGenresLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGenresLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGenresLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGenresLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGenresLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGenresLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGenresLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGenresLibraryBadRequest other = (GetGenresLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGenresLibraryBadRequest build() { - - return new GetGenresLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryErrors.java deleted file mode 100644 index 6cf660c5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetGenresLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetGenresLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetGenresLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGenresLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetGenresLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetGenresLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetGenresLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetGenresLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetGenresLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGenresLibraryErrors other = (GetGenresLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetGenresLibraryErrors build() { - - return new GetGenresLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryLibraryErrors.java deleted file mode 100644 index e2442825..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetGenresLibraryLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetGenresLibraryLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetGenresLibraryLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGenresLibraryLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetGenresLibraryLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetGenresLibraryLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetGenresLibraryLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetGenresLibraryLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetGenresLibraryLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGenresLibraryLibraryErrors other = (GetGenresLibraryLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetGenresLibraryLibraryErrors build() { - - return new GetGenresLibraryLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryUnauthorized.java deleted file mode 100644 index 73642ab3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGenresLibraryUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGenresLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetGenresLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGenresLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGenresLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGenresLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGenresLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGenresLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGenresLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGenresLibraryUnauthorized other = (GetGenresLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGenresLibraryUnauthorized build() { - - return new GetGenresLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataBadRequest.java deleted file mode 100644 index f72e7be3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGeoDataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetGeoDataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGeoDataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGeoDataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGeoDataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGeoDataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGeoDataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGeoDataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGeoDataBadRequest other = (GetGeoDataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGeoDataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGeoDataBadRequest build() { - - return new GetGeoDataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataErrors.java deleted file mode 100644 index 186fbdfb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetGeoDataErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetGeoDataErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetGeoDataErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGeoDataErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetGeoDataErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetGeoDataErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetGeoDataErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetGeoDataErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetGeoDataErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGeoDataErrors other = (GetGeoDataErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetGeoDataErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetGeoDataErrors build() { - - return new GetGeoDataErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataPlexErrors.java deleted file mode 100644 index 163c8604..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataPlexErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetGeoDataPlexErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetGeoDataPlexErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetGeoDataPlexErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGeoDataPlexErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetGeoDataPlexErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetGeoDataPlexErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetGeoDataPlexErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetGeoDataPlexErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetGeoDataPlexErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGeoDataPlexErrors other = (GetGeoDataPlexErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetGeoDataPlexErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetGeoDataPlexErrors build() { - - return new GetGeoDataPlexErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataUnauthorized.java deleted file mode 100644 index 3b9ca963..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGeoDataUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGeoDataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetGeoDataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGeoDataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGeoDataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGeoDataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGeoDataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGeoDataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGeoDataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGeoDataUnauthorized other = (GetGeoDataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGeoDataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGeoDataUnauthorized build() { - - return new GetGeoDataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsBadRequest.java deleted file mode 100644 index e8b65bb4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGlobalHubsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetGlobalHubsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGlobalHubsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGlobalHubsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGlobalHubsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGlobalHubsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGlobalHubsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGlobalHubsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGlobalHubsBadRequest other = (GetGlobalHubsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGlobalHubsBadRequest build() { - - return new GetGlobalHubsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsErrors.java deleted file mode 100644 index 9bd59975..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetGlobalHubsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetGlobalHubsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetGlobalHubsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGlobalHubsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetGlobalHubsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetGlobalHubsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetGlobalHubsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetGlobalHubsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetGlobalHubsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGlobalHubsErrors other = (GetGlobalHubsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetGlobalHubsErrors build() { - - return new GetGlobalHubsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsHubsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsHubsErrors.java deleted file mode 100644 index 1867b9a9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsHubsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetGlobalHubsHubsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetGlobalHubsHubsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetGlobalHubsHubsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGlobalHubsHubsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetGlobalHubsHubsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetGlobalHubsHubsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetGlobalHubsHubsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetGlobalHubsHubsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetGlobalHubsHubsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGlobalHubsHubsErrors other = (GetGlobalHubsHubsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsHubsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetGlobalHubsHubsErrors build() { - - return new GetGlobalHubsHubsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsUnauthorized.java deleted file mode 100644 index 001658c6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetGlobalHubsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGlobalHubsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetGlobalHubsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGlobalHubsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGlobalHubsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGlobalHubsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGlobalHubsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGlobalHubsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGlobalHubsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGlobalHubsUnauthorized other = (GetGlobalHubsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGlobalHubsUnauthorized build() { - - return new GetGlobalHubsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataBadRequest.java deleted file mode 100644 index 3a1a9ada..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetHomeDataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetHomeDataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetHomeDataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetHomeDataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetHomeDataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetHomeDataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetHomeDataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetHomeDataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetHomeDataBadRequest other = (GetHomeDataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetHomeDataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetHomeDataBadRequest build() { - - return new GetHomeDataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataErrors.java deleted file mode 100644 index 139db6c6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetHomeDataErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetHomeDataErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetHomeDataErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetHomeDataErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetHomeDataErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetHomeDataErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetHomeDataErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetHomeDataErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetHomeDataErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetHomeDataErrors other = (GetHomeDataErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetHomeDataErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetHomeDataErrors build() { - - return new GetHomeDataErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataPlexErrors.java deleted file mode 100644 index d71420a9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataPlexErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetHomeDataPlexErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetHomeDataPlexErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetHomeDataPlexErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetHomeDataPlexErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetHomeDataPlexErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetHomeDataPlexErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetHomeDataPlexErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetHomeDataPlexErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetHomeDataPlexErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetHomeDataPlexErrors other = (GetHomeDataPlexErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetHomeDataPlexErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetHomeDataPlexErrors build() { - - return new GetHomeDataPlexErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataUnauthorized.java deleted file mode 100644 index b7398a93..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetHomeDataUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetHomeDataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetHomeDataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetHomeDataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetHomeDataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetHomeDataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetHomeDataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetHomeDataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetHomeDataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetHomeDataUnauthorized other = (GetHomeDataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetHomeDataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetHomeDataUnauthorized build() { - - return new GetHomeDataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsBadRequest.java deleted file mode 100644 index 9c6d41cb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryDetailsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetLibraryDetailsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryDetailsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryDetailsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryDetailsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryDetailsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryDetailsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryDetailsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryDetailsBadRequest other = (GetLibraryDetailsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryDetailsBadRequest build() { - - return new GetLibraryDetailsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsErrors.java deleted file mode 100644 index 4d280522..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryDetailsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetLibraryDetailsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetLibraryDetailsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryDetailsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetLibraryDetailsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetLibraryDetailsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetLibraryDetailsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetLibraryDetailsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetLibraryDetailsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryDetailsErrors other = (GetLibraryDetailsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetLibraryDetailsErrors build() { - - return new GetLibraryDetailsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsLibraryErrors.java deleted file mode 100644 index ff3bf906..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryDetailsLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetLibraryDetailsLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetLibraryDetailsLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryDetailsLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetLibraryDetailsLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetLibraryDetailsLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetLibraryDetailsLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetLibraryDetailsLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetLibraryDetailsLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryDetailsLibraryErrors other = (GetLibraryDetailsLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetLibraryDetailsLibraryErrors build() { - - return new GetLibraryDetailsLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsUnauthorized.java deleted file mode 100644 index ab23b0f3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryDetailsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryDetailsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetLibraryDetailsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryDetailsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryDetailsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryDetailsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryDetailsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryDetailsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryDetailsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryDetailsUnauthorized other = (GetLibraryDetailsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryDetailsUnauthorized build() { - - return new GetLibraryDetailsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsBadRequest.java deleted file mode 100644 index e66640e5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryHubsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetLibraryHubsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryHubsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryHubsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryHubsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryHubsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryHubsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryHubsBadRequest other = (GetLibraryHubsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryHubsBadRequest build() { - - return new GetLibraryHubsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsErrors.java deleted file mode 100644 index 83758e9a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryHubsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetLibraryHubsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetLibraryHubsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetLibraryHubsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetLibraryHubsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetLibraryHubsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetLibraryHubsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetLibraryHubsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryHubsErrors other = (GetLibraryHubsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetLibraryHubsErrors build() { - - return new GetLibraryHubsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsHubsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsHubsErrors.java deleted file mode 100644 index 92057dbd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsHubsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryHubsHubsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetLibraryHubsHubsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetLibraryHubsHubsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsHubsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetLibraryHubsHubsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetLibraryHubsHubsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetLibraryHubsHubsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetLibraryHubsHubsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetLibraryHubsHubsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryHubsHubsErrors other = (GetLibraryHubsHubsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsHubsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetLibraryHubsHubsErrors build() { - - return new GetLibraryHubsHubsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsUnauthorized.java deleted file mode 100644 index de77455f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryHubsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryHubsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetLibraryHubsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryHubsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryHubsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryHubsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryHubsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryHubsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryHubsUnauthorized other = (GetLibraryHubsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryHubsUnauthorized build() { - - return new GetLibraryHubsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsBadRequest.java deleted file mode 100644 index 54d356f7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryItemsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetLibraryItemsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryItemsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryItemsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryItemsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryItemsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryItemsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsBadRequest other = (GetLibraryItemsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryItemsBadRequest build() { - - return new GetLibraryItemsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsErrors.java deleted file mode 100644 index beaad6fd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryItemsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetLibraryItemsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetLibraryItemsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetLibraryItemsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetLibraryItemsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetLibraryItemsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetLibraryItemsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetLibraryItemsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsErrors other = (GetLibraryItemsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetLibraryItemsErrors build() { - - return new GetLibraryItemsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsLibraryErrors.java deleted file mode 100644 index 07e0659a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryItemsLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetLibraryItemsLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetLibraryItemsLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetLibraryItemsLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetLibraryItemsLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetLibraryItemsLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetLibraryItemsLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetLibraryItemsLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsLibraryErrors other = (GetLibraryItemsLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetLibraryItemsLibraryErrors build() { - - return new GetLibraryItemsLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsUnauthorized.java deleted file mode 100644 index 292951d1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibraryItemsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryItemsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetLibraryItemsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryItemsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryItemsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryItemsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryItemsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryItemsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsUnauthorized other = (GetLibraryItemsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryItemsUnauthorized build() { - - return new GetLibraryItemsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllBadRequest.java deleted file mode 100644 index d518135e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibrarySectionsAllBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetLibrarySectionsAllBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibrarySectionsAllBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibrarySectionsAllBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibrarySectionsAllBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibrarySectionsAllBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibrarySectionsAllBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllBadRequest other = (GetLibrarySectionsAllBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibrarySectionsAllBadRequest build() { - - return new GetLibrarySectionsAllBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllErrors.java deleted file mode 100644 index f8200e4b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibrarySectionsAllErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetLibrarySectionsAllErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetLibrarySectionsAllErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetLibrarySectionsAllErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetLibrarySectionsAllErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetLibrarySectionsAllErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetLibrarySectionsAllErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetLibrarySectionsAllErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllErrors other = (GetLibrarySectionsAllErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetLibrarySectionsAllErrors build() { - - return new GetLibrarySectionsAllErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllLibraryErrors.java deleted file mode 100644 index e7a346d2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibrarySectionsAllLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetLibrarySectionsAllLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetLibrarySectionsAllLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetLibrarySectionsAllLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetLibrarySectionsAllLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetLibrarySectionsAllLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetLibrarySectionsAllLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetLibrarySectionsAllLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllLibraryErrors other = (GetLibrarySectionsAllLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetLibrarySectionsAllLibraryErrors build() { - - return new GetLibrarySectionsAllLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllUnauthorized.java deleted file mode 100644 index f8cddeb4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetLibrarySectionsAllUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibrarySectionsAllUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetLibrarySectionsAllUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibrarySectionsAllUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibrarySectionsAllUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibrarySectionsAllUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibrarySectionsAllUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibrarySectionsAllUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllUnauthorized other = (GetLibrarySectionsAllUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibrarySectionsAllUnauthorized build() { - - return new GetLibrarySectionsAllUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataBadRequest.java deleted file mode 100644 index 9c237f88..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMediaMetaDataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetMediaMetaDataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMediaMetaDataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMediaMetaDataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMediaMetaDataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaMetaDataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaMetaDataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataBadRequest other = (GetMediaMetaDataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMediaMetaDataBadRequest build() { - - return new GetMediaMetaDataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataErrors.java deleted file mode 100644 index 475af7a8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaMetaDataErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetMediaMetaDataErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetMediaMetaDataErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetMediaMetaDataErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetMediaMetaDataErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetMediaMetaDataErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetMediaMetaDataErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetMediaMetaDataErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataErrors other = (GetMediaMetaDataErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetMediaMetaDataErrors build() { - - return new GetMediaMetaDataErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataLibraryErrors.java deleted file mode 100644 index ffdb53b6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaMetaDataLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetMediaMetaDataLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetMediaMetaDataLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetMediaMetaDataLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetMediaMetaDataLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetMediaMetaDataLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetMediaMetaDataLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetMediaMetaDataLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataLibraryErrors other = (GetMediaMetaDataLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetMediaMetaDataLibraryErrors build() { - - return new GetMediaMetaDataLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataUnauthorized.java deleted file mode 100644 index 1d2efd2e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaMetaDataUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMediaMetaDataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetMediaMetaDataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMediaMetaDataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMediaMetaDataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMediaMetaDataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaMetaDataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaMetaDataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataUnauthorized other = (GetMediaMetaDataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMediaMetaDataUnauthorized build() { - - return new GetMediaMetaDataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersBadRequest.java deleted file mode 100644 index c06acd7f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMediaProvidersBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetMediaProvidersBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMediaProvidersBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMediaProvidersBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaProvidersBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMediaProvidersBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaProvidersBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaProvidersBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaProvidersBadRequest other = (GetMediaProvidersBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMediaProvidersBadRequest build() { - - return new GetMediaProvidersBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersErrors.java deleted file mode 100644 index 2403422b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaProvidersErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetMediaProvidersErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetMediaProvidersErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaProvidersErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetMediaProvidersErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetMediaProvidersErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetMediaProvidersErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetMediaProvidersErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetMediaProvidersErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaProvidersErrors other = (GetMediaProvidersErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetMediaProvidersErrors build() { - - return new GetMediaProvidersErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersServerErrors.java deleted file mode 100644 index d0c9f0d1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersServerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaProvidersServerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetMediaProvidersServerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetMediaProvidersServerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaProvidersServerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetMediaProvidersServerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetMediaProvidersServerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetMediaProvidersServerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetMediaProvidersServerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetMediaProvidersServerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaProvidersServerErrors other = (GetMediaProvidersServerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersServerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetMediaProvidersServerErrors build() { - - return new GetMediaProvidersServerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersUnauthorized.java deleted file mode 100644 index 1e0d4fad..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMediaProvidersUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMediaProvidersUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetMediaProvidersUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMediaProvidersUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMediaProvidersUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaProvidersUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMediaProvidersUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaProvidersUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaProvidersUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaProvidersUnauthorized other = (GetMediaProvidersUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMediaProvidersUnauthorized build() { - - return new GetMediaProvidersUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenBadRequest.java deleted file mode 100644 index 8f368f29..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMetadataChildrenBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetMetadataChildrenBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMetadataChildrenBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMetadataChildrenBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMetadataChildrenBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMetadataChildrenBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMetadataChildrenBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMetadataChildrenBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMetadataChildrenBadRequest other = (GetMetadataChildrenBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMetadataChildrenBadRequest build() { - - return new GetMetadataChildrenBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenErrors.java deleted file mode 100644 index 71467a87..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMetadataChildrenErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetMetadataChildrenErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetMetadataChildrenErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMetadataChildrenErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetMetadataChildrenErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetMetadataChildrenErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetMetadataChildrenErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetMetadataChildrenErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetMetadataChildrenErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMetadataChildrenErrors other = (GetMetadataChildrenErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetMetadataChildrenErrors build() { - - return new GetMetadataChildrenErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenLibraryErrors.java deleted file mode 100644 index 689dec6f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMetadataChildrenLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetMetadataChildrenLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetMetadataChildrenLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMetadataChildrenLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetMetadataChildrenLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetMetadataChildrenLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetMetadataChildrenLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetMetadataChildrenLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetMetadataChildrenLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMetadataChildrenLibraryErrors other = (GetMetadataChildrenLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetMetadataChildrenLibraryErrors build() { - - return new GetMetadataChildrenLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenUnauthorized.java deleted file mode 100644 index 2d7872a2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMetadataChildrenUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMetadataChildrenUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetMetadataChildrenUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMetadataChildrenUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMetadataChildrenUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMetadataChildrenUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMetadataChildrenUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMetadataChildrenUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMetadataChildrenUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMetadataChildrenUnauthorized other = (GetMetadataChildrenUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMetadataChildrenUnauthorized build() { - - return new GetMetadataChildrenUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountBadRequest.java deleted file mode 100644 index 9a072610..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMyPlexAccountBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetMyPlexAccountBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMyPlexAccountBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMyPlexAccountBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMyPlexAccountBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMyPlexAccountBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMyPlexAccountBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMyPlexAccountBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMyPlexAccountBadRequest other = (GetMyPlexAccountBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMyPlexAccountBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMyPlexAccountBadRequest build() { - - return new GetMyPlexAccountBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountErrors.java deleted file mode 100644 index e3f16e27..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMyPlexAccountErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetMyPlexAccountErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetMyPlexAccountErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMyPlexAccountErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetMyPlexAccountErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetMyPlexAccountErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetMyPlexAccountErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetMyPlexAccountErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetMyPlexAccountErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMyPlexAccountErrors other = (GetMyPlexAccountErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetMyPlexAccountErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetMyPlexAccountErrors build() { - - return new GetMyPlexAccountErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountServerErrors.java deleted file mode 100644 index f8339893..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountServerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMyPlexAccountServerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetMyPlexAccountServerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetMyPlexAccountServerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMyPlexAccountServerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetMyPlexAccountServerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetMyPlexAccountServerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetMyPlexAccountServerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetMyPlexAccountServerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetMyPlexAccountServerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMyPlexAccountServerErrors other = (GetMyPlexAccountServerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetMyPlexAccountServerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetMyPlexAccountServerErrors build() { - - return new GetMyPlexAccountServerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountUnauthorized.java deleted file mode 100644 index 022e1b25..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetMyPlexAccountUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMyPlexAccountUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetMyPlexAccountUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMyPlexAccountUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMyPlexAccountUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMyPlexAccountUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMyPlexAccountUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMyPlexAccountUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMyPlexAccountUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMyPlexAccountUnauthorized other = (GetMyPlexAccountUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMyPlexAccountUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMyPlexAccountUnauthorized build() { - - return new GetMyPlexAccountUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPinBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPinBadRequest.java deleted file mode 100644 index 881b1288..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPinBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPinBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetPinBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPinBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPinBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPinBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPinBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPinBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPinBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPinBadRequest other = (GetPinBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPinBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPinBadRequest build() { - - return new GetPinBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPinErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPinErrors.java deleted file mode 100644 index 85312bb6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPinErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPinErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetPinErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetPinErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPinErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetPinErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetPinErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetPinErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetPinErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetPinErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPinErrors other = (GetPinErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetPinErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetPinErrors build() { - - return new GetPinErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistBadRequest.java deleted file mode 100644 index fcdd4d90..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetPlaylistBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistBadRequest other = (GetPlaylistBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistBadRequest build() { - - return new GetPlaylistBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsBadRequest.java deleted file mode 100644 index 1d0533ed..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistContentsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetPlaylistContentsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistContentsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistContentsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistContentsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistContentsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistContentsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistContentsBadRequest other = (GetPlaylistContentsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistContentsBadRequest build() { - - return new GetPlaylistContentsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsErrors.java deleted file mode 100644 index 3849914d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistContentsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetPlaylistContentsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetPlaylistContentsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetPlaylistContentsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetPlaylistContentsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetPlaylistContentsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetPlaylistContentsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetPlaylistContentsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistContentsErrors other = (GetPlaylistContentsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetPlaylistContentsErrors build() { - - return new GetPlaylistContentsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsPlaylistsErrors.java deleted file mode 100644 index de620c1d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsPlaylistsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistContentsPlaylistsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetPlaylistContentsPlaylistsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetPlaylistContentsPlaylistsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsPlaylistsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetPlaylistContentsPlaylistsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetPlaylistContentsPlaylistsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetPlaylistContentsPlaylistsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetPlaylistContentsPlaylistsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetPlaylistContentsPlaylistsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistContentsPlaylistsErrors other = (GetPlaylistContentsPlaylistsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsPlaylistsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetPlaylistContentsPlaylistsErrors build() { - - return new GetPlaylistContentsPlaylistsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsUnauthorized.java deleted file mode 100644 index b9d74994..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistContentsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistContentsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetPlaylistContentsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistContentsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistContentsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistContentsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistContentsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistContentsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistContentsUnauthorized other = (GetPlaylistContentsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistContentsUnauthorized build() { - - return new GetPlaylistContentsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistErrors.java deleted file mode 100644 index 15c31f52..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetPlaylistErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetPlaylistErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetPlaylistErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetPlaylistErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetPlaylistErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetPlaylistErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetPlaylistErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistErrors other = (GetPlaylistErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetPlaylistErrors build() { - - return new GetPlaylistErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistPlaylistsErrors.java deleted file mode 100644 index 6bd32339..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistPlaylistsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistPlaylistsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetPlaylistPlaylistsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetPlaylistPlaylistsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistPlaylistsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetPlaylistPlaylistsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetPlaylistPlaylistsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetPlaylistPlaylistsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetPlaylistPlaylistsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetPlaylistPlaylistsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistPlaylistsErrors other = (GetPlaylistPlaylistsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistPlaylistsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetPlaylistPlaylistsErrors build() { - - return new GetPlaylistPlaylistsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistUnauthorized.java deleted file mode 100644 index 3dac1f56..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetPlaylistUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistUnauthorized other = (GetPlaylistUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistUnauthorized build() { - - return new GetPlaylistUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsBadRequest.java deleted file mode 100644 index b1ea6922..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetPlaylistsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistsBadRequest other = (GetPlaylistsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistsBadRequest build() { - - return new GetPlaylistsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsErrors.java deleted file mode 100644 index b0f94304..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetPlaylistsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetPlaylistsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetPlaylistsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetPlaylistsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetPlaylistsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetPlaylistsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetPlaylistsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistsErrors other = (GetPlaylistsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetPlaylistsErrors build() { - - return new GetPlaylistsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsPlaylistsErrors.java deleted file mode 100644 index 6c78c3aa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsPlaylistsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistsPlaylistsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetPlaylistsPlaylistsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetPlaylistsPlaylistsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistsPlaylistsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetPlaylistsPlaylistsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetPlaylistsPlaylistsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetPlaylistsPlaylistsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetPlaylistsPlaylistsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetPlaylistsPlaylistsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistsPlaylistsErrors other = (GetPlaylistsPlaylistsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsPlaylistsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetPlaylistsPlaylistsErrors build() { - - return new GetPlaylistsPlaylistsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsUnauthorized.java deleted file mode 100644 index 9b1c4ac5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetPlaylistsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistsUnauthorized other = (GetPlaylistsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistsUnauthorized build() { - - return new GetPlaylistsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryBadRequest.java deleted file mode 100644 index 2ef41523..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetRecentlyAddedLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetRecentlyAddedLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetRecentlyAddedLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetRecentlyAddedLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRecentlyAddedLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetRecentlyAddedLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRecentlyAddedLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRecentlyAddedLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecentlyAddedLibraryBadRequest other = (GetRecentlyAddedLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetRecentlyAddedLibraryBadRequest build() { - - return new GetRecentlyAddedLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryErrors.java deleted file mode 100644 index adad9f31..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetRecentlyAddedLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetRecentlyAddedLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetRecentlyAddedLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRecentlyAddedLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetRecentlyAddedLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetRecentlyAddedLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetRecentlyAddedLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetRecentlyAddedLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetRecentlyAddedLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecentlyAddedLibraryErrors other = (GetRecentlyAddedLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetRecentlyAddedLibraryErrors build() { - - return new GetRecentlyAddedLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryLibraryErrors.java deleted file mode 100644 index 5831fab4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetRecentlyAddedLibraryLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetRecentlyAddedLibraryLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetRecentlyAddedLibraryLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRecentlyAddedLibraryLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetRecentlyAddedLibraryLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetRecentlyAddedLibraryLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetRecentlyAddedLibraryLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetRecentlyAddedLibraryLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetRecentlyAddedLibraryLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecentlyAddedLibraryLibraryErrors other = (GetRecentlyAddedLibraryLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetRecentlyAddedLibraryLibraryErrors build() { - - return new GetRecentlyAddedLibraryLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryUnauthorized.java deleted file mode 100644 index a4d953c3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetRecentlyAddedLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetRecentlyAddedLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetRecentlyAddedLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetRecentlyAddedLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRecentlyAddedLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetRecentlyAddedLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRecentlyAddedLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRecentlyAddedLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecentlyAddedLibraryUnauthorized other = (GetRecentlyAddedLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetRecentlyAddedLibraryUnauthorized build() { - - return new GetRecentlyAddedLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataBadRequest.java deleted file mode 100644 index eaf8bab7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetRefreshLibraryMetadataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetRefreshLibraryMetadataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetRefreshLibraryMetadataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetRefreshLibraryMetadataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRefreshLibraryMetadataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetRefreshLibraryMetadataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRefreshLibraryMetadataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRefreshLibraryMetadataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRefreshLibraryMetadataBadRequest other = (GetRefreshLibraryMetadataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetRefreshLibraryMetadataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetRefreshLibraryMetadataBadRequest build() { - - return new GetRefreshLibraryMetadataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataErrors.java deleted file mode 100644 index 16ef71f9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetRefreshLibraryMetadataErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetRefreshLibraryMetadataErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetRefreshLibraryMetadataErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRefreshLibraryMetadataErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetRefreshLibraryMetadataErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetRefreshLibraryMetadataErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetRefreshLibraryMetadataErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetRefreshLibraryMetadataErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetRefreshLibraryMetadataErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRefreshLibraryMetadataErrors other = (GetRefreshLibraryMetadataErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetRefreshLibraryMetadataErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetRefreshLibraryMetadataErrors build() { - - return new GetRefreshLibraryMetadataErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataLibraryErrors.java deleted file mode 100644 index ae6c116c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetRefreshLibraryMetadataLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetRefreshLibraryMetadataLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetRefreshLibraryMetadataLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRefreshLibraryMetadataLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetRefreshLibraryMetadataLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetRefreshLibraryMetadataLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetRefreshLibraryMetadataLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetRefreshLibraryMetadataLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetRefreshLibraryMetadataLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRefreshLibraryMetadataLibraryErrors other = (GetRefreshLibraryMetadataLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetRefreshLibraryMetadataLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetRefreshLibraryMetadataLibraryErrors build() { - - return new GetRefreshLibraryMetadataLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataUnauthorized.java deleted file mode 100644 index ec61e392..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetRefreshLibraryMetadataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetRefreshLibraryMetadataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetRefreshLibraryMetadataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetRefreshLibraryMetadataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRefreshLibraryMetadataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetRefreshLibraryMetadataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRefreshLibraryMetadataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRefreshLibraryMetadataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRefreshLibraryMetadataUnauthorized other = (GetRefreshLibraryMetadataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetRefreshLibraryMetadataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetRefreshLibraryMetadataUnauthorized build() { - - return new GetRefreshLibraryMetadataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoBadRequest.java deleted file mode 100644 index fc059915..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetResizedPhotoBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetResizedPhotoBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetResizedPhotoBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetResizedPhotoBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResizedPhotoBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetResizedPhotoBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResizedPhotoBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResizedPhotoBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResizedPhotoBadRequest other = (GetResizedPhotoBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetResizedPhotoBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetResizedPhotoBadRequest build() { - - return new GetResizedPhotoBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoErrors.java deleted file mode 100644 index 2c1246d7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetResizedPhotoErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetResizedPhotoErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetResizedPhotoErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResizedPhotoErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetResizedPhotoErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetResizedPhotoErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetResizedPhotoErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetResizedPhotoErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetResizedPhotoErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResizedPhotoErrors other = (GetResizedPhotoErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetResizedPhotoErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetResizedPhotoErrors build() { - - return new GetResizedPhotoErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoServerErrors.java deleted file mode 100644 index 7dc2c244..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoServerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetResizedPhotoServerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetResizedPhotoServerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetResizedPhotoServerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResizedPhotoServerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetResizedPhotoServerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetResizedPhotoServerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetResizedPhotoServerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetResizedPhotoServerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetResizedPhotoServerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResizedPhotoServerErrors other = (GetResizedPhotoServerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetResizedPhotoServerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetResizedPhotoServerErrors build() { - - return new GetResizedPhotoServerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoUnauthorized.java deleted file mode 100644 index 6f8f6bc3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResizedPhotoUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetResizedPhotoUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetResizedPhotoUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetResizedPhotoUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetResizedPhotoUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResizedPhotoUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetResizedPhotoUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResizedPhotoUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResizedPhotoUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResizedPhotoUnauthorized other = (GetResizedPhotoUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetResizedPhotoUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetResizedPhotoUnauthorized build() { - - return new GetResizedPhotoUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsBadRequest.java deleted file mode 100644 index fa87e0ab..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetResourcesStatisticsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetResourcesStatisticsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetResourcesStatisticsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetResourcesStatisticsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResourcesStatisticsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetResourcesStatisticsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResourcesStatisticsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResourcesStatisticsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResourcesStatisticsBadRequest other = (GetResourcesStatisticsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetResourcesStatisticsBadRequest build() { - - return new GetResourcesStatisticsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsErrors.java deleted file mode 100644 index 941be1c3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetResourcesStatisticsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetResourcesStatisticsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetResourcesStatisticsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResourcesStatisticsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetResourcesStatisticsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetResourcesStatisticsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetResourcesStatisticsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetResourcesStatisticsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetResourcesStatisticsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResourcesStatisticsErrors other = (GetResourcesStatisticsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetResourcesStatisticsErrors build() { - - return new GetResourcesStatisticsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsStatisticsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsStatisticsErrors.java deleted file mode 100644 index 9030f33c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsStatisticsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetResourcesStatisticsStatisticsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetResourcesStatisticsStatisticsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetResourcesStatisticsStatisticsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResourcesStatisticsStatisticsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetResourcesStatisticsStatisticsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetResourcesStatisticsStatisticsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetResourcesStatisticsStatisticsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetResourcesStatisticsStatisticsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetResourcesStatisticsStatisticsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResourcesStatisticsStatisticsErrors other = (GetResourcesStatisticsStatisticsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsStatisticsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetResourcesStatisticsStatisticsErrors build() { - - return new GetResourcesStatisticsStatisticsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsUnauthorized.java deleted file mode 100644 index 72c19e1c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetResourcesStatisticsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetResourcesStatisticsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetResourcesStatisticsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetResourcesStatisticsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetResourcesStatisticsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResourcesStatisticsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetResourcesStatisticsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResourcesStatisticsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResourcesStatisticsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResourcesStatisticsUnauthorized other = (GetResourcesStatisticsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetResourcesStatisticsUnauthorized build() { - - return new GetResourcesStatisticsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesBadRequest.java deleted file mode 100644 index 9fd5c302..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchAllLibrariesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSearchAllLibrariesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchAllLibrariesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchAllLibrariesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchAllLibrariesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchAllLibrariesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchAllLibrariesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchAllLibrariesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesBadRequest other = (GetSearchAllLibrariesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchAllLibrariesBadRequest build() { - - return new GetSearchAllLibrariesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesErrors.java deleted file mode 100644 index 40565674..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchAllLibrariesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSearchAllLibrariesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSearchAllLibrariesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchAllLibrariesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSearchAllLibrariesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSearchAllLibrariesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSearchAllLibrariesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSearchAllLibrariesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSearchAllLibrariesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesErrors other = (GetSearchAllLibrariesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSearchAllLibrariesErrors build() { - - return new GetSearchAllLibrariesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesLibraryErrors.java deleted file mode 100644 index 157d249e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchAllLibrariesLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSearchAllLibrariesLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSearchAllLibrariesLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchAllLibrariesLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSearchAllLibrariesLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSearchAllLibrariesLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSearchAllLibrariesLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSearchAllLibrariesLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSearchAllLibrariesLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesLibraryErrors other = (GetSearchAllLibrariesLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSearchAllLibrariesLibraryErrors build() { - - return new GetSearchAllLibrariesLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesUnauthorized.java deleted file mode 100644 index 7323129d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchAllLibrariesUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchAllLibrariesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSearchAllLibrariesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchAllLibrariesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchAllLibrariesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchAllLibrariesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchAllLibrariesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchAllLibrariesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchAllLibrariesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesUnauthorized other = (GetSearchAllLibrariesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchAllLibrariesUnauthorized build() { - - return new GetSearchAllLibrariesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryBadRequest.java deleted file mode 100644 index 20307f94..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSearchLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchLibraryBadRequest other = (GetSearchLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchLibraryBadRequest build() { - - return new GetSearchLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryErrors.java deleted file mode 100644 index b65848d6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSearchLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSearchLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSearchLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSearchLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSearchLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSearchLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSearchLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchLibraryErrors other = (GetSearchLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSearchLibraryErrors build() { - - return new GetSearchLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryLibraryErrors.java deleted file mode 100644 index 1fc270c1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchLibraryLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSearchLibraryLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSearchLibraryLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchLibraryLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSearchLibraryLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSearchLibraryLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSearchLibraryLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSearchLibraryLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSearchLibraryLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchLibraryLibraryErrors other = (GetSearchLibraryLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSearchLibraryLibraryErrors build() { - - return new GetSearchLibraryLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryUnauthorized.java deleted file mode 100644 index 71cf841d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchLibraryUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSearchLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchLibraryUnauthorized other = (GetSearchLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchLibraryUnauthorized build() { - - return new GetSearchLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsBadRequest.java deleted file mode 100644 index 2cd19d1a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchResultsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSearchResultsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchResultsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchResultsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchResultsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchResultsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchResultsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchResultsBadRequest other = (GetSearchResultsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchResultsBadRequest build() { - - return new GetSearchResultsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsErrors.java deleted file mode 100644 index 35c30ac7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchResultsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSearchResultsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSearchResultsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSearchResultsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSearchResultsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSearchResultsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSearchResultsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSearchResultsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchResultsErrors other = (GetSearchResultsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSearchResultsErrors build() { - - return new GetSearchResultsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsSearchErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsSearchErrors.java deleted file mode 100644 index ac9c8124..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsSearchErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchResultsSearchErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSearchResultsSearchErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSearchResultsSearchErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsSearchErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSearchResultsSearchErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSearchResultsSearchErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSearchResultsSearchErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSearchResultsSearchErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSearchResultsSearchErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchResultsSearchErrors other = (GetSearchResultsSearchErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsSearchErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSearchResultsSearchErrors build() { - - return new GetSearchResultsSearchErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsUnauthorized.java deleted file mode 100644 index 164731b6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSearchResultsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchResultsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSearchResultsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchResultsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchResultsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchResultsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchResultsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchResultsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchResultsUnauthorized other = (GetSearchResultsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchResultsUnauthorized build() { - - return new GetSearchResultsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesActivitiesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesActivitiesErrors.java deleted file mode 100644 index e90fa152..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesActivitiesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerActivitiesActivitiesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetServerActivitiesActivitiesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetServerActivitiesActivitiesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerActivitiesActivitiesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerActivitiesActivitiesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerActivitiesActivitiesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerActivitiesActivitiesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetServerActivitiesActivitiesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetServerActivitiesActivitiesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerActivitiesActivitiesErrors other = (GetServerActivitiesActivitiesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetServerActivitiesActivitiesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetServerActivitiesActivitiesErrors build() { - - return new GetServerActivitiesActivitiesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesBadRequest.java deleted file mode 100644 index 1462f467..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerActivitiesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetServerActivitiesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerActivitiesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerActivitiesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerActivitiesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerActivitiesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerActivitiesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerActivitiesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerActivitiesBadRequest other = (GetServerActivitiesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerActivitiesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerActivitiesBadRequest build() { - - return new GetServerActivitiesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesErrors.java deleted file mode 100644 index 4cc2295b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerActivitiesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetServerActivitiesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetServerActivitiesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerActivitiesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerActivitiesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerActivitiesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerActivitiesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetServerActivitiesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetServerActivitiesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerActivitiesErrors other = (GetServerActivitiesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetServerActivitiesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetServerActivitiesErrors build() { - - return new GetServerActivitiesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesUnauthorized.java deleted file mode 100644 index bfa01b91..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerActivitiesUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerActivitiesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetServerActivitiesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerActivitiesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerActivitiesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerActivitiesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerActivitiesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerActivitiesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerActivitiesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerActivitiesUnauthorized other = (GetServerActivitiesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerActivitiesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerActivitiesUnauthorized build() { - - return new GetServerActivitiesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesBadRequest.java deleted file mode 100644 index 54b73039..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerCapabilitiesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetServerCapabilitiesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerCapabilitiesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerCapabilitiesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerCapabilitiesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerCapabilitiesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerCapabilitiesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerCapabilitiesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerCapabilitiesBadRequest other = (GetServerCapabilitiesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerCapabilitiesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerCapabilitiesBadRequest build() { - - return new GetServerCapabilitiesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesErrors.java deleted file mode 100644 index 7c3152e4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerCapabilitiesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetServerCapabilitiesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetServerCapabilitiesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerCapabilitiesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerCapabilitiesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerCapabilitiesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerCapabilitiesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetServerCapabilitiesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetServerCapabilitiesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerCapabilitiesErrors other = (GetServerCapabilitiesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetServerCapabilitiesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetServerCapabilitiesErrors build() { - - return new GetServerCapabilitiesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesUnauthorized.java deleted file mode 100644 index 03e57955..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerCapabilitiesUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerCapabilitiesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetServerCapabilitiesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerCapabilitiesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerCapabilitiesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerCapabilitiesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerCapabilitiesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerCapabilitiesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerCapabilitiesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerCapabilitiesUnauthorized other = (GetServerCapabilitiesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerCapabilitiesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerCapabilitiesUnauthorized build() { - - return new GetServerCapabilitiesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerIdentityRequestTimeout.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerIdentityRequestTimeout.java deleted file mode 100644 index 80ed085e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerIdentityRequestTimeout.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - -/** - * GetServerIdentityRequestTimeout - * - *

Request Timeout - */ -@SuppressWarnings("serial") -public class GetServerIdentityRequestTimeout extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerIdentityRequestTimeout( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("RawResponse") Optional> rawResponse) { - super(Utils.valueOrElse(message, "API error occurred")); - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.code = code; - this.message = message; - this.rawResponse = rawResponse; - } - - public GetServerIdentityRequestTimeout() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - @Override - public String getMessage() { - return Utils.valueOrNull(message); - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerIdentityRequestTimeout withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerIdentityRequestTimeout withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerIdentityRequestTimeout withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerIdentityRequestTimeout withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerIdentityRequestTimeout withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerIdentityRequestTimeout withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerIdentityRequestTimeout other = (GetServerIdentityRequestTimeout) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerIdentityRequestTimeout.class, - "code", code, - "message", message, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerIdentityRequestTimeout build() { - - return new GetServerIdentityRequestTimeout( - code, message, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerListBadRequest.java deleted file mode 100644 index 7e1b331b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerListBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetServerListBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerListBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerListBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerListBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerListBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerListBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerListBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerListBadRequest other = (GetServerListBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerListBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerListBadRequest build() { - - return new GetServerListBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerListErrors.java deleted file mode 100644 index 3f482d30..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerListErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetServerListErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetServerListErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerListErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerListErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerListErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerListErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetServerListErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetServerListErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerListErrors other = (GetServerListErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetServerListErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetServerListErrors build() { - - return new GetServerListErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerListServerErrors.java deleted file mode 100644 index 13eeba01..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListServerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerListServerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetServerListServerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetServerListServerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerListServerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerListServerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerListServerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerListServerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetServerListServerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetServerListServerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerListServerErrors other = (GetServerListServerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetServerListServerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetServerListServerErrors build() { - - return new GetServerListServerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerListUnauthorized.java deleted file mode 100644 index e8d81033..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerListUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerListUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetServerListUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerListUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerListUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerListUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerListUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerListUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerListUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerListUnauthorized other = (GetServerListUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerListUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerListUnauthorized build() { - - return new GetServerListUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesBadRequest.java deleted file mode 100644 index e32fd702..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerPreferencesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetServerPreferencesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerPreferencesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerPreferencesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerPreferencesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerPreferencesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerPreferencesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerPreferencesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerPreferencesBadRequest other = (GetServerPreferencesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerPreferencesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerPreferencesBadRequest build() { - - return new GetServerPreferencesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesErrors.java deleted file mode 100644 index befc6770..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerPreferencesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetServerPreferencesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetServerPreferencesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerPreferencesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerPreferencesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerPreferencesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerPreferencesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetServerPreferencesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetServerPreferencesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerPreferencesErrors other = (GetServerPreferencesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetServerPreferencesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetServerPreferencesErrors build() { - - return new GetServerPreferencesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesServerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesServerErrors.java deleted file mode 100644 index 6e0b330e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesServerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerPreferencesServerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetServerPreferencesServerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetServerPreferencesServerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerPreferencesServerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerPreferencesServerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerPreferencesServerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerPreferencesServerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetServerPreferencesServerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetServerPreferencesServerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerPreferencesServerErrors other = (GetServerPreferencesServerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetServerPreferencesServerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetServerPreferencesServerErrors build() { - - return new GetServerPreferencesServerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesUnauthorized.java deleted file mode 100644 index 9b51024f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerPreferencesUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerPreferencesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetServerPreferencesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerPreferencesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerPreferencesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerPreferencesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerPreferencesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerPreferencesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerPreferencesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerPreferencesUnauthorized other = (GetServerPreferencesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerPreferencesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerPreferencesUnauthorized build() { - - return new GetServerPreferencesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesBadRequest.java deleted file mode 100644 index 09d5ad13..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerResourcesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetServerResourcesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerResourcesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerResourcesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerResourcesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerResourcesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerResourcesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerResourcesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerResourcesBadRequest other = (GetServerResourcesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerResourcesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerResourcesBadRequest build() { - - return new GetServerResourcesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesErrors.java deleted file mode 100644 index 8ffc345c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerResourcesErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetServerResourcesErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetServerResourcesErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerResourcesErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerResourcesErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerResourcesErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerResourcesErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetServerResourcesErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetServerResourcesErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerResourcesErrors other = (GetServerResourcesErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetServerResourcesErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetServerResourcesErrors build() { - - return new GetServerResourcesErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesPlexErrors.java deleted file mode 100644 index 58cd038d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesPlexErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerResourcesPlexErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetServerResourcesPlexErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetServerResourcesPlexErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerResourcesPlexErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerResourcesPlexErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerResourcesPlexErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerResourcesPlexErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetServerResourcesPlexErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetServerResourcesPlexErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerResourcesPlexErrors other = (GetServerResourcesPlexErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetServerResourcesPlexErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetServerResourcesPlexErrors build() { - - return new GetServerResourcesPlexErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesUnauthorized.java deleted file mode 100644 index 5779c72f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetServerResourcesUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerResourcesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetServerResourcesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerResourcesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerResourcesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerResourcesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerResourcesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerResourcesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerResourcesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerResourcesUnauthorized other = (GetServerResourcesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerResourcesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerResourcesUnauthorized build() { - - return new GetServerResourcesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryBadRequest.java deleted file mode 100644 index 4477a496..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSessionHistoryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSessionHistoryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSessionHistoryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSessionHistoryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionHistoryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSessionHistoryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionHistoryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionHistoryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionHistoryBadRequest other = (GetSessionHistoryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSessionHistoryBadRequest build() { - - return new GetSessionHistoryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryErrors.java deleted file mode 100644 index eb85fedf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSessionHistoryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSessionHistoryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSessionHistoryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionHistoryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSessionHistoryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSessionHistoryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSessionHistoryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSessionHistoryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSessionHistoryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionHistoryErrors other = (GetSessionHistoryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSessionHistoryErrors build() { - - return new GetSessionHistoryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistorySessionsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistorySessionsErrors.java deleted file mode 100644 index 34a67ee9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistorySessionsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSessionHistorySessionsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSessionHistorySessionsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSessionHistorySessionsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionHistorySessionsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSessionHistorySessionsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSessionHistorySessionsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSessionHistorySessionsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSessionHistorySessionsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSessionHistorySessionsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionHistorySessionsErrors other = (GetSessionHistorySessionsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistorySessionsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSessionHistorySessionsErrors build() { - - return new GetSessionHistorySessionsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryUnauthorized.java deleted file mode 100644 index 0ffab36f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionHistoryUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSessionHistoryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSessionHistoryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSessionHistoryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSessionHistoryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionHistoryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSessionHistoryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionHistoryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionHistoryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionHistoryUnauthorized other = (GetSessionHistoryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSessionHistoryUnauthorized build() { - - return new GetSessionHistoryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsBadRequest.java deleted file mode 100644 index 7e1aa357..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSessionsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSessionsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSessionsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSessionsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSessionsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionsBadRequest other = (GetSessionsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSessionsBadRequest build() { - - return new GetSessionsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsErrors.java deleted file mode 100644 index 6b59f7db..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSessionsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSessionsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSessionsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSessionsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSessionsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSessionsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSessionsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSessionsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionsErrors other = (GetSessionsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSessionsErrors build() { - - return new GetSessionsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsSessionsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsSessionsErrors.java deleted file mode 100644 index b791d8a5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsSessionsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSessionsSessionsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSessionsSessionsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSessionsSessionsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsSessionsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSessionsSessionsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSessionsSessionsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSessionsSessionsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSessionsSessionsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSessionsSessionsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionsSessionsErrors other = (GetSessionsSessionsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsSessionsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSessionsSessionsErrors build() { - - return new GetSessionsSessionsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsUnauthorized.java deleted file mode 100644 index b7e2e304..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSessionsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSessionsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSessionsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSessionsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSessionsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSessionsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionsUnauthorized other = (GetSessionsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSessionsUnauthorized build() { - - return new GetSessionsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationAuthenticationErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationAuthenticationErrors.java deleted file mode 100644 index 2dcae766..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationAuthenticationErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSourceConnectionInformationAuthenticationErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSourceConnectionInformationAuthenticationErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSourceConnectionInformationAuthenticationErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSourceConnectionInformationAuthenticationErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSourceConnectionInformationAuthenticationErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSourceConnectionInformationAuthenticationErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSourceConnectionInformationAuthenticationErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSourceConnectionInformationAuthenticationErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSourceConnectionInformationAuthenticationErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSourceConnectionInformationAuthenticationErrors other = (GetSourceConnectionInformationAuthenticationErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSourceConnectionInformationAuthenticationErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSourceConnectionInformationAuthenticationErrors build() { - - return new GetSourceConnectionInformationAuthenticationErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationBadRequest.java deleted file mode 100644 index 87e5e7ee..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSourceConnectionInformationBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSourceConnectionInformationBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSourceConnectionInformationBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSourceConnectionInformationBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSourceConnectionInformationBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSourceConnectionInformationBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSourceConnectionInformationBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSourceConnectionInformationBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSourceConnectionInformationBadRequest other = (GetSourceConnectionInformationBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSourceConnectionInformationBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSourceConnectionInformationBadRequest build() { - - return new GetSourceConnectionInformationBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationErrors.java deleted file mode 100644 index 89577330..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSourceConnectionInformationErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetSourceConnectionInformationErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetSourceConnectionInformationErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSourceConnectionInformationErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetSourceConnectionInformationErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetSourceConnectionInformationErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetSourceConnectionInformationErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetSourceConnectionInformationErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetSourceConnectionInformationErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSourceConnectionInformationErrors other = (GetSourceConnectionInformationErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetSourceConnectionInformationErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetSourceConnectionInformationErrors build() { - - return new GetSourceConnectionInformationErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationUnauthorized.java deleted file mode 100644 index 0781eb0e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetSourceConnectionInformationUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSourceConnectionInformationUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSourceConnectionInformationUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSourceConnectionInformationUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSourceConnectionInformationUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSourceConnectionInformationUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSourceConnectionInformationUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSourceConnectionInformationUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSourceConnectionInformationUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSourceConnectionInformationUnauthorized other = (GetSourceConnectionInformationUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSourceConnectionInformationUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSourceConnectionInformationUnauthorized build() { - - return new GetSourceConnectionInformationUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsBadRequest.java deleted file mode 100644 index 20ce3e7d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetStatisticsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetStatisticsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetStatisticsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetStatisticsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetStatisticsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetStatisticsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetStatisticsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetStatisticsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetStatisticsBadRequest other = (GetStatisticsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetStatisticsBadRequest build() { - - return new GetStatisticsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsErrors.java deleted file mode 100644 index 46010076..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetStatisticsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetStatisticsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetStatisticsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetStatisticsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetStatisticsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetStatisticsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetStatisticsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetStatisticsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetStatisticsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetStatisticsErrors other = (GetStatisticsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetStatisticsErrors build() { - - return new GetStatisticsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsStatisticsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsStatisticsErrors.java deleted file mode 100644 index ea52939d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsStatisticsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetStatisticsStatisticsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetStatisticsStatisticsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetStatisticsStatisticsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetStatisticsStatisticsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetStatisticsStatisticsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetStatisticsStatisticsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetStatisticsStatisticsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetStatisticsStatisticsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetStatisticsStatisticsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetStatisticsStatisticsErrors other = (GetStatisticsStatisticsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsStatisticsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetStatisticsStatisticsErrors build() { - - return new GetStatisticsStatisticsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsUnauthorized.java deleted file mode 100644 index 9924704c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetStatisticsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetStatisticsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetStatisticsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetStatisticsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetStatisticsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetStatisticsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetStatisticsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetStatisticsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetStatisticsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetStatisticsUnauthorized other = (GetStatisticsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetStatisticsUnauthorized build() { - - return new GetStatisticsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageBadRequest.java deleted file mode 100644 index 95aaaeec..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetThumbImageBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetThumbImageBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetThumbImageBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetThumbImageBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetThumbImageBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetThumbImageBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetThumbImageBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetThumbImageBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetThumbImageBadRequest other = (GetThumbImageBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetThumbImageBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetThumbImageBadRequest build() { - - return new GetThumbImageBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageErrors.java deleted file mode 100644 index a21b3b5a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetThumbImageErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetThumbImageErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetThumbImageErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetThumbImageErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetThumbImageErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetThumbImageErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetThumbImageErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetThumbImageErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetThumbImageErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetThumbImageErrors other = (GetThumbImageErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetThumbImageErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetThumbImageErrors build() { - - return new GetThumbImageErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageMediaErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageMediaErrors.java deleted file mode 100644 index d8a172be..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageMediaErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetThumbImageMediaErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetThumbImageMediaErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetThumbImageMediaErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetThumbImageMediaErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetThumbImageMediaErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetThumbImageMediaErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetThumbImageMediaErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetThumbImageMediaErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetThumbImageMediaErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetThumbImageMediaErrors other = (GetThumbImageMediaErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetThumbImageMediaErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetThumbImageMediaErrors build() { - - return new GetThumbImageMediaErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageUnauthorized.java deleted file mode 100644 index e05a3d92..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetThumbImageUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetThumbImageUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetThumbImageUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetThumbImageUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetThumbImageUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetThumbImageUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetThumbImageUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetThumbImageUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetThumbImageUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetThumbImageUnauthorized other = (GetThumbImageUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetThumbImageUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetThumbImageUnauthorized build() { - - return new GetThumbImageUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineBadRequest.java deleted file mode 100644 index c25913fa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTimelineBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTimelineBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTimelineBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTimelineBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTimelineBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTimelineBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTimelineBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTimelineBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTimelineBadRequest other = (GetTimelineBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTimelineBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTimelineBadRequest build() { - - return new GetTimelineBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineErrors.java deleted file mode 100644 index 45c9630a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTimelineErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTimelineErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTimelineErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTimelineErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTimelineErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTimelineErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTimelineErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTimelineErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTimelineErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTimelineErrors other = (GetTimelineErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTimelineErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTimelineErrors build() { - - return new GetTimelineErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineUnauthorized.java deleted file mode 100644 index 422f8dab..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTimelineUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetTimelineUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTimelineUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTimelineUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTimelineUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTimelineUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTimelineUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTimelineUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTimelineUnauthorized other = (GetTimelineUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTimelineUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTimelineUnauthorized build() { - - return new GetTimelineUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineVideoErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineVideoErrors.java deleted file mode 100644 index be1c8559..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTimelineVideoErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTimelineVideoErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTimelineVideoErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTimelineVideoErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTimelineVideoErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTimelineVideoErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTimelineVideoErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTimelineVideoErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTimelineVideoErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTimelineVideoErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTimelineVideoErrors other = (GetTimelineVideoErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTimelineVideoErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTimelineVideoErrors build() { - - return new GetTimelineVideoErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdBadRequest.java deleted file mode 100644 index 5d934cbd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTokenByPinIdBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTokenByPinIdBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTokenByPinIdBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTokenByPinIdBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenByPinIdBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTokenByPinIdBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenByPinIdBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenByPinIdBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdBadRequest other = (GetTokenByPinIdBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTokenByPinIdBadRequest build() { - - return new GetTokenByPinIdBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdErrors.java deleted file mode 100644 index c5893bbf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTokenByPinIdErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTokenByPinIdErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTokenByPinIdErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenByPinIdErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTokenByPinIdErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTokenByPinIdErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTokenByPinIdErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTokenByPinIdErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTokenByPinIdErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdErrors other = (GetTokenByPinIdErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTokenByPinIdErrors build() { - - return new GetTokenByPinIdErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdPlexErrors.java deleted file mode 100644 index f10a04ad..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdPlexErrors.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTokenByPinIdPlexErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - @JsonCreator - public GetTokenByPinIdPlexErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - this.code = code; - this.message = message; - } - - public GetTokenByPinIdPlexErrors() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenByPinIdPlexErrors withCode(long code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTokenByPinIdPlexErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTokenByPinIdPlexErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTokenByPinIdPlexErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdPlexErrors other = (GetTokenByPinIdPlexErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdPlexErrors.class, - "code", code, - "message", message); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(long code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTokenByPinIdPlexErrors build() { - - return new GetTokenByPinIdPlexErrors( - code, message); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdResponseBody.java deleted file mode 100644 index 77192a55..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenByPinIdResponseBody.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTokenByPinIdResponseBody - * - *

Not Found or Expired - */ -@SuppressWarnings("serial") -public class GetTokenByPinIdResponseBody extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTokenByPinIdResponseBody( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTokenByPinIdResponseBody() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenByPinIdResponseBody withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTokenByPinIdResponseBody withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenByPinIdResponseBody withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenByPinIdResponseBody withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdResponseBody other = (GetTokenByPinIdResponseBody) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdResponseBody.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTokenByPinIdResponseBody build() { - - return new GetTokenByPinIdResponseBody( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsAuthenticationErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsAuthenticationErrors.java deleted file mode 100644 index 852a8326..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsAuthenticationErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTokenDetailsAuthenticationErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTokenDetailsAuthenticationErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTokenDetailsAuthenticationErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenDetailsAuthenticationErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTokenDetailsAuthenticationErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTokenDetailsAuthenticationErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTokenDetailsAuthenticationErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTokenDetailsAuthenticationErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTokenDetailsAuthenticationErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenDetailsAuthenticationErrors other = (GetTokenDetailsAuthenticationErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTokenDetailsAuthenticationErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTokenDetailsAuthenticationErrors build() { - - return new GetTokenDetailsAuthenticationErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsBadRequest.java deleted file mode 100644 index 32ae5eb6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTokenDetailsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTokenDetailsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTokenDetailsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTokenDetailsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenDetailsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTokenDetailsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenDetailsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenDetailsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenDetailsBadRequest other = (GetTokenDetailsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTokenDetailsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTokenDetailsBadRequest build() { - - return new GetTokenDetailsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsErrors.java deleted file mode 100644 index e6d7315b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTokenDetailsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTokenDetailsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTokenDetailsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenDetailsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTokenDetailsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTokenDetailsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTokenDetailsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTokenDetailsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTokenDetailsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenDetailsErrors other = (GetTokenDetailsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTokenDetailsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTokenDetailsErrors build() { - - return new GetTokenDetailsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsUnauthorized.java deleted file mode 100644 index 99b24e52..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTokenDetailsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTokenDetailsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetTokenDetailsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTokenDetailsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTokenDetailsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenDetailsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTokenDetailsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenDetailsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenDetailsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenDetailsUnauthorized other = (GetTokenDetailsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTokenDetailsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTokenDetailsUnauthorized build() { - - return new GetTokenDetailsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentBadRequest.java deleted file mode 100644 index 43ec00bc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTopWatchedContentBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTopWatchedContentBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTopWatchedContentBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTopWatchedContentBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTopWatchedContentBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTopWatchedContentBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTopWatchedContentBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopWatchedContentBadRequest other = (GetTopWatchedContentBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTopWatchedContentBadRequest build() { - - return new GetTopWatchedContentBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentErrors.java deleted file mode 100644 index 4b519a01..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTopWatchedContentErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTopWatchedContentErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTopWatchedContentErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTopWatchedContentErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTopWatchedContentErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTopWatchedContentErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTopWatchedContentErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTopWatchedContentErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopWatchedContentErrors other = (GetTopWatchedContentErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTopWatchedContentErrors build() { - - return new GetTopWatchedContentErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentLibraryErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentLibraryErrors.java deleted file mode 100644 index 70469bd7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentLibraryErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTopWatchedContentLibraryErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTopWatchedContentLibraryErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTopWatchedContentLibraryErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentLibraryErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTopWatchedContentLibraryErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTopWatchedContentLibraryErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTopWatchedContentLibraryErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTopWatchedContentLibraryErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTopWatchedContentLibraryErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopWatchedContentLibraryErrors other = (GetTopWatchedContentLibraryErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentLibraryErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTopWatchedContentLibraryErrors build() { - - return new GetTopWatchedContentLibraryErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentUnauthorized.java deleted file mode 100644 index 2015670e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTopWatchedContentUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTopWatchedContentUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetTopWatchedContentUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTopWatchedContentUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTopWatchedContentUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTopWatchedContentUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTopWatchedContentUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTopWatchedContentUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopWatchedContentUnauthorized other = (GetTopWatchedContentUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTopWatchedContentUnauthorized build() { - - return new GetTopWatchedContentUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsBadRequest.java deleted file mode 100644 index 59fc1388..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTranscodeSessionsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTranscodeSessionsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTranscodeSessionsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTranscodeSessionsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTranscodeSessionsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTranscodeSessionsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTranscodeSessionsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTranscodeSessionsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTranscodeSessionsBadRequest other = (GetTranscodeSessionsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTranscodeSessionsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTranscodeSessionsBadRequest build() { - - return new GetTranscodeSessionsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsErrors.java deleted file mode 100644 index 73de9db2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTranscodeSessionsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTranscodeSessionsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTranscodeSessionsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTranscodeSessionsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTranscodeSessionsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTranscodeSessionsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTranscodeSessionsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTranscodeSessionsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTranscodeSessionsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTranscodeSessionsErrors other = (GetTranscodeSessionsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTranscodeSessionsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTranscodeSessionsErrors build() { - - return new GetTranscodeSessionsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsSessionsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsSessionsErrors.java deleted file mode 100644 index c276d439..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsSessionsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTranscodeSessionsSessionsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTranscodeSessionsSessionsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTranscodeSessionsSessionsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTranscodeSessionsSessionsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTranscodeSessionsSessionsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTranscodeSessionsSessionsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTranscodeSessionsSessionsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTranscodeSessionsSessionsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTranscodeSessionsSessionsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTranscodeSessionsSessionsErrors other = (GetTranscodeSessionsSessionsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTranscodeSessionsSessionsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTranscodeSessionsSessionsErrors build() { - - return new GetTranscodeSessionsSessionsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsUnauthorized.java deleted file mode 100644 index c962fec2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTranscodeSessionsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTranscodeSessionsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetTranscodeSessionsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTranscodeSessionsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTranscodeSessionsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTranscodeSessionsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTranscodeSessionsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTranscodeSessionsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTranscodeSessionsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTranscodeSessionsUnauthorized other = (GetTranscodeSessionsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTranscodeSessionsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTranscodeSessionsUnauthorized build() { - - return new GetTranscodeSessionsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenAuthenticationErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenAuthenticationErrors.java deleted file mode 100644 index 20e7b31d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenAuthenticationErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTransientTokenAuthenticationErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTransientTokenAuthenticationErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTransientTokenAuthenticationErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTransientTokenAuthenticationErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTransientTokenAuthenticationErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTransientTokenAuthenticationErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTransientTokenAuthenticationErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTransientTokenAuthenticationErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTransientTokenAuthenticationErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTransientTokenAuthenticationErrors other = (GetTransientTokenAuthenticationErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTransientTokenAuthenticationErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTransientTokenAuthenticationErrors build() { - - return new GetTransientTokenAuthenticationErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenBadRequest.java deleted file mode 100644 index 42f11abc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTransientTokenBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTransientTokenBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTransientTokenBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTransientTokenBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTransientTokenBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTransientTokenBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTransientTokenBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTransientTokenBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTransientTokenBadRequest other = (GetTransientTokenBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTransientTokenBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTransientTokenBadRequest build() { - - return new GetTransientTokenBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenErrors.java deleted file mode 100644 index b4cd149c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTransientTokenErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetTransientTokenErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetTransientTokenErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTransientTokenErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetTransientTokenErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTransientTokenErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetTransientTokenErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetTransientTokenErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetTransientTokenErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTransientTokenErrors other = (GetTransientTokenErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetTransientTokenErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetTransientTokenErrors build() { - - return new GetTransientTokenErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenUnauthorized.java deleted file mode 100644 index 0cb5ad96..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetTransientTokenUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTransientTokenUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetTransientTokenUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTransientTokenUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTransientTokenUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTransientTokenUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTransientTokenUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTransientTokenUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTransientTokenUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTransientTokenUnauthorized other = (GetTransientTokenUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTransientTokenUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTransientTokenUnauthorized build() { - - return new GetTransientTokenUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusBadRequest.java deleted file mode 100644 index 2224093f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUpdateStatusBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetUpdateStatusBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUpdateStatusBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUpdateStatusBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUpdateStatusBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUpdateStatusBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUpdateStatusBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUpdateStatusBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUpdateStatusBadRequest other = (GetUpdateStatusBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUpdateStatusBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUpdateStatusBadRequest build() { - - return new GetUpdateStatusBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusErrors.java deleted file mode 100644 index 9eb47250..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetUpdateStatusErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetUpdateStatusErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetUpdateStatusErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUpdateStatusErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetUpdateStatusErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetUpdateStatusErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetUpdateStatusErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetUpdateStatusErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetUpdateStatusErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUpdateStatusErrors other = (GetUpdateStatusErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetUpdateStatusErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetUpdateStatusErrors build() { - - return new GetUpdateStatusErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUnauthorized.java deleted file mode 100644 index db84e0ec..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUpdateStatusUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetUpdateStatusUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUpdateStatusUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUpdateStatusUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUpdateStatusUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUpdateStatusUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUpdateStatusUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUpdateStatusUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUpdateStatusUnauthorized other = (GetUpdateStatusUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUpdateStatusUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUpdateStatusUnauthorized build() { - - return new GetUpdateStatusUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUpdaterErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUpdaterErrors.java deleted file mode 100644 index d0d2cd11..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUpdateStatusUpdaterErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetUpdateStatusUpdaterErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetUpdateStatusUpdaterErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetUpdateStatusUpdaterErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUpdateStatusUpdaterErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetUpdateStatusUpdaterErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetUpdateStatusUpdaterErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetUpdateStatusUpdaterErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetUpdateStatusUpdaterErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetUpdateStatusUpdaterErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUpdateStatusUpdaterErrors other = (GetUpdateStatusUpdaterErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetUpdateStatusUpdaterErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetUpdateStatusUpdaterErrors build() { - - return new GetUpdateStatusUpdaterErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsBadRequest.java deleted file mode 100644 index 87545485..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUserFriendsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetUserFriendsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUserFriendsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUserFriendsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUserFriendsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUserFriendsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUserFriendsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUserFriendsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUserFriendsBadRequest other = (GetUserFriendsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUserFriendsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUserFriendsBadRequest build() { - - return new GetUserFriendsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsErrors.java deleted file mode 100644 index e197e0bb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetUserFriendsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetUserFriendsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetUserFriendsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUserFriendsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetUserFriendsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetUserFriendsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetUserFriendsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetUserFriendsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetUserFriendsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUserFriendsErrors other = (GetUserFriendsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetUserFriendsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetUserFriendsErrors build() { - - return new GetUserFriendsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsPlexErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsPlexErrors.java deleted file mode 100644 index 42f1581d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsPlexErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetUserFriendsPlexErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetUserFriendsPlexErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetUserFriendsPlexErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUserFriendsPlexErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetUserFriendsPlexErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetUserFriendsPlexErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetUserFriendsPlexErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetUserFriendsPlexErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetUserFriendsPlexErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUserFriendsPlexErrors other = (GetUserFriendsPlexErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetUserFriendsPlexErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetUserFriendsPlexErrors build() { - - return new GetUserFriendsPlexErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsUnauthorized.java deleted file mode 100644 index 465a293f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUserFriendsUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUserFriendsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetUserFriendsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUserFriendsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUserFriendsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUserFriendsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUserFriendsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUserFriendsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUserFriendsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUserFriendsUnauthorized other = (GetUserFriendsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUserFriendsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUserFriendsUnauthorized build() { - - return new GetUserFriendsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUsersBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUsersBadRequest.java deleted file mode 100644 index 779c9445..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUsersBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUsersBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetUsersBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUsersBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUsersBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUsersBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUsersBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUsersBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUsersBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersBadRequest other = (GetUsersBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUsersBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUsersBadRequest build() { - - return new GetUsersBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUsersErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUsersErrors.java deleted file mode 100644 index 000c5a00..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUsersErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetUsersErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetUsersErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetUsersErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUsersErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetUsersErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetUsersErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetUsersErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetUsersErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetUsersErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersErrors other = (GetUsersErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetUsersErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetUsersErrors build() { - - return new GetUsersErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUsersUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUsersUnauthorized.java deleted file mode 100644 index 4c6188be..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUsersUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUsersUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetUsersUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUsersUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUsersUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUsersUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUsersUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUsersUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUsersUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersUnauthorized other = (GetUsersUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUsersUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUsersUnauthorized build() { - - return new GetUsersUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetUsersUsersErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetUsersUsersErrors.java deleted file mode 100644 index dcce047e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetUsersUsersErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetUsersUsersErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetUsersUsersErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetUsersUsersErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUsersUsersErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetUsersUsersErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetUsersUsersErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetUsersUsersErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetUsersUsersErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetUsersUsersErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersUsersErrors other = (GetUsersUsersErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetUsersUsersErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetUsersUsersErrors build() { - - return new GetUsersUsersErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListBadRequest.java deleted file mode 100644 index 25d64ba6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetWatchListBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetWatchListBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetWatchListBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetWatchListBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetWatchListBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetWatchListBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetWatchListBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetWatchListBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetWatchListBadRequest other = (GetWatchListBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetWatchListBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetWatchListBadRequest build() { - - return new GetWatchListBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListErrors.java deleted file mode 100644 index 3e94d7d7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetWatchListErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetWatchListErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetWatchListErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetWatchListErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetWatchListErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetWatchListErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetWatchListErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetWatchListErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetWatchListErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetWatchListErrors other = (GetWatchListErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetWatchListErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetWatchListErrors build() { - - return new GetWatchListErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListUnauthorized.java deleted file mode 100644 index f60fe2ed..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetWatchListUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetWatchListUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetWatchListUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetWatchListUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetWatchListUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetWatchListUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetWatchListUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetWatchListUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetWatchListUnauthorized other = (GetWatchListUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetWatchListUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetWatchListUnauthorized build() { - - return new GetWatchListUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListWatchlistErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListWatchlistErrors.java deleted file mode 100644 index 3479d130..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetWatchListWatchlistErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetWatchListWatchlistErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public GetWatchListWatchlistErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public GetWatchListWatchlistErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetWatchListWatchlistErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetWatchListWatchlistErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetWatchListWatchlistErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetWatchListWatchlistErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public GetWatchListWatchlistErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetWatchListWatchlistErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetWatchListWatchlistErrors other = (GetWatchListWatchlistErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(GetWatchListWatchlistErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetWatchListWatchlistErrors build() { - - return new GetWatchListWatchlistErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogLineBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/LogLineBadRequest.java deleted file mode 100644 index 4355191b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogLineBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * LogLineBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class LogLineBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public LogLineBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public LogLineBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogLineBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public LogLineBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogLineBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogLineBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogLineBadRequest other = (LogLineBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogLineBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogLineBadRequest build() { - - return new LogLineBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogLineErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/LogLineErrors.java deleted file mode 100644 index 4c1f6970..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogLineErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class LogLineErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public LogLineErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public LogLineErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogLineErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public LogLineErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public LogLineErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public LogLineErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public LogLineErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public LogLineErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogLineErrors other = (LogLineErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(LogLineErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public LogLineErrors build() { - - return new LogLineErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogLineLogErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/LogLineLogErrors.java deleted file mode 100644 index bec5f571..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogLineLogErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class LogLineLogErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public LogLineLogErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public LogLineLogErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogLineLogErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public LogLineLogErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public LogLineLogErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public LogLineLogErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public LogLineLogErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public LogLineLogErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogLineLogErrors other = (LogLineLogErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(LogLineLogErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public LogLineLogErrors build() { - - return new LogLineLogErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogLineUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/LogLineUnauthorized.java deleted file mode 100644 index c506c71b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogLineUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * LogLineUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class LogLineUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public LogLineUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public LogLineUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogLineUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public LogLineUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogLineUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogLineUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogLineUnauthorized other = (LogLineUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogLineUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogLineUnauthorized build() { - - return new LogLineUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineBadRequest.java deleted file mode 100644 index c5337e11..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * LogMultiLineBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class LogMultiLineBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public LogMultiLineBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public LogMultiLineBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogMultiLineBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public LogMultiLineBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogMultiLineBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogMultiLineBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogMultiLineBadRequest other = (LogMultiLineBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogMultiLineBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogMultiLineBadRequest build() { - - return new LogMultiLineBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineErrors.java deleted file mode 100644 index cebd9538..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class LogMultiLineErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public LogMultiLineErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public LogMultiLineErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogMultiLineErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public LogMultiLineErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public LogMultiLineErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public LogMultiLineErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public LogMultiLineErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public LogMultiLineErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogMultiLineErrors other = (LogMultiLineErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(LogMultiLineErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public LogMultiLineErrors build() { - - return new LogMultiLineErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineLogErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineLogErrors.java deleted file mode 100644 index 20122b87..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineLogErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class LogMultiLineLogErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public LogMultiLineLogErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public LogMultiLineLogErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogMultiLineLogErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public LogMultiLineLogErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public LogMultiLineLogErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public LogMultiLineLogErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public LogMultiLineLogErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public LogMultiLineLogErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogMultiLineLogErrors other = (LogMultiLineLogErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(LogMultiLineLogErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public LogMultiLineLogErrors build() { - - return new LogMultiLineLogErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineUnauthorized.java deleted file mode 100644 index 47cee054..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/LogMultiLineUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * LogMultiLineUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class LogMultiLineUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public LogMultiLineUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public LogMultiLineUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogMultiLineUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public LogMultiLineUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogMultiLineUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogMultiLineUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogMultiLineUnauthorized other = (LogMultiLineUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogMultiLineUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogMultiLineUnauthorized build() { - - return new LogMultiLineUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedBadRequest.java deleted file mode 100644 index d3ff3f17..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * MarkPlayedBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class MarkPlayedBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public MarkPlayedBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public MarkPlayedBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkPlayedBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public MarkPlayedBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkPlayedBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkPlayedBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkPlayedBadRequest other = (MarkPlayedBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(MarkPlayedBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public MarkPlayedBadRequest build() { - - return new MarkPlayedBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedErrors.java deleted file mode 100644 index bbe710c6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class MarkPlayedErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public MarkPlayedErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public MarkPlayedErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkPlayedErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public MarkPlayedErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public MarkPlayedErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public MarkPlayedErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public MarkPlayedErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public MarkPlayedErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkPlayedErrors other = (MarkPlayedErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(MarkPlayedErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public MarkPlayedErrors build() { - - return new MarkPlayedErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedMediaErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedMediaErrors.java deleted file mode 100644 index 437a149c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedMediaErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class MarkPlayedMediaErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public MarkPlayedMediaErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public MarkPlayedMediaErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkPlayedMediaErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public MarkPlayedMediaErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public MarkPlayedMediaErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public MarkPlayedMediaErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public MarkPlayedMediaErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public MarkPlayedMediaErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkPlayedMediaErrors other = (MarkPlayedMediaErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(MarkPlayedMediaErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public MarkPlayedMediaErrors build() { - - return new MarkPlayedMediaErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedUnauthorized.java deleted file mode 100644 index fc8fdee3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkPlayedUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * MarkPlayedUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class MarkPlayedUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public MarkPlayedUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public MarkPlayedUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkPlayedUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public MarkPlayedUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkPlayedUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkPlayedUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkPlayedUnauthorized other = (MarkPlayedUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(MarkPlayedUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public MarkPlayedUnauthorized build() { - - return new MarkPlayedUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedBadRequest.java deleted file mode 100644 index e6c5d73a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * MarkUnplayedBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class MarkUnplayedBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public MarkUnplayedBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public MarkUnplayedBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkUnplayedBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public MarkUnplayedBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkUnplayedBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkUnplayedBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkUnplayedBadRequest other = (MarkUnplayedBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(MarkUnplayedBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public MarkUnplayedBadRequest build() { - - return new MarkUnplayedBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedErrors.java deleted file mode 100644 index bfe0ac17..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class MarkUnplayedErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public MarkUnplayedErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public MarkUnplayedErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkUnplayedErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public MarkUnplayedErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public MarkUnplayedErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public MarkUnplayedErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public MarkUnplayedErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public MarkUnplayedErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkUnplayedErrors other = (MarkUnplayedErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(MarkUnplayedErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public MarkUnplayedErrors build() { - - return new MarkUnplayedErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedMediaErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedMediaErrors.java deleted file mode 100644 index 2227b40d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedMediaErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class MarkUnplayedMediaErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public MarkUnplayedMediaErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public MarkUnplayedMediaErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkUnplayedMediaErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public MarkUnplayedMediaErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public MarkUnplayedMediaErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public MarkUnplayedMediaErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public MarkUnplayedMediaErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public MarkUnplayedMediaErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkUnplayedMediaErrors other = (MarkUnplayedMediaErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(MarkUnplayedMediaErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public MarkUnplayedMediaErrors build() { - - return new MarkUnplayedMediaErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedUnauthorized.java deleted file mode 100644 index 9a404384..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/MarkUnplayedUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * MarkUnplayedUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class MarkUnplayedUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public MarkUnplayedUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public MarkUnplayedUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkUnplayedUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public MarkUnplayedUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkUnplayedUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkUnplayedUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkUnplayedUnauthorized other = (MarkUnplayedUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(MarkUnplayedUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public MarkUnplayedUnauthorized build() { - - return new MarkUnplayedUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchBadRequest.java deleted file mode 100644 index a3b30263..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PerformSearchBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class PerformSearchBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PerformSearchBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PerformSearchBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformSearchBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PerformSearchBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformSearchBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformSearchBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformSearchBadRequest other = (PerformSearchBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformSearchBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformSearchBadRequest build() { - - return new PerformSearchBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchErrors.java deleted file mode 100644 index c2d9eb48..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PerformSearchErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public PerformSearchErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public PerformSearchErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformSearchErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public PerformSearchErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public PerformSearchErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public PerformSearchErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public PerformSearchErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public PerformSearchErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformSearchErrors other = (PerformSearchErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(PerformSearchErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public PerformSearchErrors build() { - - return new PerformSearchErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchSearchErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchSearchErrors.java deleted file mode 100644 index 5848b015..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchSearchErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PerformSearchSearchErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public PerformSearchSearchErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public PerformSearchSearchErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformSearchSearchErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public PerformSearchSearchErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public PerformSearchSearchErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public PerformSearchSearchErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public PerformSearchSearchErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public PerformSearchSearchErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformSearchSearchErrors other = (PerformSearchSearchErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(PerformSearchSearchErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public PerformSearchSearchErrors build() { - - return new PerformSearchSearchErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchUnauthorized.java deleted file mode 100644 index 2eb53a1c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformSearchUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PerformSearchUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class PerformSearchUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PerformSearchUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PerformSearchUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformSearchUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PerformSearchUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformSearchUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformSearchUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformSearchUnauthorized other = (PerformSearchUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformSearchUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformSearchUnauthorized build() { - - return new PerformSearchUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchBadRequest.java deleted file mode 100644 index 518b59df..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PerformVoiceSearchBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class PerformVoiceSearchBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PerformVoiceSearchBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PerformVoiceSearchBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformVoiceSearchBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PerformVoiceSearchBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformVoiceSearchBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformVoiceSearchBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformVoiceSearchBadRequest other = (PerformVoiceSearchBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformVoiceSearchBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformVoiceSearchBadRequest build() { - - return new PerformVoiceSearchBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchErrors.java deleted file mode 100644 index 7f5fd2b6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PerformVoiceSearchErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public PerformVoiceSearchErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public PerformVoiceSearchErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformVoiceSearchErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public PerformVoiceSearchErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public PerformVoiceSearchErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public PerformVoiceSearchErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public PerformVoiceSearchErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public PerformVoiceSearchErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformVoiceSearchErrors other = (PerformVoiceSearchErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(PerformVoiceSearchErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public PerformVoiceSearchErrors build() { - - return new PerformVoiceSearchErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchSearchErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchSearchErrors.java deleted file mode 100644 index 00d68b6f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchSearchErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PerformVoiceSearchSearchErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public PerformVoiceSearchSearchErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public PerformVoiceSearchSearchErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformVoiceSearchSearchErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public PerformVoiceSearchSearchErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public PerformVoiceSearchSearchErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public PerformVoiceSearchSearchErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public PerformVoiceSearchSearchErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public PerformVoiceSearchSearchErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformVoiceSearchSearchErrors other = (PerformVoiceSearchSearchErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(PerformVoiceSearchSearchErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public PerformVoiceSearchSearchErrors build() { - - return new PerformVoiceSearchSearchErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchUnauthorized.java deleted file mode 100644 index 9709ef45..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PerformVoiceSearchUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PerformVoiceSearchUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class PerformVoiceSearchUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PerformVoiceSearchUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PerformVoiceSearchUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformVoiceSearchUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PerformVoiceSearchUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformVoiceSearchUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformVoiceSearchUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformVoiceSearchUnauthorized other = (PerformVoiceSearchUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformVoiceSearchUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformVoiceSearchUnauthorized build() { - - return new PerformVoiceSearchUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataAuthenticationErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataAuthenticationErrors.java deleted file mode 100644 index a2a3bf96..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataAuthenticationErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PostUsersSignInDataAuthenticationErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public PostUsersSignInDataAuthenticationErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public PostUsersSignInDataAuthenticationErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public PostUsersSignInDataAuthenticationErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public PostUsersSignInDataAuthenticationErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public PostUsersSignInDataAuthenticationErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public PostUsersSignInDataAuthenticationErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public PostUsersSignInDataAuthenticationErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public PostUsersSignInDataAuthenticationErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataAuthenticationErrors other = (PostUsersSignInDataAuthenticationErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataAuthenticationErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public PostUsersSignInDataAuthenticationErrors build() { - - return new PostUsersSignInDataAuthenticationErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataBadRequest.java deleted file mode 100644 index 3276d5b4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PostUsersSignInDataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class PostUsersSignInDataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PostUsersSignInDataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PostUsersSignInDataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PostUsersSignInDataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PostUsersSignInDataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostUsersSignInDataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostUsersSignInDataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataBadRequest other = (PostUsersSignInDataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PostUsersSignInDataBadRequest build() { - - return new PostUsersSignInDataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataErrors.java deleted file mode 100644 index 540ccfb9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PostUsersSignInDataErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public PostUsersSignInDataErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public PostUsersSignInDataErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public PostUsersSignInDataErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public PostUsersSignInDataErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public PostUsersSignInDataErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public PostUsersSignInDataErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public PostUsersSignInDataErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public PostUsersSignInDataErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataErrors other = (PostUsersSignInDataErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public PostUsersSignInDataErrors build() { - - return new PostUsersSignInDataErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataUnauthorized.java deleted file mode 100644 index 5c5b622f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/PostUsersSignInDataUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PostUsersSignInDataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class PostUsersSignInDataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PostUsersSignInDataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PostUsersSignInDataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PostUsersSignInDataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PostUsersSignInDataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostUsersSignInDataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostUsersSignInDataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataUnauthorized other = (PostUsersSignInDataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PostUsersSignInDataUnauthorized build() { - - return new PostUsersSignInDataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksBadRequest.java deleted file mode 100644 index 77dbb4d7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartAllTasksBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StartAllTasksBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartAllTasksBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartAllTasksBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartAllTasksBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartAllTasksBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartAllTasksBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartAllTasksBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartAllTasksBadRequest other = (StartAllTasksBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartAllTasksBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartAllTasksBadRequest build() { - - return new StartAllTasksBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksButlerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksButlerErrors.java deleted file mode 100644 index 3932b34c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksButlerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StartAllTasksButlerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StartAllTasksButlerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StartAllTasksButlerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartAllTasksButlerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StartAllTasksButlerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StartAllTasksButlerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StartAllTasksButlerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StartAllTasksButlerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StartAllTasksButlerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartAllTasksButlerErrors other = (StartAllTasksButlerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StartAllTasksButlerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StartAllTasksButlerErrors build() { - - return new StartAllTasksButlerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksErrors.java deleted file mode 100644 index ef043182..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StartAllTasksErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StartAllTasksErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StartAllTasksErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartAllTasksErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StartAllTasksErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StartAllTasksErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StartAllTasksErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StartAllTasksErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StartAllTasksErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartAllTasksErrors other = (StartAllTasksErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StartAllTasksErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StartAllTasksErrors build() { - - return new StartAllTasksErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksUnauthorized.java deleted file mode 100644 index 3e2bb37e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartAllTasksUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartAllTasksUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StartAllTasksUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartAllTasksUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartAllTasksUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartAllTasksUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartAllTasksUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartAllTasksUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartAllTasksUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartAllTasksUnauthorized other = (StartAllTasksUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartAllTasksUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartAllTasksUnauthorized build() { - - return new StartAllTasksUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/StartTaskBadRequest.java deleted file mode 100644 index abdbb68e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartTaskBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StartTaskBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartTaskBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartTaskBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartTaskBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartTaskBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartTaskBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartTaskBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartTaskBadRequest other = (StartTaskBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartTaskBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartTaskBadRequest build() { - - return new StartTaskBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskButlerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StartTaskButlerErrors.java deleted file mode 100644 index 6d7d2ce5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskButlerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StartTaskButlerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StartTaskButlerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StartTaskButlerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartTaskButlerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StartTaskButlerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StartTaskButlerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StartTaskButlerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StartTaskButlerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StartTaskButlerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartTaskButlerErrors other = (StartTaskButlerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StartTaskButlerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StartTaskButlerErrors build() { - - return new StartTaskButlerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StartTaskErrors.java deleted file mode 100644 index a84ef3dc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StartTaskErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StartTaskErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StartTaskErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartTaskErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StartTaskErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StartTaskErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StartTaskErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StartTaskErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StartTaskErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartTaskErrors other = (StartTaskErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StartTaskErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StartTaskErrors build() { - - return new StartTaskErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StartTaskUnauthorized.java deleted file mode 100644 index 944324a8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartTaskUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartTaskUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StartTaskUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartTaskUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartTaskUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartTaskUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartTaskUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartTaskUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartTaskUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartTaskUnauthorized other = (StartTaskUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartTaskUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartTaskUnauthorized build() { - - return new StartTaskUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeBadRequest.java deleted file mode 100644 index 9a1c9ede..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartUniversalTranscodeBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StartUniversalTranscodeBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartUniversalTranscodeBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartUniversalTranscodeBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartUniversalTranscodeBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartUniversalTranscodeBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartUniversalTranscodeBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartUniversalTranscodeBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartUniversalTranscodeBadRequest other = (StartUniversalTranscodeBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartUniversalTranscodeBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartUniversalTranscodeBadRequest build() { - - return new StartUniversalTranscodeBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeErrors.java deleted file mode 100644 index 3272e431..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StartUniversalTranscodeErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StartUniversalTranscodeErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StartUniversalTranscodeErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartUniversalTranscodeErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StartUniversalTranscodeErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StartUniversalTranscodeErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StartUniversalTranscodeErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StartUniversalTranscodeErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StartUniversalTranscodeErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartUniversalTranscodeErrors other = (StartUniversalTranscodeErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StartUniversalTranscodeErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StartUniversalTranscodeErrors build() { - - return new StartUniversalTranscodeErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeUnauthorized.java deleted file mode 100644 index d94c8397..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartUniversalTranscodeUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StartUniversalTranscodeUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartUniversalTranscodeUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartUniversalTranscodeUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartUniversalTranscodeUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartUniversalTranscodeUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartUniversalTranscodeUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartUniversalTranscodeUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartUniversalTranscodeUnauthorized other = (StartUniversalTranscodeUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartUniversalTranscodeUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartUniversalTranscodeUnauthorized build() { - - return new StartUniversalTranscodeUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeVideoErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeVideoErrors.java deleted file mode 100644 index e5c3278b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StartUniversalTranscodeVideoErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StartUniversalTranscodeVideoErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StartUniversalTranscodeVideoErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StartUniversalTranscodeVideoErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartUniversalTranscodeVideoErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StartUniversalTranscodeVideoErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StartUniversalTranscodeVideoErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StartUniversalTranscodeVideoErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StartUniversalTranscodeVideoErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StartUniversalTranscodeVideoErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartUniversalTranscodeVideoErrors other = (StartUniversalTranscodeVideoErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StartUniversalTranscodeVideoErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StartUniversalTranscodeVideoErrors build() { - - return new StartUniversalTranscodeVideoErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksBadRequest.java deleted file mode 100644 index cbf3b070..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopAllTasksBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StopAllTasksBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopAllTasksBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopAllTasksBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopAllTasksBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopAllTasksBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopAllTasksBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopAllTasksBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopAllTasksBadRequest other = (StopAllTasksBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopAllTasksBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopAllTasksBadRequest build() { - - return new StopAllTasksBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksButlerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksButlerErrors.java deleted file mode 100644 index 78f36152..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksButlerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StopAllTasksButlerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StopAllTasksButlerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StopAllTasksButlerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopAllTasksButlerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StopAllTasksButlerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StopAllTasksButlerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StopAllTasksButlerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StopAllTasksButlerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StopAllTasksButlerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopAllTasksButlerErrors other = (StopAllTasksButlerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StopAllTasksButlerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StopAllTasksButlerErrors build() { - - return new StopAllTasksButlerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksErrors.java deleted file mode 100644 index d83d3278..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StopAllTasksErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StopAllTasksErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StopAllTasksErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopAllTasksErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StopAllTasksErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StopAllTasksErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StopAllTasksErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StopAllTasksErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StopAllTasksErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopAllTasksErrors other = (StopAllTasksErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StopAllTasksErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StopAllTasksErrors build() { - - return new StopAllTasksErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksUnauthorized.java deleted file mode 100644 index abb4bbd0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopAllTasksUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopAllTasksUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StopAllTasksUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopAllTasksUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopAllTasksUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopAllTasksUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopAllTasksUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopAllTasksUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopAllTasksUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopAllTasksUnauthorized other = (StopAllTasksUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopAllTasksUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopAllTasksUnauthorized build() { - - return new StopAllTasksUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTaskBadRequest.java deleted file mode 100644 index d8de4b44..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopTaskBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StopTaskBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopTaskBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopTaskBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTaskBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopTaskBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTaskBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTaskBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTaskBadRequest other = (StopTaskBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopTaskBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopTaskBadRequest build() { - - return new StopTaskBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskButlerErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTaskButlerErrors.java deleted file mode 100644 index 40934f1e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskButlerErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StopTaskButlerErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StopTaskButlerErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StopTaskButlerErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTaskButlerErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StopTaskButlerErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StopTaskButlerErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StopTaskButlerErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StopTaskButlerErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StopTaskButlerErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTaskButlerErrors other = (StopTaskButlerErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StopTaskButlerErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StopTaskButlerErrors build() { - - return new StopTaskButlerErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTaskErrors.java deleted file mode 100644 index ba74c818..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StopTaskErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StopTaskErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StopTaskErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTaskErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StopTaskErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StopTaskErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StopTaskErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StopTaskErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StopTaskErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTaskErrors other = (StopTaskErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StopTaskErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StopTaskErrors build() { - - return new StopTaskErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTaskUnauthorized.java deleted file mode 100644 index a49dc063..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTaskUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopTaskUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StopTaskUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopTaskUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopTaskUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTaskUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopTaskUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTaskUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTaskUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTaskUnauthorized other = (StopTaskUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopTaskUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopTaskUnauthorized build() { - - return new StopTaskUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionBadRequest.java deleted file mode 100644 index 9a3d2f6f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopTranscodeSessionBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StopTranscodeSessionBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopTranscodeSessionBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopTranscodeSessionBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTranscodeSessionBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopTranscodeSessionBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTranscodeSessionBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTranscodeSessionBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTranscodeSessionBadRequest other = (StopTranscodeSessionBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopTranscodeSessionBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopTranscodeSessionBadRequest build() { - - return new StopTranscodeSessionBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionErrors.java deleted file mode 100644 index c9399632..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StopTranscodeSessionErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StopTranscodeSessionErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StopTranscodeSessionErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTranscodeSessionErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StopTranscodeSessionErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StopTranscodeSessionErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StopTranscodeSessionErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StopTranscodeSessionErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StopTranscodeSessionErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTranscodeSessionErrors other = (StopTranscodeSessionErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StopTranscodeSessionErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StopTranscodeSessionErrors build() { - - return new StopTranscodeSessionErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionSessionsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionSessionsErrors.java deleted file mode 100644 index fb8a5d81..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionSessionsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StopTranscodeSessionSessionsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public StopTranscodeSessionSessionsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public StopTranscodeSessionSessionsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTranscodeSessionSessionsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public StopTranscodeSessionSessionsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public StopTranscodeSessionSessionsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public StopTranscodeSessionSessionsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public StopTranscodeSessionSessionsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public StopTranscodeSessionSessionsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTranscodeSessionSessionsErrors other = (StopTranscodeSessionSessionsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(StopTranscodeSessionSessionsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public StopTranscodeSessionSessionsErrors build() { - - return new StopTranscodeSessionSessionsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionUnauthorized.java deleted file mode 100644 index eeb96439..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/StopTranscodeSessionUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopTranscodeSessionUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StopTranscodeSessionUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopTranscodeSessionUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopTranscodeSessionUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTranscodeSessionUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopTranscodeSessionUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTranscodeSessionUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTranscodeSessionUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTranscodeSessionUnauthorized other = (StopTranscodeSessionUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopTranscodeSessionUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopTranscodeSessionUnauthorized build() { - - return new StopTranscodeSessionUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressBadRequest.java deleted file mode 100644 index ec2feeed..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UpdatePlayProgressBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class UpdatePlayProgressBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UpdatePlayProgressBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UpdatePlayProgressBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlayProgressBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UpdatePlayProgressBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlayProgressBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlayProgressBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlayProgressBadRequest other = (UpdatePlayProgressBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlayProgressBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UpdatePlayProgressBadRequest build() { - - return new UpdatePlayProgressBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressErrors.java deleted file mode 100644 index f56b67ea..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class UpdatePlayProgressErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public UpdatePlayProgressErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public UpdatePlayProgressErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlayProgressErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public UpdatePlayProgressErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public UpdatePlayProgressErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public UpdatePlayProgressErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public UpdatePlayProgressErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public UpdatePlayProgressErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlayProgressErrors other = (UpdatePlayProgressErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlayProgressErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public UpdatePlayProgressErrors build() { - - return new UpdatePlayProgressErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressMediaErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressMediaErrors.java deleted file mode 100644 index 36a07dbf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressMediaErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class UpdatePlayProgressMediaErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public UpdatePlayProgressMediaErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public UpdatePlayProgressMediaErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlayProgressMediaErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public UpdatePlayProgressMediaErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public UpdatePlayProgressMediaErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public UpdatePlayProgressMediaErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public UpdatePlayProgressMediaErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public UpdatePlayProgressMediaErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlayProgressMediaErrors other = (UpdatePlayProgressMediaErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlayProgressMediaErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public UpdatePlayProgressMediaErrors build() { - - return new UpdatePlayProgressMediaErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressUnauthorized.java deleted file mode 100644 index 2673c521..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlayProgressUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UpdatePlayProgressUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class UpdatePlayProgressUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UpdatePlayProgressUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UpdatePlayProgressUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlayProgressUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UpdatePlayProgressUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlayProgressUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlayProgressUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlayProgressUnauthorized other = (UpdatePlayProgressUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlayProgressUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UpdatePlayProgressUnauthorized build() { - - return new UpdatePlayProgressUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistBadRequest.java deleted file mode 100644 index 39182bc9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UpdatePlaylistBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class UpdatePlaylistBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UpdatePlaylistBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UpdatePlaylistBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlaylistBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UpdatePlaylistBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlaylistBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlaylistBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlaylistBadRequest other = (UpdatePlaylistBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlaylistBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UpdatePlaylistBadRequest build() { - - return new UpdatePlaylistBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistErrors.java deleted file mode 100644 index 9e704e0f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class UpdatePlaylistErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public UpdatePlaylistErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public UpdatePlaylistErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlaylistErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public UpdatePlaylistErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public UpdatePlaylistErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public UpdatePlaylistErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public UpdatePlaylistErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public UpdatePlaylistErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlaylistErrors other = (UpdatePlaylistErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlaylistErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public UpdatePlaylistErrors build() { - - return new UpdatePlaylistErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistPlaylistsErrors.java deleted file mode 100644 index 70d7cd11..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistPlaylistsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class UpdatePlaylistPlaylistsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public UpdatePlaylistPlaylistsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public UpdatePlaylistPlaylistsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlaylistPlaylistsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public UpdatePlaylistPlaylistsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public UpdatePlaylistPlaylistsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public UpdatePlaylistPlaylistsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public UpdatePlaylistPlaylistsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public UpdatePlaylistPlaylistsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlaylistPlaylistsErrors other = (UpdatePlaylistPlaylistsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlaylistPlaylistsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public UpdatePlaylistPlaylistsErrors build() { - - return new UpdatePlaylistPlaylistsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistUnauthorized.java deleted file mode 100644 index 1e864d97..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UpdatePlaylistUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UpdatePlaylistUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class UpdatePlaylistUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UpdatePlaylistUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UpdatePlaylistUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlaylistUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UpdatePlaylistUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlaylistUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlaylistUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlaylistUnauthorized other = (UpdatePlaylistUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlaylistUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UpdatePlaylistUnauthorized build() { - - return new UpdatePlaylistUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistBadRequest.java deleted file mode 100644 index 8b2cda45..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistBadRequest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UploadPlaylistBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class UploadPlaylistBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UploadPlaylistBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UploadPlaylistBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UploadPlaylistBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UploadPlaylistBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UploadPlaylistBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UploadPlaylistBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UploadPlaylistBadRequest other = (UploadPlaylistBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UploadPlaylistBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UploadPlaylistBadRequest build() { - - return new UploadPlaylistBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistErrors.java deleted file mode 100644 index 487e8e7d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class UploadPlaylistErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public UploadPlaylistErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public UploadPlaylistErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public UploadPlaylistErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public UploadPlaylistErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public UploadPlaylistErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public UploadPlaylistErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public UploadPlaylistErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public UploadPlaylistErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UploadPlaylistErrors other = (UploadPlaylistErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(UploadPlaylistErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public UploadPlaylistErrors build() { - - return new UploadPlaylistErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistPlaylistsErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistPlaylistsErrors.java deleted file mode 100644 index 74743f47..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistPlaylistsErrors.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class UploadPlaylistPlaylistsErrors { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - @JsonCreator - public UploadPlaylistPlaylistsErrors( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("status") Optional status) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(status, "status"); - this.code = code; - this.message = message; - this.status = status; - } - - public UploadPlaylistPlaylistsErrors() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - public Optional status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public UploadPlaylistPlaylistsErrors withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public UploadPlaylistPlaylistsErrors withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public UploadPlaylistPlaylistsErrors withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public UploadPlaylistPlaylistsErrors withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public UploadPlaylistPlaylistsErrors withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public UploadPlaylistPlaylistsErrors withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UploadPlaylistPlaylistsErrors other = (UploadPlaylistPlaylistsErrors) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, status); - } - - @Override - public String toString() { - return Utils.toString(UploadPlaylistPlaylistsErrors.class, - "code", code, - "message", message, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional status = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public UploadPlaylistPlaylistsErrors build() { - - return new UploadPlaylistPlaylistsErrors( - code, message, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistUnauthorized.java deleted file mode 100644 index 131150ec..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/UploadPlaylistUnauthorized.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors; - -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.io.InputStream; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UploadPlaylistUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class UploadPlaylistUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UploadPlaylistUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UploadPlaylistUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UploadPlaylistUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UploadPlaylistUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UploadPlaylistUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UploadPlaylistUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UploadPlaylistUnauthorized other = (UploadPlaylistUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UploadPlaylistUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UploadPlaylistUnauthorized build() { - - return new UploadPlaylistUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/AddPlaylistContentsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/AddPlaylistContentsBadRequest.java deleted file mode 100644 index 67cbc7b1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/AddPlaylistContentsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.AddPlaylistContentsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * AddPlaylistContentsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class AddPlaylistContentsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public AddPlaylistContentsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public AddPlaylistContentsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public AddPlaylistContentsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public AddPlaylistContentsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public AddPlaylistContentsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public AddPlaylistContentsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddPlaylistContentsBadRequest other = (AddPlaylistContentsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public AddPlaylistContentsBadRequest build() { - - return new AddPlaylistContentsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/AddPlaylistContentsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/AddPlaylistContentsUnauthorized.java deleted file mode 100644 index ab1dc280..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/AddPlaylistContentsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.AddPlaylistContentsPlaylistsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * AddPlaylistContentsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class AddPlaylistContentsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public AddPlaylistContentsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public AddPlaylistContentsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public AddPlaylistContentsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public AddPlaylistContentsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public AddPlaylistContentsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public AddPlaylistContentsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddPlaylistContentsUnauthorized other = (AddPlaylistContentsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public AddPlaylistContentsUnauthorized build() { - - return new AddPlaylistContentsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/ApplyUpdatesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/ApplyUpdatesBadRequest.java deleted file mode 100644 index dacd6750..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/ApplyUpdatesBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.ApplyUpdatesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * ApplyUpdatesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class ApplyUpdatesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public ApplyUpdatesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public ApplyUpdatesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public ApplyUpdatesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public ApplyUpdatesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ApplyUpdatesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ApplyUpdatesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplyUpdatesBadRequest other = (ApplyUpdatesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(ApplyUpdatesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public ApplyUpdatesBadRequest build() { - - return new ApplyUpdatesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/ApplyUpdatesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/ApplyUpdatesUnauthorized.java deleted file mode 100644 index c0062d56..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/ApplyUpdatesUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.ApplyUpdatesUpdaterErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * ApplyUpdatesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class ApplyUpdatesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public ApplyUpdatesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public ApplyUpdatesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public ApplyUpdatesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public ApplyUpdatesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ApplyUpdatesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ApplyUpdatesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplyUpdatesUnauthorized other = (ApplyUpdatesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(ApplyUpdatesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public ApplyUpdatesUnauthorized build() { - - return new ApplyUpdatesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/CancelServerActivitiesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/CancelServerActivitiesBadRequest.java deleted file mode 100644 index cf767cb8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/CancelServerActivitiesBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.CancelServerActivitiesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CancelServerActivitiesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class CancelServerActivitiesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CancelServerActivitiesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CancelServerActivitiesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CancelServerActivitiesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CancelServerActivitiesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CancelServerActivitiesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CancelServerActivitiesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelServerActivitiesBadRequest other = (CancelServerActivitiesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CancelServerActivitiesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CancelServerActivitiesBadRequest build() { - - return new CancelServerActivitiesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/CancelServerActivitiesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/CancelServerActivitiesUnauthorized.java deleted file mode 100644 index 3908892b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/CancelServerActivitiesUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.CancelServerActivitiesActivitiesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CancelServerActivitiesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class CancelServerActivitiesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CancelServerActivitiesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CancelServerActivitiesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CancelServerActivitiesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CancelServerActivitiesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CancelServerActivitiesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CancelServerActivitiesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelServerActivitiesUnauthorized other = (CancelServerActivitiesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CancelServerActivitiesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CancelServerActivitiesUnauthorized build() { - - return new CancelServerActivitiesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/CheckForUpdatesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/CheckForUpdatesBadRequest.java deleted file mode 100644 index 247977cb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/CheckForUpdatesBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.CheckForUpdatesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CheckForUpdatesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class CheckForUpdatesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CheckForUpdatesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CheckForUpdatesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CheckForUpdatesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CheckForUpdatesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CheckForUpdatesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CheckForUpdatesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckForUpdatesBadRequest other = (CheckForUpdatesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CheckForUpdatesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CheckForUpdatesBadRequest build() { - - return new CheckForUpdatesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/CheckForUpdatesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/CheckForUpdatesUnauthorized.java deleted file mode 100644 index f946f040..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/CheckForUpdatesUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.CheckForUpdatesUpdaterErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CheckForUpdatesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class CheckForUpdatesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CheckForUpdatesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CheckForUpdatesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CheckForUpdatesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CheckForUpdatesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CheckForUpdatesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CheckForUpdatesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckForUpdatesUnauthorized other = (CheckForUpdatesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CheckForUpdatesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CheckForUpdatesUnauthorized build() { - - return new CheckForUpdatesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/ClearPlaylistContentsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/ClearPlaylistContentsBadRequest.java deleted file mode 100644 index 1d11c23c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/ClearPlaylistContentsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.ClearPlaylistContentsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * ClearPlaylistContentsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class ClearPlaylistContentsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public ClearPlaylistContentsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public ClearPlaylistContentsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public ClearPlaylistContentsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public ClearPlaylistContentsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ClearPlaylistContentsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ClearPlaylistContentsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClearPlaylistContentsBadRequest other = (ClearPlaylistContentsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(ClearPlaylistContentsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public ClearPlaylistContentsBadRequest build() { - - return new ClearPlaylistContentsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/ClearPlaylistContentsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/ClearPlaylistContentsUnauthorized.java deleted file mode 100644 index 8b11e62a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/ClearPlaylistContentsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.ClearPlaylistContentsPlaylistsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * ClearPlaylistContentsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class ClearPlaylistContentsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public ClearPlaylistContentsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public ClearPlaylistContentsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public ClearPlaylistContentsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public ClearPlaylistContentsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ClearPlaylistContentsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ClearPlaylistContentsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClearPlaylistContentsUnauthorized other = (ClearPlaylistContentsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(ClearPlaylistContentsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public ClearPlaylistContentsUnauthorized build() { - - return new ClearPlaylistContentsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/CreatePlaylistBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/CreatePlaylistBadRequest.java deleted file mode 100644 index 40f2b807..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/CreatePlaylistBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.CreatePlaylistErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CreatePlaylistBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class CreatePlaylistBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CreatePlaylistBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CreatePlaylistBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CreatePlaylistBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CreatePlaylistBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CreatePlaylistBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CreatePlaylistBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePlaylistBadRequest other = (CreatePlaylistBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CreatePlaylistBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CreatePlaylistBadRequest build() { - - return new CreatePlaylistBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/CreatePlaylistUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/CreatePlaylistUnauthorized.java deleted file mode 100644 index e845d72d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/CreatePlaylistUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.CreatePlaylistPlaylistsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * CreatePlaylistUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class CreatePlaylistUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public CreatePlaylistUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public CreatePlaylistUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public CreatePlaylistUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public CreatePlaylistUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CreatePlaylistUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CreatePlaylistUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePlaylistUnauthorized other = (CreatePlaylistUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CreatePlaylistUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CreatePlaylistUnauthorized build() { - - return new CreatePlaylistUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/DeleteLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/DeleteLibraryBadRequest.java deleted file mode 100644 index 1030c581..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/DeleteLibraryBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.DeleteLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * DeleteLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class DeleteLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public DeleteLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public DeleteLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeleteLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public DeleteLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeleteLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeleteLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLibraryBadRequest other = (DeleteLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(DeleteLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public DeleteLibraryBadRequest build() { - - return new DeleteLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/DeleteLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/DeleteLibraryUnauthorized.java deleted file mode 100644 index e56095ce..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/DeleteLibraryUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.DeleteLibraryLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * DeleteLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class DeleteLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public DeleteLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public DeleteLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeleteLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public DeleteLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeleteLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeleteLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLibraryUnauthorized other = (DeleteLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(DeleteLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public DeleteLibraryUnauthorized build() { - - return new DeleteLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/DeletePlaylistBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/DeletePlaylistBadRequest.java deleted file mode 100644 index 5c26ae9b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/DeletePlaylistBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.DeletePlaylistErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * DeletePlaylistBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class DeletePlaylistBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public DeletePlaylistBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public DeletePlaylistBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeletePlaylistBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public DeletePlaylistBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeletePlaylistBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeletePlaylistBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePlaylistBadRequest other = (DeletePlaylistBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(DeletePlaylistBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public DeletePlaylistBadRequest build() { - - return new DeletePlaylistBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/DeletePlaylistUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/DeletePlaylistUnauthorized.java deleted file mode 100644 index bf68f7ab..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/DeletePlaylistUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.DeletePlaylistPlaylistsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * DeletePlaylistUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class DeletePlaylistUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public DeletePlaylistUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public DeletePlaylistUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public DeletePlaylistUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public DeletePlaylistUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeletePlaylistUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeletePlaylistUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletePlaylistUnauthorized other = (DeletePlaylistUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(DeletePlaylistUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public DeletePlaylistUnauthorized build() { - - return new DeletePlaylistUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/EnablePaperTrailBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/EnablePaperTrailBadRequest.java deleted file mode 100644 index e13c8612..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/EnablePaperTrailBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.EnablePaperTrailErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * EnablePaperTrailBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class EnablePaperTrailBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public EnablePaperTrailBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public EnablePaperTrailBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public EnablePaperTrailBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public EnablePaperTrailBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public EnablePaperTrailBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public EnablePaperTrailBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnablePaperTrailBadRequest other = (EnablePaperTrailBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(EnablePaperTrailBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public EnablePaperTrailBadRequest build() { - - return new EnablePaperTrailBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/EnablePaperTrailUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/EnablePaperTrailUnauthorized.java deleted file mode 100644 index a1a8aa8e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/EnablePaperTrailUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.EnablePaperTrailLogErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * EnablePaperTrailUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class EnablePaperTrailUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public EnablePaperTrailUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public EnablePaperTrailUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public EnablePaperTrailUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public EnablePaperTrailUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public EnablePaperTrailUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public EnablePaperTrailUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnablePaperTrailUnauthorized other = (EnablePaperTrailUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(EnablePaperTrailUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public EnablePaperTrailUnauthorized build() { - - return new EnablePaperTrailUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetActorsLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetActorsLibraryBadRequest.java deleted file mode 100644 index b8576f91..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetActorsLibraryBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetActorsLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetActorsLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetActorsLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetActorsLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetActorsLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetActorsLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetActorsLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetActorsLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetActorsLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetActorsLibraryBadRequest other = (GetActorsLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetActorsLibraryBadRequest build() { - - return new GetActorsLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetActorsLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetActorsLibraryUnauthorized.java deleted file mode 100644 index 5ecb9c44..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetActorsLibraryUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetActorsLibraryLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetActorsLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetActorsLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetActorsLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetActorsLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetActorsLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetActorsLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetActorsLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetActorsLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetActorsLibraryUnauthorized other = (GetActorsLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetActorsLibraryUnauthorized build() { - - return new GetActorsLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetAllLibrariesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetAllLibrariesBadRequest.java deleted file mode 100644 index 4975b87c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetAllLibrariesBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetAllLibrariesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetAllLibrariesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetAllLibrariesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetAllLibrariesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetAllLibrariesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAllLibrariesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetAllLibrariesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAllLibrariesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAllLibrariesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAllLibrariesBadRequest other = (GetAllLibrariesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetAllLibrariesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetAllLibrariesBadRequest build() { - - return new GetAllLibrariesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetAllLibrariesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetAllLibrariesUnauthorized.java deleted file mode 100644 index 348cfff1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetAllLibrariesUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetAllLibrariesLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetAllLibrariesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetAllLibrariesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetAllLibrariesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetAllLibrariesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAllLibrariesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetAllLibrariesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAllLibrariesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAllLibrariesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAllLibrariesUnauthorized other = (GetAllLibrariesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetAllLibrariesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetAllLibrariesUnauthorized build() { - - return new GetAllLibrariesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetAvailableClientsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetAvailableClientsBadRequest.java deleted file mode 100644 index 6344c752..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetAvailableClientsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetAvailableClientsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetAvailableClientsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetAvailableClientsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetAvailableClientsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetAvailableClientsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAvailableClientsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetAvailableClientsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAvailableClientsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAvailableClientsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAvailableClientsBadRequest other = (GetAvailableClientsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetAvailableClientsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetAvailableClientsBadRequest build() { - - return new GetAvailableClientsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetAvailableClientsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetAvailableClientsUnauthorized.java deleted file mode 100644 index 4fcab35f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetAvailableClientsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetAvailableClientsServerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetAvailableClientsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetAvailableClientsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetAvailableClientsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetAvailableClientsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAvailableClientsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetAvailableClientsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAvailableClientsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAvailableClientsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAvailableClientsUnauthorized other = (GetAvailableClientsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetAvailableClientsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetAvailableClientsUnauthorized build() { - - return new GetAvailableClientsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetBandwidthStatisticsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetBandwidthStatisticsBadRequest.java deleted file mode 100644 index 1f9e5073..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetBandwidthStatisticsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetBandwidthStatisticsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetBandwidthStatisticsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetBandwidthStatisticsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetBandwidthStatisticsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetBandwidthStatisticsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBandwidthStatisticsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetBandwidthStatisticsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBandwidthStatisticsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBandwidthStatisticsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBandwidthStatisticsBadRequest other = (GetBandwidthStatisticsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetBandwidthStatisticsBadRequest build() { - - return new GetBandwidthStatisticsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetBandwidthStatisticsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetBandwidthStatisticsUnauthorized.java deleted file mode 100644 index 664b82fa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetBandwidthStatisticsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetBandwidthStatisticsStatisticsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetBandwidthStatisticsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetBandwidthStatisticsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetBandwidthStatisticsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetBandwidthStatisticsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBandwidthStatisticsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetBandwidthStatisticsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBandwidthStatisticsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBandwidthStatisticsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBandwidthStatisticsUnauthorized other = (GetBandwidthStatisticsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetBandwidthStatisticsUnauthorized build() { - - return new GetBandwidthStatisticsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetBannerImageBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetBannerImageBadRequest.java deleted file mode 100644 index 255c5798..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetBannerImageBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetBannerImageErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetBannerImageBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetBannerImageBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetBannerImageBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetBannerImageBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBannerImageBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetBannerImageBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBannerImageBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBannerImageBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBannerImageBadRequest other = (GetBannerImageBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetBannerImageBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetBannerImageBadRequest build() { - - return new GetBannerImageBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetBannerImageUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetBannerImageUnauthorized.java deleted file mode 100644 index 807132a2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetBannerImageUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetBannerImageMediaErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetBannerImageUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetBannerImageUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetBannerImageUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetBannerImageUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBannerImageUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetBannerImageUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBannerImageUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBannerImageUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBannerImageUnauthorized other = (GetBannerImageUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetBannerImageUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetBannerImageUnauthorized build() { - - return new GetBannerImageUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetButlerTasksBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetButlerTasksBadRequest.java deleted file mode 100644 index e86cc1ed..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetButlerTasksBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetButlerTasksErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetButlerTasksBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetButlerTasksBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetButlerTasksBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetButlerTasksBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetButlerTasksBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetButlerTasksBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetButlerTasksBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetButlerTasksBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetButlerTasksBadRequest other = (GetButlerTasksBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetButlerTasksBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetButlerTasksBadRequest build() { - - return new GetButlerTasksBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetButlerTasksUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetButlerTasksUnauthorized.java deleted file mode 100644 index ec911073..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetButlerTasksUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetButlerTasksButlerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetButlerTasksUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetButlerTasksUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetButlerTasksUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetButlerTasksUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetButlerTasksUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetButlerTasksUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetButlerTasksUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetButlerTasksUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetButlerTasksUnauthorized other = (GetButlerTasksUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetButlerTasksUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetButlerTasksUnauthorized build() { - - return new GetButlerTasksUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetCompanionsDataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetCompanionsDataBadRequest.java deleted file mode 100644 index 207163e2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetCompanionsDataBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetCompanionsDataErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetCompanionsDataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetCompanionsDataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetCompanionsDataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetCompanionsDataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCompanionsDataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetCompanionsDataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCompanionsDataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCompanionsDataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCompanionsDataBadRequest other = (GetCompanionsDataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetCompanionsDataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetCompanionsDataBadRequest build() { - - return new GetCompanionsDataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetCompanionsDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetCompanionsDataUnauthorized.java deleted file mode 100644 index bcf7c3ba..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetCompanionsDataUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetCompanionsDataPlexErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetCompanionsDataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetCompanionsDataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetCompanionsDataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetCompanionsDataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCompanionsDataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetCompanionsDataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCompanionsDataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCompanionsDataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCompanionsDataUnauthorized other = (GetCompanionsDataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetCompanionsDataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetCompanionsDataUnauthorized build() { - - return new GetCompanionsDataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetCountriesLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetCountriesLibraryBadRequest.java deleted file mode 100644 index 3b4934f7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetCountriesLibraryBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetCountriesLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetCountriesLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetCountriesLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetCountriesLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetCountriesLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCountriesLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetCountriesLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCountriesLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCountriesLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCountriesLibraryBadRequest other = (GetCountriesLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetCountriesLibraryBadRequest build() { - - return new GetCountriesLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetCountriesLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetCountriesLibraryUnauthorized.java deleted file mode 100644 index 4af1c000..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetCountriesLibraryUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetCountriesLibraryLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetCountriesLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetCountriesLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetCountriesLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetCountriesLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCountriesLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetCountriesLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCountriesLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCountriesLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCountriesLibraryUnauthorized other = (GetCountriesLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetCountriesLibraryUnauthorized build() { - - return new GetCountriesLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetDevicesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetDevicesBadRequest.java deleted file mode 100644 index 4af87125..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetDevicesBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetDevicesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetDevicesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetDevicesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetDevicesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetDevicesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetDevicesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetDevicesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetDevicesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetDevicesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetDevicesBadRequest other = (GetDevicesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetDevicesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetDevicesBadRequest build() { - - return new GetDevicesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetDevicesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetDevicesUnauthorized.java deleted file mode 100644 index 9c78cdf5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetDevicesUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetDevicesServerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetDevicesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetDevicesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetDevicesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetDevicesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetDevicesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetDevicesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetDevicesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetDevicesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetDevicesUnauthorized other = (GetDevicesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetDevicesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetDevicesUnauthorized build() { - - return new GetDevicesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetFileHashBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetFileHashBadRequest.java deleted file mode 100644 index 1d276d4b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetFileHashBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetFileHashErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetFileHashBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetFileHashBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetFileHashBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetFileHashBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetFileHashBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetFileHashBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetFileHashBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetFileHashBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetFileHashBadRequest other = (GetFileHashBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetFileHashBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetFileHashBadRequest build() { - - return new GetFileHashBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetFileHashUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetFileHashUnauthorized.java deleted file mode 100644 index 0c0ded87..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetFileHashUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetFileHashLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetFileHashUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetFileHashUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetFileHashUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetFileHashUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetFileHashUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetFileHashUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetFileHashUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetFileHashUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetFileHashUnauthorized other = (GetFileHashUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetFileHashUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetFileHashUnauthorized build() { - - return new GetFileHashUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGenresLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetGenresLibraryBadRequest.java deleted file mode 100644 index 3190c64f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGenresLibraryBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetGenresLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGenresLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetGenresLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGenresLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGenresLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGenresLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGenresLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGenresLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGenresLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGenresLibraryBadRequest other = (GetGenresLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGenresLibraryBadRequest build() { - - return new GetGenresLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGenresLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetGenresLibraryUnauthorized.java deleted file mode 100644 index 0cfa1632..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGenresLibraryUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetGenresLibraryLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGenresLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetGenresLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGenresLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGenresLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGenresLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGenresLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGenresLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGenresLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGenresLibraryUnauthorized other = (GetGenresLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGenresLibraryUnauthorized build() { - - return new GetGenresLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGeoDataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetGeoDataBadRequest.java deleted file mode 100644 index 1507cc31..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGeoDataBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetGeoDataErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGeoDataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetGeoDataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGeoDataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGeoDataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGeoDataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGeoDataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGeoDataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGeoDataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGeoDataBadRequest other = (GetGeoDataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGeoDataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGeoDataBadRequest build() { - - return new GetGeoDataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGeoDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetGeoDataUnauthorized.java deleted file mode 100644 index 6d732748..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGeoDataUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetGeoDataPlexErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGeoDataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetGeoDataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGeoDataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGeoDataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGeoDataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGeoDataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGeoDataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGeoDataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGeoDataUnauthorized other = (GetGeoDataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGeoDataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGeoDataUnauthorized build() { - - return new GetGeoDataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGlobalHubsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetGlobalHubsBadRequest.java deleted file mode 100644 index fe0df478..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGlobalHubsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetGlobalHubsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGlobalHubsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetGlobalHubsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGlobalHubsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGlobalHubsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGlobalHubsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGlobalHubsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGlobalHubsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGlobalHubsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGlobalHubsBadRequest other = (GetGlobalHubsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGlobalHubsBadRequest build() { - - return new GetGlobalHubsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGlobalHubsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetGlobalHubsUnauthorized.java deleted file mode 100644 index 04d9736d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetGlobalHubsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetGlobalHubsHubsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetGlobalHubsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetGlobalHubsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetGlobalHubsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetGlobalHubsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGlobalHubsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetGlobalHubsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGlobalHubsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGlobalHubsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGlobalHubsUnauthorized other = (GetGlobalHubsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetGlobalHubsUnauthorized build() { - - return new GetGlobalHubsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetHomeDataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetHomeDataBadRequest.java deleted file mode 100644 index b3881490..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetHomeDataBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetHomeDataErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetHomeDataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetHomeDataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetHomeDataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetHomeDataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetHomeDataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetHomeDataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetHomeDataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetHomeDataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetHomeDataBadRequest other = (GetHomeDataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetHomeDataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetHomeDataBadRequest build() { - - return new GetHomeDataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetHomeDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetHomeDataUnauthorized.java deleted file mode 100644 index e8c5238c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetHomeDataUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetHomeDataPlexErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetHomeDataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetHomeDataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetHomeDataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetHomeDataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetHomeDataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetHomeDataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetHomeDataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetHomeDataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetHomeDataUnauthorized other = (GetHomeDataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetHomeDataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetHomeDataUnauthorized build() { - - return new GetHomeDataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryDetailsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryDetailsBadRequest.java deleted file mode 100644 index ed608233..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryDetailsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetLibraryDetailsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryDetailsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetLibraryDetailsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryDetailsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryDetailsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryDetailsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryDetailsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryDetailsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryDetailsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryDetailsBadRequest other = (GetLibraryDetailsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryDetailsBadRequest build() { - - return new GetLibraryDetailsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryDetailsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryDetailsUnauthorized.java deleted file mode 100644 index 24ea4c0a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryDetailsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetLibraryDetailsLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryDetailsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetLibraryDetailsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryDetailsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryDetailsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryDetailsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryDetailsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryDetailsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryDetailsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryDetailsUnauthorized other = (GetLibraryDetailsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryDetailsUnauthorized build() { - - return new GetLibraryDetailsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryHubsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryHubsBadRequest.java deleted file mode 100644 index 9d784fae..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryHubsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetLibraryHubsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryHubsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetLibraryHubsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryHubsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryHubsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryHubsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryHubsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryHubsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryHubsBadRequest other = (GetLibraryHubsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryHubsBadRequest build() { - - return new GetLibraryHubsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryHubsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryHubsUnauthorized.java deleted file mode 100644 index 266b5cdc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryHubsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetLibraryHubsHubsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryHubsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetLibraryHubsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryHubsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryHubsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryHubsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryHubsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryHubsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryHubsUnauthorized other = (GetLibraryHubsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryHubsUnauthorized build() { - - return new GetLibraryHubsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryItemsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryItemsBadRequest.java deleted file mode 100644 index 605408e3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryItemsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetLibraryItemsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryItemsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetLibraryItemsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryItemsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryItemsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryItemsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryItemsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryItemsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsBadRequest other = (GetLibraryItemsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryItemsBadRequest build() { - - return new GetLibraryItemsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryItemsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryItemsUnauthorized.java deleted file mode 100644 index 3e1713e3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibraryItemsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetLibraryItemsLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryItemsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetLibraryItemsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibraryItemsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibraryItemsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibraryItemsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryItemsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryItemsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsUnauthorized other = (GetLibraryItemsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibraryItemsUnauthorized build() { - - return new GetLibraryItemsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibrarySectionsAllBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibrarySectionsAllBadRequest.java deleted file mode 100644 index f57adaa7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibrarySectionsAllBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetLibrarySectionsAllErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibrarySectionsAllBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetLibrarySectionsAllBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibrarySectionsAllBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibrarySectionsAllBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibrarySectionsAllBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibrarySectionsAllBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibrarySectionsAllBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllBadRequest other = (GetLibrarySectionsAllBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibrarySectionsAllBadRequest build() { - - return new GetLibrarySectionsAllBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibrarySectionsAllUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibrarySectionsAllUnauthorized.java deleted file mode 100644 index 0956a3d2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetLibrarySectionsAllUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetLibrarySectionsAllLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetLibrarySectionsAllUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetLibrarySectionsAllUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetLibrarySectionsAllUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetLibrarySectionsAllUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetLibrarySectionsAllUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibrarySectionsAllUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibrarySectionsAllUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllUnauthorized other = (GetLibrarySectionsAllUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetLibrarySectionsAllUnauthorized build() { - - return new GetLibrarySectionsAllUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaMetaDataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaMetaDataBadRequest.java deleted file mode 100644 index 41bf4be1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaMetaDataBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetMediaMetaDataErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMediaMetaDataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetMediaMetaDataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMediaMetaDataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMediaMetaDataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMediaMetaDataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaMetaDataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaMetaDataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataBadRequest other = (GetMediaMetaDataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMediaMetaDataBadRequest build() { - - return new GetMediaMetaDataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaMetaDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaMetaDataUnauthorized.java deleted file mode 100644 index 8057a0bb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaMetaDataUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetMediaMetaDataLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMediaMetaDataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetMediaMetaDataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMediaMetaDataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMediaMetaDataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMediaMetaDataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaMetaDataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaMetaDataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataUnauthorized other = (GetMediaMetaDataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMediaMetaDataUnauthorized build() { - - return new GetMediaMetaDataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaProvidersBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaProvidersBadRequest.java deleted file mode 100644 index 30cb2ee3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaProvidersBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetMediaProvidersErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMediaProvidersBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetMediaProvidersBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMediaProvidersBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMediaProvidersBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaProvidersBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMediaProvidersBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaProvidersBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaProvidersBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaProvidersBadRequest other = (GetMediaProvidersBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMediaProvidersBadRequest build() { - - return new GetMediaProvidersBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaProvidersUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaProvidersUnauthorized.java deleted file mode 100644 index df7a06e5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMediaProvidersUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetMediaProvidersServerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMediaProvidersUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetMediaProvidersUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMediaProvidersUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMediaProvidersUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaProvidersUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMediaProvidersUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaProvidersUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaProvidersUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaProvidersUnauthorized other = (GetMediaProvidersUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMediaProvidersUnauthorized build() { - - return new GetMediaProvidersUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMetadataChildrenBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetMetadataChildrenBadRequest.java deleted file mode 100644 index 01a55373..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMetadataChildrenBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetMetadataChildrenErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMetadataChildrenBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetMetadataChildrenBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMetadataChildrenBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMetadataChildrenBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMetadataChildrenBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMetadataChildrenBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMetadataChildrenBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMetadataChildrenBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMetadataChildrenBadRequest other = (GetMetadataChildrenBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMetadataChildrenBadRequest build() { - - return new GetMetadataChildrenBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMetadataChildrenUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetMetadataChildrenUnauthorized.java deleted file mode 100644 index 0330b1ec..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMetadataChildrenUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetMetadataChildrenLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMetadataChildrenUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetMetadataChildrenUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMetadataChildrenUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMetadataChildrenUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMetadataChildrenUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMetadataChildrenUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMetadataChildrenUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMetadataChildrenUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMetadataChildrenUnauthorized other = (GetMetadataChildrenUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMetadataChildrenUnauthorized build() { - - return new GetMetadataChildrenUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMyPlexAccountBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetMyPlexAccountBadRequest.java deleted file mode 100644 index 81fd9f3a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMyPlexAccountBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetMyPlexAccountErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMyPlexAccountBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetMyPlexAccountBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMyPlexAccountBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMyPlexAccountBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMyPlexAccountBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMyPlexAccountBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMyPlexAccountBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMyPlexAccountBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMyPlexAccountBadRequest other = (GetMyPlexAccountBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMyPlexAccountBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMyPlexAccountBadRequest build() { - - return new GetMyPlexAccountBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMyPlexAccountUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetMyPlexAccountUnauthorized.java deleted file mode 100644 index 72c491b2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetMyPlexAccountUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetMyPlexAccountServerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetMyPlexAccountUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetMyPlexAccountUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetMyPlexAccountUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetMyPlexAccountUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMyPlexAccountUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetMyPlexAccountUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMyPlexAccountUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMyPlexAccountUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMyPlexAccountUnauthorized other = (GetMyPlexAccountUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetMyPlexAccountUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetMyPlexAccountUnauthorized build() { - - return new GetMyPlexAccountUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPinBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetPinBadRequest.java deleted file mode 100644 index c2519f67..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPinBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetPinErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPinBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetPinBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPinBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPinBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPinBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPinBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPinBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPinBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPinBadRequest other = (GetPinBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPinBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPinBadRequest build() { - - return new GetPinBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistBadRequest.java deleted file mode 100644 index 58119271..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetPlaylistErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetPlaylistBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistBadRequest other = (GetPlaylistBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistBadRequest build() { - - return new GetPlaylistBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistContentsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistContentsBadRequest.java deleted file mode 100644 index 20c91140..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistContentsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetPlaylistContentsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistContentsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetPlaylistContentsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistContentsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistContentsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistContentsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistContentsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistContentsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistContentsBadRequest other = (GetPlaylistContentsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistContentsBadRequest build() { - - return new GetPlaylistContentsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistContentsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistContentsUnauthorized.java deleted file mode 100644 index 4c0e7a48..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistContentsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetPlaylistContentsPlaylistsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistContentsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetPlaylistContentsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistContentsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistContentsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistContentsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistContentsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistContentsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistContentsUnauthorized other = (GetPlaylistContentsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistContentsUnauthorized build() { - - return new GetPlaylistContentsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistUnauthorized.java deleted file mode 100644 index 305334c8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetPlaylistPlaylistsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetPlaylistUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistUnauthorized other = (GetPlaylistUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistUnauthorized build() { - - return new GetPlaylistUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistsBadRequest.java deleted file mode 100644 index ff50fabe..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetPlaylistsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetPlaylistsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistsBadRequest other = (GetPlaylistsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistsBadRequest build() { - - return new GetPlaylistsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistsUnauthorized.java deleted file mode 100644 index ed675cca..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetPlaylistsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetPlaylistsPlaylistsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetPlaylistsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetPlaylistsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetPlaylistsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetPlaylistsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetPlaylistsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistsUnauthorized other = (GetPlaylistsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetPlaylistsUnauthorized build() { - - return new GetPlaylistsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetRecentlyAddedLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetRecentlyAddedLibraryBadRequest.java deleted file mode 100644 index 5f0fef99..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetRecentlyAddedLibraryBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetRecentlyAddedLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetRecentlyAddedLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetRecentlyAddedLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetRecentlyAddedLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetRecentlyAddedLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRecentlyAddedLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetRecentlyAddedLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRecentlyAddedLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRecentlyAddedLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecentlyAddedLibraryBadRequest other = (GetRecentlyAddedLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetRecentlyAddedLibraryBadRequest build() { - - return new GetRecentlyAddedLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetRecentlyAddedLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetRecentlyAddedLibraryUnauthorized.java deleted file mode 100644 index ef7a0554..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetRecentlyAddedLibraryUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetRecentlyAddedLibraryLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetRecentlyAddedLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetRecentlyAddedLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetRecentlyAddedLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetRecentlyAddedLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRecentlyAddedLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetRecentlyAddedLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRecentlyAddedLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRecentlyAddedLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecentlyAddedLibraryUnauthorized other = (GetRecentlyAddedLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetRecentlyAddedLibraryUnauthorized build() { - - return new GetRecentlyAddedLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetRefreshLibraryMetadataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetRefreshLibraryMetadataBadRequest.java deleted file mode 100644 index 22f6dd20..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetRefreshLibraryMetadataBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetRefreshLibraryMetadataErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetRefreshLibraryMetadataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetRefreshLibraryMetadataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetRefreshLibraryMetadataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetRefreshLibraryMetadataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRefreshLibraryMetadataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetRefreshLibraryMetadataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRefreshLibraryMetadataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRefreshLibraryMetadataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRefreshLibraryMetadataBadRequest other = (GetRefreshLibraryMetadataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetRefreshLibraryMetadataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetRefreshLibraryMetadataBadRequest build() { - - return new GetRefreshLibraryMetadataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetRefreshLibraryMetadataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetRefreshLibraryMetadataUnauthorized.java deleted file mode 100644 index e7a88050..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetRefreshLibraryMetadataUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetRefreshLibraryMetadataLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetRefreshLibraryMetadataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetRefreshLibraryMetadataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetRefreshLibraryMetadataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetRefreshLibraryMetadataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRefreshLibraryMetadataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetRefreshLibraryMetadataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRefreshLibraryMetadataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRefreshLibraryMetadataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRefreshLibraryMetadataUnauthorized other = (GetRefreshLibraryMetadataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetRefreshLibraryMetadataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetRefreshLibraryMetadataUnauthorized build() { - - return new GetRefreshLibraryMetadataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetResizedPhotoBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetResizedPhotoBadRequest.java deleted file mode 100644 index f75070bf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetResizedPhotoBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetResizedPhotoErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetResizedPhotoBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetResizedPhotoBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetResizedPhotoBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetResizedPhotoBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResizedPhotoBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetResizedPhotoBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResizedPhotoBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResizedPhotoBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResizedPhotoBadRequest other = (GetResizedPhotoBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetResizedPhotoBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetResizedPhotoBadRequest build() { - - return new GetResizedPhotoBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetResizedPhotoUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetResizedPhotoUnauthorized.java deleted file mode 100644 index 7cf513bf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetResizedPhotoUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetResizedPhotoServerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetResizedPhotoUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetResizedPhotoUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetResizedPhotoUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetResizedPhotoUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResizedPhotoUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetResizedPhotoUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResizedPhotoUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResizedPhotoUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResizedPhotoUnauthorized other = (GetResizedPhotoUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetResizedPhotoUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetResizedPhotoUnauthorized build() { - - return new GetResizedPhotoUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetResourcesStatisticsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetResourcesStatisticsBadRequest.java deleted file mode 100644 index 7b4bf770..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetResourcesStatisticsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetResourcesStatisticsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetResourcesStatisticsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetResourcesStatisticsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetResourcesStatisticsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetResourcesStatisticsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResourcesStatisticsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetResourcesStatisticsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResourcesStatisticsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResourcesStatisticsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResourcesStatisticsBadRequest other = (GetResourcesStatisticsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetResourcesStatisticsBadRequest build() { - - return new GetResourcesStatisticsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetResourcesStatisticsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetResourcesStatisticsUnauthorized.java deleted file mode 100644 index 105c9a15..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetResourcesStatisticsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetResourcesStatisticsStatisticsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetResourcesStatisticsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetResourcesStatisticsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetResourcesStatisticsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetResourcesStatisticsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResourcesStatisticsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetResourcesStatisticsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResourcesStatisticsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResourcesStatisticsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResourcesStatisticsUnauthorized other = (GetResourcesStatisticsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetResourcesStatisticsUnauthorized build() { - - return new GetResourcesStatisticsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchAllLibrariesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchAllLibrariesBadRequest.java deleted file mode 100644 index 1e22ea00..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchAllLibrariesBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSearchAllLibrariesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchAllLibrariesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSearchAllLibrariesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchAllLibrariesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchAllLibrariesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchAllLibrariesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchAllLibrariesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchAllLibrariesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchAllLibrariesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesBadRequest other = (GetSearchAllLibrariesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchAllLibrariesBadRequest build() { - - return new GetSearchAllLibrariesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchAllLibrariesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchAllLibrariesUnauthorized.java deleted file mode 100644 index c94f2839..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchAllLibrariesUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSearchAllLibrariesLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchAllLibrariesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSearchAllLibrariesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchAllLibrariesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchAllLibrariesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchAllLibrariesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchAllLibrariesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchAllLibrariesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchAllLibrariesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesUnauthorized other = (GetSearchAllLibrariesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchAllLibrariesUnauthorized build() { - - return new GetSearchAllLibrariesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchLibraryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchLibraryBadRequest.java deleted file mode 100644 index dc960fee..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchLibraryBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSearchLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchLibraryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSearchLibraryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchLibraryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchLibraryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchLibraryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchLibraryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchLibraryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchLibraryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchLibraryBadRequest other = (GetSearchLibraryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchLibraryBadRequest build() { - - return new GetSearchLibraryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchLibraryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchLibraryUnauthorized.java deleted file mode 100644 index 1130b975..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchLibraryUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSearchLibraryLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchLibraryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSearchLibraryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchLibraryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchLibraryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchLibraryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchLibraryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchLibraryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchLibraryUnauthorized other = (GetSearchLibraryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchLibraryUnauthorized build() { - - return new GetSearchLibraryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchResultsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchResultsBadRequest.java deleted file mode 100644 index 201056f3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchResultsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSearchResultsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchResultsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSearchResultsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchResultsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchResultsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchResultsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchResultsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchResultsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchResultsBadRequest other = (GetSearchResultsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchResultsBadRequest build() { - - return new GetSearchResultsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchResultsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchResultsUnauthorized.java deleted file mode 100644 index aadb9187..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSearchResultsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSearchResultsSearchErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchResultsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSearchResultsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSearchResultsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSearchResultsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSearchResultsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchResultsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchResultsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchResultsUnauthorized other = (GetSearchResultsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSearchResultsUnauthorized build() { - - return new GetSearchResultsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerActivitiesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerActivitiesBadRequest.java deleted file mode 100644 index 462815f2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerActivitiesBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetServerActivitiesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerActivitiesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetServerActivitiesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerActivitiesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerActivitiesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerActivitiesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerActivitiesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerActivitiesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerActivitiesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerActivitiesBadRequest other = (GetServerActivitiesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerActivitiesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerActivitiesBadRequest build() { - - return new GetServerActivitiesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerActivitiesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerActivitiesUnauthorized.java deleted file mode 100644 index fb9a4960..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerActivitiesUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetServerActivitiesActivitiesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerActivitiesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetServerActivitiesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerActivitiesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerActivitiesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerActivitiesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerActivitiesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerActivitiesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerActivitiesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerActivitiesUnauthorized other = (GetServerActivitiesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerActivitiesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerActivitiesUnauthorized build() { - - return new GetServerActivitiesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerCapabilitiesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerCapabilitiesBadRequest.java deleted file mode 100644 index 0c15d26b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerCapabilitiesBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.Errors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerCapabilitiesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetServerCapabilitiesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerCapabilitiesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerCapabilitiesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerCapabilitiesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerCapabilitiesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerCapabilitiesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerCapabilitiesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerCapabilitiesBadRequest other = (GetServerCapabilitiesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerCapabilitiesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerCapabilitiesBadRequest build() { - - return new GetServerCapabilitiesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerCapabilitiesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerCapabilitiesUnauthorized.java deleted file mode 100644 index c9e90ad2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerCapabilitiesUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetServerCapabilitiesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerCapabilitiesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetServerCapabilitiesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerCapabilitiesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerCapabilitiesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerCapabilitiesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerCapabilitiesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerCapabilitiesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerCapabilitiesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerCapabilitiesUnauthorized other = (GetServerCapabilitiesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerCapabilitiesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerCapabilitiesUnauthorized build() { - - return new GetServerCapabilitiesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerIdentityRequestTimeout.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerIdentityRequestTimeout.java deleted file mode 100644 index 4f9723fe..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerIdentityRequestTimeout.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - -/** - * GetServerIdentityRequestTimeout - * - *

Request Timeout - */ -@SuppressWarnings("serial") -public class GetServerIdentityRequestTimeout extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private Optional code; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("message") - private Optional message; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerIdentityRequestTimeout( - @JsonProperty("code") Optional code, - @JsonProperty("message") Optional message, - @JsonProperty("RawResponse") Optional> rawResponse) { - super(Utils.valueOrElse(message, "API error occurred")); - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.code = code; - this.message = message; - this.rawResponse = rawResponse; - } - - public GetServerIdentityRequestTimeout() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional code() { - return code; - } - - @JsonIgnore - public Optional message() { - return message; - } - - @JsonIgnore - @Override - public String getMessage() { - return Utils.valueOrNull(message); - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerIdentityRequestTimeout withCode(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - - public GetServerIdentityRequestTimeout withCode(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetServerIdentityRequestTimeout withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - - public GetServerIdentityRequestTimeout withMessage(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerIdentityRequestTimeout withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerIdentityRequestTimeout withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerIdentityRequestTimeout other = (GetServerIdentityRequestTimeout) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, message, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerIdentityRequestTimeout.class, - "code", code, - "message", message, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder code(int code) { - Utils.checkNotNull(code, "code"); - this.code = Optional.ofNullable(code); - return this; - } - - public Builder code(Optional code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = Optional.ofNullable(message); - return this; - } - - public Builder message(Optional message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerIdentityRequestTimeout build() { - - return new GetServerIdentityRequestTimeout( - code, message, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerListBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerListBadRequest.java deleted file mode 100644 index 2b546078..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerListBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetServerListErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerListBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetServerListBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerListBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerListBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerListBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerListBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerListBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerListBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerListBadRequest other = (GetServerListBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerListBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerListBadRequest build() { - - return new GetServerListBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerListUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerListUnauthorized.java deleted file mode 100644 index 907a4eb1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerListUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetServerListServerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerListUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetServerListUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerListUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerListUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerListUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerListUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerListUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerListUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerListUnauthorized other = (GetServerListUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerListUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerListUnauthorized build() { - - return new GetServerListUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerPreferencesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerPreferencesBadRequest.java deleted file mode 100644 index c4ed885b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerPreferencesBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetServerPreferencesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerPreferencesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetServerPreferencesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerPreferencesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerPreferencesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerPreferencesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerPreferencesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerPreferencesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerPreferencesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerPreferencesBadRequest other = (GetServerPreferencesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerPreferencesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerPreferencesBadRequest build() { - - return new GetServerPreferencesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerPreferencesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerPreferencesUnauthorized.java deleted file mode 100644 index 0ffbb2a1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerPreferencesUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetServerPreferencesServerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerPreferencesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetServerPreferencesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerPreferencesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerPreferencesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerPreferencesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerPreferencesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerPreferencesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerPreferencesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerPreferencesUnauthorized other = (GetServerPreferencesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerPreferencesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerPreferencesUnauthorized build() { - - return new GetServerPreferencesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerResourcesBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerResourcesBadRequest.java deleted file mode 100644 index 73b8fd29..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerResourcesBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetServerResourcesErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerResourcesBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetServerResourcesBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerResourcesBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerResourcesBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerResourcesBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerResourcesBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerResourcesBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerResourcesBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerResourcesBadRequest other = (GetServerResourcesBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerResourcesBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerResourcesBadRequest build() { - - return new GetServerResourcesBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerResourcesUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerResourcesUnauthorized.java deleted file mode 100644 index e2450108..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetServerResourcesUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetServerResourcesPlexErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetServerResourcesUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetServerResourcesUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetServerResourcesUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetServerResourcesUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerResourcesUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetServerResourcesUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerResourcesUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerResourcesUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerResourcesUnauthorized other = (GetServerResourcesUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetServerResourcesUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetServerResourcesUnauthorized build() { - - return new GetServerResourcesUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionHistoryBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionHistoryBadRequest.java deleted file mode 100644 index 4bb6377e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionHistoryBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSessionHistoryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSessionHistoryBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSessionHistoryBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSessionHistoryBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSessionHistoryBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionHistoryBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSessionHistoryBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionHistoryBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionHistoryBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionHistoryBadRequest other = (GetSessionHistoryBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSessionHistoryBadRequest build() { - - return new GetSessionHistoryBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionHistoryUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionHistoryUnauthorized.java deleted file mode 100644 index 1c96cd96..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionHistoryUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSessionHistorySessionsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSessionHistoryUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSessionHistoryUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSessionHistoryUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSessionHistoryUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionHistoryUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSessionHistoryUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionHistoryUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionHistoryUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionHistoryUnauthorized other = (GetSessionHistoryUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSessionHistoryUnauthorized build() { - - return new GetSessionHistoryUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionsBadRequest.java deleted file mode 100644 index 4ebbd73d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSessionsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSessionsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSessionsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSessionsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSessionsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSessionsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionsBadRequest other = (GetSessionsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSessionsBadRequest build() { - - return new GetSessionsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionsUnauthorized.java deleted file mode 100644 index ff042e65..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSessionsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSessionsSessionsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSessionsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSessionsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSessionsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSessionsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSessionsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionsUnauthorized other = (GetSessionsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSessionsUnauthorized build() { - - return new GetSessionsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSourceConnectionInformationBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSourceConnectionInformationBadRequest.java deleted file mode 100644 index 7531b603..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSourceConnectionInformationBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSourceConnectionInformationErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSourceConnectionInformationBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetSourceConnectionInformationBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSourceConnectionInformationBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSourceConnectionInformationBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSourceConnectionInformationBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSourceConnectionInformationBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSourceConnectionInformationBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSourceConnectionInformationBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSourceConnectionInformationBadRequest other = (GetSourceConnectionInformationBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSourceConnectionInformationBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSourceConnectionInformationBadRequest build() { - - return new GetSourceConnectionInformationBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSourceConnectionInformationUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetSourceConnectionInformationUnauthorized.java deleted file mode 100644 index 838a025a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetSourceConnectionInformationUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetSourceConnectionInformationAuthenticationErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetSourceConnectionInformationUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetSourceConnectionInformationUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetSourceConnectionInformationUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetSourceConnectionInformationUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSourceConnectionInformationUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetSourceConnectionInformationUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSourceConnectionInformationUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSourceConnectionInformationUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSourceConnectionInformationUnauthorized other = (GetSourceConnectionInformationUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetSourceConnectionInformationUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetSourceConnectionInformationUnauthorized build() { - - return new GetSourceConnectionInformationUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetStatisticsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetStatisticsBadRequest.java deleted file mode 100644 index 2a6e1245..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetStatisticsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetStatisticsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetStatisticsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetStatisticsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetStatisticsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetStatisticsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetStatisticsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetStatisticsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetStatisticsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetStatisticsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetStatisticsBadRequest other = (GetStatisticsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetStatisticsBadRequest build() { - - return new GetStatisticsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetStatisticsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetStatisticsUnauthorized.java deleted file mode 100644 index d5b923b8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetStatisticsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetStatisticsStatisticsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetStatisticsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetStatisticsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetStatisticsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetStatisticsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetStatisticsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetStatisticsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetStatisticsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetStatisticsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetStatisticsUnauthorized other = (GetStatisticsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetStatisticsUnauthorized build() { - - return new GetStatisticsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetThumbImageBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetThumbImageBadRequest.java deleted file mode 100644 index f59262aa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetThumbImageBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetThumbImageErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetThumbImageBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetThumbImageBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetThumbImageBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetThumbImageBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetThumbImageBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetThumbImageBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetThumbImageBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetThumbImageBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetThumbImageBadRequest other = (GetThumbImageBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetThumbImageBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetThumbImageBadRequest build() { - - return new GetThumbImageBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetThumbImageUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetThumbImageUnauthorized.java deleted file mode 100644 index e2d730d1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetThumbImageUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetThumbImageMediaErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetThumbImageUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetThumbImageUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetThumbImageUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetThumbImageUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetThumbImageUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetThumbImageUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetThumbImageUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetThumbImageUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetThumbImageUnauthorized other = (GetThumbImageUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetThumbImageUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetThumbImageUnauthorized build() { - - return new GetThumbImageUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTimelineBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTimelineBadRequest.java deleted file mode 100644 index 4fcaa560..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTimelineBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTimelineErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTimelineBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTimelineBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTimelineBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTimelineBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTimelineBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTimelineBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTimelineBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTimelineBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTimelineBadRequest other = (GetTimelineBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTimelineBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTimelineBadRequest build() { - - return new GetTimelineBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTimelineUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTimelineUnauthorized.java deleted file mode 100644 index c2601915..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTimelineUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTimelineVideoErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTimelineUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetTimelineUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTimelineUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTimelineUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTimelineUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTimelineUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTimelineUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTimelineUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTimelineUnauthorized other = (GetTimelineUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTimelineUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTimelineUnauthorized build() { - - return new GetTimelineUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenByPinIdBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenByPinIdBadRequest.java deleted file mode 100644 index 5f2884d0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenByPinIdBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTokenByPinIdErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTokenByPinIdBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTokenByPinIdBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTokenByPinIdBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTokenByPinIdBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenByPinIdBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTokenByPinIdBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenByPinIdBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenByPinIdBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdBadRequest other = (GetTokenByPinIdBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTokenByPinIdBadRequest build() { - - return new GetTokenByPinIdBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenByPinIdResponseBody.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenByPinIdResponseBody.java deleted file mode 100644 index c12fa788..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenByPinIdResponseBody.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTokenByPinIdPlexErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTokenByPinIdResponseBody - * - *

Not Found or Expired - */ -@SuppressWarnings("serial") -public class GetTokenByPinIdResponseBody extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTokenByPinIdResponseBody( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTokenByPinIdResponseBody() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenByPinIdResponseBody withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTokenByPinIdResponseBody withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenByPinIdResponseBody withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenByPinIdResponseBody withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdResponseBody other = (GetTokenByPinIdResponseBody) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdResponseBody.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTokenByPinIdResponseBody build() { - - return new GetTokenByPinIdResponseBody( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenDetailsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenDetailsBadRequest.java deleted file mode 100644 index 5031fc1a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenDetailsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTokenDetailsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTokenDetailsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTokenDetailsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTokenDetailsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTokenDetailsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenDetailsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTokenDetailsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenDetailsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenDetailsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenDetailsBadRequest other = (GetTokenDetailsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTokenDetailsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTokenDetailsBadRequest build() { - - return new GetTokenDetailsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenDetailsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenDetailsUnauthorized.java deleted file mode 100644 index f773d1f5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTokenDetailsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTokenDetailsAuthenticationErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTokenDetailsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetTokenDetailsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTokenDetailsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTokenDetailsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenDetailsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTokenDetailsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenDetailsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenDetailsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenDetailsUnauthorized other = (GetTokenDetailsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTokenDetailsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTokenDetailsUnauthorized build() { - - return new GetTokenDetailsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTopWatchedContentBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTopWatchedContentBadRequest.java deleted file mode 100644 index e3a44b03..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTopWatchedContentBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTopWatchedContentErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTopWatchedContentBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTopWatchedContentBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTopWatchedContentBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTopWatchedContentBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTopWatchedContentBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTopWatchedContentBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTopWatchedContentBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopWatchedContentBadRequest other = (GetTopWatchedContentBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTopWatchedContentBadRequest build() { - - return new GetTopWatchedContentBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTopWatchedContentUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTopWatchedContentUnauthorized.java deleted file mode 100644 index 2f39fba6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTopWatchedContentUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTopWatchedContentLibraryErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTopWatchedContentUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetTopWatchedContentUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTopWatchedContentUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTopWatchedContentUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTopWatchedContentUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTopWatchedContentUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTopWatchedContentUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopWatchedContentUnauthorized other = (GetTopWatchedContentUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTopWatchedContentUnauthorized build() { - - return new GetTopWatchedContentUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTranscodeSessionsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTranscodeSessionsBadRequest.java deleted file mode 100644 index 33c05041..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTranscodeSessionsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTranscodeSessionsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTranscodeSessionsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTranscodeSessionsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTranscodeSessionsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTranscodeSessionsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTranscodeSessionsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTranscodeSessionsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTranscodeSessionsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTranscodeSessionsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTranscodeSessionsBadRequest other = (GetTranscodeSessionsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTranscodeSessionsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTranscodeSessionsBadRequest build() { - - return new GetTranscodeSessionsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTranscodeSessionsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTranscodeSessionsUnauthorized.java deleted file mode 100644 index 104b87b6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTranscodeSessionsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTranscodeSessionsSessionsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTranscodeSessionsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetTranscodeSessionsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTranscodeSessionsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTranscodeSessionsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTranscodeSessionsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTranscodeSessionsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTranscodeSessionsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTranscodeSessionsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTranscodeSessionsUnauthorized other = (GetTranscodeSessionsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTranscodeSessionsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTranscodeSessionsUnauthorized build() { - - return new GetTranscodeSessionsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTransientTokenBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTransientTokenBadRequest.java deleted file mode 100644 index f7db8fd6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTransientTokenBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTransientTokenErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTransientTokenBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetTransientTokenBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTransientTokenBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTransientTokenBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTransientTokenBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTransientTokenBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTransientTokenBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTransientTokenBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTransientTokenBadRequest other = (GetTransientTokenBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTransientTokenBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTransientTokenBadRequest build() { - - return new GetTransientTokenBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTransientTokenUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetTransientTokenUnauthorized.java deleted file mode 100644 index 346863e7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetTransientTokenUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetTransientTokenAuthenticationErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetTransientTokenUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetTransientTokenUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetTransientTokenUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetTransientTokenUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTransientTokenUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetTransientTokenUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTransientTokenUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTransientTokenUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTransientTokenUnauthorized other = (GetTransientTokenUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTransientTokenUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTransientTokenUnauthorized build() { - - return new GetTransientTokenUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUpdateStatusBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetUpdateStatusBadRequest.java deleted file mode 100644 index 3f96a42e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUpdateStatusBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetUpdateStatusErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUpdateStatusBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetUpdateStatusBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUpdateStatusBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUpdateStatusBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUpdateStatusBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUpdateStatusBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUpdateStatusBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUpdateStatusBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUpdateStatusBadRequest other = (GetUpdateStatusBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUpdateStatusBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUpdateStatusBadRequest build() { - - return new GetUpdateStatusBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUpdateStatusUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetUpdateStatusUnauthorized.java deleted file mode 100644 index b9914973..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUpdateStatusUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetUpdateStatusUpdaterErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUpdateStatusUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetUpdateStatusUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUpdateStatusUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUpdateStatusUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUpdateStatusUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUpdateStatusUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUpdateStatusUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUpdateStatusUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUpdateStatusUnauthorized other = (GetUpdateStatusUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUpdateStatusUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUpdateStatusUnauthorized build() { - - return new GetUpdateStatusUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUserFriendsBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetUserFriendsBadRequest.java deleted file mode 100644 index 521fc2e3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUserFriendsBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetUserFriendsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUserFriendsBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetUserFriendsBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUserFriendsBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUserFriendsBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUserFriendsBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUserFriendsBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUserFriendsBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUserFriendsBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUserFriendsBadRequest other = (GetUserFriendsBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUserFriendsBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUserFriendsBadRequest build() { - - return new GetUserFriendsBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUserFriendsUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetUserFriendsUnauthorized.java deleted file mode 100644 index 684973e9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUserFriendsUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetUserFriendsPlexErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUserFriendsUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetUserFriendsUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUserFriendsUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUserFriendsUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUserFriendsUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUserFriendsUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUserFriendsUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUserFriendsUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUserFriendsUnauthorized other = (GetUserFriendsUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUserFriendsUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUserFriendsUnauthorized build() { - - return new GetUserFriendsUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUsersBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetUsersBadRequest.java deleted file mode 100644 index 8f9bbc0f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUsersBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetUsersErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUsersBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetUsersBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUsersBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUsersBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUsersBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUsersBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUsersBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUsersBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersBadRequest other = (GetUsersBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUsersBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUsersBadRequest build() { - - return new GetUsersBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUsersUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetUsersUnauthorized.java deleted file mode 100644 index de9f10cb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetUsersUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetUsersUsersErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetUsersUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetUsersUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetUsersUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetUsersUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUsersUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetUsersUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUsersUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUsersUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersUnauthorized other = (GetUsersUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetUsersUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUsersUnauthorized build() { - - return new GetUsersUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetWatchListBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetWatchListBadRequest.java deleted file mode 100644 index e101a020..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetWatchListBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetWatchListErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetWatchListBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class GetWatchListBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetWatchListBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetWatchListBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetWatchListBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetWatchListBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetWatchListBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetWatchListBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetWatchListBadRequest other = (GetWatchListBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetWatchListBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetWatchListBadRequest build() { - - return new GetWatchListBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/GetWatchListUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/GetWatchListUnauthorized.java deleted file mode 100644 index 0cd55187..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/GetWatchListUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.GetWatchListWatchlistErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * GetWatchListUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class GetWatchListUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public GetWatchListUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public GetWatchListUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetWatchListUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public GetWatchListUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetWatchListUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetWatchListUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetWatchListUnauthorized other = (GetWatchListUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetWatchListUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetWatchListUnauthorized build() { - - return new GetWatchListUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/LogLineBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/LogLineBadRequest.java deleted file mode 100644 index 2c346700..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/LogLineBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.LogLineErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * LogLineBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class LogLineBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public LogLineBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public LogLineBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogLineBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public LogLineBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogLineBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogLineBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogLineBadRequest other = (LogLineBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogLineBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogLineBadRequest build() { - - return new LogLineBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/LogLineUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/LogLineUnauthorized.java deleted file mode 100644 index 2188e76d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/LogLineUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.LogLineLogErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * LogLineUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class LogLineUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public LogLineUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public LogLineUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogLineUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public LogLineUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogLineUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogLineUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogLineUnauthorized other = (LogLineUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogLineUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogLineUnauthorized build() { - - return new LogLineUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/LogMultiLineBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/LogMultiLineBadRequest.java deleted file mode 100644 index 14c62341..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/LogMultiLineBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.LogMultiLineErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * LogMultiLineBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class LogMultiLineBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public LogMultiLineBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public LogMultiLineBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogMultiLineBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public LogMultiLineBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogMultiLineBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogMultiLineBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogMultiLineBadRequest other = (LogMultiLineBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogMultiLineBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogMultiLineBadRequest build() { - - return new LogMultiLineBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/LogMultiLineUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/LogMultiLineUnauthorized.java deleted file mode 100644 index 5dfb4eb0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/LogMultiLineUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.LogMultiLineLogErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * LogMultiLineUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class LogMultiLineUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public LogMultiLineUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public LogMultiLineUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public LogMultiLineUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public LogMultiLineUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogMultiLineUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogMultiLineUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogMultiLineUnauthorized other = (LogMultiLineUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogMultiLineUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogMultiLineUnauthorized build() { - - return new LogMultiLineUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/MarkPlayedBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/MarkPlayedBadRequest.java deleted file mode 100644 index ef786afc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/MarkPlayedBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.MarkPlayedErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * MarkPlayedBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class MarkPlayedBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public MarkPlayedBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public MarkPlayedBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkPlayedBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public MarkPlayedBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkPlayedBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkPlayedBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkPlayedBadRequest other = (MarkPlayedBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(MarkPlayedBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public MarkPlayedBadRequest build() { - - return new MarkPlayedBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/MarkPlayedUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/MarkPlayedUnauthorized.java deleted file mode 100644 index b6371ae7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/MarkPlayedUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.MarkPlayedMediaErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * MarkPlayedUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class MarkPlayedUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public MarkPlayedUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public MarkPlayedUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkPlayedUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public MarkPlayedUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkPlayedUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkPlayedUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkPlayedUnauthorized other = (MarkPlayedUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(MarkPlayedUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public MarkPlayedUnauthorized build() { - - return new MarkPlayedUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/MarkUnplayedBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/MarkUnplayedBadRequest.java deleted file mode 100644 index 37af0b96..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/MarkUnplayedBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.MarkUnplayedErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * MarkUnplayedBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class MarkUnplayedBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public MarkUnplayedBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public MarkUnplayedBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkUnplayedBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public MarkUnplayedBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkUnplayedBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkUnplayedBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkUnplayedBadRequest other = (MarkUnplayedBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(MarkUnplayedBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public MarkUnplayedBadRequest build() { - - return new MarkUnplayedBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/MarkUnplayedUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/MarkUnplayedUnauthorized.java deleted file mode 100644 index 274837d1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/MarkUnplayedUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.MarkUnplayedMediaErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * MarkUnplayedUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class MarkUnplayedUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public MarkUnplayedUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public MarkUnplayedUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public MarkUnplayedUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public MarkUnplayedUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkUnplayedUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkUnplayedUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkUnplayedUnauthorized other = (MarkUnplayedUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(MarkUnplayedUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public MarkUnplayedUnauthorized build() { - - return new MarkUnplayedUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/PerformSearchBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/PerformSearchBadRequest.java deleted file mode 100644 index 17613379..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/PerformSearchBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.PerformSearchErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PerformSearchBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class PerformSearchBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PerformSearchBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PerformSearchBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformSearchBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PerformSearchBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformSearchBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformSearchBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformSearchBadRequest other = (PerformSearchBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformSearchBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformSearchBadRequest build() { - - return new PerformSearchBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/PerformSearchUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/PerformSearchUnauthorized.java deleted file mode 100644 index ed8c5c35..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/PerformSearchUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.PerformSearchSearchErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PerformSearchUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class PerformSearchUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PerformSearchUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PerformSearchUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformSearchUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PerformSearchUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformSearchUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformSearchUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformSearchUnauthorized other = (PerformSearchUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformSearchUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformSearchUnauthorized build() { - - return new PerformSearchUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/PerformVoiceSearchBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/PerformVoiceSearchBadRequest.java deleted file mode 100644 index b1a52df5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/PerformVoiceSearchBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.PerformVoiceSearchErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PerformVoiceSearchBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class PerformVoiceSearchBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PerformVoiceSearchBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PerformVoiceSearchBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformVoiceSearchBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PerformVoiceSearchBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformVoiceSearchBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformVoiceSearchBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformVoiceSearchBadRequest other = (PerformVoiceSearchBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformVoiceSearchBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformVoiceSearchBadRequest build() { - - return new PerformVoiceSearchBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/PerformVoiceSearchUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/PerformVoiceSearchUnauthorized.java deleted file mode 100644 index d4fd1122..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/PerformVoiceSearchUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.PerformVoiceSearchSearchErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PerformVoiceSearchUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class PerformVoiceSearchUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PerformVoiceSearchUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PerformVoiceSearchUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PerformVoiceSearchUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PerformVoiceSearchUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformVoiceSearchUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformVoiceSearchUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformVoiceSearchUnauthorized other = (PerformVoiceSearchUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformVoiceSearchUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformVoiceSearchUnauthorized build() { - - return new PerformVoiceSearchUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/PostUsersSignInDataBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/PostUsersSignInDataBadRequest.java deleted file mode 100644 index 83ac2655..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/PostUsersSignInDataBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.PostUsersSignInDataErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PostUsersSignInDataBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class PostUsersSignInDataBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PostUsersSignInDataBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PostUsersSignInDataBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PostUsersSignInDataBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PostUsersSignInDataBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostUsersSignInDataBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostUsersSignInDataBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataBadRequest other = (PostUsersSignInDataBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PostUsersSignInDataBadRequest build() { - - return new PostUsersSignInDataBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/PostUsersSignInDataUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/PostUsersSignInDataUnauthorized.java deleted file mode 100644 index 7a6476f9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/PostUsersSignInDataUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.PostUsersSignInDataAuthenticationErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * PostUsersSignInDataUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class PostUsersSignInDataUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public PostUsersSignInDataUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public PostUsersSignInDataUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public PostUsersSignInDataUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public PostUsersSignInDataUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostUsersSignInDataUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostUsersSignInDataUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataUnauthorized other = (PostUsersSignInDataUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PostUsersSignInDataUnauthorized build() { - - return new PostUsersSignInDataUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StartAllTasksBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StartAllTasksBadRequest.java deleted file mode 100644 index c82edc82..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StartAllTasksBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StartAllTasksErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartAllTasksBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StartAllTasksBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartAllTasksBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartAllTasksBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartAllTasksBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartAllTasksBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartAllTasksBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartAllTasksBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartAllTasksBadRequest other = (StartAllTasksBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartAllTasksBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartAllTasksBadRequest build() { - - return new StartAllTasksBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StartAllTasksUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StartAllTasksUnauthorized.java deleted file mode 100644 index ba3ce802..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StartAllTasksUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StartAllTasksButlerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartAllTasksUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StartAllTasksUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartAllTasksUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartAllTasksUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartAllTasksUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartAllTasksUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartAllTasksUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartAllTasksUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartAllTasksUnauthorized other = (StartAllTasksUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartAllTasksUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartAllTasksUnauthorized build() { - - return new StartAllTasksUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StartTaskBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StartTaskBadRequest.java deleted file mode 100644 index 7fa451ef..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StartTaskBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StartTaskErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartTaskBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StartTaskBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartTaskBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartTaskBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartTaskBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartTaskBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartTaskBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartTaskBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartTaskBadRequest other = (StartTaskBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartTaskBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartTaskBadRequest build() { - - return new StartTaskBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StartTaskUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StartTaskUnauthorized.java deleted file mode 100644 index f56da7dd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StartTaskUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StartTaskButlerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartTaskUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StartTaskUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartTaskUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartTaskUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartTaskUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartTaskUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartTaskUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartTaskUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartTaskUnauthorized other = (StartTaskUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartTaskUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartTaskUnauthorized build() { - - return new StartTaskUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StartUniversalTranscodeBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StartUniversalTranscodeBadRequest.java deleted file mode 100644 index 5d7fc529..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StartUniversalTranscodeBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StartUniversalTranscodeErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartUniversalTranscodeBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StartUniversalTranscodeBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartUniversalTranscodeBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartUniversalTranscodeBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartUniversalTranscodeBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartUniversalTranscodeBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartUniversalTranscodeBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartUniversalTranscodeBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartUniversalTranscodeBadRequest other = (StartUniversalTranscodeBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartUniversalTranscodeBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartUniversalTranscodeBadRequest build() { - - return new StartUniversalTranscodeBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StartUniversalTranscodeUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StartUniversalTranscodeUnauthorized.java deleted file mode 100644 index 59ee3cfa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StartUniversalTranscodeUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StartUniversalTranscodeVideoErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StartUniversalTranscodeUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StartUniversalTranscodeUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StartUniversalTranscodeUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StartUniversalTranscodeUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StartUniversalTranscodeUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StartUniversalTranscodeUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartUniversalTranscodeUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartUniversalTranscodeUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartUniversalTranscodeUnauthorized other = (StartUniversalTranscodeUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartUniversalTranscodeUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartUniversalTranscodeUnauthorized build() { - - return new StartUniversalTranscodeUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StopAllTasksBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StopAllTasksBadRequest.java deleted file mode 100644 index 29e01c9c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StopAllTasksBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StopAllTasksErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopAllTasksBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StopAllTasksBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopAllTasksBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopAllTasksBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopAllTasksBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopAllTasksBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopAllTasksBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopAllTasksBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopAllTasksBadRequest other = (StopAllTasksBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopAllTasksBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopAllTasksBadRequest build() { - - return new StopAllTasksBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StopAllTasksUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StopAllTasksUnauthorized.java deleted file mode 100644 index 356f90e8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StopAllTasksUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StopAllTasksButlerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopAllTasksUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StopAllTasksUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopAllTasksUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopAllTasksUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopAllTasksUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopAllTasksUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopAllTasksUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopAllTasksUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopAllTasksUnauthorized other = (StopAllTasksUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopAllTasksUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopAllTasksUnauthorized build() { - - return new StopAllTasksUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StopTaskBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StopTaskBadRequest.java deleted file mode 100644 index 528fb3a9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StopTaskBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StopTaskErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopTaskBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StopTaskBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopTaskBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopTaskBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTaskBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopTaskBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTaskBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTaskBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTaskBadRequest other = (StopTaskBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopTaskBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopTaskBadRequest build() { - - return new StopTaskBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StopTaskUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StopTaskUnauthorized.java deleted file mode 100644 index 86f863e4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StopTaskUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StopTaskButlerErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopTaskUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StopTaskUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopTaskUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopTaskUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTaskUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopTaskUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTaskUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTaskUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTaskUnauthorized other = (StopTaskUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopTaskUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopTaskUnauthorized build() { - - return new StopTaskUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StopTranscodeSessionBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StopTranscodeSessionBadRequest.java deleted file mode 100644 index 9e203287..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StopTranscodeSessionBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StopTranscodeSessionErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopTranscodeSessionBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class StopTranscodeSessionBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopTranscodeSessionBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopTranscodeSessionBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTranscodeSessionBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopTranscodeSessionBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTranscodeSessionBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTranscodeSessionBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTranscodeSessionBadRequest other = (StopTranscodeSessionBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopTranscodeSessionBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopTranscodeSessionBadRequest build() { - - return new StopTranscodeSessionBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/StopTranscodeSessionUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/StopTranscodeSessionUnauthorized.java deleted file mode 100644 index 1da70cfb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/StopTranscodeSessionUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.StopTranscodeSessionSessionsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * StopTranscodeSessionUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class StopTranscodeSessionUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public StopTranscodeSessionUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public StopTranscodeSessionUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public StopTranscodeSessionUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public StopTranscodeSessionUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTranscodeSessionUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTranscodeSessionUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTranscodeSessionUnauthorized other = (StopTranscodeSessionUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopTranscodeSessionUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopTranscodeSessionUnauthorized build() { - - return new StopTranscodeSessionUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlayProgressBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlayProgressBadRequest.java deleted file mode 100644 index acceabf5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlayProgressBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.UpdatePlayProgressErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UpdatePlayProgressBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class UpdatePlayProgressBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UpdatePlayProgressBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UpdatePlayProgressBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlayProgressBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UpdatePlayProgressBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlayProgressBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlayProgressBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlayProgressBadRequest other = (UpdatePlayProgressBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlayProgressBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UpdatePlayProgressBadRequest build() { - - return new UpdatePlayProgressBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlayProgressUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlayProgressUnauthorized.java deleted file mode 100644 index e36c445b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlayProgressUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.UpdatePlayProgressMediaErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UpdatePlayProgressUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class UpdatePlayProgressUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UpdatePlayProgressUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UpdatePlayProgressUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlayProgressUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UpdatePlayProgressUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlayProgressUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlayProgressUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlayProgressUnauthorized other = (UpdatePlayProgressUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlayProgressUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UpdatePlayProgressUnauthorized build() { - - return new UpdatePlayProgressUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlaylistBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlaylistBadRequest.java deleted file mode 100644 index 520a9f84..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlaylistBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.UpdatePlaylistErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UpdatePlaylistBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class UpdatePlaylistBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UpdatePlaylistBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UpdatePlaylistBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlaylistBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UpdatePlaylistBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlaylistBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlaylistBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlaylistBadRequest other = (UpdatePlaylistBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlaylistBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UpdatePlaylistBadRequest build() { - - return new UpdatePlaylistBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlaylistUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlaylistUnauthorized.java deleted file mode 100644 index c1ecdd1e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/UpdatePlaylistUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.UpdatePlaylistPlaylistsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UpdatePlaylistUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class UpdatePlaylistUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UpdatePlaylistUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UpdatePlaylistUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UpdatePlaylistUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UpdatePlaylistUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlaylistUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlaylistUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlaylistUnauthorized other = (UpdatePlaylistUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlaylistUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UpdatePlaylistUnauthorized build() { - - return new UpdatePlaylistUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/UploadPlaylistBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/async/UploadPlaylistBadRequest.java deleted file mode 100644 index c055552c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/UploadPlaylistBadRequest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.UploadPlaylistErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UploadPlaylistBadRequest - * - *

Bad Request - A parameter was not specified, or was specified incorrectly. - */ -@SuppressWarnings("serial") -public class UploadPlaylistBadRequest extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UploadPlaylistBadRequest( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UploadPlaylistBadRequest() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UploadPlaylistBadRequest withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UploadPlaylistBadRequest withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UploadPlaylistBadRequest withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UploadPlaylistBadRequest withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UploadPlaylistBadRequest other = (UploadPlaylistBadRequest) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UploadPlaylistBadRequest.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UploadPlaylistBadRequest build() { - - return new UploadPlaylistBadRequest( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/errors/async/UploadPlaylistUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/async/UploadPlaylistUnauthorized.java deleted file mode 100644 index 541d3507..00000000 --- a/src/main/java/dev/plexapi/sdk/models/errors/async/UploadPlaylistUnauthorized.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.errors.async; - -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.models.errors.UploadPlaylistPlaylistsErrors; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - -/** - * UploadPlaylistUnauthorized - * - *

Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -@SuppressWarnings("serial") -public class UploadPlaylistUnauthorized extends RuntimeException { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("errors") - private Optional> errors; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("RawResponse") - private Optional> rawResponse; - - @JsonCreator - public UploadPlaylistUnauthorized( - @JsonProperty("errors") Optional> errors, - @JsonProperty("RawResponse") Optional> rawResponse) { - super("API error occurred"); - Utils.checkNotNull(errors, "errors"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.errors = errors; - this.rawResponse = rawResponse; - } - - public UploadPlaylistUnauthorized() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> errors() { - return (Optional>) errors; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rawResponse() { - return (Optional>) rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - public UploadPlaylistUnauthorized withErrors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - - public UploadPlaylistUnauthorized withErrors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UploadPlaylistUnauthorized withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UploadPlaylistUnauthorized withRawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UploadPlaylistUnauthorized other = (UploadPlaylistUnauthorized) o; - return - Utils.enhancedDeepEquals(this.errors, other.errors) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - errors, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UploadPlaylistUnauthorized.class, - "errors", errors, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> errors = Optional.empty(); - - private Optional> rawResponse; - - private Builder() { - // force use of static builder() method - } - - - public Builder errors(List errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = Optional.ofNullable(errors); - return this; - } - - public Builder errors(Optional> errors) { - Utils.checkNotNull(errors, "errors"); - this.errors = errors; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = Optional.ofNullable(rawResponse); - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(Optional> rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UploadPlaylistUnauthorized build() { - - return new UploadPlaylistUnauthorized( - errors, rawResponse); - } - - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Account.java b/src/main/java/dev/plexapi/sdk/models/operations/Account.java index d487dd6b..64d9d107 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Account.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Account.java @@ -9,8 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Optional; @@ -18,228 +17,70 @@ import java.util.Optional; public class Account { + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("globalViewCount") + private Optional globalViewCount; + + @JsonInclude(Include.NON_ABSENT) @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("name") - private Optional name; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("defaultAudioLanguage") - private Optional defaultAudioLanguage; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("autoSelectAudio") - private Optional autoSelectAudio; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("defaultSubtitleLanguage") - private Optional defaultSubtitleLanguage; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtitleMode") - private Optional subtitleMode; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; + private Optional id; @JsonCreator public Account( - @JsonProperty("id") Optional id, - @JsonProperty("key") Optional key, - @JsonProperty("name") Optional name, - @JsonProperty("defaultAudioLanguage") Optional defaultAudioLanguage, - @JsonProperty("autoSelectAudio") Optional autoSelectAudio, - @JsonProperty("defaultSubtitleLanguage") Optional defaultSubtitleLanguage, - @JsonProperty("subtitleMode") Optional subtitleMode, - @JsonProperty("thumb") Optional thumb) { + @JsonProperty("globalViewCount") Optional globalViewCount, + @JsonProperty("id") Optional id) { + Utils.checkNotNull(globalViewCount, "globalViewCount"); Utils.checkNotNull(id, "id"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - Utils.checkNotNull(subtitleMode, "subtitleMode"); - Utils.checkNotNull(thumb, "thumb"); + this.globalViewCount = globalViewCount; this.id = id; - this.key = key; - this.name = name; - this.defaultAudioLanguage = defaultAudioLanguage; - this.autoSelectAudio = autoSelectAudio; - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - this.subtitleMode = subtitleMode; - this.thumb = thumb; } public Account() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty()); } @JsonIgnore - public Optional id() { + public Optional globalViewCount() { + return globalViewCount; + } + + @JsonIgnore + public Optional id() { return id; } - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional name() { - return name; - } - - @JsonIgnore - public Optional defaultAudioLanguage() { - return defaultAudioLanguage; - } - - @JsonIgnore - public Optional autoSelectAudio() { - return autoSelectAudio; - } - - @JsonIgnore - public Optional defaultSubtitleLanguage() { - return defaultSubtitleLanguage; - } - - @JsonIgnore - public Optional subtitleMode() { - return subtitleMode; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - public static Builder builder() { return new Builder(); } - public Account withId(int id) { + public Account withGlobalViewCount(long globalViewCount) { + Utils.checkNotNull(globalViewCount, "globalViewCount"); + this.globalViewCount = Optional.ofNullable(globalViewCount); + return this; + } + + + public Account withGlobalViewCount(Optional globalViewCount) { + Utils.checkNotNull(globalViewCount, "globalViewCount"); + this.globalViewCount = globalViewCount; + return this; + } + + public Account withId(long id) { Utils.checkNotNull(id, "id"); this.id = Optional.ofNullable(id); return this; } - public Account withId(Optional id) { + public Account withId(Optional id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public Account withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public Account withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Account withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - - public Account withName(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public Account withDefaultAudioLanguage(String defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage); - return this; - } - - - public Account withDefaultAudioLanguage(Optional defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = defaultAudioLanguage; - return this; - } - - public Account withAutoSelectAudio(boolean autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = Optional.ofNullable(autoSelectAudio); - return this; - } - - - public Account withAutoSelectAudio(Optional autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = autoSelectAudio; - return this; - } - - public Account withDefaultSubtitleLanguage(String defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage); - return this; - } - - - public Account withDefaultSubtitleLanguage(Optional defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - return this; - } - - public Account withSubtitleMode(int subtitleMode) { - Utils.checkNotNull(subtitleMode, "subtitleMode"); - this.subtitleMode = Optional.ofNullable(subtitleMode); - return this; - } - - - public Account withSubtitleMode(Optional subtitleMode) { - Utils.checkNotNull(subtitleMode, "subtitleMode"); - this.subtitleMode = subtitleMode; - return this; - } - - public Account withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public Account withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -250,170 +91,64 @@ public class Account { } Account other = (Account) o; return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.defaultAudioLanguage, other.defaultAudioLanguage) && - Utils.enhancedDeepEquals(this.autoSelectAudio, other.autoSelectAudio) && - Utils.enhancedDeepEquals(this.defaultSubtitleLanguage, other.defaultSubtitleLanguage) && - Utils.enhancedDeepEquals(this.subtitleMode, other.subtitleMode) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); + Utils.enhancedDeepEquals(this.globalViewCount, other.globalViewCount) && + Utils.enhancedDeepEquals(this.id, other.id); } @Override public int hashCode() { return Utils.enhancedHash( - id, key, name, - defaultAudioLanguage, autoSelectAudio, defaultSubtitleLanguage, - subtitleMode, thumb); + globalViewCount, id); } @Override public String toString() { return Utils.toString(Account.class, - "id", id, - "key", key, - "name", name, - "defaultAudioLanguage", defaultAudioLanguage, - "autoSelectAudio", autoSelectAudio, - "defaultSubtitleLanguage", defaultSubtitleLanguage, - "subtitleMode", subtitleMode, - "thumb", thumb); + "globalViewCount", globalViewCount, + "id", id); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional id = Optional.empty(); + private Optional globalViewCount = Optional.empty(); - private Optional key = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional defaultAudioLanguage = Optional.empty(); - - private Optional autoSelectAudio = Optional.empty(); - - private Optional defaultSubtitleLanguage = Optional.empty(); - - private Optional subtitleMode = Optional.empty(); - - private Optional thumb = Optional.empty(); + private Optional id = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder id(int id) { + public Builder globalViewCount(long globalViewCount) { + Utils.checkNotNull(globalViewCount, "globalViewCount"); + this.globalViewCount = Optional.ofNullable(globalViewCount); + return this; + } + + public Builder globalViewCount(Optional globalViewCount) { + Utils.checkNotNull(globalViewCount, "globalViewCount"); + this.globalViewCount = globalViewCount; + return this; + } + + + public Builder id(long id) { Utils.checkNotNull(id, "id"); this.id = Optional.ofNullable(id); return this; } - public Builder id(Optional id) { + 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 name(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - public Builder name(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder defaultAudioLanguage(String defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage); - return this; - } - - public Builder defaultAudioLanguage(Optional defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = defaultAudioLanguage; - return this; - } - - - public Builder autoSelectAudio(boolean autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = Optional.ofNullable(autoSelectAudio); - return this; - } - - public Builder autoSelectAudio(Optional autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = autoSelectAudio; - return this; - } - - - public Builder defaultSubtitleLanguage(String defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage); - return this; - } - - public Builder defaultSubtitleLanguage(Optional defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - return this; - } - - - public Builder subtitleMode(int subtitleMode) { - Utils.checkNotNull(subtitleMode, "subtitleMode"); - this.subtitleMode = Optional.ofNullable(subtitleMode); - return this; - } - - public Builder subtitleMode(Optional subtitleMode) { - Utils.checkNotNull(subtitleMode, "subtitleMode"); - this.subtitleMode = subtitleMode; - 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 Account build() { return new Account( - id, key, name, - defaultAudioLanguage, autoSelectAudio, defaultSubtitleLanguage, - subtitleMode, thumb); + globalViewCount, id); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Action.java b/src/main/java/dev/plexapi/sdk/models/operations/Action.java index 9c8c5914..14240bf7 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Action.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Action.java @@ -3,117 +3,39 @@ */ 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 com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; +/** + * Action + * + *

The action to perform for this item on this optimizer queue + */ +public enum Action { + REPROCESS("reprocess"), + DISABLE("disable"), + ENABLE("enable"); -public class Action { + @JsonValue + private final String value; - @JsonProperty("id") - private String id; - - - @JsonProperty("key") - private String key; - - @JsonCreator - public Action( - @JsonProperty("id") String id, - @JsonProperty("key") String key) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(key, "key"); - this.id = id; - this.key = key; - } - - @JsonIgnore - public String id() { - return id; - } - - @JsonIgnore - public String key() { - return key; - } - - public static Builder builder() { - return new Builder(); - } - - - public Action withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Action withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Action other = (Action) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key); + Action(String value) { + this.value = value; } - @Override - public int hashCode() { - return Utils.enhancedHash( - id, key); + public String value() { + return value; } - @Override - public String toString() { - return Utils.toString(Action.class, - "id", id, - "key", key); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String id; - - private String key; - - private Builder() { - // force use of static builder() method + public static Optional fromValue(String value) { + for (Action o: Action.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } } - - - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Action build() { - - return new Action( - id, key); - } - + return Optional.empty(); } } + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ActiveDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/ActiveDirection.java deleted file mode 100644 index f86be99f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/ActiveDirection.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * ActiveDirection - * - *

The direction of the sort. Can be either `asc` or `desc`. - */ -public enum ActiveDirection { - Ascending("asc"), - Descending("desc"); - - @JsonValue - private final String value; - - ActiveDirection(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (ActiveDirection o: ActiveDirection.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Activity.java b/src/main/java/dev/plexapi/sdk/models/operations/Activity.java index fa19cc6d..b8646e09 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Activity.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Activity.java @@ -11,126 +11,188 @@ 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.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Optional; public class Activity { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("uuid") - private Optional uuid; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - + /** + * Indicates whether this activity can be cancelled + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("cancellable") private Optional cancellable; - + /** + * An object with additional values + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("userID") - private Optional userID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtitle") - private Optional subtitle; - + @JsonProperty("Context") + private Optional> context; + /** + * A progress percentage. A value of -1 means the progress is indeterminate + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("progress") private Optional progress; - + /** + * An object with the response to the async opperation + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Context") - private Optional context; + @JsonProperty("Response") + private Optional> response; + + /** + * A user-friendly sub-title for this activity + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtitle") + private Optional subtitle; + + /** + * A user-friendly title for this activity + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of activity + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * The user this activity belongs to + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userID") + private Optional userID; + + /** + * The ID of the activity + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; @JsonCreator public Activity( - @JsonProperty("uuid") Optional uuid, - @JsonProperty("type") Optional type, @JsonProperty("cancellable") Optional cancellable, - @JsonProperty("userID") Optional userID, - @JsonProperty("title") Optional title, - @JsonProperty("subtitle") Optional subtitle, + @JsonProperty("Context") Optional> context, @JsonProperty("progress") Optional progress, - @JsonProperty("Context") Optional context) { - Utils.checkNotNull(uuid, "uuid"); - Utils.checkNotNull(type, "type"); + @JsonProperty("Response") Optional> response, + @JsonProperty("subtitle") Optional subtitle, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("userID") Optional userID, + @JsonProperty("uuid") Optional uuid) { Utils.checkNotNull(cancellable, "cancellable"); - Utils.checkNotNull(userID, "userID"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(subtitle, "subtitle"); - Utils.checkNotNull(progress, "progress"); Utils.checkNotNull(context, "context"); - this.uuid = uuid; - this.type = type; + Utils.checkNotNull(progress, "progress"); + Utils.checkNotNull(response, "response"); + Utils.checkNotNull(subtitle, "subtitle"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(userID, "userID"); + Utils.checkNotNull(uuid, "uuid"); this.cancellable = cancellable; - this.userID = userID; - this.title = title; - this.subtitle = subtitle; - this.progress = progress; this.context = context; + this.progress = progress; + this.response = response; + this.subtitle = subtitle; + this.title = title; + this.type = type; + this.userID = userID; + this.uuid = uuid; } public Activity() { this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional uuid() { - return uuid; - } - - @JsonIgnore - public Optional type() { - return type; + Optional.empty(), Optional.empty(), Optional.empty()); } + /** + * Indicates whether this activity can be cancelled + */ @JsonIgnore public Optional cancellable() { return cancellable; } + /** + * An object with additional values + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional userID() { - return userID; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional subtitle() { - return subtitle; + public Optional> context() { + return (Optional>) context; } + /** + * A progress percentage. A value of -1 means the progress is indeterminate + */ @JsonIgnore public Optional progress() { return progress; } + /** + * An object with the response to the async opperation + */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional context() { - return (Optional) context; + public Optional> response() { + return (Optional>) response; + } + + /** + * A user-friendly sub-title for this activity + */ + @JsonIgnore + public Optional subtitle() { + return subtitle; + } + + /** + * A user-friendly title for this activity + */ + @JsonIgnore + public Optional title() { + return title; + } + + /** + * The type of activity + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * The user this activity belongs to + */ + @JsonIgnore + public Optional userID() { + return userID; + } + + /** + * The ID of the activity + */ + @JsonIgnore + public Optional uuid() { + return uuid; } public static Builder builder() { @@ -138,32 +200,9 @@ public class Activity { } - public Activity withUuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = Optional.ofNullable(uuid); - return this; - } - - - public Activity withUuid(Optional uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - public Activity withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public Activity withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - + /** + * Indicates whether this activity can be cancelled + */ public Activity withCancellable(boolean cancellable) { Utils.checkNotNull(cancellable, "cancellable"); this.cancellable = Optional.ofNullable(cancellable); @@ -171,51 +210,37 @@ public class Activity { } + /** + * Indicates whether this activity can be cancelled + */ public Activity withCancellable(Optional cancellable) { Utils.checkNotNull(cancellable, "cancellable"); this.cancellable = cancellable; return this; } - public Activity withUserID(double userID) { - Utils.checkNotNull(userID, "userID"); - this.userID = Optional.ofNullable(userID); + /** + * An object with additional values + */ + public Activity withContext(Map context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); return this; } - public Activity withUserID(Optional userID) { - Utils.checkNotNull(userID, "userID"); - this.userID = userID; - return this; - } - - public Activity withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public Activity withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public Activity withSubtitle(String subtitle) { - Utils.checkNotNull(subtitle, "subtitle"); - this.subtitle = Optional.ofNullable(subtitle); - return this; - } - - - public Activity withSubtitle(Optional subtitle) { - Utils.checkNotNull(subtitle, "subtitle"); - this.subtitle = subtitle; + /** + * An object with additional values + */ + public Activity withContext(Optional> context) { + Utils.checkNotNull(context, "context"); + this.context = context; return this; } + /** + * A progress percentage. A value of -1 means the progress is indeterminate + */ public Activity withProgress(double progress) { Utils.checkNotNull(progress, "progress"); this.progress = Optional.ofNullable(progress); @@ -223,22 +248,126 @@ public class Activity { } + /** + * A progress percentage. A value of -1 means the progress is indeterminate + */ public Activity withProgress(Optional progress) { Utils.checkNotNull(progress, "progress"); this.progress = progress; return this; } - public Activity withContext(Context context) { - Utils.checkNotNull(context, "context"); - this.context = Optional.ofNullable(context); + /** + * An object with the response to the async opperation + */ + public Activity withResponse(Map response) { + Utils.checkNotNull(response, "response"); + this.response = Optional.ofNullable(response); return this; } - public Activity withContext(Optional context) { - Utils.checkNotNull(context, "context"); - this.context = context; + /** + * An object with the response to the async opperation + */ + public Activity withResponse(Optional> response) { + Utils.checkNotNull(response, "response"); + this.response = response; + return this; + } + + /** + * A user-friendly sub-title for this activity + */ + public Activity withSubtitle(String subtitle) { + Utils.checkNotNull(subtitle, "subtitle"); + this.subtitle = Optional.ofNullable(subtitle); + return this; + } + + + /** + * A user-friendly sub-title for this activity + */ + public Activity withSubtitle(Optional subtitle) { + Utils.checkNotNull(subtitle, "subtitle"); + this.subtitle = subtitle; + return this; + } + + /** + * A user-friendly title for this activity + */ + public Activity withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * A user-friendly title for this activity + */ + public Activity withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of activity + */ + public Activity withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of activity + */ + public Activity withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The user this activity belongs to + */ + public Activity withUserID(long userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = Optional.ofNullable(userID); + return this; + } + + + /** + * The user this activity belongs to + */ + public Activity withUserID(Optional userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = userID; + return this; + } + + /** + * The ID of the activity + */ + public Activity withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + /** + * The ID of the activity + */ + public Activity withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; return this; } @@ -252,93 +381,77 @@ public class Activity { } Activity other = (Activity) o; return - Utils.enhancedDeepEquals(this.uuid, other.uuid) && - Utils.enhancedDeepEquals(this.type, other.type) && Utils.enhancedDeepEquals(this.cancellable, other.cancellable) && - Utils.enhancedDeepEquals(this.userID, other.userID) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.subtitle, other.subtitle) && + Utils.enhancedDeepEquals(this.context, other.context) && Utils.enhancedDeepEquals(this.progress, other.progress) && - Utils.enhancedDeepEquals(this.context, other.context); + Utils.enhancedDeepEquals(this.response, other.response) && + Utils.enhancedDeepEquals(this.subtitle, other.subtitle) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.userID, other.userID) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); } @Override public int hashCode() { return Utils.enhancedHash( - uuid, type, cancellable, - userID, title, subtitle, - progress, context); + cancellable, context, progress, + response, subtitle, title, + type, userID, uuid); } @Override public String toString() { return Utils.toString(Activity.class, - "uuid", uuid, - "type", type, "cancellable", cancellable, - "userID", userID, - "title", title, - "subtitle", subtitle, + "context", context, "progress", progress, - "context", context); + "response", response, + "subtitle", subtitle, + "title", title, + "type", type, + "userID", userID, + "uuid", uuid); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional uuid = Optional.empty(); - - private Optional type = Optional.empty(); - private Optional cancellable = Optional.empty(); - private Optional userID = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional subtitle = Optional.empty(); + private Optional> context = Optional.empty(); private Optional progress = Optional.empty(); - private Optional context = Optional.empty(); + private Optional> response = Optional.empty(); + + private Optional subtitle = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional userID = Optional.empty(); + + private Optional uuid = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder uuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = Optional.ofNullable(uuid); - return this; - } - - public Builder uuid(Optional uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - 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; - } - - + /** + * Indicates whether this activity can be cancelled + */ public Builder cancellable(boolean cancellable) { Utils.checkNotNull(cancellable, "cancellable"); this.cancellable = Optional.ofNullable(cancellable); return this; } + /** + * Indicates whether this activity can be cancelled + */ public Builder cancellable(Optional cancellable) { Utils.checkNotNull(cancellable, "cancellable"); this.cancellable = cancellable; @@ -346,51 +459,37 @@ public class Activity { } - public Builder userID(double userID) { - Utils.checkNotNull(userID, "userID"); - this.userID = Optional.ofNullable(userID); + /** + * An object with additional values + */ + public Builder context(Map context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); return this; } - public Builder userID(Optional userID) { - Utils.checkNotNull(userID, "userID"); - this.userID = userID; - 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 subtitle(String subtitle) { - Utils.checkNotNull(subtitle, "subtitle"); - this.subtitle = Optional.ofNullable(subtitle); - return this; - } - - public Builder subtitle(Optional subtitle) { - Utils.checkNotNull(subtitle, "subtitle"); - this.subtitle = subtitle; + /** + * An object with additional values + */ + public Builder context(Optional> context) { + Utils.checkNotNull(context, "context"); + this.context = context; return this; } + /** + * A progress percentage. A value of -1 means the progress is indeterminate + */ public Builder progress(double progress) { Utils.checkNotNull(progress, "progress"); this.progress = Optional.ofNullable(progress); return this; } + /** + * A progress percentage. A value of -1 means the progress is indeterminate + */ public Builder progress(Optional progress) { Utils.checkNotNull(progress, "progress"); this.progress = progress; @@ -398,24 +497,125 @@ public class Activity { } - public Builder context(Context context) { - Utils.checkNotNull(context, "context"); - this.context = Optional.ofNullable(context); + /** + * An object with the response to the async opperation + */ + public Builder response(Map response) { + Utils.checkNotNull(response, "response"); + this.response = Optional.ofNullable(response); return this; } - public Builder context(Optional context) { - Utils.checkNotNull(context, "context"); - this.context = context; + /** + * An object with the response to the async opperation + */ + public Builder response(Optional> response) { + Utils.checkNotNull(response, "response"); + this.response = response; + return this; + } + + + /** + * A user-friendly sub-title for this activity + */ + public Builder subtitle(String subtitle) { + Utils.checkNotNull(subtitle, "subtitle"); + this.subtitle = Optional.ofNullable(subtitle); + return this; + } + + /** + * A user-friendly sub-title for this activity + */ + public Builder subtitle(Optional subtitle) { + Utils.checkNotNull(subtitle, "subtitle"); + this.subtitle = subtitle; + return this; + } + + + /** + * A user-friendly title for this activity + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * A user-friendly title for this activity + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The type of activity + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of activity + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The user this activity belongs to + */ + public Builder userID(long userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = Optional.ofNullable(userID); + return this; + } + + /** + * The user this activity belongs to + */ + public Builder userID(Optional userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = userID; + return this; + } + + + /** + * The ID of the activity + */ + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + /** + * The ID of the activity + */ + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; return this; } public Activity build() { return new Activity( - uuid, type, cancellable, - userID, title, subtitle, - progress, context); + cancellable, context, progress, + response, subtitle, title, + type, userID, uuid); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsRequest.java new file mode 100644 index 00000000..dc8f4590 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class AddCollectionItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The collection id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=collectionId") + private long collectionId; + + /** + * The URI describing the items to add to this collection + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") + private String uri; + + @JsonCreator + public AddCollectionItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long collectionId, + String uri) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(collectionId, "collectionId"); + Utils.checkNotNull(uri, "uri"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.collectionId = collectionId; + this.uri = uri; + } + + public AddCollectionItemsRequest( + long collectionId, + String uri) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), collectionId, + uri); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The collection id + */ + @JsonIgnore + public long collectionId() { + return collectionId; + } + + /** + * The URI describing the items to add to this collection + */ + @JsonIgnore + public String uri() { + return uri; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddCollectionItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddCollectionItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddCollectionItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddCollectionItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddCollectionItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddCollectionItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddCollectionItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddCollectionItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddCollectionItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddCollectionItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddCollectionItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddCollectionItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddCollectionItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddCollectionItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddCollectionItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddCollectionItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddCollectionItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddCollectionItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddCollectionItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddCollectionItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddCollectionItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddCollectionItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The collection id + */ + public AddCollectionItemsRequest withCollectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + /** + * The URI describing the items to add to this collection + */ + public AddCollectionItemsRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddCollectionItemsRequest other = (AddCollectionItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.collectionId, other.collectionId) && + Utils.enhancedDeepEquals(this.uri, other.uri); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, collectionId, + uri); + } + + @Override + public String toString() { + return Utils.toString(AddCollectionItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "collectionId", collectionId, + "uri", uri); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long collectionId; + + private String uri; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The collection id + */ + public Builder collectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + + /** + * The URI describing the items to add to this collection + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + public AddCollectionItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddCollectionItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, collectionId, + uri); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsRequestBuilder.java new file mode 100644 index 00000000..fba5d196 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddCollectionItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddCollectionItemsRequestBuilder { + + private AddCollectionItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddCollectionItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddCollectionItemsRequestBuilder request(AddCollectionItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddCollectionItemsResponse call() throws Exception { + + RequestOperation operation + = new AddCollectionItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsResponse.java new file mode 100644 index 00000000..0631217e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddCollectionItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class AddCollectionItemsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public AddCollectionItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public AddCollectionItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddCollectionItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddCollectionItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddCollectionItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddCollectionItemsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public AddCollectionItemsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddCollectionItemsResponse other = (AddCollectionItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(AddCollectionItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public AddCollectionItemsResponse build() { + + return new AddCollectionItemsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceRequest.java new file mode 100644 index 00000000..66ce351e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceRequest.java @@ -0,0 +1,797 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class AddDeviceRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The URI of the device. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") + private Optional uri; + + @JsonCreator + public AddDeviceRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional uri) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(uri, "uri"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.uri = uri; + } + + public AddDeviceRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The URI of the device. + */ + @JsonIgnore + public Optional uri() { + return uri; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddDeviceRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddDeviceRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddDeviceRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddDeviceRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddDeviceRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddDeviceRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddDeviceRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddDeviceRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddDeviceRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddDeviceRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddDeviceRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddDeviceRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddDeviceRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddDeviceRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddDeviceRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddDeviceRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddDeviceRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddDeviceRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddDeviceRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddDeviceRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddDeviceRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddDeviceRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The URI of the device. + */ + public AddDeviceRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + /** + * The URI of the device. + */ + public AddDeviceRequest withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDeviceRequest other = (AddDeviceRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.uri, other.uri); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, uri); + } + + @Override + public String toString() { + return Utils.toString(AddDeviceRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "uri", uri); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional uri = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The URI of the device. + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + /** + * The URI of the device. + */ + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + public AddDeviceRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddDeviceRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, uri); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceRequestBuilder.java new file mode 100644 index 00000000..7b0171a1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddDevice; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddDeviceRequestBuilder { + + private AddDeviceRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddDeviceRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddDeviceRequestBuilder request(AddDeviceRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddDeviceResponse call() throws Exception { + + RequestOperation operation + = new AddDevice.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceResponse.java new file mode 100644 index 00000000..748ec373 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +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.Optional; + + +public class AddDeviceResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + @JsonCreator + public AddDeviceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + } + + public AddDeviceResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddDeviceResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddDeviceResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddDeviceResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddDeviceResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public AddDeviceResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDeviceResponse other = (AddDeviceResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + @Override + public String toString() { + return Utils.toString(AddDeviceResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public AddDeviceResponse build() { + + return new AddDeviceResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRDVR.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRDVR.java new file mode 100644 index 00000000..587f2c3a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRDVR.java @@ -0,0 +1,290 @@ +/* + * 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.models.shared.Device; +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.Optional; + + +public class AddDeviceToDVRDVR { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineup") + private Optional lineup; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public AddDeviceToDVRDVR( + @JsonProperty("Device") Optional> device, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("lineup") Optional lineup, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(lineup, "lineup"); + Utils.checkNotNull(uuid, "uuid"); + this.device = device; + this.key = key; + this.language = language; + this.lineup = lineup; + this.uuid = uuid; + } + + public AddDeviceToDVRDVR() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> device() { + return (Optional>) device; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional lineup() { + return lineup; + } + + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public AddDeviceToDVRDVR withDevice(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public AddDeviceToDVRDVR withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public AddDeviceToDVRDVR withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public AddDeviceToDVRDVR withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public AddDeviceToDVRDVR withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public AddDeviceToDVRDVR withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public AddDeviceToDVRDVR withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + public AddDeviceToDVRDVR withLineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public AddDeviceToDVRDVR withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + public AddDeviceToDVRDVR withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDeviceToDVRDVR other = (AddDeviceToDVRDVR) o; + return + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.lineup, other.lineup) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + device, key, language, + lineup, uuid); + } + + @Override + public String toString() { + return Utils.toString(AddDeviceToDVRDVR.class, + "device", device, + "key", key, + "language", language, + "lineup", lineup, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> device = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional lineup = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder device(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + 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 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 lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + public Builder lineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public AddDeviceToDVRDVR build() { + + return new AddDeviceToDVRDVR( + device, key, language, + lineup, uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRDVRsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRDVRsMediaContainer.java new file mode 100644 index 00000000..d22d28a5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRDVRsMediaContainer.java @@ -0,0 +1,344 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * AddDeviceToDVRDVRsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class AddDeviceToDVRDVRsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public AddDeviceToDVRDVRsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(status, "status"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.status = status; + } + + public AddDeviceToDVRDVRsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + public AddDeviceToDVRDVRsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public AddDeviceToDVRDVRsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public AddDeviceToDVRDVRsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public AddDeviceToDVRDVRsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public AddDeviceToDVRDVRsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public AddDeviceToDVRDVRsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public AddDeviceToDVRDVRsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public AddDeviceToDVRDVRsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public AddDeviceToDVRDVRsMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public AddDeviceToDVRDVRsMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDeviceToDVRDVRsMediaContainer other = (AddDeviceToDVRDVRsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, status); + } + + @Override + public String toString() { + return Utils.toString(AddDeviceToDVRDVRsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public AddDeviceToDVRDVRsMediaContainer build() { + + return new AddDeviceToDVRDVRsMediaContainer( + identifier, offset, size, + totalSize, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRMediaContainer.java new file mode 100644 index 00000000..fda7ad8f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRMediaContainer.java @@ -0,0 +1,158 @@ +/* + * 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.Optional; + + +public class AddDeviceToDVRMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DVR") + private Optional> dvr; + + @JsonCreator + public AddDeviceToDVRMediaContainer( + @JsonProperty("MediaContainer") Optional mediaContainer, + @JsonProperty("DVR") Optional> dvr) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + Utils.checkNotNull(dvr, "dvr"); + this.mediaContainer = mediaContainer; + this.dvr = dvr; + } + + public AddDeviceToDVRMediaContainer() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> dvr() { + return (Optional>) dvr; + } + + public static Builder builder() { + return new Builder(); + } + + + public AddDeviceToDVRMediaContainer withMediaContainer(AddDeviceToDVRDVRsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public AddDeviceToDVRMediaContainer withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public AddDeviceToDVRMediaContainer withDvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + + public AddDeviceToDVRMediaContainer withDvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDeviceToDVRMediaContainer other = (AddDeviceToDVRMediaContainer) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer) && + Utils.enhancedDeepEquals(this.dvr, other.dvr); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer, dvr); + } + + @Override + public String toString() { + return Utils.toString(AddDeviceToDVRMediaContainer.class, + "mediaContainer", mediaContainer, + "dvr", dvr); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Optional> dvr = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(AddDeviceToDVRDVRsMediaContainer 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 Builder dvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + public Builder dvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + public AddDeviceToDVRMediaContainer build() { + + return new AddDeviceToDVRMediaContainer( + mediaContainer, dvr); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRRequest.java new file mode 100644 index 00000000..5e604d69 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class AddDeviceToDVRRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the DVR. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dvrId") + private long dvrId; + + /** + * The ID of the device to add. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + @JsonCreator + public AddDeviceToDVRRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long dvrId, + long deviceId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(dvrId, "dvrId"); + Utils.checkNotNull(deviceId, "deviceId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.dvrId = dvrId; + this.deviceId = deviceId; + } + + public AddDeviceToDVRRequest( + long dvrId, + long deviceId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), dvrId, + deviceId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the DVR. + */ + @JsonIgnore + public long dvrId() { + return dvrId; + } + + /** + * The ID of the device to add. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddDeviceToDVRRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddDeviceToDVRRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddDeviceToDVRRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddDeviceToDVRRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddDeviceToDVRRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddDeviceToDVRRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddDeviceToDVRRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddDeviceToDVRRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddDeviceToDVRRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddDeviceToDVRRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddDeviceToDVRRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddDeviceToDVRRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddDeviceToDVRRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddDeviceToDVRRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddDeviceToDVRRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddDeviceToDVRRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddDeviceToDVRRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddDeviceToDVRRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddDeviceToDVRRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddDeviceToDVRRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddDeviceToDVRRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddDeviceToDVRRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the DVR. + */ + public AddDeviceToDVRRequest withDvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + /** + * The ID of the device to add. + */ + public AddDeviceToDVRRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDeviceToDVRRequest other = (AddDeviceToDVRRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.dvrId, other.dvrId) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + deviceId); + } + + @Override + public String toString() { + return Utils.toString(AddDeviceToDVRRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "dvrId", dvrId, + "deviceId", deviceId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long dvrId; + + private Long deviceId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the DVR. + */ + public Builder dvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + + /** + * The ID of the device to add. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + public AddDeviceToDVRRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddDeviceToDVRRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + deviceId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRRequestBuilder.java new file mode 100644 index 00000000..7c5f27f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddDeviceToDVR; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddDeviceToDVRRequestBuilder { + + private AddDeviceToDVRRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddDeviceToDVRRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddDeviceToDVRRequestBuilder request(AddDeviceToDVRRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddDeviceToDVRResponse call() throws Exception { + + RequestOperation operation + = new AddDeviceToDVR.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRResponse.java new file mode 100644 index 00000000..083dd38a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class AddDeviceToDVRResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public AddDeviceToDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public AddDeviceToDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddDeviceToDVRResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddDeviceToDVRResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddDeviceToDVRResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddDeviceToDVRResponse withObject(AddDeviceToDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public AddDeviceToDVRResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public AddDeviceToDVRResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDeviceToDVRResponse other = (AddDeviceToDVRResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(AddDeviceToDVRResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(AddDeviceToDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public AddDeviceToDVRResponse build() { + + return new AddDeviceToDVRResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRResponseBody.java new file mode 100644 index 00000000..7246725b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDeviceToDVRResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * AddDeviceToDVRResponseBody + * + *

OK + */ +public class AddDeviceToDVRResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public AddDeviceToDVRResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public AddDeviceToDVRResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public AddDeviceToDVRResponseBody withMediaContainer(AddDeviceToDVRMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public AddDeviceToDVRResponseBody 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; + } + AddDeviceToDVRResponseBody other = (AddDeviceToDVRResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(AddDeviceToDVRResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(AddDeviceToDVRMediaContainer 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 AddDeviceToDVRResponseBody build() { + + return new AddDeviceToDVRResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsMediaContainer.java new file mode 100644 index 00000000..fdfdfe2c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * AddDownloadQueueItemsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class AddDownloadQueueItemsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("AddedQueueItems") + private Optional> addedQueueItems; + + @JsonCreator + public AddDownloadQueueItemsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("AddedQueueItems") Optional> addedQueueItems) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(addedQueueItems, "addedQueueItems"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.addedQueueItems = addedQueueItems; + } + + public AddDownloadQueueItemsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> addedQueueItems() { + return (Optional>) addedQueueItems; + } + + public static Builder builder() { + return new Builder(); + } + + + public AddDownloadQueueItemsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public AddDownloadQueueItemsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public AddDownloadQueueItemsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public AddDownloadQueueItemsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public AddDownloadQueueItemsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public AddDownloadQueueItemsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public AddDownloadQueueItemsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public AddDownloadQueueItemsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public AddDownloadQueueItemsMediaContainer withAddedQueueItems(List addedQueueItems) { + Utils.checkNotNull(addedQueueItems, "addedQueueItems"); + this.addedQueueItems = Optional.ofNullable(addedQueueItems); + return this; + } + + + public AddDownloadQueueItemsMediaContainer withAddedQueueItems(Optional> addedQueueItems) { + Utils.checkNotNull(addedQueueItems, "addedQueueItems"); + this.addedQueueItems = addedQueueItems; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDownloadQueueItemsMediaContainer other = (AddDownloadQueueItemsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.addedQueueItems, other.addedQueueItems); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, addedQueueItems); + } + + @Override + public String toString() { + return Utils.toString(AddDownloadQueueItemsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "addedQueueItems", addedQueueItems); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> addedQueueItems = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder addedQueueItems(List addedQueueItems) { + Utils.checkNotNull(addedQueueItems, "addedQueueItems"); + this.addedQueueItems = Optional.ofNullable(addedQueueItems); + return this; + } + + public Builder addedQueueItems(Optional> addedQueueItems) { + Utils.checkNotNull(addedQueueItems, "addedQueueItems"); + this.addedQueueItems = addedQueueItems; + return this; + } + + public AddDownloadQueueItemsMediaContainer build() { + + return new AddDownloadQueueItemsMediaContainer( + identifier, offset, size, + totalSize, addedQueueItems); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsRequest.java new file mode 100644 index 00000000..82847419 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsRequest.java @@ -0,0 +1,2400 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.AdvancedSubtitles; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.models.shared.Location; +import dev.plexapi.sdk.models.shared.Protocol; +import dev.plexapi.sdk.models.shared.Subtitles; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class AddDownloadQueueItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The queue id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=queueId") + private long queueId; + + /** + * Keys to add + */ + @SpeakeasyMetadata("queryParam:style=form,explode=false,name=keys") + private List keys; + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=advancedSubtitles") + private Optional advancedSubtitles; + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioBoost") + private Optional audioBoost; + + /** + * Target video number of audio channels. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioChannelCount") + private Optional audioChannelCount; + + /** + * Indicates the client supports ABR. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustQuality") + private Optional autoAdjustQuality; + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustSubtitle") + private Optional autoAdjustSubtitle; + + /** + * Indicates the client supports direct playing the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directPlay") + private Optional directPlay; + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directStream") + private Optional directStream; + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directStreamAudio") + private Optional directStreamAudio; + + /** + * Indicates if resolution should be adjusted for orientation. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=disableResolutionRotation") + private Optional disableResolutionRotation; + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=hasMDE") + private Optional hasMDE; + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=location") + private Optional location; + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaBufferSize") + private Optional mediaBufferSize; + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaIndex") + private Optional mediaIndex; + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=musicBitrate") + private Optional musicBitrate; + + /** + * Offset from the start of the media (in seconds). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset") + private Optional offset; + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=partIndex") + private Optional partIndex; + + /** + * Internal PMS path of the media to transcode. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=path") + private Optional path; + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=peakBitrate") + private Optional peakBitrate; + + /** + * Target photo resolution. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=photoResolution") + private Optional photoResolution; + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=protocol") + private Optional protocol; + + /** + * Number of seconds to include in each transcoded segment + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=secondsPerSegment") + private Optional secondsPerSegment; + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitleSize") + private Optional subtitleSize; + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitles") + private Optional subtitles; + + /** + * Target video bitrate (in kbps). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoBitrate") + private Optional videoBitrate; + + /** + * Target photo quality. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoQuality") + private Optional videoQuality; + + /** + * Target maximum video resolution. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoResolution") + private Optional videoResolution; + + @JsonCreator + public AddDownloadQueueItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long queueId, + List keys, + Optional advancedSubtitles, + Optional audioBoost, + Optional audioChannelCount, + Optional autoAdjustQuality, + Optional autoAdjustSubtitle, + Optional directPlay, + Optional directStream, + Optional directStreamAudio, + Optional disableResolutionRotation, + Optional hasMDE, + Optional location, + Optional mediaBufferSize, + Optional mediaIndex, + Optional musicBitrate, + Optional offset, + Optional partIndex, + Optional path, + Optional peakBitrate, + Optional photoResolution, + Optional protocol, + Optional secondsPerSegment, + Optional subtitleSize, + Optional subtitles, + Optional videoBitrate, + Optional videoQuality, + Optional videoResolution) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(queueId, "queueId"); + Utils.checkNotNull(keys, "keys"); + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + Utils.checkNotNull(audioBoost, "audioBoost"); + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + Utils.checkNotNull(directPlay, "directPlay"); + Utils.checkNotNull(directStream, "directStream"); + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + Utils.checkNotNull(hasMDE, "hasMDE"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + Utils.checkNotNull(mediaIndex, "mediaIndex"); + Utils.checkNotNull(musicBitrate, "musicBitrate"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(partIndex, "partIndex"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(peakBitrate, "peakBitrate"); + Utils.checkNotNull(photoResolution, "photoResolution"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + Utils.checkNotNull(subtitleSize, "subtitleSize"); + Utils.checkNotNull(subtitles, "subtitles"); + Utils.checkNotNull(videoBitrate, "videoBitrate"); + Utils.checkNotNull(videoQuality, "videoQuality"); + Utils.checkNotNull(videoResolution, "videoResolution"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.queueId = queueId; + this.keys = keys; + this.advancedSubtitles = advancedSubtitles; + this.audioBoost = audioBoost; + this.audioChannelCount = audioChannelCount; + this.autoAdjustQuality = autoAdjustQuality; + this.autoAdjustSubtitle = autoAdjustSubtitle; + this.directPlay = directPlay; + this.directStream = directStream; + this.directStreamAudio = directStreamAudio; + this.disableResolutionRotation = disableResolutionRotation; + this.hasMDE = hasMDE; + this.location = location; + this.mediaBufferSize = mediaBufferSize; + this.mediaIndex = mediaIndex; + this.musicBitrate = musicBitrate; + this.offset = offset; + this.partIndex = partIndex; + this.path = path; + this.peakBitrate = peakBitrate; + this.photoResolution = photoResolution; + this.protocol = protocol; + this.secondsPerSegment = secondsPerSegment; + this.subtitleSize = subtitleSize; + this.subtitles = subtitles; + this.videoBitrate = videoBitrate; + this.videoQuality = videoQuality; + this.videoResolution = videoResolution; + } + + public AddDownloadQueueItemsRequest( + long queueId, + List keys) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), queueId, + keys, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The queue id + */ + @JsonIgnore + public long queueId() { + return queueId; + } + + /** + * Keys to add + */ + @JsonIgnore + public List keys() { + return keys; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional advancedSubtitles() { + return (Optional) advancedSubtitles; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + @JsonIgnore + public Optional audioBoost() { + return audioBoost; + } + + /** + * Target video number of audio channels. + */ + @JsonIgnore + public Optional audioChannelCount() { + return audioChannelCount; + } + + /** + * Indicates the client supports ABR. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional autoAdjustQuality() { + return (Optional) autoAdjustQuality; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional autoAdjustSubtitle() { + return (Optional) autoAdjustSubtitle; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directPlay() { + return (Optional) directPlay; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directStream() { + return (Optional) directStream; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directStreamAudio() { + return (Optional) directStreamAudio; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional disableResolutionRotation() { + return (Optional) disableResolutionRotation; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hasMDE() { + return (Optional) hasMDE; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional location() { + return (Optional) location; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + @JsonIgnore + public Optional mediaBufferSize() { + return mediaBufferSize; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + @JsonIgnore + public Optional mediaIndex() { + return mediaIndex; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + @JsonIgnore + public Optional musicBitrate() { + return musicBitrate; + } + + /** + * Offset from the start of the media (in seconds). + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + @JsonIgnore + public Optional partIndex() { + return partIndex; + } + + /** + * Internal PMS path of the media to transcode. + */ + @JsonIgnore + public Optional path() { + return path; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + @JsonIgnore + public Optional peakBitrate() { + return peakBitrate; + } + + /** + * Target photo resolution. + */ + @JsonIgnore + public Optional photoResolution() { + return photoResolution; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional protocol() { + return (Optional) protocol; + } + + /** + * Number of seconds to include in each transcoded segment + */ + @JsonIgnore + public Optional secondsPerSegment() { + return secondsPerSegment; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + @JsonIgnore + public Optional subtitleSize() { + return subtitleSize; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtitles() { + return (Optional) subtitles; + } + + /** + * Target video bitrate (in kbps). + */ + @JsonIgnore + public Optional videoBitrate() { + return videoBitrate; + } + + /** + * Target photo quality. + */ + @JsonIgnore + public Optional videoQuality() { + return videoQuality; + } + + /** + * Target maximum video resolution. + */ + @JsonIgnore + public Optional videoResolution() { + return videoResolution; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddDownloadQueueItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddDownloadQueueItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddDownloadQueueItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddDownloadQueueItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddDownloadQueueItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddDownloadQueueItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddDownloadQueueItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddDownloadQueueItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddDownloadQueueItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddDownloadQueueItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddDownloadQueueItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddDownloadQueueItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddDownloadQueueItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddDownloadQueueItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddDownloadQueueItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddDownloadQueueItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddDownloadQueueItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddDownloadQueueItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddDownloadQueueItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddDownloadQueueItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddDownloadQueueItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddDownloadQueueItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The queue id + */ + public AddDownloadQueueItemsRequest withQueueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + /** + * Keys to add + */ + public AddDownloadQueueItemsRequest withKeys(List keys) { + Utils.checkNotNull(keys, "keys"); + this.keys = keys; + return this; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public AddDownloadQueueItemsRequest withAdvancedSubtitles(AdvancedSubtitles advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = Optional.ofNullable(advancedSubtitles); + return this; + } + + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public AddDownloadQueueItemsRequest withAdvancedSubtitles(Optional advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = advancedSubtitles; + return this; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public AddDownloadQueueItemsRequest withAudioBoost(long audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public AddDownloadQueueItemsRequest withAudioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + /** + * Target video number of audio channels. + */ + public AddDownloadQueueItemsRequest withAudioChannelCount(long audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = Optional.ofNullable(audioChannelCount); + return this; + } + + + /** + * Target video number of audio channels. + */ + public AddDownloadQueueItemsRequest withAudioChannelCount(Optional audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = audioChannelCount; + return this; + } + + /** + * Indicates the client supports ABR. + */ + public AddDownloadQueueItemsRequest withAutoAdjustQuality(BoolInt autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + + /** + * Indicates the client supports ABR. + */ + public AddDownloadQueueItemsRequest withAutoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public AddDownloadQueueItemsRequest withAutoAdjustSubtitle(BoolInt autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public AddDownloadQueueItemsRequest withAutoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + public AddDownloadQueueItemsRequest withDirectPlay(BoolInt directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + + /** + * Indicates the client supports direct playing the indicated content. + */ + public AddDownloadQueueItemsRequest withDirectPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public AddDownloadQueueItemsRequest withDirectStream(BoolInt directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public AddDownloadQueueItemsRequest withDirectStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public AddDownloadQueueItemsRequest withDirectStreamAudio(BoolInt directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = Optional.ofNullable(directStreamAudio); + return this; + } + + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public AddDownloadQueueItemsRequest withDirectStreamAudio(Optional directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = directStreamAudio; + return this; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public AddDownloadQueueItemsRequest withDisableResolutionRotation(BoolInt disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = Optional.ofNullable(disableResolutionRotation); + return this; + } + + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public AddDownloadQueueItemsRequest withDisableResolutionRotation(Optional disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = disableResolutionRotation; + return this; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public AddDownloadQueueItemsRequest withHasMDE(BoolInt hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = Optional.ofNullable(hasMDE); + return this; + } + + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public AddDownloadQueueItemsRequest withHasMDE(Optional hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public AddDownloadQueueItemsRequest withLocation(Location location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public AddDownloadQueueItemsRequest withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public AddDownloadQueueItemsRequest withMediaBufferSize(long mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); + return this; + } + + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public AddDownloadQueueItemsRequest withMediaBufferSize(Optional mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = mediaBufferSize; + return this; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public AddDownloadQueueItemsRequest withMediaIndex(long mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = Optional.ofNullable(mediaIndex); + return this; + } + + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public AddDownloadQueueItemsRequest withMediaIndex(Optional mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public AddDownloadQueueItemsRequest withMusicBitrate(long musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = Optional.ofNullable(musicBitrate); + return this; + } + + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public AddDownloadQueueItemsRequest withMusicBitrate(Optional musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = musicBitrate; + return this; + } + + /** + * Offset from the start of the media (in seconds). + */ + public AddDownloadQueueItemsRequest withOffset(double offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * Offset from the start of the media (in seconds). + */ + public AddDownloadQueueItemsRequest withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public AddDownloadQueueItemsRequest withPartIndex(long partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = Optional.ofNullable(partIndex); + return this; + } + + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public AddDownloadQueueItemsRequest withPartIndex(Optional partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = partIndex; + return this; + } + + /** + * Internal PMS path of the media to transcode. + */ + public AddDownloadQueueItemsRequest withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + + /** + * Internal PMS path of the media to transcode. + */ + public AddDownloadQueueItemsRequest withPath(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public AddDownloadQueueItemsRequest withPeakBitrate(long peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = Optional.ofNullable(peakBitrate); + return this; + } + + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public AddDownloadQueueItemsRequest withPeakBitrate(Optional peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = peakBitrate; + return this; + } + + /** + * Target photo resolution. + */ + public AddDownloadQueueItemsRequest withPhotoResolution(String photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = Optional.ofNullable(photoResolution); + return this; + } + + + /** + * Target photo resolution. + */ + public AddDownloadQueueItemsRequest withPhotoResolution(Optional photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = photoResolution; + return this; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public AddDownloadQueueItemsRequest withProtocol(Protocol protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public AddDownloadQueueItemsRequest withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + /** + * Number of seconds to include in each transcoded segment + */ + public AddDownloadQueueItemsRequest withSecondsPerSegment(long secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = Optional.ofNullable(secondsPerSegment); + return this; + } + + + /** + * Number of seconds to include in each transcoded segment + */ + public AddDownloadQueueItemsRequest withSecondsPerSegment(Optional secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = secondsPerSegment; + return this; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public AddDownloadQueueItemsRequest withSubtitleSize(long subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public AddDownloadQueueItemsRequest withSubtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public AddDownloadQueueItemsRequest withSubtitles(Subtitles subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = Optional.ofNullable(subtitles); + return this; + } + + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public AddDownloadQueueItemsRequest withSubtitles(Optional subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = subtitles; + return this; + } + + /** + * Target video bitrate (in kbps). + */ + public AddDownloadQueueItemsRequest withVideoBitrate(long videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = Optional.ofNullable(videoBitrate); + return this; + } + + + /** + * Target video bitrate (in kbps). + */ + public AddDownloadQueueItemsRequest withVideoBitrate(Optional videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = videoBitrate; + return this; + } + + /** + * Target photo quality. + */ + public AddDownloadQueueItemsRequest withVideoQuality(long videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = Optional.ofNullable(videoQuality); + return this; + } + + + /** + * Target photo quality. + */ + public AddDownloadQueueItemsRequest withVideoQuality(Optional videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = videoQuality; + return this; + } + + /** + * Target maximum video resolution. + */ + public AddDownloadQueueItemsRequest withVideoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + + /** + * Target maximum video resolution. + */ + public AddDownloadQueueItemsRequest withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDownloadQueueItemsRequest other = (AddDownloadQueueItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.queueId, other.queueId) && + Utils.enhancedDeepEquals(this.keys, other.keys) && + Utils.enhancedDeepEquals(this.advancedSubtitles, other.advancedSubtitles) && + Utils.enhancedDeepEquals(this.audioBoost, other.audioBoost) && + Utils.enhancedDeepEquals(this.audioChannelCount, other.audioChannelCount) && + Utils.enhancedDeepEquals(this.autoAdjustQuality, other.autoAdjustQuality) && + Utils.enhancedDeepEquals(this.autoAdjustSubtitle, other.autoAdjustSubtitle) && + Utils.enhancedDeepEquals(this.directPlay, other.directPlay) && + Utils.enhancedDeepEquals(this.directStream, other.directStream) && + Utils.enhancedDeepEquals(this.directStreamAudio, other.directStreamAudio) && + Utils.enhancedDeepEquals(this.disableResolutionRotation, other.disableResolutionRotation) && + Utils.enhancedDeepEquals(this.hasMDE, other.hasMDE) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.mediaBufferSize, other.mediaBufferSize) && + Utils.enhancedDeepEquals(this.mediaIndex, other.mediaIndex) && + Utils.enhancedDeepEquals(this.musicBitrate, other.musicBitrate) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.partIndex, other.partIndex) && + Utils.enhancedDeepEquals(this.path, other.path) && + Utils.enhancedDeepEquals(this.peakBitrate, other.peakBitrate) && + Utils.enhancedDeepEquals(this.photoResolution, other.photoResolution) && + Utils.enhancedDeepEquals(this.protocol, other.protocol) && + Utils.enhancedDeepEquals(this.secondsPerSegment, other.secondsPerSegment) && + Utils.enhancedDeepEquals(this.subtitleSize, other.subtitleSize) && + Utils.enhancedDeepEquals(this.subtitles, other.subtitles) && + Utils.enhancedDeepEquals(this.videoBitrate, other.videoBitrate) && + Utils.enhancedDeepEquals(this.videoQuality, other.videoQuality) && + Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + keys, advancedSubtitles, audioBoost, + audioChannelCount, autoAdjustQuality, autoAdjustSubtitle, + directPlay, directStream, directStreamAudio, + disableResolutionRotation, hasMDE, location, + mediaBufferSize, mediaIndex, musicBitrate, + offset, partIndex, path, + peakBitrate, photoResolution, protocol, + secondsPerSegment, subtitleSize, subtitles, + videoBitrate, videoQuality, videoResolution); + } + + @Override + public String toString() { + return Utils.toString(AddDownloadQueueItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "queueId", queueId, + "keys", keys, + "advancedSubtitles", advancedSubtitles, + "audioBoost", audioBoost, + "audioChannelCount", audioChannelCount, + "autoAdjustQuality", autoAdjustQuality, + "autoAdjustSubtitle", autoAdjustSubtitle, + "directPlay", directPlay, + "directStream", directStream, + "directStreamAudio", directStreamAudio, + "disableResolutionRotation", disableResolutionRotation, + "hasMDE", hasMDE, + "location", location, + "mediaBufferSize", mediaBufferSize, + "mediaIndex", mediaIndex, + "musicBitrate", musicBitrate, + "offset", offset, + "partIndex", partIndex, + "path", path, + "peakBitrate", peakBitrate, + "photoResolution", photoResolution, + "protocol", protocol, + "secondsPerSegment", secondsPerSegment, + "subtitleSize", subtitleSize, + "subtitles", subtitles, + "videoBitrate", videoBitrate, + "videoQuality", videoQuality, + "videoResolution", videoResolution); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long queueId; + + private List keys; + + private Optional advancedSubtitles = Optional.empty(); + + private Optional audioBoost = Optional.empty(); + + private Optional audioChannelCount = Optional.empty(); + + private Optional autoAdjustQuality = Optional.empty(); + + private Optional autoAdjustSubtitle = Optional.empty(); + + private Optional directPlay = Optional.empty(); + + private Optional directStream = Optional.empty(); + + private Optional directStreamAudio = Optional.empty(); + + private Optional disableResolutionRotation = Optional.empty(); + + private Optional hasMDE = Optional.empty(); + + private Optional location = Optional.empty(); + + private Optional mediaBufferSize = Optional.empty(); + + private Optional mediaIndex = Optional.empty(); + + private Optional musicBitrate = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional partIndex = Optional.empty(); + + private Optional path = Optional.empty(); + + private Optional peakBitrate = Optional.empty(); + + private Optional photoResolution = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional secondsPerSegment = Optional.empty(); + + private Optional subtitleSize = Optional.empty(); + + private Optional subtitles = Optional.empty(); + + private Optional videoBitrate = Optional.empty(); + + private Optional videoQuality = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The queue id + */ + public Builder queueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + + /** + * Keys to add + */ + public Builder keys(List keys) { + Utils.checkNotNull(keys, "keys"); + this.keys = keys; + return this; + } + + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public Builder advancedSubtitles(AdvancedSubtitles advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = Optional.ofNullable(advancedSubtitles); + return this; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public Builder advancedSubtitles(Optional advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = advancedSubtitles; + return this; + } + + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public Builder audioBoost(long audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public Builder audioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + + /** + * Target video number of audio channels. + */ + public Builder audioChannelCount(long audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = Optional.ofNullable(audioChannelCount); + return this; + } + + /** + * Target video number of audio channels. + */ + public Builder audioChannelCount(Optional audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = audioChannelCount; + return this; + } + + + /** + * Indicates the client supports ABR. + */ + public Builder autoAdjustQuality(BoolInt autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + /** + * Indicates the client supports ABR. + */ + public Builder autoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public Builder autoAdjustSubtitle(BoolInt autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public Builder autoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + + /** + * Indicates the client supports direct playing the indicated content. + */ + public Builder directPlay(BoolInt directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + public Builder directPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public Builder directStream(BoolInt directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public Builder directStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public Builder directStreamAudio(BoolInt directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = Optional.ofNullable(directStreamAudio); + return this; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public Builder directStreamAudio(Optional directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = directStreamAudio; + return this; + } + + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public Builder disableResolutionRotation(BoolInt disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = Optional.ofNullable(disableResolutionRotation); + return this; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public Builder disableResolutionRotation(Optional disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = disableResolutionRotation; + return this; + } + + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public Builder hasMDE(BoolInt hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = Optional.ofNullable(hasMDE); + return this; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public Builder hasMDE(Optional hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public Builder location(Location location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public Builder mediaBufferSize(long mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); + return this; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public Builder mediaBufferSize(Optional mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = mediaBufferSize; + return this; + } + + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public Builder mediaIndex(long mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = Optional.ofNullable(mediaIndex); + return this; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public Builder mediaIndex(Optional mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public Builder musicBitrate(long musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = Optional.ofNullable(musicBitrate); + return this; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public Builder musicBitrate(Optional musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = musicBitrate; + return this; + } + + + /** + * Offset from the start of the media (in seconds). + */ + public Builder offset(double offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * Offset from the start of the media (in seconds). + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public Builder partIndex(long partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = Optional.ofNullable(partIndex); + return this; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public Builder partIndex(Optional partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = partIndex; + return this; + } + + + /** + * Internal PMS path of the media to transcode. + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + /** + * Internal PMS path of the media to transcode. + */ + public Builder path(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public Builder peakBitrate(long peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = Optional.ofNullable(peakBitrate); + return this; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public Builder peakBitrate(Optional peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = peakBitrate; + return this; + } + + + /** + * Target photo resolution. + */ + public Builder photoResolution(String photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = Optional.ofNullable(photoResolution); + return this; + } + + /** + * Target photo resolution. + */ + public Builder photoResolution(Optional photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = photoResolution; + return this; + } + + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public Builder protocol(Protocol protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + + /** + * Number of seconds to include in each transcoded segment + */ + public Builder secondsPerSegment(long secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = Optional.ofNullable(secondsPerSegment); + return this; + } + + /** + * Number of seconds to include in each transcoded segment + */ + public Builder secondsPerSegment(Optional secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = secondsPerSegment; + return this; + } + + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public Builder subtitleSize(long subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public Builder subtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public Builder subtitles(Subtitles subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = Optional.ofNullable(subtitles); + return this; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public Builder subtitles(Optional subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = subtitles; + return this; + } + + + /** + * Target video bitrate (in kbps). + */ + public Builder videoBitrate(long videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = Optional.ofNullable(videoBitrate); + return this; + } + + /** + * Target video bitrate (in kbps). + */ + public Builder videoBitrate(Optional videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = videoBitrate; + return this; + } + + + /** + * Target photo quality. + */ + public Builder videoQuality(long videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = Optional.ofNullable(videoQuality); + return this; + } + + /** + * Target photo quality. + */ + public Builder videoQuality(Optional videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = videoQuality; + return this; + } + + + /** + * Target maximum video resolution. + */ + public Builder videoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + /** + * Target maximum video resolution. + */ + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public AddDownloadQueueItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddDownloadQueueItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + keys, advancedSubtitles, audioBoost, + audioChannelCount, autoAdjustQuality, autoAdjustSubtitle, + directPlay, directStream, directStreamAudio, + disableResolutionRotation, hasMDE, location, + mediaBufferSize, mediaIndex, musicBitrate, + offset, partIndex, path, + peakBitrate, photoResolution, protocol, + secondsPerSegment, subtitleSize, subtitles, + videoBitrate, videoQuality, videoResolution); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsRequestBuilder.java new file mode 100644 index 00000000..61b9d667 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddDownloadQueueItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddDownloadQueueItemsRequestBuilder { + + private AddDownloadQueueItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddDownloadQueueItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddDownloadQueueItemsRequestBuilder request(AddDownloadQueueItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddDownloadQueueItemsResponse call() throws Exception { + + RequestOperation operation + = new AddDownloadQueueItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsResponse.java new file mode 100644 index 00000000..3d3aa615 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class AddDownloadQueueItemsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public AddDownloadQueueItemsResponse( + 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 AddDownloadQueueItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddDownloadQueueItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddDownloadQueueItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddDownloadQueueItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddDownloadQueueItemsResponse withObject(AddDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public AddDownloadQueueItemsResponse 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; + } + AddDownloadQueueItemsResponse other = (AddDownloadQueueItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(AddDownloadQueueItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(AddDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public AddDownloadQueueItemsResponse build() { + + return new AddDownloadQueueItemsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsResponseBody.java new file mode 100644 index 00000000..fd74b65a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddDownloadQueueItemsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * AddDownloadQueueItemsResponseBody + * + *

OK + */ +public class AddDownloadQueueItemsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public AddDownloadQueueItemsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public AddDownloadQueueItemsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public AddDownloadQueueItemsResponseBody withMediaContainer(AddDownloadQueueItemsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public AddDownloadQueueItemsResponseBody 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; + } + AddDownloadQueueItemsResponseBody other = (AddDownloadQueueItemsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(AddDownloadQueueItemsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(AddDownloadQueueItemsMediaContainer 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 AddDownloadQueueItemsResponseBody build() { + + return new AddDownloadQueueItemsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddExtrasRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddExtrasRequest.java new file mode 100644 index 00000000..ec2474ec --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddExtrasRequest.java @@ -0,0 +1,931 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class AddExtrasRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + /** + * The metadata type of the extra + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=extraType") + private Optional extraType; + + /** + * The URL of the extra + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private String url; + + /** + * The title to filter by or assign + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=title") + private Optional title; + + @JsonCreator + public AddExtrasRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional extraType, + String url, + Optional title) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(extraType, "extraType"); + Utils.checkNotNull(url, "url"); + Utils.checkNotNull(title, "title"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.extraType = extraType; + this.url = url; + this.title = title; + } + + public AddExtrasRequest( + String ids, + String url) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), url, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + /** + * The metadata type of the extra + */ + @JsonIgnore + public Optional extraType() { + return extraType; + } + + /** + * The URL of the extra + */ + @JsonIgnore + public String url() { + return url; + } + + /** + * The title to filter by or assign + */ + @JsonIgnore + public Optional title() { + return title; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddExtrasRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddExtrasRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddExtrasRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddExtrasRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddExtrasRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddExtrasRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddExtrasRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddExtrasRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddExtrasRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddExtrasRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddExtrasRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddExtrasRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddExtrasRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddExtrasRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddExtrasRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddExtrasRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddExtrasRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddExtrasRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddExtrasRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddExtrasRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddExtrasRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddExtrasRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public AddExtrasRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * The metadata type of the extra + */ + public AddExtrasRequest withExtraType(long extraType) { + Utils.checkNotNull(extraType, "extraType"); + this.extraType = Optional.ofNullable(extraType); + return this; + } + + + /** + * The metadata type of the extra + */ + public AddExtrasRequest withExtraType(Optional extraType) { + Utils.checkNotNull(extraType, "extraType"); + this.extraType = extraType; + return this; + } + + /** + * The URL of the extra + */ + public AddExtrasRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * The title to filter by or assign + */ + public AddExtrasRequest withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title to filter by or assign + */ + public AddExtrasRequest 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; + } + AddExtrasRequest other = (AddExtrasRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.extraType, other.extraType) && + Utils.enhancedDeepEquals(this.url, other.url) && + Utils.enhancedDeepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + extraType, url, title); + } + + @Override + public String toString() { + return Utils.toString(AddExtrasRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "extraType", extraType, + "url", url, + "title", title); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional extraType = Optional.empty(); + + private String url; + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * The metadata type of the extra + */ + public Builder extraType(long extraType) { + Utils.checkNotNull(extraType, "extraType"); + this.extraType = Optional.ofNullable(extraType); + return this; + } + + /** + * The metadata type of the extra + */ + public Builder extraType(Optional extraType) { + Utils.checkNotNull(extraType, "extraType"); + this.extraType = extraType; + return this; + } + + + /** + * The URL of the extra + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + + /** + * The title to filter by or assign + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title to filter by or assign + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public AddExtrasRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddExtrasRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + extraType, url, title); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddExtrasRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddExtrasRequestBuilder.java new file mode 100644 index 00000000..a16b7c3a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddExtrasRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddExtras; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddExtrasRequestBuilder { + + private AddExtrasRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddExtrasRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddExtrasRequestBuilder request(AddExtrasRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddExtrasResponse call() throws Exception { + + RequestOperation operation + = new AddExtras.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddExtrasResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddExtrasResponse.java new file mode 100644 index 00000000..09b7b96c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddExtrasResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class AddExtrasResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public AddExtrasResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddExtrasResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddExtrasResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddExtrasResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddExtrasResponse other = (AddExtrasResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(AddExtrasResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public AddExtrasResponse build() { + + return new AddExtrasResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddLineupDVR.java b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupDVR.java new file mode 100644 index 00000000..6ec46c11 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupDVR.java @@ -0,0 +1,290 @@ +/* + * 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.models.shared.Device; +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.Optional; + + +public class AddLineupDVR { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineup") + private Optional lineup; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public AddLineupDVR( + @JsonProperty("Device") Optional> device, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("lineup") Optional lineup, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(lineup, "lineup"); + Utils.checkNotNull(uuid, "uuid"); + this.device = device; + this.key = key; + this.language = language; + this.lineup = lineup; + this.uuid = uuid; + } + + public AddLineupDVR() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> device() { + return (Optional>) device; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional lineup() { + return lineup; + } + + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public AddLineupDVR withDevice(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public AddLineupDVR withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public AddLineupDVR withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public AddLineupDVR withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public AddLineupDVR withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public AddLineupDVR withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public AddLineupDVR withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + public AddLineupDVR withLineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public AddLineupDVR withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + public AddLineupDVR withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddLineupDVR other = (AddLineupDVR) o; + return + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.lineup, other.lineup) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + device, key, language, + lineup, uuid); + } + + @Override + public String toString() { + return Utils.toString(AddLineupDVR.class, + "device", device, + "key", key, + "language", language, + "lineup", lineup, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> device = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional lineup = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder device(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + 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 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 lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + public Builder lineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public AddLineupDVR build() { + + return new AddLineupDVR( + device, key, language, + lineup, uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddLineupDVRsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupDVRsMediaContainer.java new file mode 100644 index 00000000..ea07535f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupDVRsMediaContainer.java @@ -0,0 +1,344 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * AddLineupDVRsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class AddLineupDVRsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public AddLineupDVRsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(status, "status"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.status = status; + } + + public AddLineupDVRsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + public AddLineupDVRsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public AddLineupDVRsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public AddLineupDVRsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public AddLineupDVRsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public AddLineupDVRsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public AddLineupDVRsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public AddLineupDVRsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public AddLineupDVRsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public AddLineupDVRsMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public AddLineupDVRsMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddLineupDVRsMediaContainer other = (AddLineupDVRsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, status); + } + + @Override + public String toString() { + return Utils.toString(AddLineupDVRsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public AddLineupDVRsMediaContainer build() { + + return new AddLineupDVRsMediaContainer( + identifier, offset, size, + totalSize, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddLineupMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupMediaContainer.java new file mode 100644 index 00000000..ea1e734c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupMediaContainer.java @@ -0,0 +1,158 @@ +/* + * 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.Optional; + + +public class AddLineupMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DVR") + private Optional> dvr; + + @JsonCreator + public AddLineupMediaContainer( + @JsonProperty("MediaContainer") Optional mediaContainer, + @JsonProperty("DVR") Optional> dvr) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + Utils.checkNotNull(dvr, "dvr"); + this.mediaContainer = mediaContainer; + this.dvr = dvr; + } + + public AddLineupMediaContainer() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> dvr() { + return (Optional>) dvr; + } + + public static Builder builder() { + return new Builder(); + } + + + public AddLineupMediaContainer withMediaContainer(AddLineupDVRsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public AddLineupMediaContainer withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public AddLineupMediaContainer withDvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + + public AddLineupMediaContainer withDvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddLineupMediaContainer other = (AddLineupMediaContainer) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer) && + Utils.enhancedDeepEquals(this.dvr, other.dvr); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer, dvr); + } + + @Override + public String toString() { + return Utils.toString(AddLineupMediaContainer.class, + "mediaContainer", mediaContainer, + "dvr", dvr); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Optional> dvr = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(AddLineupDVRsMediaContainer 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 Builder dvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + public Builder dvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + public AddLineupMediaContainer build() { + + return new AddLineupMediaContainer( + mediaContainer, dvr); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddLineupRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupRequest.java new file mode 100644 index 00000000..e9f6afc2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class AddLineupRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the DVR. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dvrId") + private long dvrId; + + /** + * The lineup to delete + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=lineup") + private String lineup; + + @JsonCreator + public AddLineupRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long dvrId, + String lineup) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(dvrId, "dvrId"); + Utils.checkNotNull(lineup, "lineup"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.dvrId = dvrId; + this.lineup = lineup; + } + + public AddLineupRequest( + long dvrId, + String lineup) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), dvrId, + lineup); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the DVR. + */ + @JsonIgnore + public long dvrId() { + return dvrId; + } + + /** + * The lineup to delete + */ + @JsonIgnore + public String lineup() { + return lineup; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddLineupRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddLineupRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddLineupRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddLineupRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddLineupRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddLineupRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddLineupRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddLineupRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddLineupRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddLineupRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddLineupRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddLineupRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddLineupRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddLineupRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddLineupRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddLineupRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddLineupRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddLineupRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddLineupRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddLineupRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddLineupRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddLineupRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the DVR. + */ + public AddLineupRequest withDvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + /** + * The lineup to delete + */ + public AddLineupRequest withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddLineupRequest other = (AddLineupRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.dvrId, other.dvrId) && + Utils.enhancedDeepEquals(this.lineup, other.lineup); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + lineup); + } + + @Override + public String toString() { + return Utils.toString(AddLineupRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "dvrId", dvrId, + "lineup", lineup); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long dvrId; + + private String lineup; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the DVR. + */ + public Builder dvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + + /** + * The lineup to delete + */ + public Builder lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public AddLineupRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddLineupRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + lineup); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddLineupRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupRequestBuilder.java new file mode 100644 index 00000000..8b3144e8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddLineup; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddLineupRequestBuilder { + + private AddLineupRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddLineupRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddLineupRequestBuilder request(AddLineupRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddLineupResponse call() throws Exception { + + RequestOperation operation + = new AddLineup.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddLineupResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupResponse.java new file mode 100644 index 00000000..d037a00d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class AddLineupResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public AddLineupResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public AddLineupResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddLineupResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddLineupResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddLineupResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddLineupResponse withObject(AddLineupResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public AddLineupResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public AddLineupResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddLineupResponse other = (AddLineupResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(AddLineupResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(AddLineupResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public AddLineupResponse build() { + + return new AddLineupResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddLineupResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupResponseBody.java new file mode 100644 index 00000000..2a4cba89 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddLineupResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * AddLineupResponseBody + * + *

OK + */ +public class AddLineupResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public AddLineupResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public AddLineupResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public AddLineupResponseBody withMediaContainer(AddLineupMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public AddLineupResponseBody 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; + } + AddLineupResponseBody other = (AddLineupResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(AddLineupResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(AddLineupMediaContainer 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 AddLineupResponseBody build() { + + return new AddLineupResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsMediaContainer.java deleted file mode 100644 index 15aba7c3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsMediaContainer.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class AddPlaylistContentsMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCountAdded") - private Optional leafCountAdded; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCountRequested") - private Optional leafCountRequested; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public AddPlaylistContentsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("leafCountAdded") Optional leafCountAdded, - @JsonProperty("leafCountRequested") Optional leafCountRequested, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(leafCountAdded, "leafCountAdded"); - Utils.checkNotNull(leafCountRequested, "leafCountRequested"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.leafCountAdded = leafCountAdded; - this.leafCountRequested = leafCountRequested; - this.metadata = metadata; - } - - public AddPlaylistContentsMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional leafCountAdded() { - return leafCountAdded; - } - - @JsonIgnore - public Optional leafCountRequested() { - return leafCountRequested; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - public AddPlaylistContentsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public AddPlaylistContentsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public AddPlaylistContentsMediaContainer withLeafCountAdded(int leafCountAdded) { - Utils.checkNotNull(leafCountAdded, "leafCountAdded"); - this.leafCountAdded = Optional.ofNullable(leafCountAdded); - return this; - } - - - public AddPlaylistContentsMediaContainer withLeafCountAdded(Optional leafCountAdded) { - Utils.checkNotNull(leafCountAdded, "leafCountAdded"); - this.leafCountAdded = leafCountAdded; - return this; - } - - public AddPlaylistContentsMediaContainer withLeafCountRequested(int leafCountRequested) { - Utils.checkNotNull(leafCountRequested, "leafCountRequested"); - this.leafCountRequested = Optional.ofNullable(leafCountRequested); - return this; - } - - - public AddPlaylistContentsMediaContainer withLeafCountRequested(Optional leafCountRequested) { - Utils.checkNotNull(leafCountRequested, "leafCountRequested"); - this.leafCountRequested = leafCountRequested; - return this; - } - - public AddPlaylistContentsMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public AddPlaylistContentsMediaContainer 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; - } - AddPlaylistContentsMediaContainer other = (AddPlaylistContentsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.leafCountAdded, other.leafCountAdded) && - Utils.enhancedDeepEquals(this.leafCountRequested, other.leafCountRequested) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, leafCountAdded, leafCountRequested, - metadata); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsMediaContainer.class, - "size", size, - "leafCountAdded", leafCountAdded, - "leafCountRequested", leafCountRequested, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional leafCountAdded = Optional.empty(); - - private Optional leafCountRequested = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 leafCountAdded(int leafCountAdded) { - Utils.checkNotNull(leafCountAdded, "leafCountAdded"); - this.leafCountAdded = Optional.ofNullable(leafCountAdded); - return this; - } - - public Builder leafCountAdded(Optional leafCountAdded) { - Utils.checkNotNull(leafCountAdded, "leafCountAdded"); - this.leafCountAdded = leafCountAdded; - return this; - } - - - public Builder leafCountRequested(int leafCountRequested) { - Utils.checkNotNull(leafCountRequested, "leafCountRequested"); - this.leafCountRequested = Optional.ofNullable(leafCountRequested); - return this; - } - - public Builder leafCountRequested(Optional leafCountRequested) { - Utils.checkNotNull(leafCountRequested, "leafCountRequested"); - this.leafCountRequested = leafCountRequested; - 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 AddPlaylistContentsMediaContainer build() { - - return new AddPlaylistContentsMediaContainer( - size, leafCountAdded, leafCountRequested, - metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsMetadata.java deleted file mode 100644 index d251675c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsMetadata.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class AddPlaylistContentsMetadata { - - @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("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("summary") - private Optional summary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("smart") - private Optional smart; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("playlistType") - private Optional playlistType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("composite") - private Optional composite; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("addedAt") - private Optional addedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - @JsonCreator - public AddPlaylistContentsMetadata( - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("key") Optional key, - @JsonProperty("guid") Optional guid, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, - @JsonProperty("summary") Optional summary, - @JsonProperty("smart") Optional smart, - @JsonProperty("playlistType") Optional playlistType, - @JsonProperty("composite") Optional composite, - @JsonProperty("duration") Optional duration, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("updatedAt") Optional updatedAt) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(smart, "smart"); - Utils.checkNotNull(playlistType, "playlistType"); - Utils.checkNotNull(composite, "composite"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.type = type; - this.title = title; - this.summary = summary; - this.smart = smart; - this.playlistType = playlistType; - this.composite = composite; - this.duration = duration; - this.leafCount = leafCount; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - } - - public AddPlaylistContentsMetadata() { - 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()); - } - - @JsonIgnore - public Optional ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional guid() { - return guid; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional summary() { - return summary; - } - - @JsonIgnore - public Optional smart() { - return smart; - } - - @JsonIgnore - public Optional playlistType() { - return playlistType; - } - - @JsonIgnore - public Optional composite() { - return composite; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional addedAt() { - return addedAt; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - public static Builder builder() { - return new Builder(); - } - - - public AddPlaylistContentsMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public AddPlaylistContentsMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public AddPlaylistContentsMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public AddPlaylistContentsMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public AddPlaylistContentsMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public AddPlaylistContentsMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public AddPlaylistContentsMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public AddPlaylistContentsMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public AddPlaylistContentsMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public AddPlaylistContentsMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public AddPlaylistContentsMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public AddPlaylistContentsMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public AddPlaylistContentsMetadata withSmart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - - public AddPlaylistContentsMetadata withSmart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - public AddPlaylistContentsMetadata withPlaylistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - - public AddPlaylistContentsMetadata withPlaylistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - public AddPlaylistContentsMetadata withComposite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - - public AddPlaylistContentsMetadata withComposite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - public AddPlaylistContentsMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public AddPlaylistContentsMetadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public AddPlaylistContentsMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - public AddPlaylistContentsMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public AddPlaylistContentsMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public AddPlaylistContentsMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public AddPlaylistContentsMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public AddPlaylistContentsMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddPlaylistContentsMetadata other = (AddPlaylistContentsMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.smart, other.smart) && - Utils.enhancedDeepEquals(this.playlistType, other.playlistType) && - Utils.enhancedDeepEquals(this.composite, other.composite) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - type, title, summary, - smart, playlistType, composite, - duration, leafCount, addedAt, - updatedAt); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "type", type, - "title", title, - "summary", summary, - "smart", smart, - "playlistType", playlistType, - "composite", composite, - "duration", duration, - "leafCount", leafCount, - "addedAt", addedAt, - "updatedAt", updatedAt); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional ratingKey = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional guid = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional smart = Optional.empty(); - - private Optional playlistType = Optional.empty(); - - private Optional composite = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional leafCount = Optional.empty(); - - private Optional addedAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder ratingKey(String 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 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 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 smart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - public Builder smart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - - public Builder playlistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - public Builder playlistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - - public Builder composite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - public Builder composite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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 addedAt(int 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(int 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 AddPlaylistContentsMetadata build() { - - return new AddPlaylistContentsMetadata( - ratingKey, key, guid, - type, title, summary, - smart, playlistType, composite, - duration, leafCount, addedAt, - updatedAt); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsRequest.java deleted file mode 100644 index e86cf8af..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsRequest.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class AddPlaylistContentsRequest { - /** - * the ID of the playlist - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") - private double playlistID; - - /** - * the content URI for the playlist - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") - private String uri; - - /** - * the play queue to add to a playlist - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueID") - private Optional playQueueID; - - @JsonCreator - public AddPlaylistContentsRequest( - double playlistID, - String uri, - Optional playQueueID) { - Utils.checkNotNull(playlistID, "playlistID"); - Utils.checkNotNull(uri, "uri"); - Utils.checkNotNull(playQueueID, "playQueueID"); - this.playlistID = playlistID; - this.uri = uri; - this.playQueueID = playQueueID; - } - - public AddPlaylistContentsRequest( - double playlistID, - String uri) { - this(playlistID, uri, Optional.empty()); - } - - /** - * the ID of the playlist - */ - @JsonIgnore - public double playlistID() { - return playlistID; - } - - /** - * the content URI for the playlist - */ - @JsonIgnore - public String uri() { - return uri; - } - - /** - * the play queue to add to a playlist - */ - @JsonIgnore - public Optional playQueueID() { - return playQueueID; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the ID of the playlist - */ - public AddPlaylistContentsRequest withPlaylistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - /** - * the content URI for the playlist - */ - public AddPlaylistContentsRequest withUri(String uri) { - Utils.checkNotNull(uri, "uri"); - this.uri = uri; - return this; - } - - /** - * the play queue to add to a playlist - */ - public AddPlaylistContentsRequest withPlayQueueID(double playQueueID) { - Utils.checkNotNull(playQueueID, "playQueueID"); - this.playQueueID = Optional.ofNullable(playQueueID); - return this; - } - - - /** - * the play queue to add to a playlist - */ - public AddPlaylistContentsRequest withPlayQueueID(Optional playQueueID) { - Utils.checkNotNull(playQueueID, "playQueueID"); - this.playQueueID = playQueueID; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddPlaylistContentsRequest other = (AddPlaylistContentsRequest) o; - return - Utils.enhancedDeepEquals(this.playlistID, other.playlistID) && - Utils.enhancedDeepEquals(this.uri, other.uri) && - Utils.enhancedDeepEquals(this.playQueueID, other.playQueueID); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - playlistID, uri, playQueueID); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsRequest.class, - "playlistID", playlistID, - "uri", uri, - "playQueueID", playQueueID); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Double playlistID; - - private String uri; - - private Optional playQueueID = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * the ID of the playlist - */ - public Builder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - - /** - * the content URI for the playlist - */ - public Builder uri(String uri) { - Utils.checkNotNull(uri, "uri"); - this.uri = uri; - return this; - } - - - /** - * the play queue to add to a playlist - */ - public Builder playQueueID(double playQueueID) { - Utils.checkNotNull(playQueueID, "playQueueID"); - this.playQueueID = Optional.ofNullable(playQueueID); - return this; - } - - /** - * the play queue to add to a playlist - */ - public Builder playQueueID(Optional playQueueID) { - Utils.checkNotNull(playQueueID, "playQueueID"); - this.playQueueID = playQueueID; - return this; - } - - public AddPlaylistContentsRequest build() { - - return new AddPlaylistContentsRequest( - playlistID, uri, playQueueID); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsRequestBuilder.java deleted file mode 100644 index 9a982077..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsRequestBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.AddPlaylistContents; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class AddPlaylistContentsRequestBuilder { - - private Double playlistID; - private String uri; - private Optional playQueueID = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public AddPlaylistContentsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public AddPlaylistContentsRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - public AddPlaylistContentsRequestBuilder uri(String uri) { - Utils.checkNotNull(uri, "uri"); - this.uri = uri; - return this; - } - - public AddPlaylistContentsRequestBuilder playQueueID(double playQueueID) { - Utils.checkNotNull(playQueueID, "playQueueID"); - this.playQueueID = Optional.of(playQueueID); - return this; - } - - public AddPlaylistContentsRequestBuilder playQueueID(Optional playQueueID) { - Utils.checkNotNull(playQueueID, "playQueueID"); - this.playQueueID = playQueueID; - return this; - } - - - private AddPlaylistContentsRequest buildRequest() { - - AddPlaylistContentsRequest request = new AddPlaylistContentsRequest(playlistID, - uri, - playQueueID); - - return request; - } - - public AddPlaylistContentsResponse call() throws Exception { - - RequestOperation operation - = new AddPlaylistContents.Sync(sdkConfiguration); - AddPlaylistContentsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsResponse.java deleted file mode 100644 index 2484ed66..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class AddPlaylistContentsResponse 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; - - /** - * Playlist Updated - */ - private Optional object; - - @JsonCreator - public AddPlaylistContentsResponse( - 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 AddPlaylistContentsResponse( - 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; - } - - /** - * Playlist Updated - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public AddPlaylistContentsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public AddPlaylistContentsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public AddPlaylistContentsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Playlist Updated - */ - public AddPlaylistContentsResponse withObject(AddPlaylistContentsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Playlist Updated - */ - public AddPlaylistContentsResponse 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; - } - AddPlaylistContentsResponse other = (AddPlaylistContentsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Playlist Updated - */ - public Builder object(AddPlaylistContentsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Playlist Updated - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public AddPlaylistContentsResponse build() { - - return new AddPlaylistContentsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsResponseBody.java deleted file mode 100644 index 7e779b2f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistContentsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * AddPlaylistContentsResponseBody - * - *

Playlist Updated - */ -public class AddPlaylistContentsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public AddPlaylistContentsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public AddPlaylistContentsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public AddPlaylistContentsResponseBody withMediaContainer(AddPlaylistContentsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public AddPlaylistContentsResponseBody 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; - } - AddPlaylistContentsResponseBody other = (AddPlaylistContentsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(AddPlaylistContentsMediaContainer 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 AddPlaylistContentsResponseBody build() { - - return new AddPlaylistContentsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsRequest.java new file mode 100644 index 00000000..1fca550b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsRequest.java @@ -0,0 +1,901 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class AddPlaylistItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; + + /** + * The content URI for the playlist. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") + private Optional uri; + + /** + * The play queue to add to a playlist. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueID") + private Optional playQueueID; + + @JsonCreator + public AddPlaylistItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId, + Optional uri, + Optional playQueueID) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + Utils.checkNotNull(uri, "uri"); + Utils.checkNotNull(playQueueID, "playQueueID"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + this.uri = uri; + this.playQueueID = playQueueID; + } + + public AddPlaylistItemsRequest( + long playlistId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; + } + + /** + * The content URI for the playlist. + */ + @JsonIgnore + public Optional uri() { + return uri; + } + + /** + * The play queue to add to a playlist. + */ + @JsonIgnore + public Optional playQueueID() { + return playQueueID; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddPlaylistItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddPlaylistItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddPlaylistItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddPlaylistItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddPlaylistItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddPlaylistItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddPlaylistItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddPlaylistItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddPlaylistItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddPlaylistItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddPlaylistItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddPlaylistItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddPlaylistItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddPlaylistItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddPlaylistItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddPlaylistItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddPlaylistItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddPlaylistItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddPlaylistItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddPlaylistItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddPlaylistItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddPlaylistItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public AddPlaylistItemsRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + /** + * The content URI for the playlist. + */ + public AddPlaylistItemsRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + /** + * The content URI for the playlist. + */ + public AddPlaylistItemsRequest withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + /** + * The play queue to add to a playlist. + */ + public AddPlaylistItemsRequest withPlayQueueID(long playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = Optional.ofNullable(playQueueID); + return this; + } + + + /** + * The play queue to add to a playlist. + */ + public AddPlaylistItemsRequest withPlayQueueID(Optional playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = playQueueID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddPlaylistItemsRequest other = (AddPlaylistItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId) && + Utils.enhancedDeepEquals(this.uri, other.uri) && + Utils.enhancedDeepEquals(this.playQueueID, other.playQueueID); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + uri, playQueueID); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId, + "uri", uri, + "playQueueID", playQueueID); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; + + private Optional uri = Optional.empty(); + + private Optional playQueueID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + + /** + * The content URI for the playlist. + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + /** + * The content URI for the playlist. + */ + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + + /** + * The play queue to add to a playlist. + */ + public Builder playQueueID(long playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = Optional.ofNullable(playQueueID); + return this; + } + + /** + * The play queue to add to a playlist. + */ + public Builder playQueueID(Optional playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = playQueueID; + return this; + } + + public AddPlaylistItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddPlaylistItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + uri, playQueueID); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsRequestBuilder.java new file mode 100644 index 00000000..332bb32e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddPlaylistItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddPlaylistItemsRequestBuilder { + + private AddPlaylistItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddPlaylistItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddPlaylistItemsRequestBuilder request(AddPlaylistItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddPlaylistItemsResponse call() throws Exception { + + RequestOperation operation + = new AddPlaylistItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsResponse.java new file mode 100644 index 00000000..b78eb578 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddPlaylistItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class AddPlaylistItemsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public AddPlaylistItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public AddPlaylistItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddPlaylistItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddPlaylistItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddPlaylistItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddPlaylistItemsResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public AddPlaylistItemsResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddPlaylistItemsResponse other = (AddPlaylistItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public AddPlaylistItemsResponse build() { + + return new AddPlaylistItemsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddProviderRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddProviderRequest.java new file mode 100644 index 00000000..5a3a3b03 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddProviderRequest.java @@ -0,0 +1,779 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class AddProviderRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The URL of the media provider to add. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private String url; + + @JsonCreator + public AddProviderRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String url) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(url, "url"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.url = url; + } + + public AddProviderRequest( + String url) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), url); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The URL of the media provider to add. + */ + @JsonIgnore + public String url() { + return url; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddProviderRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddProviderRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddProviderRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddProviderRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddProviderRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddProviderRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddProviderRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddProviderRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddProviderRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddProviderRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddProviderRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddProviderRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddProviderRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddProviderRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddProviderRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddProviderRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddProviderRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddProviderRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddProviderRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddProviderRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddProviderRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddProviderRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The URL of the media provider to add. + */ + public AddProviderRequest 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; + } + AddProviderRequest other = (AddProviderRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, url); + } + + @Override + public String toString() { + return Utils.toString(AddProviderRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "url", url); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String url; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The URL of the media provider to add. + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public AddProviderRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddProviderRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, url); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddProviderRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddProviderRequestBuilder.java new file mode 100644 index 00000000..5eb40236 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddProviderRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddProvider; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddProviderRequestBuilder { + + private AddProviderRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddProviderRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddProviderRequestBuilder request(AddProviderRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddProviderResponse call() throws Exception { + + RequestOperation operation + = new AddProvider.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddProviderResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddProviderResponse.java new file mode 100644 index 00000000..c864c930 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddProviderResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class AddProviderResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public AddProviderResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddProviderResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddProviderResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddProviderResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddProviderResponse other = (AddProviderResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(AddProviderResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public AddProviderResponse build() { + + return new AddProviderResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddSectionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddSectionRequest.java new file mode 100644 index 00000000..e7a19141 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddSectionRequest.java @@ -0,0 +1,1272 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class AddSectionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The name of the new section + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=name") + private String name; + + /** + * The type of library section + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private long type; + + /** + * The scanner this section should use + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=scanner") + private Optional scanner; + + /** + * The agent this section should use for metadata + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=agent") + private String agent; + + /** + * The agent group id for this section + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=metadataAgentProviderGroupId") + private Optional metadataAgentProviderGroupId; + + /** + * The language of this section + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=language") + private String language; + + /** + * The locations on disk to add to this section + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=locations") + private Optional> locations; + + /** + * The preferences for this section + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=prefs") + private Optional prefs; + + /** + * If set, paths are relative to `Media Upload` path + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=relative") + private Optional relative; + + /** + * If set, import media from iTunes. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=importFromiTunes") + private Optional importFromiTunes; + + @JsonCreator + public AddSectionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String name, + long type, + Optional scanner, + String agent, + Optional metadataAgentProviderGroupId, + String language, + Optional> locations, + Optional prefs, + Optional relative, + Optional importFromiTunes) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(scanner, "scanner"); + Utils.checkNotNull(agent, "agent"); + Utils.checkNotNull(metadataAgentProviderGroupId, "metadataAgentProviderGroupId"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(locations, "locations"); + Utils.checkNotNull(prefs, "prefs"); + Utils.checkNotNull(relative, "relative"); + Utils.checkNotNull(importFromiTunes, "importFromiTunes"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.name = name; + this.type = type; + this.scanner = scanner; + this.agent = agent; + this.metadataAgentProviderGroupId = metadataAgentProviderGroupId; + this.language = language; + this.locations = locations; + this.prefs = prefs; + this.relative = relative; + this.importFromiTunes = importFromiTunes; + } + + public AddSectionRequest( + String name, + long type, + String agent, + String language) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), name, + type, Optional.empty(), agent, + Optional.empty(), language, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The name of the new section + */ + @JsonIgnore + public String name() { + return name; + } + + /** + * The type of library section + */ + @JsonIgnore + public long type() { + return type; + } + + /** + * The scanner this section should use + */ + @JsonIgnore + public Optional scanner() { + return scanner; + } + + /** + * The agent this section should use for metadata + */ + @JsonIgnore + public String agent() { + return agent; + } + + /** + * The agent group id for this section + */ + @JsonIgnore + public Optional metadataAgentProviderGroupId() { + return metadataAgentProviderGroupId; + } + + /** + * The language of this section + */ + @JsonIgnore + public String language() { + return language; + } + + /** + * The locations on disk to add to this section + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> locations() { + return (Optional>) locations; + } + + /** + * The preferences for this section + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional prefs() { + return (Optional) prefs; + } + + /** + * If set, paths are relative to `Media Upload` path + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional relative() { + return (Optional) relative; + } + + /** + * If set, import media from iTunes. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional importFromiTunes() { + return (Optional) importFromiTunes; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddSectionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddSectionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddSectionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddSectionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddSectionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddSectionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddSectionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddSectionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddSectionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddSectionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddSectionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddSectionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddSectionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddSectionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddSectionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddSectionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddSectionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddSectionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddSectionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddSectionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddSectionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddSectionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The name of the new section + */ + public AddSectionRequest withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * The type of library section + */ + public AddSectionRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The scanner this section should use + */ + public AddSectionRequest withScanner(String scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = Optional.ofNullable(scanner); + return this; + } + + + /** + * The scanner this section should use + */ + public AddSectionRequest withScanner(Optional scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = scanner; + return this; + } + + /** + * The agent this section should use for metadata + */ + public AddSectionRequest withAgent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + /** + * The agent group id for this section + */ + public AddSectionRequest withMetadataAgentProviderGroupId(String metadataAgentProviderGroupId) { + Utils.checkNotNull(metadataAgentProviderGroupId, "metadataAgentProviderGroupId"); + this.metadataAgentProviderGroupId = Optional.ofNullable(metadataAgentProviderGroupId); + return this; + } + + + /** + * The agent group id for this section + */ + public AddSectionRequest withMetadataAgentProviderGroupId(Optional metadataAgentProviderGroupId) { + Utils.checkNotNull(metadataAgentProviderGroupId, "metadataAgentProviderGroupId"); + this.metadataAgentProviderGroupId = metadataAgentProviderGroupId; + return this; + } + + /** + * The language of this section + */ + public AddSectionRequest withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + /** + * The locations on disk to add to this section + */ + public AddSectionRequest withLocations(List locations) { + Utils.checkNotNull(locations, "locations"); + this.locations = Optional.ofNullable(locations); + return this; + } + + + /** + * The locations on disk to add to this section + */ + public AddSectionRequest withLocations(Optional> locations) { + Utils.checkNotNull(locations, "locations"); + this.locations = locations; + return this; + } + + /** + * The preferences for this section + */ + public AddSectionRequest withPrefs(QueryParamPrefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = Optional.ofNullable(prefs); + return this; + } + + + /** + * The preferences for this section + */ + public AddSectionRequest withPrefs(Optional prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + /** + * If set, paths are relative to `Media Upload` path + */ + public AddSectionRequest withRelative(BoolInt relative) { + Utils.checkNotNull(relative, "relative"); + this.relative = Optional.ofNullable(relative); + return this; + } + + + /** + * If set, paths are relative to `Media Upload` path + */ + public AddSectionRequest withRelative(Optional relative) { + Utils.checkNotNull(relative, "relative"); + this.relative = relative; + return this; + } + + /** + * If set, import media from iTunes. + */ + public AddSectionRequest withImportFromiTunes(BoolInt importFromiTunes) { + Utils.checkNotNull(importFromiTunes, "importFromiTunes"); + this.importFromiTunes = Optional.ofNullable(importFromiTunes); + return this; + } + + + /** + * If set, import media from iTunes. + */ + public AddSectionRequest withImportFromiTunes(Optional importFromiTunes) { + Utils.checkNotNull(importFromiTunes, "importFromiTunes"); + this.importFromiTunes = importFromiTunes; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddSectionRequest other = (AddSectionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.scanner, other.scanner) && + Utils.enhancedDeepEquals(this.agent, other.agent) && + Utils.enhancedDeepEquals(this.metadataAgentProviderGroupId, other.metadataAgentProviderGroupId) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.locations, other.locations) && + Utils.enhancedDeepEquals(this.prefs, other.prefs) && + Utils.enhancedDeepEquals(this.relative, other.relative) && + Utils.enhancedDeepEquals(this.importFromiTunes, other.importFromiTunes); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, name, + type, scanner, agent, + metadataAgentProviderGroupId, language, locations, + prefs, relative, importFromiTunes); + } + + @Override + public String toString() { + return Utils.toString(AddSectionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "name", name, + "type", type, + "scanner", scanner, + "agent", agent, + "metadataAgentProviderGroupId", metadataAgentProviderGroupId, + "language", language, + "locations", locations, + "prefs", prefs, + "relative", relative, + "importFromiTunes", importFromiTunes); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String name; + + private Long type; + + private Optional scanner = Optional.empty(); + + private String agent; + + private Optional metadataAgentProviderGroupId = Optional.empty(); + + private String language; + + private Optional> locations = Optional.empty(); + + private Optional prefs = Optional.empty(); + + private Optional relative = Optional.empty(); + + private Optional importFromiTunes = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The name of the new section + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + /** + * The type of library section + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The scanner this section should use + */ + public Builder scanner(String scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = Optional.ofNullable(scanner); + return this; + } + + /** + * The scanner this section should use + */ + public Builder scanner(Optional scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = scanner; + return this; + } + + + /** + * The agent this section should use for metadata + */ + public Builder agent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + + /** + * The agent group id for this section + */ + public Builder metadataAgentProviderGroupId(String metadataAgentProviderGroupId) { + Utils.checkNotNull(metadataAgentProviderGroupId, "metadataAgentProviderGroupId"); + this.metadataAgentProviderGroupId = Optional.ofNullable(metadataAgentProviderGroupId); + return this; + } + + /** + * The agent group id for this section + */ + public Builder metadataAgentProviderGroupId(Optional metadataAgentProviderGroupId) { + Utils.checkNotNull(metadataAgentProviderGroupId, "metadataAgentProviderGroupId"); + this.metadataAgentProviderGroupId = metadataAgentProviderGroupId; + return this; + } + + + /** + * The language of this section + */ + public Builder language(String language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + + /** + * The locations on disk to add to this section + */ + public Builder locations(List locations) { + Utils.checkNotNull(locations, "locations"); + this.locations = Optional.ofNullable(locations); + return this; + } + + /** + * The locations on disk to add to this section + */ + public Builder locations(Optional> locations) { + Utils.checkNotNull(locations, "locations"); + this.locations = locations; + return this; + } + + + /** + * The preferences for this section + */ + public Builder prefs(QueryParamPrefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = Optional.ofNullable(prefs); + return this; + } + + /** + * The preferences for this section + */ + public Builder prefs(Optional prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + + /** + * If set, paths are relative to `Media Upload` path + */ + public Builder relative(BoolInt relative) { + Utils.checkNotNull(relative, "relative"); + this.relative = Optional.ofNullable(relative); + return this; + } + + /** + * If set, paths are relative to `Media Upload` path + */ + public Builder relative(Optional relative) { + Utils.checkNotNull(relative, "relative"); + this.relative = relative; + return this; + } + + + /** + * If set, import media from iTunes. + */ + public Builder importFromiTunes(BoolInt importFromiTunes) { + Utils.checkNotNull(importFromiTunes, "importFromiTunes"); + this.importFromiTunes = Optional.ofNullable(importFromiTunes); + return this; + } + + /** + * If set, import media from iTunes. + */ + public Builder importFromiTunes(Optional importFromiTunes) { + Utils.checkNotNull(importFromiTunes, "importFromiTunes"); + this.importFromiTunes = importFromiTunes; + return this; + } + + public AddSectionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddSectionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, name, + type, scanner, agent, + metadataAgentProviderGroupId, language, locations, + prefs, relative, importFromiTunes); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddSectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddSectionRequestBuilder.java new file mode 100644 index 00000000..6217489d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddSectionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddSection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddSectionRequestBuilder { + + private AddSectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddSectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddSectionRequestBuilder request(AddSectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddSectionResponse call() throws Exception { + + RequestOperation operation + = new AddSection.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddSectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddSectionResponse.java new file mode 100644 index 00000000..d0ab0b5b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddSectionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.SlashGetResponses200; +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.Optional; + + +public class AddSectionResponse 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; + + /** + * OK + */ + private Optional slashGetResponses200; + + @JsonCreator + public AddSectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional slashGetResponses200) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(slashGetResponses200, "slashGetResponses200"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.slashGetResponses200 = slashGetResponses200; + } + + public AddSectionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional slashGetResponses200() { + return (Optional) slashGetResponses200; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddSectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddSectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddSectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddSectionResponse withSlashGetResponses200(SlashGetResponses200 slashGetResponses200) { + Utils.checkNotNull(slashGetResponses200, "slashGetResponses200"); + this.slashGetResponses200 = Optional.ofNullable(slashGetResponses200); + return this; + } + + + /** + * OK + */ + public AddSectionResponse withSlashGetResponses200(Optional slashGetResponses200) { + Utils.checkNotNull(slashGetResponses200, "slashGetResponses200"); + this.slashGetResponses200 = slashGetResponses200; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddSectionResponse other = (AddSectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.slashGetResponses200, other.slashGetResponses200); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + slashGetResponses200); + } + + @Override + public String toString() { + return Utils.toString(AddSectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "slashGetResponses200", slashGetResponses200); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional slashGetResponses200 = 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; + } + + + /** + * OK + */ + public Builder slashGetResponses200(SlashGetResponses200 slashGetResponses200) { + Utils.checkNotNull(slashGetResponses200, "slashGetResponses200"); + this.slashGetResponses200 = Optional.ofNullable(slashGetResponses200); + return this; + } + + /** + * OK + */ + public Builder slashGetResponses200(Optional slashGetResponses200) { + Utils.checkNotNull(slashGetResponses200, "slashGetResponses200"); + this.slashGetResponses200 = slashGetResponses200; + return this; + } + + public AddSectionResponse build() { + + return new AddSectionResponse( + contentType, statusCode, rawResponse, + slashGetResponses200); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesRequest.java new file mode 100644 index 00000000..05774874 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesRequest.java @@ -0,0 +1,1092 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class AddSubtitlesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=title") + private Optional title; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=language") + private Optional language; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaItemID") + private Optional mediaItemID; + + /** + * The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private Optional url; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=format") + private Optional format; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=forced") + private Optional forced; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=hearingImpaired") + private Optional hearingImpaired; + + @JsonCreator + public AddSubtitlesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional title, + Optional language, + Optional mediaItemID, + Optional url, + Optional format, + Optional forced, + Optional hearingImpaired) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(mediaItemID, "mediaItemID"); + Utils.checkNotNull(url, "url"); + Utils.checkNotNull(format, "format"); + Utils.checkNotNull(forced, "forced"); + Utils.checkNotNull(hearingImpaired, "hearingImpaired"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.title = title; + this.language = language; + this.mediaItemID = mediaItemID; + this.url = url; + this.format = format; + this.forced = forced; + this.hearingImpaired = hearingImpaired; + } + + public AddSubtitlesRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional mediaItemID() { + return mediaItemID; + } + + /** + * The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body + */ + @JsonIgnore + public Optional url() { + return url; + } + + @JsonIgnore + public Optional format() { + return format; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional forced() { + return (Optional) forced; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hearingImpaired() { + return (Optional) hearingImpaired; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddSubtitlesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddSubtitlesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddSubtitlesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddSubtitlesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddSubtitlesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddSubtitlesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddSubtitlesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddSubtitlesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddSubtitlesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddSubtitlesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddSubtitlesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddSubtitlesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddSubtitlesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddSubtitlesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddSubtitlesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddSubtitlesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddSubtitlesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddSubtitlesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddSubtitlesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddSubtitlesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddSubtitlesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddSubtitlesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public AddSubtitlesRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public AddSubtitlesRequest withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public AddSubtitlesRequest withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public AddSubtitlesRequest withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public AddSubtitlesRequest withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public AddSubtitlesRequest withMediaItemID(long mediaItemID) { + Utils.checkNotNull(mediaItemID, "mediaItemID"); + this.mediaItemID = Optional.ofNullable(mediaItemID); + return this; + } + + + public AddSubtitlesRequest withMediaItemID(Optional mediaItemID) { + Utils.checkNotNull(mediaItemID, "mediaItemID"); + this.mediaItemID = mediaItemID; + return this; + } + + /** + * The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body + */ + public AddSubtitlesRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + + /** + * The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body + */ + public AddSubtitlesRequest withUrl(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public AddSubtitlesRequest withFormat(String format) { + Utils.checkNotNull(format, "format"); + this.format = Optional.ofNullable(format); + return this; + } + + + public AddSubtitlesRequest withFormat(Optional format) { + Utils.checkNotNull(format, "format"); + this.format = format; + return this; + } + + public AddSubtitlesRequest withForced(BoolInt forced) { + Utils.checkNotNull(forced, "forced"); + this.forced = Optional.ofNullable(forced); + return this; + } + + + public AddSubtitlesRequest withForced(Optional forced) { + Utils.checkNotNull(forced, "forced"); + this.forced = forced; + return this; + } + + public AddSubtitlesRequest withHearingImpaired(BoolInt hearingImpaired) { + Utils.checkNotNull(hearingImpaired, "hearingImpaired"); + this.hearingImpaired = Optional.ofNullable(hearingImpaired); + return this; + } + + + public AddSubtitlesRequest withHearingImpaired(Optional hearingImpaired) { + Utils.checkNotNull(hearingImpaired, "hearingImpaired"); + this.hearingImpaired = hearingImpaired; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddSubtitlesRequest other = (AddSubtitlesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.mediaItemID, other.mediaItemID) && + Utils.enhancedDeepEquals(this.url, other.url) && + Utils.enhancedDeepEquals(this.format, other.format) && + Utils.enhancedDeepEquals(this.forced, other.forced) && + Utils.enhancedDeepEquals(this.hearingImpaired, other.hearingImpaired); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + title, language, mediaItemID, + url, format, forced, + hearingImpaired); + } + + @Override + public String toString() { + return Utils.toString(AddSubtitlesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "title", title, + "language", language, + "mediaItemID", mediaItemID, + "url", url, + "format", format, + "forced", forced, + "hearingImpaired", hearingImpaired); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional title = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional mediaItemID = Optional.empty(); + + private Optional url = Optional.empty(); + + private Optional format = Optional.empty(); + + private Optional forced = Optional.empty(); + + private Optional hearingImpaired = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + 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 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 mediaItemID(long mediaItemID) { + Utils.checkNotNull(mediaItemID, "mediaItemID"); + this.mediaItemID = Optional.ofNullable(mediaItemID); + return this; + } + + public Builder mediaItemID(Optional mediaItemID) { + Utils.checkNotNull(mediaItemID, "mediaItemID"); + this.mediaItemID = mediaItemID; + return this; + } + + + /** + * The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body + */ + public Builder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + + public Builder format(String format) { + Utils.checkNotNull(format, "format"); + this.format = Optional.ofNullable(format); + return this; + } + + public Builder format(Optional format) { + Utils.checkNotNull(format, "format"); + this.format = format; + return this; + } + + + public Builder forced(BoolInt forced) { + Utils.checkNotNull(forced, "forced"); + this.forced = Optional.ofNullable(forced); + return this; + } + + public Builder forced(Optional forced) { + Utils.checkNotNull(forced, "forced"); + this.forced = forced; + return this; + } + + + public Builder hearingImpaired(BoolInt 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 AddSubtitlesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddSubtitlesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + title, language, mediaItemID, + url, format, forced, + hearingImpaired); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesRequestBuilder.java new file mode 100644 index 00000000..a8409cd2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddSubtitles; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddSubtitlesRequestBuilder { + + private AddSubtitlesRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddSubtitlesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddSubtitlesRequestBuilder request(AddSubtitlesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddSubtitlesResponse call() throws Exception { + + RequestOperation operation + = new AddSubtitles.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesResponse.java new file mode 100644 index 00000000..3df55a23 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddSubtitlesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class AddSubtitlesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public AddSubtitlesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddSubtitlesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddSubtitlesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddSubtitlesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddSubtitlesResponse other = (AddSubtitlesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(AddSubtitlesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public AddSubtitlesResponse build() { + + return new AddSubtitlesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueRequest.java new file mode 100644 index 00000000..0427ea93 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueRequest.java @@ -0,0 +1,962 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class AddToPlayQueueRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the play queue. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playQueueId") + private long playQueueId; + + /** + * The content URI for what we're adding to the queue. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") + private Optional uri; + + /** + * The ID of the playlist to add to the playQueue. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playlistID") + private Optional playlistID; + + /** + * Play this item next (defaults to 0 - queueing at the end of manually queued items). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=next") + private Optional next; + + @JsonCreator + public AddToPlayQueueRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playQueueId, + Optional uri, + Optional playlistID, + Optional next) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playQueueId, "playQueueId"); + Utils.checkNotNull(uri, "uri"); + Utils.checkNotNull(playlistID, "playlistID"); + Utils.checkNotNull(next, "next"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playQueueId = playQueueId; + this.uri = uri; + this.playlistID = playlistID; + this.next = next; + } + + public AddToPlayQueueRequest( + long playQueueId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playQueueId, + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the play queue. + */ + @JsonIgnore + public long playQueueId() { + return playQueueId; + } + + /** + * The content URI for what we're adding to the queue. + */ + @JsonIgnore + public Optional uri() { + return uri; + } + + /** + * The ID of the playlist to add to the playQueue. + */ + @JsonIgnore + public Optional playlistID() { + return playlistID; + } + + /** + * Play this item next (defaults to 0 - queueing at the end of manually queued items). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional next() { + return (Optional) next; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddToPlayQueueRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AddToPlayQueueRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AddToPlayQueueRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AddToPlayQueueRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AddToPlayQueueRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AddToPlayQueueRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AddToPlayQueueRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AddToPlayQueueRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AddToPlayQueueRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AddToPlayQueueRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AddToPlayQueueRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AddToPlayQueueRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AddToPlayQueueRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AddToPlayQueueRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AddToPlayQueueRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AddToPlayQueueRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AddToPlayQueueRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AddToPlayQueueRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AddToPlayQueueRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AddToPlayQueueRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AddToPlayQueueRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AddToPlayQueueRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the play queue. + */ + public AddToPlayQueueRequest withPlayQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + /** + * The content URI for what we're adding to the queue. + */ + public AddToPlayQueueRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + /** + * The content URI for what we're adding to the queue. + */ + public AddToPlayQueueRequest withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + /** + * The ID of the playlist to add to the playQueue. + */ + public AddToPlayQueueRequest withPlaylistID(String playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = Optional.ofNullable(playlistID); + return this; + } + + + /** + * The ID of the playlist to add to the playQueue. + */ + public AddToPlayQueueRequest withPlaylistID(Optional playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + /** + * Play this item next (defaults to 0 - queueing at the end of manually queued items). + */ + public AddToPlayQueueRequest withNext(BoolInt next) { + Utils.checkNotNull(next, "next"); + this.next = Optional.ofNullable(next); + return this; + } + + + /** + * Play this item next (defaults to 0 - queueing at the end of manually queued items). + */ + public AddToPlayQueueRequest withNext(Optional next) { + Utils.checkNotNull(next, "next"); + this.next = next; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddToPlayQueueRequest other = (AddToPlayQueueRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playQueueId, other.playQueueId) && + Utils.enhancedDeepEquals(this.uri, other.uri) && + Utils.enhancedDeepEquals(this.playlistID, other.playlistID) && + Utils.enhancedDeepEquals(this.next, other.next); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId, + uri, playlistID, next); + } + + @Override + public String toString() { + return Utils.toString(AddToPlayQueueRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playQueueId", playQueueId, + "uri", uri, + "playlistID", playlistID, + "next", next); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playQueueId; + + private Optional uri = Optional.empty(); + + private Optional playlistID = Optional.empty(); + + private Optional next = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the play queue. + */ + public Builder playQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + + /** + * The content URI for what we're adding to the queue. + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + /** + * The content URI for what we're adding to the queue. + */ + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + + /** + * The ID of the playlist to add to the playQueue. + */ + public Builder playlistID(String playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = Optional.ofNullable(playlistID); + return this; + } + + /** + * The ID of the playlist to add to the playQueue. + */ + public Builder playlistID(Optional playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + + /** + * Play this item next (defaults to 0 - queueing at the end of manually queued items). + */ + public Builder next(BoolInt next) { + Utils.checkNotNull(next, "next"); + this.next = Optional.ofNullable(next); + return this; + } + + /** + * Play this item next (defaults to 0 - queueing at the end of manually queued items). + */ + public Builder next(Optional next) { + Utils.checkNotNull(next, "next"); + this.next = next; + return this; + } + + public AddToPlayQueueRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AddToPlayQueueRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId, + uri, playlistID, next); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueRequestBuilder.java new file mode 100644 index 00000000..512c90fa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AddToPlayQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AddToPlayQueueRequestBuilder { + + private AddToPlayQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddToPlayQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddToPlayQueueRequestBuilder request(AddToPlayQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AddToPlayQueueResponse call() throws Exception { + + RequestOperation operation + = new AddToPlayQueue.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueResponse.java new file mode 100644 index 00000000..1cf96e72 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddToPlayQueueResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class AddToPlayQueueResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public AddToPlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public AddToPlayQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddToPlayQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddToPlayQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddToPlayQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddToPlayQueueResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public AddToPlayQueueResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddToPlayQueueResponse other = (AddToPlayQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(AddToPlayQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public AddToPlayQueueResponse build() { + + return new AddToPlayQueueResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AddedQueueItems.java b/src/main/java/dev/plexapi/sdk/models/operations/AddedQueueItems.java new file mode 100644 index 00000000..91732148 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AddedQueueItems.java @@ -0,0 +1,189 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class AddedQueueItems { + /** + * The queue item id that was added or the existing one if an item already exists in this queue with the same parameters + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The key added to the queue + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonCreator + public AddedQueueItems( + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + this.id = id; + this.key = key; + } + + public AddedQueueItems() { + this(Optional.empty(), Optional.empty()); + } + + /** + * The queue item id that was added or the existing one if an item already exists in this queue with the same parameters + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The key added to the queue + */ + @JsonIgnore + public Optional key() { + return key; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The queue item id that was added or the existing one if an item already exists in this queue with the same parameters + */ + public AddedQueueItems withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * The queue item id that was added or the existing one if an item already exists in this queue with the same parameters + */ + public AddedQueueItems withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The key added to the queue + */ + public AddedQueueItems withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key added to the queue + */ + public AddedQueueItems withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddedQueueItems other = (AddedQueueItems) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.key, other.key); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, key); + } + + @Override + public String toString() { + return Utils.toString(AddedQueueItems.class, + "id", id, + "key", key); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The queue item id that was added or the existing one if an item already exists in this queue with the same parameters + */ + public Builder id(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * The queue item id that was added or the existing one if an item already exists in this queue with the same parameters + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * The key added to the queue + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key added to the queue + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public AddedQueueItems build() { + + return new AddedQueueItems( + id, key); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AdvancedSubtitles.java b/src/main/java/dev/plexapi/sdk/models/operations/AdvancedSubtitles.java new file mode 100644 index 00000000..a8544fae --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AdvancedSubtitles.java @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum AdvancedSubtitles { + AUTO("auto"), + BURN("burn"), + NONE("none"), + SIDECAR("sidecar"), + EMBEDDED("embedded"), + SEGMENTED("segmented"); + + @JsonValue + private final String value; + + AdvancedSubtitles(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (AdvancedSubtitles o: AdvancedSubtitles.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AllLibraries.java b/src/main/java/dev/plexapi/sdk/models/operations/AllLibraries.java deleted file mode 100644 index c1abe1a9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AllLibraries.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * AllLibraries - * - *

Indicates if the user has access to all libraries. - */ -public enum AllLibraries { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - AllLibraries(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (AllLibraries o: AllLibraries.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AllowCameraUpload.java b/src/main/java/dev/plexapi/sdk/models/operations/AllowCameraUpload.java deleted file mode 100644 index a8d7337c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AllowCameraUpload.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * AllowCameraUpload - * - *

Indicates if the user is allowed to upload from a camera. - */ -public enum AllowCameraUpload { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - AllowCameraUpload(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (AllowCameraUpload o: AllowCameraUpload.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AllowChannels.java b/src/main/java/dev/plexapi/sdk/models/operations/AllowChannels.java deleted file mode 100644 index c9babd16..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AllowChannels.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * AllowChannels - * - *

Indicates if the user has access to channels. - */ -public enum AllowChannels { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - AllowChannels(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (AllowChannels o: AllowChannels.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AllowSubtitleAdmin.java b/src/main/java/dev/plexapi/sdk/models/operations/AllowSubtitleAdmin.java deleted file mode 100644 index 6294583c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AllowSubtitleAdmin.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * AllowSubtitleAdmin - * - *

Indicates if the user can manage subtitles. - */ -public enum AllowSubtitleAdmin { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - AllowSubtitleAdmin(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (AllowSubtitleAdmin o: AllowSubtitleAdmin.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AllowSync.java b/src/main/java/dev/plexapi/sdk/models/operations/AllowSync.java deleted file mode 100644 index d95b9d70..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AllowSync.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * AllowSync - * - *

Indicates if the user is allowed to sync media. - */ -public enum AllowSync { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - AllowSync(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (AllowSync o: AllowSync.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AllowTuners.java b/src/main/java/dev/plexapi/sdk/models/operations/AllowTuners.java deleted file mode 100644 index 48d98770..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AllowTuners.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * AllowTuners - * - *

Indicates if the user is allowed to use tuners. - */ -public enum AllowTuners { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - AllowTuners(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (AllowTuners o: AllowTuners.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataRequest.java new file mode 100644 index 00000000..9d60fe35 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataRequest.java @@ -0,0 +1,890 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class AnalyzeMetadataRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + /** + * Set the offset to be used for thumbnails + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=thumbOffset") + private Optional thumbOffset; + + /** + * Set the offset to be used for artwork + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=artOffset") + private Optional artOffset; + + @JsonCreator + public AnalyzeMetadataRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional thumbOffset, + Optional artOffset) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(thumbOffset, "thumbOffset"); + Utils.checkNotNull(artOffset, "artOffset"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.thumbOffset = thumbOffset; + this.artOffset = artOffset; + } + + public AnalyzeMetadataRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + /** + * Set the offset to be used for thumbnails + */ + @JsonIgnore + public Optional thumbOffset() { + return thumbOffset; + } + + /** + * Set the offset to be used for artwork + */ + @JsonIgnore + public Optional artOffset() { + return artOffset; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AnalyzeMetadataRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AnalyzeMetadataRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AnalyzeMetadataRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AnalyzeMetadataRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AnalyzeMetadataRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AnalyzeMetadataRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AnalyzeMetadataRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AnalyzeMetadataRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AnalyzeMetadataRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AnalyzeMetadataRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AnalyzeMetadataRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AnalyzeMetadataRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AnalyzeMetadataRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AnalyzeMetadataRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AnalyzeMetadataRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AnalyzeMetadataRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AnalyzeMetadataRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AnalyzeMetadataRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AnalyzeMetadataRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AnalyzeMetadataRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AnalyzeMetadataRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AnalyzeMetadataRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public AnalyzeMetadataRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * Set the offset to be used for thumbnails + */ + public AnalyzeMetadataRequest withThumbOffset(double thumbOffset) { + Utils.checkNotNull(thumbOffset, "thumbOffset"); + this.thumbOffset = Optional.ofNullable(thumbOffset); + return this; + } + + + /** + * Set the offset to be used for thumbnails + */ + public AnalyzeMetadataRequest withThumbOffset(Optional thumbOffset) { + Utils.checkNotNull(thumbOffset, "thumbOffset"); + this.thumbOffset = thumbOffset; + return this; + } + + /** + * Set the offset to be used for artwork + */ + public AnalyzeMetadataRequest withArtOffset(double artOffset) { + Utils.checkNotNull(artOffset, "artOffset"); + this.artOffset = Optional.ofNullable(artOffset); + return this; + } + + + /** + * Set the offset to be used for artwork + */ + public AnalyzeMetadataRequest withArtOffset(Optional artOffset) { + Utils.checkNotNull(artOffset, "artOffset"); + this.artOffset = artOffset; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyzeMetadataRequest other = (AnalyzeMetadataRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.thumbOffset, other.thumbOffset) && + Utils.enhancedDeepEquals(this.artOffset, other.artOffset); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + thumbOffset, artOffset); + } + + @Override + public String toString() { + return Utils.toString(AnalyzeMetadataRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "thumbOffset", thumbOffset, + "artOffset", artOffset); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional thumbOffset = Optional.empty(); + + private Optional artOffset = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * Set the offset to be used for thumbnails + */ + public Builder thumbOffset(double thumbOffset) { + Utils.checkNotNull(thumbOffset, "thumbOffset"); + this.thumbOffset = Optional.ofNullable(thumbOffset); + return this; + } + + /** + * Set the offset to be used for thumbnails + */ + public Builder thumbOffset(Optional thumbOffset) { + Utils.checkNotNull(thumbOffset, "thumbOffset"); + this.thumbOffset = thumbOffset; + return this; + } + + + /** + * Set the offset to be used for artwork + */ + public Builder artOffset(double artOffset) { + Utils.checkNotNull(artOffset, "artOffset"); + this.artOffset = Optional.ofNullable(artOffset); + return this; + } + + /** + * Set the offset to be used for artwork + */ + public Builder artOffset(Optional artOffset) { + Utils.checkNotNull(artOffset, "artOffset"); + this.artOffset = artOffset; + return this; + } + + public AnalyzeMetadataRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AnalyzeMetadataRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + thumbOffset, artOffset); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataRequestBuilder.java new file mode 100644 index 00000000..88c0a2f6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.AnalyzeMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AnalyzeMetadataRequestBuilder { + + private AnalyzeMetadataRequest request; + private final SDKConfiguration sdkConfiguration; + + public AnalyzeMetadataRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AnalyzeMetadataRequestBuilder request(AnalyzeMetadataRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AnalyzeMetadataResponse call() throws Exception { + + RequestOperation operation + = new AnalyzeMetadata.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataResponse.java new file mode 100644 index 00000000..ce99d9f6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AnalyzeMetadataResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class AnalyzeMetadataResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public AnalyzeMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AnalyzeMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AnalyzeMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AnalyzeMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyzeMetadataResponse other = (AnalyzeMetadataResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(AnalyzeMetadataResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public AnalyzeMetadataResponse build() { + + return new AnalyzeMetadataResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesRequest.java index e6c6b692..03306833 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesRequest.java @@ -5,6 +5,10 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.SpeakeasyMetadata; import dev.plexapi.sdk.utils.Utils; import java.lang.Override; @@ -15,47 +19,239 @@ import java.util.Optional; public class ApplyUpdatesRequest { /** - * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + * Indicates the client accepts the indicated media types */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=tonight") - private Optional tonight; + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; /** - * Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install immediately. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=tonight") + private Optional tonight; + + /** + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=skip") - private Optional skip; + private Optional skip; @JsonCreator public ApplyUpdatesRequest( - Optional tonight, - Optional skip) { + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional tonight, + Optional skip) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); Utils.checkNotNull(tonight, "tonight"); Utils.checkNotNull(skip, "skip"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; this.tonight = tonight; this.skip = skip; } public ApplyUpdatesRequest() { - this(Optional.empty(), Optional.empty()); + 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()); } /** - * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + * Indicates the client accepts the indicated media types */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional tonight() { - return (Optional) tonight; + public Optional accepts() { + return (Optional) accepts; } /** - * Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install immediately. */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional skip() { - return (Optional) skip; + public Optional tonight() { + return (Optional) tonight; + } + + /** + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional skip() { + return (Optional) skip; } public static Builder builder() { @@ -64,9 +260,218 @@ public class ApplyUpdatesRequest { /** - * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + * Indicates the client accepts the indicated media types */ - public ApplyUpdatesRequest withTonight(Tonight tonight) { + public ApplyUpdatesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ApplyUpdatesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ApplyUpdatesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ApplyUpdatesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ApplyUpdatesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ApplyUpdatesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ApplyUpdatesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ApplyUpdatesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ApplyUpdatesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ApplyUpdatesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ApplyUpdatesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ApplyUpdatesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ApplyUpdatesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ApplyUpdatesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ApplyUpdatesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ApplyUpdatesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ApplyUpdatesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ApplyUpdatesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ApplyUpdatesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ApplyUpdatesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ApplyUpdatesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ApplyUpdatesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install immediately. + */ + public ApplyUpdatesRequest withTonight(BoolInt tonight) { Utils.checkNotNull(tonight, "tonight"); this.tonight = Optional.ofNullable(tonight); return this; @@ -74,18 +479,18 @@ public class ApplyUpdatesRequest { /** - * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install immediately. */ - public ApplyUpdatesRequest withTonight(Optional tonight) { + public ApplyUpdatesRequest withTonight(Optional tonight) { Utils.checkNotNull(tonight, "tonight"); this.tonight = tonight; return this; } /** - * Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. */ - public ApplyUpdatesRequest withSkip(Skip skip) { + public ApplyUpdatesRequest withSkip(BoolInt skip) { Utils.checkNotNull(skip, "skip"); this.skip = Optional.ofNullable(skip); return this; @@ -93,9 +498,9 @@ public class ApplyUpdatesRequest { /** - * Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. */ - public ApplyUpdatesRequest withSkip(Optional skip) { + public ApplyUpdatesRequest withSkip(Optional skip) { Utils.checkNotNull(skip, "skip"); this.skip = skip; return this; @@ -111,6 +516,17 @@ public class ApplyUpdatesRequest { } ApplyUpdatesRequest other = (ApplyUpdatesRequest) o; return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && Utils.enhancedDeepEquals(this.tonight, other.tonight) && Utils.enhancedDeepEquals(this.skip, other.skip); } @@ -118,12 +534,27 @@ public class ApplyUpdatesRequest { @Override public int hashCode() { return Utils.enhancedHash( - tonight, skip); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, tonight, + skip); } @Override public String toString() { return Utils.toString(ApplyUpdatesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, "tonight", tonight, "skip", skip); } @@ -131,9 +562,31 @@ public class ApplyUpdatesRequest { @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional tonight = Optional.empty(); + private Optional accepts; - private Optional skip = Optional.empty(); + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional tonight = Optional.empty(); + + private Optional skip = Optional.empty(); private Builder() { // force use of static builder() method @@ -141,18 +594,227 @@ public class ApplyUpdatesRequest { /** - * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + * Indicates the client accepts the indicated media types */ - public Builder tonight(Tonight tonight) { + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install immediately. + */ + public Builder tonight(BoolInt tonight) { Utils.checkNotNull(tonight, "tonight"); this.tonight = Optional.ofNullable(tonight); return this; } /** - * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install immediately. */ - public Builder tonight(Optional tonight) { + public Builder tonight(Optional tonight) { Utils.checkNotNull(tonight, "tonight"); this.tonight = tonight; return this; @@ -160,28 +822,41 @@ public class ApplyUpdatesRequest { /** - * Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. */ - public Builder skip(Skip skip) { + public Builder skip(BoolInt skip) { Utils.checkNotNull(skip, "skip"); this.skip = Optional.ofNullable(skip); return this; } /** - * Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. + * Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. */ - public Builder skip(Optional skip) { + public Builder skip(Optional skip) { Utils.checkNotNull(skip, "skip"); this.skip = skip; return this; } public ApplyUpdatesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } return new ApplyUpdatesRequest( - tonight, skip); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, tonight, + skip); } + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesRequestBuilder.java index 3dc4870c..752ec7cd 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/ApplyUpdatesRequestBuilder.java @@ -9,56 +9,26 @@ import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.operations.ApplyUpdates; import dev.plexapi.sdk.utils.Utils; import java.lang.Exception; -import java.util.Optional; public class ApplyUpdatesRequestBuilder { - private Optional tonight = Optional.empty(); - private Optional skip = Optional.empty(); + private ApplyUpdatesRequest request; private final SDKConfiguration sdkConfiguration; public ApplyUpdatesRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - - public ApplyUpdatesRequestBuilder tonight(Tonight tonight) { - Utils.checkNotNull(tonight, "tonight"); - this.tonight = Optional.of(tonight); + + public ApplyUpdatesRequestBuilder request(ApplyUpdatesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - public ApplyUpdatesRequestBuilder tonight(Optional tonight) { - Utils.checkNotNull(tonight, "tonight"); - this.tonight = tonight; - return this; - } - - public ApplyUpdatesRequestBuilder skip(Skip skip) { - Utils.checkNotNull(skip, "skip"); - this.skip = Optional.of(skip); - return this; - } - - public ApplyUpdatesRequestBuilder skip(Optional skip) { - Utils.checkNotNull(skip, "skip"); - this.skip = skip; - return this; - } - - - private ApplyUpdatesRequest buildRequest() { - - ApplyUpdatesRequest request = new ApplyUpdatesRequest(tonight, - skip); - - return request; - } - public ApplyUpdatesResponse call() throws Exception { RequestOperation operation = new ApplyUpdates.Sync(sdkConfiguration); - ApplyUpdatesRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Args.java b/src/main/java/dev/plexapi/sdk/models/operations/Args.java new file mode 100644 index 00000000..1304f02a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Args.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * Args + * + *

The new values for the metadata item + */ +public class Args { + @JsonCreator + public Args() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(Args.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public Args build() { + + return new Args( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Attributes.java b/src/main/java/dev/plexapi/sdk/models/operations/Attributes.java index e5b6a1ae..29abfd12 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Attributes.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Attributes.java @@ -4,64 +4,18 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; import java.lang.Override; import java.lang.String; -import java.util.Optional; /** * Attributes * - *

Attributes associated with the marker. + *

The attributes to assign to this marker */ public class Attributes { - /** - * The identifier for the attributes. - */ - @JsonProperty("id") - private long id; - - /** - * The version number of the marker attributes. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("version") - private Optional version; - @JsonCreator - public Attributes( - @JsonProperty("id") long id, - @JsonProperty("version") Optional version) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(version, "version"); - this.id = id; - this.version = version; - } - - public Attributes( - long id) { - this(id, Optional.empty()); - } - - /** - * The identifier for the attributes. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * The version number of the marker attributes. - */ - @JsonIgnore - public Optional version() { - return version; + public Attributes() { } public static Builder builder() { @@ -69,34 +23,6 @@ public class Attributes { } - /** - * The identifier for the attributes. - */ - public Attributes withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The version number of the marker attributes. - */ - public Attributes withVersion(long version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - - /** - * The version number of the marker attributes. - */ - public Attributes withVersion(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -105,69 +31,31 @@ public class Attributes { if (o == null || getClass() != o.getClass()) { return false; } - Attributes other = (Attributes) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.version, other.version); + return true; } @Override public int hashCode() { return Utils.enhancedHash( - id, version); + ); } @Override public String toString() { - return Utils.toString(Attributes.class, - "id", id, - "version", version); + return Utils.toString(Attributes.class); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Long id; - - private Optional version = Optional.empty(); - private Builder() { // force use of static builder() method } - - /** - * The identifier for the attributes. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The version number of the marker attributes. - */ - public Builder version(long version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - /** - * The version number of the marker attributes. - */ - public Builder version(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - public Attributes build() { return new Attributes( - id, version); + ); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AutoSelectSubtitle.java b/src/main/java/dev/plexapi/sdk/models/operations/AutoSelectSubtitle.java deleted file mode 100644 index e42d9885..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/AutoSelectSubtitle.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * AutoSelectSubtitle - * - *

The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - */ -public enum AutoSelectSubtitle { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - AutoSelectSubtitle(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (AutoSelectSubtitle o: AutoSelectSubtitle.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AutocompleteRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/AutocompleteRequest.java new file mode 100644 index 00000000..fddfd209 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AutocompleteRequest.java @@ -0,0 +1,962 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.MediaQuery; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class AutocompleteRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * Item type + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + /** + * The "field" stands in for any field, the value is a partial string for matching + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=field.query") + private Optional fieldQuery; + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaQuery") + private Optional mediaQuery; + + @JsonCreator + public AutocompleteRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + Optional type, + Optional fieldQuery, + Optional mediaQuery) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(fieldQuery, "fieldQuery"); + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.type = type; + this.fieldQuery = fieldQuery; + this.mediaQuery = mediaQuery; + } + + public AutocompleteRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * Item type + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * The "field" stands in for any field, the value is a partial string for matching + */ + @JsonIgnore + public Optional fieldQuery() { + return fieldQuery; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaQuery() { + return (Optional) mediaQuery; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AutocompleteRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public AutocompleteRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public AutocompleteRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public AutocompleteRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public AutocompleteRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public AutocompleteRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public AutocompleteRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public AutocompleteRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public AutocompleteRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public AutocompleteRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public AutocompleteRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public AutocompleteRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public AutocompleteRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public AutocompleteRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public AutocompleteRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public AutocompleteRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public AutocompleteRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public AutocompleteRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public AutocompleteRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public AutocompleteRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public AutocompleteRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public AutocompleteRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public AutocompleteRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Item type + */ + public AutocompleteRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * Item type + */ + public AutocompleteRequest withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The "field" stands in for any field, the value is a partial string for matching + */ + public AutocompleteRequest withFieldQuery(String fieldQuery) { + Utils.checkNotNull(fieldQuery, "fieldQuery"); + this.fieldQuery = Optional.ofNullable(fieldQuery); + return this; + } + + + /** + * The "field" stands in for any field, the value is a partial string for matching + */ + public AutocompleteRequest withFieldQuery(Optional fieldQuery) { + Utils.checkNotNull(fieldQuery, "fieldQuery"); + this.fieldQuery = fieldQuery; + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public AutocompleteRequest withMediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public AutocompleteRequest withMediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutocompleteRequest other = (AutocompleteRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.fieldQuery, other.fieldQuery) && + Utils.enhancedDeepEquals(this.mediaQuery, other.mediaQuery); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + type, fieldQuery, mediaQuery); + } + + @Override + public String toString() { + return Utils.toString(AutocompleteRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "type", type, + "fieldQuery", fieldQuery, + "mediaQuery", mediaQuery); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Optional type = Optional.empty(); + + private Optional fieldQuery = Optional.empty(); + + private Optional mediaQuery = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * Item type + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Item type + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The "field" stands in for any field, the value is a partial string for matching + */ + public Builder fieldQuery(String fieldQuery) { + Utils.checkNotNull(fieldQuery, "fieldQuery"); + this.fieldQuery = Optional.ofNullable(fieldQuery); + return this; + } + + /** + * The "field" stands in for any field, the value is a partial string for matching + */ + public Builder fieldQuery(Optional fieldQuery) { + Utils.checkNotNull(fieldQuery, "fieldQuery"); + this.fieldQuery = fieldQuery; + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + public AutocompleteRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new AutocompleteRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + type, fieldQuery, mediaQuery); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AutocompleteRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/AutocompleteRequestBuilder.java new file mode 100644 index 00000000..5821abe4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AutocompleteRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.Autocomplete; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class AutocompleteRequestBuilder { + + private AutocompleteRequest request; + private final SDKConfiguration sdkConfiguration; + + public AutocompleteRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AutocompleteRequestBuilder request(AutocompleteRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AutocompleteResponse call() throws Exception { + + RequestOperation operation + = new Autocomplete.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/AutocompleteResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/AutocompleteResponse.java new file mode 100644 index 00000000..3d827ef4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/AutocompleteResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class AutocompleteResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public AutocompleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public AutocompleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AutocompleteResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AutocompleteResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AutocompleteResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AutocompleteResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public AutocompleteResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public AutocompleteResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutocompleteResponse other = (AutocompleteResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(AutocompleteResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public AutocompleteResponse build() { + + return new AutocompleteResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Bandwidth.java b/src/main/java/dev/plexapi/sdk/models/operations/Bandwidth.java new file mode 100644 index 00000000..f0b9c471 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Bandwidth.java @@ -0,0 +1,249 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class Bandwidth { + /** + * The bandwidth at this time in kbps + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bandwidth") + private Optional bandwidth; + + /** + * The user-friendly resolution at this time + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("resolution") + private Optional resolution; + + /** + * Media playback time where this bandwidth started + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("time") + private Optional time; + + @JsonCreator + public Bandwidth( + @JsonProperty("bandwidth") Optional bandwidth, + @JsonProperty("resolution") Optional resolution, + @JsonProperty("time") Optional time) { + Utils.checkNotNull(bandwidth, "bandwidth"); + Utils.checkNotNull(resolution, "resolution"); + Utils.checkNotNull(time, "time"); + this.bandwidth = bandwidth; + this.resolution = resolution; + this.time = time; + } + + public Bandwidth() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The bandwidth at this time in kbps + */ + @JsonIgnore + public Optional bandwidth() { + return bandwidth; + } + + /** + * The user-friendly resolution at this time + */ + @JsonIgnore + public Optional resolution() { + return resolution; + } + + /** + * Media playback time where this bandwidth started + */ + @JsonIgnore + public Optional time() { + return time; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The bandwidth at this time in kbps + */ + public Bandwidth withBandwidth(long bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = Optional.ofNullable(bandwidth); + return this; + } + + + /** + * The bandwidth at this time in kbps + */ + public Bandwidth withBandwidth(Optional bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + return this; + } + + /** + * The user-friendly resolution at this time + */ + public Bandwidth withResolution(String resolution) { + Utils.checkNotNull(resolution, "resolution"); + this.resolution = Optional.ofNullable(resolution); + return this; + } + + + /** + * The user-friendly resolution at this time + */ + public Bandwidth withResolution(Optional resolution) { + Utils.checkNotNull(resolution, "resolution"); + this.resolution = resolution; + return this; + } + + /** + * Media playback time where this bandwidth started + */ + public Bandwidth withTime(long time) { + Utils.checkNotNull(time, "time"); + this.time = Optional.ofNullable(time); + return this; + } + + + /** + * Media playback time where this bandwidth started + */ + public Bandwidth withTime(Optional time) { + Utils.checkNotNull(time, "time"); + this.time = time; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Bandwidth other = (Bandwidth) o; + return + Utils.enhancedDeepEquals(this.bandwidth, other.bandwidth) && + Utils.enhancedDeepEquals(this.resolution, other.resolution) && + Utils.enhancedDeepEquals(this.time, other.time); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + bandwidth, resolution, time); + } + + @Override + public String toString() { + return Utils.toString(Bandwidth.class, + "bandwidth", bandwidth, + "resolution", resolution, + "time", time); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional bandwidth = Optional.empty(); + + private Optional resolution = Optional.empty(); + + private Optional time = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The bandwidth at this time in kbps + */ + public Builder bandwidth(long bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = Optional.ofNullable(bandwidth); + return this; + } + + /** + * The bandwidth at this time in kbps + */ + public Builder bandwidth(Optional bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + return this; + } + + + /** + * The user-friendly resolution at this time + */ + public Builder resolution(String resolution) { + Utils.checkNotNull(resolution, "resolution"); + this.resolution = Optional.ofNullable(resolution); + return this; + } + + /** + * The user-friendly resolution at this time + */ + public Builder resolution(Optional resolution) { + Utils.checkNotNull(resolution, "resolution"); + this.resolution = resolution; + return this; + } + + + /** + * Media playback time where this bandwidth started + */ + public Builder time(long time) { + Utils.checkNotNull(time, "time"); + this.time = Optional.ofNullable(time); + return this; + } + + /** + * Media playback time where this bandwidth started + */ + public Builder time(Optional time) { + Utils.checkNotNull(time, "time"); + this.time = time; + return this; + } + + public Bandwidth build() { + + return new Bandwidth( + bandwidth, resolution, time); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Bandwidths.java b/src/main/java/dev/plexapi/sdk/models/operations/Bandwidths.java new file mode 100644 index 00000000..c136d8d1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Bandwidths.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.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.Optional; + +/** + * Bandwidths + * + *

A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth + */ +public class Bandwidths { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Bandwidth") + private Optional> bandwidth; + + @JsonCreator + public Bandwidths( + @JsonProperty("Bandwidth") Optional> bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + } + + public Bandwidths() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> bandwidth() { + return (Optional>) bandwidth; + } + + public static Builder builder() { + return new Builder(); + } + + + public Bandwidths withBandwidth(List bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = Optional.ofNullable(bandwidth); + return this; + } + + + public Bandwidths withBandwidth(Optional> bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Bandwidths other = (Bandwidths) o; + return + Utils.enhancedDeepEquals(this.bandwidth, other.bandwidth); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + bandwidth); + } + + @Override + public String toString() { + return Utils.toString(Bandwidths.class, + "bandwidth", bandwidth); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> bandwidth = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder bandwidth(List bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = Optional.ofNullable(bandwidth); + return this; + } + + public Builder bandwidth(Optional> bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + return this; + } + + public Bandwidths build() { + + return new Bandwidths( + bandwidth); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Billing.java b/src/main/java/dev/plexapi/sdk/models/operations/Billing.java deleted file mode 100644 index c08bed1e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Billing.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Billing { - - @JsonProperty("internalPaymentMethod") - private InternalPaymentMethod internalPaymentMethod; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("paymentMethodId") - private Optional paymentMethodId; - - @JsonCreator - public Billing( - @JsonProperty("internalPaymentMethod") InternalPaymentMethod internalPaymentMethod, - @JsonProperty("paymentMethodId") Optional paymentMethodId) { - Utils.checkNotNull(internalPaymentMethod, "internalPaymentMethod"); - Utils.checkNotNull(paymentMethodId, "paymentMethodId"); - this.internalPaymentMethod = internalPaymentMethod; - this.paymentMethodId = paymentMethodId; - } - - public Billing( - InternalPaymentMethod internalPaymentMethod) { - this(internalPaymentMethod, Optional.empty()); - } - - @JsonIgnore - public InternalPaymentMethod internalPaymentMethod() { - return internalPaymentMethod; - } - - @JsonIgnore - public Optional paymentMethodId() { - return paymentMethodId; - } - - public static Builder builder() { - return new Builder(); - } - - - public Billing withInternalPaymentMethod(InternalPaymentMethod internalPaymentMethod) { - Utils.checkNotNull(internalPaymentMethod, "internalPaymentMethod"); - this.internalPaymentMethod = internalPaymentMethod; - return this; - } - - public Billing withPaymentMethodId(long paymentMethodId) { - Utils.checkNotNull(paymentMethodId, "paymentMethodId"); - this.paymentMethodId = Optional.ofNullable(paymentMethodId); - return this; - } - - - public Billing withPaymentMethodId(Optional paymentMethodId) { - Utils.checkNotNull(paymentMethodId, "paymentMethodId"); - this.paymentMethodId = paymentMethodId; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Billing other = (Billing) o; - return - Utils.enhancedDeepEquals(this.internalPaymentMethod, other.internalPaymentMethod) && - Utils.enhancedDeepEquals(this.paymentMethodId, other.paymentMethodId); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - internalPaymentMethod, paymentMethodId); - } - - @Override - public String toString() { - return Utils.toString(Billing.class, - "internalPaymentMethod", internalPaymentMethod, - "paymentMethodId", paymentMethodId); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private InternalPaymentMethod internalPaymentMethod; - - private Optional paymentMethodId = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder internalPaymentMethod(InternalPaymentMethod internalPaymentMethod) { - Utils.checkNotNull(internalPaymentMethod, "internalPaymentMethod"); - this.internalPaymentMethod = internalPaymentMethod; - return this; - } - - - public Builder paymentMethodId(long paymentMethodId) { - Utils.checkNotNull(paymentMethodId, "paymentMethodId"); - this.paymentMethodId = Optional.ofNullable(paymentMethodId); - return this; - } - - public Builder paymentMethodId(Optional paymentMethodId) { - Utils.checkNotNull(paymentMethodId, "paymentMethodId"); - this.paymentMethodId = paymentMethodId; - return this; - } - - public Billing build() { - - return new Billing( - internalPaymentMethod, paymentMethodId); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ButlerTask.java b/src/main/java/dev/plexapi/sdk/models/operations/ButlerTask.java index 6f7cbec0..586c23ed 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/ButlerTask.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/ButlerTask.java @@ -10,63 +10,75 @@ 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.Optional; public class ButlerTask { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("name") - private Optional name; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("interval") - private Optional interval; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("scheduleRandomized") - private Optional scheduleRandomized; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("enabled") - private Optional enabled; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - + /** + * A user-friendly description of the task + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("description") private Optional description; + /** + * Whether this task is enabled or not + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("enabled") + private Optional enabled; + + /** + * The interval (in days) of when this task is run. A value of 1 is run every day, 7 is every week, etc. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("interval") + private Optional interval; + + /** + * The name of the task + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + /** + * Indicates whether the timing of the task is randomized within the butler interval + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scheduleRandomized") + private Optional scheduleRandomized; + + /** + * A user-friendly title of the task + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + @JsonCreator public ButlerTask( - @JsonProperty("name") Optional name, - @JsonProperty("interval") Optional interval, - @JsonProperty("scheduleRandomized") Optional scheduleRandomized, + @JsonProperty("description") Optional description, @JsonProperty("enabled") Optional enabled, - @JsonProperty("title") Optional title, - @JsonProperty("description") Optional description) { - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(interval, "interval"); - Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); - Utils.checkNotNull(enabled, "enabled"); - Utils.checkNotNull(title, "title"); + @JsonProperty("interval") Optional interval, + @JsonProperty("name") Optional name, + @JsonProperty("scheduleRandomized") Optional scheduleRandomized, + @JsonProperty("title") Optional title) { Utils.checkNotNull(description, "description"); - this.name = name; - this.interval = interval; - this.scheduleRandomized = scheduleRandomized; - this.enabled = enabled; - this.title = title; + Utils.checkNotNull(enabled, "enabled"); + Utils.checkNotNull(interval, "interval"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); + Utils.checkNotNull(title, "title"); this.description = description; + this.enabled = enabled; + this.interval = interval; + this.name = name; + this.scheduleRandomized = scheduleRandomized; + this.title = title; } public ButlerTask() { @@ -74,106 +86,62 @@ public class ButlerTask { Optional.empty(), Optional.empty(), Optional.empty()); } + /** + * A user-friendly description of the task + */ @JsonIgnore - public Optional name() { - return name; - } - - @JsonIgnore - public Optional interval() { - return interval; - } - - @JsonIgnore - public Optional scheduleRandomized() { - return scheduleRandomized; + public Optional description() { + return description; } + /** + * Whether this task is enabled or not + */ @JsonIgnore public Optional enabled() { return enabled; } + /** + * The interval (in days) of when this task is run. A value of 1 is run every day, 7 is every week, etc. + */ + @JsonIgnore + public Optional interval() { + return interval; + } + + /** + * The name of the task + */ + @JsonIgnore + public Optional name() { + return name; + } + + /** + * Indicates whether the timing of the task is randomized within the butler interval + */ + @JsonIgnore + public Optional scheduleRandomized() { + return scheduleRandomized; + } + + /** + * A user-friendly title of the task + */ @JsonIgnore public Optional title() { return title; } - @JsonIgnore - public Optional description() { - return description; - } - public static Builder builder() { return new Builder(); } - public ButlerTask withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - - public ButlerTask withName(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public ButlerTask withInterval(double interval) { - Utils.checkNotNull(interval, "interval"); - this.interval = Optional.ofNullable(interval); - return this; - } - - - public ButlerTask withInterval(Optional interval) { - Utils.checkNotNull(interval, "interval"); - this.interval = interval; - return this; - } - - public ButlerTask withScheduleRandomized(boolean scheduleRandomized) { - Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); - this.scheduleRandomized = Optional.ofNullable(scheduleRandomized); - return this; - } - - - public ButlerTask withScheduleRandomized(Optional scheduleRandomized) { - Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); - this.scheduleRandomized = scheduleRandomized; - return this; - } - - public ButlerTask withEnabled(boolean enabled) { - Utils.checkNotNull(enabled, "enabled"); - this.enabled = Optional.ofNullable(enabled); - return this; - } - - - public ButlerTask withEnabled(Optional enabled) { - Utils.checkNotNull(enabled, "enabled"); - this.enabled = enabled; - return this; - } - - public ButlerTask withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public ButlerTask withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - + /** + * A user-friendly description of the task + */ public ButlerTask withDescription(String description) { Utils.checkNotNull(description, "description"); this.description = Optional.ofNullable(description); @@ -181,12 +149,110 @@ public class ButlerTask { } + /** + * A user-friendly description of the task + */ public ButlerTask withDescription(Optional description) { Utils.checkNotNull(description, "description"); this.description = description; return this; } + /** + * Whether this task is enabled or not + */ + public ButlerTask withEnabled(boolean enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = Optional.ofNullable(enabled); + return this; + } + + + /** + * Whether this task is enabled or not + */ + public ButlerTask withEnabled(Optional enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = enabled; + return this; + } + + /** + * The interval (in days) of when this task is run. A value of 1 is run every day, 7 is every week, etc. + */ + public ButlerTask withInterval(long interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = Optional.ofNullable(interval); + return this; + } + + + /** + * The interval (in days) of when this task is run. A value of 1 is run every day, 7 is every week, etc. + */ + public ButlerTask withInterval(Optional interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = interval; + return this; + } + + /** + * The name of the task + */ + public ButlerTask withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * The name of the task + */ + public ButlerTask withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * Indicates whether the timing of the task is randomized within the butler interval + */ + public ButlerTask withScheduleRandomized(boolean scheduleRandomized) { + Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); + this.scheduleRandomized = Optional.ofNullable(scheduleRandomized); + return this; + } + + + /** + * Indicates whether the timing of the task is randomized within the butler interval + */ + public ButlerTask withScheduleRandomized(Optional scheduleRandomized) { + Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); + this.scheduleRandomized = scheduleRandomized; + return this; + } + + /** + * A user-friendly title of the task + */ + public ButlerTask withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * A user-friendly title of the task + */ + public ButlerTask withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -197,97 +263,83 @@ public class ButlerTask { } ButlerTask other = (ButlerTask) o; return - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.interval, other.interval) && - Utils.enhancedDeepEquals(this.scheduleRandomized, other.scheduleRandomized) && + Utils.enhancedDeepEquals(this.description, other.description) && Utils.enhancedDeepEquals(this.enabled, other.enabled) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.description, other.description); + Utils.enhancedDeepEquals(this.interval, other.interval) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.scheduleRandomized, other.scheduleRandomized) && + Utils.enhancedDeepEquals(this.title, other.title); } @Override public int hashCode() { return Utils.enhancedHash( - name, interval, scheduleRandomized, - enabled, title, description); + description, enabled, interval, + name, scheduleRandomized, title); } @Override public String toString() { return Utils.toString(ButlerTask.class, - "name", name, - "interval", interval, - "scheduleRandomized", scheduleRandomized, + "description", description, "enabled", enabled, - "title", title, - "description", description); + "interval", interval, + "name", name, + "scheduleRandomized", scheduleRandomized, + "title", title); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional name = Optional.empty(); - - private Optional interval = Optional.empty(); - - private Optional scheduleRandomized = Optional.empty(); + private Optional description = Optional.empty(); private Optional enabled = Optional.empty(); - private Optional title = Optional.empty(); + private Optional interval = Optional.empty(); - private Optional description = Optional.empty(); + private Optional name = Optional.empty(); + + private Optional scheduleRandomized = Optional.empty(); + + private Optional title = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder name(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); + /** + * A user-friendly description of the task + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = Optional.ofNullable(description); return this; } - public Builder name(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder interval(double interval) { - Utils.checkNotNull(interval, "interval"); - this.interval = Optional.ofNullable(interval); - return this; - } - - public Builder interval(Optional interval) { - Utils.checkNotNull(interval, "interval"); - this.interval = interval; - return this; - } - - - public Builder scheduleRandomized(boolean scheduleRandomized) { - Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); - this.scheduleRandomized = Optional.ofNullable(scheduleRandomized); - return this; - } - - public Builder scheduleRandomized(Optional scheduleRandomized) { - Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); - this.scheduleRandomized = scheduleRandomized; + /** + * A user-friendly description of the task + */ + public Builder description(Optional description) { + Utils.checkNotNull(description, "description"); + this.description = description; return this; } + /** + * Whether this task is enabled or not + */ public Builder enabled(boolean enabled) { Utils.checkNotNull(enabled, "enabled"); this.enabled = Optional.ofNullable(enabled); return this; } + /** + * Whether this task is enabled or not + */ public Builder enabled(Optional enabled) { Utils.checkNotNull(enabled, "enabled"); this.enabled = enabled; @@ -295,36 +347,86 @@ public class ButlerTask { } + /** + * The interval (in days) of when this task is run. A value of 1 is run every day, 7 is every week, etc. + */ + public Builder interval(long interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = Optional.ofNullable(interval); + return this; + } + + /** + * The interval (in days) of when this task is run. A value of 1 is run every day, 7 is every week, etc. + */ + public Builder interval(Optional interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = interval; + return this; + } + + + /** + * The name of the task + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * The name of the task + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + /** + * Indicates whether the timing of the task is randomized within the butler interval + */ + public Builder scheduleRandomized(boolean scheduleRandomized) { + Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); + this.scheduleRandomized = Optional.ofNullable(scheduleRandomized); + return this; + } + + /** + * Indicates whether the timing of the task is randomized within the butler interval + */ + public Builder scheduleRandomized(Optional scheduleRandomized) { + Utils.checkNotNull(scheduleRandomized, "scheduleRandomized"); + this.scheduleRandomized = scheduleRandomized; + return this; + } + + + /** + * A user-friendly title of the task + */ public Builder title(String title) { Utils.checkNotNull(title, "title"); this.title = Optional.ofNullable(title); return this; } + /** + * A user-friendly title of the task + */ public Builder title(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } - - public Builder description(String description) { - Utils.checkNotNull(description, "description"); - this.description = Optional.ofNullable(description); - return this; - } - - public Builder description(Optional description) { - Utils.checkNotNull(description, "description"); - this.description = description; - return this; - } - public ButlerTask build() { return new ButlerTask( - name, interval, scheduleRandomized, - enabled, title, description); + description, enabled, interval, + name, scheduleRandomized, title); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelActivityRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelActivityRequest.java new file mode 100644 index 00000000..300a43bb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CancelActivityRequest.java @@ -0,0 +1,779 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class CancelActivityRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The UUID of the activity to cancel. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=activityId") + private String activityId; + + @JsonCreator + public CancelActivityRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String activityId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(activityId, "activityId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.activityId = activityId; + } + + public CancelActivityRequest( + String activityId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), activityId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The UUID of the activity to cancel. + */ + @JsonIgnore + public String activityId() { + return activityId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CancelActivityRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CancelActivityRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public CancelActivityRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CancelActivityRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public CancelActivityRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CancelActivityRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public CancelActivityRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CancelActivityRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CancelActivityRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CancelActivityRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CancelActivityRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CancelActivityRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CancelActivityRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CancelActivityRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CancelActivityRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CancelActivityRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CancelActivityRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CancelActivityRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CancelActivityRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CancelActivityRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CancelActivityRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CancelActivityRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The UUID of the activity to cancel. + */ + public CancelActivityRequest withActivityId(String activityId) { + Utils.checkNotNull(activityId, "activityId"); + this.activityId = activityId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelActivityRequest other = (CancelActivityRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.activityId, other.activityId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, activityId); + } + + @Override + public String toString() { + return Utils.toString(CancelActivityRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "activityId", activityId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String activityId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The UUID of the activity to cancel. + */ + public Builder activityId(String activityId) { + Utils.checkNotNull(activityId, "activityId"); + this.activityId = activityId; + return this; + } + + public CancelActivityRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new CancelActivityRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, activityId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelActivityRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelActivityRequestBuilder.java new file mode 100644 index 00000000..08781655 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CancelActivityRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CancelActivity; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class CancelActivityRequestBuilder { + + private CancelActivityRequest request; + private final SDKConfiguration sdkConfiguration; + + public CancelActivityRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CancelActivityRequestBuilder request(CancelActivityRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CancelActivityResponse call() throws Exception { + + RequestOperation operation + = new CancelActivity.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelActivityResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelActivityResponse.java new file mode 100644 index 00000000..087f9ee8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CancelActivityResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CancelActivityResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CancelActivityResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CancelActivityResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CancelActivityResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CancelActivityResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelActivityResponse other = (CancelActivityResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CancelActivityResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CancelActivityResponse build() { + + return new CancelActivityResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelGrabRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelGrabRequest.java new file mode 100644 index 00000000..5162ad3f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CancelGrabRequest.java @@ -0,0 +1,779 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class CancelGrabRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the operation. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=operationId") + private String operationId; + + @JsonCreator + public CancelGrabRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String operationId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(operationId, "operationId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.operationId = operationId; + } + + public CancelGrabRequest( + String operationId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), operationId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the operation. + */ + @JsonIgnore + public String operationId() { + return operationId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CancelGrabRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CancelGrabRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public CancelGrabRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CancelGrabRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public CancelGrabRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CancelGrabRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public CancelGrabRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CancelGrabRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CancelGrabRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CancelGrabRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CancelGrabRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CancelGrabRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CancelGrabRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CancelGrabRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CancelGrabRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CancelGrabRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CancelGrabRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CancelGrabRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CancelGrabRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CancelGrabRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CancelGrabRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CancelGrabRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the operation. + */ + public CancelGrabRequest withOperationId(String operationId) { + Utils.checkNotNull(operationId, "operationId"); + this.operationId = operationId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelGrabRequest other = (CancelGrabRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.operationId, other.operationId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, operationId); + } + + @Override + public String toString() { + return Utils.toString(CancelGrabRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "operationId", operationId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String operationId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the operation. + */ + public Builder operationId(String operationId) { + Utils.checkNotNull(operationId, "operationId"); + this.operationId = operationId; + return this; + } + + public CancelGrabRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new CancelGrabRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, operationId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelGrabRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelGrabRequestBuilder.java new file mode 100644 index 00000000..9f3df6dc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CancelGrabRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CancelGrab; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class CancelGrabRequestBuilder { + + private CancelGrabRequest request; + private final SDKConfiguration sdkConfiguration; + + public CancelGrabRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CancelGrabRequestBuilder request(CancelGrabRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CancelGrabResponse call() throws Exception { + + RequestOperation operation + = new CancelGrab.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelGrabResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelGrabResponse.java new file mode 100644 index 00000000..f39f5693 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CancelGrabResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CancelGrabResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CancelGrabResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CancelGrabResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CancelGrabResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CancelGrabResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelGrabResponse other = (CancelGrabResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CancelGrabResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CancelGrabResponse build() { + + return new CancelGrabResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshRequest.java new file mode 100644 index 00000000..d097ddba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class CancelRefreshRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public CancelRefreshRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public CancelRefreshRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CancelRefreshRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CancelRefreshRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public CancelRefreshRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CancelRefreshRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public CancelRefreshRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CancelRefreshRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public CancelRefreshRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CancelRefreshRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CancelRefreshRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CancelRefreshRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CancelRefreshRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CancelRefreshRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CancelRefreshRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CancelRefreshRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CancelRefreshRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CancelRefreshRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CancelRefreshRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CancelRefreshRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CancelRefreshRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CancelRefreshRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CancelRefreshRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CancelRefreshRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public CancelRefreshRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelRefreshRequest other = (CancelRefreshRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(CancelRefreshRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public CancelRefreshRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new CancelRefreshRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshRequestBuilder.java new file mode 100644 index 00000000..395ae925 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CancelRefresh; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class CancelRefreshRequestBuilder { + + private CancelRefreshRequest request; + private final SDKConfiguration sdkConfiguration; + + public CancelRefreshRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CancelRefreshRequestBuilder request(CancelRefreshRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CancelRefreshResponse call() throws Exception { + + RequestOperation operation + = new CancelRefresh.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshResponse.java new file mode 100644 index 00000000..4f71bb8f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CancelRefreshResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CancelRefreshResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CancelRefreshResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CancelRefreshResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CancelRefreshResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CancelRefreshResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelRefreshResponse other = (CancelRefreshResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CancelRefreshResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CancelRefreshResponse build() { + + return new CancelRefreshResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesRequest.java deleted file mode 100644 index 349df20e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesRequest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class CancelServerActivitiesRequest { - /** - * The UUID of the activity to cancel. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=activityUUID") - private String activityUUID; - - @JsonCreator - public CancelServerActivitiesRequest( - String activityUUID) { - Utils.checkNotNull(activityUUID, "activityUUID"); - this.activityUUID = activityUUID; - } - - /** - * The UUID of the activity to cancel. - */ - @JsonIgnore - public String activityUUID() { - return activityUUID; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The UUID of the activity to cancel. - */ - public CancelServerActivitiesRequest withActivityUUID(String activityUUID) { - Utils.checkNotNull(activityUUID, "activityUUID"); - this.activityUUID = activityUUID; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelServerActivitiesRequest other = (CancelServerActivitiesRequest) o; - return - Utils.enhancedDeepEquals(this.activityUUID, other.activityUUID); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - activityUUID); - } - - @Override - public String toString() { - return Utils.toString(CancelServerActivitiesRequest.class, - "activityUUID", activityUUID); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String activityUUID; - - private Builder() { - // force use of static builder() method - } - - - /** - * The UUID of the activity to cancel. - */ - public Builder activityUUID(String activityUUID) { - Utils.checkNotNull(activityUUID, "activityUUID"); - this.activityUUID = activityUUID; - return this; - } - - public CancelServerActivitiesRequest build() { - - return new CancelServerActivitiesRequest( - activityUUID); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesRequestBuilder.java deleted file mode 100644 index 17ee5d06..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.CancelServerActivities; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; - -public class CancelServerActivitiesRequestBuilder { - - private String activityUUID; - private final SDKConfiguration sdkConfiguration; - - public CancelServerActivitiesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CancelServerActivitiesRequestBuilder activityUUID(String activityUUID) { - Utils.checkNotNull(activityUUID, "activityUUID"); - this.activityUUID = activityUUID; - return this; - } - - - private CancelServerActivitiesRequest buildRequest() { - - CancelServerActivitiesRequest request = new CancelServerActivitiesRequest(activityUUID); - - return request; - } - - public CancelServerActivitiesResponse call() throws Exception { - - RequestOperation operation - = new CancelServerActivities.Sync(sdkConfiguration); - CancelServerActivitiesRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesResponse.java deleted file mode 100644 index 090c8f5b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/CancelServerActivitiesResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class CancelServerActivitiesResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public CancelServerActivitiesResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public CancelServerActivitiesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public CancelServerActivitiesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CancelServerActivitiesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelServerActivitiesResponse other = (CancelServerActivitiesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CancelServerActivitiesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CancelServerActivitiesResponse build() { - - return new CancelServerActivitiesResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ChannelMapping.java b/src/main/java/dev/plexapi/sdk/models/operations/ChannelMapping.java new file mode 100644 index 00000000..eed7daa0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ChannelMapping.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * ChannelMapping + * + *

The mapping of changes, passed as a map of device channel to lineup VCN. + */ +public class ChannelMapping { + @JsonCreator + public ChannelMapping() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(ChannelMapping.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public ChannelMapping build() { + + return new ChannelMapping( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ChannelMappingByKey.java b/src/main/java/dev/plexapi/sdk/models/operations/ChannelMappingByKey.java new file mode 100644 index 00000000..757fee10 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ChannelMappingByKey.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * ChannelMappingByKey + * + *

The mapping of changes, passed as a map of device channel to lineup key. + */ +public class ChannelMappingByKey { + @JsonCreator + public ChannelMappingByKey() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(ChannelMappingByKey.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public ChannelMappingByKey build() { + + return new ChannelMappingByKey( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Chapter.java b/src/main/java/dev/plexapi/sdk/models/operations/Chapter.java deleted file mode 100644 index ee6edba7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Chapter.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; - -/** - * Chapter - * - *

The thumbnail for the chapter - */ -public class Chapter { - - @JsonProperty("id") - private long id; - - - @JsonProperty("filter") - private String filter; - - - @JsonProperty("index") - private long index; - - - @JsonProperty("startTimeOffset") - private long startTimeOffset; - - - @JsonProperty("endTimeOffset") - private long endTimeOffset; - - - @JsonProperty("thumb") - private String thumb; - - @JsonCreator - public Chapter( - @JsonProperty("id") long id, - @JsonProperty("filter") String filter, - @JsonProperty("index") long index, - @JsonProperty("startTimeOffset") long startTimeOffset, - @JsonProperty("endTimeOffset") long endTimeOffset, - @JsonProperty("thumb") String thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.filter = filter; - this.index = index; - this.startTimeOffset = startTimeOffset; - this.endTimeOffset = endTimeOffset; - this.thumb = thumb; - } - - @JsonIgnore - public long id() { - return id; - } - - @JsonIgnore - public String filter() { - return filter; - } - - @JsonIgnore - public long index() { - return index; - } - - @JsonIgnore - public long startTimeOffset() { - return startTimeOffset; - } - - @JsonIgnore - public long endTimeOffset() { - return endTimeOffset; - } - - @JsonIgnore - public String thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - public Chapter withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Chapter withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public Chapter withIndex(long index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public Chapter withStartTimeOffset(long startTimeOffset) { - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - this.startTimeOffset = startTimeOffset; - return this; - } - - public Chapter withEndTimeOffset(long endTimeOffset) { - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - this.endTimeOffset = endTimeOffset; - return this; - } - - public Chapter withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Chapter other = (Chapter) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.startTimeOffset, other.startTimeOffset) && - Utils.enhancedDeepEquals(this.endTimeOffset, other.endTimeOffset) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, index, - startTimeOffset, endTimeOffset, thumb); - } - - @Override - public String toString() { - return Utils.toString(Chapter.class, - "id", id, - "filter", filter, - "index", index, - "startTimeOffset", startTimeOffset, - "endTimeOffset", endTimeOffset, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String filter; - - private Long index; - - private Long startTimeOffset; - - private Long endTimeOffset; - - private String thumb; - - private Builder() { - // force use of static builder() method - } - - - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - public Builder index(long index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - - public Builder startTimeOffset(long startTimeOffset) { - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - this.startTimeOffset = startTimeOffset; - return this; - } - - - public Builder endTimeOffset(long endTimeOffset) { - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - this.endTimeOffset = endTimeOffset; - return this; - } - - - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public Chapter build() { - - return new Chapter( - id, filter, index, - startTimeOffset, endTimeOffset, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesRequest.java deleted file mode 100644 index 73403aa7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesRequest.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class CheckForUpdatesRequest { - /** - * Indicate that you want to start download any updates found. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=download") - private Optional download; - - @JsonCreator - public CheckForUpdatesRequest( - Optional download) { - Utils.checkNotNull(download, "download"); - this.download = download; - } - - public CheckForUpdatesRequest() { - this(Optional.empty()); - } - - /** - * Indicate that you want to start download any updates found. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional download() { - return (Optional) download; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Indicate that you want to start download any updates found. - */ - public CheckForUpdatesRequest withDownload(Download download) { - Utils.checkNotNull(download, "download"); - this.download = Optional.ofNullable(download); - return this; - } - - - /** - * Indicate that you want to start download any updates found. - */ - public CheckForUpdatesRequest withDownload(Optional download) { - Utils.checkNotNull(download, "download"); - this.download = download; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckForUpdatesRequest other = (CheckForUpdatesRequest) o; - return - Utils.enhancedDeepEquals(this.download, other.download); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - download); - } - - @Override - public String toString() { - return Utils.toString(CheckForUpdatesRequest.class, - "download", download); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional download = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Indicate that you want to start download any updates found. - */ - public Builder download(Download download) { - Utils.checkNotNull(download, "download"); - this.download = Optional.ofNullable(download); - return this; - } - - /** - * Indicate that you want to start download any updates found. - */ - public Builder download(Optional download) { - Utils.checkNotNull(download, "download"); - this.download = download; - return this; - } - - public CheckForUpdatesRequest build() { - - return new CheckForUpdatesRequest( - download); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesRequestBuilder.java deleted file mode 100644 index 7c9af06d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesRequestBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.CheckForUpdates; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.Optional; - -public class CheckForUpdatesRequestBuilder { - - private Optional download = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public CheckForUpdatesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CheckForUpdatesRequestBuilder download(Download download) { - Utils.checkNotNull(download, "download"); - this.download = Optional.of(download); - return this; - } - - public CheckForUpdatesRequestBuilder download(Optional download) { - Utils.checkNotNull(download, "download"); - this.download = download; - return this; - } - - - private CheckForUpdatesRequest buildRequest() { - - CheckForUpdatesRequest request = new CheckForUpdatesRequest(download); - - return request; - } - - public CheckForUpdatesResponse call() throws Exception { - - RequestOperation operation - = new CheckForUpdates.Sync(sdkConfiguration); - CheckForUpdatesRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesResponse.java deleted file mode 100644 index 1f2cc6b7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/CheckForUpdatesResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class CheckForUpdatesResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public CheckForUpdatesResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public CheckForUpdatesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public CheckForUpdatesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CheckForUpdatesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckForUpdatesResponse other = (CheckForUpdatesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CheckForUpdatesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CheckForUpdatesResponse build() { - - return new CheckForUpdatesResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesRequest.java new file mode 100644 index 00000000..0c315118 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesRequest.java @@ -0,0 +1,799 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class CheckUpdatesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Indicate that you want to start download any updates found. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=download") + private Optional download; + + @JsonCreator + public CheckUpdatesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional download) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(download, "download"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.download = download; + } + + public CheckUpdatesRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Indicate that you want to start download any updates found. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional download() { + return (Optional) download; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CheckUpdatesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CheckUpdatesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public CheckUpdatesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CheckUpdatesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public CheckUpdatesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CheckUpdatesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public CheckUpdatesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CheckUpdatesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CheckUpdatesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CheckUpdatesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CheckUpdatesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CheckUpdatesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CheckUpdatesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CheckUpdatesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CheckUpdatesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CheckUpdatesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CheckUpdatesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CheckUpdatesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CheckUpdatesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CheckUpdatesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CheckUpdatesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CheckUpdatesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Indicate that you want to start download any updates found. + */ + public CheckUpdatesRequest withDownload(BoolInt download) { + Utils.checkNotNull(download, "download"); + this.download = Optional.ofNullable(download); + return this; + } + + + /** + * Indicate that you want to start download any updates found. + */ + public CheckUpdatesRequest withDownload(Optional download) { + Utils.checkNotNull(download, "download"); + this.download = download; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckUpdatesRequest other = (CheckUpdatesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.download, other.download); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, download); + } + + @Override + public String toString() { + return Utils.toString(CheckUpdatesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "download", download); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional download = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Indicate that you want to start download any updates found. + */ + public Builder download(BoolInt download) { + Utils.checkNotNull(download, "download"); + this.download = Optional.ofNullable(download); + return this; + } + + /** + * Indicate that you want to start download any updates found. + */ + public Builder download(Optional download) { + Utils.checkNotNull(download, "download"); + this.download = download; + return this; + } + + public CheckUpdatesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new CheckUpdatesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, download); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesRequestBuilder.java new file mode 100644 index 00000000..b5e3cbc6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CheckUpdates; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class CheckUpdatesRequestBuilder { + + private CheckUpdatesRequest request; + private final SDKConfiguration sdkConfiguration; + + public CheckUpdatesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CheckUpdatesRequestBuilder request(CheckUpdatesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CheckUpdatesResponse call() throws Exception { + + RequestOperation operation + = new CheckUpdates.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesResponse.java new file mode 100644 index 00000000..2c1c43b7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CheckUpdatesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CheckUpdatesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CheckUpdatesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CheckUpdatesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CheckUpdatesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CheckUpdatesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckUpdatesResponse other = (CheckUpdatesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CheckUpdatesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CheckUpdatesResponse build() { + + return new CheckUpdatesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ChromaSubsampling.java b/src/main/java/dev/plexapi/sdk/models/operations/ChromaSubsampling.java new file mode 100644 index 00000000..de3b1b44 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ChromaSubsampling.java @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +/** + * ChromaSubsampling + * + *

Use the specified chroma subsambling. + * - 0: 411 + * - 1: 420 + * - 2: 422 + * - 3: 444 + * Defaults to 3 (444) + */ +public enum ChromaSubsampling { + ZERO(0L), + ONE(1L), + TWO(2L), + THREE(3L); + + @JsonValue + private final long value; + + ChromaSubsampling(long value) { + this.value = value; + } + + public long value() { + return value; + } + + public static Optional fromValue(long value) { + for (ChromaSubsampling o: ChromaSubsampling.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CleanBundlesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CleanBundlesRequestBuilder.java new file mode 100644 index 00000000..d5344a61 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CleanBundlesRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CleanBundles; +import java.lang.Exception; + +public class CleanBundlesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public CleanBundlesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CleanBundlesResponse call() throws Exception { + + RequestlessOperation operation + = new CleanBundles.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CleanBundlesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CleanBundlesResponse.java new file mode 100644 index 00000000..81f0ca8c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CleanBundlesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CleanBundlesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CleanBundlesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CleanBundlesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CleanBundlesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CleanBundlesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CleanBundlesResponse other = (CleanBundlesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CleanBundlesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CleanBundlesResponse build() { + + return new CleanBundlesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueRequest.java new file mode 100644 index 00000000..4fc54c55 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ClearPlayQueueRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the play queue. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playQueueId") + private long playQueueId; + + @JsonCreator + public ClearPlayQueueRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playQueueId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playQueueId, "playQueueId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playQueueId = playQueueId; + } + + public ClearPlayQueueRequest( + long playQueueId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playQueueId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the play queue. + */ + @JsonIgnore + public long playQueueId() { + return playQueueId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ClearPlayQueueRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ClearPlayQueueRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ClearPlayQueueRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ClearPlayQueueRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ClearPlayQueueRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ClearPlayQueueRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ClearPlayQueueRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ClearPlayQueueRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ClearPlayQueueRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ClearPlayQueueRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ClearPlayQueueRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ClearPlayQueueRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ClearPlayQueueRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ClearPlayQueueRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ClearPlayQueueRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ClearPlayQueueRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ClearPlayQueueRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ClearPlayQueueRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ClearPlayQueueRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ClearPlayQueueRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ClearPlayQueueRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ClearPlayQueueRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the play queue. + */ + public ClearPlayQueueRequest withPlayQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClearPlayQueueRequest other = (ClearPlayQueueRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playQueueId, other.playQueueId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId); + } + + @Override + public String toString() { + return Utils.toString(ClearPlayQueueRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playQueueId", playQueueId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playQueueId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the play queue. + */ + public Builder playQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + public ClearPlayQueueRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ClearPlayQueueRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueRequestBuilder.java new file mode 100644 index 00000000..63513ad8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ClearPlayQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ClearPlayQueueRequestBuilder { + + private ClearPlayQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public ClearPlayQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ClearPlayQueueRequestBuilder request(ClearPlayQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ClearPlayQueueResponse call() throws Exception { + + RequestOperation operation + = new ClearPlayQueue.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueResponse.java new file mode 100644 index 00000000..2e9be522 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlayQueueResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class ClearPlayQueueResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public ClearPlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public ClearPlayQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ClearPlayQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ClearPlayQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ClearPlayQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ClearPlayQueueResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public ClearPlayQueueResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClearPlayQueueResponse other = (ClearPlayQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(ClearPlayQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public ClearPlayQueueResponse build() { + + return new ClearPlayQueueResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsRequest.java deleted file mode 100644 index b7ed537f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsRequest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; - - -public class ClearPlaylistContentsRequest { - /** - * the ID of the playlist - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") - private double playlistID; - - @JsonCreator - public ClearPlaylistContentsRequest( - double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - } - - /** - * the ID of the playlist - */ - @JsonIgnore - public double playlistID() { - return playlistID; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the ID of the playlist - */ - public ClearPlaylistContentsRequest withPlaylistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClearPlaylistContentsRequest other = (ClearPlaylistContentsRequest) o; - return - Utils.enhancedDeepEquals(this.playlistID, other.playlistID); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - playlistID); - } - - @Override - public String toString() { - return Utils.toString(ClearPlaylistContentsRequest.class, - "playlistID", playlistID); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Double playlistID; - - private Builder() { - // force use of static builder() method - } - - - /** - * the ID of the playlist - */ - public Builder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - public ClearPlaylistContentsRequest build() { - - return new ClearPlaylistContentsRequest( - playlistID); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsRequestBuilder.java deleted file mode 100644 index c69603c3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.ClearPlaylistContents; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; - -public class ClearPlaylistContentsRequestBuilder { - - private Double playlistID; - private final SDKConfiguration sdkConfiguration; - - public ClearPlaylistContentsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public ClearPlaylistContentsRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - - private ClearPlaylistContentsRequest buildRequest() { - - ClearPlaylistContentsRequest request = new ClearPlaylistContentsRequest(playlistID); - - return request; - } - - public ClearPlaylistContentsResponse call() throws Exception { - - RequestOperation operation - = new ClearPlaylistContents.Sync(sdkConfiguration); - ClearPlaylistContentsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsResponse.java deleted file mode 100644 index 15f2a066..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistContentsResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class ClearPlaylistContentsResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public ClearPlaylistContentsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public ClearPlaylistContentsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public ClearPlaylistContentsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ClearPlaylistContentsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClearPlaylistContentsResponse other = (ClearPlaylistContentsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(ClearPlaylistContentsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public ClearPlaylistContentsResponse build() { - - return new ClearPlaylistContentsResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsRequest.java new file mode 100644 index 00000000..6820ad29 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ClearPlaylistItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; + + @JsonCreator + public ClearPlaylistItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + } + + public ClearPlaylistItemsRequest( + long playlistId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ClearPlaylistItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ClearPlaylistItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ClearPlaylistItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ClearPlaylistItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ClearPlaylistItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ClearPlaylistItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ClearPlaylistItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ClearPlaylistItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ClearPlaylistItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ClearPlaylistItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ClearPlaylistItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ClearPlaylistItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ClearPlaylistItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ClearPlaylistItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ClearPlaylistItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ClearPlaylistItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ClearPlaylistItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ClearPlaylistItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ClearPlaylistItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ClearPlaylistItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ClearPlaylistItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ClearPlaylistItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public ClearPlaylistItemsRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClearPlaylistItemsRequest other = (ClearPlaylistItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId); + } + + @Override + public String toString() { + return Utils.toString(ClearPlaylistItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + public ClearPlaylistItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ClearPlaylistItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsRequestBuilder.java new file mode 100644 index 00000000..578d9f93 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ClearPlaylistItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ClearPlaylistItemsRequestBuilder { + + private ClearPlaylistItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ClearPlaylistItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ClearPlaylistItemsRequestBuilder request(ClearPlaylistItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ClearPlaylistItemsResponse call() throws Exception { + + RequestOperation operation + = new ClearPlaylistItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsResponse.java new file mode 100644 index 00000000..66730f28 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ClearPlaylistItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class ClearPlaylistItemsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public ClearPlaylistItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public ClearPlaylistItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ClearPlaylistItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ClearPlaylistItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ClearPlaylistItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ClearPlaylistItemsResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public ClearPlaylistItemsResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClearPlaylistItemsResponse other = (ClearPlaylistItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(ClearPlaylistItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public ClearPlaylistItemsResponse build() { + + return new ClearPlaylistItemsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Collection.java b/src/main/java/dev/plexapi/sdk/models/operations/Collection.java deleted file mode 100644 index b3bd07e8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Collection.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class Collection { - /** - * The user-made collection this media item belongs to - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public Collection( - @JsonProperty("tag") String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - /** - * The user-made collection this media item belongs to - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The user-made collection this media item belongs to - */ - public Collection withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Collection other = (Collection) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(Collection.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The user-made collection this media item belongs to - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public Collection build() { - - return new Collection( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapChannelMapping.java b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapChannelMapping.java new file mode 100644 index 00000000..e535c9c3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapChannelMapping.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class ComputeChannelMapChannelMapping { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("channelKey") + private Optional channelKey; + + /** + * The channel description on the device + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("deviceIdentifier") + private Optional deviceIdentifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("favorite") + private Optional favorite; + + /** + * The channel identifier in the lineup + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineupIdentifier") + private Optional lineupIdentifier; + + @JsonCreator + public ComputeChannelMapChannelMapping( + @JsonProperty("channelKey") Optional channelKey, + @JsonProperty("deviceIdentifier") Optional deviceIdentifier, + @JsonProperty("favorite") Optional favorite, + @JsonProperty("lineupIdentifier") Optional lineupIdentifier) { + Utils.checkNotNull(channelKey, "channelKey"); + Utils.checkNotNull(deviceIdentifier, "deviceIdentifier"); + Utils.checkNotNull(favorite, "favorite"); + Utils.checkNotNull(lineupIdentifier, "lineupIdentifier"); + this.channelKey = channelKey; + this.deviceIdentifier = deviceIdentifier; + this.favorite = favorite; + this.lineupIdentifier = lineupIdentifier; + } + + public ComputeChannelMapChannelMapping() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + @JsonIgnore + public Optional channelKey() { + return channelKey; + } + + /** + * The channel description on the device + */ + @JsonIgnore + public Optional deviceIdentifier() { + return deviceIdentifier; + } + + @JsonIgnore + public Optional favorite() { + return favorite; + } + + /** + * The channel identifier in the lineup + */ + @JsonIgnore + public Optional lineupIdentifier() { + return lineupIdentifier; + } + + public static Builder builder() { + return new Builder(); + } + + + public ComputeChannelMapChannelMapping withChannelKey(String channelKey) { + Utils.checkNotNull(channelKey, "channelKey"); + this.channelKey = Optional.ofNullable(channelKey); + return this; + } + + + public ComputeChannelMapChannelMapping withChannelKey(Optional channelKey) { + Utils.checkNotNull(channelKey, "channelKey"); + this.channelKey = channelKey; + return this; + } + + /** + * The channel description on the device + */ + public ComputeChannelMapChannelMapping withDeviceIdentifier(String deviceIdentifier) { + Utils.checkNotNull(deviceIdentifier, "deviceIdentifier"); + this.deviceIdentifier = Optional.ofNullable(deviceIdentifier); + return this; + } + + + /** + * The channel description on the device + */ + public ComputeChannelMapChannelMapping withDeviceIdentifier(Optional deviceIdentifier) { + Utils.checkNotNull(deviceIdentifier, "deviceIdentifier"); + this.deviceIdentifier = deviceIdentifier; + return this; + } + + public ComputeChannelMapChannelMapping withFavorite(boolean favorite) { + Utils.checkNotNull(favorite, "favorite"); + this.favorite = Optional.ofNullable(favorite); + return this; + } + + + public ComputeChannelMapChannelMapping withFavorite(Optional favorite) { + Utils.checkNotNull(favorite, "favorite"); + this.favorite = favorite; + return this; + } + + /** + * The channel identifier in the lineup + */ + public ComputeChannelMapChannelMapping withLineupIdentifier(String lineupIdentifier) { + Utils.checkNotNull(lineupIdentifier, "lineupIdentifier"); + this.lineupIdentifier = Optional.ofNullable(lineupIdentifier); + return this; + } + + + /** + * The channel identifier in the lineup + */ + public ComputeChannelMapChannelMapping withLineupIdentifier(Optional lineupIdentifier) { + Utils.checkNotNull(lineupIdentifier, "lineupIdentifier"); + this.lineupIdentifier = lineupIdentifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComputeChannelMapChannelMapping other = (ComputeChannelMapChannelMapping) o; + return + Utils.enhancedDeepEquals(this.channelKey, other.channelKey) && + Utils.enhancedDeepEquals(this.deviceIdentifier, other.deviceIdentifier) && + Utils.enhancedDeepEquals(this.favorite, other.favorite) && + Utils.enhancedDeepEquals(this.lineupIdentifier, other.lineupIdentifier); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + channelKey, deviceIdentifier, favorite, + lineupIdentifier); + } + + @Override + public String toString() { + return Utils.toString(ComputeChannelMapChannelMapping.class, + "channelKey", channelKey, + "deviceIdentifier", deviceIdentifier, + "favorite", favorite, + "lineupIdentifier", lineupIdentifier); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional channelKey = Optional.empty(); + + private Optional deviceIdentifier = Optional.empty(); + + private Optional favorite = Optional.empty(); + + private Optional lineupIdentifier = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder channelKey(String channelKey) { + Utils.checkNotNull(channelKey, "channelKey"); + this.channelKey = Optional.ofNullable(channelKey); + return this; + } + + public Builder channelKey(Optional channelKey) { + Utils.checkNotNull(channelKey, "channelKey"); + this.channelKey = channelKey; + return this; + } + + + /** + * The channel description on the device + */ + public Builder deviceIdentifier(String deviceIdentifier) { + Utils.checkNotNull(deviceIdentifier, "deviceIdentifier"); + this.deviceIdentifier = Optional.ofNullable(deviceIdentifier); + return this; + } + + /** + * The channel description on the device + */ + public Builder deviceIdentifier(Optional deviceIdentifier) { + Utils.checkNotNull(deviceIdentifier, "deviceIdentifier"); + this.deviceIdentifier = deviceIdentifier; + return this; + } + + + public Builder favorite(boolean favorite) { + Utils.checkNotNull(favorite, "favorite"); + this.favorite = Optional.ofNullable(favorite); + return this; + } + + public Builder favorite(Optional favorite) { + Utils.checkNotNull(favorite, "favorite"); + this.favorite = favorite; + return this; + } + + + /** + * The channel identifier in the lineup + */ + public Builder lineupIdentifier(String lineupIdentifier) { + Utils.checkNotNull(lineupIdentifier, "lineupIdentifier"); + this.lineupIdentifier = Optional.ofNullable(lineupIdentifier); + return this; + } + + /** + * The channel identifier in the lineup + */ + public Builder lineupIdentifier(Optional lineupIdentifier) { + Utils.checkNotNull(lineupIdentifier, "lineupIdentifier"); + this.lineupIdentifier = lineupIdentifier; + return this; + } + + public ComputeChannelMapChannelMapping build() { + + return new ComputeChannelMapChannelMapping( + channelKey, deviceIdentifier, favorite, + lineupIdentifier); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapMediaContainer.java new file mode 100644 index 00000000..30e599c6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * ComputeChannelMapMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class ComputeChannelMapMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ChannelMapping") + private Optional> channelMapping; + + @JsonCreator + public ComputeChannelMapMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("ChannelMapping") Optional> channelMapping) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(channelMapping, "channelMapping"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.channelMapping = channelMapping; + } + + public ComputeChannelMapMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> channelMapping() { + return (Optional>) channelMapping; + } + + public static Builder builder() { + return new Builder(); + } + + + public ComputeChannelMapMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public ComputeChannelMapMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ComputeChannelMapMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ComputeChannelMapMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ComputeChannelMapMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public ComputeChannelMapMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ComputeChannelMapMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ComputeChannelMapMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public ComputeChannelMapMediaContainer withChannelMapping(List channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = Optional.ofNullable(channelMapping); + return this; + } + + + public ComputeChannelMapMediaContainer withChannelMapping(Optional> channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = channelMapping; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComputeChannelMapMediaContainer other = (ComputeChannelMapMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.channelMapping, other.channelMapping); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, channelMapping); + } + + @Override + public String toString() { + return Utils.toString(ComputeChannelMapMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "channelMapping", channelMapping); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> channelMapping = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder channelMapping(List channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = Optional.ofNullable(channelMapping); + return this; + } + + public Builder channelMapping(Optional> channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = channelMapping; + return this; + } + + public ComputeChannelMapMediaContainer build() { + + return new ComputeChannelMapMediaContainer( + identifier, offset, size, + totalSize, channelMapping); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapRequest.java new file mode 100644 index 00000000..fb7c0a70 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapRequest.java @@ -0,0 +1,823 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class ComputeChannelMapRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The URI describing the device + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=device") + private String deviceQueryParameter; + + /** + * The URI describing the lineup + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=lineup") + private String lineup; + + @JsonCreator + public ComputeChannelMapRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String deviceQueryParameter, + String lineup) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + Utils.checkNotNull(lineup, "lineup"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceQueryParameter = deviceQueryParameter; + this.lineup = lineup; + } + + public ComputeChannelMapRequest( + String deviceQueryParameter, + String lineup) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceQueryParameter, + lineup); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The URI describing the device + */ + @JsonIgnore + public String deviceQueryParameter() { + return deviceQueryParameter; + } + + /** + * The URI describing the lineup + */ + @JsonIgnore + public String lineup() { + return lineup; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ComputeChannelMapRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ComputeChannelMapRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ComputeChannelMapRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ComputeChannelMapRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ComputeChannelMapRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ComputeChannelMapRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ComputeChannelMapRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ComputeChannelMapRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ComputeChannelMapRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ComputeChannelMapRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ComputeChannelMapRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ComputeChannelMapRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ComputeChannelMapRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ComputeChannelMapRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ComputeChannelMapRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ComputeChannelMapRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ComputeChannelMapRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ComputeChannelMapRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ComputeChannelMapRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ComputeChannelMapRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ComputeChannelMapRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ComputeChannelMapRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The URI describing the device + */ + public ComputeChannelMapRequest withDeviceQueryParameter(String deviceQueryParameter) { + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + this.deviceQueryParameter = deviceQueryParameter; + return this; + } + + /** + * The URI describing the lineup + */ + public ComputeChannelMapRequest withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComputeChannelMapRequest other = (ComputeChannelMapRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceQueryParameter, other.deviceQueryParameter) && + Utils.enhancedDeepEquals(this.lineup, other.lineup); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceQueryParameter, + lineup); + } + + @Override + public String toString() { + return Utils.toString(ComputeChannelMapRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceQueryParameter", deviceQueryParameter, + "lineup", lineup); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String deviceQueryParameter; + + private String lineup; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The URI describing the device + */ + public Builder deviceQueryParameter(String deviceQueryParameter) { + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + this.deviceQueryParameter = deviceQueryParameter; + return this; + } + + + /** + * The URI describing the lineup + */ + public Builder lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public ComputeChannelMapRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ComputeChannelMapRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceQueryParameter, + lineup); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapRequestBuilder.java new file mode 100644 index 00000000..e5a01696 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ComputeChannelMap; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ComputeChannelMapRequestBuilder { + + private ComputeChannelMapRequest request; + private final SDKConfiguration sdkConfiguration; + + public ComputeChannelMapRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ComputeChannelMapRequestBuilder request(ComputeChannelMapRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ComputeChannelMapResponse call() throws Exception { + + RequestOperation operation + = new ComputeChannelMap.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapResponse.java new file mode 100644 index 00000000..ccc0996c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class ComputeChannelMapResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ComputeChannelMapResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ComputeChannelMapResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ComputeChannelMapResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ComputeChannelMapResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ComputeChannelMapResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ComputeChannelMapResponse withObject(ComputeChannelMapResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ComputeChannelMapResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ComputeChannelMapResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComputeChannelMapResponse other = (ComputeChannelMapResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ComputeChannelMapResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ComputeChannelMapResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ComputeChannelMapResponse build() { + + return new ComputeChannelMapResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapResponseBody.java new file mode 100644 index 00000000..c4a307d4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ComputeChannelMapResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ComputeChannelMapResponseBody + * + *

OK + */ +public class ComputeChannelMapResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ComputeChannelMapResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ComputeChannelMapResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ComputeChannelMapResponseBody withMediaContainer(ComputeChannelMapMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ComputeChannelMapResponseBody 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; + } + ComputeChannelMapResponseBody other = (ComputeChannelMapResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ComputeChannelMapResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ComputeChannelMapMediaContainer 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 ComputeChannelMapResponseBody build() { + + return new ComputeChannelMapResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketRequest.java new file mode 100644 index 00000000..120ea292 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketRequest.java @@ -0,0 +1,829 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.List; +import java.util.Optional; + + +public class ConnectWebSocketRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=filter") + private Optional> filter; + + @JsonCreator + public ConnectWebSocketRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional> filter) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(filter, "filter"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.filter = filter; + } + + public ConnectWebSocketRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> filter() { + return (Optional>) filter; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ConnectWebSocketRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ConnectWebSocketRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ConnectWebSocketRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ConnectWebSocketRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ConnectWebSocketRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ConnectWebSocketRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ConnectWebSocketRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ConnectWebSocketRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ConnectWebSocketRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ConnectWebSocketRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ConnectWebSocketRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ConnectWebSocketRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ConnectWebSocketRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ConnectWebSocketRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ConnectWebSocketRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ConnectWebSocketRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ConnectWebSocketRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ConnectWebSocketRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ConnectWebSocketRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ConnectWebSocketRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ConnectWebSocketRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ConnectWebSocketRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + public ConnectWebSocketRequest withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + public ConnectWebSocketRequest withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectWebSocketRequest other = (ConnectWebSocketRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.filter, other.filter); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, filter); + } + + @Override + public String toString() { + return Utils.toString(ConnectWebSocketRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "filter", filter); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional> filter = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + public Builder filter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public ConnectWebSocketRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ConnectWebSocketRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, filter); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketRequestBuilder.java new file mode 100644 index 00000000..48b90b0d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ConnectWebSocket; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ConnectWebSocketRequestBuilder { + + private ConnectWebSocketRequest request; + private final SDKConfiguration sdkConfiguration; + + public ConnectWebSocketRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ConnectWebSocketRequestBuilder request(ConnectWebSocketRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ConnectWebSocketResponse call() throws Exception { + + RequestOperation operation + = new ConnectWebSocket.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketResponse.java new file mode 100644 index 00000000..5f7c5c6b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ConnectWebSocketResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class ConnectWebSocketResponse 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public ConnectWebSocketResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public ConnectWebSocketResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ConnectWebSocketResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ConnectWebSocketResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ConnectWebSocketResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ConnectWebSocketResponse withResponseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public ConnectWebSocketResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectWebSocketResponse other = (ConnectWebSocketResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(ConnectWebSocketResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public ConnectWebSocketResponse build() { + + return new ConnectWebSocketResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Connection.java b/src/main/java/dev/plexapi/sdk/models/operations/Connection.java new file mode 100644 index 00000000..f588fadf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Connection.java @@ -0,0 +1,365 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class Connection { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("address") + private Optional address; + + /** + * Indicates if the connection is the server's LAN address + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("local") + private Optional local; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("port") + private Optional port; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("protocol") + private Optional protocol; + + /** + * Indicates the connection is over a relayed connection + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("relay") + private Optional relay; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uri") + private Optional uri; + + @JsonCreator + public Connection( + @JsonProperty("address") Optional address, + @JsonProperty("local") Optional local, + @JsonProperty("port") Optional port, + @JsonProperty("protocol") Optional protocol, + @JsonProperty("relay") Optional relay, + @JsonProperty("uri") Optional uri) { + Utils.checkNotNull(address, "address"); + Utils.checkNotNull(local, "local"); + Utils.checkNotNull(port, "port"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(relay, "relay"); + Utils.checkNotNull(uri, "uri"); + this.address = address; + this.local = local; + this.port = port; + this.protocol = protocol; + this.relay = relay; + this.uri = uri; + } + + public Connection() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional address() { + return address; + } + + /** + * Indicates if the connection is the server's LAN address + */ + @JsonIgnore + public Optional local() { + return local; + } + + @JsonIgnore + public Optional port() { + return port; + } + + @JsonIgnore + public Optional protocol() { + return protocol; + } + + /** + * Indicates the connection is over a relayed connection + */ + @JsonIgnore + public Optional relay() { + return relay; + } + + @JsonIgnore + public Optional uri() { + return uri; + } + + public static Builder builder() { + return new Builder(); + } + + + public Connection withAddress(String address) { + Utils.checkNotNull(address, "address"); + this.address = Optional.ofNullable(address); + return this; + } + + + public Connection withAddress(Optional address) { + Utils.checkNotNull(address, "address"); + this.address = address; + return this; + } + + /** + * Indicates if the connection is the server's LAN address + */ + public Connection withLocal(boolean local) { + Utils.checkNotNull(local, "local"); + this.local = Optional.ofNullable(local); + return this; + } + + + /** + * Indicates if the connection is the server's LAN address + */ + public Connection withLocal(Optional local) { + Utils.checkNotNull(local, "local"); + this.local = local; + return this; + } + + public Connection withPort(long port) { + Utils.checkNotNull(port, "port"); + this.port = Optional.ofNullable(port); + return this; + } + + + public Connection withPort(Optional port) { + Utils.checkNotNull(port, "port"); + this.port = port; + return this; + } + + public Connection withProtocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + + public Connection withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + /** + * Indicates the connection is over a relayed connection + */ + public Connection withRelay(boolean relay) { + Utils.checkNotNull(relay, "relay"); + this.relay = Optional.ofNullable(relay); + return this; + } + + + /** + * Indicates the connection is over a relayed connection + */ + public Connection withRelay(Optional relay) { + Utils.checkNotNull(relay, "relay"); + this.relay = relay; + return this; + } + + public Connection withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + public Connection withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Connection other = (Connection) o; + return + Utils.enhancedDeepEquals(this.address, other.address) && + Utils.enhancedDeepEquals(this.local, other.local) && + Utils.enhancedDeepEquals(this.port, other.port) && + Utils.enhancedDeepEquals(this.protocol, other.protocol) && + Utils.enhancedDeepEquals(this.relay, other.relay) && + Utils.enhancedDeepEquals(this.uri, other.uri); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + address, local, port, + protocol, relay, uri); + } + + @Override + public String toString() { + return Utils.toString(Connection.class, + "address", address, + "local", local, + "port", port, + "protocol", protocol, + "relay", relay, + "uri", uri); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional address = Optional.empty(); + + private Optional local = Optional.empty(); + + private Optional port = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional relay = Optional.empty(); + + private Optional uri = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder address(String address) { + Utils.checkNotNull(address, "address"); + this.address = Optional.ofNullable(address); + return this; + } + + public Builder address(Optional address) { + Utils.checkNotNull(address, "address"); + this.address = address; + return this; + } + + + /** + * Indicates if the connection is the server's LAN address + */ + public Builder local(boolean local) { + Utils.checkNotNull(local, "local"); + this.local = Optional.ofNullable(local); + return this; + } + + /** + * Indicates if the connection is the server's LAN address + */ + public Builder local(Optional local) { + Utils.checkNotNull(local, "local"); + this.local = local; + return this; + } + + + public Builder port(long port) { + Utils.checkNotNull(port, "port"); + this.port = Optional.ofNullable(port); + return this; + } + + public Builder port(Optional port) { + Utils.checkNotNull(port, "port"); + this.port = port; + return this; + } + + + public Builder protocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + + /** + * Indicates the connection is over a relayed connection + */ + public Builder relay(boolean relay) { + Utils.checkNotNull(relay, "relay"); + this.relay = Optional.ofNullable(relay); + return this; + } + + /** + * Indicates the connection is over a relayed connection + */ + public Builder relay(Optional relay) { + Utils.checkNotNull(relay, "relay"); + this.relay = relay; + return this; + } + + + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + public Connection build() { + + return new Connection( + address, local, port, + protocol, relay, uri); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Connections.java b/src/main/java/dev/plexapi/sdk/models/operations/Connections.java deleted file mode 100644 index 68642809..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Connections.java +++ /dev/null @@ -1,347 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - - -public class Connections { - /** - * The protocol used for the connection (http, https, etc) - */ - @JsonProperty("protocol") - private Protocol protocol; - - /** - * The (ip) address or domain name used for the connection - */ - @JsonProperty("address") - private String address; - - /** - * The port used for the connection - */ - @JsonProperty("port") - private int port; - - /** - * The full URI of the connection - */ - @JsonProperty("uri") - private String uri; - - /** - * If the connection is local address - */ - @JsonProperty("local") - private boolean local; - - /** - * If the connection is relayed through plex.direct - */ - @JsonProperty("relay") - private boolean relay; - - /** - * If the connection is using IPv6 - */ - @JsonProperty("IPv6") - private boolean iPv6; - - @JsonCreator - public Connections( - @JsonProperty("protocol") Protocol protocol, - @JsonProperty("address") String address, - @JsonProperty("port") int port, - @JsonProperty("uri") String uri, - @JsonProperty("local") boolean local, - @JsonProperty("relay") boolean relay, - @JsonProperty("IPv6") boolean iPv6) { - Utils.checkNotNull(protocol, "protocol"); - Utils.checkNotNull(address, "address"); - Utils.checkNotNull(port, "port"); - Utils.checkNotNull(uri, "uri"); - Utils.checkNotNull(local, "local"); - Utils.checkNotNull(relay, "relay"); - Utils.checkNotNull(iPv6, "iPv6"); - this.protocol = protocol; - this.address = address; - this.port = port; - this.uri = uri; - this.local = local; - this.relay = relay; - this.iPv6 = iPv6; - } - - /** - * The protocol used for the connection (http, https, etc) - */ - @JsonIgnore - public Protocol protocol() { - return protocol; - } - - /** - * The (ip) address or domain name used for the connection - */ - @JsonIgnore - public String address() { - return address; - } - - /** - * The port used for the connection - */ - @JsonIgnore - public int port() { - return port; - } - - /** - * The full URI of the connection - */ - @JsonIgnore - public String uri() { - return uri; - } - - /** - * If the connection is local address - */ - @JsonIgnore - public boolean local() { - return local; - } - - /** - * If the connection is relayed through plex.direct - */ - @JsonIgnore - public boolean relay() { - return relay; - } - - /** - * If the connection is using IPv6 - */ - @JsonIgnore - public boolean iPv6() { - return iPv6; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The protocol used for the connection (http, https, etc) - */ - public Connections withProtocol(Protocol protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = protocol; - return this; - } - - /** - * The (ip) address or domain name used for the connection - */ - public Connections withAddress(String address) { - Utils.checkNotNull(address, "address"); - this.address = address; - return this; - } - - /** - * The port used for the connection - */ - public Connections withPort(int port) { - Utils.checkNotNull(port, "port"); - this.port = port; - return this; - } - - /** - * The full URI of the connection - */ - public Connections withUri(String uri) { - Utils.checkNotNull(uri, "uri"); - this.uri = uri; - return this; - } - - /** - * If the connection is local address - */ - public Connections withLocal(boolean local) { - Utils.checkNotNull(local, "local"); - this.local = local; - return this; - } - - /** - * If the connection is relayed through plex.direct - */ - public Connections withRelay(boolean relay) { - Utils.checkNotNull(relay, "relay"); - this.relay = relay; - return this; - } - - /** - * If the connection is using IPv6 - */ - public Connections withIPv6(boolean iPv6) { - Utils.checkNotNull(iPv6, "iPv6"); - this.iPv6 = iPv6; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Connections other = (Connections) o; - return - Utils.enhancedDeepEquals(this.protocol, other.protocol) && - Utils.enhancedDeepEquals(this.address, other.address) && - Utils.enhancedDeepEquals(this.port, other.port) && - Utils.enhancedDeepEquals(this.uri, other.uri) && - Utils.enhancedDeepEquals(this.local, other.local) && - Utils.enhancedDeepEquals(this.relay, other.relay) && - Utils.enhancedDeepEquals(this.iPv6, other.iPv6); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - protocol, address, port, - uri, local, relay, - iPv6); - } - - @Override - public String toString() { - return Utils.toString(Connections.class, - "protocol", protocol, - "address", address, - "port", port, - "uri", uri, - "local", local, - "relay", relay, - "iPv6", iPv6); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Protocol protocol; - - private String address; - - private Integer port; - - private String uri; - - private Boolean local; - - private Boolean relay; - - private Boolean iPv6; - - private Builder() { - // force use of static builder() method - } - - - /** - * The protocol used for the connection (http, https, etc) - */ - public Builder protocol(Protocol protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = protocol; - return this; - } - - - /** - * The (ip) address or domain name used for the connection - */ - public Builder address(String address) { - Utils.checkNotNull(address, "address"); - this.address = address; - return this; - } - - - /** - * The port used for the connection - */ - public Builder port(int port) { - Utils.checkNotNull(port, "port"); - this.port = port; - return this; - } - - - /** - * The full URI of the connection - */ - public Builder uri(String uri) { - Utils.checkNotNull(uri, "uri"); - this.uri = uri; - return this; - } - - - /** - * If the connection is local address - */ - public Builder local(boolean local) { - Utils.checkNotNull(local, "local"); - this.local = local; - return this; - } - - - /** - * If the connection is relayed through plex.direct - */ - public Builder relay(boolean relay) { - Utils.checkNotNull(relay, "relay"); - this.relay = relay; - return this; - } - - - /** - * If the connection is using IPv6 - */ - public Builder iPv6(boolean iPv6) { - Utils.checkNotNull(iPv6, "iPv6"); - this.iPv6 = iPv6; - return this; - } - - public Connections build() { - - return new Connections( - protocol, address, port, - uri, local, relay, - iPv6); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Context.java b/src/main/java/dev/plexapi/sdk/models/operations/Context.java deleted file mode 100644 index 8aca69fd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Context.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Context { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - @JsonCreator - public Context( - @JsonProperty("librarySectionID") Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - } - - public Context() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - public static Builder builder() { - return new Builder(); - } - - - public Context withLibrarySectionID(String librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - public Context withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Context other = (Context) o; - return - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - librarySectionID); - } - - @Override - public String toString() { - return Utils.toString(Context.class, - "librarySectionID", librarySectionID); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional librarySectionID = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder librarySectionID(String 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 Context build() { - - return new Context( - librarySectionID); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Country.java b/src/main/java/dev/plexapi/sdk/models/operations/Country.java index 433acf4a..f7a4cd93 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Country.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Country.java @@ -5,68 +5,154 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + -/** - * Country - * - *

The filter query string for country media items. - */ public class Country { /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. + * Three letter code */ - @JsonProperty("id") - private int id; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("example") + private Optional example; /** - * The country of origin of this media item + * - `0`: The country is divided into regions, and following the key will lead to a list of regions. + * - `1`: The county is divided by postal codes, and an example code is returned in `example`. + * - `2`: The country has a single postal code, returned in `example`. */ - @JsonProperty("tag") - private String tag; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("flavor") + private Optional flavor; - @JsonProperty("filter") - private String filter; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * Three letter language code + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + /** + * The title of the language + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("languageTitle") + private Optional languageTitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; @JsonCreator public Country( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("filter") String filter) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(filter, "filter"); - this.id = id; - this.tag = tag; - this.filter = filter; + @JsonProperty("code") Optional code, + @JsonProperty("example") Optional example, + @JsonProperty("flavor") Optional flavor, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("languageTitle") Optional languageTitle, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(example, "example"); + Utils.checkNotNull(flavor, "flavor"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(languageTitle, "languageTitle"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + this.code = code; + this.example = example; + this.flavor = flavor; + this.key = key; + this.language = language; + this.languageTitle = languageTitle; + this.title = title; + this.type = type; + } + + public Country() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. + * Three letter code */ @JsonIgnore - public int id() { - return id; + public Optional code() { + return code; + } + + @JsonIgnore + public Optional example() { + return example; } /** - * The country of origin of this media item + * - `0`: The country is divided into regions, and following the key will lead to a list of regions. + * - `1`: The county is divided by postal codes, and an example code is returned in `example`. + * - `2`: The country has a single postal code, returned in `example`. */ + @SuppressWarnings("unchecked") @JsonIgnore - public String tag() { - return tag; + public Optional flavor() { + return (Optional) flavor; } @JsonIgnore - public String filter() { - return filter; + public Optional key() { + return key; + } + + /** + * Three letter language code + */ + @JsonIgnore + public Optional language() { + return language; + } + + /** + * The title of the language + */ + @JsonIgnore + public Optional languageTitle() { + return languageTitle; + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional type() { + return type; } public static Builder builder() { @@ -75,27 +161,134 @@ public class Country { /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. + * Three letter code */ - public Country withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; + public Country withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + + /** + * Three letter code + */ + public Country withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public Country withExample(String example) { + Utils.checkNotNull(example, "example"); + this.example = Optional.ofNullable(example); + return this; + } + + + public Country withExample(Optional example) { + Utils.checkNotNull(example, "example"); + this.example = example; return this; } /** - * The country of origin of this media item + * - `0`: The country is divided into regions, and following the key will lead to a list of regions. + * - `1`: The county is divided by postal codes, and an example code is returned in `example`. + * - `2`: The country has a single postal code, returned in `example`. */ - public Country withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; + public Country withFlavor(Flavor flavor) { + Utils.checkNotNull(flavor, "flavor"); + this.flavor = Optional.ofNullable(flavor); return this; } - public Country withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; + + /** + * - `0`: The country is divided into regions, and following the key will lead to a list of regions. + * - `1`: The county is divided by postal codes, and an example code is returned in `example`. + * - `2`: The country has a single postal code, returned in `example`. + */ + public Country withFlavor(Optional flavor) { + Utils.checkNotNull(flavor, "flavor"); + this.flavor = flavor; + return this; + } + + public Country withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public Country withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * Three letter language code + */ + public Country withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + /** + * Three letter language code + */ + public Country withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + /** + * The title of the language + */ + public Country withLanguageTitle(String languageTitle) { + Utils.checkNotNull(languageTitle, "languageTitle"); + this.languageTitle = Optional.ofNullable(languageTitle); + return this; + } + + + /** + * The title of the language + */ + public Country withLanguageTitle(Optional languageTitle) { + Utils.checkNotNull(languageTitle, "languageTitle"); + this.languageTitle = languageTitle; + return this; + } + + public Country withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public Country withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Country withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public Country withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; return this; } @@ -109,33 +302,55 @@ public class Country { } Country other = (Country) o; return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.filter, other.filter); + Utils.enhancedDeepEquals(this.code, other.code) && + Utils.enhancedDeepEquals(this.example, other.example) && + Utils.enhancedDeepEquals(this.flavor, other.flavor) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.languageTitle, other.languageTitle) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type); } @Override public int hashCode() { return Utils.enhancedHash( - id, tag, filter); + code, example, flavor, + key, language, languageTitle, + title, type); } @Override public String toString() { return Utils.toString(Country.class, - "id", id, - "tag", tag, - "filter", filter); + "code", code, + "example", example, + "flavor", flavor, + "key", key, + "language", language, + "languageTitle", languageTitle, + "title", title, + "type", type); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Integer id; + private Optional code = Optional.empty(); - private String tag; + private Optional example = Optional.empty(); - private String filter; + private Optional flavor = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional languageTitle = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); private Builder() { // force use of static builder() method @@ -143,36 +358,142 @@ public class Country { /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. + * Three letter code */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + /** + * Three letter code + */ + public Builder code(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + + public Builder example(String example) { + Utils.checkNotNull(example, "example"); + this.example = Optional.ofNullable(example); + return this; + } + + public Builder example(Optional example) { + Utils.checkNotNull(example, "example"); + this.example = example; return this; } /** - * The country of origin of this media item + * - `0`: The country is divided into regions, and following the key will lead to a list of regions. + * - `1`: The county is divided by postal codes, and an example code is returned in `example`. + * - `2`: The country has a single postal code, returned in `example`. */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; + public Builder flavor(Flavor flavor) { + Utils.checkNotNull(flavor, "flavor"); + this.flavor = Optional.ofNullable(flavor); + return this; + } + + /** + * - `0`: The country is divided into regions, and following the key will lead to a list of regions. + * - `1`: The county is divided by postal codes, and an example code is returned in `example`. + * - `2`: The country has a single postal code, returned in `example`. + */ + public Builder flavor(Optional flavor) { + Utils.checkNotNull(flavor, "flavor"); + this.flavor = flavor; return this; } - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; + 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; + } + + + /** + * Three letter language code + */ + public Builder language(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + /** + * Three letter language code + */ + public Builder language(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + + /** + * The title of the language + */ + public Builder languageTitle(String languageTitle) { + Utils.checkNotNull(languageTitle, "languageTitle"); + this.languageTitle = Optional.ofNullable(languageTitle); + return this; + } + + /** + * The title of the language + */ + public Builder languageTitle(Optional languageTitle) { + Utils.checkNotNull(languageTitle, "languageTitle"); + this.languageTitle = languageTitle; + 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 Country build() { return new Country( - id, tag, filter); + code, example, flavor, + key, language, languageTitle, + title, type); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionRequest.java new file mode 100644 index 00000000..93b6bf98 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionRequest.java @@ -0,0 +1,1023 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class CreateCollectionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section where this collection will be created + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionId") + private String sectionId; + + /** + * The title to filter by or assign + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=title") + private Optional title; + + /** + * Whether this is a smart collection/playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=smart") + private Optional smart; + + /** + * The URI for processing the smart collection. Required for a smart collection + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") + private Optional uri; + + /** + * The metadata type to filter by + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + @JsonCreator + public CreateCollectionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String sectionId, + Optional title, + Optional smart, + Optional uri, + Optional type) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(smart, "smart"); + Utils.checkNotNull(uri, "uri"); + Utils.checkNotNull(type, "type"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.title = title; + this.smart = smart; + this.uri = uri; + this.type = type; + } + + public CreateCollectionRequest( + String sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section where this collection will be created + */ + @JsonIgnore + public String sectionId() { + return sectionId; + } + + /** + * The title to filter by or assign + */ + @JsonIgnore + public Optional title() { + return title; + } + + /** + * Whether this is a smart collection/playlist + */ + @JsonIgnore + public Optional smart() { + return smart; + } + + /** + * The URI for processing the smart collection. Required for a smart collection + */ + @JsonIgnore + public Optional uri() { + return uri; + } + + /** + * The metadata type to filter by + */ + @JsonIgnore + public Optional type() { + return type; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreateCollectionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreateCollectionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public CreateCollectionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CreateCollectionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public CreateCollectionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CreateCollectionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public CreateCollectionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CreateCollectionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CreateCollectionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CreateCollectionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CreateCollectionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CreateCollectionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CreateCollectionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CreateCollectionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CreateCollectionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CreateCollectionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CreateCollectionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CreateCollectionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CreateCollectionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CreateCollectionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CreateCollectionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CreateCollectionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section where this collection will be created + */ + public CreateCollectionRequest withSectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The title to filter by or assign + */ + public CreateCollectionRequest withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title to filter by or assign + */ + public CreateCollectionRequest withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * Whether this is a smart collection/playlist + */ + public CreateCollectionRequest withSmart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + + /** + * Whether this is a smart collection/playlist + */ + public CreateCollectionRequest withSmart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + /** + * The URI for processing the smart collection. Required for a smart collection + */ + public CreateCollectionRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + /** + * The URI for processing the smart collection. Required for a smart collection + */ + public CreateCollectionRequest withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + /** + * The metadata type to filter by + */ + public CreateCollectionRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The metadata type to filter by + */ + public CreateCollectionRequest withType(Optional 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; + } + CreateCollectionRequest other = (CreateCollectionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.smart, other.smart) && + Utils.enhancedDeepEquals(this.uri, other.uri) && + Utils.enhancedDeepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + title, smart, uri, + type); + } + + @Override + public String toString() { + return Utils.toString(CreateCollectionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "title", title, + "smart", smart, + "uri", uri, + "type", type); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String sectionId; + + private Optional title = Optional.empty(); + + private Optional smart = Optional.empty(); + + private Optional uri = Optional.empty(); + + private Optional type = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section where this collection will be created + */ + public Builder sectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The title to filter by or assign + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title to filter by or assign + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * Whether this is a smart collection/playlist + */ + public Builder smart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + /** + * Whether this is a smart collection/playlist + */ + public Builder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + + /** + * The URI for processing the smart collection. Required for a smart collection + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + /** + * The URI for processing the smart collection. Required for a smart collection + */ + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + + /** + * The metadata type to filter by + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The metadata type to filter by + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public CreateCollectionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new CreateCollectionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + title, smart, uri, + type); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionRequestBuilder.java new file mode 100644 index 00000000..7774faa8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CreateCollection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class CreateCollectionRequestBuilder { + + private CreateCollectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreateCollectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateCollectionRequestBuilder request(CreateCollectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreateCollectionResponse call() throws Exception { + + RequestOperation operation + = new CreateCollection.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionResponse.java new file mode 100644 index 00000000..f039d5ac --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateCollectionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class CreateCollectionResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public CreateCollectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public CreateCollectionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateCollectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateCollectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateCollectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateCollectionResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public CreateCollectionResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCollectionResponse other = (CreateCollectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(CreateCollectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public CreateCollectionResponse build() { + + return new CreateCollectionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubRequest.java new file mode 100644 index 00000000..2b94e8ac --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubRequest.java @@ -0,0 +1,1008 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class CreateCustomHubRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section ID for the hubs to reorder + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * The metadata item on which to base this hub. This must currently be a collection + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=metadataItemId") + private long metadataItemId; + + /** + * Whether this hub should be displayed in recommended + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=promotedToRecommended") + private Optional promotedToRecommended; + + /** + * Whether this hub should be displayed in admin's home + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=promotedToOwnHome") + private Optional promotedToOwnHome; + + /** + * Whether this hub should be displayed in shared user's home + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=promotedToSharedHome") + private Optional promotedToSharedHome; + + @JsonCreator + public CreateCustomHubRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + long metadataItemId, + Optional promotedToRecommended, + Optional promotedToOwnHome, + Optional promotedToSharedHome) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(metadataItemId, "metadataItemId"); + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.metadataItemId = metadataItemId; + this.promotedToRecommended = promotedToRecommended; + this.promotedToOwnHome = promotedToOwnHome; + this.promotedToSharedHome = promotedToSharedHome; + } + + public CreateCustomHubRequest( + long sectionId, + long metadataItemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + metadataItemId, Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section ID for the hubs to reorder + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * The metadata item on which to base this hub. This must currently be a collection + */ + @JsonIgnore + public long metadataItemId() { + return metadataItemId; + } + + /** + * Whether this hub should be displayed in recommended + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional promotedToRecommended() { + return (Optional) promotedToRecommended; + } + + /** + * Whether this hub should be displayed in admin's home + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional promotedToOwnHome() { + return (Optional) promotedToOwnHome; + } + + /** + * Whether this hub should be displayed in shared user's home + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional promotedToSharedHome() { + return (Optional) promotedToSharedHome; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreateCustomHubRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreateCustomHubRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public CreateCustomHubRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CreateCustomHubRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public CreateCustomHubRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CreateCustomHubRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public CreateCustomHubRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CreateCustomHubRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CreateCustomHubRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CreateCustomHubRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CreateCustomHubRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CreateCustomHubRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CreateCustomHubRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CreateCustomHubRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CreateCustomHubRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CreateCustomHubRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CreateCustomHubRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CreateCustomHubRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CreateCustomHubRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CreateCustomHubRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CreateCustomHubRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CreateCustomHubRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section ID for the hubs to reorder + */ + public CreateCustomHubRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The metadata item on which to base this hub. This must currently be a collection + */ + public CreateCustomHubRequest withMetadataItemId(long metadataItemId) { + Utils.checkNotNull(metadataItemId, "metadataItemId"); + this.metadataItemId = metadataItemId; + return this; + } + + /** + * Whether this hub should be displayed in recommended + */ + public CreateCustomHubRequest withPromotedToRecommended(BoolInt promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = Optional.ofNullable(promotedToRecommended); + return this; + } + + + /** + * Whether this hub should be displayed in recommended + */ + public CreateCustomHubRequest withPromotedToRecommended(Optional promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = promotedToRecommended; + return this; + } + + /** + * Whether this hub should be displayed in admin's home + */ + public CreateCustomHubRequest withPromotedToOwnHome(BoolInt promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = Optional.ofNullable(promotedToOwnHome); + return this; + } + + + /** + * Whether this hub should be displayed in admin's home + */ + public CreateCustomHubRequest withPromotedToOwnHome(Optional promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = promotedToOwnHome; + return this; + } + + /** + * Whether this hub should be displayed in shared user's home + */ + public CreateCustomHubRequest withPromotedToSharedHome(BoolInt promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = Optional.ofNullable(promotedToSharedHome); + return this; + } + + + /** + * Whether this hub should be displayed in shared user's home + */ + public CreateCustomHubRequest withPromotedToSharedHome(Optional promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = promotedToSharedHome; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomHubRequest other = (CreateCustomHubRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.metadataItemId, other.metadataItemId) && + Utils.enhancedDeepEquals(this.promotedToRecommended, other.promotedToRecommended) && + Utils.enhancedDeepEquals(this.promotedToOwnHome, other.promotedToOwnHome) && + Utils.enhancedDeepEquals(this.promotedToSharedHome, other.promotedToSharedHome); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + metadataItemId, promotedToRecommended, promotedToOwnHome, + promotedToSharedHome); + } + + @Override + public String toString() { + return Utils.toString(CreateCustomHubRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "metadataItemId", metadataItemId, + "promotedToRecommended", promotedToRecommended, + "promotedToOwnHome", promotedToOwnHome, + "promotedToSharedHome", promotedToSharedHome); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Long metadataItemId; + + private Optional promotedToRecommended = Optional.empty(); + + private Optional promotedToOwnHome = Optional.empty(); + + private Optional promotedToSharedHome = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section ID for the hubs to reorder + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The metadata item on which to base this hub. This must currently be a collection + */ + public Builder metadataItemId(long metadataItemId) { + Utils.checkNotNull(metadataItemId, "metadataItemId"); + this.metadataItemId = metadataItemId; + return this; + } + + + /** + * Whether this hub should be displayed in recommended + */ + public Builder promotedToRecommended(BoolInt promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = Optional.ofNullable(promotedToRecommended); + return this; + } + + /** + * Whether this hub should be displayed in recommended + */ + public Builder promotedToRecommended(Optional promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = promotedToRecommended; + return this; + } + + + /** + * Whether this hub should be displayed in admin's home + */ + public Builder promotedToOwnHome(BoolInt promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = Optional.ofNullable(promotedToOwnHome); + return this; + } + + /** + * Whether this hub should be displayed in admin's home + */ + public Builder promotedToOwnHome(Optional promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = promotedToOwnHome; + return this; + } + + + /** + * Whether this hub should be displayed in shared user's home + */ + public Builder promotedToSharedHome(BoolInt promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = Optional.ofNullable(promotedToSharedHome); + return this; + } + + /** + * Whether this hub should be displayed in shared user's home + */ + public Builder promotedToSharedHome(Optional promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = promotedToSharedHome; + return this; + } + + public CreateCustomHubRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new CreateCustomHubRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + metadataItemId, promotedToRecommended, promotedToOwnHome, + promotedToSharedHome); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubRequestBuilder.java new file mode 100644 index 00000000..033f1f4a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CreateCustomHub; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class CreateCustomHubRequestBuilder { + + private CreateCustomHubRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreateCustomHubRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateCustomHubRequestBuilder request(CreateCustomHubRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreateCustomHubResponse call() throws Exception { + + RequestOperation operation + = new CreateCustomHub.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubResponse.java new file mode 100644 index 00000000..aaed4fd3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateCustomHubResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CreateCustomHubResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CreateCustomHubResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateCustomHubResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateCustomHubResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateCustomHubResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomHubResponse other = (CreateCustomHubResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CreateCustomHubResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CreateCustomHubResponse build() { + + return new CreateCustomHubResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateDVRRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateDVRRequest.java new file mode 100644 index 00000000..4f463542 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateDVRRequest.java @@ -0,0 +1,920 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.List; +import java.util.Optional; + + +public class CreateDVRRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The EPG lineup. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=lineup") + private Optional lineup; + + /** + * The device. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=device") + private Optional> deviceQueryParameter; + + /** + * The language. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=language") + private Optional language; + + @JsonCreator + public CreateDVRRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional lineup, + Optional> deviceQueryParameter, + Optional language) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(lineup, "lineup"); + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + Utils.checkNotNull(language, "language"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.lineup = lineup; + this.deviceQueryParameter = deviceQueryParameter; + this.language = language; + } + + public CreateDVRRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The EPG lineup. + */ + @JsonIgnore + public Optional lineup() { + return lineup; + } + + /** + * The device. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> deviceQueryParameter() { + return (Optional>) deviceQueryParameter; + } + + /** + * The language. + */ + @JsonIgnore + public Optional language() { + return language; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreateDVRRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreateDVRRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public CreateDVRRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CreateDVRRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public CreateDVRRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CreateDVRRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public CreateDVRRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CreateDVRRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CreateDVRRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CreateDVRRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CreateDVRRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CreateDVRRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CreateDVRRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CreateDVRRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CreateDVRRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CreateDVRRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CreateDVRRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CreateDVRRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CreateDVRRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CreateDVRRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CreateDVRRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CreateDVRRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The EPG lineup. + */ + public CreateDVRRequest withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + /** + * The EPG lineup. + */ + public CreateDVRRequest withLineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + /** + * The device. + */ + public CreateDVRRequest withDeviceQueryParameter(List deviceQueryParameter) { + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + this.deviceQueryParameter = Optional.ofNullable(deviceQueryParameter); + return this; + } + + + /** + * The device. + */ + public CreateDVRRequest withDeviceQueryParameter(Optional> deviceQueryParameter) { + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + this.deviceQueryParameter = deviceQueryParameter; + return this; + } + + /** + * The language. + */ + public CreateDVRRequest withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + /** + * The language. + */ + public CreateDVRRequest withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDVRRequest other = (CreateDVRRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.lineup, other.lineup) && + Utils.enhancedDeepEquals(this.deviceQueryParameter, other.deviceQueryParameter) && + Utils.enhancedDeepEquals(this.language, other.language); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, lineup, + deviceQueryParameter, language); + } + + @Override + public String toString() { + return Utils.toString(CreateDVRRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "lineup", lineup, + "deviceQueryParameter", deviceQueryParameter, + "language", language); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional lineup = Optional.empty(); + + private Optional> deviceQueryParameter = Optional.empty(); + + private Optional language = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The EPG lineup. + */ + public Builder lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + /** + * The EPG lineup. + */ + public Builder lineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + + /** + * The device. + */ + public Builder deviceQueryParameter(List deviceQueryParameter) { + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + this.deviceQueryParameter = Optional.ofNullable(deviceQueryParameter); + return this; + } + + /** + * The device. + */ + public Builder deviceQueryParameter(Optional> deviceQueryParameter) { + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + this.deviceQueryParameter = deviceQueryParameter; + return this; + } + + + /** + * The language. + */ + public Builder language(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + /** + * The language. + */ + public Builder language(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public CreateDVRRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new CreateDVRRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, lineup, + deviceQueryParameter, language); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateDVRRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateDVRRequestBuilder.java new file mode 100644 index 00000000..69473091 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateDVRRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CreateDVR; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class CreateDVRRequestBuilder { + + private CreateDVRRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreateDVRRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateDVRRequestBuilder request(CreateDVRRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreateDVRResponse call() throws Exception { + + RequestOperation operation + = new CreateDVR.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateDVRResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateDVRResponse.java new file mode 100644 index 00000000..17e373b1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateDVRResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.DvrRequestHandlerSlashGetResponses200; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class CreateDVRResponse 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; + + /** + * OK + */ + private Optional dvrRequestHandlerSlashGetResponses200; + + + private Map> headers; + + @JsonCreator + public CreateDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional dvrRequestHandlerSlashGetResponses200, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(dvrRequestHandlerSlashGetResponses200, "dvrRequestHandlerSlashGetResponses200"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.dvrRequestHandlerSlashGetResponses200 = dvrRequestHandlerSlashGetResponses200; + this.headers = headers; + } + + public CreateDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional dvrRequestHandlerSlashGetResponses200() { + return (Optional) dvrRequestHandlerSlashGetResponses200; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateDVRResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateDVRResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateDVRResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateDVRResponse withDvrRequestHandlerSlashGetResponses200(DvrRequestHandlerSlashGetResponses200 dvrRequestHandlerSlashGetResponses200) { + Utils.checkNotNull(dvrRequestHandlerSlashGetResponses200, "dvrRequestHandlerSlashGetResponses200"); + this.dvrRequestHandlerSlashGetResponses200 = Optional.ofNullable(dvrRequestHandlerSlashGetResponses200); + return this; + } + + + /** + * OK + */ + public CreateDVRResponse withDvrRequestHandlerSlashGetResponses200(Optional dvrRequestHandlerSlashGetResponses200) { + Utils.checkNotNull(dvrRequestHandlerSlashGetResponses200, "dvrRequestHandlerSlashGetResponses200"); + this.dvrRequestHandlerSlashGetResponses200 = dvrRequestHandlerSlashGetResponses200; + return this; + } + + public CreateDVRResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDVRResponse other = (CreateDVRResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.dvrRequestHandlerSlashGetResponses200, other.dvrRequestHandlerSlashGetResponses200) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + dvrRequestHandlerSlashGetResponses200, headers); + } + + @Override + public String toString() { + return Utils.toString(CreateDVRResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "dvrRequestHandlerSlashGetResponses200", dvrRequestHandlerSlashGetResponses200, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional dvrRequestHandlerSlashGetResponses200 = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder dvrRequestHandlerSlashGetResponses200(DvrRequestHandlerSlashGetResponses200 dvrRequestHandlerSlashGetResponses200) { + Utils.checkNotNull(dvrRequestHandlerSlashGetResponses200, "dvrRequestHandlerSlashGetResponses200"); + this.dvrRequestHandlerSlashGetResponses200 = Optional.ofNullable(dvrRequestHandlerSlashGetResponses200); + return this; + } + + /** + * OK + */ + public Builder dvrRequestHandlerSlashGetResponses200(Optional dvrRequestHandlerSlashGetResponses200) { + Utils.checkNotNull(dvrRequestHandlerSlashGetResponses200, "dvrRequestHandlerSlashGetResponses200"); + this.dvrRequestHandlerSlashGetResponses200 = dvrRequestHandlerSlashGetResponses200; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public CreateDVRResponse build() { + + return new CreateDVRResponse( + contentType, statusCode, rawResponse, + dvrRequestHandlerSlashGetResponses200, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueMediaContainer.java new file mode 100644 index 00000000..dd8ebbd9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * CreateDownloadQueueMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class CreateDownloadQueueMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DownloadQueue") + private Optional> downloadQueue; + + @JsonCreator + public CreateDownloadQueueMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("DownloadQueue") Optional> downloadQueue) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(downloadQueue, "downloadQueue"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.downloadQueue = downloadQueue; + } + + public CreateDownloadQueueMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> downloadQueue() { + return (Optional>) downloadQueue; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateDownloadQueueMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public CreateDownloadQueueMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public CreateDownloadQueueMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public CreateDownloadQueueMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public CreateDownloadQueueMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public CreateDownloadQueueMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public CreateDownloadQueueMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public CreateDownloadQueueMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public CreateDownloadQueueMediaContainer withDownloadQueue(List downloadQueue) { + Utils.checkNotNull(downloadQueue, "downloadQueue"); + this.downloadQueue = Optional.ofNullable(downloadQueue); + return this; + } + + + public CreateDownloadQueueMediaContainer withDownloadQueue(Optional> downloadQueue) { + Utils.checkNotNull(downloadQueue, "downloadQueue"); + this.downloadQueue = downloadQueue; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDownloadQueueMediaContainer other = (CreateDownloadQueueMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.downloadQueue, other.downloadQueue); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, downloadQueue); + } + + @Override + public String toString() { + return Utils.toString(CreateDownloadQueueMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "downloadQueue", downloadQueue); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> downloadQueue = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder downloadQueue(List downloadQueue) { + Utils.checkNotNull(downloadQueue, "downloadQueue"); + this.downloadQueue = Optional.ofNullable(downloadQueue); + return this; + } + + public Builder downloadQueue(Optional> downloadQueue) { + Utils.checkNotNull(downloadQueue, "downloadQueue"); + this.downloadQueue = downloadQueue; + return this; + } + + public CreateDownloadQueueMediaContainer build() { + + return new CreateDownloadQueueMediaContainer( + identifier, offset, size, + totalSize, downloadQueue); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueRequestBuilder.java new file mode 100644 index 00000000..bb346ac8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CreateDownloadQueue; +import java.lang.Exception; + +public class CreateDownloadQueueRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public CreateDownloadQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateDownloadQueueResponse call() throws Exception { + + RequestlessOperation operation + = new CreateDownloadQueue.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueResponse.java new file mode 100644 index 00000000..e9fa3563 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class CreateDownloadQueueResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public CreateDownloadQueueResponse( + 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 CreateDownloadQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateDownloadQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateDownloadQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateDownloadQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateDownloadQueueResponse withObject(CreateDownloadQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public CreateDownloadQueueResponse 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; + } + CreateDownloadQueueResponse other = (CreateDownloadQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(CreateDownloadQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(CreateDownloadQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreateDownloadQueueResponse build() { + + return new CreateDownloadQueueResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueResponseBody.java new file mode 100644 index 00000000..0a9f9859 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateDownloadQueueResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * CreateDownloadQueueResponseBody + * + *

OK + */ +public class CreateDownloadQueueResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public CreateDownloadQueueResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public CreateDownloadQueueResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateDownloadQueueResponseBody withMediaContainer(CreateDownloadQueueMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public CreateDownloadQueueResponseBody 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; + } + CreateDownloadQueueResponseBody other = (CreateDownloadQueueResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(CreateDownloadQueueResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(CreateDownloadQueueMediaContainer 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 CreateDownloadQueueResponseBody build() { + + return new CreateDownloadQueueResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerMediaContainer.java new file mode 100644 index 00000000..bb01ab5a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerMediaContainer.java @@ -0,0 +1,599 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +/** + * CreateMarkerMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class CreateMarkerMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("color") + private Optional color; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("endTimeOffset") + private Optional endTimeOffset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("startTimeOffset") + private Optional startTimeOffset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public CreateMarkerMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("color") Optional color, + @JsonProperty("endTimeOffset") Optional endTimeOffset, + @JsonProperty("id") Optional id, + @JsonProperty("startTimeOffset") Optional startTimeOffset, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(color, "color"); + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.color = color; + this.endTimeOffset = endTimeOffset; + this.id = id; + this.startTimeOffset = startTimeOffset; + this.title = title; + this.type = type; + this.additionalProperties = new HashMap<>(); + } + + public CreateMarkerMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @JsonIgnore + public Optional color() { + return color; + } + + @JsonIgnore + public Optional endTimeOffset() { + return endTimeOffset; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional startTimeOffset() { + return startTimeOffset; + } + + @JsonIgnore + public Optional title() { + return title; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateMarkerMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public CreateMarkerMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public CreateMarkerMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public CreateMarkerMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public CreateMarkerMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public CreateMarkerMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public CreateMarkerMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public CreateMarkerMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public CreateMarkerMediaContainer withColor(String color) { + Utils.checkNotNull(color, "color"); + this.color = Optional.ofNullable(color); + return this; + } + + + public CreateMarkerMediaContainer withColor(Optional color) { + Utils.checkNotNull(color, "color"); + this.color = color; + return this; + } + + public CreateMarkerMediaContainer withEndTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = Optional.ofNullable(endTimeOffset); + return this; + } + + + public CreateMarkerMediaContainer withEndTimeOffset(Optional endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + public CreateMarkerMediaContainer withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public CreateMarkerMediaContainer withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public CreateMarkerMediaContainer withStartTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = Optional.ofNullable(startTimeOffset); + return this; + } + + + public CreateMarkerMediaContainer withStartTimeOffset(Optional startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + return this; + } + + public CreateMarkerMediaContainer withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public CreateMarkerMediaContainer withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public CreateMarkerMediaContainer withType(CreateMarkerType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public CreateMarkerMediaContainer withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + @JsonAnySetter + public CreateMarkerMediaContainer withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public CreateMarkerMediaContainer withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateMarkerMediaContainer other = (CreateMarkerMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.color, other.color) && + Utils.enhancedDeepEquals(this.endTimeOffset, other.endTimeOffset) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.startTimeOffset, other.startTimeOffset) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, color, endTimeOffset, + id, startTimeOffset, title, + type, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(CreateMarkerMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "color", color, + "endTimeOffset", endTimeOffset, + "id", id, + "startTimeOffset", startTimeOffset, + "title", title, + "type", type, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional color = Optional.empty(); + + private Optional endTimeOffset = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional startTimeOffset = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder color(String color) { + Utils.checkNotNull(color, "color"); + this.color = Optional.ofNullable(color); + return this; + } + + public Builder color(Optional color) { + Utils.checkNotNull(color, "color"); + this.color = color; + return this; + } + + + public Builder endTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = Optional.ofNullable(endTimeOffset); + return this; + } + + public Builder endTimeOffset(Optional endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + + public Builder id(long 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 startTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = Optional.ofNullable(startTimeOffset); + return this; + } + + public Builder startTimeOffset(Optional startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + 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(CreateMarkerType 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 additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public CreateMarkerMediaContainer build() { + + return new CreateMarkerMediaContainer( + identifier, offset, size, + totalSize, color, endTimeOffset, + id, startTimeOffset, title, + type) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerRequest.java new file mode 100644 index 00000000..8cf5423b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerRequest.java @@ -0,0 +1,976 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class CreateMarkerRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + /** + * The type of marker to edit/create + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private long type; + + /** + * The start time of the marker + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=startTimeOffset") + private long startTimeOffset; + + /** + * The end time of the marker + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=endTimeOffset") + private Optional endTimeOffset; + + /** + * The attributes to assign to this marker + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=attributes") + private Optional attributes; + + @JsonCreator + public CreateMarkerRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + long type, + long startTimeOffset, + Optional endTimeOffset, + Optional attributes) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + Utils.checkNotNull(attributes, "attributes"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.type = type; + this.startTimeOffset = startTimeOffset; + this.endTimeOffset = endTimeOffset; + this.attributes = attributes; + } + + public CreateMarkerRequest( + String ids, + long type, + long startTimeOffset) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + type, startTimeOffset, Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + /** + * The type of marker to edit/create + */ + @JsonIgnore + public long type() { + return type; + } + + /** + * The start time of the marker + */ + @JsonIgnore + public long startTimeOffset() { + return startTimeOffset; + } + + /** + * The end time of the marker + */ + @JsonIgnore + public Optional endTimeOffset() { + return endTimeOffset; + } + + /** + * The attributes to assign to this marker + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional attributes() { + return (Optional) attributes; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreateMarkerRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreateMarkerRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public CreateMarkerRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CreateMarkerRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public CreateMarkerRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CreateMarkerRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public CreateMarkerRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CreateMarkerRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CreateMarkerRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CreateMarkerRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CreateMarkerRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CreateMarkerRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CreateMarkerRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CreateMarkerRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CreateMarkerRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CreateMarkerRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CreateMarkerRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CreateMarkerRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CreateMarkerRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CreateMarkerRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CreateMarkerRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CreateMarkerRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public CreateMarkerRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * The type of marker to edit/create + */ + public CreateMarkerRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The start time of the marker + */ + public CreateMarkerRequest withStartTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + return this; + } + + /** + * The end time of the marker + */ + public CreateMarkerRequest withEndTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = Optional.ofNullable(endTimeOffset); + return this; + } + + + /** + * The end time of the marker + */ + public CreateMarkerRequest withEndTimeOffset(Optional endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + /** + * The attributes to assign to this marker + */ + public CreateMarkerRequest withAttributes(Attributes attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = Optional.ofNullable(attributes); + return this; + } + + + /** + * The attributes to assign to this marker + */ + public CreateMarkerRequest withAttributes(Optional attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = attributes; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateMarkerRequest other = (CreateMarkerRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.startTimeOffset, other.startTimeOffset) && + Utils.enhancedDeepEquals(this.endTimeOffset, other.endTimeOffset) && + Utils.enhancedDeepEquals(this.attributes, other.attributes); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + type, startTimeOffset, endTimeOffset, + attributes); + } + + @Override + public String toString() { + return Utils.toString(CreateMarkerRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "type", type, + "startTimeOffset", startTimeOffset, + "endTimeOffset", endTimeOffset, + "attributes", attributes); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Long type; + + private Long startTimeOffset; + + private Optional endTimeOffset = Optional.empty(); + + private Optional attributes = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * The type of marker to edit/create + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The start time of the marker + */ + public Builder startTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + return this; + } + + + /** + * The end time of the marker + */ + public Builder endTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = Optional.ofNullable(endTimeOffset); + return this; + } + + /** + * The end time of the marker + */ + public Builder endTimeOffset(Optional endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + + /** + * The attributes to assign to this marker + */ + public Builder attributes(Attributes attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + * The attributes to assign to this marker + */ + public Builder attributes(Optional attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = attributes; + return this; + } + + public CreateMarkerRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new CreateMarkerRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + type, startTimeOffset, endTimeOffset, + attributes); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerRequestBuilder.java new file mode 100644 index 00000000..3016db65 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CreateMarker; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class CreateMarkerRequestBuilder { + + private CreateMarkerRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreateMarkerRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateMarkerRequestBuilder request(CreateMarkerRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreateMarkerResponse call() throws Exception { + + RequestOperation operation + = new CreateMarker.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerResponse.java new file mode 100644 index 00000000..c8b139ed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class CreateMarkerResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public CreateMarkerResponse( + 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 CreateMarkerResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateMarkerResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateMarkerResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateMarkerResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateMarkerResponse withObject(CreateMarkerResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public CreateMarkerResponse 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; + } + CreateMarkerResponse other = (CreateMarkerResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(CreateMarkerResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(CreateMarkerResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreateMarkerResponse build() { + + return new CreateMarkerResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerResponseBody.java new file mode 100644 index 00000000..fc0524ce --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * CreateMarkerResponseBody + * + *

OK + */ +public class CreateMarkerResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public CreateMarkerResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public CreateMarkerResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateMarkerResponseBody withMediaContainer(CreateMarkerMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public CreateMarkerResponseBody 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; + } + CreateMarkerResponseBody other = (CreateMarkerResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(CreateMarkerResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(CreateMarkerMediaContainer 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 CreateMarkerResponseBody build() { + + return new CreateMarkerResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerType.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerType.java new file mode 100644 index 00000000..33bd4207 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateMarkerType.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum CreateMarkerType { + INTRO("intro"), + COMMERCIAL("commercial"), + BOOKMARK("bookmark"), + RESUME("resume"), + CREDIT("credit"); + + @JsonValue + private final String value; + + CreateMarkerType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (CreateMarkerType o: CreateMarkerType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueMediaContainer.java new file mode 100644 index 00000000..e7780376 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueMediaContainer.java @@ -0,0 +1,834 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * CreatePlayQueueMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class CreatePlayQueueMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * The ID of the play queue, which is used in subsequent requests. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playQueueID") + private Optional playQueueID; + + /** + * Defines where the "Up Next" region starts + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playQueueLastAddedItemID") + private Optional playQueueLastAddedItemID; + + /** + * The queue item ID of the currently selected item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playQueueSelectedItemID") + private Optional playQueueSelectedItemID; + + /** + * The offset of the selected item in the play queue, from the beginning of the queue. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playQueueSelectedItemOffset") + private Optional playQueueSelectedItemOffset; + + /** + * The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playQueueSelectedMetadataItemID") + private Optional playQueueSelectedMetadataItemID; + + /** + * Whether or not the queue is shuffled. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playQueueShuffled") + private Optional playQueueShuffled; + + /** + * The original URI used to create the play queue. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playQueueSourceURI") + private Optional playQueueSourceURI; + + /** + * The total number of items in the play queue. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playQueueTotalCount") + private Optional playQueueTotalCount; + + /** + * The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playQueueVersion") + private Optional playQueueVersion; + + @JsonCreator + public CreatePlayQueueMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("playQueueID") Optional playQueueID, + @JsonProperty("playQueueLastAddedItemID") Optional playQueueLastAddedItemID, + @JsonProperty("playQueueSelectedItemID") Optional playQueueSelectedItemID, + @JsonProperty("playQueueSelectedItemOffset") Optional playQueueSelectedItemOffset, + @JsonProperty("playQueueSelectedMetadataItemID") Optional playQueueSelectedMetadataItemID, + @JsonProperty("playQueueShuffled") Optional playQueueShuffled, + @JsonProperty("playQueueSourceURI") Optional playQueueSourceURI, + @JsonProperty("playQueueTotalCount") Optional playQueueTotalCount, + @JsonProperty("playQueueVersion") Optional playQueueVersion) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(playQueueID, "playQueueID"); + Utils.checkNotNull(playQueueLastAddedItemID, "playQueueLastAddedItemID"); + Utils.checkNotNull(playQueueSelectedItemID, "playQueueSelectedItemID"); + Utils.checkNotNull(playQueueSelectedItemOffset, "playQueueSelectedItemOffset"); + Utils.checkNotNull(playQueueSelectedMetadataItemID, "playQueueSelectedMetadataItemID"); + Utils.checkNotNull(playQueueShuffled, "playQueueShuffled"); + Utils.checkNotNull(playQueueSourceURI, "playQueueSourceURI"); + Utils.checkNotNull(playQueueTotalCount, "playQueueTotalCount"); + Utils.checkNotNull(playQueueVersion, "playQueueVersion"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.playQueueID = playQueueID; + this.playQueueLastAddedItemID = playQueueLastAddedItemID; + this.playQueueSelectedItemID = playQueueSelectedItemID; + this.playQueueSelectedItemOffset = playQueueSelectedItemOffset; + this.playQueueSelectedMetadataItemID = playQueueSelectedMetadataItemID; + this.playQueueShuffled = playQueueShuffled; + this.playQueueSourceURI = playQueueSourceURI; + this.playQueueTotalCount = playQueueTotalCount; + this.playQueueVersion = playQueueVersion; + } + + public CreatePlayQueueMediaContainer() { + 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()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * The ID of the play queue, which is used in subsequent requests. + */ + @JsonIgnore + public Optional playQueueID() { + return playQueueID; + } + + /** + * Defines where the "Up Next" region starts + */ + @JsonIgnore + public Optional playQueueLastAddedItemID() { + return playQueueLastAddedItemID; + } + + /** + * The queue item ID of the currently selected item. + */ + @JsonIgnore + public Optional playQueueSelectedItemID() { + return playQueueSelectedItemID; + } + + /** + * The offset of the selected item in the play queue, from the beginning of the queue. + */ + @JsonIgnore + public Optional playQueueSelectedItemOffset() { + return playQueueSelectedItemOffset; + } + + /** + * The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library). + */ + @JsonIgnore + public Optional playQueueSelectedMetadataItemID() { + return playQueueSelectedMetadataItemID; + } + + /** + * Whether or not the queue is shuffled. + */ + @JsonIgnore + public Optional playQueueShuffled() { + return playQueueShuffled; + } + + /** + * The original URI used to create the play queue. + */ + @JsonIgnore + public Optional playQueueSourceURI() { + return playQueueSourceURI; + } + + /** + * The total number of items in the play queue. + */ + @JsonIgnore + public Optional playQueueTotalCount() { + return playQueueTotalCount; + } + + /** + * The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh. + */ + @JsonIgnore + public Optional playQueueVersion() { + return playQueueVersion; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreatePlayQueueMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public CreatePlayQueueMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public CreatePlayQueueMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public CreatePlayQueueMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public CreatePlayQueueMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public CreatePlayQueueMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public CreatePlayQueueMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public CreatePlayQueueMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * The ID of the play queue, which is used in subsequent requests. + */ + public CreatePlayQueueMediaContainer withPlayQueueID(long playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = Optional.ofNullable(playQueueID); + return this; + } + + + /** + * The ID of the play queue, which is used in subsequent requests. + */ + public CreatePlayQueueMediaContainer withPlayQueueID(Optional playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = playQueueID; + return this; + } + + /** + * Defines where the "Up Next" region starts + */ + public CreatePlayQueueMediaContainer withPlayQueueLastAddedItemID(String playQueueLastAddedItemID) { + Utils.checkNotNull(playQueueLastAddedItemID, "playQueueLastAddedItemID"); + this.playQueueLastAddedItemID = Optional.ofNullable(playQueueLastAddedItemID); + return this; + } + + + /** + * Defines where the "Up Next" region starts + */ + public CreatePlayQueueMediaContainer withPlayQueueLastAddedItemID(Optional playQueueLastAddedItemID) { + Utils.checkNotNull(playQueueLastAddedItemID, "playQueueLastAddedItemID"); + this.playQueueLastAddedItemID = playQueueLastAddedItemID; + return this; + } + + /** + * The queue item ID of the currently selected item. + */ + public CreatePlayQueueMediaContainer withPlayQueueSelectedItemID(long playQueueSelectedItemID) { + Utils.checkNotNull(playQueueSelectedItemID, "playQueueSelectedItemID"); + this.playQueueSelectedItemID = Optional.ofNullable(playQueueSelectedItemID); + return this; + } + + + /** + * The queue item ID of the currently selected item. + */ + public CreatePlayQueueMediaContainer withPlayQueueSelectedItemID(Optional playQueueSelectedItemID) { + Utils.checkNotNull(playQueueSelectedItemID, "playQueueSelectedItemID"); + this.playQueueSelectedItemID = playQueueSelectedItemID; + return this; + } + + /** + * The offset of the selected item in the play queue, from the beginning of the queue. + */ + public CreatePlayQueueMediaContainer withPlayQueueSelectedItemOffset(long playQueueSelectedItemOffset) { + Utils.checkNotNull(playQueueSelectedItemOffset, "playQueueSelectedItemOffset"); + this.playQueueSelectedItemOffset = Optional.ofNullable(playQueueSelectedItemOffset); + return this; + } + + + /** + * The offset of the selected item in the play queue, from the beginning of the queue. + */ + public CreatePlayQueueMediaContainer withPlayQueueSelectedItemOffset(Optional playQueueSelectedItemOffset) { + Utils.checkNotNull(playQueueSelectedItemOffset, "playQueueSelectedItemOffset"); + this.playQueueSelectedItemOffset = playQueueSelectedItemOffset; + return this; + } + + /** + * The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library). + */ + public CreatePlayQueueMediaContainer withPlayQueueSelectedMetadataItemID(long playQueueSelectedMetadataItemID) { + Utils.checkNotNull(playQueueSelectedMetadataItemID, "playQueueSelectedMetadataItemID"); + this.playQueueSelectedMetadataItemID = Optional.ofNullable(playQueueSelectedMetadataItemID); + return this; + } + + + /** + * The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library). + */ + public CreatePlayQueueMediaContainer withPlayQueueSelectedMetadataItemID(Optional playQueueSelectedMetadataItemID) { + Utils.checkNotNull(playQueueSelectedMetadataItemID, "playQueueSelectedMetadataItemID"); + this.playQueueSelectedMetadataItemID = playQueueSelectedMetadataItemID; + return this; + } + + /** + * Whether or not the queue is shuffled. + */ + public CreatePlayQueueMediaContainer withPlayQueueShuffled(boolean playQueueShuffled) { + Utils.checkNotNull(playQueueShuffled, "playQueueShuffled"); + this.playQueueShuffled = Optional.ofNullable(playQueueShuffled); + return this; + } + + + /** + * Whether or not the queue is shuffled. + */ + public CreatePlayQueueMediaContainer withPlayQueueShuffled(Optional playQueueShuffled) { + Utils.checkNotNull(playQueueShuffled, "playQueueShuffled"); + this.playQueueShuffled = playQueueShuffled; + return this; + } + + /** + * The original URI used to create the play queue. + */ + public CreatePlayQueueMediaContainer withPlayQueueSourceURI(String playQueueSourceURI) { + Utils.checkNotNull(playQueueSourceURI, "playQueueSourceURI"); + this.playQueueSourceURI = Optional.ofNullable(playQueueSourceURI); + return this; + } + + + /** + * The original URI used to create the play queue. + */ + public CreatePlayQueueMediaContainer withPlayQueueSourceURI(Optional playQueueSourceURI) { + Utils.checkNotNull(playQueueSourceURI, "playQueueSourceURI"); + this.playQueueSourceURI = playQueueSourceURI; + return this; + } + + /** + * The total number of items in the play queue. + */ + public CreatePlayQueueMediaContainer withPlayQueueTotalCount(long playQueueTotalCount) { + Utils.checkNotNull(playQueueTotalCount, "playQueueTotalCount"); + this.playQueueTotalCount = Optional.ofNullable(playQueueTotalCount); + return this; + } + + + /** + * The total number of items in the play queue. + */ + public CreatePlayQueueMediaContainer withPlayQueueTotalCount(Optional playQueueTotalCount) { + Utils.checkNotNull(playQueueTotalCount, "playQueueTotalCount"); + this.playQueueTotalCount = playQueueTotalCount; + return this; + } + + /** + * The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh. + */ + public CreatePlayQueueMediaContainer withPlayQueueVersion(long playQueueVersion) { + Utils.checkNotNull(playQueueVersion, "playQueueVersion"); + this.playQueueVersion = Optional.ofNullable(playQueueVersion); + return this; + } + + + /** + * The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh. + */ + public CreatePlayQueueMediaContainer withPlayQueueVersion(Optional playQueueVersion) { + Utils.checkNotNull(playQueueVersion, "playQueueVersion"); + this.playQueueVersion = playQueueVersion; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlayQueueMediaContainer other = (CreatePlayQueueMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.playQueueID, other.playQueueID) && + Utils.enhancedDeepEquals(this.playQueueLastAddedItemID, other.playQueueLastAddedItemID) && + Utils.enhancedDeepEquals(this.playQueueSelectedItemID, other.playQueueSelectedItemID) && + Utils.enhancedDeepEquals(this.playQueueSelectedItemOffset, other.playQueueSelectedItemOffset) && + Utils.enhancedDeepEquals(this.playQueueSelectedMetadataItemID, other.playQueueSelectedMetadataItemID) && + Utils.enhancedDeepEquals(this.playQueueShuffled, other.playQueueShuffled) && + Utils.enhancedDeepEquals(this.playQueueSourceURI, other.playQueueSourceURI) && + Utils.enhancedDeepEquals(this.playQueueTotalCount, other.playQueueTotalCount) && + Utils.enhancedDeepEquals(this.playQueueVersion, other.playQueueVersion); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, playQueueID, playQueueLastAddedItemID, + playQueueSelectedItemID, playQueueSelectedItemOffset, playQueueSelectedMetadataItemID, + playQueueShuffled, playQueueSourceURI, playQueueTotalCount, + playQueueVersion); + } + + @Override + public String toString() { + return Utils.toString(CreatePlayQueueMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "playQueueID", playQueueID, + "playQueueLastAddedItemID", playQueueLastAddedItemID, + "playQueueSelectedItemID", playQueueSelectedItemID, + "playQueueSelectedItemOffset", playQueueSelectedItemOffset, + "playQueueSelectedMetadataItemID", playQueueSelectedMetadataItemID, + "playQueueShuffled", playQueueShuffled, + "playQueueSourceURI", playQueueSourceURI, + "playQueueTotalCount", playQueueTotalCount, + "playQueueVersion", playQueueVersion); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional playQueueID = Optional.empty(); + + private Optional playQueueLastAddedItemID = Optional.empty(); + + private Optional playQueueSelectedItemID = Optional.empty(); + + private Optional playQueueSelectedItemOffset = Optional.empty(); + + private Optional playQueueSelectedMetadataItemID = Optional.empty(); + + private Optional playQueueShuffled = Optional.empty(); + + private Optional playQueueSourceURI = Optional.empty(); + + private Optional playQueueTotalCount = Optional.empty(); + + private Optional playQueueVersion = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * The ID of the play queue, which is used in subsequent requests. + */ + public Builder playQueueID(long playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = Optional.ofNullable(playQueueID); + return this; + } + + /** + * The ID of the play queue, which is used in subsequent requests. + */ + public Builder playQueueID(Optional playQueueID) { + Utils.checkNotNull(playQueueID, "playQueueID"); + this.playQueueID = playQueueID; + return this; + } + + + /** + * Defines where the "Up Next" region starts + */ + public Builder playQueueLastAddedItemID(String playQueueLastAddedItemID) { + Utils.checkNotNull(playQueueLastAddedItemID, "playQueueLastAddedItemID"); + this.playQueueLastAddedItemID = Optional.ofNullable(playQueueLastAddedItemID); + return this; + } + + /** + * Defines where the "Up Next" region starts + */ + public Builder playQueueLastAddedItemID(Optional playQueueLastAddedItemID) { + Utils.checkNotNull(playQueueLastAddedItemID, "playQueueLastAddedItemID"); + this.playQueueLastAddedItemID = playQueueLastAddedItemID; + return this; + } + + + /** + * The queue item ID of the currently selected item. + */ + public Builder playQueueSelectedItemID(long playQueueSelectedItemID) { + Utils.checkNotNull(playQueueSelectedItemID, "playQueueSelectedItemID"); + this.playQueueSelectedItemID = Optional.ofNullable(playQueueSelectedItemID); + return this; + } + + /** + * The queue item ID of the currently selected item. + */ + public Builder playQueueSelectedItemID(Optional playQueueSelectedItemID) { + Utils.checkNotNull(playQueueSelectedItemID, "playQueueSelectedItemID"); + this.playQueueSelectedItemID = playQueueSelectedItemID; + return this; + } + + + /** + * The offset of the selected item in the play queue, from the beginning of the queue. + */ + public Builder playQueueSelectedItemOffset(long playQueueSelectedItemOffset) { + Utils.checkNotNull(playQueueSelectedItemOffset, "playQueueSelectedItemOffset"); + this.playQueueSelectedItemOffset = Optional.ofNullable(playQueueSelectedItemOffset); + return this; + } + + /** + * The offset of the selected item in the play queue, from the beginning of the queue. + */ + public Builder playQueueSelectedItemOffset(Optional playQueueSelectedItemOffset) { + Utils.checkNotNull(playQueueSelectedItemOffset, "playQueueSelectedItemOffset"); + this.playQueueSelectedItemOffset = playQueueSelectedItemOffset; + return this; + } + + + /** + * The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library). + */ + public Builder playQueueSelectedMetadataItemID(long playQueueSelectedMetadataItemID) { + Utils.checkNotNull(playQueueSelectedMetadataItemID, "playQueueSelectedMetadataItemID"); + this.playQueueSelectedMetadataItemID = Optional.ofNullable(playQueueSelectedMetadataItemID); + return this; + } + + /** + * The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library). + */ + public Builder playQueueSelectedMetadataItemID(Optional playQueueSelectedMetadataItemID) { + Utils.checkNotNull(playQueueSelectedMetadataItemID, "playQueueSelectedMetadataItemID"); + this.playQueueSelectedMetadataItemID = playQueueSelectedMetadataItemID; + return this; + } + + + /** + * Whether or not the queue is shuffled. + */ + public Builder playQueueShuffled(boolean playQueueShuffled) { + Utils.checkNotNull(playQueueShuffled, "playQueueShuffled"); + this.playQueueShuffled = Optional.ofNullable(playQueueShuffled); + return this; + } + + /** + * Whether or not the queue is shuffled. + */ + public Builder playQueueShuffled(Optional playQueueShuffled) { + Utils.checkNotNull(playQueueShuffled, "playQueueShuffled"); + this.playQueueShuffled = playQueueShuffled; + return this; + } + + + /** + * The original URI used to create the play queue. + */ + public Builder playQueueSourceURI(String playQueueSourceURI) { + Utils.checkNotNull(playQueueSourceURI, "playQueueSourceURI"); + this.playQueueSourceURI = Optional.ofNullable(playQueueSourceURI); + return this; + } + + /** + * The original URI used to create the play queue. + */ + public Builder playQueueSourceURI(Optional playQueueSourceURI) { + Utils.checkNotNull(playQueueSourceURI, "playQueueSourceURI"); + this.playQueueSourceURI = playQueueSourceURI; + return this; + } + + + /** + * The total number of items in the play queue. + */ + public Builder playQueueTotalCount(long playQueueTotalCount) { + Utils.checkNotNull(playQueueTotalCount, "playQueueTotalCount"); + this.playQueueTotalCount = Optional.ofNullable(playQueueTotalCount); + return this; + } + + /** + * The total number of items in the play queue. + */ + public Builder playQueueTotalCount(Optional playQueueTotalCount) { + Utils.checkNotNull(playQueueTotalCount, "playQueueTotalCount"); + this.playQueueTotalCount = playQueueTotalCount; + return this; + } + + + /** + * The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh. + */ + public Builder playQueueVersion(long playQueueVersion) { + Utils.checkNotNull(playQueueVersion, "playQueueVersion"); + this.playQueueVersion = Optional.ofNullable(playQueueVersion); + return this; + } + + /** + * The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh. + */ + public Builder playQueueVersion(Optional playQueueVersion) { + Utils.checkNotNull(playQueueVersion, "playQueueVersion"); + this.playQueueVersion = playQueueVersion; + return this; + } + + public CreatePlayQueueMediaContainer build() { + + return new CreatePlayQueueMediaContainer( + identifier, offset, size, + totalSize, playQueueID, playQueueLastAddedItemID, + playQueueSelectedItemID, playQueueSelectedItemOffset, playQueueSelectedMetadataItemID, + playQueueShuffled, playQueueSourceURI, playQueueTotalCount, + playQueueVersion); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueRequest.java new file mode 100644 index 00000000..31d9f21c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueRequest.java @@ -0,0 +1,1326 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class CreatePlayQueueRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The content URI for what we're playing. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") + private Optional uri; + + /** + * the ID of the playlist we're playing. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playlistID") + private Optional playlistID; + + /** + * The type of play queue to create + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Type type; + + /** + * The key of the first item to play, defaults to the first in the play queue. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") + private Optional key; + + /** + * Whether to shuffle the playlist, defaults to 0. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=shuffle") + private Optional shuffle; + + /** + * If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=repeat") + private Optional repeat; + + /** + * Whether to create a continuous play queue (e.g. from an episode), defaults to 0. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=continuous") + private Optional continuous; + + /** + * Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie `extrasPrefixCount` should be omitted as a parameter instead of passing 0. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=extrasPrefixCount") + private Optional extrasPrefixCount; + + /** + * Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=recursive") + private Optional recursive; + + /** + * Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=onDeck") + private Optional onDeck; + + @JsonCreator + public CreatePlayQueueRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional uri, + Optional playlistID, + Type type, + Optional key, + Optional shuffle, + Optional repeat, + Optional continuous, + Optional extrasPrefixCount, + Optional recursive, + Optional onDeck) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(uri, "uri"); + Utils.checkNotNull(playlistID, "playlistID"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(shuffle, "shuffle"); + Utils.checkNotNull(repeat, "repeat"); + Utils.checkNotNull(continuous, "continuous"); + Utils.checkNotNull(extrasPrefixCount, "extrasPrefixCount"); + Utils.checkNotNull(recursive, "recursive"); + Utils.checkNotNull(onDeck, "onDeck"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.uri = uri; + this.playlistID = playlistID; + this.type = type; + this.key = key; + this.shuffle = shuffle; + this.repeat = repeat; + this.continuous = continuous; + this.extrasPrefixCount = extrasPrefixCount; + this.recursive = recursive; + this.onDeck = onDeck; + } + + public CreatePlayQueueRequest( + Type type) { + 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(), type, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The content URI for what we're playing. + */ + @JsonIgnore + public Optional uri() { + return uri; + } + + /** + * the ID of the playlist we're playing. + */ + @JsonIgnore + public Optional playlistID() { + return playlistID; + } + + /** + * The type of play queue to create + */ + @JsonIgnore + public Type type() { + return type; + } + + /** + * The key of the first item to play, defaults to the first in the play queue. + */ + @JsonIgnore + public Optional key() { + return key; + } + + /** + * Whether to shuffle the playlist, defaults to 0. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional shuffle() { + return (Optional) shuffle; + } + + /** + * If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional repeat() { + return (Optional) repeat; + } + + /** + * Whether to create a continuous play queue (e.g. from an episode), defaults to 0. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional continuous() { + return (Optional) continuous; + } + + /** + * Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie `extrasPrefixCount` should be omitted as a parameter instead of passing 0. + */ + @JsonIgnore + public Optional extrasPrefixCount() { + return extrasPrefixCount; + } + + /** + * Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional recursive() { + return (Optional) recursive; + } + + /** + * Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional onDeck() { + return (Optional) onDeck; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreatePlayQueueRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreatePlayQueueRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public CreatePlayQueueRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CreatePlayQueueRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public CreatePlayQueueRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CreatePlayQueueRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public CreatePlayQueueRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CreatePlayQueueRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CreatePlayQueueRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CreatePlayQueueRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CreatePlayQueueRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CreatePlayQueueRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CreatePlayQueueRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CreatePlayQueueRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CreatePlayQueueRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CreatePlayQueueRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CreatePlayQueueRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CreatePlayQueueRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CreatePlayQueueRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CreatePlayQueueRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CreatePlayQueueRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CreatePlayQueueRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The content URI for what we're playing. + */ + public CreatePlayQueueRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + /** + * The content URI for what we're playing. + */ + public CreatePlayQueueRequest withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + /** + * the ID of the playlist we're playing. + */ + public CreatePlayQueueRequest withPlaylistID(long playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = Optional.ofNullable(playlistID); + return this; + } + + + /** + * the ID of the playlist we're playing. + */ + public CreatePlayQueueRequest withPlaylistID(Optional playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + /** + * The type of play queue to create + */ + public CreatePlayQueueRequest withType(Type type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The key of the first item to play, defaults to the first in the play queue. + */ + public CreatePlayQueueRequest withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key of the first item to play, defaults to the first in the play queue. + */ + public CreatePlayQueueRequest withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * Whether to shuffle the playlist, defaults to 0. + */ + public CreatePlayQueueRequest withShuffle(BoolInt shuffle) { + Utils.checkNotNull(shuffle, "shuffle"); + this.shuffle = Optional.ofNullable(shuffle); + return this; + } + + + /** + * Whether to shuffle the playlist, defaults to 0. + */ + public CreatePlayQueueRequest withShuffle(Optional shuffle) { + Utils.checkNotNull(shuffle, "shuffle"); + this.shuffle = shuffle; + return this; + } + + /** + * If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0. + */ + public CreatePlayQueueRequest withRepeat(BoolInt repeat) { + Utils.checkNotNull(repeat, "repeat"); + this.repeat = Optional.ofNullable(repeat); + return this; + } + + + /** + * If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0. + */ + public CreatePlayQueueRequest withRepeat(Optional repeat) { + Utils.checkNotNull(repeat, "repeat"); + this.repeat = repeat; + return this; + } + + /** + * Whether to create a continuous play queue (e.g. from an episode), defaults to 0. + */ + public CreatePlayQueueRequest withContinuous(BoolInt continuous) { + Utils.checkNotNull(continuous, "continuous"); + this.continuous = Optional.ofNullable(continuous); + return this; + } + + + /** + * Whether to create a continuous play queue (e.g. from an episode), defaults to 0. + */ + public CreatePlayQueueRequest withContinuous(Optional continuous) { + Utils.checkNotNull(continuous, "continuous"); + this.continuous = continuous; + return this; + } + + /** + * Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie `extrasPrefixCount` should be omitted as a parameter instead of passing 0. + */ + public CreatePlayQueueRequest withExtrasPrefixCount(long extrasPrefixCount) { + Utils.checkNotNull(extrasPrefixCount, "extrasPrefixCount"); + this.extrasPrefixCount = Optional.ofNullable(extrasPrefixCount); + return this; + } + + + /** + * Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie `extrasPrefixCount` should be omitted as a parameter instead of passing 0. + */ + public CreatePlayQueueRequest withExtrasPrefixCount(Optional extrasPrefixCount) { + Utils.checkNotNull(extrasPrefixCount, "extrasPrefixCount"); + this.extrasPrefixCount = extrasPrefixCount; + return this; + } + + /** + * Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1. + */ + public CreatePlayQueueRequest withRecursive(BoolInt recursive) { + Utils.checkNotNull(recursive, "recursive"); + this.recursive = Optional.ofNullable(recursive); + return this; + } + + + /** + * Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1. + */ + public CreatePlayQueueRequest withRecursive(Optional recursive) { + Utils.checkNotNull(recursive, "recursive"); + this.recursive = recursive; + return this; + } + + /** + * Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season. + */ + public CreatePlayQueueRequest withOnDeck(BoolInt onDeck) { + Utils.checkNotNull(onDeck, "onDeck"); + this.onDeck = Optional.ofNullable(onDeck); + return this; + } + + + /** + * Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season. + */ + public CreatePlayQueueRequest withOnDeck(Optional onDeck) { + Utils.checkNotNull(onDeck, "onDeck"); + this.onDeck = onDeck; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlayQueueRequest other = (CreatePlayQueueRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.uri, other.uri) && + Utils.enhancedDeepEquals(this.playlistID, other.playlistID) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.shuffle, other.shuffle) && + Utils.enhancedDeepEquals(this.repeat, other.repeat) && + Utils.enhancedDeepEquals(this.continuous, other.continuous) && + Utils.enhancedDeepEquals(this.extrasPrefixCount, other.extrasPrefixCount) && + Utils.enhancedDeepEquals(this.recursive, other.recursive) && + Utils.enhancedDeepEquals(this.onDeck, other.onDeck); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, uri, + playlistID, type, key, + shuffle, repeat, continuous, + extrasPrefixCount, recursive, onDeck); + } + + @Override + public String toString() { + return Utils.toString(CreatePlayQueueRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "uri", uri, + "playlistID", playlistID, + "type", type, + "key", key, + "shuffle", shuffle, + "repeat", repeat, + "continuous", continuous, + "extrasPrefixCount", extrasPrefixCount, + "recursive", recursive, + "onDeck", onDeck); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional uri = Optional.empty(); + + private Optional playlistID = Optional.empty(); + + private Type type; + + private Optional key = Optional.empty(); + + private Optional shuffle = Optional.empty(); + + private Optional repeat = Optional.empty(); + + private Optional continuous = Optional.empty(); + + private Optional extrasPrefixCount = Optional.empty(); + + private Optional recursive = Optional.empty(); + + private Optional onDeck = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The content URI for what we're playing. + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + /** + * The content URI for what we're playing. + */ + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + + /** + * the ID of the playlist we're playing. + */ + public Builder playlistID(long playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = Optional.ofNullable(playlistID); + return this; + } + + /** + * the ID of the playlist we're playing. + */ + public Builder playlistID(Optional playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + + /** + * The type of play queue to create + */ + public Builder type(Type type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The key of the first item to play, defaults to the first in the play queue. + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key of the first item to play, defaults to the first in the play queue. + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * Whether to shuffle the playlist, defaults to 0. + */ + public Builder shuffle(BoolInt shuffle) { + Utils.checkNotNull(shuffle, "shuffle"); + this.shuffle = Optional.ofNullable(shuffle); + return this; + } + + /** + * Whether to shuffle the playlist, defaults to 0. + */ + public Builder shuffle(Optional shuffle) { + Utils.checkNotNull(shuffle, "shuffle"); + this.shuffle = shuffle; + return this; + } + + + /** + * If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0. + */ + public Builder repeat(BoolInt repeat) { + Utils.checkNotNull(repeat, "repeat"); + this.repeat = Optional.ofNullable(repeat); + return this; + } + + /** + * If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0. + */ + public Builder repeat(Optional repeat) { + Utils.checkNotNull(repeat, "repeat"); + this.repeat = repeat; + return this; + } + + + /** + * Whether to create a continuous play queue (e.g. from an episode), defaults to 0. + */ + public Builder continuous(BoolInt continuous) { + Utils.checkNotNull(continuous, "continuous"); + this.continuous = Optional.ofNullable(continuous); + return this; + } + + /** + * Whether to create a continuous play queue (e.g. from an episode), defaults to 0. + */ + public Builder continuous(Optional continuous) { + Utils.checkNotNull(continuous, "continuous"); + this.continuous = continuous; + return this; + } + + + /** + * Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie `extrasPrefixCount` should be omitted as a parameter instead of passing 0. + */ + public Builder extrasPrefixCount(long extrasPrefixCount) { + Utils.checkNotNull(extrasPrefixCount, "extrasPrefixCount"); + this.extrasPrefixCount = Optional.ofNullable(extrasPrefixCount); + return this; + } + + /** + * Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie `extrasPrefixCount` should be omitted as a parameter instead of passing 0. + */ + public Builder extrasPrefixCount(Optional extrasPrefixCount) { + Utils.checkNotNull(extrasPrefixCount, "extrasPrefixCount"); + this.extrasPrefixCount = extrasPrefixCount; + return this; + } + + + /** + * Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1. + */ + public Builder recursive(BoolInt recursive) { + Utils.checkNotNull(recursive, "recursive"); + this.recursive = Optional.ofNullable(recursive); + return this; + } + + /** + * Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1. + */ + public Builder recursive(Optional recursive) { + Utils.checkNotNull(recursive, "recursive"); + this.recursive = recursive; + return this; + } + + + /** + * Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season. + */ + public Builder onDeck(BoolInt onDeck) { + Utils.checkNotNull(onDeck, "onDeck"); + this.onDeck = Optional.ofNullable(onDeck); + return this; + } + + /** + * Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season. + */ + public Builder onDeck(Optional onDeck) { + Utils.checkNotNull(onDeck, "onDeck"); + this.onDeck = onDeck; + return this; + } + + public CreatePlayQueueRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new CreatePlayQueueRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, uri, + playlistID, type, key, + shuffle, repeat, continuous, + extrasPrefixCount, recursive, onDeck); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueRequestBuilder.java new file mode 100644 index 00000000..ec6291cc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CreatePlayQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class CreatePlayQueueRequestBuilder { + + private CreatePlayQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreatePlayQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreatePlayQueueRequestBuilder request(CreatePlayQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreatePlayQueueResponse call() throws Exception { + + RequestOperation operation + = new CreatePlayQueue.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueResponse.java new file mode 100644 index 00000000..7e709503 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class CreatePlayQueueResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public CreatePlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public CreatePlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreatePlayQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreatePlayQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreatePlayQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreatePlayQueueResponse withObject(CreatePlayQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public CreatePlayQueueResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreatePlayQueueResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlayQueueResponse other = (CreatePlayQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(CreatePlayQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(CreatePlayQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public CreatePlayQueueResponse build() { + + return new CreatePlayQueueResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueResponseBody.java new file mode 100644 index 00000000..835a9dd7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlayQueueResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * CreatePlayQueueResponseBody + * + *

OK + */ +public class CreatePlayQueueResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public CreatePlayQueueResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public CreatePlayQueueResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreatePlayQueueResponseBody withMediaContainer(CreatePlayQueueMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public CreatePlayQueueResponseBody 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; + } + CreatePlayQueueResponseBody other = (CreatePlayQueueResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(CreatePlayQueueResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(CreatePlayQueueMediaContainer 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 CreatePlayQueueResponseBody build() { + + return new CreatePlayQueueResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistMediaContainer.java deleted file mode 100644 index cad24c23..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class CreatePlaylistMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public CreatePlaylistMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.metadata = metadata; - } - - public CreatePlaylistMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - public CreatePlaylistMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public CreatePlaylistMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public CreatePlaylistMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public CreatePlaylistMediaContainer 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; - } - CreatePlaylistMediaContainer other = (CreatePlaylistMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, metadata); - } - - @Override - public String toString() { - return Utils.toString(CreatePlaylistMediaContainer.class, - "size", size, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 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 CreatePlaylistMediaContainer build() { - - return new CreatePlaylistMediaContainer( - size, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistMetadata.java deleted file mode 100644 index a2515277..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistMetadata.java +++ /dev/null @@ -1,773 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class CreatePlaylistMetadata { - - @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("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("summary") - private Optional summary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("smart") - private Optional smart; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("playlistType") - private Optional playlistType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("icon") - private Optional icon; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("addedAt") - private Optional addedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("composite") - private Optional composite; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - @JsonCreator - public CreatePlaylistMetadata( - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("key") Optional key, - @JsonProperty("guid") Optional guid, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, - @JsonProperty("summary") Optional summary, - @JsonProperty("smart") Optional smart, - @JsonProperty("playlistType") Optional playlistType, - @JsonProperty("icon") Optional icon, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("composite") Optional composite, - @JsonProperty("duration") Optional duration) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(smart, "smart"); - Utils.checkNotNull(playlistType, "playlistType"); - Utils.checkNotNull(icon, "icon"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(composite, "composite"); - Utils.checkNotNull(duration, "duration"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.type = type; - this.title = title; - this.summary = summary; - this.smart = smart; - this.playlistType = playlistType; - this.icon = icon; - this.viewCount = viewCount; - this.lastViewedAt = lastViewedAt; - this.leafCount = leafCount; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - this.composite = composite; - this.duration = duration; - } - - public CreatePlaylistMetadata() { - 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 ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional guid() { - return guid; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional summary() { - return summary; - } - - @JsonIgnore - public Optional smart() { - return smart; - } - - @JsonIgnore - public Optional playlistType() { - return playlistType; - } - - @JsonIgnore - public Optional icon() { - return icon; - } - - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional addedAt() { - return addedAt; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - @JsonIgnore - public Optional composite() { - return composite; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - public static Builder builder() { - return new Builder(); - } - - - public CreatePlaylistMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public CreatePlaylistMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public CreatePlaylistMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public CreatePlaylistMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public CreatePlaylistMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public CreatePlaylistMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public CreatePlaylistMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public CreatePlaylistMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public CreatePlaylistMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public CreatePlaylistMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public CreatePlaylistMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public CreatePlaylistMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public CreatePlaylistMetadata withSmart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - - public CreatePlaylistMetadata withSmart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - public CreatePlaylistMetadata withPlaylistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - - public CreatePlaylistMetadata withPlaylistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - public CreatePlaylistMetadata withIcon(String icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = Optional.ofNullable(icon); - return this; - } - - - public CreatePlaylistMetadata withIcon(Optional icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = icon; - return this; - } - - public CreatePlaylistMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - - public CreatePlaylistMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - public CreatePlaylistMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - - public CreatePlaylistMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - public CreatePlaylistMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - public CreatePlaylistMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public CreatePlaylistMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public CreatePlaylistMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public CreatePlaylistMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public CreatePlaylistMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - public CreatePlaylistMetadata withComposite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - - public CreatePlaylistMetadata withComposite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - public CreatePlaylistMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public CreatePlaylistMetadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePlaylistMetadata other = (CreatePlaylistMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.smart, other.smart) && - Utils.enhancedDeepEquals(this.playlistType, other.playlistType) && - Utils.enhancedDeepEquals(this.icon, other.icon) && - Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && - Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.composite, other.composite) && - Utils.enhancedDeepEquals(this.duration, other.duration); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - type, title, summary, - smart, playlistType, icon, - viewCount, lastViewedAt, leafCount, - addedAt, updatedAt, composite, - duration); - } - - @Override - public String toString() { - return Utils.toString(CreatePlaylistMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "type", type, - "title", title, - "summary", summary, - "smart", smart, - "playlistType", playlistType, - "icon", icon, - "viewCount", viewCount, - "lastViewedAt", lastViewedAt, - "leafCount", leafCount, - "addedAt", addedAt, - "updatedAt", updatedAt, - "composite", composite, - "duration", duration); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional ratingKey = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional guid = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional smart = Optional.empty(); - - private Optional playlistType = Optional.empty(); - - private Optional icon = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional leafCount = Optional.empty(); - - private Optional addedAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional composite = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder ratingKey(String 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 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 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 smart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - public Builder smart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - - public Builder playlistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - public Builder playlistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - - public Builder icon(String icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = Optional.ofNullable(icon); - return this; - } - - public Builder icon(Optional icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = icon; - 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 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 addedAt(int 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(int 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 composite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - public Builder composite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public CreatePlaylistMetadata build() { - - return new CreatePlaylistMetadata( - ratingKey, key, guid, - type, title, summary, - smart, playlistType, icon, - viewCount, lastViewedAt, leafCount, - addedAt, updatedAt, composite, - duration); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistQueryParamType.java deleted file mode 100644 index d17c7797..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistQueryParamType.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

type of playlist to create - */ -@JsonDeserialize(using = CreatePlaylistQueryParamType._Deserializer.class) -@JsonSerialize(using = CreatePlaylistQueryParamType._Serializer.class) -public class CreatePlaylistQueryParamType { - - public static final CreatePlaylistQueryParamType AUDIO = new CreatePlaylistQueryParamType("audio"); - public static final CreatePlaylistQueryParamType VIDEO = new CreatePlaylistQueryParamType("video"); - public static final CreatePlaylistQueryParamType PHOTO = new CreatePlaylistQueryParamType("photo"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private CreatePlaylistQueryParamType(String value) { - this.value = value; - } - - /** - * Returns a CreatePlaylistQueryParamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as CreatePlaylistQueryParamType - */ - public static CreatePlaylistQueryParamType of(String value) { - synchronized (CreatePlaylistQueryParamType.class) { - return values.computeIfAbsent(value, v -> new CreatePlaylistQueryParamType(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - CreatePlaylistQueryParamType other = (CreatePlaylistQueryParamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "CreatePlaylistQueryParamType [value=" + value + "]"; - } - - // return an array just like an enum - public static CreatePlaylistQueryParamType[] values() { - synchronized (CreatePlaylistQueryParamType.class) { - return values.values().toArray(new CreatePlaylistQueryParamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("audio", AUDIO); - map.put("video", VIDEO); - map.put("photo", PHOTO); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("audio", CreatePlaylistQueryParamTypeEnum.AUDIO); - map.put("video", CreatePlaylistQueryParamTypeEnum.VIDEO); - map.put("photo", CreatePlaylistQueryParamTypeEnum.PHOTO); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(CreatePlaylistQueryParamType.class); - } - - @Override - public void serialize(CreatePlaylistQueryParamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(CreatePlaylistQueryParamType.class); - } - - @Override - public CreatePlaylistQueryParamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return CreatePlaylistQueryParamType.of(v); - } - } - - public enum CreatePlaylistQueryParamTypeEnum { - - AUDIO("audio"), - VIDEO("video"), - PHOTO("photo"),; - - private final String value; - - private CreatePlaylistQueryParamTypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistRequest.java index c3ec48dc..6f0bacf7 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistRequest.java @@ -5,110 +5,250 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.SpeakeasyMetadata; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Optional; public class CreatePlaylistRequest { /** - * name of the playlist + * Indicates the client accepts the indicated media types */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=title") - private String title; + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; /** - * type of playlist to create + * An opaque identifier unique to the client */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private CreatePlaylistQueryParamType type; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; /** - * whether the playlist is smart or not + * The name of the client product */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=smart") - private Smart smart; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; /** - * the content URI for the playlist + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The content URI for what we're playing (e.g. `library://...`). */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") - private String uri; + private Optional uri; /** - * the play queue to copy to a playlist + * To create a playlist from an existing play queue. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueID") - private Optional playQueueID; + private Optional playQueueID; @JsonCreator public CreatePlaylistRequest( - String title, - CreatePlaylistQueryParamType type, - Smart smart, - String uri, - Optional playQueueID) { - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(smart, "smart"); + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional uri, + Optional playQueueID) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); Utils.checkNotNull(uri, "uri"); Utils.checkNotNull(playQueueID, "playQueueID"); - this.title = title; - this.type = type; - this.smart = smart; + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; this.uri = uri; this.playQueueID = playQueueID; } - public CreatePlaylistRequest( - String title, - CreatePlaylistQueryParamType type, - Smart smart, - String uri) { - this(title, type, smart, - uri, Optional.empty()); + public CreatePlaylistRequest() { + 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()); } /** - * name of the playlist + * Indicates the client accepts the indicated media types */ + @SuppressWarnings("unchecked") @JsonIgnore - public String title() { - return title; + public Optional accepts() { + return (Optional) accepts; } /** - * type of playlist to create + * An opaque identifier unique to the client */ @JsonIgnore - public CreatePlaylistQueryParamType type() { - return type; + public Optional clientIdentifier() { + return clientIdentifier; } /** - * whether the playlist is smart or not + * The name of the client product */ @JsonIgnore - public Smart smart() { - return smart; + public Optional product() { + return product; } /** - * the content URI for the playlist + * The version of the client application */ @JsonIgnore - public String uri() { + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The content URI for what we're playing (e.g. `library://...`). + */ + @JsonIgnore + public Optional uri() { return uri; } /** - * the play queue to copy to a playlist + * To create a playlist from an existing play queue. */ @JsonIgnore - public Optional playQueueID() { + public Optional playQueueID() { return playQueueID; } @@ -118,45 +258,237 @@ public class CreatePlaylistRequest { /** - * name of the playlist + * Indicates the client accepts the indicated media types */ - public CreatePlaylistRequest withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; + public CreatePlaylistRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreatePlaylistRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; return this; } /** - * type of playlist to create + * An opaque identifier unique to the client */ - public CreatePlaylistRequest withType(CreatePlaylistQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; + public CreatePlaylistRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CreatePlaylistRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; return this; } /** - * whether the playlist is smart or not + * The name of the client product */ - public CreatePlaylistRequest withSmart(Smart smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; + public CreatePlaylistRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CreatePlaylistRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; return this; } /** - * the content URI for the playlist + * The version of the client application + */ + public CreatePlaylistRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CreatePlaylistRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CreatePlaylistRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CreatePlaylistRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CreatePlaylistRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CreatePlaylistRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CreatePlaylistRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CreatePlaylistRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CreatePlaylistRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CreatePlaylistRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CreatePlaylistRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CreatePlaylistRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CreatePlaylistRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CreatePlaylistRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CreatePlaylistRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CreatePlaylistRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The content URI for what we're playing (e.g. `library://...`). */ public CreatePlaylistRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + /** + * The content URI for what we're playing (e.g. `library://...`). + */ + public CreatePlaylistRequest withUri(Optional uri) { Utils.checkNotNull(uri, "uri"); this.uri = uri; return this; } /** - * the play queue to copy to a playlist + * To create a playlist from an existing play queue. */ - public CreatePlaylistRequest withPlayQueueID(double playQueueID) { + public CreatePlaylistRequest withPlayQueueID(long playQueueID) { Utils.checkNotNull(playQueueID, "playQueueID"); this.playQueueID = Optional.ofNullable(playQueueID); return this; @@ -164,9 +496,9 @@ public class CreatePlaylistRequest { /** - * the play queue to copy to a playlist + * To create a playlist from an existing play queue. */ - public CreatePlaylistRequest withPlayQueueID(Optional playQueueID) { + public CreatePlaylistRequest withPlayQueueID(Optional playQueueID) { Utils.checkNotNull(playQueueID, "playQueueID"); this.playQueueID = playQueueID; return this; @@ -182,9 +514,17 @@ public class CreatePlaylistRequest { } CreatePlaylistRequest other = (CreatePlaylistRequest) o; return - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.smart, other.smart) && + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && Utils.enhancedDeepEquals(this.uri, other.uri) && Utils.enhancedDeepEquals(this.playQueueID, other.playQueueID); } @@ -192,16 +532,27 @@ public class CreatePlaylistRequest { @Override public int hashCode() { return Utils.enhancedHash( - title, type, smart, - uri, playQueueID); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, uri, + playQueueID); } @Override public String toString() { return Utils.toString(CreatePlaylistRequest.class, - "title", title, - "type", type, - "smart", smart, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, "uri", uri, "playQueueID", playQueueID); } @@ -209,15 +560,31 @@ public class CreatePlaylistRequest { @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private String title; + private Optional accepts; - private CreatePlaylistQueryParamType type; + private Optional clientIdentifier = Optional.empty(); - private Smart smart; + private Optional product = Optional.empty(); - private String uri; + private Optional version = Optional.empty(); - private Optional playQueueID = Optional.empty(); + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional uri = Optional.empty(); + + private Optional playQueueID = Optional.empty(); private Builder() { // force use of static builder() method @@ -225,39 +592,227 @@ public class CreatePlaylistRequest { /** - * name of the playlist + * Indicates the client accepts the indicated media types */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; return this; } /** - * type of playlist to create + * An opaque identifier unique to the client */ - public Builder type(CreatePlaylistQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; return this; } /** - * whether the playlist is smart or not + * The name of the client product */ - public Builder smart(Smart smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; return this; } /** - * the content URI for the playlist + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The content URI for what we're playing (e.g. `library://...`). */ public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + /** + * The content URI for what we're playing (e.g. `library://...`). + */ + public Builder uri(Optional uri) { Utils.checkNotNull(uri, "uri"); this.uri = uri; return this; @@ -265,29 +820,41 @@ public class CreatePlaylistRequest { /** - * the play queue to copy to a playlist + * To create a playlist from an existing play queue. */ - public Builder playQueueID(double playQueueID) { + public Builder playQueueID(long playQueueID) { Utils.checkNotNull(playQueueID, "playQueueID"); this.playQueueID = Optional.ofNullable(playQueueID); return this; } /** - * the play queue to copy to a playlist + * To create a playlist from an existing play queue. */ - public Builder playQueueID(Optional playQueueID) { + public Builder playQueueID(Optional playQueueID) { Utils.checkNotNull(playQueueID, "playQueueID"); this.playQueueID = playQueueID; return this; } public CreatePlaylistRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } return new CreatePlaylistRequest( - title, type, smart, - uri, playQueueID); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, uri, + playQueueID); } + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistResponse.java index 2e770710..6e818842 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistResponse.java @@ -5,6 +5,7 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; import dev.plexapi.sdk.utils.Response; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; @@ -33,24 +34,24 @@ public class CreatePlaylistResponse implements Response { private HttpResponse rawResponse; /** - * returns all playlists + * OK */ - private Optional object; + private Optional mediaContainerWithPlaylistMetadata; @JsonCreator public CreatePlaylistResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional object) { + Optional mediaContainerWithPlaylistMetadata) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.object = object; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; } public CreatePlaylistResponse( @@ -86,12 +87,12 @@ public class CreatePlaylistResponse implements Response { } /** - * returns all playlists + * OK */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional object() { - return (Optional) object; + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; } public static Builder builder() { @@ -127,21 +128,21 @@ public class CreatePlaylistResponse implements Response { } /** - * returns all playlists + * OK */ - public CreatePlaylistResponse withObject(CreatePlaylistResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public CreatePlaylistResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); return this; } /** - * returns all playlists + * OK */ - public CreatePlaylistResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public CreatePlaylistResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; return this; } @@ -158,14 +159,14 @@ public class CreatePlaylistResponse implements Response { Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); } @Override public int hashCode() { return Utils.enhancedHash( contentType, statusCode, rawResponse, - object); + mediaContainerWithPlaylistMetadata); } @Override @@ -174,7 +175,7 @@ public class CreatePlaylistResponse implements Response { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "object", object); + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); } @SuppressWarnings("UnusedReturnValue") @@ -186,7 +187,7 @@ public class CreatePlaylistResponse implements Response { private HttpResponse rawResponse; - private Optional object = Optional.empty(); + private Optional mediaContainerWithPlaylistMetadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -224,20 +225,20 @@ public class CreatePlaylistResponse implements Response { /** - * returns all playlists + * OK */ - public Builder object(CreatePlaylistResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); return this; } /** - * returns all playlists + * OK */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; return this; } @@ -245,7 +246,7 @@ public class CreatePlaylistResponse implements Response { return new CreatePlaylistResponse( contentType, statusCode, rawResponse, - object); + mediaContainerWithPlaylistMetadata); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistResponseBody.java deleted file mode 100644 index 394ed3c2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/CreatePlaylistResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * CreatePlaylistResponseBody - * - *

returns all playlists - */ -public class CreatePlaylistResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public CreatePlaylistResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public CreatePlaylistResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public CreatePlaylistResponseBody withMediaContainer(CreatePlaylistMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public CreatePlaylistResponseBody 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; - } - CreatePlaylistResponseBody other = (CreatePlaylistResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(CreatePlaylistResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(CreatePlaylistMediaContainer 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 CreatePlaylistResponseBody build() { - - return new CreatePlaylistResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionMediaContainer.java new file mode 100644 index 00000000..7cfd3270 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.MediaSubscription; +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.List; +import java.util.Optional; + +/** + * CreateSubscriptionMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class CreateSubscriptionMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaSubscription") + private Optional> mediaSubscription; + + @JsonCreator + public CreateSubscriptionMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("MediaSubscription") Optional> mediaSubscription) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.mediaSubscription = mediaSubscription; + } + + public CreateSubscriptionMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> mediaSubscription() { + return (Optional>) mediaSubscription; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateSubscriptionMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public CreateSubscriptionMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public CreateSubscriptionMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public CreateSubscriptionMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public CreateSubscriptionMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public CreateSubscriptionMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public CreateSubscriptionMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public CreateSubscriptionMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public CreateSubscriptionMediaContainer withMediaSubscription(List mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = Optional.ofNullable(mediaSubscription); + return this; + } + + + public CreateSubscriptionMediaContainer withMediaSubscription(Optional> mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = mediaSubscription; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSubscriptionMediaContainer other = (CreateSubscriptionMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.mediaSubscription, other.mediaSubscription); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, mediaSubscription); + } + + @Override + public String toString() { + return Utils.toString(CreateSubscriptionMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "mediaSubscription", mediaSubscription); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> mediaSubscription = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder mediaSubscription(List mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = Optional.ofNullable(mediaSubscription); + return this; + } + + public Builder mediaSubscription(Optional> mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = mediaSubscription; + return this; + } + + public CreateSubscriptionMediaContainer build() { + + return new CreateSubscriptionMediaContainer( + identifier, offset, size, + totalSize, mediaSubscription); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionQueryParamPrefs.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionQueryParamPrefs.java new file mode 100644 index 00000000..361ae0b9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionQueryParamPrefs.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * CreateSubscriptionQueryParamPrefs + * + *

Subscription preferences. + */ +public class CreateSubscriptionQueryParamPrefs { + @JsonCreator + public CreateSubscriptionQueryParamPrefs() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(CreateSubscriptionQueryParamPrefs.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public CreateSubscriptionQueryParamPrefs build() { + + return new CreateSubscriptionQueryParamPrefs( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionRequest.java new file mode 100644 index 00000000..20887e0d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionRequest.java @@ -0,0 +1,1114 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class CreateSubscriptionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The library section into which we'll grab the media. Not actually required when the subscription is to a playlist. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=targetLibrarySectionID") + private Optional targetLibrarySectionID; + + /** + * The section location into which to grab. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=targetSectionLocationID") + private Optional targetSectionLocationID; + + /** + * The type of the thing we're subscribing too (e.g. show, season). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + /** + * Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=hints") + private Optional hints; + + /** + * Subscription preferences. + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=prefs") + private Optional prefs; + + /** + * Subscription parameters. + * - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + * - `source`: Required for downloads to indicate the source of the downloaded content. + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=params") + private Optional params; + + @JsonCreator + public CreateSubscriptionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional targetLibrarySectionID, + Optional targetSectionLocationID, + Optional type, + Optional hints, + Optional prefs, + Optional params) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(hints, "hints"); + Utils.checkNotNull(prefs, "prefs"); + Utils.checkNotNull(params, "params"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.targetLibrarySectionID = targetLibrarySectionID; + this.targetSectionLocationID = targetSectionLocationID; + this.type = type; + this.hints = hints; + this.prefs = prefs; + this.params = params; + } + + public CreateSubscriptionRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The library section into which we'll grab the media. Not actually required when the subscription is to a playlist. + */ + @JsonIgnore + public Optional targetLibrarySectionID() { + return targetLibrarySectionID; + } + + /** + * The section location into which to grab. + */ + @JsonIgnore + public Optional targetSectionLocationID() { + return targetSectionLocationID; + } + + /** + * The type of the thing we're subscribing too (e.g. show, season). + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hints() { + return (Optional) hints; + } + + /** + * Subscription preferences. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional prefs() { + return (Optional) prefs; + } + + /** + * Subscription parameters. + * - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + * - `source`: Required for downloads to indicate the source of the downloaded content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional params() { + return (Optional) params; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreateSubscriptionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public CreateSubscriptionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public CreateSubscriptionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public CreateSubscriptionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public CreateSubscriptionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public CreateSubscriptionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public CreateSubscriptionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public CreateSubscriptionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public CreateSubscriptionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public CreateSubscriptionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public CreateSubscriptionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public CreateSubscriptionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public CreateSubscriptionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public CreateSubscriptionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public CreateSubscriptionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public CreateSubscriptionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public CreateSubscriptionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public CreateSubscriptionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public CreateSubscriptionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public CreateSubscriptionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public CreateSubscriptionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public CreateSubscriptionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The library section into which we'll grab the media. Not actually required when the subscription is to a playlist. + */ + public CreateSubscriptionRequest withTargetLibrarySectionID(long targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = Optional.ofNullable(targetLibrarySectionID); + return this; + } + + + /** + * The library section into which we'll grab the media. Not actually required when the subscription is to a playlist. + */ + public CreateSubscriptionRequest withTargetLibrarySectionID(Optional targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = targetLibrarySectionID; + return this; + } + + /** + * The section location into which to grab. + */ + public CreateSubscriptionRequest withTargetSectionLocationID(long targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = Optional.ofNullable(targetSectionLocationID); + return this; + } + + + /** + * The section location into which to grab. + */ + public CreateSubscriptionRequest withTargetSectionLocationID(Optional targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = targetSectionLocationID; + return this; + } + + /** + * The type of the thing we're subscribing too (e.g. show, season). + */ + public CreateSubscriptionRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of the thing we're subscribing too (e.g. show, season). + */ + public CreateSubscriptionRequest withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + */ + public CreateSubscriptionRequest withHints(Hints hints) { + Utils.checkNotNull(hints, "hints"); + this.hints = Optional.ofNullable(hints); + return this; + } + + + /** + * Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + */ + public CreateSubscriptionRequest withHints(Optional hints) { + Utils.checkNotNull(hints, "hints"); + this.hints = hints; + return this; + } + + /** + * Subscription preferences. + */ + public CreateSubscriptionRequest withPrefs(CreateSubscriptionQueryParamPrefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = Optional.ofNullable(prefs); + return this; + } + + + /** + * Subscription preferences. + */ + public CreateSubscriptionRequest withPrefs(Optional prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + /** + * Subscription parameters. + * - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + * - `source`: Required for downloads to indicate the source of the downloaded content. + */ + public CreateSubscriptionRequest withParams(Params params) { + Utils.checkNotNull(params, "params"); + this.params = Optional.ofNullable(params); + return this; + } + + + /** + * Subscription parameters. + * - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + * - `source`: Required for downloads to indicate the source of the downloaded content. + */ + public CreateSubscriptionRequest withParams(Optional params) { + Utils.checkNotNull(params, "params"); + this.params = params; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSubscriptionRequest other = (CreateSubscriptionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.targetLibrarySectionID, other.targetLibrarySectionID) && + Utils.enhancedDeepEquals(this.targetSectionLocationID, other.targetSectionLocationID) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.hints, other.hints) && + Utils.enhancedDeepEquals(this.prefs, other.prefs) && + Utils.enhancedDeepEquals(this.params, other.params); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, targetLibrarySectionID, + targetSectionLocationID, type, hints, + prefs, params); + } + + @Override + public String toString() { + return Utils.toString(CreateSubscriptionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "targetLibrarySectionID", targetLibrarySectionID, + "targetSectionLocationID", targetSectionLocationID, + "type", type, + "hints", hints, + "prefs", prefs, + "params", params); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional targetLibrarySectionID = Optional.empty(); + + private Optional targetSectionLocationID = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional hints = Optional.empty(); + + private Optional prefs = Optional.empty(); + + private Optional params = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The library section into which we'll grab the media. Not actually required when the subscription is to a playlist. + */ + public Builder targetLibrarySectionID(long targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = Optional.ofNullable(targetLibrarySectionID); + return this; + } + + /** + * The library section into which we'll grab the media. Not actually required when the subscription is to a playlist. + */ + public Builder targetLibrarySectionID(Optional targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = targetLibrarySectionID; + return this; + } + + + /** + * The section location into which to grab. + */ + public Builder targetSectionLocationID(long targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = Optional.ofNullable(targetSectionLocationID); + return this; + } + + /** + * The section location into which to grab. + */ + public Builder targetSectionLocationID(Optional targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = targetSectionLocationID; + return this; + } + + + /** + * The type of the thing we're subscribing too (e.g. show, season). + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of the thing we're subscribing too (e.g. show, season). + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + */ + public Builder hints(Hints hints) { + Utils.checkNotNull(hints, "hints"); + this.hints = Optional.ofNullable(hints); + return this; + } + + /** + * Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + */ + public Builder hints(Optional hints) { + Utils.checkNotNull(hints, "hints"); + this.hints = hints; + return this; + } + + + /** + * Subscription preferences. + */ + public Builder prefs(CreateSubscriptionQueryParamPrefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = Optional.ofNullable(prefs); + return this; + } + + /** + * Subscription preferences. + */ + public Builder prefs(Optional prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + + /** + * Subscription parameters. + * - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + * - `source`: Required for downloads to indicate the source of the downloaded content. + */ + public Builder params(Params params) { + Utils.checkNotNull(params, "params"); + this.params = Optional.ofNullable(params); + return this; + } + + /** + * Subscription parameters. + * - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + * - `source`: Required for downloads to indicate the source of the downloaded content. + */ + public Builder params(Optional params) { + Utils.checkNotNull(params, "params"); + this.params = params; + return this; + } + + public CreateSubscriptionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new CreateSubscriptionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, targetLibrarySectionID, + targetSectionLocationID, type, hints, + prefs, params); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionRequestBuilder.java new file mode 100644 index 00000000..0a3346dc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CreateSubscription; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class CreateSubscriptionRequestBuilder { + + private CreateSubscriptionRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreateSubscriptionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateSubscriptionRequestBuilder request(CreateSubscriptionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreateSubscriptionResponse call() throws Exception { + + RequestOperation operation + = new CreateSubscription.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionResponse.java new file mode 100644 index 00000000..b49b957d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class CreateSubscriptionResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public CreateSubscriptionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public CreateSubscriptionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateSubscriptionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateSubscriptionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateSubscriptionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateSubscriptionResponse withObject(CreateSubscriptionResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public CreateSubscriptionResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreateSubscriptionResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSubscriptionResponse other = (CreateSubscriptionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(CreateSubscriptionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(CreateSubscriptionResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public CreateSubscriptionResponse build() { + + return new CreateSubscriptionResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionResponseBody.java new file mode 100644 index 00000000..ee342392 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/CreateSubscriptionResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * CreateSubscriptionResponseBody + * + *

OK + */ +public class CreateSubscriptionResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public CreateSubscriptionResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public CreateSubscriptionResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateSubscriptionResponseBody withMediaContainer(CreateSubscriptionMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public CreateSubscriptionResponseBody 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; + } + CreateSubscriptionResponseBody other = (CreateSubscriptionResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(CreateSubscriptionResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(CreateSubscriptionMediaContainer 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 CreateSubscriptionResponseBody build() { + + return new CreateSubscriptionResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DecisionResult.java b/src/main/java/dev/plexapi/sdk/models/operations/DecisionResult.java new file mode 100644 index 00000000..5db8c208 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DecisionResult.java @@ -0,0 +1,513 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class DecisionResult { + /** + * The maximum bitrate set when item was added + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("availableBandwidth") + private Optional availableBandwidth; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directPlayDecisionCode") + private Optional directPlayDecisionCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directPlayDecisionText") + private Optional directPlayDecisionText; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generalDecisionCode") + private Optional generalDecisionCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generalDecisionText") + private Optional generalDecisionText; + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mdeDecisionCode") + private Optional mdeDecisionCode; + + /** + * Descriptive text for the above code + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mdeDecisionText") + private Optional mdeDecisionText; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcodeDecisionCode") + private Optional transcodeDecisionCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcodeDecisionText") + private Optional transcodeDecisionText; + + @JsonCreator + public DecisionResult( + @JsonProperty("availableBandwidth") Optional availableBandwidth, + @JsonProperty("directPlayDecisionCode") Optional directPlayDecisionCode, + @JsonProperty("directPlayDecisionText") Optional directPlayDecisionText, + @JsonProperty("generalDecisionCode") Optional generalDecisionCode, + @JsonProperty("generalDecisionText") Optional generalDecisionText, + @JsonProperty("mdeDecisionCode") Optional mdeDecisionCode, + @JsonProperty("mdeDecisionText") Optional mdeDecisionText, + @JsonProperty("transcodeDecisionCode") Optional transcodeDecisionCode, + @JsonProperty("transcodeDecisionText") Optional transcodeDecisionText) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.availableBandwidth = availableBandwidth; + this.directPlayDecisionCode = directPlayDecisionCode; + this.directPlayDecisionText = directPlayDecisionText; + this.generalDecisionCode = generalDecisionCode; + this.generalDecisionText = generalDecisionText; + this.mdeDecisionCode = mdeDecisionCode; + this.mdeDecisionText = mdeDecisionText; + this.transcodeDecisionCode = transcodeDecisionCode; + this.transcodeDecisionText = transcodeDecisionText; + } + + public DecisionResult() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The maximum bitrate set when item was added + */ + @JsonIgnore + public Optional availableBandwidth() { + return availableBandwidth; + } + + @JsonIgnore + public Optional directPlayDecisionCode() { + return directPlayDecisionCode; + } + + @JsonIgnore + public Optional directPlayDecisionText() { + return directPlayDecisionText; + } + + @JsonIgnore + public Optional generalDecisionCode() { + return generalDecisionCode; + } + + @JsonIgnore + public Optional generalDecisionText() { + return generalDecisionText; + } + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + @JsonIgnore + public Optional mdeDecisionCode() { + return mdeDecisionCode; + } + + /** + * Descriptive text for the above code + */ + @JsonIgnore + public Optional mdeDecisionText() { + return mdeDecisionText; + } + + @JsonIgnore + public Optional transcodeDecisionCode() { + return transcodeDecisionCode; + } + + @JsonIgnore + public Optional transcodeDecisionText() { + return transcodeDecisionText; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The maximum bitrate set when item was added + */ + public DecisionResult withAvailableBandwidth(long availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = Optional.ofNullable(availableBandwidth); + return this; + } + + + /** + * The maximum bitrate set when item was added + */ + public DecisionResult withAvailableBandwidth(Optional availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = availableBandwidth; + return this; + } + + public DecisionResult withDirectPlayDecisionCode(long directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = Optional.ofNullable(directPlayDecisionCode); + return this; + } + + + public DecisionResult withDirectPlayDecisionCode(Optional directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = directPlayDecisionCode; + return this; + } + + public DecisionResult withDirectPlayDecisionText(String directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = Optional.ofNullable(directPlayDecisionText); + return this; + } + + + public DecisionResult withDirectPlayDecisionText(Optional directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = directPlayDecisionText; + return this; + } + + public DecisionResult withGeneralDecisionCode(long generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = Optional.ofNullable(generalDecisionCode); + return this; + } + + + public DecisionResult withGeneralDecisionCode(Optional generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = generalDecisionCode; + return this; + } + + public DecisionResult withGeneralDecisionText(String generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = Optional.ofNullable(generalDecisionText); + return this; + } + + + public DecisionResult withGeneralDecisionText(Optional generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = generalDecisionText; + return this; + } + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public DecisionResult withMdeDecisionCode(long mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = Optional.ofNullable(mdeDecisionCode); + return this; + } + + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public DecisionResult withMdeDecisionCode(Optional mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = mdeDecisionCode; + return this; + } + + /** + * Descriptive text for the above code + */ + public DecisionResult withMdeDecisionText(String mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = Optional.ofNullable(mdeDecisionText); + return this; + } + + + /** + * Descriptive text for the above code + */ + public DecisionResult withMdeDecisionText(Optional mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = mdeDecisionText; + return this; + } + + public DecisionResult withTranscodeDecisionCode(long transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = Optional.ofNullable(transcodeDecisionCode); + return this; + } + + + public DecisionResult withTranscodeDecisionCode(Optional transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = transcodeDecisionCode; + return this; + } + + public DecisionResult withTranscodeDecisionText(String transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = Optional.ofNullable(transcodeDecisionText); + return this; + } + + + public DecisionResult withTranscodeDecisionText(Optional transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = transcodeDecisionText; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DecisionResult other = (DecisionResult) o; + return + Utils.enhancedDeepEquals(this.availableBandwidth, other.availableBandwidth) && + Utils.enhancedDeepEquals(this.directPlayDecisionCode, other.directPlayDecisionCode) && + Utils.enhancedDeepEquals(this.directPlayDecisionText, other.directPlayDecisionText) && + Utils.enhancedDeepEquals(this.generalDecisionCode, other.generalDecisionCode) && + Utils.enhancedDeepEquals(this.generalDecisionText, other.generalDecisionText) && + Utils.enhancedDeepEquals(this.mdeDecisionCode, other.mdeDecisionCode) && + Utils.enhancedDeepEquals(this.mdeDecisionText, other.mdeDecisionText) && + Utils.enhancedDeepEquals(this.transcodeDecisionCode, other.transcodeDecisionCode) && + Utils.enhancedDeepEquals(this.transcodeDecisionText, other.transcodeDecisionText); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + availableBandwidth, directPlayDecisionCode, directPlayDecisionText, + generalDecisionCode, generalDecisionText, mdeDecisionCode, + mdeDecisionText, transcodeDecisionCode, transcodeDecisionText); + } + + @Override + public String toString() { + return Utils.toString(DecisionResult.class, + "availableBandwidth", availableBandwidth, + "directPlayDecisionCode", directPlayDecisionCode, + "directPlayDecisionText", directPlayDecisionText, + "generalDecisionCode", generalDecisionCode, + "generalDecisionText", generalDecisionText, + "mdeDecisionCode", mdeDecisionCode, + "mdeDecisionText", mdeDecisionText, + "transcodeDecisionCode", transcodeDecisionCode, + "transcodeDecisionText", transcodeDecisionText); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional availableBandwidth = Optional.empty(); + + private Optional directPlayDecisionCode = Optional.empty(); + + private Optional directPlayDecisionText = Optional.empty(); + + private Optional generalDecisionCode = Optional.empty(); + + private Optional generalDecisionText = Optional.empty(); + + private Optional mdeDecisionCode = Optional.empty(); + + private Optional mdeDecisionText = Optional.empty(); + + private Optional transcodeDecisionCode = Optional.empty(); + + private Optional transcodeDecisionText = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The maximum bitrate set when item was added + */ + public Builder availableBandwidth(long availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = Optional.ofNullable(availableBandwidth); + return this; + } + + /** + * The maximum bitrate set when item was added + */ + public Builder availableBandwidth(Optional availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = availableBandwidth; + return this; + } + + + public Builder directPlayDecisionCode(long directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = Optional.ofNullable(directPlayDecisionCode); + return this; + } + + public Builder directPlayDecisionCode(Optional directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = directPlayDecisionCode; + return this; + } + + + public Builder directPlayDecisionText(String directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = Optional.ofNullable(directPlayDecisionText); + return this; + } + + public Builder directPlayDecisionText(Optional directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = directPlayDecisionText; + return this; + } + + + public Builder generalDecisionCode(long generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = Optional.ofNullable(generalDecisionCode); + return this; + } + + public Builder generalDecisionCode(Optional generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = generalDecisionCode; + return this; + } + + + public Builder generalDecisionText(String generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = Optional.ofNullable(generalDecisionText); + return this; + } + + public Builder generalDecisionText(Optional generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = generalDecisionText; + return this; + } + + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public Builder mdeDecisionCode(long mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = Optional.ofNullable(mdeDecisionCode); + return this; + } + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public Builder mdeDecisionCode(Optional mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = mdeDecisionCode; + return this; + } + + + /** + * Descriptive text for the above code + */ + public Builder mdeDecisionText(String mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = Optional.ofNullable(mdeDecisionText); + return this; + } + + /** + * Descriptive text for the above code + */ + public Builder mdeDecisionText(Optional mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = mdeDecisionText; + return this; + } + + + public Builder transcodeDecisionCode(long transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = Optional.ofNullable(transcodeDecisionCode); + return this; + } + + public Builder transcodeDecisionCode(Optional transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = transcodeDecisionCode; + return this; + } + + + public Builder transcodeDecisionText(String transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = Optional.ofNullable(transcodeDecisionText); + return this; + } + + public Builder transcodeDecisionText(Optional transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = transcodeDecisionText; + return this; + } + + public DecisionResult build() { + + return new DecisionResult( + availableBandwidth, directPlayDecisionCode, directPlayDecisionText, + generalDecisionCode, generalDecisionText, mdeDecisionCode, + mdeDecisionText, transcodeDecisionCode, transcodeDecisionText); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DefaultSubtitleAccessibility.java b/src/main/java/dev/plexapi/sdk/models/operations/DefaultSubtitleAccessibility.java deleted file mode 100644 index ad4d1140..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/DefaultSubtitleAccessibility.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * DefaultSubtitleAccessibility - * - *

The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles) - */ -public enum DefaultSubtitleAccessibility { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - DefaultSubtitleAccessibility(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (DefaultSubtitleAccessibility o: DefaultSubtitleAccessibility.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DefaultSubtitleForced.java b/src/main/java/dev/plexapi/sdk/models/operations/DefaultSubtitleForced.java deleted file mode 100644 index 13265dac..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/DefaultSubtitleForced.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * DefaultSubtitleForced - * - *

The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) - */ -public enum DefaultSubtitleForced { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - DefaultSubtitleForced(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (DefaultSubtitleForced o: DefaultSubtitleForced.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCachesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCachesRequestBuilder.java new file mode 100644 index 00000000..fb9de630 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCachesRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteCaches; +import java.lang.Exception; + +public class DeleteCachesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public DeleteCachesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteCachesResponse call() throws Exception { + + RequestlessOperation operation + = new DeleteCaches.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCachesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCachesResponse.java new file mode 100644 index 00000000..f61ab18f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCachesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteCachesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteCachesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteCachesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteCachesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteCachesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCachesResponse other = (DeleteCachesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteCachesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteCachesResponse build() { + + return new DeleteCachesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemRequest.java new file mode 100644 index 00000000..9e1dc901 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeleteCollectionItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The collection id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=collectionId") + private long collectionId; + + /** + * The item to delete + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=itemId") + private long itemId; + + @JsonCreator + public DeleteCollectionItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long collectionId, + long itemId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(collectionId, "collectionId"); + Utils.checkNotNull(itemId, "itemId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.collectionId = collectionId; + this.itemId = itemId; + } + + public DeleteCollectionItemRequest( + long collectionId, + long itemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), collectionId, + itemId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The collection id + */ + @JsonIgnore + public long collectionId() { + return collectionId; + } + + /** + * The item to delete + */ + @JsonIgnore + public long itemId() { + return itemId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteCollectionItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteCollectionItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteCollectionItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteCollectionItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteCollectionItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteCollectionItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteCollectionItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteCollectionItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteCollectionItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteCollectionItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteCollectionItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteCollectionItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteCollectionItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteCollectionItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteCollectionItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteCollectionItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteCollectionItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteCollectionItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteCollectionItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteCollectionItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteCollectionItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteCollectionItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The collection id + */ + public DeleteCollectionItemRequest withCollectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + /** + * The item to delete + */ + public DeleteCollectionItemRequest withItemId(long itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCollectionItemRequest other = (DeleteCollectionItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.collectionId, other.collectionId) && + Utils.enhancedDeepEquals(this.itemId, other.itemId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, collectionId, + itemId); + } + + @Override + public String toString() { + return Utils.toString(DeleteCollectionItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "collectionId", collectionId, + "itemId", itemId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long collectionId; + + private Long itemId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The collection id + */ + public Builder collectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + + /** + * The item to delete + */ + public Builder itemId(long itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + public DeleteCollectionItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteCollectionItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, collectionId, + itemId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemRequestBuilder.java new file mode 100644 index 00000000..426fd4ee --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteCollectionItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteCollectionItemRequestBuilder { + + private DeleteCollectionItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteCollectionItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteCollectionItemRequestBuilder request(DeleteCollectionItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteCollectionItemResponse call() throws Exception { + + RequestOperation operation + = new DeleteCollectionItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemResponse.java new file mode 100644 index 00000000..c49d0b1b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class DeleteCollectionItemResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public DeleteCollectionItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public DeleteCollectionItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteCollectionItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteCollectionItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteCollectionItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DeleteCollectionItemResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public DeleteCollectionItemResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCollectionItemResponse other = (DeleteCollectionItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(DeleteCollectionItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public DeleteCollectionItemResponse build() { + + return new DeleteCollectionItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionRequest.java new file mode 100644 index 00000000..a1a2c19b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeleteCollectionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * Collection Id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=collectionId") + private long collectionId; + + @JsonCreator + public DeleteCollectionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + long collectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(collectionId, "collectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.collectionId = collectionId; + } + + public DeleteCollectionRequest( + long sectionId, + long collectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + collectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * Collection Id + */ + @JsonIgnore + public long collectionId() { + return collectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteCollectionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteCollectionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteCollectionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteCollectionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteCollectionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteCollectionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteCollectionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteCollectionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteCollectionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteCollectionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteCollectionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteCollectionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteCollectionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteCollectionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteCollectionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteCollectionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteCollectionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteCollectionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteCollectionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteCollectionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteCollectionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteCollectionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public DeleteCollectionRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Collection Id + */ + public DeleteCollectionRequest withCollectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCollectionRequest other = (DeleteCollectionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.collectionId, other.collectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + collectionId); + } + + @Override + public String toString() { + return Utils.toString(DeleteCollectionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "collectionId", collectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Long collectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * Collection Id + */ + public Builder collectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + public DeleteCollectionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteCollectionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + collectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionRequestBuilder.java new file mode 100644 index 00000000..efad1b9a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteCollection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteCollectionRequestBuilder { + + private DeleteCollectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteCollectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteCollectionRequestBuilder request(DeleteCollectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteCollectionResponse call() throws Exception { + + RequestOperation operation + = new DeleteCollection.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionResponse.java new file mode 100644 index 00000000..237ddaba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCollectionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteCollectionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteCollectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteCollectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteCollectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteCollectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCollectionResponse other = (DeleteCollectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteCollectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteCollectionResponse build() { + + return new DeleteCollectionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubRequest.java new file mode 100644 index 00000000..750bf205 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeleteCustomHubRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section ID for the hubs to change + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * The identifier of the hub to change + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=identifier") + private String identifier; + + @JsonCreator + public DeleteCustomHubRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + String identifier) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(identifier, "identifier"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.identifier = identifier; + } + + public DeleteCustomHubRequest( + long sectionId, + String identifier) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + identifier); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section ID for the hubs to change + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * The identifier of the hub to change + */ + @JsonIgnore + public String identifier() { + return identifier; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteCustomHubRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteCustomHubRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteCustomHubRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteCustomHubRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteCustomHubRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteCustomHubRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteCustomHubRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteCustomHubRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteCustomHubRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteCustomHubRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteCustomHubRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteCustomHubRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteCustomHubRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteCustomHubRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteCustomHubRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteCustomHubRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteCustomHubRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteCustomHubRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteCustomHubRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteCustomHubRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteCustomHubRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteCustomHubRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section ID for the hubs to change + */ + public DeleteCustomHubRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The identifier of the hub to change + */ + public DeleteCustomHubRequest withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCustomHubRequest other = (DeleteCustomHubRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.identifier, other.identifier); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + identifier); + } + + @Override + public String toString() { + return Utils.toString(DeleteCustomHubRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "identifier", identifier); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private String identifier; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section ID for the hubs to change + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The identifier of the hub to change + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public DeleteCustomHubRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteCustomHubRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + identifier); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubRequestBuilder.java new file mode 100644 index 00000000..839690a3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteCustomHub; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteCustomHubRequestBuilder { + + private DeleteCustomHubRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteCustomHubRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteCustomHubRequestBuilder request(DeleteCustomHubRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteCustomHubResponse call() throws Exception { + + RequestOperation operation + = new DeleteCustomHub.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubResponse.java new file mode 100644 index 00000000..3e70f400 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteCustomHubResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteCustomHubResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteCustomHubResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteCustomHubResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteCustomHubResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteCustomHubResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCustomHubResponse other = (DeleteCustomHubResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteCustomHubResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteCustomHubResponse build() { + + return new DeleteCustomHubResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRRequest.java new file mode 100644 index 00000000..e79cfcd6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeleteDVRRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the DVR. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dvrId") + private long dvrId; + + @JsonCreator + public DeleteDVRRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long dvrId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(dvrId, "dvrId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.dvrId = dvrId; + } + + public DeleteDVRRequest( + long dvrId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), dvrId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the DVR. + */ + @JsonIgnore + public long dvrId() { + return dvrId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteDVRRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteDVRRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteDVRRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteDVRRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteDVRRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteDVRRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteDVRRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteDVRRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteDVRRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteDVRRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteDVRRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteDVRRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteDVRRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteDVRRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteDVRRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteDVRRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteDVRRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteDVRRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteDVRRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteDVRRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteDVRRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteDVRRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the DVR. + */ + public DeleteDVRRequest withDvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteDVRRequest other = (DeleteDVRRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.dvrId, other.dvrId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId); + } + + @Override + public String toString() { + return Utils.toString(DeleteDVRRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "dvrId", dvrId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long dvrId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the DVR. + */ + public Builder dvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + public DeleteDVRRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteDVRRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRRequestBuilder.java new file mode 100644 index 00000000..7367deb3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteDVR; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteDVRRequestBuilder { + + private DeleteDVRRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteDVRRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteDVRRequestBuilder request(DeleteDVRRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteDVRResponse call() throws Exception { + + RequestOperation operation + = new DeleteDVR.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRResponse.java new file mode 100644 index 00000000..c0bd6a71 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteDVRResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteDVRResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteDVRResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteDVRResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteDVRResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteDVRResponse other = (DeleteDVRResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteDVRResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteDVRResponse build() { + + return new DeleteDVRResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryRequest.java new file mode 100644 index 00000000..7a9d0a7f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeleteHistoryRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the history item (the `historyKey` from above) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=historyId") + private long historyId; + + @JsonCreator + public DeleteHistoryRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long historyId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(historyId, "historyId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.historyId = historyId; + } + + public DeleteHistoryRequest( + long historyId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), historyId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the history item (the `historyKey` from above) + */ + @JsonIgnore + public long historyId() { + return historyId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteHistoryRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteHistoryRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteHistoryRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteHistoryRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteHistoryRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteHistoryRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteHistoryRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteHistoryRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteHistoryRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteHistoryRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteHistoryRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteHistoryRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteHistoryRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteHistoryRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteHistoryRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteHistoryRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteHistoryRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteHistoryRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteHistoryRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteHistoryRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteHistoryRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteHistoryRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the history item (the `historyKey` from above) + */ + public DeleteHistoryRequest withHistoryId(long historyId) { + Utils.checkNotNull(historyId, "historyId"); + this.historyId = historyId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteHistoryRequest other = (DeleteHistoryRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.historyId, other.historyId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, historyId); + } + + @Override + public String toString() { + return Utils.toString(DeleteHistoryRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "historyId", historyId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long historyId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the history item (the `historyKey` from above) + */ + public Builder historyId(long historyId) { + Utils.checkNotNull(historyId, "historyId"); + this.historyId = historyId; + return this; + } + + public DeleteHistoryRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteHistoryRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, historyId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryRequestBuilder.java new file mode 100644 index 00000000..73d67f6e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteHistory; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteHistoryRequestBuilder { + + private DeleteHistoryRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteHistoryRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteHistoryRequestBuilder request(DeleteHistoryRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteHistoryResponse call() throws Exception { + + RequestOperation operation + = new DeleteHistory.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryResponse.java new file mode 100644 index 00000000..b578eac7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteHistoryResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainer; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class DeleteHistoryResponse 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; + + /** + * OK + */ + private Optional mediaContainer; + + + private Map> headers; + + @JsonCreator + public DeleteHistoryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainer, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainer, "mediaContainer"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainer = mediaContainer; + this.headers = headers; + } + + public DeleteHistoryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteHistoryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteHistoryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteHistoryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DeleteHistoryResponse withMediaContainer(MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + /** + * OK + */ + public DeleteHistoryResponse withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public DeleteHistoryResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteHistoryResponse other = (DeleteHistoryResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainer, headers); + } + + @Override + public String toString() { + return Utils.toString(DeleteHistoryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainer", mediaContainer, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainer = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainer(MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + /** + * OK + */ + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public DeleteHistoryResponse build() { + + return new DeleteHistoryResponse( + contentType, statusCode, rawResponse, + mediaContainer, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesRequest.java new file mode 100644 index 00000000..2b493fcf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeleteIndexesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public DeleteIndexesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public DeleteIndexesRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteIndexesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteIndexesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteIndexesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteIndexesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteIndexesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteIndexesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteIndexesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteIndexesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteIndexesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteIndexesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteIndexesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteIndexesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteIndexesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteIndexesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteIndexesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteIndexesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteIndexesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteIndexesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteIndexesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteIndexesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteIndexesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteIndexesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public DeleteIndexesRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteIndexesRequest other = (DeleteIndexesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(DeleteIndexesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public DeleteIndexesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteIndexesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesRequestBuilder.java new file mode 100644 index 00000000..a0967751 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteIndexes; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteIndexesRequestBuilder { + + private DeleteIndexesRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteIndexesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteIndexesRequestBuilder request(DeleteIndexesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteIndexesResponse call() throws Exception { + + RequestOperation operation + = new DeleteIndexes.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesResponse.java new file mode 100644 index 00000000..b8bea2ef --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIndexesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteIndexesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteIndexesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteIndexesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteIndexesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteIndexesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteIndexesResponse other = (DeleteIndexesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteIndexesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteIndexesResponse build() { + + return new DeleteIndexesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosRequest.java new file mode 100644 index 00000000..72edf82f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeleteIntrosRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public DeleteIntrosRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public DeleteIntrosRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteIntrosRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteIntrosRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteIntrosRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteIntrosRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteIntrosRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteIntrosRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteIntrosRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteIntrosRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteIntrosRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteIntrosRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteIntrosRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteIntrosRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteIntrosRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteIntrosRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteIntrosRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteIntrosRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteIntrosRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteIntrosRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteIntrosRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteIntrosRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteIntrosRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteIntrosRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public DeleteIntrosRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteIntrosRequest other = (DeleteIntrosRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(DeleteIntrosRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public DeleteIntrosRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteIntrosRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosRequestBuilder.java new file mode 100644 index 00000000..2a9fe08f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteIntros; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteIntrosRequestBuilder { + + private DeleteIntrosRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteIntrosRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteIntrosRequestBuilder request(DeleteIntrosRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteIntrosResponse call() throws Exception { + + RequestOperation operation + = new DeleteIntros.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosResponse.java new file mode 100644 index 00000000..dab297b0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteIntrosResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteIntrosResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteIntrosResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteIntrosResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteIntrosResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteIntrosResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteIntrosResponse other = (DeleteIntrosResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteIntrosResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteIntrosResponse build() { + + return new DeleteIntrosResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryRequest.java deleted file mode 100644 index 337a61cd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryRequest.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - - -public class DeleteLibraryRequest { - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey") - private int sectionKey; - - @JsonCreator - public DeleteLibraryRequest( - int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - } - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @JsonIgnore - public int sectionKey() { - return sectionKey; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public DeleteLibraryRequest withSectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLibraryRequest other = (DeleteLibraryRequest) o; - return - Utils.enhancedDeepEquals(this.sectionKey, other.sectionKey); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - sectionKey); - } - - @Override - public String toString() { - return Utils.toString(DeleteLibraryRequest.class, - "sectionKey", sectionKey); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer sectionKey; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public Builder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - public DeleteLibraryRequest build() { - - return new DeleteLibraryRequest( - sectionKey); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryRequestBuilder.java deleted file mode 100644 index affe86c0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.DeleteLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; - -public class DeleteLibraryRequestBuilder { - - private Integer sectionKey; - private final SDKConfiguration sdkConfiguration; - - public DeleteLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public DeleteLibraryRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - private DeleteLibraryRequest buildRequest() { - - DeleteLibraryRequest request = new DeleteLibraryRequest(sectionKey); - - return request; - } - - public DeleteLibraryResponse call() throws Exception { - - RequestOperation operation - = new DeleteLibrary.Sync(sdkConfiguration); - DeleteLibraryRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryResponse.java deleted file mode 100644 index e3734dbb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibraryResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class DeleteLibraryResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public DeleteLibraryResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public DeleteLibraryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public DeleteLibraryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeleteLibraryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLibraryResponse other = (DeleteLibraryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(DeleteLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public DeleteLibraryResponse build() { - - return new DeleteLibraryResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionRequest.java new file mode 100644 index 00000000..0df5023c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionRequest.java @@ -0,0 +1,843 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class DeleteLibrarySectionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private String sectionId; + + /** + * If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=async") + private Optional async; + + @JsonCreator + public DeleteLibrarySectionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String sectionId, + Optional async) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(async, "async"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.async = async; + } + + public DeleteLibrarySectionRequest( + String sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section identifier + */ + @JsonIgnore + public String sectionId() { + return sectionId; + } + + /** + * If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional async() { + return (Optional) async; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteLibrarySectionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteLibrarySectionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteLibrarySectionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteLibrarySectionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteLibrarySectionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteLibrarySectionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteLibrarySectionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteLibrarySectionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteLibrarySectionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteLibrarySectionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteLibrarySectionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteLibrarySectionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteLibrarySectionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteLibrarySectionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteLibrarySectionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteLibrarySectionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteLibrarySectionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteLibrarySectionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteLibrarySectionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteLibrarySectionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteLibrarySectionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteLibrarySectionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section identifier + */ + public DeleteLibrarySectionRequest withSectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete + */ + public DeleteLibrarySectionRequest withAsync(BoolInt async) { + Utils.checkNotNull(async, "async"); + this.async = Optional.ofNullable(async); + return this; + } + + + /** + * If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete + */ + public DeleteLibrarySectionRequest withAsync(Optional async) { + Utils.checkNotNull(async, "async"); + this.async = async; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLibrarySectionRequest other = (DeleteLibrarySectionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.async, other.async); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + async); + } + + @Override + public String toString() { + return Utils.toString(DeleteLibrarySectionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "async", async); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String sectionId; + + private Optional async = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section identifier + */ + public Builder sectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete + */ + public Builder async(BoolInt async) { + Utils.checkNotNull(async, "async"); + this.async = Optional.ofNullable(async); + return this; + } + + /** + * If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete + */ + public Builder async(Optional async) { + Utils.checkNotNull(async, "async"); + this.async = async; + return this; + } + + public DeleteLibrarySectionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteLibrarySectionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + async); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionRequestBuilder.java new file mode 100644 index 00000000..ce3dbcb4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteLibrarySection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteLibrarySectionRequestBuilder { + + private DeleteLibrarySectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteLibrarySectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteLibrarySectionRequestBuilder request(DeleteLibrarySectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteLibrarySectionResponse call() throws Exception { + + RequestOperation operation + = new DeleteLibrarySection.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionResponse.java new file mode 100644 index 00000000..11d09891 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLibrarySectionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteLibrarySectionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteLibrarySectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteLibrarySectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteLibrarySectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteLibrarySectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLibrarySectionResponse other = (DeleteLibrarySectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteLibrarySectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteLibrarySectionResponse build() { + + return new DeleteLibrarySectionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupDVR.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupDVR.java new file mode 100644 index 00000000..d770f760 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupDVR.java @@ -0,0 +1,290 @@ +/* + * 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.models.shared.Device; +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.Optional; + + +public class DeleteLineupDVR { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineup") + private Optional lineup; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public DeleteLineupDVR( + @JsonProperty("Device") Optional> device, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("lineup") Optional lineup, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(lineup, "lineup"); + Utils.checkNotNull(uuid, "uuid"); + this.device = device; + this.key = key; + this.language = language; + this.lineup = lineup; + this.uuid = uuid; + } + + public DeleteLineupDVR() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> device() { + return (Optional>) device; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional lineup() { + return lineup; + } + + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public DeleteLineupDVR withDevice(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public DeleteLineupDVR withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public DeleteLineupDVR withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public DeleteLineupDVR withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public DeleteLineupDVR withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public DeleteLineupDVR withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public DeleteLineupDVR withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + public DeleteLineupDVR withLineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public DeleteLineupDVR withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + public DeleteLineupDVR withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLineupDVR other = (DeleteLineupDVR) o; + return + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.lineup, other.lineup) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + device, key, language, + lineup, uuid); + } + + @Override + public String toString() { + return Utils.toString(DeleteLineupDVR.class, + "device", device, + "key", key, + "language", language, + "lineup", lineup, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> device = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional lineup = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder device(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + 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 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 lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + public Builder lineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public DeleteLineupDVR build() { + + return new DeleteLineupDVR( + device, key, language, + lineup, uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupDVRsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupDVRsMediaContainer.java new file mode 100644 index 00000000..a68dbc75 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupDVRsMediaContainer.java @@ -0,0 +1,344 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * DeleteLineupDVRsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class DeleteLineupDVRsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public DeleteLineupDVRsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(status, "status"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.status = status; + } + + public DeleteLineupDVRsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + public DeleteLineupDVRsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public DeleteLineupDVRsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public DeleteLineupDVRsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public DeleteLineupDVRsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public DeleteLineupDVRsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public DeleteLineupDVRsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public DeleteLineupDVRsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public DeleteLineupDVRsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public DeleteLineupDVRsMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public DeleteLineupDVRsMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLineupDVRsMediaContainer other = (DeleteLineupDVRsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, status); + } + + @Override + public String toString() { + return Utils.toString(DeleteLineupDVRsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public DeleteLineupDVRsMediaContainer build() { + + return new DeleteLineupDVRsMediaContainer( + identifier, offset, size, + totalSize, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupMediaContainer.java new file mode 100644 index 00000000..743394af --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupMediaContainer.java @@ -0,0 +1,158 @@ +/* + * 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.Optional; + + +public class DeleteLineupMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DVR") + private Optional> dvr; + + @JsonCreator + public DeleteLineupMediaContainer( + @JsonProperty("MediaContainer") Optional mediaContainer, + @JsonProperty("DVR") Optional> dvr) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + Utils.checkNotNull(dvr, "dvr"); + this.mediaContainer = mediaContainer; + this.dvr = dvr; + } + + public DeleteLineupMediaContainer() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> dvr() { + return (Optional>) dvr; + } + + public static Builder builder() { + return new Builder(); + } + + + public DeleteLineupMediaContainer withMediaContainer(DeleteLineupDVRsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public DeleteLineupMediaContainer withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public DeleteLineupMediaContainer withDvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + + public DeleteLineupMediaContainer withDvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLineupMediaContainer other = (DeleteLineupMediaContainer) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer) && + Utils.enhancedDeepEquals(this.dvr, other.dvr); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer, dvr); + } + + @Override + public String toString() { + return Utils.toString(DeleteLineupMediaContainer.class, + "mediaContainer", mediaContainer, + "dvr", dvr); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Optional> dvr = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(DeleteLineupDVRsMediaContainer 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 Builder dvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + public Builder dvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + public DeleteLineupMediaContainer build() { + + return new DeleteLineupMediaContainer( + mediaContainer, dvr); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupRequest.java new file mode 100644 index 00000000..3442246c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeleteLineupRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the DVR. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dvrId") + private long dvrId; + + /** + * The lineup to delete + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=lineup") + private String lineup; + + @JsonCreator + public DeleteLineupRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long dvrId, + String lineup) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(dvrId, "dvrId"); + Utils.checkNotNull(lineup, "lineup"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.dvrId = dvrId; + this.lineup = lineup; + } + + public DeleteLineupRequest( + long dvrId, + String lineup) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), dvrId, + lineup); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the DVR. + */ + @JsonIgnore + public long dvrId() { + return dvrId; + } + + /** + * The lineup to delete + */ + @JsonIgnore + public String lineup() { + return lineup; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteLineupRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteLineupRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteLineupRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteLineupRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteLineupRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteLineupRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteLineupRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteLineupRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteLineupRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteLineupRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteLineupRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteLineupRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteLineupRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteLineupRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteLineupRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteLineupRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteLineupRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteLineupRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteLineupRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteLineupRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteLineupRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteLineupRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the DVR. + */ + public DeleteLineupRequest withDvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + /** + * The lineup to delete + */ + public DeleteLineupRequest withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLineupRequest other = (DeleteLineupRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.dvrId, other.dvrId) && + Utils.enhancedDeepEquals(this.lineup, other.lineup); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + lineup); + } + + @Override + public String toString() { + return Utils.toString(DeleteLineupRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "dvrId", dvrId, + "lineup", lineup); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long dvrId; + + private String lineup; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the DVR. + */ + public Builder dvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + + /** + * The lineup to delete + */ + public Builder lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public DeleteLineupRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteLineupRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + lineup); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupRequestBuilder.java new file mode 100644 index 00000000..155e375a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteLineup; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteLineupRequestBuilder { + + private DeleteLineupRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteLineupRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteLineupRequestBuilder request(DeleteLineupRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteLineupResponse call() throws Exception { + + RequestOperation operation + = new DeleteLineup.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupResponse.java new file mode 100644 index 00000000..c921e70f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class DeleteLineupResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public DeleteLineupResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public DeleteLineupResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteLineupResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteLineupResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteLineupResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DeleteLineupResponse withObject(DeleteLineupResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public DeleteLineupResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public DeleteLineupResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLineupResponse other = (DeleteLineupResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(DeleteLineupResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(DeleteLineupResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public DeleteLineupResponse build() { + + return new DeleteLineupResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupResponseBody.java new file mode 100644 index 00000000..5210fef6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteLineupResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * DeleteLineupResponseBody + * + *

OK + */ +public class DeleteLineupResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public DeleteLineupResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public DeleteLineupResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public DeleteLineupResponseBody withMediaContainer(DeleteLineupMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public DeleteLineupResponseBody 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; + } + DeleteLineupResponseBody other = (DeleteLineupResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(DeleteLineupResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(DeleteLineupMediaContainer 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 DeleteLineupResponseBody build() { + + return new DeleteLineupResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerRequest.java new file mode 100644 index 00000000..3dee4e18 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerRequest.java @@ -0,0 +1,801 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class DeleteMarkerRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=marker") + private String marker; + + @JsonCreator + public DeleteMarkerRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + String marker) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(marker, "marker"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.marker = marker; + } + + public DeleteMarkerRequest( + String ids, + String marker) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + marker); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @JsonIgnore + public String marker() { + return marker; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteMarkerRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteMarkerRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteMarkerRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteMarkerRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteMarkerRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteMarkerRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteMarkerRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteMarkerRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteMarkerRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteMarkerRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteMarkerRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteMarkerRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteMarkerRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteMarkerRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteMarkerRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteMarkerRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteMarkerRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteMarkerRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteMarkerRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteMarkerRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteMarkerRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteMarkerRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public DeleteMarkerRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public DeleteMarkerRequest withMarker(String marker) { + Utils.checkNotNull(marker, "marker"); + this.marker = marker; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMarkerRequest other = (DeleteMarkerRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.marker, other.marker); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + marker); + } + + @Override + public String toString() { + return Utils.toString(DeleteMarkerRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "marker", marker); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private String marker; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder marker(String marker) { + Utils.checkNotNull(marker, "marker"); + this.marker = marker; + return this; + } + + public DeleteMarkerRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteMarkerRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + marker); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerRequestBuilder.java new file mode 100644 index 00000000..cf75d2f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteMarker; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteMarkerRequestBuilder { + + private DeleteMarkerRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteMarkerRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteMarkerRequestBuilder request(DeleteMarkerRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteMarkerResponse call() throws Exception { + + RequestOperation operation + = new DeleteMarker.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerResponse.java new file mode 100644 index 00000000..85eb6aac --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMarkerResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteMarkerResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteMarkerResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteMarkerResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteMarkerResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteMarkerResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMarkerResponse other = (DeleteMarkerResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteMarkerResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteMarkerResponse build() { + + return new DeleteMarkerResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemRequest.java new file mode 100644 index 00000000..8fe893d1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemRequest.java @@ -0,0 +1,862 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class DeleteMediaItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=mediaItem") + private String mediaItem; + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=proxy") + private Optional proxy; + + @JsonCreator + public DeleteMediaItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + String mediaItem, + Optional proxy) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(mediaItem, "mediaItem"); + Utils.checkNotNull(proxy, "proxy"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.mediaItem = mediaItem; + this.proxy = proxy; + } + + public DeleteMediaItemRequest( + String ids, + String mediaItem) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + mediaItem, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @JsonIgnore + public String mediaItem() { + return mediaItem; + } + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proxy() { + return (Optional) proxy; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteMediaItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteMediaItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteMediaItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteMediaItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteMediaItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteMediaItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteMediaItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteMediaItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteMediaItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteMediaItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteMediaItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteMediaItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteMediaItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteMediaItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteMediaItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteMediaItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteMediaItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteMediaItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteMediaItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteMediaItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteMediaItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteMediaItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public DeleteMediaItemRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public DeleteMediaItemRequest withMediaItem(String mediaItem) { + Utils.checkNotNull(mediaItem, "mediaItem"); + this.mediaItem = mediaItem; + return this; + } + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + public DeleteMediaItemRequest withProxy(BoolInt proxy) { + Utils.checkNotNull(proxy, "proxy"); + this.proxy = Optional.ofNullable(proxy); + return this; + } + + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + public DeleteMediaItemRequest withProxy(Optional proxy) { + Utils.checkNotNull(proxy, "proxy"); + this.proxy = proxy; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMediaItemRequest other = (DeleteMediaItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.mediaItem, other.mediaItem) && + Utils.enhancedDeepEquals(this.proxy, other.proxy); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + mediaItem, proxy); + } + + @Override + public String toString() { + return Utils.toString(DeleteMediaItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "mediaItem", mediaItem, + "proxy", proxy); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private String mediaItem; + + private Optional proxy = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder mediaItem(String mediaItem) { + Utils.checkNotNull(mediaItem, "mediaItem"); + this.mediaItem = mediaItem; + return this; + } + + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + public Builder proxy(BoolInt proxy) { + Utils.checkNotNull(proxy, "proxy"); + this.proxy = Optional.ofNullable(proxy); + return this; + } + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + public Builder proxy(Optional proxy) { + Utils.checkNotNull(proxy, "proxy"); + this.proxy = proxy; + return this; + } + + public DeleteMediaItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteMediaItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + mediaItem, proxy); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemRequestBuilder.java new file mode 100644 index 00000000..7b437814 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteMediaItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteMediaItemRequestBuilder { + + private DeleteMediaItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteMediaItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteMediaItemRequestBuilder request(DeleteMediaItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteMediaItemResponse call() throws Exception { + + RequestOperation operation + = new DeleteMediaItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemResponse.java new file mode 100644 index 00000000..c8789af1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaItemResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteMediaItemResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteMediaItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteMediaItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteMediaItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteMediaItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMediaItemResponse other = (DeleteMediaItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteMediaItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteMediaItemResponse build() { + + return new DeleteMediaItemResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderRequest.java new file mode 100644 index 00000000..3d8a8ddd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderRequest.java @@ -0,0 +1,779 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class DeleteMediaProviderRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the media provider to delete + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=provider") + private String provider; + + @JsonCreator + public DeleteMediaProviderRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String provider) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(provider, "provider"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.provider = provider; + } + + public DeleteMediaProviderRequest( + String provider) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), provider); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the media provider to delete + */ + @JsonIgnore + public String provider() { + return provider; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteMediaProviderRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteMediaProviderRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteMediaProviderRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteMediaProviderRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteMediaProviderRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteMediaProviderRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteMediaProviderRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteMediaProviderRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteMediaProviderRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteMediaProviderRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteMediaProviderRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteMediaProviderRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteMediaProviderRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteMediaProviderRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteMediaProviderRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteMediaProviderRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteMediaProviderRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteMediaProviderRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteMediaProviderRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteMediaProviderRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteMediaProviderRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteMediaProviderRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the media provider to delete + */ + public DeleteMediaProviderRequest withProvider(String provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = provider; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMediaProviderRequest other = (DeleteMediaProviderRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.provider, other.provider); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, provider); + } + + @Override + public String toString() { + return Utils.toString(DeleteMediaProviderRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "provider", provider); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String provider; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the media provider to delete + */ + public Builder provider(String provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = provider; + return this; + } + + public DeleteMediaProviderRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteMediaProviderRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, provider); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderRequestBuilder.java new file mode 100644 index 00000000..11421e6f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteMediaProvider; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteMediaProviderRequestBuilder { + + private DeleteMediaProviderRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteMediaProviderRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteMediaProviderRequestBuilder request(DeleteMediaProviderRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteMediaProviderResponse call() throws Exception { + + RequestOperation operation + = new DeleteMediaProvider.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderResponse.java new file mode 100644 index 00000000..9592485b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMediaProviderResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteMediaProviderResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteMediaProviderResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteMediaProviderResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteMediaProviderResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteMediaProviderResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMediaProviderResponse other = (DeleteMediaProviderResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteMediaProviderResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteMediaProviderResponse build() { + + return new DeleteMediaProviderResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemRequest.java new file mode 100644 index 00000000..1bfd655f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemRequest.java @@ -0,0 +1,832 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class DeleteMetadataItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=proxy") + private Optional proxy; + + @JsonCreator + public DeleteMetadataItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional proxy) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(proxy, "proxy"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.proxy = proxy; + } + + public DeleteMetadataItemRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proxy() { + return (Optional) proxy; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteMetadataItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteMetadataItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteMetadataItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteMetadataItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteMetadataItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteMetadataItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteMetadataItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteMetadataItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteMetadataItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteMetadataItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteMetadataItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteMetadataItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteMetadataItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteMetadataItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteMetadataItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteMetadataItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteMetadataItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteMetadataItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteMetadataItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteMetadataItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteMetadataItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteMetadataItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public DeleteMetadataItemRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + public DeleteMetadataItemRequest withProxy(BoolInt proxy) { + Utils.checkNotNull(proxy, "proxy"); + this.proxy = Optional.ofNullable(proxy); + return this; + } + + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + public DeleteMetadataItemRequest withProxy(Optional proxy) { + Utils.checkNotNull(proxy, "proxy"); + this.proxy = proxy; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMetadataItemRequest other = (DeleteMetadataItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.proxy, other.proxy); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + proxy); + } + + @Override + public String toString() { + return Utils.toString(DeleteMetadataItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "proxy", proxy); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional proxy = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + public Builder proxy(BoolInt proxy) { + Utils.checkNotNull(proxy, "proxy"); + this.proxy = Optional.ofNullable(proxy); + return this; + } + + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + public Builder proxy(Optional proxy) { + Utils.checkNotNull(proxy, "proxy"); + this.proxy = proxy; + return this; + } + + public DeleteMetadataItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteMetadataItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + proxy); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemRequestBuilder.java new file mode 100644 index 00000000..bec9b2ef --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteMetadataItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteMetadataItemRequestBuilder { + + private DeleteMetadataItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteMetadataItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteMetadataItemRequestBuilder request(DeleteMetadataItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteMetadataItemResponse call() throws Exception { + + RequestOperation operation + = new DeleteMetadataItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemResponse.java new file mode 100644 index 00000000..8c4c3c53 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteMetadataItemResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteMetadataItemResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteMetadataItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteMetadataItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteMetadataItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteMetadataItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMetadataItemResponse other = (DeleteMetadataItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteMetadataItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteMetadataItemResponse build() { + + return new DeleteMetadataItemResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemRequest.java new file mode 100644 index 00000000..a341887b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeletePlayQueueItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the play queue. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playQueueId") + private long playQueueId; + + /** + * The play queue item ID to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playQueueItemId") + private long playQueueItemId; + + @JsonCreator + public DeletePlayQueueItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playQueueId, + long playQueueItemId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playQueueId, "playQueueId"); + Utils.checkNotNull(playQueueItemId, "playQueueItemId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playQueueId = playQueueId; + this.playQueueItemId = playQueueItemId; + } + + public DeletePlayQueueItemRequest( + long playQueueId, + long playQueueItemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playQueueId, + playQueueItemId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the play queue. + */ + @JsonIgnore + public long playQueueId() { + return playQueueId; + } + + /** + * The play queue item ID to delete. + */ + @JsonIgnore + public long playQueueItemId() { + return playQueueItemId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeletePlayQueueItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeletePlayQueueItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeletePlayQueueItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeletePlayQueueItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeletePlayQueueItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeletePlayQueueItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeletePlayQueueItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeletePlayQueueItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeletePlayQueueItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeletePlayQueueItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeletePlayQueueItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeletePlayQueueItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeletePlayQueueItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeletePlayQueueItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeletePlayQueueItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeletePlayQueueItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeletePlayQueueItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeletePlayQueueItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeletePlayQueueItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeletePlayQueueItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeletePlayQueueItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeletePlayQueueItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the play queue. + */ + public DeletePlayQueueItemRequest withPlayQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + /** + * The play queue item ID to delete. + */ + public DeletePlayQueueItemRequest withPlayQueueItemId(long playQueueItemId) { + Utils.checkNotNull(playQueueItemId, "playQueueItemId"); + this.playQueueItemId = playQueueItemId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePlayQueueItemRequest other = (DeletePlayQueueItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playQueueId, other.playQueueId) && + Utils.enhancedDeepEquals(this.playQueueItemId, other.playQueueItemId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId, + playQueueItemId); + } + + @Override + public String toString() { + return Utils.toString(DeletePlayQueueItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playQueueId", playQueueId, + "playQueueItemId", playQueueItemId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playQueueId; + + private Long playQueueItemId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the play queue. + */ + public Builder playQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + + /** + * The play queue item ID to delete. + */ + public Builder playQueueItemId(long playQueueItemId) { + Utils.checkNotNull(playQueueItemId, "playQueueItemId"); + this.playQueueItemId = playQueueItemId; + return this; + } + + public DeletePlayQueueItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeletePlayQueueItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId, + playQueueItemId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemRequestBuilder.java new file mode 100644 index 00000000..a27a4ca8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeletePlayQueueItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeletePlayQueueItemRequestBuilder { + + private DeletePlayQueueItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeletePlayQueueItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeletePlayQueueItemRequestBuilder request(DeletePlayQueueItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeletePlayQueueItemResponse call() throws Exception { + + RequestOperation operation + = new DeletePlayQueueItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemResponse.java new file mode 100644 index 00000000..d4778576 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlayQueueItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class DeletePlayQueueItemResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public DeletePlayQueueItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public DeletePlayQueueItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeletePlayQueueItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeletePlayQueueItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeletePlayQueueItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DeletePlayQueueItemResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public DeletePlayQueueItemResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePlayQueueItemResponse other = (DeletePlayQueueItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(DeletePlayQueueItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public DeletePlayQueueItemResponse build() { + + return new DeletePlayQueueItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemRequest.java new file mode 100644 index 00000000..774a96a3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeletePlaylistItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; + + /** + * The generator item ID to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=generatorId") + private long generatorId; + + @JsonCreator + public DeletePlaylistItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId, + long generatorId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + Utils.checkNotNull(generatorId, "generatorId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + this.generatorId = generatorId; + } + + public DeletePlaylistItemRequest( + long playlistId, + long generatorId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId, + generatorId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; + } + + /** + * The generator item ID to delete. + */ + @JsonIgnore + public long generatorId() { + return generatorId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeletePlaylistItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeletePlaylistItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeletePlaylistItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeletePlaylistItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeletePlaylistItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeletePlaylistItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeletePlaylistItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeletePlaylistItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeletePlaylistItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeletePlaylistItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeletePlaylistItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeletePlaylistItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeletePlaylistItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeletePlaylistItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeletePlaylistItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeletePlaylistItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeletePlaylistItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeletePlaylistItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeletePlaylistItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeletePlaylistItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeletePlaylistItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeletePlaylistItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public DeletePlaylistItemRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + /** + * The generator item ID to delete. + */ + public DeletePlaylistItemRequest withGeneratorId(long generatorId) { + Utils.checkNotNull(generatorId, "generatorId"); + this.generatorId = generatorId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePlaylistItemRequest other = (DeletePlaylistItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId) && + Utils.enhancedDeepEquals(this.generatorId, other.generatorId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + generatorId); + } + + @Override + public String toString() { + return Utils.toString(DeletePlaylistItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId, + "generatorId", generatorId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; + + private Long generatorId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + + /** + * The generator item ID to delete. + */ + public Builder generatorId(long generatorId) { + Utils.checkNotNull(generatorId, "generatorId"); + this.generatorId = generatorId; + return this; + } + + public DeletePlaylistItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeletePlaylistItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + generatorId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemRequestBuilder.java new file mode 100644 index 00000000..ca067a7a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeletePlaylistItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeletePlaylistItemRequestBuilder { + + private DeletePlaylistItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeletePlaylistItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeletePlaylistItemRequestBuilder request(DeletePlaylistItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeletePlaylistItemResponse call() throws Exception { + + RequestOperation operation + = new DeletePlaylistItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemResponse.java new file mode 100644 index 00000000..3dee701b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class DeletePlaylistItemResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public DeletePlaylistItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public DeletePlaylistItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeletePlaylistItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeletePlaylistItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeletePlaylistItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DeletePlaylistItemResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public DeletePlaylistItemResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePlaylistItemResponse other = (DeletePlaylistItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(DeletePlaylistItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public DeletePlaylistItemResponse build() { + + return new DeletePlaylistItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistRequest.java index e6e892cf..1e6d5e43 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistRequest.java @@ -5,33 +5,234 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.SpeakeasyMetadata; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; public class DeletePlaylistRequest { /** - * the ID of the playlist + * Indicates the client accepts the indicated media types */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") - private double playlistID; + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; @JsonCreator public DeletePlaylistRequest( - double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + } + + public DeletePlaylistRequest( + long playlistId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId); } /** - * the ID of the playlist + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client */ @JsonIgnore - public double playlistID() { - return playlistID; + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; } public static Builder builder() { @@ -40,11 +241,220 @@ public class DeletePlaylistRequest { /** - * the ID of the playlist + * Indicates the client accepts the indicated media types */ - public DeletePlaylistRequest withPlaylistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public DeletePlaylistRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeletePlaylistRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeletePlaylistRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeletePlaylistRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeletePlaylistRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeletePlaylistRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeletePlaylistRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeletePlaylistRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeletePlaylistRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeletePlaylistRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeletePlaylistRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeletePlaylistRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeletePlaylistRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeletePlaylistRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeletePlaylistRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeletePlaylistRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeletePlaylistRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeletePlaylistRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeletePlaylistRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeletePlaylistRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeletePlaylistRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeletePlaylistRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public DeletePlaylistRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; return this; } @@ -58,25 +468,72 @@ public class DeletePlaylistRequest { } DeletePlaylistRequest other = (DeletePlaylistRequest) o; return - Utils.enhancedDeepEquals(this.playlistID, other.playlistID); + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId); } @Override public int hashCode() { return Utils.enhancedHash( - playlistID); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId); } @Override public String toString() { return Utils.toString(DeletePlaylistRequest.class, - "playlistID", playlistID); + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Double playlistID; + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; private Builder() { // force use of static builder() method @@ -84,19 +541,240 @@ public class DeletePlaylistRequest { /** - * the ID of the playlist + * Indicates the client accepts the indicated media types */ - public Builder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; return this; } public DeletePlaylistRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } return new DeletePlaylistRequest( - playlistID); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistRequestBuilder.java index f243b0ae..4b3a4152 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeletePlaylistRequestBuilder.java @@ -8,37 +8,27 @@ import static dev.plexapi.sdk.operations.Operations.RequestOperation; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.operations.DeletePlaylist; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; import java.lang.Exception; public class DeletePlaylistRequestBuilder { - private Double playlistID; + private DeletePlaylistRequest request; private final SDKConfiguration sdkConfiguration; public DeletePlaylistRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public DeletePlaylistRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public DeletePlaylistRequestBuilder request(DeletePlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private DeletePlaylistRequest buildRequest() { - - DeletePlaylistRequest request = new DeletePlaylistRequest(playlistID); - - return request; - } - public DeletePlaylistResponse call() throws Exception { RequestOperation operation = new DeletePlaylist.Sync(sdkConfiguration); - DeletePlaylistRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamRequest.java new file mode 100644 index 00000000..b4f87b51 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeleteStreamRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the stream + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=streamId") + private long streamId; + + /** + * This is not a part of this endpoint but documented here to satisfy OpenAPI + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ext") + private String ext; + + @JsonCreator + public DeleteStreamRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long streamId, + String ext) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(streamId, "streamId"); + Utils.checkNotNull(ext, "ext"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.streamId = streamId; + this.ext = ext; + } + + public DeleteStreamRequest( + long streamId, + String ext) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), streamId, + ext); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the stream + */ + @JsonIgnore + public long streamId() { + return streamId; + } + + /** + * This is not a part of this endpoint but documented here to satisfy OpenAPI + */ + @JsonIgnore + public String ext() { + return ext; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteStreamRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteStreamRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteStreamRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteStreamRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteStreamRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteStreamRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteStreamRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteStreamRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteStreamRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteStreamRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteStreamRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteStreamRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteStreamRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteStreamRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteStreamRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteStreamRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteStreamRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteStreamRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteStreamRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteStreamRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteStreamRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteStreamRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the stream + */ + public DeleteStreamRequest withStreamId(long streamId) { + Utils.checkNotNull(streamId, "streamId"); + this.streamId = streamId; + return this; + } + + /** + * This is not a part of this endpoint but documented here to satisfy OpenAPI + */ + public DeleteStreamRequest withExt(String ext) { + Utils.checkNotNull(ext, "ext"); + this.ext = ext; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteStreamRequest other = (DeleteStreamRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.streamId, other.streamId) && + Utils.enhancedDeepEquals(this.ext, other.ext); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, streamId, + ext); + } + + @Override + public String toString() { + return Utils.toString(DeleteStreamRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "streamId", streamId, + "ext", ext); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long streamId; + + private String ext; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the stream + */ + public Builder streamId(long streamId) { + Utils.checkNotNull(streamId, "streamId"); + this.streamId = streamId; + return this; + } + + + /** + * This is not a part of this endpoint but documented here to satisfy OpenAPI + */ + public Builder ext(String ext) { + Utils.checkNotNull(ext, "ext"); + this.ext = ext; + return this; + } + + public DeleteStreamRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteStreamRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, streamId, + ext); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamRequestBuilder.java new file mode 100644 index 00000000..fd8d4cb9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteStream; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteStreamRequestBuilder { + + private DeleteStreamRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteStreamRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteStreamRequestBuilder request(DeleteStreamRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteStreamResponse call() throws Exception { + + RequestOperation operation + = new DeleteStream.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamResponse.java new file mode 100644 index 00000000..834365e8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteStreamResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteStreamResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteStreamResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteStreamResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteStreamResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteStreamResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteStreamResponse other = (DeleteStreamResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteStreamResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteStreamResponse build() { + + return new DeleteStreamResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionRequest.java new file mode 100644 index 00000000..0196c938 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionRequest.java @@ -0,0 +1,769 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DeleteSubscriptionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriptionId") + private long subscriptionId; + + @JsonCreator + public DeleteSubscriptionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long subscriptionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(subscriptionId, "subscriptionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.subscriptionId = subscriptionId; + } + + public DeleteSubscriptionRequest( + long subscriptionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), subscriptionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public long subscriptionId() { + return subscriptionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteSubscriptionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DeleteSubscriptionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DeleteSubscriptionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DeleteSubscriptionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DeleteSubscriptionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DeleteSubscriptionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DeleteSubscriptionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DeleteSubscriptionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DeleteSubscriptionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DeleteSubscriptionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DeleteSubscriptionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DeleteSubscriptionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DeleteSubscriptionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DeleteSubscriptionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteSubscriptionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DeleteSubscriptionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DeleteSubscriptionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DeleteSubscriptionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DeleteSubscriptionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DeleteSubscriptionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DeleteSubscriptionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DeleteSubscriptionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public DeleteSubscriptionRequest withSubscriptionId(long subscriptionId) { + Utils.checkNotNull(subscriptionId, "subscriptionId"); + this.subscriptionId = subscriptionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteSubscriptionRequest other = (DeleteSubscriptionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.subscriptionId, other.subscriptionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, subscriptionId); + } + + @Override + public String toString() { + return Utils.toString(DeleteSubscriptionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "subscriptionId", subscriptionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long subscriptionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder subscriptionId(long subscriptionId) { + Utils.checkNotNull(subscriptionId, "subscriptionId"); + this.subscriptionId = subscriptionId; + return this; + } + + public DeleteSubscriptionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DeleteSubscriptionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, subscriptionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionRequestBuilder.java new file mode 100644 index 00000000..80fe3384 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteSubscription; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DeleteSubscriptionRequestBuilder { + + private DeleteSubscriptionRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteSubscriptionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteSubscriptionRequestBuilder request(DeleteSubscriptionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteSubscriptionResponse call() throws Exception { + + RequestOperation operation + = new DeleteSubscription.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionResponse.java new file mode 100644 index 00000000..001cd48c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeleteSubscriptionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteSubscriptionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteSubscriptionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteSubscriptionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteSubscriptionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteSubscriptionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteSubscriptionResponse other = (DeleteSubscriptionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteSubscriptionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteSubscriptionResponse build() { + + return new DeleteSubscriptionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectAdsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectAdsRequest.java new file mode 100644 index 00000000..c80e8b57 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectAdsRequest.java @@ -0,0 +1,768 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class DetectAdsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + @JsonCreator + public DetectAdsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + } + + public DetectAdsRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DetectAdsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DetectAdsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DetectAdsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DetectAdsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DetectAdsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DetectAdsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DetectAdsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DetectAdsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DetectAdsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DetectAdsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DetectAdsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DetectAdsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DetectAdsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DetectAdsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DetectAdsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DetectAdsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DetectAdsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DetectAdsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DetectAdsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DetectAdsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DetectAdsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DetectAdsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public DetectAdsRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectAdsRequest other = (DetectAdsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + @Override + public String toString() { + return Utils.toString(DetectAdsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public DetectAdsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DetectAdsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectAdsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectAdsRequestBuilder.java new file mode 100644 index 00000000..9adb8064 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectAdsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DetectAds; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DetectAdsRequestBuilder { + + private DetectAdsRequest request; + private final SDKConfiguration sdkConfiguration; + + public DetectAdsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DetectAdsRequestBuilder request(DetectAdsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DetectAdsResponse call() throws Exception { + + RequestOperation operation + = new DetectAds.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectAdsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectAdsResponse.java new file mode 100644 index 00000000..da38be77 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectAdsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DetectAdsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DetectAdsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DetectAdsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DetectAdsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DetectAdsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectAdsResponse other = (DetectAdsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DetectAdsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DetectAdsResponse build() { + + return new DetectAdsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsRequest.java new file mode 100644 index 00000000..45a4c8d1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsRequest.java @@ -0,0 +1,858 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class DetectCreditsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=force") + private Optional force; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=manual") + private Optional manual; + + @JsonCreator + public DetectCreditsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional force, + Optional manual) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(force, "force"); + Utils.checkNotNull(manual, "manual"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.force = force; + this.manual = manual; + } + + public DetectCreditsRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional force() { + return (Optional) force; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional manual() { + return (Optional) manual; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DetectCreditsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DetectCreditsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DetectCreditsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DetectCreditsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DetectCreditsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DetectCreditsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DetectCreditsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DetectCreditsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DetectCreditsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DetectCreditsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DetectCreditsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DetectCreditsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DetectCreditsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DetectCreditsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DetectCreditsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DetectCreditsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DetectCreditsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DetectCreditsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DetectCreditsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DetectCreditsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DetectCreditsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DetectCreditsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public DetectCreditsRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public DetectCreditsRequest withForce(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + + public DetectCreditsRequest withForce(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + public DetectCreditsRequest withManual(BoolInt manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = Optional.ofNullable(manual); + return this; + } + + + public DetectCreditsRequest withManual(Optional manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = manual; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectCreditsRequest other = (DetectCreditsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.force, other.force) && + Utils.enhancedDeepEquals(this.manual, other.manual); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + force, manual); + } + + @Override + public String toString() { + return Utils.toString(DetectCreditsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "force", force, + "manual", manual); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional force = Optional.empty(); + + private Optional manual = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder force(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + public Builder force(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + + public Builder manual(BoolInt manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = Optional.ofNullable(manual); + return this; + } + + public Builder manual(Optional manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = manual; + return this; + } + + public DetectCreditsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DetectCreditsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + force, manual); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsRequestBuilder.java new file mode 100644 index 00000000..bda18ed5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DetectCredits; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DetectCreditsRequestBuilder { + + private DetectCreditsRequest request; + private final SDKConfiguration sdkConfiguration; + + public DetectCreditsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DetectCreditsRequestBuilder request(DetectCreditsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DetectCreditsResponse call() throws Exception { + + RequestOperation operation + = new DetectCredits.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsResponse.java new file mode 100644 index 00000000..fcf8dfb6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectCreditsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DetectCreditsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DetectCreditsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DetectCreditsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DetectCreditsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DetectCreditsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectCreditsResponse other = (DetectCreditsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DetectCreditsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DetectCreditsResponse build() { + + return new DetectCreditsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosRequest.java new file mode 100644 index 00000000..b545a3f8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosRequest.java @@ -0,0 +1,892 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DetectIntrosRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + /** + * Indicate whether detection should be re-run + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=force") + private Optional force; + + /** + * The threshold for determining if content is an intro or not + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=threshold") + private Optional threshold; + + @JsonCreator + public DetectIntrosRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional force, + Optional threshold) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(force, "force"); + Utils.checkNotNull(threshold, "threshold"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.force = force; + this.threshold = threshold; + } + + public DetectIntrosRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + /** + * Indicate whether detection should be re-run + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional force() { + return (Optional) force; + } + + /** + * The threshold for determining if content is an intro or not + */ + @JsonIgnore + public Optional threshold() { + return threshold; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DetectIntrosRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DetectIntrosRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DetectIntrosRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DetectIntrosRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DetectIntrosRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DetectIntrosRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DetectIntrosRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DetectIntrosRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DetectIntrosRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DetectIntrosRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DetectIntrosRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DetectIntrosRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DetectIntrosRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DetectIntrosRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DetectIntrosRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DetectIntrosRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DetectIntrosRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DetectIntrosRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DetectIntrosRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DetectIntrosRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DetectIntrosRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DetectIntrosRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public DetectIntrosRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * Indicate whether detection should be re-run + */ + public DetectIntrosRequest withForce(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + + /** + * Indicate whether detection should be re-run + */ + public DetectIntrosRequest withForce(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + /** + * The threshold for determining if content is an intro or not + */ + public DetectIntrosRequest withThreshold(double threshold) { + Utils.checkNotNull(threshold, "threshold"); + this.threshold = Optional.ofNullable(threshold); + return this; + } + + + /** + * The threshold for determining if content is an intro or not + */ + public DetectIntrosRequest withThreshold(Optional threshold) { + Utils.checkNotNull(threshold, "threshold"); + this.threshold = threshold; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectIntrosRequest other = (DetectIntrosRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.force, other.force) && + Utils.enhancedDeepEquals(this.threshold, other.threshold); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + force, threshold); + } + + @Override + public String toString() { + return Utils.toString(DetectIntrosRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "force", force, + "threshold", threshold); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional force = Optional.empty(); + + private Optional threshold = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * Indicate whether detection should be re-run + */ + public Builder force(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + /** + * Indicate whether detection should be re-run + */ + public Builder force(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + + /** + * The threshold for determining if content is an intro or not + */ + public Builder threshold(double threshold) { + Utils.checkNotNull(threshold, "threshold"); + this.threshold = Optional.ofNullable(threshold); + return this; + } + + /** + * The threshold for determining if content is an intro or not + */ + public Builder threshold(Optional threshold) { + Utils.checkNotNull(threshold, "threshold"); + this.threshold = threshold; + return this; + } + + public DetectIntrosRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DetectIntrosRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + force, threshold); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosRequestBuilder.java new file mode 100644 index 00000000..81d8d99f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DetectIntros; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DetectIntrosRequestBuilder { + + private DetectIntrosRequest request; + private final SDKConfiguration sdkConfiguration; + + public DetectIntrosRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DetectIntrosRequestBuilder request(DetectIntrosRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DetectIntrosResponse call() throws Exception { + + RequestOperation operation + = new DetectIntros.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosResponse.java new file mode 100644 index 00000000..b918d651 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectIntrosResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DetectIntrosResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DetectIntrosResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DetectIntrosResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DetectIntrosResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DetectIntrosResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectIntrosResponse other = (DetectIntrosResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DetectIntrosResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DetectIntrosResponse build() { + + return new DetectIntrosResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityRequest.java new file mode 100644 index 00000000..44713380 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityRequest.java @@ -0,0 +1,892 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class DetectVoiceActivityRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + /** + * Indicate whether detection should be re-run + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=force") + private Optional force; + + /** + * Indicate whether detection is manually run + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=manual") + private Optional manual; + + @JsonCreator + public DetectVoiceActivityRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional force, + Optional manual) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(force, "force"); + Utils.checkNotNull(manual, "manual"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.force = force; + this.manual = manual; + } + + public DetectVoiceActivityRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + /** + * Indicate whether detection should be re-run + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional force() { + return (Optional) force; + } + + /** + * Indicate whether detection is manually run + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional manual() { + return (Optional) manual; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DetectVoiceActivityRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public DetectVoiceActivityRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public DetectVoiceActivityRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public DetectVoiceActivityRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public DetectVoiceActivityRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public DetectVoiceActivityRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public DetectVoiceActivityRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public DetectVoiceActivityRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public DetectVoiceActivityRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public DetectVoiceActivityRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public DetectVoiceActivityRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public DetectVoiceActivityRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public DetectVoiceActivityRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public DetectVoiceActivityRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public DetectVoiceActivityRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public DetectVoiceActivityRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public DetectVoiceActivityRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public DetectVoiceActivityRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public DetectVoiceActivityRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public DetectVoiceActivityRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public DetectVoiceActivityRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public DetectVoiceActivityRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public DetectVoiceActivityRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * Indicate whether detection should be re-run + */ + public DetectVoiceActivityRequest withForce(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + + /** + * Indicate whether detection should be re-run + */ + public DetectVoiceActivityRequest withForce(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + /** + * Indicate whether detection is manually run + */ + public DetectVoiceActivityRequest withManual(BoolInt manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = Optional.ofNullable(manual); + return this; + } + + + /** + * Indicate whether detection is manually run + */ + public DetectVoiceActivityRequest withManual(Optional manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = manual; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectVoiceActivityRequest other = (DetectVoiceActivityRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.force, other.force) && + Utils.enhancedDeepEquals(this.manual, other.manual); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + force, manual); + } + + @Override + public String toString() { + return Utils.toString(DetectVoiceActivityRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "force", force, + "manual", manual); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional force = Optional.empty(); + + private Optional manual = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * Indicate whether detection should be re-run + */ + public Builder force(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + /** + * Indicate whether detection should be re-run + */ + public Builder force(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + + /** + * Indicate whether detection is manually run + */ + public Builder manual(BoolInt manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = Optional.ofNullable(manual); + return this; + } + + /** + * Indicate whether detection is manually run + */ + public Builder manual(Optional manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = manual; + return this; + } + + public DetectVoiceActivityRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new DetectVoiceActivityRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + force, manual); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityRequestBuilder.java new file mode 100644 index 00000000..0ea35cba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DetectVoiceActivity; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class DetectVoiceActivityRequestBuilder { + + private DetectVoiceActivityRequest request; + private final SDKConfiguration sdkConfiguration; + + public DetectVoiceActivityRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DetectVoiceActivityRequestBuilder request(DetectVoiceActivityRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DetectVoiceActivityResponse call() throws Exception { + + RequestOperation operation + = new DetectVoiceActivity.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityResponse.java new file mode 100644 index 00000000..d8bec5ed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DetectVoiceActivityResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DetectVoiceActivityResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DetectVoiceActivityResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DetectVoiceActivityResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DetectVoiceActivityResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DetectVoiceActivityResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectVoiceActivityResponse other = (DetectVoiceActivityResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DetectVoiceActivityResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DetectVoiceActivityResponse build() { + + return new DetectVoiceActivityResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Device.java b/src/main/java/dev/plexapi/sdk/models/operations/Device.java index e5807309..ecbe936b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Device.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Device.java @@ -9,27 +9,18 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; import java.util.Optional; public class Device { @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("name") - private Optional name; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("platform") - private Optional platform; + @JsonProperty("accessToken") + private Optional accessToken; @JsonInclude(Include.NON_ABSENT) @@ -38,46 +29,38 @@ public class Device { @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAt") - private Optional createdAt; + @JsonProperty("Connection") + private Optional> connection; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; @JsonCreator public Device( - @JsonProperty("id") Optional id, - @JsonProperty("name") Optional name, - @JsonProperty("platform") Optional platform, + @JsonProperty("accessToken") Optional accessToken, @JsonProperty("clientIdentifier") Optional clientIdentifier, - @JsonProperty("createdAt") Optional createdAt) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(platform, "platform"); + @JsonProperty("Connection") Optional> connection, + @JsonProperty("name") Optional name) { + Utils.checkNotNull(accessToken, "accessToken"); Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - Utils.checkNotNull(createdAt, "createdAt"); - this.id = id; - this.name = name; - this.platform = platform; + Utils.checkNotNull(connection, "connection"); + Utils.checkNotNull(name, "name"); + this.accessToken = accessToken; this.clientIdentifier = clientIdentifier; - this.createdAt = createdAt; + this.connection = connection; + this.name = name; } public Device() { this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); + Optional.empty()); } @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional name() { - return name; - } - - @JsonIgnore - public Optional platform() { - return platform; + public Optional accessToken() { + return accessToken; } @JsonIgnore @@ -85,9 +68,15 @@ public class Device { return clientIdentifier; } + @SuppressWarnings("unchecked") @JsonIgnore - public Optional createdAt() { - return createdAt; + public Optional> connection() { + return (Optional>) connection; + } + + @JsonIgnore + public Optional name() { + return name; } public static Builder builder() { @@ -95,42 +84,16 @@ public class Device { } - public Device withId(double id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); + public Device withAccessToken(String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = Optional.ofNullable(accessToken); return this; } - public Device withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Device withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - - public Device withName(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public Device withPlatform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - - public Device withPlatform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; + public Device withAccessToken(Optional accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; return this; } @@ -147,16 +110,29 @@ public class Device { return this; } - public Device withCreatedAt(double createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = Optional.ofNullable(createdAt); + public Device withConnection(List connection) { + Utils.checkNotNull(connection, "connection"); + this.connection = Optional.ofNullable(connection); return this; } - public Device withCreatedAt(Optional createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; + public Device withConnection(Optional> connection) { + Utils.checkNotNull(connection, "connection"); + this.connection = connection; + return this; + } + + public Device withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + public Device withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; return this; } @@ -170,83 +146,53 @@ public class Device { } Device other = (Device) o; return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.accessToken, other.accessToken) && Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt); + Utils.enhancedDeepEquals(this.connection, other.connection) && + Utils.enhancedDeepEquals(this.name, other.name); } @Override public int hashCode() { return Utils.enhancedHash( - id, name, platform, - clientIdentifier, createdAt); + accessToken, clientIdentifier, connection, + name); } @Override public String toString() { return Utils.toString(Device.class, - "id", id, - "name", name, - "platform", platform, + "accessToken", accessToken, "clientIdentifier", clientIdentifier, - "createdAt", createdAt); + "connection", connection, + "name", name); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional id = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional platform = Optional.empty(); + private Optional accessToken = Optional.empty(); private Optional clientIdentifier = Optional.empty(); - private Optional createdAt = Optional.empty(); + private Optional> connection = Optional.empty(); + + private Optional name = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder id(double id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); + public Builder accessToken(String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = Optional.ofNullable(accessToken); return this; } - public Builder id(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - public Builder name(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - public Builder name(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder platform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - public Builder platform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; + public Builder accessToken(Optional accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; return this; } @@ -264,23 +210,36 @@ public class Device { } - public Builder createdAt(double createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = Optional.ofNullable(createdAt); + public Builder connection(List connection) { + Utils.checkNotNull(connection, "connection"); + this.connection = Optional.ofNullable(connection); return this; } - public Builder createdAt(Optional createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; + public Builder connection(Optional> connection) { + Utils.checkNotNull(connection, "connection"); + this.connection = connection; + return this; + } + + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; return this; } public Device build() { return new Device( - id, name, platform, - clientIdentifier, createdAt); + accessToken, clientIdentifier, connection, + name); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DeviceChannel.java b/src/main/java/dev/plexapi/sdk/models/operations/DeviceChannel.java new file mode 100644 index 00000000..0cabb9b0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DeviceChannel.java @@ -0,0 +1,437 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class DeviceChannel { + /** + * Indicates the channel is DRMed and thus may not be playable + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("drm") + private Optional drm; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("favorite") + private Optional favorite; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hd") + private Optional hd; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("signalQuality") + private Optional signalQuality; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("signalStrength") + private Optional signalStrength; + + @JsonCreator + public DeviceChannel( + @JsonProperty("drm") Optional drm, + @JsonProperty("favorite") Optional favorite, + @JsonProperty("hd") Optional hd, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("key") Optional key, + @JsonProperty("name") Optional name, + @JsonProperty("signalQuality") Optional signalQuality, + @JsonProperty("signalStrength") Optional signalStrength) { + Utils.checkNotNull(drm, "drm"); + Utils.checkNotNull(favorite, "favorite"); + Utils.checkNotNull(hd, "hd"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(signalQuality, "signalQuality"); + Utils.checkNotNull(signalStrength, "signalStrength"); + this.drm = drm; + this.favorite = favorite; + this.hd = hd; + this.identifier = identifier; + this.key = key; + this.name = name; + this.signalQuality = signalQuality; + this.signalStrength = signalStrength; + } + + public DeviceChannel() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the channel is DRMed and thus may not be playable + */ + @JsonIgnore + public Optional drm() { + return drm; + } + + @JsonIgnore + public Optional favorite() { + return favorite; + } + + @JsonIgnore + public Optional hd() { + return hd; + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional name() { + return name; + } + + @JsonIgnore + public Optional signalQuality() { + return signalQuality; + } + + @JsonIgnore + public Optional signalStrength() { + return signalStrength; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the channel is DRMed and thus may not be playable + */ + public DeviceChannel withDrm(boolean drm) { + Utils.checkNotNull(drm, "drm"); + this.drm = Optional.ofNullable(drm); + return this; + } + + + /** + * Indicates the channel is DRMed and thus may not be playable + */ + public DeviceChannel withDrm(Optional drm) { + Utils.checkNotNull(drm, "drm"); + this.drm = drm; + return this; + } + + public DeviceChannel withFavorite(boolean favorite) { + Utils.checkNotNull(favorite, "favorite"); + this.favorite = Optional.ofNullable(favorite); + return this; + } + + + public DeviceChannel withFavorite(Optional favorite) { + Utils.checkNotNull(favorite, "favorite"); + this.favorite = favorite; + return this; + } + + public DeviceChannel withHd(boolean hd) { + Utils.checkNotNull(hd, "hd"); + this.hd = Optional.ofNullable(hd); + return this; + } + + + public DeviceChannel withHd(Optional hd) { + Utils.checkNotNull(hd, "hd"); + this.hd = hd; + return this; + } + + public DeviceChannel withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public DeviceChannel withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public DeviceChannel withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public DeviceChannel withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public DeviceChannel withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + public DeviceChannel withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public DeviceChannel withSignalQuality(long signalQuality) { + Utils.checkNotNull(signalQuality, "signalQuality"); + this.signalQuality = Optional.ofNullable(signalQuality); + return this; + } + + + public DeviceChannel withSignalQuality(Optional signalQuality) { + Utils.checkNotNull(signalQuality, "signalQuality"); + this.signalQuality = signalQuality; + return this; + } + + public DeviceChannel withSignalStrength(long signalStrength) { + Utils.checkNotNull(signalStrength, "signalStrength"); + this.signalStrength = Optional.ofNullable(signalStrength); + return this; + } + + + public DeviceChannel withSignalStrength(Optional signalStrength) { + Utils.checkNotNull(signalStrength, "signalStrength"); + this.signalStrength = signalStrength; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeviceChannel other = (DeviceChannel) o; + return + Utils.enhancedDeepEquals(this.drm, other.drm) && + Utils.enhancedDeepEquals(this.favorite, other.favorite) && + Utils.enhancedDeepEquals(this.hd, other.hd) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.signalQuality, other.signalQuality) && + Utils.enhancedDeepEquals(this.signalStrength, other.signalStrength); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + drm, favorite, hd, + identifier, key, name, + signalQuality, signalStrength); + } + + @Override + public String toString() { + return Utils.toString(DeviceChannel.class, + "drm", drm, + "favorite", favorite, + "hd", hd, + "identifier", identifier, + "key", key, + "name", name, + "signalQuality", signalQuality, + "signalStrength", signalStrength); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional drm = Optional.empty(); + + private Optional favorite = Optional.empty(); + + private Optional hd = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional signalQuality = Optional.empty(); + + private Optional signalStrength = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the channel is DRMed and thus may not be playable + */ + public Builder drm(boolean drm) { + Utils.checkNotNull(drm, "drm"); + this.drm = Optional.ofNullable(drm); + return this; + } + + /** + * Indicates the channel is DRMed and thus may not be playable + */ + public Builder drm(Optional drm) { + Utils.checkNotNull(drm, "drm"); + this.drm = drm; + return this; + } + + + public Builder favorite(boolean favorite) { + Utils.checkNotNull(favorite, "favorite"); + this.favorite = Optional.ofNullable(favorite); + return this; + } + + public Builder favorite(Optional favorite) { + Utils.checkNotNull(favorite, "favorite"); + this.favorite = favorite; + return this; + } + + + public Builder hd(boolean hd) { + Utils.checkNotNull(hd, "hd"); + this.hd = Optional.ofNullable(hd); + return this; + } + + public Builder hd(Optional hd) { + Utils.checkNotNull(hd, "hd"); + this.hd = hd; + 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 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 name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + public Builder signalQuality(long signalQuality) { + Utils.checkNotNull(signalQuality, "signalQuality"); + this.signalQuality = Optional.ofNullable(signalQuality); + return this; + } + + public Builder signalQuality(Optional signalQuality) { + Utils.checkNotNull(signalQuality, "signalQuality"); + this.signalQuality = signalQuality; + return this; + } + + + public Builder signalStrength(long signalStrength) { + Utils.checkNotNull(signalStrength, "signalStrength"); + this.signalStrength = Optional.ofNullable(signalStrength); + return this; + } + + public Builder signalStrength(Optional signalStrength) { + Utils.checkNotNull(signalStrength, "signalStrength"); + this.signalStrength = signalStrength; + return this; + } + + public DeviceChannel build() { + + return new DeviceChannel( + drm, favorite, hd, + identifier, key, name, + signalQuality, signalStrength); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Director.java b/src/main/java/dev/plexapi/sdk/models/operations/Director.java deleted file mode 100644 index d72d8d81..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Director.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Director { - /** - * Unique identifier for the director. - */ - @JsonProperty("id") - private int id; - - /** - * The filter string used to query this director. - */ - @JsonProperty("filter") - private String filter; - - /** - * The role of Director - */ - @JsonProperty("tag") - private String tag; - - /** - * A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. - */ - @JsonProperty("tagKey") - private String tagKey; - - /** - * The absolute URL of the thumbnail image for the director. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public Director( - @JsonProperty("id") int id, - @JsonProperty("filter") String filter, - @JsonProperty("tag") String tag, - @JsonProperty("tagKey") String tagKey, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(tagKey, "tagKey"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.filter = filter; - this.tag = tag; - this.tagKey = tagKey; - this.thumb = thumb; - } - - public Director( - int id, - String filter, - String tag, - String tagKey) { - this(id, filter, tag, - tagKey, Optional.empty()); - } - - /** - * Unique identifier for the director. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The filter string used to query this director. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * The role of Director - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. - */ - @JsonIgnore - public String tagKey() { - return tagKey; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique identifier for the director. - */ - public Director withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The filter string used to query this director. - */ - public Director withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The role of Director - */ - public Director withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. - */ - public Director withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - public Director withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the director. - */ - public Director withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Director other = (Director) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag, - tagKey, thumb); - } - - @Override - public String toString() { - return Utils.toString(Director.class, - "id", id, - "filter", filter, - "tag", tag, - "tagKey", tagKey, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String filter; - - private String tag; - - private String tagKey; - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique identifier for the director. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The filter string used to query this director. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * The role of Director - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the director. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public Director build() { - - return new Director( - id, filter, tag, - tagKey, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Directory.java b/src/main/java/dev/plexapi/sdk/models/operations/Directory.java index 6d4eac96..bb0b3c0e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Directory.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Directory.java @@ -9,58 +9,123 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Optional; public class Directory { - + /** + * The filter string to view metadata wit this tag + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("count") - private Optional count; + @JsonProperty("filter") + private Optional filter; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - + @JsonProperty("id") + private Optional id; + /** + * The name of the tag + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; + @JsonProperty("tag") + private Optional tag; + + /** + * The key of this tag. This is a universal key across all PMS instances and plex.tv services + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagKey") + private Optional tagKey; + + /** + * The type of the tag + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagType") + private Optional tagType; + + /** + * The URL to a thumbnail for this tag + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; @JsonCreator public Directory( - @JsonProperty("count") Optional count, - @JsonProperty("key") Optional key, - @JsonProperty("title") Optional title) { - Utils.checkNotNull(count, "count"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - this.count = count; - this.key = key; - this.title = title; + @JsonProperty("filter") Optional filter, + @JsonProperty("id") Optional id, + @JsonProperty("tag") Optional tag, + @JsonProperty("tagKey") Optional tagKey, + @JsonProperty("tagType") Optional tagType, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(tagKey, "tagKey"); + Utils.checkNotNull(tagType, "tagType"); + Utils.checkNotNull(thumb, "thumb"); + this.filter = filter; + this.id = id; + this.tag = tag; + this.tagKey = tagKey; + this.tagType = tagType; + this.thumb = thumb; } public Directory() { - this(Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The filter string to view metadata wit this tag + */ + @JsonIgnore + public Optional filter() { + return filter; } @JsonIgnore - public Optional count() { - return count; + public Optional id() { + return id; } + /** + * The name of the tag + */ @JsonIgnore - public Optional key() { - return key; + public Optional tag() { + return tag; } + /** + * The key of this tag. This is a universal key across all PMS instances and plex.tv services + */ @JsonIgnore - public Optional title() { - return title; + public Optional tagKey() { + return tagKey; + } + + /** + * The type of the tag + */ + @JsonIgnore + public Optional tagType() { + return tagType; + } + + /** + * The URL to a thumbnail for this tag + */ + @JsonIgnore + public Optional thumb() { + return thumb; } public static Builder builder() { @@ -68,42 +133,111 @@ public class Directory { } - public Directory withCount(double count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.ofNullable(count); + /** + * The filter string to view metadata wit this tag + */ + public Directory withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); return this; } - public Directory withCount(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; + /** + * The filter string to view metadata wit this tag + */ + public Directory withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; return this; } - public Directory withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); + public Directory withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); return this; } - public Directory withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; + public Directory withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public Directory withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); + /** + * The name of the tag + */ + public Directory withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); return this; } - public Directory withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; + /** + * The name of the tag + */ + public Directory withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + /** + * The key of this tag. This is a universal key across all PMS instances and plex.tv services + */ + public Directory withTagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + + /** + * The key of this tag. This is a universal key across all PMS instances and plex.tv services + */ + public Directory withTagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + /** + * The type of the tag + */ + public Directory withTagType(long tagType) { + Utils.checkNotNull(tagType, "tagType"); + this.tagType = Optional.ofNullable(tagType); + return this; + } + + + /** + * The type of the tag + */ + public Directory withTagType(Optional tagType) { + Utils.checkNotNull(tagType, "tagType"); + this.tagType = tagType; + return this; + } + + /** + * The URL to a thumbnail for this tag + */ + public Directory withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * The URL to a thumbnail for this tag + */ + public Directory withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; return this; } @@ -117,81 +251,164 @@ public class Directory { } Directory other = (Directory) o; return - Utils.enhancedDeepEquals(this.count, other.count) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.tag, other.tag) && + Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && + Utils.enhancedDeepEquals(this.tagType, other.tagType) && + Utils.enhancedDeepEquals(this.thumb, other.thumb); } @Override public int hashCode() { return Utils.enhancedHash( - count, key, title); + filter, id, tag, + tagKey, tagType, thumb); } @Override public String toString() { return Utils.toString(Directory.class, - "count", count, - "key", key, - "title", title); + "filter", filter, + "id", id, + "tag", tag, + "tagKey", tagKey, + "tagType", tagType, + "thumb", thumb); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional count = Optional.empty(); + private Optional filter = Optional.empty(); - private Optional key = Optional.empty(); + private Optional id = Optional.empty(); - private Optional title = Optional.empty(); + private Optional tag = Optional.empty(); + + private Optional tagKey = Optional.empty(); + + private Optional tagType = Optional.empty(); + + private Optional thumb = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder count(double count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.ofNullable(count); + /** + * The filter string to view metadata wit this tag + */ + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); return this; } - public Builder count(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; + /** + * The filter string to view metadata wit this tag + */ + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; return this; } - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); + public Builder id(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); return this; } - public Builder key(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; return this; } - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); + /** + * The name of the tag + */ + public Builder tag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); return this; } - public Builder title(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; + /** + * The name of the tag + */ + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + + /** + * The key of this tag. This is a universal key across all PMS instances and plex.tv services + */ + public Builder tagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + /** + * The key of this tag. This is a universal key across all PMS instances and plex.tv services + */ + public Builder tagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + + /** + * The type of the tag + */ + public Builder tagType(long tagType) { + Utils.checkNotNull(tagType, "tagType"); + this.tagType = Optional.ofNullable(tagType); + return this; + } + + /** + * The type of the tag + */ + public Builder tagType(Optional tagType) { + Utils.checkNotNull(tagType, "tagType"); + this.tagType = tagType; + return this; + } + + + /** + * The URL to a thumbnail for this tag + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The URL to a thumbnail for this tag + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; return this; } public Directory build() { return new Directory( - count, key, title); + filter, id, tag, + tagKey, tagType, thumb); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DiscoverDevicesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/DiscoverDevicesRequestBuilder.java new file mode 100644 index 00000000..973390c4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DiscoverDevicesRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DiscoverDevices; +import java.lang.Exception; + +public class DiscoverDevicesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public DiscoverDevicesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DiscoverDevicesResponse call() throws Exception { + + RequestlessOperation operation + = new DiscoverDevices.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DiscoverDevicesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/DiscoverDevicesResponse.java new file mode 100644 index 00000000..8decc859 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DiscoverDevicesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +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.Optional; + + +public class DiscoverDevicesResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + @JsonCreator + public DiscoverDevicesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + } + + public DiscoverDevicesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DiscoverDevicesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DiscoverDevicesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DiscoverDevicesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DiscoverDevicesResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public DiscoverDevicesResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DiscoverDevicesResponse other = (DiscoverDevicesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + @Override + public String toString() { + return Utils.toString(DiscoverDevicesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public DiscoverDevicesResponse build() { + + return new DiscoverDevicesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Download.java b/src/main/java/dev/plexapi/sdk/models/operations/Download.java deleted file mode 100644 index 1861c2eb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Download.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Download - * - *

Indicate that you want to start download any updates found. - */ -public enum Download { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - Download(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (Download o: Download.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DownloadQueue.java b/src/main/java/dev/plexapi/sdk/models/operations/DownloadQueue.java new file mode 100644 index 00000000..8a9b9dd2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DownloadQueue.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class DownloadQueue { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("itemCount") + private Optional itemCount; + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public DownloadQueue( + @JsonProperty("id") Optional id, + @JsonProperty("itemCount") Optional itemCount, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(itemCount, "itemCount"); + Utils.checkNotNull(status, "status"); + this.id = id; + this.itemCount = itemCount; + this.status = status; + } + + public DownloadQueue() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional itemCount() { + return itemCount; + } + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + public static Builder builder() { + return new Builder(); + } + + + public DownloadQueue withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public DownloadQueue withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public DownloadQueue withItemCount(long itemCount) { + Utils.checkNotNull(itemCount, "itemCount"); + this.itemCount = Optional.ofNullable(itemCount); + return this; + } + + + public DownloadQueue withItemCount(Optional itemCount) { + Utils.checkNotNull(itemCount, "itemCount"); + this.itemCount = itemCount; + return this; + } + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + public DownloadQueue withStatus(Status status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + public DownloadQueue withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DownloadQueue other = (DownloadQueue) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.itemCount, other.itemCount) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, itemCount, status); + } + + @Override + public String toString() { + return Utils.toString(DownloadQueue.class, + "id", id, + "itemCount", itemCount, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional itemCount = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder id(long 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 itemCount(long itemCount) { + Utils.checkNotNull(itemCount, "itemCount"); + this.itemCount = Optional.ofNullable(itemCount); + return this; + } + + public Builder itemCount(Optional itemCount) { + Utils.checkNotNull(itemCount, "itemCount"); + this.itemCount = itemCount; + return this; + } + + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + public Builder status(Status status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public DownloadQueue build() { + + return new DownloadQueue( + id, itemCount, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DownloadQueueItem.java b/src/main/java/dev/plexapi/sdk/models/operations/DownloadQueueItem.java new file mode 100644 index 00000000..1d1dfa04 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/DownloadQueueItem.java @@ -0,0 +1,529 @@ +/* + * 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.models.shared.TranscodeSession; +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.Optional; + + +public class DownloadQueueItem { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DecisionResult") + private Optional decisionResult; + + /** + * The error encountered in transcoding or decision + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private Optional error; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("queueId") + private Optional queueId; + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcode") + private Optional transcode; + + /** + * The transcode session if item is currently being transcoded + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("TranscodeSession") + private Optional transcodeSession; + + @JsonCreator + public DownloadQueueItem( + @JsonProperty("DecisionResult") Optional decisionResult, + @JsonProperty("error") Optional error, + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("queueId") Optional queueId, + @JsonProperty("status") Optional status, + @JsonProperty("transcode") Optional transcode, + @JsonProperty("TranscodeSession") Optional transcodeSession) { + Utils.checkNotNull(decisionResult, "decisionResult"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(queueId, "queueId"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(transcode, "transcode"); + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.decisionResult = decisionResult; + this.error = error; + this.id = id; + this.key = key; + this.queueId = queueId; + this.status = status; + this.transcode = transcode; + this.transcodeSession = transcodeSession; + } + + public DownloadQueueItem() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional decisionResult() { + return (Optional) decisionResult; + } + + /** + * The error encountered in transcoding or decision + */ + @JsonIgnore + public Optional error() { + return error; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional queueId() { + return queueId; + } + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional transcode() { + return (Optional) transcode; + } + + /** + * The transcode session if item is currently being transcoded + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional transcodeSession() { + return (Optional) transcodeSession; + } + + public static Builder builder() { + return new Builder(); + } + + + public DownloadQueueItem withDecisionResult(DecisionResult decisionResult) { + Utils.checkNotNull(decisionResult, "decisionResult"); + this.decisionResult = Optional.ofNullable(decisionResult); + return this; + } + + + public DownloadQueueItem withDecisionResult(Optional decisionResult) { + Utils.checkNotNull(decisionResult, "decisionResult"); + this.decisionResult = decisionResult; + return this; + } + + /** + * The error encountered in transcoding or decision + */ + public DownloadQueueItem withError(String error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + + /** + * The error encountered in transcoding or decision + */ + public DownloadQueueItem withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + public DownloadQueueItem withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public DownloadQueueItem withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public DownloadQueueItem withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public DownloadQueueItem withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public DownloadQueueItem withQueueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = Optional.ofNullable(queueId); + return this; + } + + + public DownloadQueueItem withQueueId(Optional queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + public DownloadQueueItem withStatus(ListDownloadQueueItemsStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + public DownloadQueueItem withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + public DownloadQueueItem withTranscode(Transcode transcode) { + Utils.checkNotNull(transcode, "transcode"); + this.transcode = Optional.ofNullable(transcode); + return this; + } + + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + public DownloadQueueItem withTranscode(Optional transcode) { + Utils.checkNotNull(transcode, "transcode"); + this.transcode = transcode; + return this; + } + + /** + * The transcode session if item is currently being transcoded + */ + public DownloadQueueItem withTranscodeSession(TranscodeSession transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = Optional.ofNullable(transcodeSession); + return this; + } + + + /** + * The transcode session if item is currently being transcoded + */ + public DownloadQueueItem withTranscodeSession(Optional transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = transcodeSession; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DownloadQueueItem other = (DownloadQueueItem) o; + return + Utils.enhancedDeepEquals(this.decisionResult, other.decisionResult) && + Utils.enhancedDeepEquals(this.error, other.error) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.queueId, other.queueId) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.transcode, other.transcode) && + Utils.enhancedDeepEquals(this.transcodeSession, other.transcodeSession); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + decisionResult, error, id, + key, queueId, status, + transcode, transcodeSession); + } + + @Override + public String toString() { + return Utils.toString(DownloadQueueItem.class, + "decisionResult", decisionResult, + "error", error, + "id", id, + "key", key, + "queueId", queueId, + "status", status, + "transcode", transcode, + "transcodeSession", transcodeSession); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional decisionResult = Optional.empty(); + + private Optional error = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional queueId = Optional.empty(); + + private Optional status = Optional.empty(); + + private Optional transcode = Optional.empty(); + + private Optional transcodeSession = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder decisionResult(DecisionResult decisionResult) { + Utils.checkNotNull(decisionResult, "decisionResult"); + this.decisionResult = Optional.ofNullable(decisionResult); + return this; + } + + public Builder decisionResult(Optional decisionResult) { + Utils.checkNotNull(decisionResult, "decisionResult"); + this.decisionResult = decisionResult; + return this; + } + + + /** + * The error encountered in transcoding or decision + */ + public Builder error(String error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * The error encountered in transcoding or decision + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + + public Builder id(long 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 queueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = Optional.ofNullable(queueId); + return this; + } + + public Builder queueId(Optional queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + public Builder status(ListDownloadQueueItemsStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + public Builder transcode(Transcode transcode) { + Utils.checkNotNull(transcode, "transcode"); + this.transcode = Optional.ofNullable(transcode); + return this; + } + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + public Builder transcode(Optional transcode) { + Utils.checkNotNull(transcode, "transcode"); + this.transcode = transcode; + return this; + } + + + /** + * The transcode session if item is currently being transcoded + */ + public Builder transcodeSession(TranscodeSession transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = Optional.ofNullable(transcodeSession); + return this; + } + + /** + * The transcode session if item is currently being transcoded + */ + public Builder transcodeSession(Optional transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = transcodeSession; + return this; + } + + public DownloadQueueItem build() { + + return new DownloadQueueItem( + decisionResult, error, id, + key, queueId, status, + transcode, transcodeSession); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Dvr.java b/src/main/java/dev/plexapi/sdk/models/operations/Dvr.java new file mode 100644 index 00000000..7877ba3b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Dvr.java @@ -0,0 +1,290 @@ +/* + * 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.models.shared.Device; +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.Optional; + + +public class Dvr { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineup") + private Optional lineup; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public Dvr( + @JsonProperty("Device") Optional> device, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("lineup") Optional lineup, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(lineup, "lineup"); + Utils.checkNotNull(uuid, "uuid"); + this.device = device; + this.key = key; + this.language = language; + this.lineup = lineup; + this.uuid = uuid; + } + + public Dvr() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> device() { + return (Optional>) device; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional lineup() { + return lineup; + } + + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public Dvr withDevice(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public Dvr withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public Dvr withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public Dvr withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Dvr withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public Dvr withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public Dvr withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + public Dvr withLineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public Dvr withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + public Dvr withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dvr other = (Dvr) o; + return + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.lineup, other.lineup) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + device, key, language, + lineup, uuid); + } + + @Override + public String toString() { + return Utils.toString(Dvr.class, + "device", device, + "key", key, + "language", language, + "lineup", lineup, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> device = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional lineup = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder device(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + 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 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 lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + public Builder lineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public Dvr build() { + + return new Dvr( + device, key, language, + lineup, uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditMarkerRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/EditMarkerRequest.java new file mode 100644 index 00000000..61a7f8d4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditMarkerRequest.java @@ -0,0 +1,1017 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class EditMarkerRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + /** + * The id of the marker to edit + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=marker") + private String marker; + + /** + * The type of marker to edit/create + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private long type; + + /** + * The start time of the marker + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=startTimeOffset") + private long startTimeOffset; + + /** + * The end time of the marker + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=endTimeOffset") + private Optional endTimeOffset; + + /** + * The attributes to assign to this marker + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=attributes") + private Optional attributes; + + @JsonCreator + public EditMarkerRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + String marker, + long type, + long startTimeOffset, + Optional endTimeOffset, + Optional attributes) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(marker, "marker"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + Utils.checkNotNull(attributes, "attributes"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.marker = marker; + this.type = type; + this.startTimeOffset = startTimeOffset; + this.endTimeOffset = endTimeOffset; + this.attributes = attributes; + } + + public EditMarkerRequest( + String ids, + String marker, + long type, + long startTimeOffset) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + marker, type, startTimeOffset, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + /** + * The id of the marker to edit + */ + @JsonIgnore + public String marker() { + return marker; + } + + /** + * The type of marker to edit/create + */ + @JsonIgnore + public long type() { + return type; + } + + /** + * The start time of the marker + */ + @JsonIgnore + public long startTimeOffset() { + return startTimeOffset; + } + + /** + * The end time of the marker + */ + @JsonIgnore + public Optional endTimeOffset() { + return endTimeOffset; + } + + /** + * The attributes to assign to this marker + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional attributes() { + return (Optional) attributes; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EditMarkerRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EditMarkerRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public EditMarkerRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public EditMarkerRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public EditMarkerRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public EditMarkerRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public EditMarkerRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public EditMarkerRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public EditMarkerRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public EditMarkerRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public EditMarkerRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public EditMarkerRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public EditMarkerRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public EditMarkerRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public EditMarkerRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public EditMarkerRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public EditMarkerRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public EditMarkerRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public EditMarkerRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public EditMarkerRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public EditMarkerRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public EditMarkerRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public EditMarkerRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * The id of the marker to edit + */ + public EditMarkerRequest withMarker(String marker) { + Utils.checkNotNull(marker, "marker"); + this.marker = marker; + return this; + } + + /** + * The type of marker to edit/create + */ + public EditMarkerRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The start time of the marker + */ + public EditMarkerRequest withStartTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + return this; + } + + /** + * The end time of the marker + */ + public EditMarkerRequest withEndTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = Optional.ofNullable(endTimeOffset); + return this; + } + + + /** + * The end time of the marker + */ + public EditMarkerRequest withEndTimeOffset(Optional endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + /** + * The attributes to assign to this marker + */ + public EditMarkerRequest withAttributes(QueryParamAttributes attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = Optional.ofNullable(attributes); + return this; + } + + + /** + * The attributes to assign to this marker + */ + public EditMarkerRequest withAttributes(Optional attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = attributes; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditMarkerRequest other = (EditMarkerRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.marker, other.marker) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.startTimeOffset, other.startTimeOffset) && + Utils.enhancedDeepEquals(this.endTimeOffset, other.endTimeOffset) && + Utils.enhancedDeepEquals(this.attributes, other.attributes); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + marker, type, startTimeOffset, + endTimeOffset, attributes); + } + + @Override + public String toString() { + return Utils.toString(EditMarkerRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "marker", marker, + "type", type, + "startTimeOffset", startTimeOffset, + "endTimeOffset", endTimeOffset, + "attributes", attributes); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private String marker; + + private Long type; + + private Long startTimeOffset; + + private Optional endTimeOffset = Optional.empty(); + + private Optional attributes = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * The id of the marker to edit + */ + public Builder marker(String marker) { + Utils.checkNotNull(marker, "marker"); + this.marker = marker; + return this; + } + + + /** + * The type of marker to edit/create + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The start time of the marker + */ + public Builder startTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + return this; + } + + + /** + * The end time of the marker + */ + public Builder endTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = Optional.ofNullable(endTimeOffset); + return this; + } + + /** + * The end time of the marker + */ + public Builder endTimeOffset(Optional endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + + /** + * The attributes to assign to this marker + */ + public Builder attributes(QueryParamAttributes attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + * The attributes to assign to this marker + */ + public Builder attributes(Optional attributes) { + Utils.checkNotNull(attributes, "attributes"); + this.attributes = attributes; + return this; + } + + public EditMarkerRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new EditMarkerRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + marker, type, startTimeOffset, + endTimeOffset, attributes); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditMarkerRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/EditMarkerRequestBuilder.java new file mode 100644 index 00000000..a30ac653 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditMarkerRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.EditMarker; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class EditMarkerRequestBuilder { + + private EditMarkerRequest request; + private final SDKConfiguration sdkConfiguration; + + public EditMarkerRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EditMarkerRequestBuilder request(EditMarkerRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public EditMarkerResponse call() throws Exception { + + RequestOperation operation + = new EditMarker.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditMarkerResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/EditMarkerResponse.java new file mode 100644 index 00000000..a7ba7b41 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditMarkerResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.PostResponses200; +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.Optional; + + +public class EditMarkerResponse 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; + + /** + * OK + */ + private Optional postResponses200; + + @JsonCreator + public EditMarkerResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional postResponses200) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(postResponses200, "postResponses200"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.postResponses200 = postResponses200; + } + + public EditMarkerResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional postResponses200() { + return (Optional) postResponses200; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EditMarkerResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EditMarkerResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EditMarkerResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public EditMarkerResponse withPostResponses200(PostResponses200 postResponses200) { + Utils.checkNotNull(postResponses200, "postResponses200"); + this.postResponses200 = Optional.ofNullable(postResponses200); + return this; + } + + + /** + * OK + */ + public EditMarkerResponse withPostResponses200(Optional postResponses200) { + Utils.checkNotNull(postResponses200, "postResponses200"); + this.postResponses200 = postResponses200; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditMarkerResponse other = (EditMarkerResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.postResponses200, other.postResponses200); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + postResponses200); + } + + @Override + public String toString() { + return Utils.toString(EditMarkerResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "postResponses200", postResponses200); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional postResponses200 = 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; + } + + + /** + * OK + */ + public Builder postResponses200(PostResponses200 postResponses200) { + Utils.checkNotNull(postResponses200, "postResponses200"); + this.postResponses200 = Optional.ofNullable(postResponses200); + return this; + } + + /** + * OK + */ + public Builder postResponses200(Optional postResponses200) { + Utils.checkNotNull(postResponses200, "postResponses200"); + this.postResponses200 = postResponses200; + return this; + } + + public EditMarkerResponse build() { + + return new EditMarkerResponse( + contentType, statusCode, rawResponse, + postResponses200); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemRequest.java new file mode 100644 index 00000000..70ba85c2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemRequest.java @@ -0,0 +1,832 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.List; +import java.util.Optional; + + +public class EditMetadataItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private List ids; + + /** + * The new values for the metadata item + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=args") + private Optional args; + + @JsonCreator + public EditMetadataItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + List ids, + Optional args) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(args, "args"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.args = args; + } + + public EditMetadataItemRequest( + List ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public List ids() { + return ids; + } + + /** + * The new values for the metadata item + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional args() { + return (Optional) args; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EditMetadataItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EditMetadataItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public EditMetadataItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public EditMetadataItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public EditMetadataItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public EditMetadataItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public EditMetadataItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public EditMetadataItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public EditMetadataItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public EditMetadataItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public EditMetadataItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public EditMetadataItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public EditMetadataItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public EditMetadataItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public EditMetadataItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public EditMetadataItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public EditMetadataItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public EditMetadataItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public EditMetadataItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public EditMetadataItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public EditMetadataItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public EditMetadataItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public EditMetadataItemRequest withIds(List ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * The new values for the metadata item + */ + public EditMetadataItemRequest withArgs(Args args) { + Utils.checkNotNull(args, "args"); + this.args = Optional.ofNullable(args); + return this; + } + + + /** + * The new values for the metadata item + */ + public EditMetadataItemRequest withArgs(Optional args) { + Utils.checkNotNull(args, "args"); + this.args = args; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditMetadataItemRequest other = (EditMetadataItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.args, other.args); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + args); + } + + @Override + public String toString() { + return Utils.toString(EditMetadataItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "args", args); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private List ids; + + private Optional args = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(List ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * The new values for the metadata item + */ + public Builder args(Args args) { + Utils.checkNotNull(args, "args"); + this.args = Optional.ofNullable(args); + return this; + } + + /** + * The new values for the metadata item + */ + public Builder args(Optional args) { + Utils.checkNotNull(args, "args"); + this.args = args; + return this; + } + + public EditMetadataItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new EditMetadataItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + args); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemRequestBuilder.java new file mode 100644 index 00000000..edbb7ea7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.EditMetadataItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class EditMetadataItemRequestBuilder { + + private EditMetadataItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public EditMetadataItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EditMetadataItemRequestBuilder request(EditMetadataItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public EditMetadataItemResponse call() throws Exception { + + RequestOperation operation + = new EditMetadataItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemResponse.java new file mode 100644 index 00000000..e1b24f60 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditMetadataItemResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class EditMetadataItemResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public EditMetadataItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EditMetadataItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EditMetadataItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EditMetadataItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditMetadataItemResponse other = (EditMetadataItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(EditMetadataItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public EditMetadataItemResponse build() { + + return new EditMetadataItemResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditSectionQueryParamPrefs.java b/src/main/java/dev/plexapi/sdk/models/operations/EditSectionQueryParamPrefs.java new file mode 100644 index 00000000..1efe9461 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditSectionQueryParamPrefs.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * EditSectionQueryParamPrefs + * + *

The preferences for this section + */ +public class EditSectionQueryParamPrefs { + @JsonCreator + public EditSectionQueryParamPrefs() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(EditSectionQueryParamPrefs.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public EditSectionQueryParamPrefs build() { + + return new EditSectionQueryParamPrefs( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditSectionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/EditSectionRequest.java new file mode 100644 index 00000000..9eee1747 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditSectionRequest.java @@ -0,0 +1,1186 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.List; +import java.util.Optional; + + +public class EditSectionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private String sectionId; + + /** + * The name of the new section + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=name") + private Optional name; + + /** + * The scanner this section should use + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=scanner") + private Optional scanner; + + /** + * The agent this section should use for metadata + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=agent") + private String agent; + + /** + * The agent group id for this section + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=metadataAgentProviderGroupId") + private Optional metadataAgentProviderGroupId; + + /** + * The language of this section + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=language") + private Optional language; + + /** + * The locations on disk to add to this section + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=locations") + private Optional> locations; + + /** + * The preferences for this section + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=prefs") + private Optional prefs; + + @JsonCreator + public EditSectionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String sectionId, + Optional name, + Optional scanner, + String agent, + Optional metadataAgentProviderGroupId, + Optional language, + Optional> locations, + Optional prefs) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(scanner, "scanner"); + Utils.checkNotNull(agent, "agent"); + Utils.checkNotNull(metadataAgentProviderGroupId, "metadataAgentProviderGroupId"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(locations, "locations"); + Utils.checkNotNull(prefs, "prefs"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.name = name; + this.scanner = scanner; + this.agent = agent; + this.metadataAgentProviderGroupId = metadataAgentProviderGroupId; + this.language = language; + this.locations = locations; + this.prefs = prefs; + } + + public EditSectionRequest( + String sectionId, + String agent) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty(), Optional.empty(), agent, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section identifier + */ + @JsonIgnore + public String sectionId() { + return sectionId; + } + + /** + * The name of the new section + */ + @JsonIgnore + public Optional name() { + return name; + } + + /** + * The scanner this section should use + */ + @JsonIgnore + public Optional scanner() { + return scanner; + } + + /** + * The agent this section should use for metadata + */ + @JsonIgnore + public String agent() { + return agent; + } + + /** + * The agent group id for this section + */ + @JsonIgnore + public Optional metadataAgentProviderGroupId() { + return metadataAgentProviderGroupId; + } + + /** + * The language of this section + */ + @JsonIgnore + public Optional language() { + return language; + } + + /** + * The locations on disk to add to this section + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> locations() { + return (Optional>) locations; + } + + /** + * The preferences for this section + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional prefs() { + return (Optional) prefs; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EditSectionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EditSectionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public EditSectionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public EditSectionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public EditSectionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public EditSectionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public EditSectionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public EditSectionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public EditSectionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public EditSectionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public EditSectionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public EditSectionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public EditSectionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public EditSectionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public EditSectionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public EditSectionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public EditSectionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public EditSectionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public EditSectionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public EditSectionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public EditSectionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public EditSectionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section identifier + */ + public EditSectionRequest withSectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The name of the new section + */ + public EditSectionRequest withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * The name of the new section + */ + public EditSectionRequest withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * The scanner this section should use + */ + public EditSectionRequest withScanner(String scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = Optional.ofNullable(scanner); + return this; + } + + + /** + * The scanner this section should use + */ + public EditSectionRequest withScanner(Optional scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = scanner; + return this; + } + + /** + * The agent this section should use for metadata + */ + public EditSectionRequest withAgent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + /** + * The agent group id for this section + */ + public EditSectionRequest withMetadataAgentProviderGroupId(String metadataAgentProviderGroupId) { + Utils.checkNotNull(metadataAgentProviderGroupId, "metadataAgentProviderGroupId"); + this.metadataAgentProviderGroupId = Optional.ofNullable(metadataAgentProviderGroupId); + return this; + } + + + /** + * The agent group id for this section + */ + public EditSectionRequest withMetadataAgentProviderGroupId(Optional metadataAgentProviderGroupId) { + Utils.checkNotNull(metadataAgentProviderGroupId, "metadataAgentProviderGroupId"); + this.metadataAgentProviderGroupId = metadataAgentProviderGroupId; + return this; + } + + /** + * The language of this section + */ + public EditSectionRequest withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + /** + * The language of this section + */ + public EditSectionRequest withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + /** + * The locations on disk to add to this section + */ + public EditSectionRequest withLocations(List locations) { + Utils.checkNotNull(locations, "locations"); + this.locations = Optional.ofNullable(locations); + return this; + } + + + /** + * The locations on disk to add to this section + */ + public EditSectionRequest withLocations(Optional> locations) { + Utils.checkNotNull(locations, "locations"); + this.locations = locations; + return this; + } + + /** + * The preferences for this section + */ + public EditSectionRequest withPrefs(EditSectionQueryParamPrefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = Optional.ofNullable(prefs); + return this; + } + + + /** + * The preferences for this section + */ + public EditSectionRequest withPrefs(Optional prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditSectionRequest other = (EditSectionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.scanner, other.scanner) && + Utils.enhancedDeepEquals(this.agent, other.agent) && + Utils.enhancedDeepEquals(this.metadataAgentProviderGroupId, other.metadataAgentProviderGroupId) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.locations, other.locations) && + Utils.enhancedDeepEquals(this.prefs, other.prefs); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + name, scanner, agent, + metadataAgentProviderGroupId, language, locations, + prefs); + } + + @Override + public String toString() { + return Utils.toString(EditSectionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "name", name, + "scanner", scanner, + "agent", agent, + "metadataAgentProviderGroupId", metadataAgentProviderGroupId, + "language", language, + "locations", locations, + "prefs", prefs); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String sectionId; + + private Optional name = Optional.empty(); + + private Optional scanner = Optional.empty(); + + private String agent; + + private Optional metadataAgentProviderGroupId = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional> locations = Optional.empty(); + + private Optional prefs = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section identifier + */ + public Builder sectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The name of the new section + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * The name of the new section + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + /** + * The scanner this section should use + */ + public Builder scanner(String scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = Optional.ofNullable(scanner); + return this; + } + + /** + * The scanner this section should use + */ + public Builder scanner(Optional scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = scanner; + return this; + } + + + /** + * The agent this section should use for metadata + */ + public Builder agent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + + /** + * The agent group id for this section + */ + public Builder metadataAgentProviderGroupId(String metadataAgentProviderGroupId) { + Utils.checkNotNull(metadataAgentProviderGroupId, "metadataAgentProviderGroupId"); + this.metadataAgentProviderGroupId = Optional.ofNullable(metadataAgentProviderGroupId); + return this; + } + + /** + * The agent group id for this section + */ + public Builder metadataAgentProviderGroupId(Optional metadataAgentProviderGroupId) { + Utils.checkNotNull(metadataAgentProviderGroupId, "metadataAgentProviderGroupId"); + this.metadataAgentProviderGroupId = metadataAgentProviderGroupId; + return this; + } + + + /** + * The language of this section + */ + public Builder language(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + /** + * The language of this section + */ + public Builder language(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + + /** + * The locations on disk to add to this section + */ + public Builder locations(List locations) { + Utils.checkNotNull(locations, "locations"); + this.locations = Optional.ofNullable(locations); + return this; + } + + /** + * The locations on disk to add to this section + */ + public Builder locations(Optional> locations) { + Utils.checkNotNull(locations, "locations"); + this.locations = locations; + return this; + } + + + /** + * The preferences for this section + */ + public Builder prefs(EditSectionQueryParamPrefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = Optional.ofNullable(prefs); + return this; + } + + /** + * The preferences for this section + */ + public Builder prefs(Optional prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + public EditSectionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new EditSectionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + name, scanner, agent, + metadataAgentProviderGroupId, language, locations, + prefs); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditSectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/EditSectionRequestBuilder.java new file mode 100644 index 00000000..1959c13b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditSectionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.EditSection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class EditSectionRequestBuilder { + + private EditSectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public EditSectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EditSectionRequestBuilder request(EditSectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public EditSectionResponse call() throws Exception { + + RequestOperation operation + = new EditSection.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditSectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/EditSectionResponse.java new file mode 100644 index 00000000..e2b3e73d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditSectionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class EditSectionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public EditSectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EditSectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EditSectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EditSectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditSectionResponse other = (EditSectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(EditSectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public EditSectionResponse build() { + + return new EditSectionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesQueryParamPrefs.java b/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesQueryParamPrefs.java new file mode 100644 index 00000000..fdb43a3a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesQueryParamPrefs.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * EditSubscriptionPreferencesQueryParamPrefs + */ +public class EditSubscriptionPreferencesQueryParamPrefs { + @JsonCreator + public EditSubscriptionPreferencesQueryParamPrefs() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(EditSubscriptionPreferencesQueryParamPrefs.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public EditSubscriptionPreferencesQueryParamPrefs build() { + + return new EditSubscriptionPreferencesQueryParamPrefs( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesRequest.java new file mode 100644 index 00000000..1425eb61 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesRequest.java @@ -0,0 +1,815 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class EditSubscriptionPreferencesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriptionId") + private long subscriptionId; + + + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=prefs") + private Optional prefs; + + @JsonCreator + public EditSubscriptionPreferencesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long subscriptionId, + Optional prefs) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(subscriptionId, "subscriptionId"); + Utils.checkNotNull(prefs, "prefs"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.subscriptionId = subscriptionId; + this.prefs = prefs; + } + + public EditSubscriptionPreferencesRequest( + long subscriptionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), subscriptionId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public long subscriptionId() { + return subscriptionId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional prefs() { + return (Optional) prefs; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EditSubscriptionPreferencesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EditSubscriptionPreferencesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public EditSubscriptionPreferencesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public EditSubscriptionPreferencesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public EditSubscriptionPreferencesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public EditSubscriptionPreferencesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public EditSubscriptionPreferencesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public EditSubscriptionPreferencesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public EditSubscriptionPreferencesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public EditSubscriptionPreferencesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public EditSubscriptionPreferencesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public EditSubscriptionPreferencesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public EditSubscriptionPreferencesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public EditSubscriptionPreferencesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public EditSubscriptionPreferencesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public EditSubscriptionPreferencesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public EditSubscriptionPreferencesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public EditSubscriptionPreferencesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public EditSubscriptionPreferencesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public EditSubscriptionPreferencesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public EditSubscriptionPreferencesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public EditSubscriptionPreferencesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public EditSubscriptionPreferencesRequest withSubscriptionId(long subscriptionId) { + Utils.checkNotNull(subscriptionId, "subscriptionId"); + this.subscriptionId = subscriptionId; + return this; + } + + public EditSubscriptionPreferencesRequest withPrefs(EditSubscriptionPreferencesQueryParamPrefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = Optional.ofNullable(prefs); + return this; + } + + + public EditSubscriptionPreferencesRequest withPrefs(Optional prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditSubscriptionPreferencesRequest other = (EditSubscriptionPreferencesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.subscriptionId, other.subscriptionId) && + Utils.enhancedDeepEquals(this.prefs, other.prefs); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, subscriptionId, + prefs); + } + + @Override + public String toString() { + return Utils.toString(EditSubscriptionPreferencesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "subscriptionId", subscriptionId, + "prefs", prefs); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long subscriptionId; + + private Optional prefs = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder subscriptionId(long subscriptionId) { + Utils.checkNotNull(subscriptionId, "subscriptionId"); + this.subscriptionId = subscriptionId; + return this; + } + + + public Builder prefs(EditSubscriptionPreferencesQueryParamPrefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = Optional.ofNullable(prefs); + return this; + } + + public Builder prefs(Optional prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + public EditSubscriptionPreferencesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new EditSubscriptionPreferencesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, subscriptionId, + prefs); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesRequestBuilder.java new file mode 100644 index 00000000..0a54fb60 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.EditSubscriptionPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class EditSubscriptionPreferencesRequestBuilder { + + private EditSubscriptionPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public EditSubscriptionPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EditSubscriptionPreferencesRequestBuilder request(EditSubscriptionPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public EditSubscriptionPreferencesResponse call() throws Exception { + + RequestOperation operation + = new EditSubscriptionPreferences.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesResponse.java new file mode 100644 index 00000000..7cd7478b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EditSubscriptionPreferencesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +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.Optional; + + +public class EditSubscriptionPreferencesResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithSubscription; + + @JsonCreator + public EditSubscriptionPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSubscription) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + } + + public EditSubscriptionPreferencesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSubscription() { + return (Optional) mediaContainerWithSubscription; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EditSubscriptionPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EditSubscriptionPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EditSubscriptionPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public EditSubscriptionPreferencesResponse withMediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + + /** + * OK + */ + public EditSubscriptionPreferencesResponse withMediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditSubscriptionPreferencesResponse other = (EditSubscriptionPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSubscription, other.mediaContainerWithSubscription); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + @Override + public String toString() { + return Utils.toString(EditSubscriptionPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSubscription", mediaContainerWithSubscription); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSubscription = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + public EditSubscriptionPreferencesResponse build() { + + return new EditSubscriptionPreferencesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Element.java b/src/main/java/dev/plexapi/sdk/models/operations/Element.java new file mode 100644 index 00000000..3c351008 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Element.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * Element + */ +public enum Element { + THUMB("thumb"), + ART("art"), + CLEAR_LOGO("clearLogo"), + BANNER("banner"), + POSTER("poster"), + THEME("theme"); + + @JsonValue + private final String value; + + Element(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Element o: Element.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashRequest.java new file mode 100644 index 00000000..5085d900 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class EmptyTrashRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public EmptyTrashRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public EmptyTrashRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EmptyTrashRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EmptyTrashRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public EmptyTrashRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public EmptyTrashRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public EmptyTrashRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public EmptyTrashRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public EmptyTrashRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public EmptyTrashRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public EmptyTrashRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public EmptyTrashRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public EmptyTrashRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public EmptyTrashRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public EmptyTrashRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public EmptyTrashRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public EmptyTrashRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public EmptyTrashRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public EmptyTrashRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public EmptyTrashRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public EmptyTrashRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public EmptyTrashRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public EmptyTrashRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public EmptyTrashRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public EmptyTrashRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyTrashRequest other = (EmptyTrashRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(EmptyTrashRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public EmptyTrashRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new EmptyTrashRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashRequestBuilder.java new file mode 100644 index 00000000..1d6b1ce8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.EmptyTrash; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class EmptyTrashRequestBuilder { + + private EmptyTrashRequest request; + private final SDKConfiguration sdkConfiguration; + + public EmptyTrashRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EmptyTrashRequestBuilder request(EmptyTrashRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public EmptyTrashResponse call() throws Exception { + + RequestOperation operation + = new EmptyTrash.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashResponse.java new file mode 100644 index 00000000..0d96cb97 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EmptyTrashResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class EmptyTrashResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public EmptyTrashResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EmptyTrashResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EmptyTrashResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EmptyTrashResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyTrashResponse other = (EmptyTrashResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(EmptyTrashResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public EmptyTrashResponse build() { + + return new EmptyTrashResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EnablePaperTrailRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/EnablePaperTrailRequestBuilder.java deleted file mode 100644 index 8231355d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/EnablePaperTrailRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.EnablePaperTrail; -import java.lang.Exception; - -public class EnablePaperTrailRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public EnablePaperTrailRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public EnablePaperTrailResponse call() throws Exception { - - RequestlessOperation operation - = new EnablePaperTrail.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EnablePaperTrailResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/EnablePaperTrailResponse.java deleted file mode 100644 index 93e63ca5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/EnablePaperTrailResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class EnablePaperTrailResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public EnablePaperTrailResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public EnablePaperTrailResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public EnablePaperTrailResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public EnablePaperTrailResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnablePaperTrailResponse other = (EnablePaperTrailResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(EnablePaperTrailResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public EnablePaperTrailResponse build() { - - return new EnablePaperTrailResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailRequest.java new file mode 100644 index 00000000..8aa122aa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailRequest.java @@ -0,0 +1,798 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class EnablePapertrailRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The number of minutes logging should be sent to Papertrail + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=minutes") + private Optional minutes; + + @JsonCreator + public EnablePapertrailRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional minutes) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(minutes, "minutes"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.minutes = minutes; + } + + public EnablePapertrailRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The number of minutes logging should be sent to Papertrail + */ + @JsonIgnore + public Optional minutes() { + return minutes; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EnablePapertrailRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public EnablePapertrailRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public EnablePapertrailRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public EnablePapertrailRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public EnablePapertrailRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public EnablePapertrailRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public EnablePapertrailRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public EnablePapertrailRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public EnablePapertrailRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public EnablePapertrailRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public EnablePapertrailRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public EnablePapertrailRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public EnablePapertrailRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public EnablePapertrailRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public EnablePapertrailRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public EnablePapertrailRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public EnablePapertrailRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public EnablePapertrailRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public EnablePapertrailRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public EnablePapertrailRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public EnablePapertrailRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public EnablePapertrailRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The number of minutes logging should be sent to Papertrail + */ + public EnablePapertrailRequest withMinutes(long minutes) { + Utils.checkNotNull(minutes, "minutes"); + this.minutes = Optional.ofNullable(minutes); + return this; + } + + + /** + * The number of minutes logging should be sent to Papertrail + */ + public EnablePapertrailRequest withMinutes(Optional minutes) { + Utils.checkNotNull(minutes, "minutes"); + this.minutes = minutes; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnablePapertrailRequest other = (EnablePapertrailRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.minutes, other.minutes); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, minutes); + } + + @Override + public String toString() { + return Utils.toString(EnablePapertrailRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "minutes", minutes); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional minutes = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The number of minutes logging should be sent to Papertrail + */ + public Builder minutes(long minutes) { + Utils.checkNotNull(minutes, "minutes"); + this.minutes = Optional.ofNullable(minutes); + return this; + } + + /** + * The number of minutes logging should be sent to Papertrail + */ + public Builder minutes(Optional minutes) { + Utils.checkNotNull(minutes, "minutes"); + this.minutes = minutes; + return this; + } + + public EnablePapertrailRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new EnablePapertrailRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, minutes); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailRequestBuilder.java new file mode 100644 index 00000000..8ea10395 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.EnablePapertrail; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class EnablePapertrailRequestBuilder { + + private EnablePapertrailRequest request; + private final SDKConfiguration sdkConfiguration; + + public EnablePapertrailRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EnablePapertrailRequestBuilder request(EnablePapertrailRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public EnablePapertrailResponse call() throws Exception { + + RequestOperation operation + = new EnablePapertrail.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailResponse.java new file mode 100644 index 00000000..4bbd560b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/EnablePapertrailResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class EnablePapertrailResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public EnablePapertrailResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnablePapertrailResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EnablePapertrailResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnablePapertrailResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnablePapertrailResponse other = (EnablePapertrailResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(EnablePapertrailResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public EnablePapertrailResponse build() { + + return new EnablePapertrailResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Extension.java b/src/main/java/dev/plexapi/sdk/models/operations/Extension.java new file mode 100644 index 00000000..0e2355a7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Extension.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * Extension + * + *

Extension + */ +public enum Extension { + M3U8("m3u8"), + MPD("mpd"); + + @JsonValue + private final String value; + + Extension(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Extension o: Extension.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Extras.java b/src/main/java/dev/plexapi/sdk/models/operations/Extras.java deleted file mode 100644 index 52a7f9d7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Extras.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Extras { - /** - * The size of the extras. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - @JsonCreator - public Extras( - @JsonProperty("size") Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - } - - public Extras() { - this(Optional.empty()); - } - - /** - * The size of the extras. - */ - @JsonIgnore - public Optional size() { - return size; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The size of the extras. - */ - public Extras withSize(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - /** - * The size of the extras. - */ - public Extras withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Extras other = (Extras) o; - return - Utils.enhancedDeepEquals(this.size, other.size); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size); - } - - @Override - public String toString() { - return Utils.toString(Extras.class, - "size", size); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The size of the extras. - */ - public Builder size(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - /** - * The size of the extras. - */ - public Builder size(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public Extras build() { - - return new Extras( - size); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Feature.java b/src/main/java/dev/plexapi/sdk/models/operations/Feature.java index f0e1136f..d6676e43 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Feature.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Feature.java @@ -8,6 +8,7 @@ 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.models.shared.Directory; import dev.plexapi.sdk.utils.Utils; import java.lang.Override; import java.lang.String; @@ -18,69 +19,41 @@ import java.util.Optional; public class Feature { + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") private Optional key; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") - private String type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("flavor") - private Optional flavor; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("scrobbleKey") - private Optional scrobbleKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("unscrobbleKey") - private Optional unscrobbleKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Directory") - private Optional> directory; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Action") - private Optional> action; + private Optional type; @JsonCreator public Feature( + @JsonProperty("Directory") Optional> directory, @JsonProperty("key") Optional key, - @JsonProperty("type") String type, - @JsonProperty("flavor") Optional flavor, - @JsonProperty("scrobbleKey") Optional scrobbleKey, - @JsonProperty("unscrobbleKey") Optional unscrobbleKey, - @JsonProperty("Directory") Optional> directory, - @JsonProperty("Action") Optional> action) { + @JsonProperty("type") Optional type) { + Utils.checkNotNull(directory, "directory"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(type, "type"); - Utils.checkNotNull(flavor, "flavor"); - Utils.checkNotNull(scrobbleKey, "scrobbleKey"); - Utils.checkNotNull(unscrobbleKey, "unscrobbleKey"); - Utils.checkNotNull(directory, "directory"); - Utils.checkNotNull(action, "action"); + this.directory = directory; this.key = key; this.type = type; - this.flavor = flavor; - this.scrobbleKey = scrobbleKey; - this.unscrobbleKey = unscrobbleKey; - this.directory = directory; - this.action = action; } - public Feature( - String type) { - this(Optional.empty(), type, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); + public Feature() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; } @JsonIgnore @@ -89,42 +62,28 @@ public class Feature { } @JsonIgnore - public String type() { + public Optional type() { return type; } - @JsonIgnore - public Optional flavor() { - return flavor; - } - - @JsonIgnore - public Optional scrobbleKey() { - return scrobbleKey; - } - - @JsonIgnore - public Optional unscrobbleKey() { - return unscrobbleKey; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> directory() { - return (Optional>) directory; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> action() { - return (Optional>) action; - } - public static Builder builder() { return new Builder(); } + public Feature withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public Feature withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + public Feature withKey(String key) { Utils.checkNotNull(key, "key"); this.key = Optional.ofNullable(key); @@ -139,76 +98,18 @@ public class Feature { } public Feature withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public Feature withType(Optional type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } - public Feature withFlavor(String flavor) { - Utils.checkNotNull(flavor, "flavor"); - this.flavor = Optional.ofNullable(flavor); - return this; - } - - - public Feature withFlavor(Optional flavor) { - Utils.checkNotNull(flavor, "flavor"); - this.flavor = flavor; - return this; - } - - public Feature withScrobbleKey(String scrobbleKey) { - Utils.checkNotNull(scrobbleKey, "scrobbleKey"); - this.scrobbleKey = Optional.ofNullable(scrobbleKey); - return this; - } - - - public Feature withScrobbleKey(Optional scrobbleKey) { - Utils.checkNotNull(scrobbleKey, "scrobbleKey"); - this.scrobbleKey = scrobbleKey; - return this; - } - - public Feature withUnscrobbleKey(String unscrobbleKey) { - Utils.checkNotNull(unscrobbleKey, "unscrobbleKey"); - this.unscrobbleKey = Optional.ofNullable(unscrobbleKey); - return this; - } - - - public Feature withUnscrobbleKey(Optional unscrobbleKey) { - Utils.checkNotNull(unscrobbleKey, "unscrobbleKey"); - this.unscrobbleKey = unscrobbleKey; - return this; - } - - public Feature withDirectory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - - public Feature withDirectory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - public Feature withAction(List action) { - Utils.checkNotNull(action, "action"); - this.action = Optional.ofNullable(action); - return this; - } - - - public Feature withAction(Optional> action) { - Utils.checkNotNull(action, "action"); - this.action = action; - return this; - } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -219,57 +120,52 @@ public class Feature { } Feature other = (Feature) o; return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.flavor, other.flavor) && - Utils.enhancedDeepEquals(this.scrobbleKey, other.scrobbleKey) && - Utils.enhancedDeepEquals(this.unscrobbleKey, other.unscrobbleKey) && Utils.enhancedDeepEquals(this.directory, other.directory) && - Utils.enhancedDeepEquals(this.action, other.action); + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.type, other.type); } @Override public int hashCode() { return Utils.enhancedHash( - key, type, flavor, - scrobbleKey, unscrobbleKey, directory, - action); + directory, key, type); } @Override public String toString() { return Utils.toString(Feature.class, - "key", key, - "type", type, - "flavor", flavor, - "scrobbleKey", scrobbleKey, - "unscrobbleKey", unscrobbleKey, "directory", directory, - "action", action); + "key", key, + "type", type); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { + private Optional> directory = Optional.empty(); + private Optional key = Optional.empty(); - private String type; - - private Optional flavor = Optional.empty(); - - private Optional scrobbleKey = Optional.empty(); - - private Optional unscrobbleKey = Optional.empty(); - - private Optional> directory = Optional.empty(); - - private Optional> action = Optional.empty(); + private Optional type = Optional.empty(); private Builder() { // force use of static builder() method } + public Builder directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public Builder key(String key) { Utils.checkNotNull(key, "key"); this.key = Optional.ofNullable(key); @@ -284,82 +180,21 @@ public class Feature { 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 flavor(String flavor) { - Utils.checkNotNull(flavor, "flavor"); - this.flavor = Optional.ofNullable(flavor); - return this; - } - - public Builder flavor(Optional flavor) { - Utils.checkNotNull(flavor, "flavor"); - this.flavor = flavor; - return this; - } - - - public Builder scrobbleKey(String scrobbleKey) { - Utils.checkNotNull(scrobbleKey, "scrobbleKey"); - this.scrobbleKey = Optional.ofNullable(scrobbleKey); - return this; - } - - public Builder scrobbleKey(Optional scrobbleKey) { - Utils.checkNotNull(scrobbleKey, "scrobbleKey"); - this.scrobbleKey = scrobbleKey; - return this; - } - - - public Builder unscrobbleKey(String unscrobbleKey) { - Utils.checkNotNull(unscrobbleKey, "unscrobbleKey"); - this.unscrobbleKey = Optional.ofNullable(unscrobbleKey); - return this; - } - - public Builder unscrobbleKey(Optional unscrobbleKey) { - Utils.checkNotNull(unscrobbleKey, "unscrobbleKey"); - this.unscrobbleKey = unscrobbleKey; - return this; - } - - - public Builder directory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - public Builder directory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - - public Builder action(List action) { - Utils.checkNotNull(action, "action"); - this.action = Optional.ofNullable(action); - return this; - } - - public Builder action(Optional> action) { - Utils.checkNotNull(action, "action"); - this.action = action; - return this; - } - public Feature build() { return new Feature( - key, type, flavor, - scrobbleKey, unscrobbleKey, directory, - action); + directory, key, type); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Field.java b/src/main/java/dev/plexapi/sdk/models/operations/Field.java deleted file mode 100644 index 2f865dc7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Field.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Field { - - @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 Field( - @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 Field( - 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 static Builder builder() { - return new Builder(); - } - - - public Field withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Field withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public Field withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Field withSubType(String subType) { - Utils.checkNotNull(subType, "subType"); - this.subType = Optional.ofNullable(subType); - return this; - } - - - public Field 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; - } - Field other = (Field) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.subType, other.subType); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title, type, - subType); - } - - @Override - public String toString() { - return Utils.toString(Field.class, - "key", key, - "title", title, - "type", type, - "subType", subType); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Field build() { - - return new Field( - key, title, type, - subType); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/FieldType.java b/src/main/java/dev/plexapi/sdk/models/operations/FieldType.java deleted file mode 100644 index 2d744294..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/FieldType.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.List; - - -public class FieldType { - - @JsonProperty("type") - private String type; - - - @JsonProperty("Operator") - private List operator; - - @JsonCreator - public FieldType( - @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 static Builder builder() { - return new Builder(); - } - - - public FieldType withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public FieldType 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; - } - FieldType other = (FieldType) o; - return - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.operator, other.operator); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - type, operator); - } - - @Override - public String toString() { - return Utils.toString(FieldType.class, - "type", type, - "operator", operator); - } - - @SuppressWarnings("UnusedReturnValue") - 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 FieldType build() { - - return new FieldType( - type, operator); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Filter.java b/src/main/java/dev/plexapi/sdk/models/operations/Filter.java deleted file mode 100644 index deae2593..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Filter.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

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

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

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

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

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

- `0`: The country is divided into regions, and following the key will lead to a list of regions. + * - `1`: The county is divided by postal codes, and an example code is returned in `example`. + * - `2`: The country has a single postal code, returned in `example`. + */ +public enum Flavor { + ZERO(0L), + ONE(1L), + TWO(2L); + + @JsonValue + private final long value; + + Flavor(long value) { + this.value = value; + } + + public long value() { + return value; + } + + public static Optional fromValue(long value) { + for (Flavor o: Flavor.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Force.java b/src/main/java/dev/plexapi/sdk/models/operations/Force.java deleted file mode 100644 index 2f042f3f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Force.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Force - * - *

Force the refresh even if the library is already being refreshed. - */ -public enum Force { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - Force(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (Force o: Force.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Format.java b/src/main/java/dev/plexapi/sdk/models/operations/Format.java new file mode 100644 index 00000000..73fd085e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Format.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * Format + * + *

The output format for the image; defaults to jpg + */ +public enum Format { + JPG("jpg"), + JPEG("jpeg"), + PNG("png"), + PPM("ppm"); + + @JsonValue + private final String value; + + Format(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Format o: Format.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Friend.java b/src/main/java/dev/plexapi/sdk/models/operations/Friend.java deleted file mode 100644 index d6bab4ef..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Friend.java +++ /dev/null @@ -1,599 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.List; -import java.util.Optional; - - -public class Friend { - /** - * The account email address - */ - @JsonProperty("email") - private String email; - - /** - * The account full name - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("friendlyName") - private Optional friendlyName; - - /** - * If the account is a Plex Home user - */ - @JsonProperty("home") - private boolean home; - - /** - * The Plex account ID - */ - @JsonProperty("id") - private int id; - - /** - * If the account is a Plex Home managed user - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("restricted") - private Optional restricted; - - - @JsonProperty("sharedServers") - private List sharedServers; - - - @JsonProperty("sharedSources") - private List sharedSources; - - /** - * Current friend request status - */ - @JsonProperty("status") - private Status status; - - /** - * URL of the account thumbnail - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The title of the account (username or friendly name) - */ - @JsonProperty("title") - private String title; - - /** - * The account username - */ - @JsonProperty("username") - private String username; - - /** - * The account Universally Unique Identifier (UUID) - */ - @JsonProperty("uuid") - private String uuid; - - @JsonCreator - public Friend( - @JsonProperty("email") String email, - @JsonProperty("friendlyName") Optional friendlyName, - @JsonProperty("home") boolean home, - @JsonProperty("id") int id, - @JsonProperty("restricted") Optional restricted, - @JsonProperty("sharedServers") List sharedServers, - @JsonProperty("sharedSources") List sharedSources, - @JsonProperty("status") Status status, - @JsonProperty("thumb") String thumb, - @JsonProperty("title") String title, - @JsonProperty("username") String username, - @JsonProperty("uuid") String uuid) { - Utils.checkNotNull(email, "email"); - Utils.checkNotNull(friendlyName, "friendlyName"); - Utils.checkNotNull(home, "home"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(restricted, "restricted"); - Utils.checkNotNull(sharedServers, "sharedServers"); - Utils.checkNotNull(sharedSources, "sharedSources"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(username, "username"); - Utils.checkNotNull(uuid, "uuid"); - this.email = email; - this.friendlyName = friendlyName; - this.home = home; - this.id = id; - this.restricted = restricted; - this.sharedServers = sharedServers; - this.sharedSources = sharedSources; - this.status = status; - this.thumb = thumb; - this.title = title; - this.username = username; - this.uuid = uuid; - } - - public Friend( - String email, - boolean home, - int id, - List sharedServers, - List sharedSources, - Status status, - String thumb, - String title, - String username, - String uuid) { - this(email, Optional.empty(), home, - id, Optional.empty(), sharedServers, - sharedSources, status, thumb, - title, username, uuid); - } - - /** - * The account email address - */ - @JsonIgnore - public String email() { - return email; - } - - /** - * The account full name - */ - @JsonIgnore - public Optional friendlyName() { - return friendlyName; - } - - /** - * If the account is a Plex Home user - */ - @JsonIgnore - public boolean home() { - return home; - } - - /** - * The Plex account ID - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * If the account is a Plex Home managed user - */ - @JsonIgnore - public Optional restricted() { - return restricted; - } - - @JsonIgnore - public List sharedServers() { - return sharedServers; - } - - @JsonIgnore - public List sharedSources() { - return sharedSources; - } - - /** - * Current friend request status - */ - @JsonIgnore - public Status status() { - return status; - } - - /** - * URL of the account thumbnail - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The title of the account (username or friendly name) - */ - @JsonIgnore - public String title() { - return title; - } - - /** - * The account username - */ - @JsonIgnore - public String username() { - return username; - } - - /** - * The account Universally Unique Identifier (UUID) - */ - @JsonIgnore - public String uuid() { - return uuid; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The account email address - */ - public Friend withEmail(String email) { - Utils.checkNotNull(email, "email"); - this.email = email; - return this; - } - - /** - * The account full name - */ - public Friend withFriendlyName(String friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = Optional.ofNullable(friendlyName); - return this; - } - - - /** - * The account full name - */ - public Friend withFriendlyName(Optional friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = friendlyName; - return this; - } - - /** - * If the account is a Plex Home user - */ - public Friend withHome(boolean home) { - Utils.checkNotNull(home, "home"); - this.home = home; - return this; - } - - /** - * The Plex account ID - */ - public Friend withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * If the account is a Plex Home managed user - */ - public Friend withRestricted(boolean restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = Optional.ofNullable(restricted); - return this; - } - - - /** - * If the account is a Plex Home managed user - */ - public Friend withRestricted(Optional restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = restricted; - return this; - } - - public Friend withSharedServers(List sharedServers) { - Utils.checkNotNull(sharedServers, "sharedServers"); - this.sharedServers = sharedServers; - return this; - } - - public Friend withSharedSources(List sharedSources) { - Utils.checkNotNull(sharedSources, "sharedSources"); - this.sharedSources = sharedSources; - return this; - } - - /** - * Current friend request status - */ - public Friend withStatus(Status status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * URL of the account thumbnail - */ - public Friend withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The title of the account (username or friendly name) - */ - public Friend withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * The account username - */ - public Friend withUsername(String username) { - Utils.checkNotNull(username, "username"); - this.username = username; - return this; - } - - /** - * The account Universally Unique Identifier (UUID) - */ - public Friend withUuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Friend other = (Friend) o; - return - Utils.enhancedDeepEquals(this.email, other.email) && - Utils.enhancedDeepEquals(this.friendlyName, other.friendlyName) && - Utils.enhancedDeepEquals(this.home, other.home) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.restricted, other.restricted) && - Utils.enhancedDeepEquals(this.sharedServers, other.sharedServers) && - Utils.enhancedDeepEquals(this.sharedSources, other.sharedSources) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.username, other.username) && - Utils.enhancedDeepEquals(this.uuid, other.uuid); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - email, friendlyName, home, - id, restricted, sharedServers, - sharedSources, status, thumb, - title, username, uuid); - } - - @Override - public String toString() { - return Utils.toString(Friend.class, - "email", email, - "friendlyName", friendlyName, - "home", home, - "id", id, - "restricted", restricted, - "sharedServers", sharedServers, - "sharedSources", sharedSources, - "status", status, - "thumb", thumb, - "title", title, - "username", username, - "uuid", uuid); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String email; - - private Optional friendlyName = Optional.empty(); - - private Boolean home; - - private Integer id; - - private Optional restricted; - - private List sharedServers; - - private List sharedSources; - - private Status status; - - private String thumb; - - private String title; - - private String username; - - private String uuid; - - private Builder() { - // force use of static builder() method - } - - - /** - * The account email address - */ - public Builder email(String email) { - Utils.checkNotNull(email, "email"); - this.email = email; - return this; - } - - - /** - * The account full name - */ - public Builder friendlyName(String friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = Optional.ofNullable(friendlyName); - return this; - } - - /** - * The account full name - */ - public Builder friendlyName(Optional friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = friendlyName; - return this; - } - - - /** - * If the account is a Plex Home user - */ - public Builder home(boolean home) { - Utils.checkNotNull(home, "home"); - this.home = home; - return this; - } - - - /** - * The Plex account ID - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * If the account is a Plex Home managed user - */ - public Builder restricted(boolean restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = Optional.ofNullable(restricted); - return this; - } - - /** - * If the account is a Plex Home managed user - */ - public Builder restricted(Optional restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = restricted; - return this; - } - - - public Builder sharedServers(List sharedServers) { - Utils.checkNotNull(sharedServers, "sharedServers"); - this.sharedServers = sharedServers; - return this; - } - - - public Builder sharedSources(List sharedSources) { - Utils.checkNotNull(sharedSources, "sharedSources"); - this.sharedSources = sharedSources; - return this; - } - - - /** - * Current friend request status - */ - public Builder status(Status status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * URL of the account thumbnail - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The title of the account (username or friendly name) - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - /** - * The account username - */ - public Builder username(String username) { - Utils.checkNotNull(username, "username"); - this.username = username; - return this; - } - - - /** - * The account Universally Unique Identifier (UUID) - */ - public Builder uuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - public Friend build() { - if (restricted == null) { - restricted = _SINGLETON_VALUE_Restricted.value(); - } - - return new Friend( - email, friendlyName, home, - id, restricted, sharedServers, - sharedSources, status, thumb, - title, username, uuid); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_Restricted = - new LazySingletonValue<>( - "restricted", - "false", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsRequest.java new file mode 100644 index 00000000..216a4635 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsRequest.java @@ -0,0 +1,815 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GenerateThumbsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=force") + private Optional force; + + @JsonCreator + public GenerateThumbsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional force) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(force, "force"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.force = force; + } + + public GenerateThumbsRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional force() { + return (Optional) force; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GenerateThumbsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GenerateThumbsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GenerateThumbsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GenerateThumbsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GenerateThumbsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GenerateThumbsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GenerateThumbsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GenerateThumbsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GenerateThumbsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GenerateThumbsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GenerateThumbsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GenerateThumbsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GenerateThumbsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GenerateThumbsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GenerateThumbsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GenerateThumbsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GenerateThumbsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GenerateThumbsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GenerateThumbsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GenerateThumbsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GenerateThumbsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GenerateThumbsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public GenerateThumbsRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public GenerateThumbsRequest withForce(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + + public GenerateThumbsRequest withForce(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateThumbsRequest other = (GenerateThumbsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.force, other.force); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + force); + } + + @Override + public String toString() { + return Utils.toString(GenerateThumbsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "force", force); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional force = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder force(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + public Builder force(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + public GenerateThumbsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GenerateThumbsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + force); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsRequestBuilder.java new file mode 100644 index 00000000..965307a3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GenerateThumbs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GenerateThumbsRequestBuilder { + + private GenerateThumbsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GenerateThumbsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GenerateThumbsRequestBuilder request(GenerateThumbsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GenerateThumbsResponse call() throws Exception { + + RequestOperation operation + = new GenerateThumbs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsResponse.java new file mode 100644 index 00000000..044cbedb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GenerateThumbsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GenerateThumbsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GenerateThumbsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GenerateThumbsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GenerateThumbsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GenerateThumbsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateThumbsResponse other = (GenerateThumbsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GenerateThumbsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GenerateThumbsResponse build() { + + return new GenerateThumbsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Genre.java b/src/main/java/dev/plexapi/sdk/models/operations/Genre.java deleted file mode 100644 index 61c32529..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Genre.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - -/** - * Genre - * - *

The filter query string for similar items. - */ -public class Genre { - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - - @JsonProperty("filter") - private String filter; - - /** - * The genre name of this media-item - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public Genre( - @JsonProperty("id") int id, - @JsonProperty("filter") String filter, - @JsonProperty("tag") String tag) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - this.id = id; - this.filter = filter; - this.tag = tag; - } - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - @JsonIgnore - public String filter() { - return filter; - } - - /** - * The genre name of this media-item - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Genre withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Genre withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The genre name of this media-item - */ - public Genre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Genre other = (Genre) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag); - } - - @Override - public String toString() { - return Utils.toString(Genre.class, - "id", id, - "filter", filter, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String filter; - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * The genre name of this media-item - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public Genre build() { - - return new Genre( - id, filter, tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GeoData.java b/src/main/java/dev/plexapi/sdk/models/operations/GeoData.java deleted file mode 100644 index 13046411..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GeoData.java +++ /dev/null @@ -1,619 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - -/** - * GeoData - * - *

Geo location data - */ -public class GeoData { - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - @JsonProperty("code") - private String code; - - /** - * The continent code where the country is located. - */ - @JsonProperty("continent_code") - private String continentCode; - - /** - * The official name of the country. - */ - @JsonProperty("country") - private String country; - - /** - * The name of the city. - */ - @JsonProperty("city") - private String city; - - /** - * Indicates if the country is a member of the European Union. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("european_union_member") - private Optional europeanUnionMember; - - /** - * The time zone of the country. - */ - @JsonProperty("time_zone") - private String timeZone; - - /** - * The postal code of the location. - */ - @JsonProperty("postal_code") - private String postalCode; - - /** - * Indicates if the country has privacy restrictions. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("in_privacy_restricted_country") - private Optional inPrivacyRestrictedCountry; - - /** - * Indicates if the region has privacy restrictions. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("in_privacy_restricted_region") - private Optional inPrivacyRestrictedRegion; - - /** - * The name of the primary administrative subdivision. - */ - @JsonProperty("subdivisions") - private String subdivisions; - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - @JsonProperty("coordinates") - private String coordinates; - - @JsonCreator - public GeoData( - @JsonProperty("code") String code, - @JsonProperty("continent_code") String continentCode, - @JsonProperty("country") String country, - @JsonProperty("city") String city, - @JsonProperty("european_union_member") Optional europeanUnionMember, - @JsonProperty("time_zone") String timeZone, - @JsonProperty("postal_code") String postalCode, - @JsonProperty("in_privacy_restricted_country") Optional inPrivacyRestrictedCountry, - @JsonProperty("in_privacy_restricted_region") Optional inPrivacyRestrictedRegion, - @JsonProperty("subdivisions") String subdivisions, - @JsonProperty("coordinates") String coordinates) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(continentCode, "continentCode"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(city, "city"); - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - Utils.checkNotNull(timeZone, "timeZone"); - Utils.checkNotNull(postalCode, "postalCode"); - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - Utils.checkNotNull(subdivisions, "subdivisions"); - Utils.checkNotNull(coordinates, "coordinates"); - this.code = code; - this.continentCode = continentCode; - this.country = country; - this.city = city; - this.europeanUnionMember = europeanUnionMember; - this.timeZone = timeZone; - this.postalCode = postalCode; - this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; - this.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion; - this.subdivisions = subdivisions; - this.coordinates = coordinates; - } - - public GeoData( - String code, - String continentCode, - String country, - String city, - String timeZone, - String postalCode, - String subdivisions, - String coordinates) { - this(code, continentCode, country, - city, Optional.empty(), timeZone, - postalCode, Optional.empty(), Optional.empty(), - subdivisions, coordinates); - } - - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - @JsonIgnore - public String code() { - return code; - } - - /** - * The continent code where the country is located. - */ - @JsonIgnore - public String continentCode() { - return continentCode; - } - - /** - * The official name of the country. - */ - @JsonIgnore - public String country() { - return country; - } - - /** - * The name of the city. - */ - @JsonIgnore - public String city() { - return city; - } - - /** - * Indicates if the country is a member of the European Union. - */ - @JsonIgnore - public Optional europeanUnionMember() { - return europeanUnionMember; - } - - /** - * The time zone of the country. - */ - @JsonIgnore - public String timeZone() { - return timeZone; - } - - /** - * The postal code of the location. - */ - @JsonIgnore - public String postalCode() { - return postalCode; - } - - /** - * Indicates if the country has privacy restrictions. - */ - @JsonIgnore - public Optional inPrivacyRestrictedCountry() { - return inPrivacyRestrictedCountry; - } - - /** - * Indicates if the region has privacy restrictions. - */ - @JsonIgnore - public Optional inPrivacyRestrictedRegion() { - return inPrivacyRestrictedRegion; - } - - /** - * The name of the primary administrative subdivision. - */ - @JsonIgnore - public String subdivisions() { - return subdivisions; - } - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - @JsonIgnore - public String coordinates() { - return coordinates; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - public GeoData withCode(String code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - /** - * The continent code where the country is located. - */ - public GeoData withContinentCode(String continentCode) { - Utils.checkNotNull(continentCode, "continentCode"); - this.continentCode = continentCode; - return this; - } - - /** - * The official name of the country. - */ - public GeoData withCountry(String country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - /** - * The name of the city. - */ - public GeoData withCity(String city) { - Utils.checkNotNull(city, "city"); - this.city = city; - return this; - } - - /** - * Indicates if the country is a member of the European Union. - */ - public GeoData withEuropeanUnionMember(boolean europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = Optional.ofNullable(europeanUnionMember); - return this; - } - - - /** - * Indicates if the country is a member of the European Union. - */ - public GeoData withEuropeanUnionMember(Optional europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = europeanUnionMember; - return this; - } - - /** - * The time zone of the country. - */ - public GeoData withTimeZone(String timeZone) { - Utils.checkNotNull(timeZone, "timeZone"); - this.timeZone = timeZone; - return this; - } - - /** - * The postal code of the location. - */ - public GeoData withPostalCode(String postalCode) { - Utils.checkNotNull(postalCode, "postalCode"); - this.postalCode = postalCode; - return this; - } - - /** - * Indicates if the country has privacy restrictions. - */ - public GeoData withInPrivacyRestrictedCountry(boolean inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = Optional.ofNullable(inPrivacyRestrictedCountry); - return this; - } - - - /** - * Indicates if the country has privacy restrictions. - */ - public GeoData withInPrivacyRestrictedCountry(Optional inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; - return this; - } - - /** - * Indicates if the region has privacy restrictions. - */ - public GeoData withInPrivacyRestrictedRegion(boolean inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = Optional.ofNullable(inPrivacyRestrictedRegion); - return this; - } - - - /** - * Indicates if the region has privacy restrictions. - */ - public GeoData withInPrivacyRestrictedRegion(Optional inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion; - return this; - } - - /** - * The name of the primary administrative subdivision. - */ - public GeoData withSubdivisions(String subdivisions) { - Utils.checkNotNull(subdivisions, "subdivisions"); - this.subdivisions = subdivisions; - return this; - } - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - public GeoData withCoordinates(String coordinates) { - Utils.checkNotNull(coordinates, "coordinates"); - this.coordinates = coordinates; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GeoData other = (GeoData) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.continentCode, other.continentCode) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.city, other.city) && - Utils.enhancedDeepEquals(this.europeanUnionMember, other.europeanUnionMember) && - Utils.enhancedDeepEquals(this.timeZone, other.timeZone) && - Utils.enhancedDeepEquals(this.postalCode, other.postalCode) && - Utils.enhancedDeepEquals(this.inPrivacyRestrictedCountry, other.inPrivacyRestrictedCountry) && - Utils.enhancedDeepEquals(this.inPrivacyRestrictedRegion, other.inPrivacyRestrictedRegion) && - Utils.enhancedDeepEquals(this.subdivisions, other.subdivisions) && - Utils.enhancedDeepEquals(this.coordinates, other.coordinates); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, continentCode, country, - city, europeanUnionMember, timeZone, - postalCode, inPrivacyRestrictedCountry, inPrivacyRestrictedRegion, - subdivisions, coordinates); - } - - @Override - public String toString() { - return Utils.toString(GeoData.class, - "code", code, - "continentCode", continentCode, - "country", country, - "city", city, - "europeanUnionMember", europeanUnionMember, - "timeZone", timeZone, - "postalCode", postalCode, - "inPrivacyRestrictedCountry", inPrivacyRestrictedCountry, - "inPrivacyRestrictedRegion", inPrivacyRestrictedRegion, - "subdivisions", subdivisions, - "coordinates", coordinates); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String code; - - private String continentCode; - - private String country; - - private String city; - - private Optional europeanUnionMember; - - private String timeZone; - - private String postalCode; - - private Optional inPrivacyRestrictedCountry; - - private Optional inPrivacyRestrictedRegion; - - private String subdivisions; - - private String coordinates; - - private Builder() { - // force use of static builder() method - } - - - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - public Builder code(String code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - /** - * The continent code where the country is located. - */ - public Builder continentCode(String continentCode) { - Utils.checkNotNull(continentCode, "continentCode"); - this.continentCode = continentCode; - return this; - } - - - /** - * The official name of the country. - */ - public Builder country(String country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - - /** - * The name of the city. - */ - public Builder city(String city) { - Utils.checkNotNull(city, "city"); - this.city = city; - return this; - } - - - /** - * Indicates if the country is a member of the European Union. - */ - public Builder europeanUnionMember(boolean europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = Optional.ofNullable(europeanUnionMember); - return this; - } - - /** - * Indicates if the country is a member of the European Union. - */ - public Builder europeanUnionMember(Optional europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = europeanUnionMember; - return this; - } - - - /** - * The time zone of the country. - */ - public Builder timeZone(String timeZone) { - Utils.checkNotNull(timeZone, "timeZone"); - this.timeZone = timeZone; - return this; - } - - - /** - * The postal code of the location. - */ - public Builder postalCode(String postalCode) { - Utils.checkNotNull(postalCode, "postalCode"); - this.postalCode = postalCode; - return this; - } - - - /** - * Indicates if the country has privacy restrictions. - */ - public Builder inPrivacyRestrictedCountry(boolean inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = Optional.ofNullable(inPrivacyRestrictedCountry); - return this; - } - - /** - * Indicates if the country has privacy restrictions. - */ - public Builder inPrivacyRestrictedCountry(Optional inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; - return this; - } - - - /** - * Indicates if the region has privacy restrictions. - */ - public Builder inPrivacyRestrictedRegion(boolean inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = Optional.ofNullable(inPrivacyRestrictedRegion); - return this; - } - - /** - * Indicates if the region has privacy restrictions. - */ - public Builder inPrivacyRestrictedRegion(Optional inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion; - return this; - } - - - /** - * The name of the primary administrative subdivision. - */ - public Builder subdivisions(String subdivisions) { - Utils.checkNotNull(subdivisions, "subdivisions"); - this.subdivisions = subdivisions; - return this; - } - - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - public Builder coordinates(String coordinates) { - Utils.checkNotNull(coordinates, "coordinates"); - this.coordinates = coordinates; - return this; - } - - public GeoData build() { - if (europeanUnionMember == null) { - europeanUnionMember = _SINGLETON_VALUE_EuropeanUnionMember.value(); - } - if (inPrivacyRestrictedCountry == null) { - inPrivacyRestrictedCountry = _SINGLETON_VALUE_InPrivacyRestrictedCountry.value(); - } - if (inPrivacyRestrictedRegion == null) { - inPrivacyRestrictedRegion = _SINGLETON_VALUE_InPrivacyRestrictedRegion.value(); - } - - return new GeoData( - code, continentCode, country, - city, europeanUnionMember, timeZone, - postalCode, inPrivacyRestrictedCountry, inPrivacyRestrictedRegion, - subdivisions, coordinates); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_EuropeanUnionMember = - new LazySingletonValue<>( - "european_union_member", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_InPrivacyRestrictedCountry = - new LazySingletonValue<>( - "in_privacy_restricted_country", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_InPrivacyRestrictedRegion = - new LazySingletonValue<>( - "in_privacy_restricted_region", - "false", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryDirectory.java deleted file mode 100644 index 0406cde7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryDirectory.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetActorsLibraryDirectory { - /** - * A fast lookup key for the actor relative url. - */ - @JsonProperty("fastKey") - private String fastKey; - - /** - * URL for the thumbnail image of the actor. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * A unique key representing the actor. - */ - @JsonProperty("key") - private String key; - - /** - * The name of the actor. - */ - @JsonProperty("title") - private String title; - - @JsonCreator - public GetActorsLibraryDirectory( - @JsonProperty("fastKey") String fastKey, - @JsonProperty("thumb") String thumb, - @JsonProperty("key") String key, - @JsonProperty("title") String title) { - Utils.checkNotNull(fastKey, "fastKey"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - this.fastKey = fastKey; - this.thumb = thumb; - this.key = key; - this.title = title; - } - - /** - * A fast lookup key for the actor relative url. - */ - @JsonIgnore - public String fastKey() { - return fastKey; - } - - /** - * URL for the thumbnail image of the actor. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * A unique key representing the actor. - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The name of the actor. - */ - @JsonIgnore - public String title() { - return title; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * A fast lookup key for the actor relative url. - */ - public GetActorsLibraryDirectory withFastKey(String fastKey) { - Utils.checkNotNull(fastKey, "fastKey"); - this.fastKey = fastKey; - return this; - } - - /** - * URL for the thumbnail image of the actor. - */ - public GetActorsLibraryDirectory withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * A unique key representing the actor. - */ - public GetActorsLibraryDirectory withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The name of the actor. - */ - public GetActorsLibraryDirectory 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; - } - GetActorsLibraryDirectory other = (GetActorsLibraryDirectory) o; - return - Utils.enhancedDeepEquals(this.fastKey, other.fastKey) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - fastKey, thumb, key, - title); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryDirectory.class, - "fastKey", fastKey, - "thumb", thumb, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String fastKey; - - private String thumb; - - private String key; - - private String title; - - private Builder() { - // force use of static builder() method - } - - - /** - * A fast lookup key for the actor relative url. - */ - public Builder fastKey(String fastKey) { - Utils.checkNotNull(fastKey, "fastKey"); - this.fastKey = fastKey; - return this; - } - - - /** - * URL for the thumbnail image of the actor. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * A unique key representing the actor. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The name of the actor. - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetActorsLibraryDirectory build() { - - return new GetActorsLibraryDirectory( - fastKey, thumb, key, - title); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryMediaContainer.java deleted file mode 100644 index 22bb2c31..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryMediaContainer.java +++ /dev/null @@ -1,657 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetActorsLibraryMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * Indicates whether syncing is allowed. - */ - @JsonProperty("allowSync") - private boolean allowSync; - - /** - * URL for the background artwork of the media container. - */ - @JsonProperty("art") - private String art; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - /** - * The prefix used for media tag resource paths. - */ - @JsonProperty("mediaTagPrefix") - private String mediaTagPrefix; - - /** - * The version number for media tags. - */ - @JsonProperty("mediaTagVersion") - private long mediaTagVersion; - - /** - * Specifies whether caching is disabled. - */ - @JsonProperty("nocache") - private boolean nocache; - - /** - * URL for the thumbnail image of the media container. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The primary title of the media container. - */ - @JsonProperty("title1") - private String title1; - - /** - * The secondary title of the media container. - */ - @JsonProperty("title2") - private String title2; - - /** - * Identifier for the view group layout. - */ - @JsonProperty("viewGroup") - private String viewGroup; - - /** - * Identifier for the view mode. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewMode") - private Optional viewMode; - - /** - * An array of actor entries for media items. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Directory") - private Optional> directory; - - @JsonCreator - public GetActorsLibraryMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("art") String art, - @JsonProperty("identifier") String identifier, - @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("mediaTagVersion") long mediaTagVersion, - @JsonProperty("nocache") boolean nocache, - @JsonProperty("thumb") String thumb, - @JsonProperty("title1") String title1, - @JsonProperty("title2") String title2, - @JsonProperty("viewGroup") String viewGroup, - @JsonProperty("viewMode") Optional viewMode, - @JsonProperty("Directory") Optional> directory) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(nocache, "nocache"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title1, "title1"); - Utils.checkNotNull(title2, "title2"); - Utils.checkNotNull(viewGroup, "viewGroup"); - Utils.checkNotNull(viewMode, "viewMode"); - Utils.checkNotNull(directory, "directory"); - this.size = size; - this.allowSync = allowSync; - this.art = art; - this.identifier = identifier; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.nocache = nocache; - this.thumb = thumb; - this.title1 = title1; - this.title2 = title2; - this.viewGroup = viewGroup; - this.viewMode = viewMode; - this.directory = directory; - } - - public GetActorsLibraryMediaContainer( - int size, - boolean allowSync, - String art, - String identifier, - String mediaTagPrefix, - long mediaTagVersion, - boolean nocache, - String thumb, - String title1, - String title2, - String viewGroup) { - this(size, allowSync, art, - identifier, mediaTagPrefix, mediaTagVersion, - nocache, thumb, title1, - title2, viewGroup, Optional.empty(), - Optional.empty()); - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * Indicates whether syncing is allowed. - */ - @JsonIgnore - public boolean allowSync() { - return allowSync; - } - - /** - * URL for the background artwork of the media container. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - /** - * The prefix used for media tag resource paths. - */ - @JsonIgnore - public String mediaTagPrefix() { - return mediaTagPrefix; - } - - /** - * The version number for media tags. - */ - @JsonIgnore - public long mediaTagVersion() { - return mediaTagVersion; - } - - /** - * Specifies whether caching is disabled. - */ - @JsonIgnore - public boolean nocache() { - return nocache; - } - - /** - * URL for the thumbnail image of the media container. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The primary title of the media container. - */ - @JsonIgnore - public String title1() { - return title1; - } - - /** - * The secondary title of the media container. - */ - @JsonIgnore - public String title2() { - return title2; - } - - /** - * Identifier for the view group layout. - */ - @JsonIgnore - public String viewGroup() { - return viewGroup; - } - - /** - * Identifier for the view mode. - */ - @JsonIgnore - public Optional viewMode() { - return viewMode; - } - - /** - * An array of actor entries for media items. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> directory() { - return (Optional>) directory; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetActorsLibraryMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * Indicates whether syncing is allowed. - */ - public GetActorsLibraryMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - /** - * URL for the background artwork of the media container. - */ - public GetActorsLibraryMediaContainer withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetActorsLibraryMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - /** - * The prefix used for media tag resource paths. - */ - public GetActorsLibraryMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - /** - * The version number for media tags. - */ - public GetActorsLibraryMediaContainer withMediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - /** - * Specifies whether caching is disabled. - */ - public GetActorsLibraryMediaContainer withNocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - /** - * URL for the thumbnail image of the media container. - */ - public GetActorsLibraryMediaContainer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The primary title of the media container. - */ - public GetActorsLibraryMediaContainer withTitle1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - /** - * The secondary title of the media container. - */ - public GetActorsLibraryMediaContainer withTitle2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - /** - * Identifier for the view group layout. - */ - public GetActorsLibraryMediaContainer withViewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - /** - * Identifier for the view mode. - */ - public GetActorsLibraryMediaContainer withViewMode(String viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = Optional.ofNullable(viewMode); - return this; - } - - - /** - * Identifier for the view mode. - */ - public GetActorsLibraryMediaContainer withViewMode(Optional viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = viewMode; - return this; - } - - /** - * An array of actor entries for media items. - */ - public GetActorsLibraryMediaContainer withDirectory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - - /** - * An array of actor entries for media items. - */ - public GetActorsLibraryMediaContainer withDirectory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetActorsLibraryMediaContainer other = (GetActorsLibraryMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.nocache, other.nocache) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title1, other.title1) && - Utils.enhancedDeepEquals(this.title2, other.title2) && - Utils.enhancedDeepEquals(this.viewGroup, other.viewGroup) && - Utils.enhancedDeepEquals(this.viewMode, other.viewMode) && - Utils.enhancedDeepEquals(this.directory, other.directory); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowSync, art, - identifier, mediaTagPrefix, mediaTagVersion, - nocache, thumb, title1, - title2, viewGroup, viewMode, - directory); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryMediaContainer.class, - "size", size, - "allowSync", allowSync, - "art", art, - "identifier", identifier, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "nocache", nocache, - "thumb", thumb, - "title1", title1, - "title2", title2, - "viewGroup", viewGroup, - "viewMode", viewMode, - "directory", directory); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Boolean allowSync; - - private String art; - - private String identifier; - - private String mediaTagPrefix; - - private Long mediaTagVersion; - - private Boolean nocache; - - private String thumb; - - private String title1; - - private String title2; - - private String viewGroup; - - private Optional viewMode = Optional.empty(); - - private Optional> directory = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * Indicates whether syncing is allowed. - */ - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - - /** - * URL for the background artwork of the media container. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - /** - * The prefix used for media tag resource paths. - */ - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - - /** - * The version number for media tags. - */ - public Builder mediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - - /** - * Specifies whether caching is disabled. - */ - public Builder nocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - - /** - * URL for the thumbnail image of the media container. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The primary title of the media container. - */ - public Builder title1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - - /** - * The secondary title of the media container. - */ - public Builder title2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - - /** - * Identifier for the view group layout. - */ - public Builder viewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - - /** - * Identifier for the view mode. - */ - public Builder viewMode(String viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = Optional.ofNullable(viewMode); - return this; - } - - /** - * Identifier for the view mode. - */ - public Builder viewMode(Optional viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = viewMode; - return this; - } - - - /** - * An array of actor entries for media items. - */ - public Builder directory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - /** - * An array of actor entries for media items. - */ - public Builder directory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - public GetActorsLibraryMediaContainer build() { - - return new GetActorsLibraryMediaContainer( - size, allowSync, art, - identifier, mediaTagPrefix, mediaTagVersion, - nocache, thumb, title1, - title2, viewGroup, viewMode, - directory); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryQueryParamType.java deleted file mode 100644 index 4da17484..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryQueryParamType.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ -@JsonDeserialize(using = GetActorsLibraryQueryParamType._Deserializer.class) -@JsonSerialize(using = GetActorsLibraryQueryParamType._Serializer.class) -public class GetActorsLibraryQueryParamType { - - public static final GetActorsLibraryQueryParamType Movie = new GetActorsLibraryQueryParamType(1L); - public static final GetActorsLibraryQueryParamType TvShow = new GetActorsLibraryQueryParamType(2L); - public static final GetActorsLibraryQueryParamType Season = new GetActorsLibraryQueryParamType(3L); - public static final GetActorsLibraryQueryParamType Episode = new GetActorsLibraryQueryParamType(4L); - public static final GetActorsLibraryQueryParamType Artist = new GetActorsLibraryQueryParamType(5L); - public static final GetActorsLibraryQueryParamType Album = new GetActorsLibraryQueryParamType(6L); - public static final GetActorsLibraryQueryParamType Track = new GetActorsLibraryQueryParamType(7L); - public static final GetActorsLibraryQueryParamType PhotoAlbum = new GetActorsLibraryQueryParamType(8L); - public static final GetActorsLibraryQueryParamType Photo = new GetActorsLibraryQueryParamType(9L); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final long value; - - private GetActorsLibraryQueryParamType(long value) { - this.value = value; - } - - /** - * Returns a GetActorsLibraryQueryParamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetActorsLibraryQueryParamType - */ - public static GetActorsLibraryQueryParamType of(long value) { - synchronized (GetActorsLibraryQueryParamType.class) { - return values.computeIfAbsent(value, v -> new GetActorsLibraryQueryParamType(v)); - } - } - - public long value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetActorsLibraryQueryParamType other = (GetActorsLibraryQueryParamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetActorsLibraryQueryParamType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetActorsLibraryQueryParamType[] values() { - synchronized (GetActorsLibraryQueryParamType.class) { - return values.values().toArray(new GetActorsLibraryQueryParamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1L, Movie); - map.put(2L, TvShow); - map.put(3L, Season); - map.put(4L, Episode); - map.put(5L, Artist); - map.put(6L, Album); - map.put(7L, Track); - map.put(8L, PhotoAlbum); - map.put(9L, Photo); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1L, GetActorsLibraryQueryParamTypeEnum.Movie); - map.put(2L, GetActorsLibraryQueryParamTypeEnum.TvShow); - map.put(3L, GetActorsLibraryQueryParamTypeEnum.Season); - map.put(4L, GetActorsLibraryQueryParamTypeEnum.Episode); - map.put(5L, GetActorsLibraryQueryParamTypeEnum.Artist); - map.put(6L, GetActorsLibraryQueryParamTypeEnum.Album); - map.put(7L, GetActorsLibraryQueryParamTypeEnum.Track); - map.put(8L, GetActorsLibraryQueryParamTypeEnum.PhotoAlbum); - map.put(9L, GetActorsLibraryQueryParamTypeEnum.Photo); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetActorsLibraryQueryParamType.class); - } - - @Override - public void serialize(GetActorsLibraryQueryParamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetActorsLibraryQueryParamType.class); - } - - @Override - public GetActorsLibraryQueryParamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - long v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetActorsLibraryQueryParamType.of(v); - } - } - - public enum GetActorsLibraryQueryParamTypeEnum { - - Movie(1L), - TvShow(2L), - Season(3L), - Episode(4L), - Artist(5L), - Album(6L), - Track(7L), - PhotoAlbum(8L), - Photo(9L),; - - private final long value; - - private GetActorsLibraryQueryParamTypeEnum(long value) { - this.value = value; - } - - public long value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryRequest.java deleted file mode 100644 index 7e419608..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryRequest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - - -public class GetActorsLibraryRequest { - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey") - private int sectionKey; - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private GetActorsLibraryQueryParamType type; - - @JsonCreator - public GetActorsLibraryRequest( - int sectionKey, - GetActorsLibraryQueryParamType type) { - Utils.checkNotNull(sectionKey, "sectionKey"); - Utils.checkNotNull(type, "type"); - this.sectionKey = sectionKey; - this.type = type; - } - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @JsonIgnore - public int sectionKey() { - return sectionKey; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @JsonIgnore - public GetActorsLibraryQueryParamType type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public GetActorsLibraryRequest withSectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public GetActorsLibraryRequest withType(GetActorsLibraryQueryParamType 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; - } - GetActorsLibraryRequest other = (GetActorsLibraryRequest) o; - return - Utils.enhancedDeepEquals(this.sectionKey, other.sectionKey) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - sectionKey, type); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryRequest.class, - "sectionKey", sectionKey, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer sectionKey; - - private GetActorsLibraryQueryParamType type; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public Builder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public Builder type(GetActorsLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetActorsLibraryRequest build() { - - return new GetActorsLibraryRequest( - sectionKey, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryRequestBuilder.java deleted file mode 100644 index abfbcbc9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryRequestBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetActorsLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; - -public class GetActorsLibraryRequestBuilder { - - private Integer sectionKey; - private GetActorsLibraryQueryParamType type; - private final SDKConfiguration sdkConfiguration; - - public GetActorsLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetActorsLibraryRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - public GetActorsLibraryRequestBuilder type(GetActorsLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetActorsLibraryRequest buildRequest() { - - GetActorsLibraryRequest request = new GetActorsLibraryRequest(sectionKey, - type); - - return request; - } - - public GetActorsLibraryResponse call() throws Exception { - - RequestOperation operation - = new GetActorsLibrary.Sync(sdkConfiguration); - GetActorsLibraryRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryResponse.java deleted file mode 100644 index fbfcb086..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetActorsLibraryResponse 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; - - /** - * Successful response containing media container data. - */ - private Optional object; - - @JsonCreator - public GetActorsLibraryResponse( - 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 GetActorsLibraryResponse( - 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; - } - - /** - * Successful response containing media container data. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetActorsLibraryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetActorsLibraryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetActorsLibraryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response containing media container data. - */ - public GetActorsLibraryResponse withObject(GetActorsLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Successful response containing media container data. - */ - public GetActorsLibraryResponse 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; - } - GetActorsLibraryResponse other = (GetActorsLibraryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Successful response containing media container data. - */ - public Builder object(GetActorsLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Successful response containing media container data. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetActorsLibraryResponse build() { - - return new GetActorsLibraryResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryResponseBody.java deleted file mode 100644 index 6e10ff91..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetActorsLibraryResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetActorsLibraryResponseBody - * - *

Successful response containing media container data. - */ -public class GetActorsLibraryResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetActorsLibraryResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetActorsLibraryResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetActorsLibraryResponseBody withMediaContainer(GetActorsLibraryMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetActorsLibraryResponseBody 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; - } - GetActorsLibraryResponseBody other = (GetActorsLibraryResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetActorsLibraryMediaContainer 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 GetActorsLibraryResponseBody build() { - - return new GetActorsLibraryResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsRequest.java new file mode 100644 index 00000000..a7dfb94c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetAlbumsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public GetAlbumsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public GetAlbumsRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAlbumsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAlbumsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetAlbumsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetAlbumsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetAlbumsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetAlbumsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetAlbumsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetAlbumsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetAlbumsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetAlbumsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetAlbumsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetAlbumsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetAlbumsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetAlbumsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetAlbumsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetAlbumsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetAlbumsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetAlbumsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetAlbumsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetAlbumsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetAlbumsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetAlbumsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetAlbumsRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAlbumsRequest other = (GetAlbumsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(GetAlbumsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetAlbumsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetAlbumsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsRequestBuilder.java new file mode 100644 index 00000000..94558925 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAlbums; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetAlbumsRequestBuilder { + + private GetAlbumsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAlbumsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAlbumsRequestBuilder request(GetAlbumsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAlbumsResponse call() throws Exception { + + RequestOperation operation + = new GetAlbums.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsResponse.java new file mode 100644 index 00000000..cae7a9ab --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAlbumsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class GetAlbumsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public GetAlbumsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public GetAlbumsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAlbumsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAlbumsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAlbumsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAlbumsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetAlbumsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAlbumsResponse other = (GetAlbumsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetAlbumsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetAlbumsResponse build() { + + return new GetAlbumsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsMediaContainer.java new file mode 100644 index 00000000..95a641d9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Hub; +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.List; +import java.util.Optional; + +/** + * GetAllHubsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetAllHubsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + @JsonCreator + public GetAllHubsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(hub, "hub"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.hub = hub; + } + + public GetAllHubsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hub() { + return (Optional>) hub; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetAllHubsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetAllHubsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetAllHubsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetAllHubsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetAllHubsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetAllHubsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetAllHubsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetAllHubsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetAllHubsMediaContainer withHub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + + public GetAllHubsMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllHubsMediaContainer other = (GetAllHubsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, hub); + } + + @Override + public String toString() { + return Utils.toString(GetAllHubsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "hub", hub); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder hub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public GetAllHubsMediaContainer build() { + + return new GetAllHubsMediaContainer( + identifier, offset, size, + totalSize, hub); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsRequest.java new file mode 100644 index 00000000..ae7e0fed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsRequest.java @@ -0,0 +1,923 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class GetAllHubsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Limit results to count items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=onlyTransient") + private Optional onlyTransient; + + /** + * If provided, limit to only specified hubs + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=identifier") + private Optional> identifier; + + @JsonCreator + public GetAllHubsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional count, + Optional onlyTransient, + Optional> identifier) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(onlyTransient, "onlyTransient"); + Utils.checkNotNull(identifier, "identifier"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.count = count; + this.onlyTransient = onlyTransient; + this.identifier = identifier; + } + + public GetAllHubsRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Limit results to count items + */ + @JsonIgnore + public Optional count() { + return count; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional onlyTransient() { + return (Optional) onlyTransient; + } + + /** + * If provided, limit to only specified hubs + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> identifier() { + return (Optional>) identifier; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAllHubsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAllHubsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetAllHubsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetAllHubsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetAllHubsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetAllHubsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetAllHubsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetAllHubsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetAllHubsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetAllHubsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetAllHubsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetAllHubsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetAllHubsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetAllHubsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetAllHubsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetAllHubsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetAllHubsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetAllHubsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetAllHubsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetAllHubsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetAllHubsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetAllHubsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Limit results to count items + */ + public GetAllHubsRequest withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + /** + * Limit results to count items + */ + public GetAllHubsRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public GetAllHubsRequest withOnlyTransient(BoolInt onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public GetAllHubsRequest withOnlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + /** + * If provided, limit to only specified hubs + */ + public GetAllHubsRequest withIdentifier(List identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + /** + * If provided, limit to only specified hubs + */ + public GetAllHubsRequest withIdentifier(Optional> identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllHubsRequest other = (GetAllHubsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.count, other.count) && + Utils.enhancedDeepEquals(this.onlyTransient, other.onlyTransient) && + Utils.enhancedDeepEquals(this.identifier, other.identifier); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, count, + onlyTransient, identifier); + } + + @Override + public String toString() { + return Utils.toString(GetAllHubsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "count", count, + "onlyTransient", onlyTransient, + "identifier", identifier); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional count = Optional.empty(); + + private Optional onlyTransient = Optional.empty(); + + private Optional> identifier = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Limit results to count items + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * Limit results to count items + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public Builder onlyTransient(BoolInt onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public Builder onlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + + /** + * If provided, limit to only specified hubs + */ + public Builder identifier(List identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + /** + * If provided, limit to only specified hubs + */ + public Builder identifier(Optional> identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetAllHubsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetAllHubsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, count, + onlyTransient, identifier); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsRequestBuilder.java new file mode 100644 index 00000000..8d06e092 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAllHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetAllHubsRequestBuilder { + + private GetAllHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAllHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAllHubsRequestBuilder request(GetAllHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAllHubsResponse call() throws Exception { + + RequestOperation operation + = new GetAllHubs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsResponse.java new file mode 100644 index 00000000..9d720870 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetAllHubsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetAllHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetAllHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllHubsResponse withObject(GetAllHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetAllHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetAllHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllHubsResponse other = (GetAllHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetAllHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetAllHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetAllHubsResponse build() { + + return new GetAllHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsResponseBody.java new file mode 100644 index 00000000..43bf3602 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllHubsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetAllHubsResponseBody + * + *

OK + */ +public class GetAllHubsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetAllHubsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetAllHubsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetAllHubsResponseBody withMediaContainer(GetAllHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetAllHubsResponseBody 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; + } + GetAllHubsResponseBody other = (GetAllHubsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetAllHubsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetAllHubsMediaContainer 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 GetAllHubsResponseBody build() { + + return new GetAllHubsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesRequest.java new file mode 100644 index 00000000..a4573dcf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesRequest.java @@ -0,0 +1,768 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetAllItemLeavesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + @JsonCreator + public GetAllItemLeavesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + } + + public GetAllItemLeavesRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAllItemLeavesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAllItemLeavesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetAllItemLeavesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetAllItemLeavesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetAllItemLeavesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetAllItemLeavesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetAllItemLeavesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetAllItemLeavesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetAllItemLeavesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetAllItemLeavesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetAllItemLeavesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetAllItemLeavesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetAllItemLeavesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetAllItemLeavesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetAllItemLeavesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetAllItemLeavesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetAllItemLeavesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetAllItemLeavesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetAllItemLeavesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetAllItemLeavesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetAllItemLeavesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetAllItemLeavesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public GetAllItemLeavesRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllItemLeavesRequest other = (GetAllItemLeavesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + @Override + public String toString() { + return Utils.toString(GetAllItemLeavesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public GetAllItemLeavesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetAllItemLeavesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesRequestBuilder.java new file mode 100644 index 00000000..0c1f2436 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAllItemLeaves; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetAllItemLeavesRequestBuilder { + + private GetAllItemLeavesRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAllItemLeavesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAllItemLeavesRequestBuilder request(GetAllItemLeavesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAllItemLeavesResponse call() throws Exception { + + RequestOperation operation + = new GetAllItemLeaves.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesResponse.java new file mode 100644 index 00000000..33f946a7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllItemLeavesResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetAllItemLeavesResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetAllItemLeavesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetAllItemLeavesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllItemLeavesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllItemLeavesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllItemLeavesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllItemLeavesResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetAllItemLeavesResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetAllItemLeavesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllItemLeavesResponse other = (GetAllItemLeavesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetAllItemLeavesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetAllItemLeavesResponse build() { + + return new GetAllItemLeavesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesMediaContainer.java new file mode 100644 index 00000000..6b7635bc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetAllLanguagesMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetAllLanguagesMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Language") + private Optional> language; + + @JsonCreator + public GetAllLanguagesMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Language") Optional> language) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(language, "language"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.language = language; + } + + public GetAllLanguagesMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> language() { + return (Optional>) language; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetAllLanguagesMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetAllLanguagesMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetAllLanguagesMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetAllLanguagesMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetAllLanguagesMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetAllLanguagesMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetAllLanguagesMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetAllLanguagesMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetAllLanguagesMediaContainer withLanguage(List language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public GetAllLanguagesMediaContainer withLanguage(Optional> language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllLanguagesMediaContainer other = (GetAllLanguagesMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.language, other.language); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, language); + } + + @Override + public String toString() { + return Utils.toString(GetAllLanguagesMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "language", language); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> language = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder language(List 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 GetAllLanguagesMediaContainer build() { + + return new GetAllLanguagesMediaContainer( + identifier, offset, size, + totalSize, language); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesRequestBuilder.java new file mode 100644 index 00000000..df507580 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAllLanguages; +import java.lang.Exception; + +public class GetAllLanguagesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetAllLanguagesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAllLanguagesResponse call() throws Exception { + + RequestlessOperation operation + = new GetAllLanguages.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesResponse.java new file mode 100644 index 00000000..29ab539e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetAllLanguagesResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetAllLanguagesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetAllLanguagesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllLanguagesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllLanguagesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllLanguagesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllLanguagesResponse withObject(GetAllLanguagesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetAllLanguagesResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetAllLanguagesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllLanguagesResponse other = (GetAllLanguagesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetAllLanguagesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetAllLanguagesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetAllLanguagesResponse build() { + + return new GetAllLanguagesResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesResponseBody.java new file mode 100644 index 00000000..111c9296 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLanguagesResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetAllLanguagesResponseBody + * + *

OK + */ +public class GetAllLanguagesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetAllLanguagesResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetAllLanguagesResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetAllLanguagesResponseBody withMediaContainer(GetAllLanguagesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetAllLanguagesResponseBody 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; + } + GetAllLanguagesResponseBody other = (GetAllLanguagesResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetAllLanguagesResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetAllLanguagesMediaContainer 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 GetAllLanguagesResponseBody build() { + + return new GetAllLanguagesResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesRequest.java new file mode 100644 index 00000000..0c374991 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetAllLeavesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public GetAllLeavesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public GetAllLeavesRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAllLeavesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAllLeavesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetAllLeavesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetAllLeavesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetAllLeavesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetAllLeavesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetAllLeavesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetAllLeavesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetAllLeavesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetAllLeavesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetAllLeavesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetAllLeavesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetAllLeavesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetAllLeavesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetAllLeavesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetAllLeavesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetAllLeavesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetAllLeavesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetAllLeavesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetAllLeavesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetAllLeavesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetAllLeavesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetAllLeavesRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllLeavesRequest other = (GetAllLeavesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(GetAllLeavesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetAllLeavesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetAllLeavesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesRequestBuilder.java new file mode 100644 index 00000000..afdfcadf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAllLeaves; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetAllLeavesRequestBuilder { + + private GetAllLeavesRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAllLeavesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAllLeavesRequestBuilder request(GetAllLeavesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAllLeavesResponse call() throws Exception { + + RequestOperation operation + = new GetAllLeaves.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesResponse.java new file mode 100644 index 00000000..f6450f9d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLeavesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class GetAllLeavesResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public GetAllLeavesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public GetAllLeavesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllLeavesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllLeavesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllLeavesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllLeavesResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetAllLeavesResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllLeavesResponse other = (GetAllLeavesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetAllLeavesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetAllLeavesResponse build() { + + return new GetAllLeavesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java deleted file mode 100644 index 9d815bfd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java +++ /dev/null @@ -1,966 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetAllLibrariesDirectory { - /** - * Indicates whether syncing is allowed. - */ - @JsonProperty("allowSync") - private boolean allowSync; - - /** - * URL for the background artwork of the media container. - */ - @JsonProperty("art") - private String art; - - /** - * The relative path to the composite media item. - */ - @JsonProperty("composite") - private String composite; - - /** - * UNKNOWN - */ - @JsonProperty("filters") - private boolean filters; - - /** - * Indicates whether the library is currently being refreshed or updated - */ - @JsonProperty("refreshing") - private boolean refreshing; - - /** - * URL for the thumbnail image of the media container. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The library key representing the unique identifier - */ - @JsonProperty("key") - private String key; - - - @JsonProperty("type") - private GetAllLibrariesType type; - - /** - * The title of the library - */ - @JsonProperty("title") - private String title; - - /** - * The Plex agent used to match and retrieve media metadata. - */ - @JsonProperty("agent") - private String agent; - - /** - * UNKNOWN - */ - @JsonProperty("scanner") - private String scanner; - - /** - * The Plex library language that has been set - */ - @JsonProperty("language") - private String language; - - /** - * The universally unique identifier for the library. - */ - @JsonProperty("uuid") - private String uuid; - - /** - * Unix epoch datetime in seconds - */ - @JsonProperty("updatedAt") - private long updatedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAt") - private Optional createdAt; - - /** - * Unix epoch datetime in seconds - */ - @JsonProperty("scannedAt") - private long scannedAt; - - /** - * UNKNOWN - */ - @JsonProperty("content") - private boolean content; - - /** - * UNKNOWN - */ - @JsonProperty("directory") - private boolean directory; - - /** - * Timestamp (in seconds) representing the last time the content was modified. - * NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64 - */ - @JsonProperty("contentChangedAt") - private long contentChangedAt; - - /** - * The Plex library visibility setting - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hidden") - private Optional hidden; - - - @JsonProperty("Location") - private List location; - - @JsonCreator - public GetAllLibrariesDirectory( - @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("art") String art, - @JsonProperty("composite") String composite, - @JsonProperty("filters") boolean filters, - @JsonProperty("refreshing") boolean refreshing, - @JsonProperty("thumb") String thumb, - @JsonProperty("key") String key, - @JsonProperty("type") GetAllLibrariesType type, - @JsonProperty("title") String title, - @JsonProperty("agent") String agent, - @JsonProperty("scanner") String scanner, - @JsonProperty("language") String language, - @JsonProperty("uuid") String uuid, - @JsonProperty("updatedAt") long updatedAt, - @JsonProperty("createdAt") Optional createdAt, - @JsonProperty("scannedAt") long scannedAt, - @JsonProperty("content") boolean content, - @JsonProperty("directory") boolean directory, - @JsonProperty("contentChangedAt") long contentChangedAt, - @JsonProperty("hidden") Optional hidden, - @JsonProperty("Location") List location) { - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(composite, "composite"); - Utils.checkNotNull(filters, "filters"); - Utils.checkNotNull(refreshing, "refreshing"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(agent, "agent"); - Utils.checkNotNull(scanner, "scanner"); - Utils.checkNotNull(language, "language"); - Utils.checkNotNull(uuid, "uuid"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(createdAt, "createdAt"); - Utils.checkNotNull(scannedAt, "scannedAt"); - Utils.checkNotNull(content, "content"); - Utils.checkNotNull(directory, "directory"); - Utils.checkNotNull(contentChangedAt, "contentChangedAt"); - Utils.checkNotNull(hidden, "hidden"); - Utils.checkNotNull(location, "location"); - this.allowSync = allowSync; - this.art = art; - this.composite = composite; - this.filters = filters; - this.refreshing = refreshing; - this.thumb = thumb; - this.key = key; - this.type = type; - this.title = title; - this.agent = agent; - this.scanner = scanner; - this.language = language; - this.uuid = uuid; - this.updatedAt = updatedAt; - this.createdAt = createdAt; - this.scannedAt = scannedAt; - this.content = content; - this.directory = directory; - this.contentChangedAt = contentChangedAt; - this.hidden = hidden; - this.location = location; - } - - public GetAllLibrariesDirectory( - boolean allowSync, - String art, - String composite, - boolean filters, - boolean refreshing, - String thumb, - String key, - GetAllLibrariesType type, - String title, - String agent, - String scanner, - String language, - String uuid, - long updatedAt, - long scannedAt, - boolean content, - boolean directory, - long contentChangedAt, - List location) { - this(allowSync, art, composite, - filters, refreshing, thumb, - key, type, title, - agent, scanner, language, - uuid, updatedAt, Optional.empty(), - scannedAt, content, directory, - contentChangedAt, Optional.empty(), location); - } - - /** - * Indicates whether syncing is allowed. - */ - @JsonIgnore - public boolean allowSync() { - return allowSync; - } - - /** - * URL for the background artwork of the media container. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * The relative path to the composite media item. - */ - @JsonIgnore - public String composite() { - return composite; - } - - /** - * UNKNOWN - */ - @JsonIgnore - public boolean filters() { - return filters; - } - - /** - * Indicates whether the library is currently being refreshed or updated - */ - @JsonIgnore - public boolean refreshing() { - return refreshing; - } - - /** - * URL for the thumbnail image of the media container. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The library key representing the unique identifier - */ - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public GetAllLibrariesType type() { - return type; - } - - /** - * The title of the library - */ - @JsonIgnore - public String title() { - return title; - } - - /** - * The Plex agent used to match and retrieve media metadata. - */ - @JsonIgnore - public String agent() { - return agent; - } - - /** - * UNKNOWN - */ - @JsonIgnore - public String scanner() { - return scanner; - } - - /** - * The Plex library language that has been set - */ - @JsonIgnore - public String language() { - return language; - } - - /** - * The universally unique identifier for the library. - */ - @JsonIgnore - public String uuid() { - return uuid; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public long updatedAt() { - return updatedAt; - } - - @JsonIgnore - public Optional createdAt() { - return createdAt; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public long scannedAt() { - return scannedAt; - } - - /** - * UNKNOWN - */ - @JsonIgnore - public boolean content() { - return content; - } - - /** - * UNKNOWN - */ - @JsonIgnore - public boolean directory() { - return directory; - } - - /** - * Timestamp (in seconds) representing the last time the content was modified. - * NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64 - */ - @JsonIgnore - public long contentChangedAt() { - return contentChangedAt; - } - - /** - * The Plex library visibility setting - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional hidden() { - return (Optional) hidden; - } - - @JsonIgnore - public List location() { - return location; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Indicates whether syncing is allowed. - */ - public GetAllLibrariesDirectory withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - /** - * URL for the background artwork of the media container. - */ - public GetAllLibrariesDirectory withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * The relative path to the composite media item. - */ - public GetAllLibrariesDirectory withComposite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - /** - * UNKNOWN - */ - public GetAllLibrariesDirectory withFilters(boolean filters) { - Utils.checkNotNull(filters, "filters"); - this.filters = filters; - return this; - } - - /** - * Indicates whether the library is currently being refreshed or updated - */ - public GetAllLibrariesDirectory withRefreshing(boolean refreshing) { - Utils.checkNotNull(refreshing, "refreshing"); - this.refreshing = refreshing; - return this; - } - - /** - * URL for the thumbnail image of the media container. - */ - public GetAllLibrariesDirectory withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The library key representing the unique identifier - */ - public GetAllLibrariesDirectory withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetAllLibrariesDirectory withType(GetAllLibrariesType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The title of the library - */ - public GetAllLibrariesDirectory withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * The Plex agent used to match and retrieve media metadata. - */ - public GetAllLibrariesDirectory withAgent(String agent) { - Utils.checkNotNull(agent, "agent"); - this.agent = agent; - return this; - } - - /** - * UNKNOWN - */ - public GetAllLibrariesDirectory withScanner(String scanner) { - Utils.checkNotNull(scanner, "scanner"); - this.scanner = scanner; - return this; - } - - /** - * The Plex library language that has been set - */ - public GetAllLibrariesDirectory withLanguage(String language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - /** - * The universally unique identifier for the library. - */ - public GetAllLibrariesDirectory withUuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public GetAllLibrariesDirectory withUpdatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - public GetAllLibrariesDirectory withCreatedAt(long createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - - public GetAllLibrariesDirectory withCreatedAt(Optional createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public GetAllLibrariesDirectory withScannedAt(long scannedAt) { - Utils.checkNotNull(scannedAt, "scannedAt"); - this.scannedAt = scannedAt; - return this; - } - - /** - * UNKNOWN - */ - public GetAllLibrariesDirectory withContent(boolean content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - /** - * UNKNOWN - */ - public GetAllLibrariesDirectory withDirectory(boolean directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - /** - * Timestamp (in seconds) representing the last time the content was modified. - * NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64 - */ - public GetAllLibrariesDirectory withContentChangedAt(long contentChangedAt) { - Utils.checkNotNull(contentChangedAt, "contentChangedAt"); - this.contentChangedAt = contentChangedAt; - return this; - } - - /** - * The Plex library visibility setting - */ - public GetAllLibrariesDirectory withHidden(Hidden hidden) { - Utils.checkNotNull(hidden, "hidden"); - this.hidden = Optional.ofNullable(hidden); - return this; - } - - - /** - * The Plex library visibility setting - */ - public GetAllLibrariesDirectory withHidden(Optional hidden) { - Utils.checkNotNull(hidden, "hidden"); - this.hidden = hidden; - return this; - } - - public GetAllLibrariesDirectory withLocation(List location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAllLibrariesDirectory other = (GetAllLibrariesDirectory) o; - return - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.composite, other.composite) && - Utils.enhancedDeepEquals(this.filters, other.filters) && - Utils.enhancedDeepEquals(this.refreshing, other.refreshing) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.agent, other.agent) && - Utils.enhancedDeepEquals(this.scanner, other.scanner) && - Utils.enhancedDeepEquals(this.language, other.language) && - Utils.enhancedDeepEquals(this.uuid, other.uuid) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && - Utils.enhancedDeepEquals(this.scannedAt, other.scannedAt) && - Utils.enhancedDeepEquals(this.content, other.content) && - Utils.enhancedDeepEquals(this.directory, other.directory) && - Utils.enhancedDeepEquals(this.contentChangedAt, other.contentChangedAt) && - Utils.enhancedDeepEquals(this.hidden, other.hidden) && - Utils.enhancedDeepEquals(this.location, other.location); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - allowSync, art, composite, - filters, refreshing, thumb, - key, type, title, - agent, scanner, language, - uuid, updatedAt, createdAt, - scannedAt, content, directory, - contentChangedAt, hidden, location); - } - - @Override - public String toString() { - return Utils.toString(GetAllLibrariesDirectory.class, - "allowSync", allowSync, - "art", art, - "composite", composite, - "filters", filters, - "refreshing", refreshing, - "thumb", thumb, - "key", key, - "type", type, - "title", title, - "agent", agent, - "scanner", scanner, - "language", language, - "uuid", uuid, - "updatedAt", updatedAt, - "createdAt", createdAt, - "scannedAt", scannedAt, - "content", content, - "directory", directory, - "contentChangedAt", contentChangedAt, - "hidden", hidden, - "location", location); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Boolean allowSync; - - private String art; - - private String composite; - - private Boolean filters; - - private Boolean refreshing; - - private String thumb; - - private String key; - - private GetAllLibrariesType type; - - private String title; - - private String agent; - - private String scanner; - - private String language; - - private String uuid; - - private Long updatedAt; - - private Optional createdAt = Optional.empty(); - - private Long scannedAt; - - private Boolean content; - - private Boolean directory; - - private Long contentChangedAt; - - private Optional hidden; - - private List location; - - private Builder() { - // force use of static builder() method - } - - - /** - * Indicates whether syncing is allowed. - */ - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - - /** - * URL for the background artwork of the media container. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * The relative path to the composite media item. - */ - public Builder composite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - - /** - * UNKNOWN - */ - public Builder filters(boolean filters) { - Utils.checkNotNull(filters, "filters"); - this.filters = filters; - return this; - } - - - /** - * Indicates whether the library is currently being refreshed or updated - */ - public Builder refreshing(boolean refreshing) { - Utils.checkNotNull(refreshing, "refreshing"); - this.refreshing = refreshing; - return this; - } - - - /** - * URL for the thumbnail image of the media container. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The library key representing the unique identifier - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - public Builder type(GetAllLibrariesType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The title of the library - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - /** - * The Plex agent used to match and retrieve media metadata. - */ - public Builder agent(String agent) { - Utils.checkNotNull(agent, "agent"); - this.agent = agent; - return this; - } - - - /** - * UNKNOWN - */ - public Builder scanner(String scanner) { - Utils.checkNotNull(scanner, "scanner"); - this.scanner = scanner; - return this; - } - - - /** - * The Plex library language that has been set - */ - public Builder language(String language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - - /** - * The universally unique identifier for the library. - */ - public Builder uuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - - public Builder createdAt(long createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - public Builder createdAt(Optional createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder scannedAt(long scannedAt) { - Utils.checkNotNull(scannedAt, "scannedAt"); - this.scannedAt = scannedAt; - return this; - } - - - /** - * UNKNOWN - */ - public Builder content(boolean content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - - /** - * UNKNOWN - */ - public Builder directory(boolean directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - - /** - * Timestamp (in seconds) representing the last time the content was modified. - * NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64 - */ - public Builder contentChangedAt(long contentChangedAt) { - Utils.checkNotNull(contentChangedAt, "contentChangedAt"); - this.contentChangedAt = contentChangedAt; - return this; - } - - - /** - * The Plex library visibility setting - */ - public Builder hidden(Hidden hidden) { - Utils.checkNotNull(hidden, "hidden"); - this.hidden = Optional.ofNullable(hidden); - return this; - } - - /** - * The Plex library visibility setting - */ - public Builder hidden(Optional hidden) { - Utils.checkNotNull(hidden, "hidden"); - this.hidden = hidden; - return this; - } - - - public Builder location(List location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - public GetAllLibrariesDirectory build() { - if (hidden == null) { - hidden = _SINGLETON_VALUE_Hidden.value(); - } - - return new GetAllLibrariesDirectory( - allowSync, art, composite, - filters, refreshing, thumb, - key, type, title, - agent, scanner, language, - uuid, updatedAt, createdAt, - scannedAt, content, directory, - contentChangedAt, hidden, location); - } - - - private static final LazySingletonValue

The libraries available on the Server - */ -public class GetAllLibrariesResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetAllLibrariesResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetAllLibrariesResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAllLibrariesResponseBody withMediaContainer(GetAllLibrariesMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetAllLibrariesResponseBody 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; - } - GetAllLibrariesResponseBody other = (GetAllLibrariesResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetAllLibrariesResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetAllLibrariesMediaContainer 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 GetAllLibrariesResponseBody build() { - - return new GetAllLibrariesResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesType.java deleted file mode 100644 index b34956c0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesType.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The library type - */ -@JsonDeserialize(using = GetAllLibrariesType._Deserializer.class) -@JsonSerialize(using = GetAllLibrariesType._Serializer.class) -public class GetAllLibrariesType { - - public static final GetAllLibrariesType Movie = new GetAllLibrariesType("movie"); - public static final GetAllLibrariesType TvShow = new GetAllLibrariesType("show"); - public static final GetAllLibrariesType Season = new GetAllLibrariesType("season"); - public static final GetAllLibrariesType Episode = new GetAllLibrariesType("episode"); - public static final GetAllLibrariesType Artist = new GetAllLibrariesType("artist"); - public static final GetAllLibrariesType Album = new GetAllLibrariesType("album"); - public static final GetAllLibrariesType Track = new GetAllLibrariesType("track"); - public static final GetAllLibrariesType PhotoAlbum = new GetAllLibrariesType("photoalbum"); - public static final GetAllLibrariesType Photo = new GetAllLibrariesType("photo"); - public static final GetAllLibrariesType Collection = new GetAllLibrariesType("collection"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetAllLibrariesType(String value) { - this.value = value; - } - - /** - * Returns a GetAllLibrariesType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetAllLibrariesType - */ - public static GetAllLibrariesType of(String value) { - synchronized (GetAllLibrariesType.class) { - return values.computeIfAbsent(value, v -> new GetAllLibrariesType(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetAllLibrariesType other = (GetAllLibrariesType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetAllLibrariesType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetAllLibrariesType[] values() { - synchronized (GetAllLibrariesType.class) { - return values.values().toArray(new GetAllLibrariesType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("movie", Movie); - map.put("show", TvShow); - map.put("season", Season); - map.put("episode", Episode); - map.put("artist", Artist); - map.put("album", Album); - map.put("track", Track); - map.put("photoalbum", PhotoAlbum); - map.put("photo", Photo); - map.put("collection", Collection); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("movie", GetAllLibrariesTypeEnum.Movie); - map.put("show", GetAllLibrariesTypeEnum.TvShow); - map.put("season", GetAllLibrariesTypeEnum.Season); - map.put("episode", GetAllLibrariesTypeEnum.Episode); - map.put("artist", GetAllLibrariesTypeEnum.Artist); - map.put("album", GetAllLibrariesTypeEnum.Album); - map.put("track", GetAllLibrariesTypeEnum.Track); - map.put("photoalbum", GetAllLibrariesTypeEnum.PhotoAlbum); - map.put("photo", GetAllLibrariesTypeEnum.Photo); - map.put("collection", GetAllLibrariesTypeEnum.Collection); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetAllLibrariesType.class); - } - - @Override - public void serialize(GetAllLibrariesType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetAllLibrariesType.class); - } - - @Override - public GetAllLibrariesType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetAllLibrariesType.of(v); - } - } - - public enum GetAllLibrariesTypeEnum { - - Movie("movie"), - TvShow("show"), - Season("season"), - Episode("episode"), - Artist("artist"), - Album("album"), - Track("track"), - PhotoAlbum("photoalbum"), - Photo("photo"), - Collection("collection"),; - - private final String value; - - private GetAllLibrariesTypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllPreferencesRequestBuilder.java new file mode 100644 index 00000000..c5021d0f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllPreferencesRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAllPreferences; +import java.lang.Exception; + +public class GetAllPreferencesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetAllPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAllPreferencesResponse call() throws Exception { + + RequestlessOperation operation + = new GetAllPreferences.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllPreferencesResponse.java new file mode 100644 index 00000000..08fa11b3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllPreferencesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSettings; +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.Optional; + + +public class GetAllPreferencesResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithSettings; + + @JsonCreator + public GetAllPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSettings) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSettings = mediaContainerWithSettings; + } + + public GetAllPreferencesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSettings() { + return (Optional) mediaContainerWithSettings; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllPreferencesResponse withMediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + + /** + * OK + */ + public GetAllPreferencesResponse withMediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllPreferencesResponse other = (GetAllPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSettings, other.mediaContainerWithSettings); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + @Override + public String toString() { + return Utils.toString(GetAllPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSettings", mediaContainerWithSettings); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSettings = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + public GetAllPreferencesResponse build() { + + return new GetAllPreferencesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsRequest.java new file mode 100644 index 00000000..6f87083c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsRequest.java @@ -0,0 +1,862 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetAllSubscriptionsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Indicates whether the active grabs should be included as well + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGrabs") + private Optional includeGrabs; + + /** + * Compute the storage of recorded items desired by this subscription + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeStorage") + private Optional includeStorage; + + @JsonCreator + public GetAllSubscriptionsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional includeGrabs, + Optional includeStorage) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(includeGrabs, "includeGrabs"); + Utils.checkNotNull(includeStorage, "includeStorage"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.includeGrabs = includeGrabs; + this.includeStorage = includeStorage; + } + + public GetAllSubscriptionsRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Indicates whether the active grabs should be included as well + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeGrabs() { + return (Optional) includeGrabs; + } + + /** + * Compute the storage of recorded items desired by this subscription + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeStorage() { + return (Optional) includeStorage; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAllSubscriptionsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAllSubscriptionsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetAllSubscriptionsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetAllSubscriptionsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetAllSubscriptionsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetAllSubscriptionsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetAllSubscriptionsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetAllSubscriptionsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetAllSubscriptionsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetAllSubscriptionsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetAllSubscriptionsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetAllSubscriptionsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetAllSubscriptionsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetAllSubscriptionsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetAllSubscriptionsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetAllSubscriptionsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetAllSubscriptionsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetAllSubscriptionsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetAllSubscriptionsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetAllSubscriptionsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetAllSubscriptionsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetAllSubscriptionsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Indicates whether the active grabs should be included as well + */ + public GetAllSubscriptionsRequest withIncludeGrabs(BoolInt includeGrabs) { + Utils.checkNotNull(includeGrabs, "includeGrabs"); + this.includeGrabs = Optional.ofNullable(includeGrabs); + return this; + } + + + /** + * Indicates whether the active grabs should be included as well + */ + public GetAllSubscriptionsRequest withIncludeGrabs(Optional includeGrabs) { + Utils.checkNotNull(includeGrabs, "includeGrabs"); + this.includeGrabs = includeGrabs; + return this; + } + + /** + * Compute the storage of recorded items desired by this subscription + */ + public GetAllSubscriptionsRequest withIncludeStorage(BoolInt includeStorage) { + Utils.checkNotNull(includeStorage, "includeStorage"); + this.includeStorage = Optional.ofNullable(includeStorage); + return this; + } + + + /** + * Compute the storage of recorded items desired by this subscription + */ + public GetAllSubscriptionsRequest withIncludeStorage(Optional includeStorage) { + Utils.checkNotNull(includeStorage, "includeStorage"); + this.includeStorage = includeStorage; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllSubscriptionsRequest other = (GetAllSubscriptionsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.includeGrabs, other.includeGrabs) && + Utils.enhancedDeepEquals(this.includeStorage, other.includeStorage); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, includeGrabs, + includeStorage); + } + + @Override + public String toString() { + return Utils.toString(GetAllSubscriptionsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "includeGrabs", includeGrabs, + "includeStorage", includeStorage); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional includeGrabs = Optional.empty(); + + private Optional includeStorage = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Indicates whether the active grabs should be included as well + */ + public Builder includeGrabs(BoolInt includeGrabs) { + Utils.checkNotNull(includeGrabs, "includeGrabs"); + this.includeGrabs = Optional.ofNullable(includeGrabs); + return this; + } + + /** + * Indicates whether the active grabs should be included as well + */ + public Builder includeGrabs(Optional includeGrabs) { + Utils.checkNotNull(includeGrabs, "includeGrabs"); + this.includeGrabs = includeGrabs; + return this; + } + + + /** + * Compute the storage of recorded items desired by this subscription + */ + public Builder includeStorage(BoolInt includeStorage) { + Utils.checkNotNull(includeStorage, "includeStorage"); + this.includeStorage = Optional.ofNullable(includeStorage); + return this; + } + + /** + * Compute the storage of recorded items desired by this subscription + */ + public Builder includeStorage(Optional includeStorage) { + Utils.checkNotNull(includeStorage, "includeStorage"); + this.includeStorage = includeStorage; + return this; + } + + public GetAllSubscriptionsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetAllSubscriptionsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, includeGrabs, + includeStorage); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsRequestBuilder.java new file mode 100644 index 00000000..51718ff0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAllSubscriptions; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetAllSubscriptionsRequestBuilder { + + private GetAllSubscriptionsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAllSubscriptionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAllSubscriptionsRequestBuilder request(GetAllSubscriptionsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAllSubscriptionsResponse call() throws Exception { + + RequestOperation operation + = new GetAllSubscriptions.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsResponse.java new file mode 100644 index 00000000..94d92b0b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllSubscriptionsResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithSubscription; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetAllSubscriptionsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithSubscription; + + + private Map> headers; + + @JsonCreator + public GetAllSubscriptionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSubscription, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + this.headers = headers; + } + + public GetAllSubscriptionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSubscription() { + return (Optional) mediaContainerWithSubscription; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllSubscriptionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllSubscriptionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllSubscriptionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllSubscriptionsResponse withMediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + + /** + * OK + */ + public GetAllSubscriptionsResponse withMediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + public GetAllSubscriptionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllSubscriptionsResponse other = (GetAllSubscriptionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSubscription, other.mediaContainerWithSubscription) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription, headers); + } + + @Override + public String toString() { + return Utils.toString(GetAllSubscriptionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSubscription", mediaContainerWithSubscription, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSubscription = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetAllSubscriptionsResponse build() { + + return new GetAllSubscriptionsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetArtsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetArtsRequest.java new file mode 100644 index 00000000..776c319d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetArtsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetArtsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public GetArtsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public GetArtsRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetArtsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetArtsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetArtsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetArtsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetArtsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetArtsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetArtsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetArtsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetArtsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetArtsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetArtsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetArtsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetArtsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetArtsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetArtsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetArtsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetArtsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetArtsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetArtsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetArtsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetArtsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetArtsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetArtsRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetArtsRequest other = (GetArtsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(GetArtsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetArtsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetArtsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetArtsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetArtsRequestBuilder.java new file mode 100644 index 00000000..87596c7c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetArtsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetArts; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetArtsRequestBuilder { + + private GetArtsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetArtsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetArtsRequestBuilder request(GetArtsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetArtsResponse call() throws Exception { + + RequestOperation operation + = new GetArts.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetArtsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetArtsResponse.java new file mode 100644 index 00000000..fef1401a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetArtsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +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.Optional; + + +public class GetArtsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithArtwork; + + @JsonCreator + public GetArtsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithArtwork) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + } + + public GetArtsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithArtwork() { + return (Optional) mediaContainerWithArtwork; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetArtsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetArtsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetArtsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetArtsResponse withMediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + + /** + * OK + */ + public GetArtsResponse withMediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetArtsResponse other = (GetArtsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithArtwork, other.mediaContainerWithArtwork); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + @Override + public String toString() { + return Utils.toString(GetArtsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithArtwork", mediaContainerWithArtwork); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithArtwork = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + public GetArtsResponse build() { + + return new GetArtsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusRequest.java new file mode 100644 index 00000000..4c691e0d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusRequest.java @@ -0,0 +1,843 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetAugmentationStatusRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the augmentation + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=augmentationId") + private String augmentationId; + + /** + * Wait for augmentation completion before returning + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=wait") + private Optional wait_; + + @JsonCreator + public GetAugmentationStatusRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String augmentationId, + Optional wait_) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(augmentationId, "augmentationId"); + Utils.checkNotNull(wait_, "wait_"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.augmentationId = augmentationId; + this.wait_ = wait_; + } + + public GetAugmentationStatusRequest( + String augmentationId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), augmentationId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the augmentation + */ + @JsonIgnore + public String augmentationId() { + return augmentationId; + } + + /** + * Wait for augmentation completion before returning + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional wait_() { + return (Optional) wait_; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAugmentationStatusRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAugmentationStatusRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetAugmentationStatusRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetAugmentationStatusRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetAugmentationStatusRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetAugmentationStatusRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetAugmentationStatusRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetAugmentationStatusRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetAugmentationStatusRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetAugmentationStatusRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetAugmentationStatusRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetAugmentationStatusRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetAugmentationStatusRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetAugmentationStatusRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetAugmentationStatusRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetAugmentationStatusRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetAugmentationStatusRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetAugmentationStatusRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetAugmentationStatusRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetAugmentationStatusRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetAugmentationStatusRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetAugmentationStatusRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the augmentation + */ + public GetAugmentationStatusRequest withAugmentationId(String augmentationId) { + Utils.checkNotNull(augmentationId, "augmentationId"); + this.augmentationId = augmentationId; + return this; + } + + /** + * Wait for augmentation completion before returning + */ + public GetAugmentationStatusRequest withWait(BoolInt wait_) { + Utils.checkNotNull(wait_, "wait_"); + this.wait_ = Optional.ofNullable(wait_); + return this; + } + + + /** + * Wait for augmentation completion before returning + */ + public GetAugmentationStatusRequest withWait(Optional wait_) { + Utils.checkNotNull(wait_, "wait_"); + this.wait_ = wait_; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAugmentationStatusRequest other = (GetAugmentationStatusRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.augmentationId, other.augmentationId) && + Utils.enhancedDeepEquals(this.wait_, other.wait_); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, augmentationId, + wait_); + } + + @Override + public String toString() { + return Utils.toString(GetAugmentationStatusRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "augmentationId", augmentationId, + "wait_", wait_); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String augmentationId; + + private Optional wait_ = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the augmentation + */ + public Builder augmentationId(String augmentationId) { + Utils.checkNotNull(augmentationId, "augmentationId"); + this.augmentationId = augmentationId; + return this; + } + + + /** + * Wait for augmentation completion before returning + */ + public Builder wait_(BoolInt wait_) { + Utils.checkNotNull(wait_, "wait_"); + this.wait_ = Optional.ofNullable(wait_); + return this; + } + + /** + * Wait for augmentation completion before returning + */ + public Builder wait_(Optional wait_) { + Utils.checkNotNull(wait_, "wait_"); + this.wait_ = wait_; + return this; + } + + public GetAugmentationStatusRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetAugmentationStatusRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, augmentationId, + wait_); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusRequestBuilder.java new file mode 100644 index 00000000..8bcf2798 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAugmentationStatus; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetAugmentationStatusRequestBuilder { + + private GetAugmentationStatusRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAugmentationStatusRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAugmentationStatusRequestBuilder request(GetAugmentationStatusRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAugmentationStatusResponse call() throws Exception { + + RequestOperation operation + = new GetAugmentationStatus.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusResponse.java new file mode 100644 index 00000000..4c1561a0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAugmentationStatusResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetAugmentationStatusResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetAugmentationStatusResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAugmentationStatusResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAugmentationStatusResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAugmentationStatusResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAugmentationStatusResponse other = (GetAugmentationStatusResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetAugmentationStatusResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetAugmentationStatusResponse build() { + + return new GetAugmentationStatusResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsMediaContainer.java deleted file mode 100644 index 23481786..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetAvailableClientsMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Server") - private Optional> server; - - @JsonCreator - public GetAvailableClientsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Server") Optional> server) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(server, "server"); - this.size = size; - this.server = server; - } - - public GetAvailableClientsMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> server() { - return (Optional>) server; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAvailableClientsMediaContainer withSize(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetAvailableClientsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetAvailableClientsMediaContainer withServer(List server) { - Utils.checkNotNull(server, "server"); - this.server = Optional.ofNullable(server); - return this; - } - - - public GetAvailableClientsMediaContainer withServer(Optional> server) { - Utils.checkNotNull(server, "server"); - this.server = server; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAvailableClientsMediaContainer other = (GetAvailableClientsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.server, other.server); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, server); - } - - @Override - public String toString() { - return Utils.toString(GetAvailableClientsMediaContainer.class, - "size", size, - "server", server); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> server = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 server(List server) { - Utils.checkNotNull(server, "server"); - this.server = Optional.ofNullable(server); - return this; - } - - public Builder server(Optional> server) { - Utils.checkNotNull(server, "server"); - this.server = server; - return this; - } - - public GetAvailableClientsMediaContainer build() { - - return new GetAvailableClientsMediaContainer( - size, server); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsRequestBuilder.java deleted file mode 100644 index 5c2c63fe..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetAvailableClients; -import java.lang.Exception; - -public class GetAvailableClientsRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetAvailableClientsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetAvailableClientsResponse call() throws Exception { - - RequestlessOperation operation - = new GetAvailableClients.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsResponse.java deleted file mode 100644 index 901df555..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetAvailableClientsResponse 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; - - /** - * Available Clients - */ - private Optional object; - - @JsonCreator - public GetAvailableClientsResponse( - 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 GetAvailableClientsResponse( - 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; - } - - /** - * Available Clients - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetAvailableClientsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetAvailableClientsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAvailableClientsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Available Clients - */ - public GetAvailableClientsResponse withObject(GetAvailableClientsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Available Clients - */ - public GetAvailableClientsResponse 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; - } - GetAvailableClientsResponse other = (GetAvailableClientsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetAvailableClientsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Available Clients - */ - public Builder object(GetAvailableClientsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Available Clients - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetAvailableClientsResponse build() { - - return new GetAvailableClientsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsResponseBody.java deleted file mode 100644 index ec7396ad..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableClientsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetAvailableClientsResponseBody - * - *

Available Clients - */ -public class GetAvailableClientsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetAvailableClientsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetAvailableClientsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetAvailableClientsResponseBody withMediaContainer(GetAvailableClientsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetAvailableClientsResponseBody 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; - } - GetAvailableClientsResponseBody other = (GetAvailableClientsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetAvailableClientsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetAvailableClientsMediaContainer 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 GetAvailableClientsResponseBody build() { - - return new GetAvailableClientsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersMediaContainer.java new file mode 100644 index 00000000..ca9c2901 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetAvailableGrabbersMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetAvailableGrabbersMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaGrabber") + private Optional> mediaGrabber; + + @JsonCreator + public GetAvailableGrabbersMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("MediaGrabber") Optional> mediaGrabber) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(mediaGrabber, "mediaGrabber"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.mediaGrabber = mediaGrabber; + } + + public GetAvailableGrabbersMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> mediaGrabber() { + return (Optional>) mediaGrabber; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetAvailableGrabbersMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetAvailableGrabbersMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetAvailableGrabbersMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetAvailableGrabbersMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetAvailableGrabbersMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetAvailableGrabbersMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetAvailableGrabbersMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetAvailableGrabbersMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetAvailableGrabbersMediaContainer withMediaGrabber(List mediaGrabber) { + Utils.checkNotNull(mediaGrabber, "mediaGrabber"); + this.mediaGrabber = Optional.ofNullable(mediaGrabber); + return this; + } + + + public GetAvailableGrabbersMediaContainer withMediaGrabber(Optional> mediaGrabber) { + Utils.checkNotNull(mediaGrabber, "mediaGrabber"); + this.mediaGrabber = mediaGrabber; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableGrabbersMediaContainer other = (GetAvailableGrabbersMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.mediaGrabber, other.mediaGrabber); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, mediaGrabber); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableGrabbersMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "mediaGrabber", mediaGrabber); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> mediaGrabber = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder mediaGrabber(List mediaGrabber) { + Utils.checkNotNull(mediaGrabber, "mediaGrabber"); + this.mediaGrabber = Optional.ofNullable(mediaGrabber); + return this; + } + + public Builder mediaGrabber(Optional> mediaGrabber) { + Utils.checkNotNull(mediaGrabber, "mediaGrabber"); + this.mediaGrabber = mediaGrabber; + return this; + } + + public GetAvailableGrabbersMediaContainer build() { + + return new GetAvailableGrabbersMediaContainer( + identifier, offset, size, + totalSize, mediaGrabber); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersRequest.java new file mode 100644 index 00000000..199b5075 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersRequest.java @@ -0,0 +1,797 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetAvailableGrabbersRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Only return grabbers providing this protocol. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=protocol") + private Optional protocol; + + @JsonCreator + public GetAvailableGrabbersRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional protocol) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(protocol, "protocol"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.protocol = protocol; + } + + public GetAvailableGrabbersRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Only return grabbers providing this protocol. + */ + @JsonIgnore + public Optional protocol() { + return protocol; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAvailableGrabbersRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAvailableGrabbersRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetAvailableGrabbersRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetAvailableGrabbersRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetAvailableGrabbersRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetAvailableGrabbersRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetAvailableGrabbersRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetAvailableGrabbersRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetAvailableGrabbersRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetAvailableGrabbersRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetAvailableGrabbersRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetAvailableGrabbersRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetAvailableGrabbersRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetAvailableGrabbersRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetAvailableGrabbersRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetAvailableGrabbersRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetAvailableGrabbersRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetAvailableGrabbersRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetAvailableGrabbersRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetAvailableGrabbersRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetAvailableGrabbersRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetAvailableGrabbersRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Only return grabbers providing this protocol. + */ + public GetAvailableGrabbersRequest withProtocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + + /** + * Only return grabbers providing this protocol. + */ + public GetAvailableGrabbersRequest withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableGrabbersRequest other = (GetAvailableGrabbersRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.protocol, other.protocol); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, protocol); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableGrabbersRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "protocol", protocol); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Only return grabbers providing this protocol. + */ + public Builder protocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + /** + * Only return grabbers providing this protocol. + */ + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + public GetAvailableGrabbersRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetAvailableGrabbersRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, protocol); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersRequestBuilder.java new file mode 100644 index 00000000..6807eb2d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAvailableGrabbers; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetAvailableGrabbersRequestBuilder { + + private GetAvailableGrabbersRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAvailableGrabbersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAvailableGrabbersRequestBuilder request(GetAvailableGrabbersRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAvailableGrabbersResponse call() throws Exception { + + RequestOperation operation + = new GetAvailableGrabbers.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersResponse.java new file mode 100644 index 00000000..e23702c4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetAvailableGrabbersResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetAvailableGrabbersResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetAvailableGrabbersResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAvailableGrabbersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAvailableGrabbersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAvailableGrabbersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAvailableGrabbersResponse withObject(GetAvailableGrabbersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetAvailableGrabbersResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetAvailableGrabbersResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableGrabbersResponse other = (GetAvailableGrabbersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableGrabbersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetAvailableGrabbersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetAvailableGrabbersResponse build() { + + return new GetAvailableGrabbersResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersResponseBody.java new file mode 100644 index 00000000..5f780986 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableGrabbersResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetAvailableGrabbersResponseBody + * + *

OK + */ +public class GetAvailableGrabbersResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetAvailableGrabbersResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetAvailableGrabbersResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetAvailableGrabbersResponseBody withMediaContainer(GetAvailableGrabbersMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetAvailableGrabbersResponseBody 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; + } + GetAvailableGrabbersResponseBody other = (GetAvailableGrabbersResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableGrabbersResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetAvailableGrabbersMediaContainer 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 GetAvailableGrabbersResponseBody build() { + + return new GetAvailableGrabbersResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsMediaContainer.java new file mode 100644 index 00000000..21a8df3a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Sort; +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.List; +import java.util.Optional; + +/** + * GetAvailableSortsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetAvailableSortsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonCreator + public GetAvailableSortsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Directory") Optional> directory) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(directory, "directory"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.directory = directory; + } + + public GetAvailableSortsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetAvailableSortsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetAvailableSortsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetAvailableSortsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetAvailableSortsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetAvailableSortsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetAvailableSortsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetAvailableSortsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetAvailableSortsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetAvailableSortsMediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public GetAvailableSortsMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableSortsMediaContainer other = (GetAvailableSortsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.directory, other.directory); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, directory); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableSortsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "directory", directory); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public GetAvailableSortsMediaContainer build() { + + return new GetAvailableSortsMediaContainer( + identifier, offset, size, + totalSize, directory); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsRequest.java new file mode 100644 index 00000000..81733cba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetAvailableSortsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public GetAvailableSortsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public GetAvailableSortsRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAvailableSortsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetAvailableSortsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetAvailableSortsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetAvailableSortsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetAvailableSortsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetAvailableSortsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetAvailableSortsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetAvailableSortsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetAvailableSortsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetAvailableSortsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetAvailableSortsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetAvailableSortsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetAvailableSortsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetAvailableSortsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetAvailableSortsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetAvailableSortsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetAvailableSortsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetAvailableSortsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetAvailableSortsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetAvailableSortsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetAvailableSortsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetAvailableSortsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetAvailableSortsRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableSortsRequest other = (GetAvailableSortsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableSortsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetAvailableSortsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetAvailableSortsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsRequestBuilder.java new file mode 100644 index 00000000..64571ebe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAvailableSorts; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetAvailableSortsRequestBuilder { + + private GetAvailableSortsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAvailableSortsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAvailableSortsRequestBuilder request(GetAvailableSortsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAvailableSortsResponse call() throws Exception { + + RequestOperation operation + = new GetAvailableSorts.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsResponse.java new file mode 100644 index 00000000..418bc4ee --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetAvailableSortsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetAvailableSortsResponse( + 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 GetAvailableSortsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAvailableSortsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAvailableSortsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAvailableSortsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAvailableSortsResponse withObject(GetAvailableSortsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetAvailableSortsResponse 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; + } + GetAvailableSortsResponse other = (GetAvailableSortsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableSortsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetAvailableSortsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetAvailableSortsResponse build() { + + return new GetAvailableSortsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsResponseBody.java new file mode 100644 index 00000000..d2fc436d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAvailableSortsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetAvailableSortsResponseBody + * + *

OK + */ +public class GetAvailableSortsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetAvailableSortsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetAvailableSortsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetAvailableSortsResponseBody withMediaContainer(GetAvailableSortsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetAvailableSortsResponseBody 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; + } + GetAvailableSortsResponseBody other = (GetAvailableSortsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableSortsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetAvailableSortsMediaContainer 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 GetAvailableSortsResponseBody build() { + + return new GetAvailableSortsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksMediaContainer.java new file mode 100644 index 00000000..42b1d796 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetBackgroundTasksMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetBackgroundTasksMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("TranscodeJob") + private Optional> transcodeJob; + + @JsonCreator + public GetBackgroundTasksMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("TranscodeJob") Optional> transcodeJob) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(transcodeJob, "transcodeJob"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.transcodeJob = transcodeJob; + } + + public GetBackgroundTasksMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> transcodeJob() { + return (Optional>) transcodeJob; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetBackgroundTasksMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetBackgroundTasksMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetBackgroundTasksMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetBackgroundTasksMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetBackgroundTasksMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetBackgroundTasksMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetBackgroundTasksMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetBackgroundTasksMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetBackgroundTasksMediaContainer withTranscodeJob(List transcodeJob) { + Utils.checkNotNull(transcodeJob, "transcodeJob"); + this.transcodeJob = Optional.ofNullable(transcodeJob); + return this; + } + + + public GetBackgroundTasksMediaContainer withTranscodeJob(Optional> transcodeJob) { + Utils.checkNotNull(transcodeJob, "transcodeJob"); + this.transcodeJob = transcodeJob; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetBackgroundTasksMediaContainer other = (GetBackgroundTasksMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.transcodeJob, other.transcodeJob); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, transcodeJob); + } + + @Override + public String toString() { + return Utils.toString(GetBackgroundTasksMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "transcodeJob", transcodeJob); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> transcodeJob = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder transcodeJob(List transcodeJob) { + Utils.checkNotNull(transcodeJob, "transcodeJob"); + this.transcodeJob = Optional.ofNullable(transcodeJob); + return this; + } + + public Builder transcodeJob(Optional> transcodeJob) { + Utils.checkNotNull(transcodeJob, "transcodeJob"); + this.transcodeJob = transcodeJob; + return this; + } + + public GetBackgroundTasksMediaContainer build() { + + return new GetBackgroundTasksMediaContainer( + identifier, offset, size, + totalSize, transcodeJob); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksRequestBuilder.java new file mode 100644 index 00000000..1cb72b47 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetBackgroundTasks; +import java.lang.Exception; + +public class GetBackgroundTasksRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetBackgroundTasksRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetBackgroundTasksResponse call() throws Exception { + + RequestlessOperation operation + = new GetBackgroundTasks.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksResponse.java new file mode 100644 index 00000000..264347b8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetBackgroundTasksResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetBackgroundTasksResponse( + 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 GetBackgroundTasksResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetBackgroundTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetBackgroundTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetBackgroundTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetBackgroundTasksResponse withObject(GetBackgroundTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetBackgroundTasksResponse 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; + } + GetBackgroundTasksResponse other = (GetBackgroundTasksResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetBackgroundTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetBackgroundTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetBackgroundTasksResponse build() { + + return new GetBackgroundTasksResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksResponseBody.java new file mode 100644 index 00000000..c8890c63 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetBackgroundTasksResponseBody + * + *

OK + */ +public class GetBackgroundTasksResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetBackgroundTasksResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetBackgroundTasksResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetBackgroundTasksResponseBody withMediaContainer(GetBackgroundTasksMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetBackgroundTasksResponseBody 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; + } + GetBackgroundTasksResponseBody other = (GetBackgroundTasksResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetBackgroundTasksResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetBackgroundTasksMediaContainer 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 GetBackgroundTasksResponseBody build() { + + return new GetBackgroundTasksResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksType.java new file mode 100644 index 00000000..ed5d71f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetBackgroundTasksType.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum GetBackgroundTasksType { + TRANSCODE("transcode"); + + @JsonValue + private final String value; + + GetBackgroundTasksType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (GetBackgroundTasksType o: GetBackgroundTasksType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsAccount.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsAccount.java deleted file mode 100644 index 8e28aee5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsAccount.java +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetBandwidthStatisticsAccount { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("name") - private Optional name; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("defaultAudioLanguage") - private Optional defaultAudioLanguage; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("autoSelectAudio") - private Optional autoSelectAudio; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("defaultSubtitleLanguage") - private Optional defaultSubtitleLanguage; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtitleMode") - private Optional subtitleMode; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetBandwidthStatisticsAccount( - @JsonProperty("id") Optional id, - @JsonProperty("key") Optional key, - @JsonProperty("name") Optional name, - @JsonProperty("defaultAudioLanguage") Optional defaultAudioLanguage, - @JsonProperty("autoSelectAudio") Optional autoSelectAudio, - @JsonProperty("defaultSubtitleLanguage") Optional defaultSubtitleLanguage, - @JsonProperty("subtitleMode") Optional subtitleMode, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - Utils.checkNotNull(subtitleMode, "subtitleMode"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.key = key; - this.name = name; - this.defaultAudioLanguage = defaultAudioLanguage; - this.autoSelectAudio = autoSelectAudio; - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - this.subtitleMode = subtitleMode; - this.thumb = thumb; - } - - public GetBandwidthStatisticsAccount() { - this(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 name() { - return name; - } - - @JsonIgnore - public Optional defaultAudioLanguage() { - return defaultAudioLanguage; - } - - @JsonIgnore - public Optional autoSelectAudio() { - return autoSelectAudio; - } - - @JsonIgnore - public Optional defaultSubtitleLanguage() { - return defaultSubtitleLanguage; - } - - @JsonIgnore - public Optional subtitleMode() { - return subtitleMode; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBandwidthStatisticsAccount withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetBandwidthStatisticsAccount withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetBandwidthStatisticsAccount withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetBandwidthStatisticsAccount withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetBandwidthStatisticsAccount withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - - public GetBandwidthStatisticsAccount withName(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public GetBandwidthStatisticsAccount withDefaultAudioLanguage(String defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage); - return this; - } - - - public GetBandwidthStatisticsAccount withDefaultAudioLanguage(Optional defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = defaultAudioLanguage; - return this; - } - - public GetBandwidthStatisticsAccount withAutoSelectAudio(boolean autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = Optional.ofNullable(autoSelectAudio); - return this; - } - - - public GetBandwidthStatisticsAccount withAutoSelectAudio(Optional autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = autoSelectAudio; - return this; - } - - public GetBandwidthStatisticsAccount withDefaultSubtitleLanguage(String defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage); - return this; - } - - - public GetBandwidthStatisticsAccount withDefaultSubtitleLanguage(Optional defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - return this; - } - - public GetBandwidthStatisticsAccount withSubtitleMode(int subtitleMode) { - Utils.checkNotNull(subtitleMode, "subtitleMode"); - this.subtitleMode = Optional.ofNullable(subtitleMode); - return this; - } - - - public GetBandwidthStatisticsAccount withSubtitleMode(Optional subtitleMode) { - Utils.checkNotNull(subtitleMode, "subtitleMode"); - this.subtitleMode = subtitleMode; - return this; - } - - public GetBandwidthStatisticsAccount withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetBandwidthStatisticsAccount withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBandwidthStatisticsAccount other = (GetBandwidthStatisticsAccount) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.defaultAudioLanguage, other.defaultAudioLanguage) && - Utils.enhancedDeepEquals(this.autoSelectAudio, other.autoSelectAudio) && - Utils.enhancedDeepEquals(this.defaultSubtitleLanguage, other.defaultSubtitleLanguage) && - Utils.enhancedDeepEquals(this.subtitleMode, other.subtitleMode) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, key, name, - defaultAudioLanguage, autoSelectAudio, defaultSubtitleLanguage, - subtitleMode, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsAccount.class, - "id", id, - "key", key, - "name", name, - "defaultAudioLanguage", defaultAudioLanguage, - "autoSelectAudio", autoSelectAudio, - "defaultSubtitleLanguage", defaultSubtitleLanguage, - "subtitleMode", subtitleMode, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional defaultAudioLanguage = Optional.empty(); - - private Optional autoSelectAudio = Optional.empty(); - - private Optional defaultSubtitleLanguage = Optional.empty(); - - private Optional subtitleMode = Optional.empty(); - - private Optional thumb = 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 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 name(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - public Builder name(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder defaultAudioLanguage(String defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage); - return this; - } - - public Builder defaultAudioLanguage(Optional defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = defaultAudioLanguage; - return this; - } - - - public Builder autoSelectAudio(boolean autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = Optional.ofNullable(autoSelectAudio); - return this; - } - - public Builder autoSelectAudio(Optional autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = autoSelectAudio; - return this; - } - - - public Builder defaultSubtitleLanguage(String defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage); - return this; - } - - public Builder defaultSubtitleLanguage(Optional defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - return this; - } - - - public Builder subtitleMode(int subtitleMode) { - Utils.checkNotNull(subtitleMode, "subtitleMode"); - this.subtitleMode = Optional.ofNullable(subtitleMode); - return this; - } - - public Builder subtitleMode(Optional subtitleMode) { - Utils.checkNotNull(subtitleMode, "subtitleMode"); - this.subtitleMode = subtitleMode; - 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 GetBandwidthStatisticsAccount build() { - - return new GetBandwidthStatisticsAccount( - id, key, name, - defaultAudioLanguage, autoSelectAudio, defaultSubtitleLanguage, - subtitleMode, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsDevice.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsDevice.java deleted file mode 100644 index c49d4e2c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsDevice.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetBandwidthStatisticsDevice { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("name") - private Optional name; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("platform") - private Optional platform; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("clientIdentifier") - private Optional clientIdentifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAt") - private Optional createdAt; - - @JsonCreator - public GetBandwidthStatisticsDevice( - @JsonProperty("id") Optional id, - @JsonProperty("name") Optional name, - @JsonProperty("platform") Optional platform, - @JsonProperty("clientIdentifier") Optional clientIdentifier, - @JsonProperty("createdAt") Optional createdAt) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(platform, "platform"); - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - Utils.checkNotNull(createdAt, "createdAt"); - this.id = id; - this.name = name; - this.platform = platform; - this.clientIdentifier = clientIdentifier; - this.createdAt = createdAt; - } - - public GetBandwidthStatisticsDevice() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional name() { - return name; - } - - @JsonIgnore - public Optional platform() { - return platform; - } - - @JsonIgnore - public Optional clientIdentifier() { - return clientIdentifier; - } - - @JsonIgnore - public Optional createdAt() { - return createdAt; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBandwidthStatisticsDevice withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetBandwidthStatisticsDevice withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetBandwidthStatisticsDevice withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - - public GetBandwidthStatisticsDevice withName(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public GetBandwidthStatisticsDevice withPlatform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - - public GetBandwidthStatisticsDevice withPlatform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - public GetBandwidthStatisticsDevice withClientIdentifier(String clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = Optional.ofNullable(clientIdentifier); - return this; - } - - - public GetBandwidthStatisticsDevice withClientIdentifier(Optional clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = clientIdentifier; - return this; - } - - public GetBandwidthStatisticsDevice withCreatedAt(int createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - - public GetBandwidthStatisticsDevice withCreatedAt(Optional createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBandwidthStatisticsDevice other = (GetBandwidthStatisticsDevice) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.platform, other.platform) && - Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, name, platform, - clientIdentifier, createdAt); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsDevice.class, - "id", id, - "name", name, - "platform", platform, - "clientIdentifier", clientIdentifier, - "createdAt", createdAt); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional platform = Optional.empty(); - - private Optional clientIdentifier = Optional.empty(); - - private Optional createdAt = 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 name(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - public Builder name(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder platform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - public Builder platform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - - public Builder clientIdentifier(String clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = Optional.ofNullable(clientIdentifier); - return this; - } - - public Builder clientIdentifier(Optional clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = clientIdentifier; - return this; - } - - - public Builder createdAt(int createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - public Builder createdAt(Optional createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - public GetBandwidthStatisticsDevice build() { - - return new GetBandwidthStatisticsDevice( - id, name, platform, - clientIdentifier, createdAt); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsMediaContainer.java deleted file mode 100644 index 0e0a143f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsMediaContainer.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetBandwidthStatisticsMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Device") - private Optional> device; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Account") - private Optional> account; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("StatisticsBandwidth") - private Optional> statisticsBandwidth; - - @JsonCreator - public GetBandwidthStatisticsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Device") Optional> device, - @JsonProperty("Account") Optional> account, - @JsonProperty("StatisticsBandwidth") Optional> statisticsBandwidth) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(device, "device"); - Utils.checkNotNull(account, "account"); - Utils.checkNotNull(statisticsBandwidth, "statisticsBandwidth"); - this.size = size; - this.device = device; - this.account = account; - this.statisticsBandwidth = statisticsBandwidth; - } - - public GetBandwidthStatisticsMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> device() { - return (Optional>) device; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> account() { - return (Optional>) account; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> statisticsBandwidth() { - return (Optional>) statisticsBandwidth; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBandwidthStatisticsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetBandwidthStatisticsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetBandwidthStatisticsMediaContainer withDevice(List device) { - Utils.checkNotNull(device, "device"); - this.device = Optional.ofNullable(device); - return this; - } - - - public GetBandwidthStatisticsMediaContainer withDevice(Optional> device) { - Utils.checkNotNull(device, "device"); - this.device = device; - return this; - } - - public GetBandwidthStatisticsMediaContainer withAccount(List account) { - Utils.checkNotNull(account, "account"); - this.account = Optional.ofNullable(account); - return this; - } - - - public GetBandwidthStatisticsMediaContainer withAccount(Optional> account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - public GetBandwidthStatisticsMediaContainer withStatisticsBandwidth(List statisticsBandwidth) { - Utils.checkNotNull(statisticsBandwidth, "statisticsBandwidth"); - this.statisticsBandwidth = Optional.ofNullable(statisticsBandwidth); - return this; - } - - - public GetBandwidthStatisticsMediaContainer withStatisticsBandwidth(Optional> statisticsBandwidth) { - Utils.checkNotNull(statisticsBandwidth, "statisticsBandwidth"); - this.statisticsBandwidth = statisticsBandwidth; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBandwidthStatisticsMediaContainer other = (GetBandwidthStatisticsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.device, other.device) && - Utils.enhancedDeepEquals(this.account, other.account) && - Utils.enhancedDeepEquals(this.statisticsBandwidth, other.statisticsBandwidth); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, device, account, - statisticsBandwidth); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsMediaContainer.class, - "size", size, - "device", device, - "account", account, - "statisticsBandwidth", statisticsBandwidth); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> device = Optional.empty(); - - private Optional> account = Optional.empty(); - - private Optional> statisticsBandwidth = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 device(List device) { - Utils.checkNotNull(device, "device"); - this.device = Optional.ofNullable(device); - return this; - } - - public Builder device(Optional> device) { - Utils.checkNotNull(device, "device"); - this.device = device; - return this; - } - - - public Builder account(List account) { - Utils.checkNotNull(account, "account"); - this.account = Optional.ofNullable(account); - return this; - } - - public Builder account(Optional> account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - - public Builder statisticsBandwidth(List statisticsBandwidth) { - Utils.checkNotNull(statisticsBandwidth, "statisticsBandwidth"); - this.statisticsBandwidth = Optional.ofNullable(statisticsBandwidth); - return this; - } - - public Builder statisticsBandwidth(Optional> statisticsBandwidth) { - Utils.checkNotNull(statisticsBandwidth, "statisticsBandwidth"); - this.statisticsBandwidth = statisticsBandwidth; - return this; - } - - public GetBandwidthStatisticsMediaContainer build() { - - return new GetBandwidthStatisticsMediaContainer( - size, device, account, - statisticsBandwidth); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsRequest.java deleted file mode 100644 index 6bcb7d13..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsRequest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetBandwidthStatisticsRequest { - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timespan") - private Optional timespan; - - @JsonCreator - public GetBandwidthStatisticsRequest( - Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - } - - public GetBandwidthStatisticsRequest() { - this(Optional.empty()); - } - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - @JsonIgnore - public Optional timespan() { - return timespan; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public GetBandwidthStatisticsRequest withTimespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public GetBandwidthStatisticsRequest withTimespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBandwidthStatisticsRequest other = (GetBandwidthStatisticsRequest) o; - return - Utils.enhancedDeepEquals(this.timespan, other.timespan); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - timespan); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsRequest.class, - "timespan", timespan); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional timespan = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public Builder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public Builder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - public GetBandwidthStatisticsRequest build() { - - return new GetBandwidthStatisticsRequest( - timespan); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsRequestBuilder.java deleted file mode 100644 index 54c95f00..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsRequestBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetBandwidthStatistics; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.util.Optional; - -public class GetBandwidthStatisticsRequestBuilder { - - private Optional timespan = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetBandwidthStatisticsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetBandwidthStatisticsRequestBuilder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.of(timespan); - return this; - } - - public GetBandwidthStatisticsRequestBuilder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - - private GetBandwidthStatisticsRequest buildRequest() { - - GetBandwidthStatisticsRequest request = new GetBandwidthStatisticsRequest(timespan); - - return request; - } - - public GetBandwidthStatisticsResponse call() throws Exception { - - RequestOperation operation - = new GetBandwidthStatistics.Sync(sdkConfiguration); - GetBandwidthStatisticsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsResponse.java deleted file mode 100644 index 23d85e36..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetBandwidthStatisticsResponse 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; - - /** - * Bandwidth Statistics - */ - private Optional object; - - @JsonCreator - public GetBandwidthStatisticsResponse( - 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 GetBandwidthStatisticsResponse( - 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; - } - - /** - * Bandwidth Statistics - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetBandwidthStatisticsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetBandwidthStatisticsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBandwidthStatisticsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Bandwidth Statistics - */ - public GetBandwidthStatisticsResponse withObject(GetBandwidthStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Bandwidth Statistics - */ - public GetBandwidthStatisticsResponse 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; - } - GetBandwidthStatisticsResponse other = (GetBandwidthStatisticsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Bandwidth Statistics - */ - public Builder object(GetBandwidthStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Bandwidth Statistics - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetBandwidthStatisticsResponse build() { - - return new GetBandwidthStatisticsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsResponseBody.java deleted file mode 100644 index d8948201..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetBandwidthStatisticsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetBandwidthStatisticsResponseBody - * - *

Bandwidth Statistics - */ -public class GetBandwidthStatisticsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetBandwidthStatisticsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetBandwidthStatisticsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetBandwidthStatisticsResponseBody withMediaContainer(GetBandwidthStatisticsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetBandwidthStatisticsResponseBody 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; - } - GetBandwidthStatisticsResponseBody other = (GetBandwidthStatisticsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetBandwidthStatisticsMediaContainer 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 GetBandwidthStatisticsResponseBody build() { - - return new GetBandwidthStatisticsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageRequest.java deleted file mode 100644 index 744ca4b4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageRequest.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; - - -public class GetBannerImageRequest { - /** - * the id of the library item to return the children of. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") - private long ratingKey; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=width") - private long width; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=height") - private long height; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize") - private long minSize; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale") - private long upscale; - - /** - * An authentication token, obtained from plex.tv - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Token") - private String xPlexToken; - - @JsonCreator - public GetBannerImageRequest( - long ratingKey, - long width, - long height, - long minSize, - long upscale, - String xPlexToken) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(width, "width"); - Utils.checkNotNull(height, "height"); - Utils.checkNotNull(minSize, "minSize"); - Utils.checkNotNull(upscale, "upscale"); - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.ratingKey = ratingKey; - this.width = width; - this.height = height; - this.minSize = minSize; - this.upscale = upscale; - this.xPlexToken = xPlexToken; - } - - /** - * the id of the library item to return the children of. - */ - @JsonIgnore - public long ratingKey() { - return ratingKey; - } - - @JsonIgnore - public long width() { - return width; - } - - @JsonIgnore - public long height() { - return height; - } - - @JsonIgnore - public long minSize() { - return minSize; - } - - @JsonIgnore - public long upscale() { - return upscale; - } - - /** - * An authentication token, obtained from plex.tv - */ - @JsonIgnore - public String xPlexToken() { - return xPlexToken; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the id of the library item to return the children of. - */ - public GetBannerImageRequest withRatingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetBannerImageRequest withWidth(long width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - public GetBannerImageRequest withHeight(long height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - public GetBannerImageRequest withMinSize(long minSize) { - Utils.checkNotNull(minSize, "minSize"); - this.minSize = minSize; - return this; - } - - public GetBannerImageRequest withUpscale(long upscale) { - Utils.checkNotNull(upscale, "upscale"); - this.upscale = upscale; - return this; - } - - /** - * An authentication token, obtained from plex.tv - */ - public GetBannerImageRequest withXPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBannerImageRequest other = (GetBannerImageRequest) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.minSize, other.minSize) && - Utils.enhancedDeepEquals(this.upscale, other.upscale) && - Utils.enhancedDeepEquals(this.xPlexToken, other.xPlexToken); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, width, height, - minSize, upscale, xPlexToken); - } - - @Override - public String toString() { - return Utils.toString(GetBannerImageRequest.class, - "ratingKey", ratingKey, - "width", width, - "height", height, - "minSize", minSize, - "upscale", upscale, - "xPlexToken", xPlexToken); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long ratingKey; - - private Long width; - - private Long height; - - private Long minSize; - - private Long upscale; - - private String xPlexToken; - - private Builder() { - // force use of static builder() method - } - - - /** - * the id of the library item to return the children of. - */ - public Builder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - public Builder width(long width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - public Builder height(long height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - public Builder minSize(long minSize) { - Utils.checkNotNull(minSize, "minSize"); - this.minSize = minSize; - return this; - } - - - public Builder upscale(long upscale) { - Utils.checkNotNull(upscale, "upscale"); - this.upscale = upscale; - return this; - } - - - /** - * An authentication token, obtained from plex.tv - */ - public Builder xPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - public GetBannerImageRequest build() { - - return new GetBannerImageRequest( - ratingKey, width, height, - minSize, upscale, xPlexToken); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageRequestBuilder.java deleted file mode 100644 index 708dccf1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageRequestBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetBannerImage; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; - -public class GetBannerImageRequestBuilder { - - private GetBannerImageRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetBannerImageRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetBannerImageRequestBuilder request(GetBannerImageRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetBannerImageResponse call() throws Exception { - - RequestOperation operation - = new GetBannerImage.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageResponse.java deleted file mode 100644 index c515b8ae..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetBannerImageResponse.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.List; -import java.util.Map; -import java.util.Optional; - - -public class GetBannerImageResponse 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; - - /** - * Successful response returning an image - */ - private Optional responseStream; - - - private Map> headers; - - @JsonCreator - public GetBannerImageResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional responseStream, - Map> headers) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(responseStream, "responseStream"); - headers = Utils.emptyMapIfNull(headers); - Utils.checkNotNull(headers, "headers"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.responseStream = responseStream; - this.headers = headers; - } - - public GetBannerImageResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Map> headers) { - this(contentType, statusCode, rawResponse, - Optional.empty(), headers); - } - - /** - * 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; - } - - /** - * Successful response returning an image - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional responseStream() { - return (Optional) responseStream; - } - - @JsonIgnore - public Map> headers() { - return headers; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetBannerImageResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetBannerImageResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBannerImageResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response returning an image - */ - public GetBannerImageResponse withResponseStream(InputStream responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = Optional.ofNullable(responseStream); - return this; - } - - - /** - * Successful response returning an image - */ - public GetBannerImageResponse withResponseStream(Optional responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = responseStream; - return this; - } - - public GetBannerImageResponse withHeaders(Map> headers) { - Utils.checkNotNull(headers, "headers"); - this.headers = headers; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBannerImageResponse other = (GetBannerImageResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.responseStream, other.responseStream) && - Utils.enhancedDeepEquals(this.headers, other.headers); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - responseStream, headers); - } - - @Override - public String toString() { - return Utils.toString(GetBannerImageResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "responseStream", responseStream, - "headers", headers); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional responseStream = Optional.empty(); - - private Map> headers; - - 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; - } - - - /** - * Successful response returning an image - */ - public Builder responseStream(InputStream responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = Optional.ofNullable(responseStream); - return this; - } - - /** - * Successful response returning an image - */ - public Builder responseStream(Optional responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = responseStream; - return this; - } - - - public Builder headers(Map> headers) { - Utils.checkNotNull(headers, "headers"); - this.headers = headers; - return this; - } - - public GetBannerImageResponse build() { - - return new GetBannerImageResponse( - contentType, statusCode, rawResponse, - responseStream, headers); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksRequestBuilder.java deleted file mode 100644 index a0de3955..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetButlerTasks; -import java.lang.Exception; - -public class GetButlerTasksRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetButlerTasksRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetButlerTasksResponse call() throws Exception { - - RequestlessOperation operation - = new GetButlerTasks.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksResponse.java deleted file mode 100644 index 6b8b5fdd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetButlerTasksResponse 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; - - /** - * All butler tasks - */ - private Optional object; - - @JsonCreator - public GetButlerTasksResponse( - 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 GetButlerTasksResponse( - 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; - } - - /** - * All butler tasks - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetButlerTasksResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetButlerTasksResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetButlerTasksResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * All butler tasks - */ - public GetButlerTasksResponse withObject(GetButlerTasksResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * All butler tasks - */ - public GetButlerTasksResponse 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; - } - GetButlerTasksResponse other = (GetButlerTasksResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetButlerTasksResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * All butler tasks - */ - public Builder object(GetButlerTasksResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * All butler tasks - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetButlerTasksResponse build() { - - return new GetButlerTasksResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksResponseBody.java deleted file mode 100644 index eb1e7e9c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetButlerTasksResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetButlerTasksResponseBody - * - *

All butler tasks - */ -public class GetButlerTasksResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ButlerTasks") - private Optional butlerTasks; - - @JsonCreator - public GetButlerTasksResponseBody( - @JsonProperty("ButlerTasks") Optional butlerTasks) { - Utils.checkNotNull(butlerTasks, "butlerTasks"); - this.butlerTasks = butlerTasks; - } - - public GetButlerTasksResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional butlerTasks() { - return (Optional) butlerTasks; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetButlerTasksResponseBody withButlerTasks(ButlerTasks butlerTasks) { - Utils.checkNotNull(butlerTasks, "butlerTasks"); - this.butlerTasks = Optional.ofNullable(butlerTasks); - return this; - } - - - public GetButlerTasksResponseBody withButlerTasks(Optional butlerTasks) { - Utils.checkNotNull(butlerTasks, "butlerTasks"); - this.butlerTasks = butlerTasks; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetButlerTasksResponseBody other = (GetButlerTasksResponseBody) o; - return - Utils.enhancedDeepEquals(this.butlerTasks, other.butlerTasks); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - butlerTasks); - } - - @Override - public String toString() { - return Utils.toString(GetButlerTasksResponseBody.class, - "butlerTasks", butlerTasks); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional butlerTasks = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder butlerTasks(ButlerTasks butlerTasks) { - Utils.checkNotNull(butlerTasks, "butlerTasks"); - this.butlerTasks = Optional.ofNullable(butlerTasks); - return this; - } - - public Builder butlerTasks(Optional butlerTasks) { - Utils.checkNotNull(butlerTasks, "butlerTasks"); - this.butlerTasks = butlerTasks; - return this; - } - - public GetButlerTasksResponseBody build() { - - return new GetButlerTasksResponseBody( - butlerTasks); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesRequest.java new file mode 100644 index 00000000..b7264f12 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetCategoriesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public GetCategoriesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public GetCategoriesRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCategoriesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCategoriesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetCategoriesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetCategoriesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetCategoriesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetCategoriesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetCategoriesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetCategoriesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetCategoriesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetCategoriesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetCategoriesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetCategoriesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetCategoriesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetCategoriesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetCategoriesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetCategoriesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetCategoriesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetCategoriesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetCategoriesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetCategoriesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetCategoriesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetCategoriesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetCategoriesRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCategoriesRequest other = (GetCategoriesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(GetCategoriesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetCategoriesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetCategoriesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesRequestBuilder.java new file mode 100644 index 00000000..f1d00276 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetCategories; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetCategoriesRequestBuilder { + + private GetCategoriesRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCategoriesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCategoriesRequestBuilder request(GetCategoriesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetCategoriesResponse call() throws Exception { + + RequestOperation operation + = new GetCategories.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesResponse.java new file mode 100644 index 00000000..3e5b07f5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCategoriesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +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.Optional; + + +public class GetCategoriesResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithArtwork; + + @JsonCreator + public GetCategoriesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithArtwork) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + } + + public GetCategoriesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithArtwork() { + return (Optional) mediaContainerWithArtwork; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCategoriesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCategoriesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCategoriesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCategoriesResponse withMediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + + /** + * OK + */ + public GetCategoriesResponse withMediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCategoriesResponse other = (GetCategoriesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithArtwork, other.mediaContainerWithArtwork); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + @Override + public String toString() { + return Utils.toString(GetCategoriesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithArtwork", mediaContainerWithArtwork); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithArtwork = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + public GetCategoriesResponse build() { + + return new GetCategoriesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsMediaContainer.java new file mode 100644 index 00000000..4b8e576c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Channel; +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.List; +import java.util.Optional; + +/** + * GetChannelsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetChannelsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Channel") + private Optional> channel; + + @JsonCreator + public GetChannelsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Channel") Optional> channel) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(channel, "channel"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.channel = channel; + } + + public GetChannelsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> channel() { + return (Optional>) channel; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetChannelsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetChannelsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetChannelsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetChannelsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetChannelsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetChannelsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetChannelsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetChannelsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetChannelsMediaContainer withChannel(List channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = Optional.ofNullable(channel); + return this; + } + + + public GetChannelsMediaContainer withChannel(Optional> channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChannelsMediaContainer other = (GetChannelsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.channel, other.channel); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, channel); + } + + @Override + public String toString() { + return Utils.toString(GetChannelsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "channel", channel); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> channel = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder channel(List channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = Optional.ofNullable(channel); + return this; + } + + public Builder channel(Optional> channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + + public GetChannelsMediaContainer build() { + + return new GetChannelsMediaContainer( + identifier, offset, size, + totalSize, channel); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsRequest.java new file mode 100644 index 00000000..cdfec2ab --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsRequest.java @@ -0,0 +1,779 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetChannelsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The URI describing the lineup + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=lineup") + private String lineup; + + @JsonCreator + public GetChannelsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String lineup) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(lineup, "lineup"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.lineup = lineup; + } + + public GetChannelsRequest( + String lineup) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), lineup); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The URI describing the lineup + */ + @JsonIgnore + public String lineup() { + return lineup; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetChannelsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetChannelsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetChannelsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetChannelsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetChannelsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetChannelsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetChannelsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetChannelsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetChannelsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetChannelsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetChannelsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetChannelsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetChannelsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetChannelsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetChannelsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetChannelsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetChannelsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetChannelsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetChannelsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetChannelsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetChannelsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetChannelsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The URI describing the lineup + */ + public GetChannelsRequest withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChannelsRequest other = (GetChannelsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.lineup, other.lineup); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, lineup); + } + + @Override + public String toString() { + return Utils.toString(GetChannelsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "lineup", lineup); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String lineup; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The URI describing the lineup + */ + public Builder lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public GetChannelsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetChannelsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, lineup); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsRequestBuilder.java new file mode 100644 index 00000000..cf6563ce --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetChannels; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetChannelsRequestBuilder { + + private GetChannelsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetChannelsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetChannelsRequestBuilder request(GetChannelsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetChannelsResponse call() throws Exception { + + RequestOperation operation + = new GetChannels.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsResponse.java new file mode 100644 index 00000000..f744b4c8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetChannelsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetChannelsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetChannelsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetChannelsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetChannelsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetChannelsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetChannelsResponse withObject(GetChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetChannelsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetChannelsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChannelsResponse other = (GetChannelsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetChannelsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetChannelsResponse build() { + + return new GetChannelsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsResponseBody.java new file mode 100644 index 00000000..b06db3d5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetChannelsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetChannelsResponseBody + * + *

OK + */ +public class GetChannelsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetChannelsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetChannelsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetChannelsResponseBody withMediaContainer(GetChannelsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetChannelsResponseBody 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; + } + GetChannelsResponseBody other = (GetChannelsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetChannelsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetChannelsMediaContainer 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 GetChannelsResponseBody build() { + + return new GetChannelsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageRequest.java new file mode 100644 index 00000000..b242e37b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetChapterImageRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the media item + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=mediaId") + private long mediaId; + + /** + * The index of the chapter + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=chapter") + private long chapter; + + @JsonCreator + public GetChapterImageRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long mediaId, + long chapter) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(mediaId, "mediaId"); + Utils.checkNotNull(chapter, "chapter"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.mediaId = mediaId; + this.chapter = chapter; + } + + public GetChapterImageRequest( + long mediaId, + long chapter) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), mediaId, + chapter); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the media item + */ + @JsonIgnore + public long mediaId() { + return mediaId; + } + + /** + * The index of the chapter + */ + @JsonIgnore + public long chapter() { + return chapter; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetChapterImageRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetChapterImageRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetChapterImageRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetChapterImageRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetChapterImageRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetChapterImageRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetChapterImageRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetChapterImageRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetChapterImageRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetChapterImageRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetChapterImageRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetChapterImageRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetChapterImageRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetChapterImageRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetChapterImageRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetChapterImageRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetChapterImageRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetChapterImageRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetChapterImageRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetChapterImageRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetChapterImageRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetChapterImageRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the media item + */ + public GetChapterImageRequest withMediaId(long mediaId) { + Utils.checkNotNull(mediaId, "mediaId"); + this.mediaId = mediaId; + return this; + } + + /** + * The index of the chapter + */ + public GetChapterImageRequest withChapter(long chapter) { + Utils.checkNotNull(chapter, "chapter"); + this.chapter = chapter; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChapterImageRequest other = (GetChapterImageRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.mediaId, other.mediaId) && + Utils.enhancedDeepEquals(this.chapter, other.chapter); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, mediaId, + chapter); + } + + @Override + public String toString() { + return Utils.toString(GetChapterImageRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "mediaId", mediaId, + "chapter", chapter); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long mediaId; + + private Long chapter; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the media item + */ + public Builder mediaId(long mediaId) { + Utils.checkNotNull(mediaId, "mediaId"); + this.mediaId = mediaId; + return this; + } + + + /** + * The index of the chapter + */ + public Builder chapter(long chapter) { + Utils.checkNotNull(chapter, "chapter"); + this.chapter = chapter; + return this; + } + + public GetChapterImageRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetChapterImageRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, mediaId, + chapter); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageRequestBuilder.java new file mode 100644 index 00000000..fd380ea7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetChapterImage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetChapterImageRequestBuilder { + + private GetChapterImageRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetChapterImageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetChapterImageRequestBuilder request(GetChapterImageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetChapterImageResponse call() throws Exception { + + RequestOperation operation + = new GetChapterImage.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageResponse.java new file mode 100644 index 00000000..a822c52a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetChapterImageResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetChapterImageResponse 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetChapterImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetChapterImageResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetChapterImageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetChapterImageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetChapterImageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetChapterImageResponse withResponseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetChapterImageResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChapterImageResponse other = (GetChapterImageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetChapterImageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetChapterImageResponse build() { + + return new GetChapterImageResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetClusterRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetClusterRequest.java new file mode 100644 index 00000000..dda0b4cd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetClusterRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetClusterRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public GetClusterRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public GetClusterRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetClusterRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetClusterRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetClusterRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetClusterRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetClusterRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetClusterRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetClusterRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetClusterRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetClusterRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetClusterRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetClusterRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetClusterRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetClusterRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetClusterRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetClusterRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetClusterRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetClusterRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetClusterRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetClusterRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetClusterRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetClusterRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetClusterRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetClusterRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetClusterRequest other = (GetClusterRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(GetClusterRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetClusterRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetClusterRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetClusterRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetClusterRequestBuilder.java new file mode 100644 index 00000000..60fb06a8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetClusterRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetCluster; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetClusterRequestBuilder { + + private GetClusterRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetClusterRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetClusterRequestBuilder request(GetClusterRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetClusterResponse call() throws Exception { + + RequestOperation operation + = new GetCluster.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetClusterResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetClusterResponse.java new file mode 100644 index 00000000..56c7dc4b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetClusterResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +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.Optional; + + +public class GetClusterResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithArtwork; + + @JsonCreator + public GetClusterResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithArtwork) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + } + + public GetClusterResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithArtwork() { + return (Optional) mediaContainerWithArtwork; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetClusterResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetClusterResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetClusterResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetClusterResponse withMediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + + /** + * OK + */ + public GetClusterResponse withMediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetClusterResponse other = (GetClusterResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithArtwork, other.mediaContainerWithArtwork); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + @Override + public String toString() { + return Utils.toString(GetClusterResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithArtwork", mediaContainerWithArtwork); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithArtwork = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + public GetClusterResponse build() { + + return new GetClusterResponse( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageRequest.java new file mode 100644 index 00000000..8f45513f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageRequest.java @@ -0,0 +1,868 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.Composite; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetCollectionImageRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The collection id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=collectionId") + private long collectionId; + + /** + * The update time of the image. Used for busting cache. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=updatedAt") + private long updatedAt; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=composite") + private Optional composite; + + @JsonCreator + public GetCollectionImageRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long collectionId, + long updatedAt, + Optional composite) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(collectionId, "collectionId"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(composite, "composite"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.collectionId = collectionId; + this.updatedAt = updatedAt; + this.composite = composite; + } + + public GetCollectionImageRequest( + long collectionId, + long updatedAt) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), collectionId, + updatedAt, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The collection id + */ + @JsonIgnore + public long collectionId() { + return collectionId; + } + + /** + * The update time of the image. Used for busting cache. + */ + @JsonIgnore + public long updatedAt() { + return updatedAt; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional composite() { + return (Optional) composite; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCollectionImageRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCollectionImageRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetCollectionImageRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetCollectionImageRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetCollectionImageRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetCollectionImageRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetCollectionImageRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetCollectionImageRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetCollectionImageRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetCollectionImageRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetCollectionImageRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetCollectionImageRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetCollectionImageRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetCollectionImageRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetCollectionImageRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetCollectionImageRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetCollectionImageRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetCollectionImageRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetCollectionImageRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetCollectionImageRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetCollectionImageRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetCollectionImageRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The collection id + */ + public GetCollectionImageRequest withCollectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + /** + * The update time of the image. Used for busting cache. + */ + public GetCollectionImageRequest withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetCollectionImageRequest withComposite(Composite composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + public GetCollectionImageRequest withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCollectionImageRequest other = (GetCollectionImageRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.collectionId, other.collectionId) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.composite, other.composite); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, collectionId, + updatedAt, composite); + } + + @Override + public String toString() { + return Utils.toString(GetCollectionImageRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "collectionId", collectionId, + "updatedAt", updatedAt, + "composite", composite); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long collectionId; + + private Long updatedAt; + + private Optional composite = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The collection id + */ + public Builder collectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + + /** + * The update time of the image. Used for busting cache. + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + public Builder composite(Composite composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public GetCollectionImageRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetCollectionImageRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, collectionId, + updatedAt, composite); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageRequestBuilder.java new file mode 100644 index 00000000..f64e4bf2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetCollectionImage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetCollectionImageRequestBuilder { + + private GetCollectionImageRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCollectionImageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCollectionImageRequestBuilder request(GetCollectionImageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetCollectionImageResponse call() throws Exception { + + RequestOperation operation + = new GetCollectionImage.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageResponse.java new file mode 100644 index 00000000..e1599dab --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionImageResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetCollectionImageResponse 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetCollectionImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetCollectionImageResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCollectionImageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCollectionImageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCollectionImageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCollectionImageResponse withResponseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetCollectionImageResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCollectionImageResponse other = (GetCollectionImageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetCollectionImageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetCollectionImageResponse build() { + + return new GetCollectionImageResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsRequest.java new file mode 100644 index 00000000..15eee8c8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetCollectionItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The collection id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=collectionId") + private long collectionId; + + @JsonCreator + public GetCollectionItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long collectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(collectionId, "collectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.collectionId = collectionId; + } + + public GetCollectionItemsRequest( + long collectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), collectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The collection id + */ + @JsonIgnore + public long collectionId() { + return collectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCollectionItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCollectionItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetCollectionItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetCollectionItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetCollectionItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetCollectionItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetCollectionItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetCollectionItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetCollectionItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetCollectionItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetCollectionItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetCollectionItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetCollectionItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetCollectionItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetCollectionItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetCollectionItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetCollectionItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetCollectionItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetCollectionItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetCollectionItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetCollectionItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetCollectionItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The collection id + */ + public GetCollectionItemsRequest withCollectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCollectionItemsRequest other = (GetCollectionItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.collectionId, other.collectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, collectionId); + } + + @Override + public String toString() { + return Utils.toString(GetCollectionItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "collectionId", collectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long collectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The collection id + */ + public Builder collectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + public GetCollectionItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetCollectionItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, collectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsRequestBuilder.java new file mode 100644 index 00000000..84274f42 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetCollectionItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetCollectionItemsRequestBuilder { + + private GetCollectionItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCollectionItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCollectionItemsRequestBuilder request(GetCollectionItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetCollectionItemsResponse call() throws Exception { + + RequestOperation operation + = new GetCollectionItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsResponse.java new file mode 100644 index 00000000..0ba3269b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class GetCollectionItemsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public GetCollectionItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public GetCollectionItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCollectionItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCollectionItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCollectionItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCollectionItemsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetCollectionItemsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCollectionItemsResponse other = (GetCollectionItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetCollectionItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetCollectionItemsResponse build() { + + return new GetCollectionItemsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsRequest.java new file mode 100644 index 00000000..8b115a7d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsRequest.java @@ -0,0 +1,844 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.MediaQuery; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetCollectionsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaQuery") + private Optional mediaQuery; + + @JsonCreator + public GetCollectionsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + Optional mediaQuery) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.mediaQuery = mediaQuery; + } + + public GetCollectionsRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaQuery() { + return (Optional) mediaQuery; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCollectionsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCollectionsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetCollectionsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetCollectionsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetCollectionsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetCollectionsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetCollectionsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetCollectionsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetCollectionsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetCollectionsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetCollectionsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetCollectionsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetCollectionsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetCollectionsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetCollectionsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetCollectionsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetCollectionsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetCollectionsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetCollectionsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetCollectionsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetCollectionsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetCollectionsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetCollectionsRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public GetCollectionsRequest withMediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public GetCollectionsRequest withMediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCollectionsRequest other = (GetCollectionsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.mediaQuery, other.mediaQuery); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + mediaQuery); + } + + @Override + public String toString() { + return Utils.toString(GetCollectionsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "mediaQuery", mediaQuery); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Optional mediaQuery = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + public GetCollectionsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetCollectionsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + mediaQuery); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsRequestBuilder.java new file mode 100644 index 00000000..3d197d6b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetCollections; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetCollectionsRequestBuilder { + + private GetCollectionsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCollectionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCollectionsRequestBuilder request(GetCollectionsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetCollectionsResponse call() throws Exception { + + RequestOperation operation + = new GetCollections.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsResponse.java new file mode 100644 index 00000000..17b90017 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCollectionsResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetCollectionsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetCollectionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetCollectionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCollectionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCollectionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCollectionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCollectionsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetCollectionsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetCollectionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCollectionsResponse other = (GetCollectionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetCollectionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetCollectionsResponse build() { + + return new GetCollectionsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetColorsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetColorsMediaContainer.java new file mode 100644 index 00000000..8c0cbdef --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetColorsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetColorsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetColorsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("UltraBlurColors") + private Optional> ultraBlurColors; + + @JsonCreator + public GetColorsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("UltraBlurColors") Optional> ultraBlurColors) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.ultraBlurColors = ultraBlurColors; + } + + public GetColorsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> ultraBlurColors() { + return (Optional>) ultraBlurColors; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetColorsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetColorsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetColorsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetColorsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetColorsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetColorsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetColorsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetColorsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetColorsMediaContainer withUltraBlurColors(List ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); + return this; + } + + + public GetColorsMediaContainer withUltraBlurColors(Optional> ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = ultraBlurColors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetColorsMediaContainer other = (GetColorsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.ultraBlurColors, other.ultraBlurColors); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, ultraBlurColors); + } + + @Override + public String toString() { + return Utils.toString(GetColorsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "ultraBlurColors", ultraBlurColors); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> ultraBlurColors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder ultraBlurColors(List 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 GetColorsMediaContainer build() { + + return new GetColorsMediaContainer( + identifier, offset, size, + totalSize, ultraBlurColors); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetColorsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetColorsRequest.java new file mode 100644 index 00000000..18f988f0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetColorsRequest.java @@ -0,0 +1,797 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetColorsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Url for image which requires color extraction. Can be relative PMS library path or absolute url. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private Optional url; + + @JsonCreator + public GetColorsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional url) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(url, "url"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.url = url; + } + + public GetColorsRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Url for image which requires color extraction. Can be relative PMS library path or absolute url. + */ + @JsonIgnore + public Optional url() { + return url; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetColorsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetColorsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetColorsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetColorsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetColorsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetColorsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetColorsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetColorsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetColorsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetColorsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetColorsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetColorsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetColorsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetColorsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetColorsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetColorsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetColorsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetColorsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetColorsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetColorsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetColorsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetColorsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Url for image which requires color extraction. Can be relative PMS library path or absolute url. + */ + public GetColorsRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + + /** + * Url for image which requires color extraction. Can be relative PMS library path or absolute url. + */ + public GetColorsRequest withUrl(Optional 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; + } + GetColorsRequest other = (GetColorsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, url); + } + + @Override + public String toString() { + return Utils.toString(GetColorsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "url", url); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional url = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Url for image which requires color extraction. Can be relative PMS library path or absolute url. + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * Url for image which requires color extraction. Can be relative PMS library path or absolute url. + */ + public Builder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public GetColorsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetColorsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, url); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetColorsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetColorsRequestBuilder.java new file mode 100644 index 00000000..ae8ca6be --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetColorsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetColors; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetColorsRequestBuilder { + + private GetColorsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetColorsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetColorsRequestBuilder request(GetColorsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetColorsResponse call() throws Exception { + + RequestOperation operation + = new GetColors.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetColorsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetColorsResponse.java new file mode 100644 index 00000000..4468e063 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetColorsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetColorsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetColorsResponse( + 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 GetColorsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetColorsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetColorsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetColorsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetColorsResponse withObject(GetColorsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetColorsResponse 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; + } + GetColorsResponse other = (GetColorsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetColorsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetColorsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetColorsResponse build() { + + return new GetColorsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetColorsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetColorsResponseBody.java new file mode 100644 index 00000000..536bacfb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetColorsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetColorsResponseBody + * + *

OK + */ +public class GetColorsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetColorsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetColorsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetColorsResponseBody withMediaContainer(GetColorsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetColorsResponseBody 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; + } + GetColorsResponseBody other = (GetColorsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetColorsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetColorsMediaContainer 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 GetColorsResponseBody build() { + + return new GetColorsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCommonRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCommonRequest.java new file mode 100644 index 00000000..915728a0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCommonRequest.java @@ -0,0 +1,903 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.MediaQuery; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetCommonRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * Item type + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaQuery") + private Optional mediaQuery; + + @JsonCreator + public GetCommonRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + Optional type, + Optional mediaQuery) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.type = type; + this.mediaQuery = mediaQuery; + } + + public GetCommonRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * Item type + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaQuery() { + return (Optional) mediaQuery; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCommonRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCommonRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetCommonRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetCommonRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetCommonRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetCommonRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetCommonRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetCommonRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetCommonRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetCommonRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetCommonRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetCommonRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetCommonRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetCommonRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetCommonRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetCommonRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetCommonRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetCommonRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetCommonRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetCommonRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetCommonRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetCommonRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetCommonRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Item type + */ + public GetCommonRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * Item type + */ + public GetCommonRequest withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public GetCommonRequest withMediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public GetCommonRequest withMediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCommonRequest other = (GetCommonRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.mediaQuery, other.mediaQuery); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + type, mediaQuery); + } + + @Override + public String toString() { + return Utils.toString(GetCommonRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "type", type, + "mediaQuery", mediaQuery); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Optional type = Optional.empty(); + + private Optional mediaQuery = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * Item type + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Item type + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + public GetCommonRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetCommonRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + type, mediaQuery); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCommonRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCommonRequestBuilder.java new file mode 100644 index 00000000..cbb7f0af --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCommonRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetCommon; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetCommonRequestBuilder { + + private GetCommonRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCommonRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCommonRequestBuilder request(GetCommonRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetCommonResponse call() throws Exception { + + RequestOperation operation + = new GetCommon.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCommonResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCommonResponse.java new file mode 100644 index 00000000..d2df2621 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCommonResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetCommonResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetCommonResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetCommonResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCommonResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCommonResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCommonResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCommonResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetCommonResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetCommonResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCommonResponse other = (GetCommonResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetCommonResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetCommonResponse build() { + + return new GetCommonResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCompanionsDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCompanionsDataRequestBuilder.java deleted file mode 100644 index 58464955..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetCompanionsDataRequestBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetCompanionsData; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetCompanionsDataRequestBuilder { - - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetCompanionsDataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetCompanionsDataRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetCompanionsDataRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public GetCompanionsDataResponse call() throws Exception { - - RequestlessOperation operation - = new GetCompanionsData.Sync(sdkConfiguration, serverURL); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCompanionsDataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCompanionsDataResponse.java deleted file mode 100644 index 9d31d463..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetCompanionsDataResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.List; -import java.util.Optional; - - -public class GetCompanionsDataResponse 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; - - /** - * Companions Data - */ - private Optional> responseBodies; - - @JsonCreator - public GetCompanionsDataResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional> responseBodies) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(responseBodies, "responseBodies"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.responseBodies = responseBodies; - } - - public GetCompanionsDataResponse( - 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; - } - - /** - * Companions Data - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> responseBodies() { - return (Optional>) responseBodies; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetCompanionsDataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetCompanionsDataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCompanionsDataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Companions Data - */ - public GetCompanionsDataResponse withResponseBodies(List responseBodies) { - Utils.checkNotNull(responseBodies, "responseBodies"); - this.responseBodies = Optional.ofNullable(responseBodies); - return this; - } - - - /** - * Companions Data - */ - public GetCompanionsDataResponse withResponseBodies(Optional> responseBodies) { - Utils.checkNotNull(responseBodies, "responseBodies"); - this.responseBodies = responseBodies; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCompanionsDataResponse other = (GetCompanionsDataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.responseBodies, other.responseBodies); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - responseBodies); - } - - @Override - public String toString() { - return Utils.toString(GetCompanionsDataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "responseBodies", responseBodies); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional> responseBodies = 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; - } - - - /** - * Companions Data - */ - public Builder responseBodies(List responseBodies) { - Utils.checkNotNull(responseBodies, "responseBodies"); - this.responseBodies = Optional.ofNullable(responseBodies); - return this; - } - - /** - * Companions Data - */ - public Builder responseBodies(Optional> responseBodies) { - Utils.checkNotNull(responseBodies, "responseBodies"); - this.responseBodies = responseBodies; - return this; - } - - public GetCompanionsDataResponse build() { - - return new GetCompanionsDataResponse( - contentType, statusCode, rawResponse, - responseBodies); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingMediaContainer.java new file mode 100644 index 00000000..b326ccef --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Hub; +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.List; +import java.util.Optional; + +/** + * GetContinueWatchingMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetContinueWatchingMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + @JsonCreator + public GetContinueWatchingMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(hub, "hub"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.hub = hub; + } + + public GetContinueWatchingMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hub() { + return (Optional>) hub; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetContinueWatchingMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetContinueWatchingMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetContinueWatchingMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetContinueWatchingMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetContinueWatchingMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetContinueWatchingMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetContinueWatchingMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetContinueWatchingMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetContinueWatchingMediaContainer withHub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + + public GetContinueWatchingMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContinueWatchingMediaContainer other = (GetContinueWatchingMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, hub); + } + + @Override + public String toString() { + return Utils.toString(GetContinueWatchingMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "hub", hub); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder hub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public GetContinueWatchingMediaContainer build() { + + return new GetContinueWatchingMediaContainer( + identifier, offset, size, + totalSize, hub); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingRequest.java new file mode 100644 index 00000000..71dc99a7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingRequest.java @@ -0,0 +1,798 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetContinueWatchingRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Limit results to count items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + @JsonCreator + public GetContinueWatchingRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional count) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(count, "count"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.count = count; + } + + public GetContinueWatchingRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Limit results to count items + */ + @JsonIgnore + public Optional count() { + return count; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetContinueWatchingRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetContinueWatchingRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetContinueWatchingRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetContinueWatchingRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetContinueWatchingRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetContinueWatchingRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetContinueWatchingRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetContinueWatchingRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetContinueWatchingRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetContinueWatchingRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetContinueWatchingRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetContinueWatchingRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetContinueWatchingRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetContinueWatchingRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetContinueWatchingRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetContinueWatchingRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetContinueWatchingRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetContinueWatchingRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetContinueWatchingRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetContinueWatchingRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetContinueWatchingRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetContinueWatchingRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Limit results to count items + */ + public GetContinueWatchingRequest withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + /** + * Limit results to count items + */ + public GetContinueWatchingRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContinueWatchingRequest other = (GetContinueWatchingRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.count, other.count); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, count); + } + + @Override + public String toString() { + return Utils.toString(GetContinueWatchingRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "count", count); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional count = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Limit results to count items + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * Limit results to count items + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + public GetContinueWatchingRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetContinueWatchingRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, count); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingRequestBuilder.java new file mode 100644 index 00000000..77b7a10b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetContinueWatching; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetContinueWatchingRequestBuilder { + + private GetContinueWatchingRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetContinueWatchingRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetContinueWatchingRequestBuilder request(GetContinueWatchingRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetContinueWatchingResponse call() throws Exception { + + RequestOperation operation + = new GetContinueWatching.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingResponse.java new file mode 100644 index 00000000..b15c8dd4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetContinueWatchingResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetContinueWatchingResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetContinueWatchingResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetContinueWatchingResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetContinueWatchingResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetContinueWatchingResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetContinueWatchingResponse withObject(GetContinueWatchingResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetContinueWatchingResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetContinueWatchingResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContinueWatchingResponse other = (GetContinueWatchingResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetContinueWatchingResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetContinueWatchingResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetContinueWatchingResponse build() { + + return new GetContinueWatchingResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingResponseBody.java new file mode 100644 index 00000000..c7b43393 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetContinueWatchingResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetContinueWatchingResponseBody + * + *

OK + */ +public class GetContinueWatchingResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetContinueWatchingResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetContinueWatchingResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetContinueWatchingResponseBody withMediaContainer(GetContinueWatchingMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetContinueWatchingResponseBody 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; + } + GetContinueWatchingResponseBody other = (GetContinueWatchingResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetContinueWatchingResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetContinueWatchingMediaContainer 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 GetContinueWatchingResponseBody build() { + + return new GetContinueWatchingResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryDirectory.java deleted file mode 100644 index 4d84a57c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryDirectory.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetCountriesLibraryDirectory { - - @JsonProperty("fastKey") - private String fastKey; - - - @JsonProperty("key") - private String key; - - - @JsonProperty("title") - private String title; - - @JsonCreator - public GetCountriesLibraryDirectory( - @JsonProperty("fastKey") String fastKey, - @JsonProperty("key") String key, - @JsonProperty("title") String title) { - Utils.checkNotNull(fastKey, "fastKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - this.fastKey = fastKey; - this.key = key; - this.title = title; - } - - @JsonIgnore - public String fastKey() { - return fastKey; - } - - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String title() { - return title; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCountriesLibraryDirectory withFastKey(String fastKey) { - Utils.checkNotNull(fastKey, "fastKey"); - this.fastKey = fastKey; - return this; - } - - public GetCountriesLibraryDirectory withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetCountriesLibraryDirectory 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; - } - GetCountriesLibraryDirectory other = (GetCountriesLibraryDirectory) o; - return - Utils.enhancedDeepEquals(this.fastKey, other.fastKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - fastKey, key, title); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryDirectory.class, - "fastKey", fastKey, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String fastKey; - - private String key; - - private String title; - - private Builder() { - // force use of static builder() method - } - - - public Builder fastKey(String fastKey) { - Utils.checkNotNull(fastKey, "fastKey"); - this.fastKey = fastKey; - 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 GetCountriesLibraryDirectory build() { - - return new GetCountriesLibraryDirectory( - fastKey, key, title); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryMediaContainer.java deleted file mode 100644 index 1927cd5e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryMediaContainer.java +++ /dev/null @@ -1,621 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetCountriesLibraryMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * Indicates whether syncing is allowed. - */ - @JsonProperty("allowSync") - private boolean allowSync; - - /** - * URL for the background artwork of the media container. - */ - @JsonProperty("art") - private String art; - - /** - * The content type or mode. - */ - @JsonProperty("content") - private String content; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - /** - * The prefix used for media tag resource paths. - */ - @JsonProperty("mediaTagPrefix") - private String mediaTagPrefix; - - /** - * The version number for media tags. - */ - @JsonProperty("mediaTagVersion") - private long mediaTagVersion; - - /** - * Specifies whether caching is disabled. - */ - @JsonProperty("nocache") - private boolean nocache; - - /** - * URL for the thumbnail image of the media container. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The primary title of the media container. - */ - @JsonProperty("title1") - private String title1; - - /** - * The secondary title of the media container. - */ - @JsonProperty("title2") - private String title2; - - /** - * Identifier for the view group layout. - */ - @JsonProperty("viewGroup") - private String viewGroup; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Directory") - private Optional> directory; - - @JsonCreator - public GetCountriesLibraryMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("art") String art, - @JsonProperty("content") String content, - @JsonProperty("identifier") String identifier, - @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("mediaTagVersion") long mediaTagVersion, - @JsonProperty("nocache") boolean nocache, - @JsonProperty("thumb") String thumb, - @JsonProperty("title1") String title1, - @JsonProperty("title2") String title2, - @JsonProperty("viewGroup") String viewGroup, - @JsonProperty("Directory") Optional> directory) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(content, "content"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(nocache, "nocache"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title1, "title1"); - Utils.checkNotNull(title2, "title2"); - Utils.checkNotNull(viewGroup, "viewGroup"); - Utils.checkNotNull(directory, "directory"); - this.size = size; - this.allowSync = allowSync; - this.art = art; - this.content = content; - this.identifier = identifier; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.nocache = nocache; - this.thumb = thumb; - this.title1 = title1; - this.title2 = title2; - this.viewGroup = viewGroup; - this.directory = directory; - } - - public GetCountriesLibraryMediaContainer( - int size, - boolean allowSync, - String art, - String content, - String identifier, - String mediaTagPrefix, - long mediaTagVersion, - boolean nocache, - String thumb, - String title1, - String title2, - String viewGroup) { - this(size, allowSync, art, - content, identifier, mediaTagPrefix, - mediaTagVersion, nocache, thumb, - title1, title2, viewGroup, - Optional.empty()); - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * Indicates whether syncing is allowed. - */ - @JsonIgnore - public boolean allowSync() { - return allowSync; - } - - /** - * URL for the background artwork of the media container. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * The content type or mode. - */ - @JsonIgnore - public String content() { - return content; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - /** - * The prefix used for media tag resource paths. - */ - @JsonIgnore - public String mediaTagPrefix() { - return mediaTagPrefix; - } - - /** - * The version number for media tags. - */ - @JsonIgnore - public long mediaTagVersion() { - return mediaTagVersion; - } - - /** - * Specifies whether caching is disabled. - */ - @JsonIgnore - public boolean nocache() { - return nocache; - } - - /** - * URL for the thumbnail image of the media container. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The primary title of the media container. - */ - @JsonIgnore - public String title1() { - return title1; - } - - /** - * The secondary title of the media container. - */ - @JsonIgnore - public String title2() { - return title2; - } - - /** - * Identifier for the view group layout. - */ - @JsonIgnore - public String viewGroup() { - return viewGroup; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> directory() { - return (Optional>) directory; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetCountriesLibraryMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * Indicates whether syncing is allowed. - */ - public GetCountriesLibraryMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - /** - * URL for the background artwork of the media container. - */ - public GetCountriesLibraryMediaContainer withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * The content type or mode. - */ - public GetCountriesLibraryMediaContainer withContent(String content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetCountriesLibraryMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - /** - * The prefix used for media tag resource paths. - */ - public GetCountriesLibraryMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - /** - * The version number for media tags. - */ - public GetCountriesLibraryMediaContainer withMediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - /** - * Specifies whether caching is disabled. - */ - public GetCountriesLibraryMediaContainer withNocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - /** - * URL for the thumbnail image of the media container. - */ - public GetCountriesLibraryMediaContainer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The primary title of the media container. - */ - public GetCountriesLibraryMediaContainer withTitle1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - /** - * The secondary title of the media container. - */ - public GetCountriesLibraryMediaContainer withTitle2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - /** - * Identifier for the view group layout. - */ - public GetCountriesLibraryMediaContainer withViewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - public GetCountriesLibraryMediaContainer withDirectory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - - public GetCountriesLibraryMediaContainer withDirectory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCountriesLibraryMediaContainer other = (GetCountriesLibraryMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.content, other.content) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.nocache, other.nocache) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title1, other.title1) && - Utils.enhancedDeepEquals(this.title2, other.title2) && - Utils.enhancedDeepEquals(this.viewGroup, other.viewGroup) && - Utils.enhancedDeepEquals(this.directory, other.directory); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowSync, art, - content, identifier, mediaTagPrefix, - mediaTagVersion, nocache, thumb, - title1, title2, viewGroup, - directory); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryMediaContainer.class, - "size", size, - "allowSync", allowSync, - "art", art, - "content", content, - "identifier", identifier, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "nocache", nocache, - "thumb", thumb, - "title1", title1, - "title2", title2, - "viewGroup", viewGroup, - "directory", directory); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Boolean allowSync; - - private String art; - - private String content; - - private String identifier; - - private String mediaTagPrefix; - - private Long mediaTagVersion; - - private Boolean nocache; - - private String thumb; - - private String title1; - - private String title2; - - private String viewGroup; - - private Optional> directory = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * Indicates whether syncing is allowed. - */ - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - - /** - * URL for the background artwork of the media container. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * The content type or mode. - */ - public Builder content(String content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - /** - * The prefix used for media tag resource paths. - */ - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - - /** - * The version number for media tags. - */ - public Builder mediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - - /** - * Specifies whether caching is disabled. - */ - public Builder nocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - - /** - * URL for the thumbnail image of the media container. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The primary title of the media container. - */ - public Builder title1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - - /** - * The secondary title of the media container. - */ - public Builder title2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - - /** - * Identifier for the view group layout. - */ - public Builder viewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - - public Builder directory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - public Builder directory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - public GetCountriesLibraryMediaContainer build() { - - return new GetCountriesLibraryMediaContainer( - size, allowSync, art, - content, identifier, mediaTagPrefix, - mediaTagVersion, nocache, thumb, - title1, title2, viewGroup, - directory); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryQueryParamType.java deleted file mode 100644 index 4284782d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryQueryParamType.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ -@JsonDeserialize(using = GetCountriesLibraryQueryParamType._Deserializer.class) -@JsonSerialize(using = GetCountriesLibraryQueryParamType._Serializer.class) -public class GetCountriesLibraryQueryParamType { - - public static final GetCountriesLibraryQueryParamType Movie = new GetCountriesLibraryQueryParamType(1L); - public static final GetCountriesLibraryQueryParamType TvShow = new GetCountriesLibraryQueryParamType(2L); - public static final GetCountriesLibraryQueryParamType Season = new GetCountriesLibraryQueryParamType(3L); - public static final GetCountriesLibraryQueryParamType Episode = new GetCountriesLibraryQueryParamType(4L); - public static final GetCountriesLibraryQueryParamType Artist = new GetCountriesLibraryQueryParamType(5L); - public static final GetCountriesLibraryQueryParamType Album = new GetCountriesLibraryQueryParamType(6L); - public static final GetCountriesLibraryQueryParamType Track = new GetCountriesLibraryQueryParamType(7L); - public static final GetCountriesLibraryQueryParamType PhotoAlbum = new GetCountriesLibraryQueryParamType(8L); - public static final GetCountriesLibraryQueryParamType Photo = new GetCountriesLibraryQueryParamType(9L); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final long value; - - private GetCountriesLibraryQueryParamType(long value) { - this.value = value; - } - - /** - * Returns a GetCountriesLibraryQueryParamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetCountriesLibraryQueryParamType - */ - public static GetCountriesLibraryQueryParamType of(long value) { - synchronized (GetCountriesLibraryQueryParamType.class) { - return values.computeIfAbsent(value, v -> new GetCountriesLibraryQueryParamType(v)); - } - } - - public long value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetCountriesLibraryQueryParamType other = (GetCountriesLibraryQueryParamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetCountriesLibraryQueryParamType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetCountriesLibraryQueryParamType[] values() { - synchronized (GetCountriesLibraryQueryParamType.class) { - return values.values().toArray(new GetCountriesLibraryQueryParamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1L, Movie); - map.put(2L, TvShow); - map.put(3L, Season); - map.put(4L, Episode); - map.put(5L, Artist); - map.put(6L, Album); - map.put(7L, Track); - map.put(8L, PhotoAlbum); - map.put(9L, Photo); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1L, GetCountriesLibraryQueryParamTypeEnum.Movie); - map.put(2L, GetCountriesLibraryQueryParamTypeEnum.TvShow); - map.put(3L, GetCountriesLibraryQueryParamTypeEnum.Season); - map.put(4L, GetCountriesLibraryQueryParamTypeEnum.Episode); - map.put(5L, GetCountriesLibraryQueryParamTypeEnum.Artist); - map.put(6L, GetCountriesLibraryQueryParamTypeEnum.Album); - map.put(7L, GetCountriesLibraryQueryParamTypeEnum.Track); - map.put(8L, GetCountriesLibraryQueryParamTypeEnum.PhotoAlbum); - map.put(9L, GetCountriesLibraryQueryParamTypeEnum.Photo); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetCountriesLibraryQueryParamType.class); - } - - @Override - public void serialize(GetCountriesLibraryQueryParamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetCountriesLibraryQueryParamType.class); - } - - @Override - public GetCountriesLibraryQueryParamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - long v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetCountriesLibraryQueryParamType.of(v); - } - } - - public enum GetCountriesLibraryQueryParamTypeEnum { - - Movie(1L), - TvShow(2L), - Season(3L), - Episode(4L), - Artist(5L), - Album(6L), - Track(7L), - PhotoAlbum(8L), - Photo(9L),; - - private final long value; - - private GetCountriesLibraryQueryParamTypeEnum(long value) { - this.value = value; - } - - public long value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryRequest.java deleted file mode 100644 index 5fd35ffc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryRequest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - - -public class GetCountriesLibraryRequest { - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey") - private int sectionKey; - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private GetCountriesLibraryQueryParamType type; - - @JsonCreator - public GetCountriesLibraryRequest( - int sectionKey, - GetCountriesLibraryQueryParamType type) { - Utils.checkNotNull(sectionKey, "sectionKey"); - Utils.checkNotNull(type, "type"); - this.sectionKey = sectionKey; - this.type = type; - } - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @JsonIgnore - public int sectionKey() { - return sectionKey; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @JsonIgnore - public GetCountriesLibraryQueryParamType type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public GetCountriesLibraryRequest withSectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public GetCountriesLibraryRequest withType(GetCountriesLibraryQueryParamType 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; - } - GetCountriesLibraryRequest other = (GetCountriesLibraryRequest) o; - return - Utils.enhancedDeepEquals(this.sectionKey, other.sectionKey) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - sectionKey, type); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryRequest.class, - "sectionKey", sectionKey, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer sectionKey; - - private GetCountriesLibraryQueryParamType type; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public Builder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public Builder type(GetCountriesLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetCountriesLibraryRequest build() { - - return new GetCountriesLibraryRequest( - sectionKey, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryRequestBuilder.java deleted file mode 100644 index 6701218c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryRequestBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetCountriesLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; - -public class GetCountriesLibraryRequestBuilder { - - private Integer sectionKey; - private GetCountriesLibraryQueryParamType type; - private final SDKConfiguration sdkConfiguration; - - public GetCountriesLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetCountriesLibraryRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - public GetCountriesLibraryRequestBuilder type(GetCountriesLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetCountriesLibraryRequest buildRequest() { - - GetCountriesLibraryRequest request = new GetCountriesLibraryRequest(sectionKey, - type); - - return request; - } - - public GetCountriesLibraryResponse call() throws Exception { - - RequestOperation operation - = new GetCountriesLibrary.Sync(sdkConfiguration); - GetCountriesLibraryRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryResponse.java deleted file mode 100644 index 45c5b959..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetCountriesLibraryResponse 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; - - /** - * Successful response containing media container data. - */ - private Optional object; - - @JsonCreator - public GetCountriesLibraryResponse( - 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 GetCountriesLibraryResponse( - 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; - } - - /** - * Successful response containing media container data. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetCountriesLibraryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetCountriesLibraryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCountriesLibraryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response containing media container data. - */ - public GetCountriesLibraryResponse withObject(GetCountriesLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Successful response containing media container data. - */ - public GetCountriesLibraryResponse 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; - } - GetCountriesLibraryResponse other = (GetCountriesLibraryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Successful response containing media container data. - */ - public Builder object(GetCountriesLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Successful response containing media container data. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetCountriesLibraryResponse build() { - - return new GetCountriesLibraryResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryResponseBody.java deleted file mode 100644 index 4e2874d4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLibraryResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetCountriesLibraryResponseBody - * - *

Successful response containing media container data. - */ -public class GetCountriesLibraryResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetCountriesLibraryResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetCountriesLibraryResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetCountriesLibraryResponseBody withMediaContainer(GetCountriesLibraryMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetCountriesLibraryResponseBody 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; - } - GetCountriesLibraryResponseBody other = (GetCountriesLibraryResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetCountriesLibraryMediaContainer 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 GetCountriesLibraryResponseBody build() { - - return new GetCountriesLibraryResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsRequest.java new file mode 100644 index 00000000..341a8959 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsRequest.java @@ -0,0 +1,882 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetCountriesLineupsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * 3 letter country code + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=country") + private String country; + + /** + * The `providerIdentifier` of the provider + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=epgId") + private String epgId; + + /** + * The postal code for the lineups to fetch + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=postalCode") + private Optional postalCode; + + @JsonCreator + public GetCountriesLineupsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String country, + String epgId, + Optional postalCode) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(epgId, "epgId"); + Utils.checkNotNull(postalCode, "postalCode"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.country = country; + this.epgId = epgId; + this.postalCode = postalCode; + } + + public GetCountriesLineupsRequest( + String country, + String epgId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), country, + epgId, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * 3 letter country code + */ + @JsonIgnore + public String country() { + return country; + } + + /** + * The `providerIdentifier` of the provider + */ + @JsonIgnore + public String epgId() { + return epgId; + } + + /** + * The postal code for the lineups to fetch + */ + @JsonIgnore + public Optional postalCode() { + return postalCode; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCountriesLineupsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCountriesLineupsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetCountriesLineupsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetCountriesLineupsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetCountriesLineupsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetCountriesLineupsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetCountriesLineupsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetCountriesLineupsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetCountriesLineupsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetCountriesLineupsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetCountriesLineupsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetCountriesLineupsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetCountriesLineupsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetCountriesLineupsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetCountriesLineupsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetCountriesLineupsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetCountriesLineupsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetCountriesLineupsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetCountriesLineupsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetCountriesLineupsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetCountriesLineupsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetCountriesLineupsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * 3 letter country code + */ + public GetCountriesLineupsRequest withCountry(String country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + /** + * The `providerIdentifier` of the provider + */ + public GetCountriesLineupsRequest withEpgId(String epgId) { + Utils.checkNotNull(epgId, "epgId"); + this.epgId = epgId; + return this; + } + + /** + * The postal code for the lineups to fetch + */ + public GetCountriesLineupsRequest withPostalCode(String postalCode) { + Utils.checkNotNull(postalCode, "postalCode"); + this.postalCode = Optional.ofNullable(postalCode); + return this; + } + + + /** + * The postal code for the lineups to fetch + */ + public GetCountriesLineupsRequest withPostalCode(Optional postalCode) { + Utils.checkNotNull(postalCode, "postalCode"); + this.postalCode = postalCode; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountriesLineupsRequest other = (GetCountriesLineupsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.country, other.country) && + Utils.enhancedDeepEquals(this.epgId, other.epgId) && + Utils.enhancedDeepEquals(this.postalCode, other.postalCode); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, country, + epgId, postalCode); + } + + @Override + public String toString() { + return Utils.toString(GetCountriesLineupsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "country", country, + "epgId", epgId, + "postalCode", postalCode); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String country; + + private String epgId; + + private Optional postalCode = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * 3 letter country code + */ + public Builder country(String country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + + /** + * The `providerIdentifier` of the provider + */ + public Builder epgId(String epgId) { + Utils.checkNotNull(epgId, "epgId"); + this.epgId = epgId; + return this; + } + + + /** + * The postal code for the lineups to fetch + */ + public Builder postalCode(String postalCode) { + Utils.checkNotNull(postalCode, "postalCode"); + this.postalCode = Optional.ofNullable(postalCode); + return this; + } + + /** + * The postal code for the lineups to fetch + */ + public Builder postalCode(Optional postalCode) { + Utils.checkNotNull(postalCode, "postalCode"); + this.postalCode = postalCode; + return this; + } + + public GetCountriesLineupsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetCountriesLineupsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, country, + epgId, postalCode); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsRequestBuilder.java new file mode 100644 index 00000000..361c4fc7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetCountriesLineups; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetCountriesLineupsRequestBuilder { + + private GetCountriesLineupsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCountriesLineupsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCountriesLineupsRequestBuilder request(GetCountriesLineupsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetCountriesLineupsResponse call() throws Exception { + + RequestOperation operation + = new GetCountriesLineups.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsResponse.java new file mode 100644 index 00000000..30e13c3d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesLineupsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithLineup; +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.Optional; + + +public class GetCountriesLineupsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithLineup; + + @JsonCreator + public GetCountriesLineupsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithLineup) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithLineup = mediaContainerWithLineup; + } + + public GetCountriesLineupsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithLineup() { + return (Optional) mediaContainerWithLineup; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCountriesLineupsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCountriesLineupsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCountriesLineupsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCountriesLineupsResponse withMediaContainerWithLineup(MediaContainerWithLineup mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = Optional.ofNullable(mediaContainerWithLineup); + return this; + } + + + /** + * OK + */ + public GetCountriesLineupsResponse withMediaContainerWithLineup(Optional mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = mediaContainerWithLineup; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountriesLineupsResponse other = (GetCountriesLineupsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithLineup, other.mediaContainerWithLineup); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithLineup); + } + + @Override + public String toString() { + return Utils.toString(GetCountriesLineupsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithLineup", mediaContainerWithLineup); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithLineup = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithLineup(MediaContainerWithLineup mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = Optional.ofNullable(mediaContainerWithLineup); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithLineup(Optional mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = mediaContainerWithLineup; + return this; + } + + public GetCountriesLineupsResponse build() { + + return new GetCountriesLineupsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithLineup); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesMediaContainer.java new file mode 100644 index 00000000..a894daa3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetCountriesMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetCountriesMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + @JsonCreator + public GetCountriesMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Country") Optional> country) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(country, "country"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.country = country; + } + + public GetCountriesMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetCountriesMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetCountriesMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetCountriesMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetCountriesMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetCountriesMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetCountriesMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetCountriesMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetCountriesMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetCountriesMediaContainer withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + + public GetCountriesMediaContainer withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountriesMediaContainer other = (GetCountriesMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.country, other.country); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, country); + } + + @Override + public String toString() { + return Utils.toString(GetCountriesMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "country", country); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + 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 GetCountriesMediaContainer build() { + + return new GetCountriesMediaContainer( + identifier, offset, size, + totalSize, country); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesRequestBuilder.java new file mode 100644 index 00000000..594db111 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetCountries; +import java.lang.Exception; + +public class GetCountriesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetCountriesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCountriesResponse call() throws Exception { + + RequestlessOperation operation + = new GetCountries.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesResponse.java new file mode 100644 index 00000000..9cd40594 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetCountriesResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetCountriesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetCountriesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCountriesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCountriesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCountriesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCountriesResponse withObject(GetCountriesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetCountriesResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetCountriesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountriesResponse other = (GetCountriesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetCountriesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetCountriesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetCountriesResponse build() { + + return new GetCountriesResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesResponseBody.java new file mode 100644 index 00000000..77b163f3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountriesResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetCountriesResponseBody + * + *

OK + */ +public class GetCountriesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetCountriesResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetCountriesResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetCountriesResponseBody withMediaContainer(GetCountriesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetCountriesResponseBody 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; + } + GetCountriesResponseBody other = (GetCountriesResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetCountriesResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetCountriesMediaContainer 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 GetCountriesResponseBody build() { + + return new GetCountriesResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsCountry.java new file mode 100644 index 00000000..7e03db92 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsCountry.java @@ -0,0 +1,244 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GetCountryRegionsCountry { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("national") + private Optional national; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonCreator + public GetCountryRegionsCountry( + @JsonProperty("key") Optional key, + @JsonProperty("national") Optional national, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(national, "national"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + this.key = key; + this.national = national; + this.title = title; + this.type = type; + } + + public GetCountryRegionsCountry() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional national() { + return national; + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional type() { + return type; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetCountryRegionsCountry withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public GetCountryRegionsCountry withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetCountryRegionsCountry withNational(boolean national) { + Utils.checkNotNull(national, "national"); + this.national = Optional.ofNullable(national); + return this; + } + + + public GetCountryRegionsCountry withNational(Optional national) { + Utils.checkNotNull(national, "national"); + this.national = national; + return this; + } + + public GetCountryRegionsCountry withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public GetCountryRegionsCountry withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetCountryRegionsCountry withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public GetCountryRegionsCountry withType(Optional 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; + } + GetCountryRegionsCountry other = (GetCountryRegionsCountry) o; + return + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.national, other.national) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + key, national, title, + type); + } + + @Override + public String toString() { + return Utils.toString(GetCountryRegionsCountry.class, + "key", key, + "national", national, + "title", title, + "type", type); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional national = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = 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 national(boolean national) { + Utils.checkNotNull(national, "national"); + this.national = Optional.ofNullable(national); + return this; + } + + public Builder national(Optional national) { + Utils.checkNotNull(national, "national"); + this.national = national; + 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 GetCountryRegionsCountry build() { + + return new GetCountryRegionsCountry( + key, national, title, + type); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsMediaContainer.java new file mode 100644 index 00000000..daa69722 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetCountryRegionsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetCountryRegionsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + @JsonCreator + public GetCountryRegionsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Country") Optional> country) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(country, "country"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.country = country; + } + + public GetCountryRegionsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetCountryRegionsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetCountryRegionsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetCountryRegionsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetCountryRegionsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetCountryRegionsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetCountryRegionsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetCountryRegionsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetCountryRegionsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetCountryRegionsMediaContainer withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + + public GetCountryRegionsMediaContainer withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountryRegionsMediaContainer other = (GetCountryRegionsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.country, other.country); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, country); + } + + @Override + public String toString() { + return Utils.toString(GetCountryRegionsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "country", country); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + 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 GetCountryRegionsMediaContainer build() { + + return new GetCountryRegionsMediaContainer( + identifier, offset, size, + totalSize, country); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsRequest.java new file mode 100644 index 00000000..e3ef8d13 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsRequest.java @@ -0,0 +1,823 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetCountryRegionsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * 3 letter country code + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=country") + private String country; + + /** + * The `providerIdentifier` of the provider + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=epgId") + private String epgId; + + @JsonCreator + public GetCountryRegionsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String country, + String epgId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(epgId, "epgId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.country = country; + this.epgId = epgId; + } + + public GetCountryRegionsRequest( + String country, + String epgId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), country, + epgId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * 3 letter country code + */ + @JsonIgnore + public String country() { + return country; + } + + /** + * The `providerIdentifier` of the provider + */ + @JsonIgnore + public String epgId() { + return epgId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCountryRegionsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetCountryRegionsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetCountryRegionsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetCountryRegionsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetCountryRegionsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetCountryRegionsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetCountryRegionsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetCountryRegionsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetCountryRegionsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetCountryRegionsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetCountryRegionsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetCountryRegionsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetCountryRegionsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetCountryRegionsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetCountryRegionsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetCountryRegionsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetCountryRegionsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetCountryRegionsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetCountryRegionsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetCountryRegionsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetCountryRegionsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetCountryRegionsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * 3 letter country code + */ + public GetCountryRegionsRequest withCountry(String country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + /** + * The `providerIdentifier` of the provider + */ + public GetCountryRegionsRequest withEpgId(String epgId) { + Utils.checkNotNull(epgId, "epgId"); + this.epgId = epgId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountryRegionsRequest other = (GetCountryRegionsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.country, other.country) && + Utils.enhancedDeepEquals(this.epgId, other.epgId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, country, + epgId); + } + + @Override + public String toString() { + return Utils.toString(GetCountryRegionsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "country", country, + "epgId", epgId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String country; + + private String epgId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * 3 letter country code + */ + public Builder country(String country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + + /** + * The `providerIdentifier` of the provider + */ + public Builder epgId(String epgId) { + Utils.checkNotNull(epgId, "epgId"); + this.epgId = epgId; + return this; + } + + public GetCountryRegionsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetCountryRegionsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, country, + epgId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsRequestBuilder.java new file mode 100644 index 00000000..9d377472 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetCountryRegions; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetCountryRegionsRequestBuilder { + + private GetCountryRegionsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCountryRegionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCountryRegionsRequestBuilder request(GetCountryRegionsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetCountryRegionsResponse call() throws Exception { + + RequestOperation operation + = new GetCountryRegions.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsResponse.java new file mode 100644 index 00000000..f76532fa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetCountryRegionsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetCountryRegionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetCountryRegionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCountryRegionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCountryRegionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCountryRegionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCountryRegionsResponse withObject(GetCountryRegionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetCountryRegionsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetCountryRegionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountryRegionsResponse other = (GetCountryRegionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetCountryRegionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetCountryRegionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetCountryRegionsResponse build() { + + return new GetCountryRegionsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsResponseBody.java new file mode 100644 index 00000000..68f89df0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetCountryRegionsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetCountryRegionsResponseBody + * + *

OK + */ +public class GetCountryRegionsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetCountryRegionsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetCountryRegionsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetCountryRegionsResponseBody withMediaContainer(GetCountryRegionsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetCountryRegionsResponseBody 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; + } + GetCountryRegionsResponseBody other = (GetCountryRegionsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetCountryRegionsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetCountryRegionsMediaContainer 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 GetCountryRegionsResponseBody build() { + + return new GetCountryRegionsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDVRDVR.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRDVR.java new file mode 100644 index 00000000..d8966d25 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRDVR.java @@ -0,0 +1,290 @@ +/* + * 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.models.shared.Device; +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.Optional; + + +public class GetDVRDVR { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineup") + private Optional lineup; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public GetDVRDVR( + @JsonProperty("Device") Optional> device, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("lineup") Optional lineup, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(lineup, "lineup"); + Utils.checkNotNull(uuid, "uuid"); + this.device = device; + this.key = key; + this.language = language; + this.lineup = lineup; + this.uuid = uuid; + } + + public GetDVRDVR() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> device() { + return (Optional>) device; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional lineup() { + return lineup; + } + + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDVRDVR withDevice(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public GetDVRDVR withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public GetDVRDVR withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public GetDVRDVR withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetDVRDVR withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public GetDVRDVR withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public GetDVRDVR withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + public GetDVRDVR withLineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public GetDVRDVR withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + public GetDVRDVR withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDVRDVR other = (GetDVRDVR) o; + return + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.lineup, other.lineup) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + device, key, language, + lineup, uuid); + } + + @Override + public String toString() { + return Utils.toString(GetDVRDVR.class, + "device", device, + "key", key, + "language", language, + "lineup", lineup, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> device = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional lineup = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder device(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + 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 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 lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + public Builder lineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public GetDVRDVR build() { + + return new GetDVRDVR( + device, key, language, + lineup, uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDVRDVRsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRDVRsMediaContainer.java new file mode 100644 index 00000000..a9dca8a6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRDVRsMediaContainer.java @@ -0,0 +1,344 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * GetDVRDVRsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetDVRDVRsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public GetDVRDVRsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(status, "status"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.status = status; + } + + public GetDVRDVRsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDVRDVRsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetDVRDVRsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetDVRDVRsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetDVRDVRsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetDVRDVRsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetDVRDVRsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetDVRDVRsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetDVRDVRsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public GetDVRDVRsMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public GetDVRDVRsMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDVRDVRsMediaContainer other = (GetDVRDVRsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, status); + } + + @Override + public String toString() { + return Utils.toString(GetDVRDVRsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetDVRDVRsMediaContainer build() { + + return new GetDVRDVRsMediaContainer( + identifier, offset, size, + totalSize, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDVRMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRMediaContainer.java new file mode 100644 index 00000000..02e61305 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRMediaContainer.java @@ -0,0 +1,158 @@ +/* + * 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.Optional; + + +public class GetDVRMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DVR") + private Optional> dvr; + + @JsonCreator + public GetDVRMediaContainer( + @JsonProperty("MediaContainer") Optional mediaContainer, + @JsonProperty("DVR") Optional> dvr) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + Utils.checkNotNull(dvr, "dvr"); + this.mediaContainer = mediaContainer; + this.dvr = dvr; + } + + public GetDVRMediaContainer() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> dvr() { + return (Optional>) dvr; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDVRMediaContainer withMediaContainer(GetDVRDVRsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetDVRMediaContainer withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetDVRMediaContainer withDvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + + public GetDVRMediaContainer withDvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDVRMediaContainer other = (GetDVRMediaContainer) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer) && + Utils.enhancedDeepEquals(this.dvr, other.dvr); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer, dvr); + } + + @Override + public String toString() { + return Utils.toString(GetDVRMediaContainer.class, + "mediaContainer", mediaContainer, + "dvr", dvr); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Optional> dvr = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetDVRDVRsMediaContainer 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 Builder dvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + public Builder dvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + public GetDVRMediaContainer build() { + + return new GetDVRMediaContainer( + mediaContainer, dvr); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDVRRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRRequest.java new file mode 100644 index 00000000..ca59a93c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetDVRRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the DVR. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dvrId") + private long dvrId; + + @JsonCreator + public GetDVRRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long dvrId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(dvrId, "dvrId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.dvrId = dvrId; + } + + public GetDVRRequest( + long dvrId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), dvrId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the DVR. + */ + @JsonIgnore + public long dvrId() { + return dvrId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDVRRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDVRRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetDVRRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetDVRRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetDVRRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetDVRRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetDVRRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetDVRRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetDVRRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetDVRRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetDVRRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetDVRRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetDVRRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetDVRRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetDVRRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetDVRRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetDVRRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetDVRRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetDVRRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetDVRRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetDVRRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetDVRRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the DVR. + */ + public GetDVRRequest withDvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDVRRequest other = (GetDVRRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.dvrId, other.dvrId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId); + } + + @Override + public String toString() { + return Utils.toString(GetDVRRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "dvrId", dvrId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long dvrId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the DVR. + */ + public Builder dvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + public GetDVRRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetDVRRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDVRRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRRequestBuilder.java new file mode 100644 index 00000000..b6718392 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetDVR; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetDVRRequestBuilder { + + private GetDVRRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDVRRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDVRRequestBuilder request(GetDVRRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetDVRResponse call() throws Exception { + + RequestOperation operation + = new GetDVR.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDVRResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRResponse.java new file mode 100644 index 00000000..02d855d5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetDVRResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDVRResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDVRResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDVRResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDVRResponse withObject(GetDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetDVRResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetDVRResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDVRResponse other = (GetDVRResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetDVRResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetDVRResponse build() { + + return new GetDVRResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDVRResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRResponseBody.java new file mode 100644 index 00000000..2c87b17b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDVRResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetDVRResponseBody + * + *

OK + */ +public class GetDVRResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetDVRResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetDVRResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDVRResponseBody withMediaContainer(GetDVRMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetDVRResponseBody 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; + } + GetDVRResponseBody other = (GetDVRResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetDVRResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetDVRMediaContainer 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 GetDVRResponseBody build() { + + return new GetDVRResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsRequest.java new file mode 100644 index 00000000..a8067453 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetDeviceDetailsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the device. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + @JsonCreator + public GetDeviceDetailsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long deviceId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceId, "deviceId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceId = deviceId; + } + + public GetDeviceDetailsRequest( + long deviceId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the device. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDeviceDetailsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDeviceDetailsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetDeviceDetailsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetDeviceDetailsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetDeviceDetailsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetDeviceDetailsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetDeviceDetailsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetDeviceDetailsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetDeviceDetailsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetDeviceDetailsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetDeviceDetailsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetDeviceDetailsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetDeviceDetailsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetDeviceDetailsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetDeviceDetailsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetDeviceDetailsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetDeviceDetailsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetDeviceDetailsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetDeviceDetailsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetDeviceDetailsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetDeviceDetailsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetDeviceDetailsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the device. + */ + public GetDeviceDetailsRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDeviceDetailsRequest other = (GetDeviceDetailsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId); + } + + @Override + public String toString() { + return Utils.toString(GetDeviceDetailsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceId", deviceId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long deviceId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the device. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + public GetDeviceDetailsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetDeviceDetailsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsRequestBuilder.java new file mode 100644 index 00000000..01ef7f6b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetDeviceDetails; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetDeviceDetailsRequestBuilder { + + private GetDeviceDetailsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDeviceDetailsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDeviceDetailsRequestBuilder request(GetDeviceDetailsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetDeviceDetailsResponse call() throws Exception { + + RequestOperation operation + = new GetDeviceDetails.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsResponse.java new file mode 100644 index 00000000..570b38a7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDeviceDetailsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +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.Optional; + + +public class GetDeviceDetailsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + @JsonCreator + public GetDeviceDetailsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + } + + public GetDeviceDetailsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDeviceDetailsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDeviceDetailsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDeviceDetailsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDeviceDetailsResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public GetDeviceDetailsResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDeviceDetailsResponse other = (GetDeviceDetailsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + @Override + public String toString() { + return Utils.toString(GetDeviceDetailsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public GetDeviceDetailsResponse build() { + + return new GetDeviceDetailsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsMediaContainer.java new file mode 100644 index 00000000..7fd5a042 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetDevicesChannelsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetDevicesChannelsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DeviceChannel") + private Optional> deviceChannel; + + @JsonCreator + public GetDevicesChannelsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("DeviceChannel") Optional> deviceChannel) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(deviceChannel, "deviceChannel"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.deviceChannel = deviceChannel; + } + + public GetDevicesChannelsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> deviceChannel() { + return (Optional>) deviceChannel; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDevicesChannelsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetDevicesChannelsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetDevicesChannelsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetDevicesChannelsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetDevicesChannelsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetDevicesChannelsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetDevicesChannelsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetDevicesChannelsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetDevicesChannelsMediaContainer withDeviceChannel(List deviceChannel) { + Utils.checkNotNull(deviceChannel, "deviceChannel"); + this.deviceChannel = Optional.ofNullable(deviceChannel); + return this; + } + + + public GetDevicesChannelsMediaContainer withDeviceChannel(Optional> deviceChannel) { + Utils.checkNotNull(deviceChannel, "deviceChannel"); + this.deviceChannel = deviceChannel; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDevicesChannelsMediaContainer other = (GetDevicesChannelsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.deviceChannel, other.deviceChannel); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, deviceChannel); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesChannelsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "deviceChannel", deviceChannel); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> deviceChannel = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder deviceChannel(List deviceChannel) { + Utils.checkNotNull(deviceChannel, "deviceChannel"); + this.deviceChannel = Optional.ofNullable(deviceChannel); + return this; + } + + public Builder deviceChannel(Optional> deviceChannel) { + Utils.checkNotNull(deviceChannel, "deviceChannel"); + this.deviceChannel = deviceChannel; + return this; + } + + public GetDevicesChannelsMediaContainer build() { + + return new GetDevicesChannelsMediaContainer( + identifier, offset, size, + totalSize, deviceChannel); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsRequest.java new file mode 100644 index 00000000..e3bb8268 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetDevicesChannelsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the device. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + @JsonCreator + public GetDevicesChannelsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long deviceId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceId, "deviceId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceId = deviceId; + } + + public GetDevicesChannelsRequest( + long deviceId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the device. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDevicesChannelsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDevicesChannelsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetDevicesChannelsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetDevicesChannelsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetDevicesChannelsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetDevicesChannelsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetDevicesChannelsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetDevicesChannelsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetDevicesChannelsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetDevicesChannelsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetDevicesChannelsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetDevicesChannelsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetDevicesChannelsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetDevicesChannelsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetDevicesChannelsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetDevicesChannelsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetDevicesChannelsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetDevicesChannelsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetDevicesChannelsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetDevicesChannelsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetDevicesChannelsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetDevicesChannelsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the device. + */ + public GetDevicesChannelsRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDevicesChannelsRequest other = (GetDevicesChannelsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesChannelsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceId", deviceId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long deviceId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the device. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + public GetDevicesChannelsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetDevicesChannelsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsRequestBuilder.java new file mode 100644 index 00000000..b708b9bc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetDevicesChannels; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetDevicesChannelsRequestBuilder { + + private GetDevicesChannelsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDevicesChannelsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDevicesChannelsRequestBuilder request(GetDevicesChannelsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetDevicesChannelsResponse call() throws Exception { + + RequestOperation operation + = new GetDevicesChannels.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsResponse.java new file mode 100644 index 00000000..2a22f5e3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetDevicesChannelsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetDevicesChannelsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetDevicesChannelsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDevicesChannelsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDevicesChannelsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDevicesChannelsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDevicesChannelsResponse withObject(GetDevicesChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetDevicesChannelsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetDevicesChannelsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDevicesChannelsResponse other = (GetDevicesChannelsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesChannelsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetDevicesChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetDevicesChannelsResponse build() { + + return new GetDevicesChannelsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsResponseBody.java new file mode 100644 index 00000000..3e8e94e8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesChannelsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetDevicesChannelsResponseBody + * + *

OK + */ +public class GetDevicesChannelsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetDevicesChannelsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetDevicesChannelsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDevicesChannelsResponseBody withMediaContainer(GetDevicesChannelsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetDevicesChannelsResponseBody 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; + } + GetDevicesChannelsResponseBody other = (GetDevicesChannelsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesChannelsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetDevicesChannelsMediaContainer 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 GetDevicesChannelsResponseBody build() { + + return new GetDevicesChannelsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesMediaContainer.java deleted file mode 100644 index 9be77906..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesMediaContainer.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetDevicesMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("identifier") - private Optional identifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Device") - private Optional> device; - - @JsonCreator - public GetDevicesMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("identifier") Optional identifier, - @JsonProperty("Device") Optional> device) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(device, "device"); - this.size = size; - this.identifier = identifier; - this.device = device; - } - - public GetDevicesMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional identifier() { - return identifier; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> device() { - return (Optional>) device; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetDevicesMediaContainer withSize(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetDevicesMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetDevicesMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = Optional.ofNullable(identifier); - return this; - } - - - public GetDevicesMediaContainer withIdentifier(Optional identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public GetDevicesMediaContainer withDevice(List device) { - Utils.checkNotNull(device, "device"); - this.device = Optional.ofNullable(device); - return this; - } - - - public GetDevicesMediaContainer withDevice(Optional> device) { - Utils.checkNotNull(device, "device"); - this.device = device; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetDevicesMediaContainer other = (GetDevicesMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.device, other.device); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, identifier, device); - } - - @Override - public String toString() { - return Utils.toString(GetDevicesMediaContainer.class, - "size", size, - "identifier", identifier, - "device", device); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional identifier = Optional.empty(); - - private Optional> device = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 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 device(List device) { - Utils.checkNotNull(device, "device"); - this.device = Optional.ofNullable(device); - return this; - } - - public Builder device(Optional> device) { - Utils.checkNotNull(device, "device"); - this.device = device; - return this; - } - - public GetDevicesMediaContainer build() { - - return new GetDevicesMediaContainer( - size, identifier, device); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesRequestBuilder.java deleted file mode 100644 index 215713cf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetDevices; -import java.lang.Exception; - -public class GetDevicesRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetDevicesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetDevicesResponse call() throws Exception { - - RequestlessOperation operation - = new GetDevices.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesResponse.java deleted file mode 100644 index 767f87c9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetDevicesResponse 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; - - /** - * Devices - */ - private Optional object; - - @JsonCreator - public GetDevicesResponse( - 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 GetDevicesResponse( - 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; - } - - /** - * Devices - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetDevicesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetDevicesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetDevicesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Devices - */ - public GetDevicesResponse withObject(GetDevicesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Devices - */ - public GetDevicesResponse 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; - } - GetDevicesResponse other = (GetDevicesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetDevicesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Devices - */ - public Builder object(GetDevicesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Devices - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetDevicesResponse build() { - - return new GetDevicesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesResponseBody.java deleted file mode 100644 index 6cb0e590..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetDevicesResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetDevicesResponseBody - * - *

Devices - */ -public class GetDevicesResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetDevicesResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetDevicesResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetDevicesResponseBody withMediaContainer(GetDevicesMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetDevicesResponseBody 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; - } - GetDevicesResponseBody other = (GetDevicesResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetDevicesResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetDevicesMediaContainer 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 GetDevicesResponseBody build() { - - return new GetDevicesResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueDownloadQueue.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueDownloadQueue.java new file mode 100644 index 00000000..6fe8f918 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueDownloadQueue.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetDownloadQueueDownloadQueue { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("itemCount") + private Optional itemCount; + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public GetDownloadQueueDownloadQueue( + @JsonProperty("id") Optional id, + @JsonProperty("itemCount") Optional itemCount, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(itemCount, "itemCount"); + Utils.checkNotNull(status, "status"); + this.id = id; + this.itemCount = itemCount; + this.status = status; + } + + public GetDownloadQueueDownloadQueue() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional itemCount() { + return itemCount; + } + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDownloadQueueDownloadQueue withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public GetDownloadQueueDownloadQueue withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetDownloadQueueDownloadQueue withItemCount(long itemCount) { + Utils.checkNotNull(itemCount, "itemCount"); + this.itemCount = Optional.ofNullable(itemCount); + return this; + } + + + public GetDownloadQueueDownloadQueue withItemCount(Optional itemCount) { + Utils.checkNotNull(itemCount, "itemCount"); + this.itemCount = itemCount; + return this; + } + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + public GetDownloadQueueDownloadQueue withStatus(GetDownloadQueueStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + public GetDownloadQueueDownloadQueue withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDownloadQueueDownloadQueue other = (GetDownloadQueueDownloadQueue) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.itemCount, other.itemCount) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, itemCount, status); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueDownloadQueue.class, + "id", id, + "itemCount", itemCount, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional itemCount = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder id(long 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 itemCount(long itemCount) { + Utils.checkNotNull(itemCount, "itemCount"); + this.itemCount = Optional.ofNullable(itemCount); + return this; + } + + public Builder itemCount(Optional itemCount) { + Utils.checkNotNull(itemCount, "itemCount"); + this.itemCount = itemCount; + return this; + } + + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + public Builder status(GetDownloadQueueStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetDownloadQueueDownloadQueue build() { + + return new GetDownloadQueueDownloadQueue( + id, itemCount, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsDecisionResult.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsDecisionResult.java new file mode 100644 index 00000000..b2c5a210 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsDecisionResult.java @@ -0,0 +1,513 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GetDownloadQueueItemsDecisionResult { + /** + * The maximum bitrate set when item was added + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("availableBandwidth") + private Optional availableBandwidth; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directPlayDecisionCode") + private Optional directPlayDecisionCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directPlayDecisionText") + private Optional directPlayDecisionText; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generalDecisionCode") + private Optional generalDecisionCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generalDecisionText") + private Optional generalDecisionText; + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mdeDecisionCode") + private Optional mdeDecisionCode; + + /** + * Descriptive text for the above code + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mdeDecisionText") + private Optional mdeDecisionText; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcodeDecisionCode") + private Optional transcodeDecisionCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcodeDecisionText") + private Optional transcodeDecisionText; + + @JsonCreator + public GetDownloadQueueItemsDecisionResult( + @JsonProperty("availableBandwidth") Optional availableBandwidth, + @JsonProperty("directPlayDecisionCode") Optional directPlayDecisionCode, + @JsonProperty("directPlayDecisionText") Optional directPlayDecisionText, + @JsonProperty("generalDecisionCode") Optional generalDecisionCode, + @JsonProperty("generalDecisionText") Optional generalDecisionText, + @JsonProperty("mdeDecisionCode") Optional mdeDecisionCode, + @JsonProperty("mdeDecisionText") Optional mdeDecisionText, + @JsonProperty("transcodeDecisionCode") Optional transcodeDecisionCode, + @JsonProperty("transcodeDecisionText") Optional transcodeDecisionText) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.availableBandwidth = availableBandwidth; + this.directPlayDecisionCode = directPlayDecisionCode; + this.directPlayDecisionText = directPlayDecisionText; + this.generalDecisionCode = generalDecisionCode; + this.generalDecisionText = generalDecisionText; + this.mdeDecisionCode = mdeDecisionCode; + this.mdeDecisionText = mdeDecisionText; + this.transcodeDecisionCode = transcodeDecisionCode; + this.transcodeDecisionText = transcodeDecisionText; + } + + public GetDownloadQueueItemsDecisionResult() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The maximum bitrate set when item was added + */ + @JsonIgnore + public Optional availableBandwidth() { + return availableBandwidth; + } + + @JsonIgnore + public Optional directPlayDecisionCode() { + return directPlayDecisionCode; + } + + @JsonIgnore + public Optional directPlayDecisionText() { + return directPlayDecisionText; + } + + @JsonIgnore + public Optional generalDecisionCode() { + return generalDecisionCode; + } + + @JsonIgnore + public Optional generalDecisionText() { + return generalDecisionText; + } + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + @JsonIgnore + public Optional mdeDecisionCode() { + return mdeDecisionCode; + } + + /** + * Descriptive text for the above code + */ + @JsonIgnore + public Optional mdeDecisionText() { + return mdeDecisionText; + } + + @JsonIgnore + public Optional transcodeDecisionCode() { + return transcodeDecisionCode; + } + + @JsonIgnore + public Optional transcodeDecisionText() { + return transcodeDecisionText; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The maximum bitrate set when item was added + */ + public GetDownloadQueueItemsDecisionResult withAvailableBandwidth(long availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = Optional.ofNullable(availableBandwidth); + return this; + } + + + /** + * The maximum bitrate set when item was added + */ + public GetDownloadQueueItemsDecisionResult withAvailableBandwidth(Optional availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = availableBandwidth; + return this; + } + + public GetDownloadQueueItemsDecisionResult withDirectPlayDecisionCode(long directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = Optional.ofNullable(directPlayDecisionCode); + return this; + } + + + public GetDownloadQueueItemsDecisionResult withDirectPlayDecisionCode(Optional directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = directPlayDecisionCode; + return this; + } + + public GetDownloadQueueItemsDecisionResult withDirectPlayDecisionText(String directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = Optional.ofNullable(directPlayDecisionText); + return this; + } + + + public GetDownloadQueueItemsDecisionResult withDirectPlayDecisionText(Optional directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = directPlayDecisionText; + return this; + } + + public GetDownloadQueueItemsDecisionResult withGeneralDecisionCode(long generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = Optional.ofNullable(generalDecisionCode); + return this; + } + + + public GetDownloadQueueItemsDecisionResult withGeneralDecisionCode(Optional generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = generalDecisionCode; + return this; + } + + public GetDownloadQueueItemsDecisionResult withGeneralDecisionText(String generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = Optional.ofNullable(generalDecisionText); + return this; + } + + + public GetDownloadQueueItemsDecisionResult withGeneralDecisionText(Optional generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = generalDecisionText; + return this; + } + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public GetDownloadQueueItemsDecisionResult withMdeDecisionCode(long mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = Optional.ofNullable(mdeDecisionCode); + return this; + } + + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public GetDownloadQueueItemsDecisionResult withMdeDecisionCode(Optional mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = mdeDecisionCode; + return this; + } + + /** + * Descriptive text for the above code + */ + public GetDownloadQueueItemsDecisionResult withMdeDecisionText(String mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = Optional.ofNullable(mdeDecisionText); + return this; + } + + + /** + * Descriptive text for the above code + */ + public GetDownloadQueueItemsDecisionResult withMdeDecisionText(Optional mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = mdeDecisionText; + return this; + } + + public GetDownloadQueueItemsDecisionResult withTranscodeDecisionCode(long transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = Optional.ofNullable(transcodeDecisionCode); + return this; + } + + + public GetDownloadQueueItemsDecisionResult withTranscodeDecisionCode(Optional transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = transcodeDecisionCode; + return this; + } + + public GetDownloadQueueItemsDecisionResult withTranscodeDecisionText(String transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = Optional.ofNullable(transcodeDecisionText); + return this; + } + + + public GetDownloadQueueItemsDecisionResult withTranscodeDecisionText(Optional transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = transcodeDecisionText; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDownloadQueueItemsDecisionResult other = (GetDownloadQueueItemsDecisionResult) o; + return + Utils.enhancedDeepEquals(this.availableBandwidth, other.availableBandwidth) && + Utils.enhancedDeepEquals(this.directPlayDecisionCode, other.directPlayDecisionCode) && + Utils.enhancedDeepEquals(this.directPlayDecisionText, other.directPlayDecisionText) && + Utils.enhancedDeepEquals(this.generalDecisionCode, other.generalDecisionCode) && + Utils.enhancedDeepEquals(this.generalDecisionText, other.generalDecisionText) && + Utils.enhancedDeepEquals(this.mdeDecisionCode, other.mdeDecisionCode) && + Utils.enhancedDeepEquals(this.mdeDecisionText, other.mdeDecisionText) && + Utils.enhancedDeepEquals(this.transcodeDecisionCode, other.transcodeDecisionCode) && + Utils.enhancedDeepEquals(this.transcodeDecisionText, other.transcodeDecisionText); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + availableBandwidth, directPlayDecisionCode, directPlayDecisionText, + generalDecisionCode, generalDecisionText, mdeDecisionCode, + mdeDecisionText, transcodeDecisionCode, transcodeDecisionText); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueItemsDecisionResult.class, + "availableBandwidth", availableBandwidth, + "directPlayDecisionCode", directPlayDecisionCode, + "directPlayDecisionText", directPlayDecisionText, + "generalDecisionCode", generalDecisionCode, + "generalDecisionText", generalDecisionText, + "mdeDecisionCode", mdeDecisionCode, + "mdeDecisionText", mdeDecisionText, + "transcodeDecisionCode", transcodeDecisionCode, + "transcodeDecisionText", transcodeDecisionText); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional availableBandwidth = Optional.empty(); + + private Optional directPlayDecisionCode = Optional.empty(); + + private Optional directPlayDecisionText = Optional.empty(); + + private Optional generalDecisionCode = Optional.empty(); + + private Optional generalDecisionText = Optional.empty(); + + private Optional mdeDecisionCode = Optional.empty(); + + private Optional mdeDecisionText = Optional.empty(); + + private Optional transcodeDecisionCode = Optional.empty(); + + private Optional transcodeDecisionText = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The maximum bitrate set when item was added + */ + public Builder availableBandwidth(long availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = Optional.ofNullable(availableBandwidth); + return this; + } + + /** + * The maximum bitrate set when item was added + */ + public Builder availableBandwidth(Optional availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = availableBandwidth; + return this; + } + + + public Builder directPlayDecisionCode(long directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = Optional.ofNullable(directPlayDecisionCode); + return this; + } + + public Builder directPlayDecisionCode(Optional directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = directPlayDecisionCode; + return this; + } + + + public Builder directPlayDecisionText(String directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = Optional.ofNullable(directPlayDecisionText); + return this; + } + + public Builder directPlayDecisionText(Optional directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = directPlayDecisionText; + return this; + } + + + public Builder generalDecisionCode(long generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = Optional.ofNullable(generalDecisionCode); + return this; + } + + public Builder generalDecisionCode(Optional generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = generalDecisionCode; + return this; + } + + + public Builder generalDecisionText(String generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = Optional.ofNullable(generalDecisionText); + return this; + } + + public Builder generalDecisionText(Optional generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = generalDecisionText; + return this; + } + + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public Builder mdeDecisionCode(long mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = Optional.ofNullable(mdeDecisionCode); + return this; + } + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public Builder mdeDecisionCode(Optional mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = mdeDecisionCode; + return this; + } + + + /** + * Descriptive text for the above code + */ + public Builder mdeDecisionText(String mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = Optional.ofNullable(mdeDecisionText); + return this; + } + + /** + * Descriptive text for the above code + */ + public Builder mdeDecisionText(Optional mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = mdeDecisionText; + return this; + } + + + public Builder transcodeDecisionCode(long transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = Optional.ofNullable(transcodeDecisionCode); + return this; + } + + public Builder transcodeDecisionCode(Optional transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = transcodeDecisionCode; + return this; + } + + + public Builder transcodeDecisionText(String transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = Optional.ofNullable(transcodeDecisionText); + return this; + } + + public Builder transcodeDecisionText(Optional transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = transcodeDecisionText; + return this; + } + + public GetDownloadQueueItemsDecisionResult build() { + + return new GetDownloadQueueItemsDecisionResult( + availableBandwidth, directPlayDecisionCode, directPlayDecisionText, + generalDecisionCode, generalDecisionText, mdeDecisionCode, + mdeDecisionText, transcodeDecisionCode, transcodeDecisionText); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsDownloadQueueItem.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsDownloadQueueItem.java new file mode 100644 index 00000000..fa9629ae --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsDownloadQueueItem.java @@ -0,0 +1,529 @@ +/* + * 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.models.shared.TranscodeSession; +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.Optional; + + +public class GetDownloadQueueItemsDownloadQueueItem { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DecisionResult") + private Optional decisionResult; + + /** + * The error encountered in transcoding or decision + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private Optional error; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("queueId") + private Optional queueId; + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcode") + private Optional transcode; + + /** + * The transcode session if item is currently being transcoded + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("TranscodeSession") + private Optional transcodeSession; + + @JsonCreator + public GetDownloadQueueItemsDownloadQueueItem( + @JsonProperty("DecisionResult") Optional decisionResult, + @JsonProperty("error") Optional error, + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("queueId") Optional queueId, + @JsonProperty("status") Optional status, + @JsonProperty("transcode") Optional transcode, + @JsonProperty("TranscodeSession") Optional transcodeSession) { + Utils.checkNotNull(decisionResult, "decisionResult"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(queueId, "queueId"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(transcode, "transcode"); + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.decisionResult = decisionResult; + this.error = error; + this.id = id; + this.key = key; + this.queueId = queueId; + this.status = status; + this.transcode = transcode; + this.transcodeSession = transcodeSession; + } + + public GetDownloadQueueItemsDownloadQueueItem() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional decisionResult() { + return (Optional) decisionResult; + } + + /** + * The error encountered in transcoding or decision + */ + @JsonIgnore + public Optional error() { + return error; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional queueId() { + return queueId; + } + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional transcode() { + return (Optional) transcode; + } + + /** + * The transcode session if item is currently being transcoded + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional transcodeSession() { + return (Optional) transcodeSession; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDownloadQueueItemsDownloadQueueItem withDecisionResult(GetDownloadQueueItemsDecisionResult decisionResult) { + Utils.checkNotNull(decisionResult, "decisionResult"); + this.decisionResult = Optional.ofNullable(decisionResult); + return this; + } + + + public GetDownloadQueueItemsDownloadQueueItem withDecisionResult(Optional decisionResult) { + Utils.checkNotNull(decisionResult, "decisionResult"); + this.decisionResult = decisionResult; + return this; + } + + /** + * The error encountered in transcoding or decision + */ + public GetDownloadQueueItemsDownloadQueueItem withError(String error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + + /** + * The error encountered in transcoding or decision + */ + public GetDownloadQueueItemsDownloadQueueItem withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + public GetDownloadQueueItemsDownloadQueueItem withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public GetDownloadQueueItemsDownloadQueueItem withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetDownloadQueueItemsDownloadQueueItem withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public GetDownloadQueueItemsDownloadQueueItem withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetDownloadQueueItemsDownloadQueueItem withQueueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = Optional.ofNullable(queueId); + return this; + } + + + public GetDownloadQueueItemsDownloadQueueItem withQueueId(Optional queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + public GetDownloadQueueItemsDownloadQueueItem withStatus(GetDownloadQueueItemsStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + public GetDownloadQueueItemsDownloadQueueItem withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + public GetDownloadQueueItemsDownloadQueueItem withTranscode(GetDownloadQueueItemsTranscode transcode) { + Utils.checkNotNull(transcode, "transcode"); + this.transcode = Optional.ofNullable(transcode); + return this; + } + + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + public GetDownloadQueueItemsDownloadQueueItem withTranscode(Optional transcode) { + Utils.checkNotNull(transcode, "transcode"); + this.transcode = transcode; + return this; + } + + /** + * The transcode session if item is currently being transcoded + */ + public GetDownloadQueueItemsDownloadQueueItem withTranscodeSession(TranscodeSession transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = Optional.ofNullable(transcodeSession); + return this; + } + + + /** + * The transcode session if item is currently being transcoded + */ + public GetDownloadQueueItemsDownloadQueueItem withTranscodeSession(Optional transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = transcodeSession; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDownloadQueueItemsDownloadQueueItem other = (GetDownloadQueueItemsDownloadQueueItem) o; + return + Utils.enhancedDeepEquals(this.decisionResult, other.decisionResult) && + Utils.enhancedDeepEquals(this.error, other.error) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.queueId, other.queueId) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.transcode, other.transcode) && + Utils.enhancedDeepEquals(this.transcodeSession, other.transcodeSession); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + decisionResult, error, id, + key, queueId, status, + transcode, transcodeSession); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueItemsDownloadQueueItem.class, + "decisionResult", decisionResult, + "error", error, + "id", id, + "key", key, + "queueId", queueId, + "status", status, + "transcode", transcode, + "transcodeSession", transcodeSession); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional decisionResult = Optional.empty(); + + private Optional error = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional queueId = Optional.empty(); + + private Optional status = Optional.empty(); + + private Optional transcode = Optional.empty(); + + private Optional transcodeSession = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder decisionResult(GetDownloadQueueItemsDecisionResult decisionResult) { + Utils.checkNotNull(decisionResult, "decisionResult"); + this.decisionResult = Optional.ofNullable(decisionResult); + return this; + } + + public Builder decisionResult(Optional decisionResult) { + Utils.checkNotNull(decisionResult, "decisionResult"); + this.decisionResult = decisionResult; + return this; + } + + + /** + * The error encountered in transcoding or decision + */ + public Builder error(String error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * The error encountered in transcoding or decision + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + + public Builder id(long 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 queueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = Optional.ofNullable(queueId); + return this; + } + + public Builder queueId(Optional queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + public Builder status(GetDownloadQueueItemsStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + public Builder transcode(GetDownloadQueueItemsTranscode transcode) { + Utils.checkNotNull(transcode, "transcode"); + this.transcode = Optional.ofNullable(transcode); + return this; + } + + /** + * The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ + public Builder transcode(Optional transcode) { + Utils.checkNotNull(transcode, "transcode"); + this.transcode = transcode; + return this; + } + + + /** + * The transcode session if item is currently being transcoded + */ + public Builder transcodeSession(TranscodeSession transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = Optional.ofNullable(transcodeSession); + return this; + } + + /** + * The transcode session if item is currently being transcoded + */ + public Builder transcodeSession(Optional transcodeSession) { + Utils.checkNotNull(transcodeSession, "transcodeSession"); + this.transcodeSession = transcodeSession; + return this; + } + + public GetDownloadQueueItemsDownloadQueueItem build() { + + return new GetDownloadQueueItemsDownloadQueueItem( + decisionResult, error, id, + key, queueId, status, + transcode, transcodeSession); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsMediaContainer.java new file mode 100644 index 00000000..46c89653 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetDownloadQueueItemsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetDownloadQueueItemsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DownloadQueueItem") + private Optional> downloadQueueItem; + + @JsonCreator + public GetDownloadQueueItemsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("DownloadQueueItem") Optional> downloadQueueItem) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(downloadQueueItem, "downloadQueueItem"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.downloadQueueItem = downloadQueueItem; + } + + public GetDownloadQueueItemsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> downloadQueueItem() { + return (Optional>) downloadQueueItem; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDownloadQueueItemsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetDownloadQueueItemsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetDownloadQueueItemsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetDownloadQueueItemsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetDownloadQueueItemsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetDownloadQueueItemsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetDownloadQueueItemsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetDownloadQueueItemsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetDownloadQueueItemsMediaContainer withDownloadQueueItem(List downloadQueueItem) { + Utils.checkNotNull(downloadQueueItem, "downloadQueueItem"); + this.downloadQueueItem = Optional.ofNullable(downloadQueueItem); + return this; + } + + + public GetDownloadQueueItemsMediaContainer withDownloadQueueItem(Optional> downloadQueueItem) { + Utils.checkNotNull(downloadQueueItem, "downloadQueueItem"); + this.downloadQueueItem = downloadQueueItem; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDownloadQueueItemsMediaContainer other = (GetDownloadQueueItemsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.downloadQueueItem, other.downloadQueueItem); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, downloadQueueItem); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueItemsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "downloadQueueItem", downloadQueueItem); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> downloadQueueItem = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder downloadQueueItem(List downloadQueueItem) { + Utils.checkNotNull(downloadQueueItem, "downloadQueueItem"); + this.downloadQueueItem = Optional.ofNullable(downloadQueueItem); + return this; + } + + public Builder downloadQueueItem(Optional> downloadQueueItem) { + Utils.checkNotNull(downloadQueueItem, "downloadQueueItem"); + this.downloadQueueItem = downloadQueueItem; + return this; + } + + public GetDownloadQueueItemsMediaContainer build() { + + return new GetDownloadQueueItemsMediaContainer( + identifier, offset, size, + totalSize, downloadQueueItem); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsRequest.java new file mode 100644 index 00000000..20acdaf8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsRequest.java @@ -0,0 +1,825 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class GetDownloadQueueItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The queue id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=queueId") + private long queueId; + + /** + * The item ids + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=itemId") + private List itemId; + + @JsonCreator + public GetDownloadQueueItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long queueId, + List itemId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(queueId, "queueId"); + Utils.checkNotNull(itemId, "itemId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.queueId = queueId; + this.itemId = itemId; + } + + public GetDownloadQueueItemsRequest( + long queueId, + List itemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), queueId, + itemId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The queue id + */ + @JsonIgnore + public long queueId() { + return queueId; + } + + /** + * The item ids + */ + @JsonIgnore + public List itemId() { + return itemId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDownloadQueueItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDownloadQueueItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetDownloadQueueItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetDownloadQueueItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetDownloadQueueItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetDownloadQueueItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetDownloadQueueItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetDownloadQueueItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetDownloadQueueItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetDownloadQueueItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetDownloadQueueItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetDownloadQueueItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetDownloadQueueItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetDownloadQueueItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetDownloadQueueItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetDownloadQueueItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetDownloadQueueItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetDownloadQueueItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetDownloadQueueItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetDownloadQueueItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetDownloadQueueItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetDownloadQueueItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The queue id + */ + public GetDownloadQueueItemsRequest withQueueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + /** + * The item ids + */ + public GetDownloadQueueItemsRequest withItemId(List itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDownloadQueueItemsRequest other = (GetDownloadQueueItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.queueId, other.queueId) && + Utils.enhancedDeepEquals(this.itemId, other.itemId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + itemId); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "queueId", queueId, + "itemId", itemId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long queueId; + + private List itemId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The queue id + */ + public Builder queueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + + /** + * The item ids + */ + public Builder itemId(List itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + public GetDownloadQueueItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetDownloadQueueItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + itemId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsRequestBuilder.java new file mode 100644 index 00000000..d5633d3c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetDownloadQueueItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetDownloadQueueItemsRequestBuilder { + + private GetDownloadQueueItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDownloadQueueItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDownloadQueueItemsRequestBuilder request(GetDownloadQueueItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetDownloadQueueItemsResponse call() throws Exception { + + RequestOperation operation + = new GetDownloadQueueItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsResponse.java new file mode 100644 index 00000000..addf8db6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetDownloadQueueItemsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetDownloadQueueItemsResponse( + 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 GetDownloadQueueItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDownloadQueueItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDownloadQueueItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDownloadQueueItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDownloadQueueItemsResponse withObject(GetDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetDownloadQueueItemsResponse 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; + } + GetDownloadQueueItemsResponse other = (GetDownloadQueueItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetDownloadQueueItemsResponse build() { + + return new GetDownloadQueueItemsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsResponseBody.java new file mode 100644 index 00000000..0983cd02 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetDownloadQueueItemsResponseBody + * + *

OK + */ +public class GetDownloadQueueItemsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetDownloadQueueItemsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetDownloadQueueItemsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDownloadQueueItemsResponseBody withMediaContainer(GetDownloadQueueItemsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetDownloadQueueItemsResponseBody 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; + } + GetDownloadQueueItemsResponseBody other = (GetDownloadQueueItemsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueItemsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetDownloadQueueItemsMediaContainer 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 GetDownloadQueueItemsResponseBody build() { + + return new GetDownloadQueueItemsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsStatus.java new file mode 100644 index 00000000..1b70fbd9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsStatus.java @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * GetDownloadQueueItemsStatus + * + *

The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ +public enum GetDownloadQueueItemsStatus { + DECIDING("deciding"), + WAITING("waiting"), + PROCESSING("processing"), + AVAILABLE("available"), + ERROR("error"), + EXPIRED("expired"); + + @JsonValue + private final String value; + + GetDownloadQueueItemsStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (GetDownloadQueueItemsStatus o: GetDownloadQueueItemsStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsTranscode.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsTranscode.java new file mode 100644 index 00000000..3b8ca536 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueItemsTranscode.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * GetDownloadQueueItemsTranscode + * + *

The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ +public class GetDownloadQueueItemsTranscode { + @JsonCreator + public GetDownloadQueueItemsTranscode() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueItemsTranscode.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public GetDownloadQueueItemsTranscode build() { + + return new GetDownloadQueueItemsTranscode( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaContainer.java new file mode 100644 index 00000000..cee0bade --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetDownloadQueueMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetDownloadQueueMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DownloadQueue") + private Optional> downloadQueue; + + @JsonCreator + public GetDownloadQueueMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("DownloadQueue") Optional> downloadQueue) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(downloadQueue, "downloadQueue"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.downloadQueue = downloadQueue; + } + + public GetDownloadQueueMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> downloadQueue() { + return (Optional>) downloadQueue; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDownloadQueueMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetDownloadQueueMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetDownloadQueueMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetDownloadQueueMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetDownloadQueueMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetDownloadQueueMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetDownloadQueueMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetDownloadQueueMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetDownloadQueueMediaContainer withDownloadQueue(List downloadQueue) { + Utils.checkNotNull(downloadQueue, "downloadQueue"); + this.downloadQueue = Optional.ofNullable(downloadQueue); + return this; + } + + + public GetDownloadQueueMediaContainer withDownloadQueue(Optional> downloadQueue) { + Utils.checkNotNull(downloadQueue, "downloadQueue"); + this.downloadQueue = downloadQueue; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDownloadQueueMediaContainer other = (GetDownloadQueueMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.downloadQueue, other.downloadQueue); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, downloadQueue); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "downloadQueue", downloadQueue); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> downloadQueue = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder downloadQueue(List downloadQueue) { + Utils.checkNotNull(downloadQueue, "downloadQueue"); + this.downloadQueue = Optional.ofNullable(downloadQueue); + return this; + } + + public Builder downloadQueue(Optional> downloadQueue) { + Utils.checkNotNull(downloadQueue, "downloadQueue"); + this.downloadQueue = downloadQueue; + return this; + } + + public GetDownloadQueueMediaContainer build() { + + return new GetDownloadQueueMediaContainer( + identifier, offset, size, + totalSize, downloadQueue); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaRequest.java new file mode 100644 index 00000000..dd995af1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetDownloadQueueMediaRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The queue id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=queueId") + private long queueId; + + /** + * The item ids + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=itemId") + private long itemId; + + @JsonCreator + public GetDownloadQueueMediaRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long queueId, + long itemId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(queueId, "queueId"); + Utils.checkNotNull(itemId, "itemId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.queueId = queueId; + this.itemId = itemId; + } + + public GetDownloadQueueMediaRequest( + long queueId, + long itemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), queueId, + itemId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The queue id + */ + @JsonIgnore + public long queueId() { + return queueId; + } + + /** + * The item ids + */ + @JsonIgnore + public long itemId() { + return itemId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDownloadQueueMediaRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDownloadQueueMediaRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetDownloadQueueMediaRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetDownloadQueueMediaRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetDownloadQueueMediaRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetDownloadQueueMediaRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetDownloadQueueMediaRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetDownloadQueueMediaRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetDownloadQueueMediaRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetDownloadQueueMediaRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetDownloadQueueMediaRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetDownloadQueueMediaRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetDownloadQueueMediaRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetDownloadQueueMediaRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetDownloadQueueMediaRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetDownloadQueueMediaRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetDownloadQueueMediaRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetDownloadQueueMediaRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetDownloadQueueMediaRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetDownloadQueueMediaRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetDownloadQueueMediaRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetDownloadQueueMediaRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The queue id + */ + public GetDownloadQueueMediaRequest withQueueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + /** + * The item ids + */ + public GetDownloadQueueMediaRequest withItemId(long itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDownloadQueueMediaRequest other = (GetDownloadQueueMediaRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.queueId, other.queueId) && + Utils.enhancedDeepEquals(this.itemId, other.itemId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + itemId); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueMediaRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "queueId", queueId, + "itemId", itemId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long queueId; + + private Long itemId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The queue id + */ + public Builder queueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + + /** + * The item ids + */ + public Builder itemId(long itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + public GetDownloadQueueMediaRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetDownloadQueueMediaRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + itemId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaRequestBuilder.java new file mode 100644 index 00000000..f91371fd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetDownloadQueueMedia; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetDownloadQueueMediaRequestBuilder { + + private GetDownloadQueueMediaRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDownloadQueueMediaRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDownloadQueueMediaRequestBuilder request(GetDownloadQueueMediaRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetDownloadQueueMediaResponse call() throws Exception { + + RequestOperation operation + = new GetDownloadQueueMedia.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaResponse.java new file mode 100644 index 00000000..7dfbb84a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueMediaResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; + + +public class GetDownloadQueueMediaResponse 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; + + + private Map> headers; + + @JsonCreator + public GetDownloadQueueMediaResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.headers = headers; + } + + /** + * 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; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDownloadQueueMediaResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDownloadQueueMediaResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDownloadQueueMediaResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetDownloadQueueMediaResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDownloadQueueMediaResponse other = (GetDownloadQueueMediaResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueMediaResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetDownloadQueueMediaResponse build() { + + return new GetDownloadQueueMediaResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueRequest.java new file mode 100644 index 00000000..fa3a623b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetDownloadQueueRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The queue id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=queueId") + private long queueId; + + @JsonCreator + public GetDownloadQueueRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long queueId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(queueId, "queueId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.queueId = queueId; + } + + public GetDownloadQueueRequest( + long queueId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), queueId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The queue id + */ + @JsonIgnore + public long queueId() { + return queueId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDownloadQueueRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetDownloadQueueRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetDownloadQueueRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetDownloadQueueRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetDownloadQueueRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetDownloadQueueRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetDownloadQueueRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetDownloadQueueRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetDownloadQueueRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetDownloadQueueRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetDownloadQueueRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetDownloadQueueRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetDownloadQueueRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetDownloadQueueRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetDownloadQueueRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetDownloadQueueRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetDownloadQueueRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetDownloadQueueRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetDownloadQueueRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetDownloadQueueRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetDownloadQueueRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetDownloadQueueRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The queue id + */ + public GetDownloadQueueRequest withQueueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDownloadQueueRequest other = (GetDownloadQueueRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.queueId, other.queueId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "queueId", queueId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long queueId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The queue id + */ + public Builder queueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + public GetDownloadQueueRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetDownloadQueueRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueRequestBuilder.java new file mode 100644 index 00000000..2cf70c41 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetDownloadQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetDownloadQueueRequestBuilder { + + private GetDownloadQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDownloadQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDownloadQueueRequestBuilder request(GetDownloadQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetDownloadQueueResponse call() throws Exception { + + RequestOperation operation + = new GetDownloadQueue.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueResponse.java new file mode 100644 index 00000000..f7d25099 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetDownloadQueueResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetDownloadQueueResponse( + 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 GetDownloadQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDownloadQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDownloadQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDownloadQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDownloadQueueResponse withObject(GetDownloadQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetDownloadQueueResponse 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; + } + GetDownloadQueueResponse other = (GetDownloadQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetDownloadQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetDownloadQueueResponse build() { + + return new GetDownloadQueueResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueResponseBody.java new file mode 100644 index 00000000..dd36d076 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetDownloadQueueResponseBody + * + *

OK + */ +public class GetDownloadQueueResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetDownloadQueueResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetDownloadQueueResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetDownloadQueueResponseBody withMediaContainer(GetDownloadQueueMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetDownloadQueueResponseBody 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; + } + GetDownloadQueueResponseBody other = (GetDownloadQueueResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetDownloadQueueMediaContainer 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 GetDownloadQueueResponseBody build() { + + return new GetDownloadQueueResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueStatus.java new file mode 100644 index 00000000..7351f955 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetDownloadQueueStatus.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * GetDownloadQueueStatus + * + *

The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ +public enum GetDownloadQueueStatus { + DECIDING("deciding"), + WAITING("waiting"), + PROCESSING("processing"), + DONE("done"), + ERROR("error"); + + @JsonValue + private final String value; + + GetDownloadQueueStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (GetDownloadQueueStatus o: GetDownloadQueueStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetExtrasRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetExtrasRequest.java new file mode 100644 index 00000000..6e3add39 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetExtrasRequest.java @@ -0,0 +1,768 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetExtrasRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + @JsonCreator + public GetExtrasRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + } + + public GetExtrasRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetExtrasRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetExtrasRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetExtrasRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetExtrasRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetExtrasRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetExtrasRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetExtrasRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetExtrasRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetExtrasRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetExtrasRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetExtrasRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetExtrasRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetExtrasRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetExtrasRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetExtrasRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetExtrasRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetExtrasRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetExtrasRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetExtrasRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetExtrasRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetExtrasRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetExtrasRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public GetExtrasRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtrasRequest other = (GetExtrasRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + @Override + public String toString() { + return Utils.toString(GetExtrasRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public GetExtrasRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetExtrasRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetExtrasRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetExtrasRequestBuilder.java new file mode 100644 index 00000000..00c83f1f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetExtrasRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetExtras; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetExtrasRequestBuilder { + + private GetExtrasRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetExtrasRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetExtrasRequestBuilder request(GetExtrasRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetExtrasResponse call() throws Exception { + + RequestOperation operation + = new GetExtras.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetExtrasResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetExtrasResponse.java new file mode 100644 index 00000000..3fc5b1ad --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetExtrasResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetExtrasResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetExtrasResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetExtrasResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetExtrasResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetExtrasResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetExtrasResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetExtrasResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetExtrasResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetExtrasResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtrasResponse other = (GetExtrasResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetExtrasResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetExtrasResponse build() { + + return new GetExtrasResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFileHashRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFileHashRequest.java deleted file mode 100644 index 01689d07..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetFileHashRequest.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetFileHashRequest { - /** - * This is the path to the local file, must be prefixed by `file://` - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") - private String url; - - /** - * Item type - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private Optional type; - - @JsonCreator - public GetFileHashRequest( - String url, - Optional type) { - Utils.checkNotNull(url, "url"); - Utils.checkNotNull(type, "type"); - this.url = url; - this.type = type; - } - - public GetFileHashRequest( - String url) { - this(url, Optional.empty()); - } - - /** - * This is the path to the local file, must be prefixed by `file://` - */ - @JsonIgnore - public String url() { - return url; - } - - /** - * Item type - */ - @JsonIgnore - public Optional type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * This is the path to the local file, must be prefixed by `file://` - */ - public GetFileHashRequest withUrl(String url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - /** - * Item type - */ - public GetFileHashRequest withType(double type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - /** - * Item type - */ - public GetFileHashRequest withType(Optional 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; - } - GetFileHashRequest other = (GetFileHashRequest) o; - return - Utils.enhancedDeepEquals(this.url, other.url) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - url, type); - } - - @Override - public String toString() { - return Utils.toString(GetFileHashRequest.class, - "url", url, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String url; - - private Optional type = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * This is the path to the local file, must be prefixed by `file://` - */ - public Builder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - - /** - * Item type - */ - public Builder type(double type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - /** - * Item type - */ - public Builder type(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetFileHashRequest build() { - - return new GetFileHashRequest( - url, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFileHashRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFileHashRequestBuilder.java deleted file mode 100644 index 21cd5b0a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetFileHashRequestBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetFileHash; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetFileHashRequestBuilder { - - private String url; - private Optional type = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetFileHashRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetFileHashRequestBuilder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - public GetFileHashRequestBuilder type(double type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.of(type); - return this; - } - - public GetFileHashRequestBuilder type(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetFileHashRequest buildRequest() { - - GetFileHashRequest request = new GetFileHashRequest(url, - type); - - return request; - } - - public GetFileHashResponse call() throws Exception { - - RequestOperation operation - = new GetFileHash.Sync(sdkConfiguration); - GetFileHashRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFileHashResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFileHashResponse.java deleted file mode 100644 index 2830189c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetFileHashResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class GetFileHashResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public GetFileHashResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetFileHashResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetFileHashResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetFileHashResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetFileHashResponse other = (GetFileHashResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetFileHashResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetFileHashResponse build() { - - return new GetFileHashResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFileRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFileRequest.java new file mode 100644 index 00000000..5cce9735 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFileRequest.java @@ -0,0 +1,830 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetFileRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + /** + * The bundle url, typically starting with `metadata://` or `media://` + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private Optional url; + + @JsonCreator + public GetFileRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional url) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(url, "url"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.url = url; + } + + public GetFileRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + /** + * The bundle url, typically starting with `metadata://` or `media://` + */ + @JsonIgnore + public Optional url() { + return url; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetFileRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetFileRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetFileRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetFileRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetFileRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetFileRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetFileRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetFileRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetFileRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetFileRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetFileRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetFileRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetFileRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetFileRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetFileRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetFileRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetFileRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetFileRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetFileRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetFileRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetFileRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetFileRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public GetFileRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * The bundle url, typically starting with `metadata://` or `media://` + */ + public GetFileRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + + /** + * The bundle url, typically starting with `metadata://` or `media://` + */ + public GetFileRequest withUrl(Optional 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; + } + GetFileRequest other = (GetFileRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + url); + } + + @Override + public String toString() { + return Utils.toString(GetFileRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "url", url); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional url = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * The bundle url, typically starting with `metadata://` or `media://` + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The bundle url, typically starting with `metadata://` or `media://` + */ + public Builder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public GetFileRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetFileRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + url); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFileRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFileRequestBuilder.java new file mode 100644 index 00000000..fbdca595 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFileRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetFile; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetFileRequestBuilder { + + private GetFileRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetFileRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetFileRequestBuilder request(GetFileRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetFileResponse call() throws Exception { + + RequestOperation operation + = new GetFile.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFileResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFileResponse.java new file mode 100644 index 00000000..d0ec1bcb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFileResponse.java @@ -0,0 +1,311 @@ +/* + * 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.Optional; + + +public class GetFileResponse 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; + + /** + * OK + */ + private Optional twoHundredAudioMpeg3ResponseStream; + + /** + * OK + */ + private Optional twoHundredImageJpegResponseStream; + + @JsonCreator + public GetFileResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredAudioMpeg3ResponseStream, + Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + } + + public GetFileResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredAudioMpeg3ResponseStream() { + return (Optional) twoHundredAudioMpeg3ResponseStream; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredImageJpegResponseStream() { + return (Optional) twoHundredImageJpegResponseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetFileResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetFileResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetFileResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetFileResponse withTwoHundredAudioMpeg3ResponseStream(InputStream twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = Optional.ofNullable(twoHundredAudioMpeg3ResponseStream); + return this; + } + + + /** + * OK + */ + public GetFileResponse withTwoHundredAudioMpeg3ResponseStream(Optional twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + return this; + } + + /** + * OK + */ + public GetFileResponse withTwoHundredImageJpegResponseStream(InputStream twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + + /** + * OK + */ + public GetFileResponse withTwoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFileResponse other = (GetFileResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.twoHundredAudioMpeg3ResponseStream, other.twoHundredAudioMpeg3ResponseStream) && + Utils.enhancedDeepEquals(this.twoHundredImageJpegResponseStream, other.twoHundredImageJpegResponseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + twoHundredAudioMpeg3ResponseStream, twoHundredImageJpegResponseStream); + } + + @Override + public String toString() { + return Utils.toString(GetFileResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredAudioMpeg3ResponseStream", twoHundredAudioMpeg3ResponseStream, + "twoHundredImageJpegResponseStream", twoHundredImageJpegResponseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredAudioMpeg3ResponseStream = Optional.empty(); + + private Optional twoHundredImageJpegResponseStream = 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; + } + + + /** + * OK + */ + public Builder twoHundredAudioMpeg3ResponseStream(InputStream twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = Optional.ofNullable(twoHundredAudioMpeg3ResponseStream); + return this; + } + + /** + * OK + */ + public Builder twoHundredAudioMpeg3ResponseStream(Optional twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + return this; + } + + + /** + * OK + */ + public Builder twoHundredImageJpegResponseStream(InputStream twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + /** + * OK + */ + public Builder twoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + public GetFileResponse build() { + + return new GetFileResponse( + contentType, statusCode, rawResponse, + twoHundredAudioMpeg3ResponseStream, twoHundredImageJpegResponseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersDirectory.java new file mode 100644 index 00000000..7c676966 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersDirectory.java @@ -0,0 +1,215 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GetFirstCharactersDirectory { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * The number of items starting with this character + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonCreator + public GetFirstCharactersDirectory( + @JsonProperty("key") Optional key, + @JsonProperty("size") Optional size, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(title, "title"); + this.key = key; + this.size = size; + this.title = title; + } + + public GetFirstCharactersDirectory() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional key() { + return key; + } + + /** + * The number of items starting with this character + */ + @JsonIgnore + public Optional size() { + return size; + } + + @JsonIgnore + public Optional title() { + return title; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetFirstCharactersDirectory withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public GetFirstCharactersDirectory withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The number of items starting with this character + */ + public GetFirstCharactersDirectory withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + /** + * The number of items starting with this character + */ + public GetFirstCharactersDirectory withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetFirstCharactersDirectory withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public GetFirstCharactersDirectory 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; + } + GetFirstCharactersDirectory other = (GetFirstCharactersDirectory) o; + return + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + key, size, title); + } + + @Override + public String toString() { + return Utils.toString(GetFirstCharactersDirectory.class, + "key", key, + "size", size, + "title", title); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional size = 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; + } + + + /** + * The number of items starting with this character + */ + public Builder size(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * The number of items starting with this character + */ + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + 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 GetFirstCharactersDirectory build() { + + return new GetFirstCharactersDirectory( + key, size, title); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersMediaContainer.java new file mode 100644 index 00000000..8924546e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetFirstCharactersMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetFirstCharactersMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonCreator + public GetFirstCharactersMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Directory") Optional> directory) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(directory, "directory"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.directory = directory; + } + + public GetFirstCharactersMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetFirstCharactersMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetFirstCharactersMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetFirstCharactersMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetFirstCharactersMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetFirstCharactersMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetFirstCharactersMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetFirstCharactersMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetFirstCharactersMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetFirstCharactersMediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public GetFirstCharactersMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFirstCharactersMediaContainer other = (GetFirstCharactersMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.directory, other.directory); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, directory); + } + + @Override + public String toString() { + return Utils.toString(GetFirstCharactersMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "directory", directory); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public GetFirstCharactersMediaContainer build() { + + return new GetFirstCharactersMediaContainer( + identifier, offset, size, + totalSize, directory); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersRequest.java new file mode 100644 index 00000000..5ab62866 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersRequest.java @@ -0,0 +1,962 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.MediaQuery; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetFirstCharactersRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * The metadata type to filter on + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + /** + * The metadata type to filter on + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sort") + private Optional sort; + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaQuery") + private Optional mediaQuery; + + @JsonCreator + public GetFirstCharactersRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + Optional type, + Optional sort, + Optional mediaQuery) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.type = type; + this.sort = sort; + this.mediaQuery = mediaQuery; + } + + public GetFirstCharactersRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * The metadata type to filter on + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * The metadata type to filter on + */ + @JsonIgnore + public Optional sort() { + return sort; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaQuery() { + return (Optional) mediaQuery; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetFirstCharactersRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetFirstCharactersRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetFirstCharactersRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetFirstCharactersRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetFirstCharactersRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetFirstCharactersRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetFirstCharactersRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetFirstCharactersRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetFirstCharactersRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetFirstCharactersRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetFirstCharactersRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetFirstCharactersRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetFirstCharactersRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetFirstCharactersRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetFirstCharactersRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetFirstCharactersRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetFirstCharactersRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetFirstCharactersRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetFirstCharactersRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetFirstCharactersRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetFirstCharactersRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetFirstCharactersRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetFirstCharactersRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The metadata type to filter on + */ + public GetFirstCharactersRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The metadata type to filter on + */ + public GetFirstCharactersRequest withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The metadata type to filter on + */ + public GetFirstCharactersRequest withSort(long sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + + /** + * The metadata type to filter on + */ + public GetFirstCharactersRequest withSort(Optional sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public GetFirstCharactersRequest withMediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public GetFirstCharactersRequest withMediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFirstCharactersRequest other = (GetFirstCharactersRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.sort, other.sort) && + Utils.enhancedDeepEquals(this.mediaQuery, other.mediaQuery); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + type, sort, mediaQuery); + } + + @Override + public String toString() { + return Utils.toString(GetFirstCharactersRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "type", type, + "sort", sort, + "mediaQuery", mediaQuery); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Optional type = Optional.empty(); + + private Optional sort = Optional.empty(); + + private Optional mediaQuery = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The metadata type to filter on + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The metadata type to filter on + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The metadata type to filter on + */ + public Builder sort(long sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + /** + * The metadata type to filter on + */ + public Builder sort(Optional sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + public GetFirstCharactersRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetFirstCharactersRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + type, sort, mediaQuery); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersRequestBuilder.java new file mode 100644 index 00000000..c3c6d21b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetFirstCharacters; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetFirstCharactersRequestBuilder { + + private GetFirstCharactersRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetFirstCharactersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetFirstCharactersRequestBuilder request(GetFirstCharactersRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetFirstCharactersResponse call() throws Exception { + + RequestOperation operation + = new GetFirstCharacters.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersResponse.java new file mode 100644 index 00000000..b43eae49 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetFirstCharactersResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetFirstCharactersResponse( + 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 GetFirstCharactersResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetFirstCharactersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetFirstCharactersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetFirstCharactersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetFirstCharactersResponse withObject(GetFirstCharactersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetFirstCharactersResponse 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; + } + GetFirstCharactersResponse other = (GetFirstCharactersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetFirstCharactersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetFirstCharactersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetFirstCharactersResponse build() { + + return new GetFirstCharactersResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersResponseBody.java new file mode 100644 index 00000000..7cdd4b76 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFirstCharactersResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetFirstCharactersResponseBody + * + *

OK + */ +public class GetFirstCharactersResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetFirstCharactersResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetFirstCharactersResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetFirstCharactersResponseBody withMediaContainer(GetFirstCharactersMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetFirstCharactersResponseBody 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; + } + GetFirstCharactersResponseBody other = (GetFirstCharactersResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetFirstCharactersResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetFirstCharactersMediaContainer 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 GetFirstCharactersResponseBody build() { + + return new GetFirstCharactersResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersDirectory.java new file mode 100644 index 00000000..8ab913b0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersDirectory.java @@ -0,0 +1,197 @@ +/* + * 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.Optional; + + +public class GetFoldersDirectory { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("fastKey") + private Optional fastKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonCreator + public GetFoldersDirectory( + @JsonProperty("fastKey") Optional fastKey, + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(fastKey, "fastKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + this.fastKey = fastKey; + this.key = key; + this.title = title; + } + + public GetFoldersDirectory() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional fastKey() { + return fastKey; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional title() { + return title; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetFoldersDirectory withFastKey(String fastKey) { + Utils.checkNotNull(fastKey, "fastKey"); + this.fastKey = Optional.ofNullable(fastKey); + return this; + } + + + public GetFoldersDirectory withFastKey(Optional fastKey) { + Utils.checkNotNull(fastKey, "fastKey"); + this.fastKey = fastKey; + return this; + } + + public GetFoldersDirectory withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public GetFoldersDirectory withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetFoldersDirectory withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public GetFoldersDirectory 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; + } + GetFoldersDirectory other = (GetFoldersDirectory) o; + return + Utils.enhancedDeepEquals(this.fastKey, other.fastKey) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + fastKey, key, title); + } + + @Override + public String toString() { + return Utils.toString(GetFoldersDirectory.class, + "fastKey", fastKey, + "key", key, + "title", title); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional fastKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder fastKey(String fastKey) { + Utils.checkNotNull(fastKey, "fastKey"); + this.fastKey = Optional.ofNullable(fastKey); + return this; + } + + public Builder fastKey(Optional fastKey) { + Utils.checkNotNull(fastKey, "fastKey"); + this.fastKey = fastKey; + 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 GetFoldersDirectory build() { + + return new GetFoldersDirectory( + fastKey, key, title); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersMediaContainer.java new file mode 100644 index 00000000..01eb706b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetFoldersMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetFoldersMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonCreator + public GetFoldersMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Directory") Optional> directory) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(directory, "directory"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.directory = directory; + } + + public GetFoldersMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetFoldersMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetFoldersMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetFoldersMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetFoldersMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetFoldersMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetFoldersMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetFoldersMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetFoldersMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetFoldersMediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public GetFoldersMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFoldersMediaContainer other = (GetFoldersMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.directory, other.directory); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, directory); + } + + @Override + public String toString() { + return Utils.toString(GetFoldersMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "directory", directory); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public GetFoldersMediaContainer build() { + + return new GetFoldersMediaContainer( + identifier, offset, size, + totalSize, directory); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersRequest.java new file mode 100644 index 00000000..af4f24ac --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetFoldersRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public GetFoldersRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public GetFoldersRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetFoldersRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetFoldersRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetFoldersRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetFoldersRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetFoldersRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetFoldersRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetFoldersRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetFoldersRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetFoldersRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetFoldersRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetFoldersRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetFoldersRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetFoldersRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetFoldersRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetFoldersRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetFoldersRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetFoldersRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetFoldersRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetFoldersRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetFoldersRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetFoldersRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetFoldersRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetFoldersRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFoldersRequest other = (GetFoldersRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(GetFoldersRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetFoldersRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetFoldersRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersRequestBuilder.java new file mode 100644 index 00000000..6768b23f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetFolders; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetFoldersRequestBuilder { + + private GetFoldersRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetFoldersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetFoldersRequestBuilder request(GetFoldersRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetFoldersResponse call() throws Exception { + + RequestOperation operation + = new GetFolders.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersResponse.java new file mode 100644 index 00000000..ae07f503 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetFoldersResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetFoldersResponse( + 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 GetFoldersResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetFoldersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetFoldersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetFoldersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetFoldersResponse withObject(GetFoldersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetFoldersResponse 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; + } + GetFoldersResponse other = (GetFoldersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetFoldersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetFoldersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetFoldersResponse build() { + + return new GetFoldersResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersResponseBody.java new file mode 100644 index 00000000..d7d9b23b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetFoldersResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetFoldersResponseBody + * + *

OK + */ +public class GetFoldersResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetFoldersResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetFoldersResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetFoldersResponseBody withMediaContainer(GetFoldersMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetFoldersResponseBody 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; + } + GetFoldersResponseBody other = (GetFoldersResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetFoldersResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetFoldersMediaContainer 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 GetFoldersResponseBody build() { + + return new GetFoldersResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryDirectory.java deleted file mode 100644 index 4ef9313f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryDirectory.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetGenresLibraryDirectory { - - @JsonProperty("fastKey") - private String fastKey; - - - @JsonProperty("key") - private String key; - - - @JsonProperty("title") - private String title; - - - @JsonProperty("type") - private String type; - - @JsonCreator - public GetGenresLibraryDirectory( - @JsonProperty("fastKey") String fastKey, - @JsonProperty("key") String key, - @JsonProperty("title") String title, - @JsonProperty("type") String type) { - Utils.checkNotNull(fastKey, "fastKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - this.fastKey = fastKey; - this.key = key; - this.title = title; - this.type = type; - } - - @JsonIgnore - public String fastKey() { - return fastKey; - } - - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String title() { - return title; - } - - @JsonIgnore - public String type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGenresLibraryDirectory withFastKey(String fastKey) { - Utils.checkNotNull(fastKey, "fastKey"); - this.fastKey = fastKey; - return this; - } - - public GetGenresLibraryDirectory withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetGenresLibraryDirectory withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetGenresLibraryDirectory 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; - } - GetGenresLibraryDirectory other = (GetGenresLibraryDirectory) o; - return - Utils.enhancedDeepEquals(this.fastKey, other.fastKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - fastKey, key, title, - type); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryDirectory.class, - "fastKey", fastKey, - "key", key, - "title", title, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String fastKey; - - private String key; - - private String title; - - private String type; - - private Builder() { - // force use of static builder() method - } - - - public Builder fastKey(String fastKey) { - Utils.checkNotNull(fastKey, "fastKey"); - this.fastKey = fastKey; - 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 GetGenresLibraryDirectory build() { - - return new GetGenresLibraryDirectory( - fastKey, key, title, - type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryMediaContainer.java deleted file mode 100644 index eb671310..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryMediaContainer.java +++ /dev/null @@ -1,621 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetGenresLibraryMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * Indicates whether syncing is allowed. - */ - @JsonProperty("allowSync") - private boolean allowSync; - - /** - * URL for the background artwork of the media container. - */ - @JsonProperty("art") - private String art; - - /** - * The content type or mode. - */ - @JsonProperty("content") - private String content; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - /** - * The prefix used for media tag resource paths. - */ - @JsonProperty("mediaTagPrefix") - private String mediaTagPrefix; - - /** - * The version number for media tags. - */ - @JsonProperty("mediaTagVersion") - private long mediaTagVersion; - - /** - * Specifies whether caching is disabled. - */ - @JsonProperty("nocache") - private boolean nocache; - - /** - * URL for the thumbnail image of the media container. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The primary title of the media container. - */ - @JsonProperty("title1") - private String title1; - - /** - * The secondary title of the media container. - */ - @JsonProperty("title2") - private String title2; - - /** - * Identifier for the view group layout. - */ - @JsonProperty("viewGroup") - private String viewGroup; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Directory") - private Optional> directory; - - @JsonCreator - public GetGenresLibraryMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("art") String art, - @JsonProperty("content") String content, - @JsonProperty("identifier") String identifier, - @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("mediaTagVersion") long mediaTagVersion, - @JsonProperty("nocache") boolean nocache, - @JsonProperty("thumb") String thumb, - @JsonProperty("title1") String title1, - @JsonProperty("title2") String title2, - @JsonProperty("viewGroup") String viewGroup, - @JsonProperty("Directory") Optional> directory) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(content, "content"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(nocache, "nocache"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title1, "title1"); - Utils.checkNotNull(title2, "title2"); - Utils.checkNotNull(viewGroup, "viewGroup"); - Utils.checkNotNull(directory, "directory"); - this.size = size; - this.allowSync = allowSync; - this.art = art; - this.content = content; - this.identifier = identifier; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.nocache = nocache; - this.thumb = thumb; - this.title1 = title1; - this.title2 = title2; - this.viewGroup = viewGroup; - this.directory = directory; - } - - public GetGenresLibraryMediaContainer( - int size, - boolean allowSync, - String art, - String content, - String identifier, - String mediaTagPrefix, - long mediaTagVersion, - boolean nocache, - String thumb, - String title1, - String title2, - String viewGroup) { - this(size, allowSync, art, - content, identifier, mediaTagPrefix, - mediaTagVersion, nocache, thumb, - title1, title2, viewGroup, - Optional.empty()); - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * Indicates whether syncing is allowed. - */ - @JsonIgnore - public boolean allowSync() { - return allowSync; - } - - /** - * URL for the background artwork of the media container. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * The content type or mode. - */ - @JsonIgnore - public String content() { - return content; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - /** - * The prefix used for media tag resource paths. - */ - @JsonIgnore - public String mediaTagPrefix() { - return mediaTagPrefix; - } - - /** - * The version number for media tags. - */ - @JsonIgnore - public long mediaTagVersion() { - return mediaTagVersion; - } - - /** - * Specifies whether caching is disabled. - */ - @JsonIgnore - public boolean nocache() { - return nocache; - } - - /** - * URL for the thumbnail image of the media container. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The primary title of the media container. - */ - @JsonIgnore - public String title1() { - return title1; - } - - /** - * The secondary title of the media container. - */ - @JsonIgnore - public String title2() { - return title2; - } - - /** - * Identifier for the view group layout. - */ - @JsonIgnore - public String viewGroup() { - return viewGroup; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> directory() { - return (Optional>) directory; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetGenresLibraryMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * Indicates whether syncing is allowed. - */ - public GetGenresLibraryMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - /** - * URL for the background artwork of the media container. - */ - public GetGenresLibraryMediaContainer withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * The content type or mode. - */ - public GetGenresLibraryMediaContainer withContent(String content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetGenresLibraryMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - /** - * The prefix used for media tag resource paths. - */ - public GetGenresLibraryMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - /** - * The version number for media tags. - */ - public GetGenresLibraryMediaContainer withMediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - /** - * Specifies whether caching is disabled. - */ - public GetGenresLibraryMediaContainer withNocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - /** - * URL for the thumbnail image of the media container. - */ - public GetGenresLibraryMediaContainer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The primary title of the media container. - */ - public GetGenresLibraryMediaContainer withTitle1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - /** - * The secondary title of the media container. - */ - public GetGenresLibraryMediaContainer withTitle2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - /** - * Identifier for the view group layout. - */ - public GetGenresLibraryMediaContainer withViewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - public GetGenresLibraryMediaContainer withDirectory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - - public GetGenresLibraryMediaContainer withDirectory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGenresLibraryMediaContainer other = (GetGenresLibraryMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.content, other.content) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.nocache, other.nocache) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title1, other.title1) && - Utils.enhancedDeepEquals(this.title2, other.title2) && - Utils.enhancedDeepEquals(this.viewGroup, other.viewGroup) && - Utils.enhancedDeepEquals(this.directory, other.directory); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowSync, art, - content, identifier, mediaTagPrefix, - mediaTagVersion, nocache, thumb, - title1, title2, viewGroup, - directory); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryMediaContainer.class, - "size", size, - "allowSync", allowSync, - "art", art, - "content", content, - "identifier", identifier, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "nocache", nocache, - "thumb", thumb, - "title1", title1, - "title2", title2, - "viewGroup", viewGroup, - "directory", directory); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Boolean allowSync; - - private String art; - - private String content; - - private String identifier; - - private String mediaTagPrefix; - - private Long mediaTagVersion; - - private Boolean nocache; - - private String thumb; - - private String title1; - - private String title2; - - private String viewGroup; - - private Optional> directory = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * Indicates whether syncing is allowed. - */ - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - - /** - * URL for the background artwork of the media container. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * The content type or mode. - */ - public Builder content(String content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - /** - * The prefix used for media tag resource paths. - */ - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - - /** - * The version number for media tags. - */ - public Builder mediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - - /** - * Specifies whether caching is disabled. - */ - public Builder nocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - - /** - * URL for the thumbnail image of the media container. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The primary title of the media container. - */ - public Builder title1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - - /** - * The secondary title of the media container. - */ - public Builder title2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - - /** - * Identifier for the view group layout. - */ - public Builder viewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - - public Builder directory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - public Builder directory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - public GetGenresLibraryMediaContainer build() { - - return new GetGenresLibraryMediaContainer( - size, allowSync, art, - content, identifier, mediaTagPrefix, - mediaTagVersion, nocache, thumb, - title1, title2, viewGroup, - directory); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryQueryParamType.java deleted file mode 100644 index 65546107..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryQueryParamType.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ -@JsonDeserialize(using = GetGenresLibraryQueryParamType._Deserializer.class) -@JsonSerialize(using = GetGenresLibraryQueryParamType._Serializer.class) -public class GetGenresLibraryQueryParamType { - - public static final GetGenresLibraryQueryParamType Movie = new GetGenresLibraryQueryParamType(1L); - public static final GetGenresLibraryQueryParamType TvShow = new GetGenresLibraryQueryParamType(2L); - public static final GetGenresLibraryQueryParamType Season = new GetGenresLibraryQueryParamType(3L); - public static final GetGenresLibraryQueryParamType Episode = new GetGenresLibraryQueryParamType(4L); - public static final GetGenresLibraryQueryParamType Artist = new GetGenresLibraryQueryParamType(5L); - public static final GetGenresLibraryQueryParamType Album = new GetGenresLibraryQueryParamType(6L); - public static final GetGenresLibraryQueryParamType Track = new GetGenresLibraryQueryParamType(7L); - public static final GetGenresLibraryQueryParamType PhotoAlbum = new GetGenresLibraryQueryParamType(8L); - public static final GetGenresLibraryQueryParamType Photo = new GetGenresLibraryQueryParamType(9L); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final long value; - - private GetGenresLibraryQueryParamType(long value) { - this.value = value; - } - - /** - * Returns a GetGenresLibraryQueryParamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetGenresLibraryQueryParamType - */ - public static GetGenresLibraryQueryParamType of(long value) { - synchronized (GetGenresLibraryQueryParamType.class) { - return values.computeIfAbsent(value, v -> new GetGenresLibraryQueryParamType(v)); - } - } - - public long value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetGenresLibraryQueryParamType other = (GetGenresLibraryQueryParamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetGenresLibraryQueryParamType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetGenresLibraryQueryParamType[] values() { - synchronized (GetGenresLibraryQueryParamType.class) { - return values.values().toArray(new GetGenresLibraryQueryParamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1L, Movie); - map.put(2L, TvShow); - map.put(3L, Season); - map.put(4L, Episode); - map.put(5L, Artist); - map.put(6L, Album); - map.put(7L, Track); - map.put(8L, PhotoAlbum); - map.put(9L, Photo); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1L, GetGenresLibraryQueryParamTypeEnum.Movie); - map.put(2L, GetGenresLibraryQueryParamTypeEnum.TvShow); - map.put(3L, GetGenresLibraryQueryParamTypeEnum.Season); - map.put(4L, GetGenresLibraryQueryParamTypeEnum.Episode); - map.put(5L, GetGenresLibraryQueryParamTypeEnum.Artist); - map.put(6L, GetGenresLibraryQueryParamTypeEnum.Album); - map.put(7L, GetGenresLibraryQueryParamTypeEnum.Track); - map.put(8L, GetGenresLibraryQueryParamTypeEnum.PhotoAlbum); - map.put(9L, GetGenresLibraryQueryParamTypeEnum.Photo); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetGenresLibraryQueryParamType.class); - } - - @Override - public void serialize(GetGenresLibraryQueryParamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetGenresLibraryQueryParamType.class); - } - - @Override - public GetGenresLibraryQueryParamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - long v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetGenresLibraryQueryParamType.of(v); - } - } - - public enum GetGenresLibraryQueryParamTypeEnum { - - Movie(1L), - TvShow(2L), - Season(3L), - Episode(4L), - Artist(5L), - Album(6L), - Track(7L), - PhotoAlbum(8L), - Photo(9L),; - - private final long value; - - private GetGenresLibraryQueryParamTypeEnum(long value) { - this.value = value; - } - - public long value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryRequest.java deleted file mode 100644 index 0be8fd8a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryRequest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - - -public class GetGenresLibraryRequest { - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey") - private int sectionKey; - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private GetGenresLibraryQueryParamType type; - - @JsonCreator - public GetGenresLibraryRequest( - int sectionKey, - GetGenresLibraryQueryParamType type) { - Utils.checkNotNull(sectionKey, "sectionKey"); - Utils.checkNotNull(type, "type"); - this.sectionKey = sectionKey; - this.type = type; - } - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @JsonIgnore - public int sectionKey() { - return sectionKey; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @JsonIgnore - public GetGenresLibraryQueryParamType type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public GetGenresLibraryRequest withSectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public GetGenresLibraryRequest withType(GetGenresLibraryQueryParamType 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; - } - GetGenresLibraryRequest other = (GetGenresLibraryRequest) o; - return - Utils.enhancedDeepEquals(this.sectionKey, other.sectionKey) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - sectionKey, type); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryRequest.class, - "sectionKey", sectionKey, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer sectionKey; - - private GetGenresLibraryQueryParamType type; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public Builder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public Builder type(GetGenresLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetGenresLibraryRequest build() { - - return new GetGenresLibraryRequest( - sectionKey, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryRequestBuilder.java deleted file mode 100644 index 2fe345bf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryRequestBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetGenresLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; - -public class GetGenresLibraryRequestBuilder { - - private Integer sectionKey; - private GetGenresLibraryQueryParamType type; - private final SDKConfiguration sdkConfiguration; - - public GetGenresLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetGenresLibraryRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - public GetGenresLibraryRequestBuilder type(GetGenresLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetGenresLibraryRequest buildRequest() { - - GetGenresLibraryRequest request = new GetGenresLibraryRequest(sectionKey, - type); - - return request; - } - - public GetGenresLibraryResponse call() throws Exception { - - RequestOperation operation - = new GetGenresLibrary.Sync(sdkConfiguration); - GetGenresLibraryRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryResponse.java deleted file mode 100644 index d0a0041c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetGenresLibraryResponse 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; - - /** - * Successful response containing media container data. - */ - private Optional object; - - @JsonCreator - public GetGenresLibraryResponse( - 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 GetGenresLibraryResponse( - 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; - } - - /** - * Successful response containing media container data. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetGenresLibraryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetGenresLibraryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGenresLibraryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response containing media container data. - */ - public GetGenresLibraryResponse withObject(GetGenresLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Successful response containing media container data. - */ - public GetGenresLibraryResponse 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; - } - GetGenresLibraryResponse other = (GetGenresLibraryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Successful response containing media container data. - */ - public Builder object(GetGenresLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Successful response containing media container data. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetGenresLibraryResponse build() { - - return new GetGenresLibraryResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryResponseBody.java deleted file mode 100644 index 065bb2ff..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGenresLibraryResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetGenresLibraryResponseBody - * - *

Successful response containing media container data. - */ -public class GetGenresLibraryResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetGenresLibraryResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetGenresLibraryResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGenresLibraryResponseBody withMediaContainer(GetGenresLibraryMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetGenresLibraryResponseBody 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; - } - GetGenresLibraryResponseBody other = (GetGenresLibraryResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetGenresLibraryMediaContainer 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 GetGenresLibraryResponseBody build() { - - return new GetGenresLibraryResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataGeoData.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataGeoData.java deleted file mode 100644 index e59be7c0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataGeoData.java +++ /dev/null @@ -1,619 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - -/** - * GetGeoDataGeoData - * - *

Geo location data - */ -public class GetGeoDataGeoData { - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - @JsonProperty("code") - private String code; - - /** - * The continent code where the country is located. - */ - @JsonProperty("continent_code") - private String continentCode; - - /** - * The official name of the country. - */ - @JsonProperty("country") - private String country; - - /** - * The name of the city. - */ - @JsonProperty("city") - private String city; - - /** - * Indicates if the country is a member of the European Union. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("european_union_member") - private Optional europeanUnionMember; - - /** - * The time zone of the country. - */ - @JsonProperty("time_zone") - private String timeZone; - - /** - * The postal code of the location. - */ - @JsonProperty("postal_code") - private String postalCode; - - /** - * Indicates if the country has privacy restrictions. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("in_privacy_restricted_country") - private Optional inPrivacyRestrictedCountry; - - /** - * Indicates if the region has privacy restrictions. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("in_privacy_restricted_region") - private Optional inPrivacyRestrictedRegion; - - /** - * The name of the primary administrative subdivision. - */ - @JsonProperty("subdivisions") - private String subdivisions; - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - @JsonProperty("coordinates") - private String coordinates; - - @JsonCreator - public GetGeoDataGeoData( - @JsonProperty("code") String code, - @JsonProperty("continent_code") String continentCode, - @JsonProperty("country") String country, - @JsonProperty("city") String city, - @JsonProperty("european_union_member") Optional europeanUnionMember, - @JsonProperty("time_zone") String timeZone, - @JsonProperty("postal_code") String postalCode, - @JsonProperty("in_privacy_restricted_country") Optional inPrivacyRestrictedCountry, - @JsonProperty("in_privacy_restricted_region") Optional inPrivacyRestrictedRegion, - @JsonProperty("subdivisions") String subdivisions, - @JsonProperty("coordinates") String coordinates) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(continentCode, "continentCode"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(city, "city"); - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - Utils.checkNotNull(timeZone, "timeZone"); - Utils.checkNotNull(postalCode, "postalCode"); - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - Utils.checkNotNull(subdivisions, "subdivisions"); - Utils.checkNotNull(coordinates, "coordinates"); - this.code = code; - this.continentCode = continentCode; - this.country = country; - this.city = city; - this.europeanUnionMember = europeanUnionMember; - this.timeZone = timeZone; - this.postalCode = postalCode; - this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; - this.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion; - this.subdivisions = subdivisions; - this.coordinates = coordinates; - } - - public GetGeoDataGeoData( - String code, - String continentCode, - String country, - String city, - String timeZone, - String postalCode, - String subdivisions, - String coordinates) { - this(code, continentCode, country, - city, Optional.empty(), timeZone, - postalCode, Optional.empty(), Optional.empty(), - subdivisions, coordinates); - } - - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - @JsonIgnore - public String code() { - return code; - } - - /** - * The continent code where the country is located. - */ - @JsonIgnore - public String continentCode() { - return continentCode; - } - - /** - * The official name of the country. - */ - @JsonIgnore - public String country() { - return country; - } - - /** - * The name of the city. - */ - @JsonIgnore - public String city() { - return city; - } - - /** - * Indicates if the country is a member of the European Union. - */ - @JsonIgnore - public Optional europeanUnionMember() { - return europeanUnionMember; - } - - /** - * The time zone of the country. - */ - @JsonIgnore - public String timeZone() { - return timeZone; - } - - /** - * The postal code of the location. - */ - @JsonIgnore - public String postalCode() { - return postalCode; - } - - /** - * Indicates if the country has privacy restrictions. - */ - @JsonIgnore - public Optional inPrivacyRestrictedCountry() { - return inPrivacyRestrictedCountry; - } - - /** - * Indicates if the region has privacy restrictions. - */ - @JsonIgnore - public Optional inPrivacyRestrictedRegion() { - return inPrivacyRestrictedRegion; - } - - /** - * The name of the primary administrative subdivision. - */ - @JsonIgnore - public String subdivisions() { - return subdivisions; - } - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - @JsonIgnore - public String coordinates() { - return coordinates; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - public GetGeoDataGeoData withCode(String code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - /** - * The continent code where the country is located. - */ - public GetGeoDataGeoData withContinentCode(String continentCode) { - Utils.checkNotNull(continentCode, "continentCode"); - this.continentCode = continentCode; - return this; - } - - /** - * The official name of the country. - */ - public GetGeoDataGeoData withCountry(String country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - /** - * The name of the city. - */ - public GetGeoDataGeoData withCity(String city) { - Utils.checkNotNull(city, "city"); - this.city = city; - return this; - } - - /** - * Indicates if the country is a member of the European Union. - */ - public GetGeoDataGeoData withEuropeanUnionMember(boolean europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = Optional.ofNullable(europeanUnionMember); - return this; - } - - - /** - * Indicates if the country is a member of the European Union. - */ - public GetGeoDataGeoData withEuropeanUnionMember(Optional europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = europeanUnionMember; - return this; - } - - /** - * The time zone of the country. - */ - public GetGeoDataGeoData withTimeZone(String timeZone) { - Utils.checkNotNull(timeZone, "timeZone"); - this.timeZone = timeZone; - return this; - } - - /** - * The postal code of the location. - */ - public GetGeoDataGeoData withPostalCode(String postalCode) { - Utils.checkNotNull(postalCode, "postalCode"); - this.postalCode = postalCode; - return this; - } - - /** - * Indicates if the country has privacy restrictions. - */ - public GetGeoDataGeoData withInPrivacyRestrictedCountry(boolean inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = Optional.ofNullable(inPrivacyRestrictedCountry); - return this; - } - - - /** - * Indicates if the country has privacy restrictions. - */ - public GetGeoDataGeoData withInPrivacyRestrictedCountry(Optional inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; - return this; - } - - /** - * Indicates if the region has privacy restrictions. - */ - public GetGeoDataGeoData withInPrivacyRestrictedRegion(boolean inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = Optional.ofNullable(inPrivacyRestrictedRegion); - return this; - } - - - /** - * Indicates if the region has privacy restrictions. - */ - public GetGeoDataGeoData withInPrivacyRestrictedRegion(Optional inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion; - return this; - } - - /** - * The name of the primary administrative subdivision. - */ - public GetGeoDataGeoData withSubdivisions(String subdivisions) { - Utils.checkNotNull(subdivisions, "subdivisions"); - this.subdivisions = subdivisions; - return this; - } - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - public GetGeoDataGeoData withCoordinates(String coordinates) { - Utils.checkNotNull(coordinates, "coordinates"); - this.coordinates = coordinates; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGeoDataGeoData other = (GetGeoDataGeoData) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.continentCode, other.continentCode) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.city, other.city) && - Utils.enhancedDeepEquals(this.europeanUnionMember, other.europeanUnionMember) && - Utils.enhancedDeepEquals(this.timeZone, other.timeZone) && - Utils.enhancedDeepEquals(this.postalCode, other.postalCode) && - Utils.enhancedDeepEquals(this.inPrivacyRestrictedCountry, other.inPrivacyRestrictedCountry) && - Utils.enhancedDeepEquals(this.inPrivacyRestrictedRegion, other.inPrivacyRestrictedRegion) && - Utils.enhancedDeepEquals(this.subdivisions, other.subdivisions) && - Utils.enhancedDeepEquals(this.coordinates, other.coordinates); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, continentCode, country, - city, europeanUnionMember, timeZone, - postalCode, inPrivacyRestrictedCountry, inPrivacyRestrictedRegion, - subdivisions, coordinates); - } - - @Override - public String toString() { - return Utils.toString(GetGeoDataGeoData.class, - "code", code, - "continentCode", continentCode, - "country", country, - "city", city, - "europeanUnionMember", europeanUnionMember, - "timeZone", timeZone, - "postalCode", postalCode, - "inPrivacyRestrictedCountry", inPrivacyRestrictedCountry, - "inPrivacyRestrictedRegion", inPrivacyRestrictedRegion, - "subdivisions", subdivisions, - "coordinates", coordinates); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String code; - - private String continentCode; - - private String country; - - private String city; - - private Optional europeanUnionMember; - - private String timeZone; - - private String postalCode; - - private Optional inPrivacyRestrictedCountry; - - private Optional inPrivacyRestrictedRegion; - - private String subdivisions; - - private String coordinates; - - private Builder() { - // force use of static builder() method - } - - - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - public Builder code(String code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - /** - * The continent code where the country is located. - */ - public Builder continentCode(String continentCode) { - Utils.checkNotNull(continentCode, "continentCode"); - this.continentCode = continentCode; - return this; - } - - - /** - * The official name of the country. - */ - public Builder country(String country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - - /** - * The name of the city. - */ - public Builder city(String city) { - Utils.checkNotNull(city, "city"); - this.city = city; - return this; - } - - - /** - * Indicates if the country is a member of the European Union. - */ - public Builder europeanUnionMember(boolean europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = Optional.ofNullable(europeanUnionMember); - return this; - } - - /** - * Indicates if the country is a member of the European Union. - */ - public Builder europeanUnionMember(Optional europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = europeanUnionMember; - return this; - } - - - /** - * The time zone of the country. - */ - public Builder timeZone(String timeZone) { - Utils.checkNotNull(timeZone, "timeZone"); - this.timeZone = timeZone; - return this; - } - - - /** - * The postal code of the location. - */ - public Builder postalCode(String postalCode) { - Utils.checkNotNull(postalCode, "postalCode"); - this.postalCode = postalCode; - return this; - } - - - /** - * Indicates if the country has privacy restrictions. - */ - public Builder inPrivacyRestrictedCountry(boolean inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = Optional.ofNullable(inPrivacyRestrictedCountry); - return this; - } - - /** - * Indicates if the country has privacy restrictions. - */ - public Builder inPrivacyRestrictedCountry(Optional inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; - return this; - } - - - /** - * Indicates if the region has privacy restrictions. - */ - public Builder inPrivacyRestrictedRegion(boolean inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = Optional.ofNullable(inPrivacyRestrictedRegion); - return this; - } - - /** - * Indicates if the region has privacy restrictions. - */ - public Builder inPrivacyRestrictedRegion(Optional inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion; - return this; - } - - - /** - * The name of the primary administrative subdivision. - */ - public Builder subdivisions(String subdivisions) { - Utils.checkNotNull(subdivisions, "subdivisions"); - this.subdivisions = subdivisions; - return this; - } - - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - public Builder coordinates(String coordinates) { - Utils.checkNotNull(coordinates, "coordinates"); - this.coordinates = coordinates; - return this; - } - - public GetGeoDataGeoData build() { - if (europeanUnionMember == null) { - europeanUnionMember = _SINGLETON_VALUE_EuropeanUnionMember.value(); - } - if (inPrivacyRestrictedCountry == null) { - inPrivacyRestrictedCountry = _SINGLETON_VALUE_InPrivacyRestrictedCountry.value(); - } - if (inPrivacyRestrictedRegion == null) { - inPrivacyRestrictedRegion = _SINGLETON_VALUE_InPrivacyRestrictedRegion.value(); - } - - return new GetGeoDataGeoData( - code, continentCode, country, - city, europeanUnionMember, timeZone, - postalCode, inPrivacyRestrictedCountry, inPrivacyRestrictedRegion, - subdivisions, coordinates); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_EuropeanUnionMember = - new LazySingletonValue<>( - "european_union_member", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_InPrivacyRestrictedCountry = - new LazySingletonValue<>( - "in_privacy_restricted_country", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_InPrivacyRestrictedRegion = - new LazySingletonValue<>( - "in_privacy_restricted_region", - "false", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataRequestBuilder.java deleted file mode 100644 index 5353cecd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataRequestBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetGeoData; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetGeoDataRequestBuilder { - - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetGeoDataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetGeoDataRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetGeoDataRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public GetGeoDataResponse call() throws Exception { - - RequestlessOperation operation - = new GetGeoData.Sync(sdkConfiguration, serverURL); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataResponse.java deleted file mode 100644 index d97c6b5a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetGeoDataResponse 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; - - /** - * Gets the geo location data of the user - */ - private Optional geoData; - - @JsonCreator - public GetGeoDataResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional geoData) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(geoData, "geoData"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.geoData = geoData; - } - - public GetGeoDataResponse( - 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; - } - - /** - * Gets the geo location data of the user - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional geoData() { - return (Optional) geoData; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetGeoDataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetGeoDataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGeoDataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Gets the geo location data of the user - */ - public GetGeoDataResponse withGeoData(GetGeoDataGeoData geoData) { - Utils.checkNotNull(geoData, "geoData"); - this.geoData = Optional.ofNullable(geoData); - return this; - } - - - /** - * Gets the geo location data of the user - */ - public GetGeoDataResponse withGeoData(Optional geoData) { - Utils.checkNotNull(geoData, "geoData"); - this.geoData = geoData; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGeoDataResponse other = (GetGeoDataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.geoData, other.geoData); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - geoData); - } - - @Override - public String toString() { - return Utils.toString(GetGeoDataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "geoData", geoData); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional geoData = 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; - } - - - /** - * Gets the geo location data of the user - */ - public Builder geoData(GetGeoDataGeoData geoData) { - Utils.checkNotNull(geoData, "geoData"); - this.geoData = Optional.ofNullable(geoData); - return this; - } - - /** - * Gets the geo location data of the user - */ - public Builder geoData(Optional geoData) { - Utils.checkNotNull(geoData, "geoData"); - this.geoData = geoData; - return this; - } - - public GetGeoDataResponse build() { - - return new GetGeoDataResponse( - contentType, statusCode, rawResponse, - geoData); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsMediaContainer.java deleted file mode 100644 index c60055d0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsMediaContainer.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetGlobalHubsMediaContainer { - - @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("Hub") - private Optional> hub; - - @JsonCreator - public GetGlobalHubsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("allowSync") Optional allowSync, - @JsonProperty("identifier") Optional identifier, - @JsonProperty("Hub") Optional> hub) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(hub, "hub"); - this.size = size; - this.allowSync = allowSync; - this.identifier = identifier; - this.hub = hub; - } - - public GetGlobalHubsMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional allowSync() { - return allowSync; - } - - @JsonIgnore - public Optional identifier() { - return identifier; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> hub() { - return (Optional>) hub; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGlobalHubsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetGlobalHubsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetGlobalHubsMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); - return this; - } - - - public GetGlobalHubsMediaContainer withAllowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - public GetGlobalHubsMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = Optional.ofNullable(identifier); - return this; - } - - - public GetGlobalHubsMediaContainer withIdentifier(Optional identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public GetGlobalHubsMediaContainer withHub(List hub) { - Utils.checkNotNull(hub, "hub"); - this.hub = Optional.ofNullable(hub); - return this; - } - - - public GetGlobalHubsMediaContainer withHub(Optional> hub) { - Utils.checkNotNull(hub, "hub"); - this.hub = hub; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGlobalHubsMediaContainer other = (GetGlobalHubsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.hub, other.hub); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowSync, identifier, - hub); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsMediaContainer.class, - "size", size, - "allowSync", allowSync, - "identifier", identifier, - "hub", hub); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional allowSync = Optional.empty(); - - private Optional identifier = Optional.empty(); - - private Optional> hub = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 hub(List hub) { - Utils.checkNotNull(hub, "hub"); - this.hub = Optional.ofNullable(hub); - return this; - } - - public Builder hub(Optional> hub) { - Utils.checkNotNull(hub, "hub"); - this.hub = hub; - return this; - } - - public GetGlobalHubsMediaContainer build() { - - return new GetGlobalHubsMediaContainer( - size, allowSync, identifier, - hub); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsMetadata.java deleted file mode 100644 index 5839b593..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsMetadata.java +++ /dev/null @@ -1,816 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetGlobalHubsMetadata { - - @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("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("titleSort") - private Optional titleSort; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("summary") - private Optional summary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("smart") - private Optional smart; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("playlistType") - private Optional playlistType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("composite") - private Optional composite; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("icon") - private Optional icon; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("addedAt") - private Optional addedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - @JsonCreator - public GetGlobalHubsMetadata( - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("key") Optional key, - @JsonProperty("guid") Optional guid, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, - @JsonProperty("titleSort") Optional titleSort, - @JsonProperty("summary") Optional summary, - @JsonProperty("smart") Optional smart, - @JsonProperty("playlistType") Optional playlistType, - @JsonProperty("composite") Optional composite, - @JsonProperty("icon") Optional icon, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("duration") Optional duration, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("updatedAt") Optional updatedAt) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(titleSort, "titleSort"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(smart, "smart"); - Utils.checkNotNull(playlistType, "playlistType"); - Utils.checkNotNull(composite, "composite"); - Utils.checkNotNull(icon, "icon"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.type = type; - this.title = title; - this.titleSort = titleSort; - this.summary = summary; - this.smart = smart; - this.playlistType = playlistType; - this.composite = composite; - this.icon = icon; - this.viewCount = viewCount; - this.lastViewedAt = lastViewedAt; - this.duration = duration; - this.leafCount = leafCount; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - } - - public GetGlobalHubsMetadata() { - 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()); - } - - @JsonIgnore - public Optional ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional guid() { - return guid; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional titleSort() { - return titleSort; - } - - @JsonIgnore - public Optional summary() { - return summary; - } - - @JsonIgnore - public Optional smart() { - return smart; - } - - @JsonIgnore - public Optional playlistType() { - return playlistType; - } - - @JsonIgnore - public Optional composite() { - return composite; - } - - @JsonIgnore - public Optional icon() { - return icon; - } - - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional addedAt() { - return addedAt; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGlobalHubsMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetGlobalHubsMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetGlobalHubsMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetGlobalHubsMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetGlobalHubsMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public GetGlobalHubsMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public GetGlobalHubsMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetGlobalHubsMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetGlobalHubsMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetGlobalHubsMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetGlobalHubsMetadata withTitleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = Optional.ofNullable(titleSort); - return this; - } - - - public GetGlobalHubsMetadata withTitleSort(Optional titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - public GetGlobalHubsMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public GetGlobalHubsMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public GetGlobalHubsMetadata withSmart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - - public GetGlobalHubsMetadata withSmart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - public GetGlobalHubsMetadata withPlaylistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - - public GetGlobalHubsMetadata withPlaylistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - public GetGlobalHubsMetadata withComposite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - - public GetGlobalHubsMetadata withComposite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - public GetGlobalHubsMetadata withIcon(String icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = Optional.ofNullable(icon); - return this; - } - - - public GetGlobalHubsMetadata withIcon(Optional icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = icon; - return this; - } - - public GetGlobalHubsMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - - public GetGlobalHubsMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - public GetGlobalHubsMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - - public GetGlobalHubsMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - public GetGlobalHubsMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetGlobalHubsMetadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetGlobalHubsMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - public GetGlobalHubsMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public GetGlobalHubsMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public GetGlobalHubsMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public GetGlobalHubsMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetGlobalHubsMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGlobalHubsMetadata other = (GetGlobalHubsMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.smart, other.smart) && - Utils.enhancedDeepEquals(this.playlistType, other.playlistType) && - Utils.enhancedDeepEquals(this.composite, other.composite) && - Utils.enhancedDeepEquals(this.icon, other.icon) && - Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && - Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - type, title, titleSort, - summary, smart, playlistType, - composite, icon, viewCount, - lastViewedAt, duration, leafCount, - addedAt, updatedAt); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "type", type, - "title", title, - "titleSort", titleSort, - "summary", summary, - "smart", smart, - "playlistType", playlistType, - "composite", composite, - "icon", icon, - "viewCount", viewCount, - "lastViewedAt", lastViewedAt, - "duration", duration, - "leafCount", leafCount, - "addedAt", addedAt, - "updatedAt", updatedAt); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional ratingKey = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional guid = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional titleSort = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional smart = Optional.empty(); - - private Optional playlistType = Optional.empty(); - - private Optional composite = Optional.empty(); - - private Optional icon = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional leafCount = Optional.empty(); - - private Optional addedAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder ratingKey(String 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 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 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 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 smart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - public Builder smart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - - public Builder playlistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - public Builder playlistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - - public Builder composite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - public Builder composite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - - public Builder icon(String icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = Optional.ofNullable(icon); - return this; - } - - public Builder icon(Optional icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = icon; - 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 duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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 addedAt(int 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(int 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 GetGlobalHubsMetadata build() { - - return new GetGlobalHubsMetadata( - ratingKey, key, guid, - type, title, titleSort, - summary, smart, playlistType, - composite, icon, viewCount, - lastViewedAt, duration, leafCount, - addedAt, updatedAt); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsRequest.java deleted file mode 100644 index 8717409f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsRequest.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetGlobalHubsRequest { - /** - * The number of items to return with each hub. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") - private Optional count; - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=onlyTransient") - private Optional onlyTransient; - - @JsonCreator - public GetGlobalHubsRequest( - Optional count, - Optional onlyTransient) { - Utils.checkNotNull(count, "count"); - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.count = count; - this.onlyTransient = onlyTransient; - } - - public GetGlobalHubsRequest() { - this(Optional.empty(), Optional.empty()); - } - - /** - * The number of items to return with each hub. - */ - @JsonIgnore - public Optional count() { - return count; - } - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional onlyTransient() { - return (Optional) onlyTransient; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The number of items to return with each hub. - */ - public GetGlobalHubsRequest withCount(double count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.ofNullable(count); - return this; - } - - - /** - * The number of items to return with each hub. - */ - public GetGlobalHubsRequest withCount(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - public GetGlobalHubsRequest withOnlyTransient(OnlyTransient onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = Optional.ofNullable(onlyTransient); - return this; - } - - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - public GetGlobalHubsRequest withOnlyTransient(Optional onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = onlyTransient; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGlobalHubsRequest other = (GetGlobalHubsRequest) o; - return - Utils.enhancedDeepEquals(this.count, other.count) && - Utils.enhancedDeepEquals(this.onlyTransient, other.onlyTransient); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - count, onlyTransient); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsRequest.class, - "count", count, - "onlyTransient", onlyTransient); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional count = Optional.empty(); - - private Optional onlyTransient = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The number of items to return with each hub. - */ - public Builder count(double count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.ofNullable(count); - return this; - } - - /** - * The number of items to return with each hub. - */ - public Builder count(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - public Builder onlyTransient(OnlyTransient onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = Optional.ofNullable(onlyTransient); - return this; - } - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - public Builder onlyTransient(Optional onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = onlyTransient; - return this; - } - - public GetGlobalHubsRequest build() { - - return new GetGlobalHubsRequest( - count, onlyTransient); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsRequestBuilder.java deleted file mode 100644 index 931e181b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsRequestBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetGlobalHubs; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.util.Optional; - -public class GetGlobalHubsRequestBuilder { - - private Optional count = Optional.empty(); - private Optional onlyTransient = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetGlobalHubsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetGlobalHubsRequestBuilder count(double count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.of(count); - return this; - } - - public GetGlobalHubsRequestBuilder count(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - public GetGlobalHubsRequestBuilder onlyTransient(OnlyTransient onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = Optional.of(onlyTransient); - return this; - } - - public GetGlobalHubsRequestBuilder onlyTransient(Optional onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = onlyTransient; - return this; - } - - - private GetGlobalHubsRequest buildRequest() { - - GetGlobalHubsRequest request = new GetGlobalHubsRequest(count, - onlyTransient); - - return request; - } - - public GetGlobalHubsResponse call() throws Exception { - - RequestOperation operation - = new GetGlobalHubs.Sync(sdkConfiguration); - GetGlobalHubsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsResponse.java deleted file mode 100644 index 244484db..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetGlobalHubsResponse 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; - - /** - * returns global hubs - */ - private Optional object; - - @JsonCreator - public GetGlobalHubsResponse( - 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 GetGlobalHubsResponse( - 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; - } - - /** - * returns global hubs - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetGlobalHubsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetGlobalHubsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGlobalHubsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * returns global hubs - */ - public GetGlobalHubsResponse withObject(GetGlobalHubsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * returns global hubs - */ - public GetGlobalHubsResponse 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; - } - GetGlobalHubsResponse other = (GetGlobalHubsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * returns global hubs - */ - public Builder object(GetGlobalHubsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * returns global hubs - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetGlobalHubsResponse build() { - - return new GetGlobalHubsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsResponseBody.java deleted file mode 100644 index 721c5dfe..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGlobalHubsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetGlobalHubsResponseBody - * - *

returns global hubs - */ -public class GetGlobalHubsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetGlobalHubsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetGlobalHubsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetGlobalHubsResponseBody withMediaContainer(GetGlobalHubsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetGlobalHubsResponseBody 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; - } - GetGlobalHubsResponseBody other = (GetGlobalHubsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetGlobalHubsMediaContainer 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 GetGlobalHubsResponseBody build() { - - return new GetGlobalHubsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemRequest.java new file mode 100644 index 00000000..569d5c39 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetHistoryItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the history item (the `historyKey` from above) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=historyId") + private long historyId; + + @JsonCreator + public GetHistoryItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long historyId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(historyId, "historyId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.historyId = historyId; + } + + public GetHistoryItemRequest( + long historyId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), historyId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the history item (the `historyKey` from above) + */ + @JsonIgnore + public long historyId() { + return historyId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetHistoryItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetHistoryItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetHistoryItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetHistoryItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetHistoryItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetHistoryItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetHistoryItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetHistoryItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetHistoryItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetHistoryItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetHistoryItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetHistoryItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetHistoryItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetHistoryItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetHistoryItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetHistoryItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetHistoryItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetHistoryItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetHistoryItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetHistoryItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetHistoryItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetHistoryItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the history item (the `historyKey` from above) + */ + public GetHistoryItemRequest withHistoryId(long historyId) { + Utils.checkNotNull(historyId, "historyId"); + this.historyId = historyId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetHistoryItemRequest other = (GetHistoryItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.historyId, other.historyId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, historyId); + } + + @Override + public String toString() { + return Utils.toString(GetHistoryItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "historyId", historyId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long historyId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the history item (the `historyKey` from above) + */ + public Builder historyId(long historyId) { + Utils.checkNotNull(historyId, "historyId"); + this.historyId = historyId; + return this; + } + + public GetHistoryItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetHistoryItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, historyId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemRequestBuilder.java new file mode 100644 index 00000000..492164df --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetHistoryItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetHistoryItemRequestBuilder { + + private GetHistoryItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetHistoryItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetHistoryItemRequestBuilder request(GetHistoryItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetHistoryItemResponse call() throws Exception { + + RequestOperation operation + = new GetHistoryItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemResponse.java new file mode 100644 index 00000000..014bbf44 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetHistoryItemResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.HistoryAllGetResponses200; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetHistoryItemResponse 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; + + /** + * OK + */ + private Optional historyAllGetResponses200; + + + private Map> headers; + + @JsonCreator + public GetHistoryItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional historyAllGetResponses200, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(historyAllGetResponses200, "historyAllGetResponses200"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.historyAllGetResponses200 = historyAllGetResponses200; + this.headers = headers; + } + + public GetHistoryItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional historyAllGetResponses200() { + return (Optional) historyAllGetResponses200; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetHistoryItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetHistoryItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetHistoryItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetHistoryItemResponse withHistoryAllGetResponses200(HistoryAllGetResponses200 historyAllGetResponses200) { + Utils.checkNotNull(historyAllGetResponses200, "historyAllGetResponses200"); + this.historyAllGetResponses200 = Optional.ofNullable(historyAllGetResponses200); + return this; + } + + + /** + * OK + */ + public GetHistoryItemResponse withHistoryAllGetResponses200(Optional historyAllGetResponses200) { + Utils.checkNotNull(historyAllGetResponses200, "historyAllGetResponses200"); + this.historyAllGetResponses200 = historyAllGetResponses200; + return this; + } + + public GetHistoryItemResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetHistoryItemResponse other = (GetHistoryItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.historyAllGetResponses200, other.historyAllGetResponses200) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + historyAllGetResponses200, headers); + } + + @Override + public String toString() { + return Utils.toString(GetHistoryItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "historyAllGetResponses200", historyAllGetResponses200, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional historyAllGetResponses200 = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder historyAllGetResponses200(HistoryAllGetResponses200 historyAllGetResponses200) { + Utils.checkNotNull(historyAllGetResponses200, "historyAllGetResponses200"); + this.historyAllGetResponses200 = Optional.ofNullable(historyAllGetResponses200); + return this; + } + + /** + * OK + */ + public Builder historyAllGetResponses200(Optional historyAllGetResponses200) { + Utils.checkNotNull(historyAllGetResponses200, "historyAllGetResponses200"); + this.historyAllGetResponses200 = historyAllGetResponses200; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetHistoryItemResponse build() { + + return new GetHistoryItemResponse( + contentType, statusCode, rawResponse, + historyAllGetResponses200, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataRequestBuilder.java deleted file mode 100644 index 35267408..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetHomeData; -import java.lang.Exception; - -public class GetHomeDataRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetHomeDataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetHomeDataResponse call() throws Exception { - - RequestlessOperation operation - = new GetHomeData.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataResponse.java deleted file mode 100644 index 6a26a7a0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetHomeDataResponse 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; - - /** - * Home Data - */ - private Optional object; - - @JsonCreator - public GetHomeDataResponse( - 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 GetHomeDataResponse( - 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; - } - - /** - * Home Data - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetHomeDataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetHomeDataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetHomeDataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Home Data - */ - public GetHomeDataResponse withObject(GetHomeDataResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Home Data - */ - public GetHomeDataResponse 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; - } - GetHomeDataResponse other = (GetHomeDataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetHomeDataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Home Data - */ - public Builder object(GetHomeDataResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Home Data - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetHomeDataResponse build() { - - return new GetHomeDataResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataResponseBody.java deleted file mode 100644 index a197a9a8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataResponseBody.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - -/** - * GetHomeDataResponseBody - * - *

Home Data - */ -public class GetHomeDataResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("name") - private Optional name; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("guestUserID") - private Optional guestUserID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("guestUserUUID") - private Optional guestUserUUID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("guestEnabled") - private Optional guestEnabled; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subscription") - private Optional subscription; - - @JsonCreator - public GetHomeDataResponseBody( - @JsonProperty("id") Optional id, - @JsonProperty("name") Optional name, - @JsonProperty("guestUserID") Optional guestUserID, - @JsonProperty("guestUserUUID") Optional guestUserUUID, - @JsonProperty("guestEnabled") Optional guestEnabled, - @JsonProperty("subscription") Optional subscription) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(guestUserID, "guestUserID"); - Utils.checkNotNull(guestUserUUID, "guestUserUUID"); - Utils.checkNotNull(guestEnabled, "guestEnabled"); - Utils.checkNotNull(subscription, "subscription"); - this.id = id; - this.name = name; - this.guestUserID = guestUserID; - this.guestUserUUID = guestUserUUID; - this.guestEnabled = guestEnabled; - this.subscription = subscription; - } - - public GetHomeDataResponseBody() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional name() { - return name; - } - - @JsonIgnore - public Optional guestUserID() { - return guestUserID; - } - - @JsonIgnore - public Optional guestUserUUID() { - return guestUserUUID; - } - - @JsonIgnore - public Optional guestEnabled() { - return guestEnabled; - } - - @JsonIgnore - public Optional subscription() { - return subscription; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetHomeDataResponseBody withId(double id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetHomeDataResponseBody withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetHomeDataResponseBody withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - - public GetHomeDataResponseBody withName(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public GetHomeDataResponseBody withGuestUserID(double guestUserID) { - Utils.checkNotNull(guestUserID, "guestUserID"); - this.guestUserID = Optional.ofNullable(guestUserID); - return this; - } - - - public GetHomeDataResponseBody withGuestUserID(Optional guestUserID) { - Utils.checkNotNull(guestUserID, "guestUserID"); - this.guestUserID = guestUserID; - return this; - } - - public GetHomeDataResponseBody withGuestUserUUID(String guestUserUUID) { - Utils.checkNotNull(guestUserUUID, "guestUserUUID"); - this.guestUserUUID = Optional.ofNullable(guestUserUUID); - return this; - } - - - public GetHomeDataResponseBody withGuestUserUUID(Optional guestUserUUID) { - Utils.checkNotNull(guestUserUUID, "guestUserUUID"); - this.guestUserUUID = guestUserUUID; - return this; - } - - public GetHomeDataResponseBody withGuestEnabled(boolean guestEnabled) { - Utils.checkNotNull(guestEnabled, "guestEnabled"); - this.guestEnabled = Optional.ofNullable(guestEnabled); - return this; - } - - - public GetHomeDataResponseBody withGuestEnabled(Optional guestEnabled) { - Utils.checkNotNull(guestEnabled, "guestEnabled"); - this.guestEnabled = guestEnabled; - return this; - } - - public GetHomeDataResponseBody withSubscription(boolean subscription) { - Utils.checkNotNull(subscription, "subscription"); - this.subscription = Optional.ofNullable(subscription); - return this; - } - - - public GetHomeDataResponseBody withSubscription(Optional subscription) { - Utils.checkNotNull(subscription, "subscription"); - this.subscription = subscription; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetHomeDataResponseBody other = (GetHomeDataResponseBody) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.guestUserID, other.guestUserID) && - Utils.enhancedDeepEquals(this.guestUserUUID, other.guestUserUUID) && - Utils.enhancedDeepEquals(this.guestEnabled, other.guestEnabled) && - Utils.enhancedDeepEquals(this.subscription, other.subscription); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, name, guestUserID, - guestUserUUID, guestEnabled, subscription); - } - - @Override - public String toString() { - return Utils.toString(GetHomeDataResponseBody.class, - "id", id, - "name", name, - "guestUserID", guestUserID, - "guestUserUUID", guestUserUUID, - "guestEnabled", guestEnabled, - "subscription", subscription); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional guestUserID = Optional.empty(); - - private Optional guestUserUUID = Optional.empty(); - - private Optional guestEnabled = Optional.empty(); - - private Optional subscription = 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 name(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - public Builder name(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder guestUserID(double guestUserID) { - Utils.checkNotNull(guestUserID, "guestUserID"); - this.guestUserID = Optional.ofNullable(guestUserID); - return this; - } - - public Builder guestUserID(Optional guestUserID) { - Utils.checkNotNull(guestUserID, "guestUserID"); - this.guestUserID = guestUserID; - return this; - } - - - public Builder guestUserUUID(String guestUserUUID) { - Utils.checkNotNull(guestUserUUID, "guestUserUUID"); - this.guestUserUUID = Optional.ofNullable(guestUserUUID); - return this; - } - - public Builder guestUserUUID(Optional guestUserUUID) { - Utils.checkNotNull(guestUserUUID, "guestUserUUID"); - this.guestUserUUID = guestUserUUID; - return this; - } - - - public Builder guestEnabled(boolean guestEnabled) { - Utils.checkNotNull(guestEnabled, "guestEnabled"); - this.guestEnabled = Optional.ofNullable(guestEnabled); - return this; - } - - public Builder guestEnabled(Optional guestEnabled) { - Utils.checkNotNull(guestEnabled, "guestEnabled"); - this.guestEnabled = guestEnabled; - return this; - } - - - public Builder subscription(boolean subscription) { - Utils.checkNotNull(subscription, "subscription"); - this.subscription = Optional.ofNullable(subscription); - return this; - } - - public Builder subscription(Optional subscription) { - Utils.checkNotNull(subscription, "subscription"); - this.subscription = subscription; - return this; - } - - public GetHomeDataResponseBody build() { - - return new GetHomeDataResponseBody( - id, name, guestUserID, - guestUserUUID, guestEnabled, subscription); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsRequest.java new file mode 100644 index 00000000..99183846 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsRequest.java @@ -0,0 +1,843 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class GetHubItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Limit results to count items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + /** + * If provided, limit to only specified hubs + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=identifier") + private List identifier; + + @JsonCreator + public GetHubItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional count, + List identifier) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(identifier, "identifier"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.count = count; + this.identifier = identifier; + } + + public GetHubItemsRequest( + List identifier) { + 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(), + identifier); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Limit results to count items + */ + @JsonIgnore + public Optional count() { + return count; + } + + /** + * If provided, limit to only specified hubs + */ + @JsonIgnore + public List identifier() { + return identifier; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetHubItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetHubItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetHubItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetHubItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetHubItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetHubItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetHubItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetHubItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetHubItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetHubItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetHubItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetHubItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetHubItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetHubItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetHubItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetHubItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetHubItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetHubItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetHubItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetHubItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetHubItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetHubItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Limit results to count items + */ + public GetHubItemsRequest withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + /** + * Limit results to count items + */ + public GetHubItemsRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * If provided, limit to only specified hubs + */ + public GetHubItemsRequest withIdentifier(List identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetHubItemsRequest other = (GetHubItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.count, other.count) && + Utils.enhancedDeepEquals(this.identifier, other.identifier); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, count, + identifier); + } + + @Override + public String toString() { + return Utils.toString(GetHubItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "count", count, + "identifier", identifier); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional count = Optional.empty(); + + private List identifier; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Limit results to count items + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * Limit results to count items + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + + /** + * If provided, limit to only specified hubs + */ + public Builder identifier(List identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetHubItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetHubItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, count, + identifier); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsRequestBuilder.java new file mode 100644 index 00000000..8387c777 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetHubItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetHubItemsRequestBuilder { + + private GetHubItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetHubItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetHubItemsRequestBuilder request(GetHubItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetHubItemsResponse call() throws Exception { + + RequestOperation operation + = new GetHubItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsResponse.java new file mode 100644 index 00000000..f4e2460e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetHubItemsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetHubItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetHubItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetHubItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetHubItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetHubItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetHubItemsResponse withObject(GetHubItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetHubItemsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetHubItemsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetHubItemsResponse other = (GetHubItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetHubItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetHubItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetHubItemsResponse build() { + + return new GetHubItemsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsResponseBody.java new file mode 100644 index 00000000..9f191393 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetHubItemsResponseBody.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.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.models.shared.MediaContainer; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +/** + * GetHubItemsResponseBody + * + *

OK + */ +public class GetHubItemsResponseBody { + /** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetHubItemsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetHubItemsResponseBody() { + this(Optional.empty()); + } + + /** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ + public GetHubItemsResponseBody withMediaContainer(MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + /** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ + public GetHubItemsResponseBody 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; + } + GetHubItemsResponseBody other = (GetHubItemsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetHubItemsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ + public Builder mediaContainer(MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + /** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetHubItemsResponseBody build() { + + return new GetHubItemsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityMediaContainer.java new file mode 100644 index 00000000..ad9c93d6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityMediaContainer.java @@ -0,0 +1,296 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GetIdentityMediaContainer { + /** + * Indicates whether this server has been claimed by a user + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("claimed") + private Optional claimed; + + /** + * A unique identifier of the computer + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("machineIdentifier") + private Optional machineIdentifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The full version string of the PMS + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + @JsonCreator + public GetIdentityMediaContainer( + @JsonProperty("claimed") Optional claimed, + @JsonProperty("machineIdentifier") Optional machineIdentifier, + @JsonProperty("size") Optional size, + @JsonProperty("version") Optional version) { + Utils.checkNotNull(claimed, "claimed"); + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(version, "version"); + this.claimed = claimed; + this.machineIdentifier = machineIdentifier; + this.size = size; + this.version = version; + } + + public GetIdentityMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Indicates whether this server has been claimed by a user + */ + @JsonIgnore + public Optional claimed() { + return claimed; + } + + /** + * A unique identifier of the computer + */ + @JsonIgnore + public Optional machineIdentifier() { + return machineIdentifier; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The full version string of the PMS + */ + @JsonIgnore + public Optional version() { + return version; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates whether this server has been claimed by a user + */ + public GetIdentityMediaContainer withClaimed(boolean claimed) { + Utils.checkNotNull(claimed, "claimed"); + this.claimed = Optional.ofNullable(claimed); + return this; + } + + + /** + * Indicates whether this server has been claimed by a user + */ + public GetIdentityMediaContainer withClaimed(Optional claimed) { + Utils.checkNotNull(claimed, "claimed"); + this.claimed = claimed; + return this; + } + + /** + * A unique identifier of the computer + */ + public GetIdentityMediaContainer withMachineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + + /** + * A unique identifier of the computer + */ + public GetIdentityMediaContainer withMachineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public GetIdentityMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetIdentityMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The full version string of the PMS + */ + public GetIdentityMediaContainer withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The full version string of the PMS + */ + public GetIdentityMediaContainer withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetIdentityMediaContainer other = (GetIdentityMediaContainer) o; + return + Utils.enhancedDeepEquals(this.claimed, other.claimed) && + Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.version, other.version); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + claimed, machineIdentifier, size, + version); + } + + @Override + public String toString() { + return Utils.toString(GetIdentityMediaContainer.class, + "claimed", claimed, + "machineIdentifier", machineIdentifier, + "size", size, + "version", version); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional claimed = Optional.empty(); + + private Optional machineIdentifier = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional version = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates whether this server has been claimed by a user + */ + public Builder claimed(boolean claimed) { + Utils.checkNotNull(claimed, "claimed"); + this.claimed = Optional.ofNullable(claimed); + return this; + } + + /** + * Indicates whether this server has been claimed by a user + */ + public Builder claimed(Optional claimed) { + Utils.checkNotNull(claimed, "claimed"); + this.claimed = claimed; + return this; + } + + + /** + * A unique identifier of the computer + */ + public Builder machineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + /** + * A unique identifier of the computer + */ + public Builder machineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The full version string of the PMS + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The full version string of the PMS + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public GetIdentityMediaContainer build() { + + return new GetIdentityMediaContainer( + claimed, machineIdentifier, size, + version); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityRequestBuilder.java new file mode 100644 index 00000000..b654feef --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetIdentity; +import java.lang.Exception; + +public class GetIdentityRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetIdentityRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetIdentityResponse call() throws Exception { + + RequestlessOperation operation + = new GetIdentity.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityResponse.java new file mode 100644 index 00000000..aac957b9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetIdentityResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetIdentityResponse( + 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 GetIdentityResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetIdentityResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetIdentityResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetIdentityResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetIdentityResponse withObject(GetIdentityResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetIdentityResponse 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; + } + GetIdentityResponse other = (GetIdentityResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetIdentityResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetIdentityResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetIdentityResponse build() { + + return new GetIdentityResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityResponseBody.java new file mode 100644 index 00000000..ab75c062 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetIdentityResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetIdentityResponseBody + * + *

OK + */ +public class GetIdentityResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetIdentityResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetIdentityResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetIdentityResponseBody withMediaContainer(GetIdentityMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetIdentityResponseBody 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; + } + GetIdentityResponseBody other = (GetIdentityResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetIdentityResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetIdentityMediaContainer 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 GetIdentityResponseBody build() { + + return new GetIdentityResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifRequest.java new file mode 100644 index 00000000..7def54c6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifRequest.java @@ -0,0 +1,865 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetImageFromBifRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The part id who's index is to be fetched + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=partId") + private long partId; + + /** + * The type of index to grab. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=index") + private PathParamIndex index; + + /** + * The offset to seek in ms. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=offset") + private long offset; + + @JsonCreator + public GetImageFromBifRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long partId, + PathParamIndex index, + long offset) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(partId, "partId"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(offset, "offset"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.partId = partId; + this.index = index; + this.offset = offset; + } + + public GetImageFromBifRequest( + long partId, + PathParamIndex index, + long offset) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), partId, + index, offset); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The part id who's index is to be fetched + */ + @JsonIgnore + public long partId() { + return partId; + } + + /** + * The type of index to grab. + */ + @JsonIgnore + public PathParamIndex index() { + return index; + } + + /** + * The offset to seek in ms. + */ + @JsonIgnore + public long offset() { + return offset; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetImageFromBifRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetImageFromBifRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetImageFromBifRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetImageFromBifRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetImageFromBifRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetImageFromBifRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetImageFromBifRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetImageFromBifRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetImageFromBifRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetImageFromBifRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetImageFromBifRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetImageFromBifRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetImageFromBifRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetImageFromBifRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetImageFromBifRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetImageFromBifRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetImageFromBifRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetImageFromBifRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetImageFromBifRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetImageFromBifRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetImageFromBifRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetImageFromBifRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The part id who's index is to be fetched + */ + public GetImageFromBifRequest withPartId(long partId) { + Utils.checkNotNull(partId, "partId"); + this.partId = partId; + return this; + } + + /** + * The type of index to grab. + */ + public GetImageFromBifRequest withIndex(PathParamIndex index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * The offset to seek in ms. + */ + public GetImageFromBifRequest withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetImageFromBifRequest other = (GetImageFromBifRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.partId, other.partId) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.offset, other.offset); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, partId, + index, offset); + } + + @Override + public String toString() { + return Utils.toString(GetImageFromBifRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "partId", partId, + "index", index, + "offset", offset); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long partId; + + private PathParamIndex index; + + private Long offset; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The part id who's index is to be fetched + */ + public Builder partId(long partId) { + Utils.checkNotNull(partId, "partId"); + this.partId = partId; + return this; + } + + + /** + * The type of index to grab. + */ + public Builder index(PathParamIndex index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * The offset to seek in ms. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetImageFromBifRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetImageFromBifRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, partId, + index, offset); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifRequestBuilder.java new file mode 100644 index 00000000..e85fe7f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetImageFromBif; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetImageFromBifRequestBuilder { + + private GetImageFromBifRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetImageFromBifRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetImageFromBifRequestBuilder request(GetImageFromBifRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetImageFromBifResponse call() throws Exception { + + RequestOperation operation + = new GetImageFromBif.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifResponse.java new file mode 100644 index 00000000..fe37e664 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetImageFromBifResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetImageFromBifResponse 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetImageFromBifResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetImageFromBifResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetImageFromBifResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetImageFromBifResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetImageFromBifResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetImageFromBifResponse withResponseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetImageFromBifResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetImageFromBifResponse other = (GetImageFromBifResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetImageFromBifResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetImageFromBifResponse build() { + + return new GetImageFromBifResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetImageRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetImageRequest.java new file mode 100644 index 00000000..beae2eb8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetImageRequest.java @@ -0,0 +1,1160 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetImageRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The base color (hex) for the top left quadrant. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=topLeft") + private Optional topLeft; + + /** + * The base color (hex) for the top right quadrant. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=topRight") + private Optional topRight; + + /** + * The base color (hex) for the bottom right quadrant. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=bottomRight") + private Optional bottomRight; + + /** + * The base color (hex) for the bottom left quadrant. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=bottomLeft") + private Optional bottomLeft; + + /** + * Width in pixels for the image. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=width") + private Optional width; + + /** + * Height in pixels for the image. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=height") + private Optional height; + + /** + * Whether to add noise to the ouput image. Noise can reduce color banding with the gradients. Image sizes with noise will be larger. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=noise") + private Optional noise; + + @JsonCreator + public GetImageRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional topLeft, + Optional topRight, + Optional bottomRight, + Optional bottomLeft, + Optional width, + Optional height, + Optional noise) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(topLeft, "topLeft"); + Utils.checkNotNull(topRight, "topRight"); + Utils.checkNotNull(bottomRight, "bottomRight"); + Utils.checkNotNull(bottomLeft, "bottomLeft"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(noise, "noise"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.topLeft = topLeft; + this.topRight = topRight; + this.bottomRight = bottomRight; + this.bottomLeft = bottomLeft; + this.width = width; + this.height = height; + this.noise = noise; + } + + public GetImageRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The base color (hex) for the top left quadrant. + */ + @JsonIgnore + public Optional topLeft() { + return topLeft; + } + + /** + * The base color (hex) for the top right quadrant. + */ + @JsonIgnore + public Optional topRight() { + return topRight; + } + + /** + * The base color (hex) for the bottom right quadrant. + */ + @JsonIgnore + public Optional bottomRight() { + return bottomRight; + } + + /** + * The base color (hex) for the bottom left quadrant. + */ + @JsonIgnore + public Optional bottomLeft() { + return bottomLeft; + } + + /** + * Width in pixels for the image. + */ + @JsonIgnore + public Optional width() { + return width; + } + + /** + * Height in pixels for the image. + */ + @JsonIgnore + public Optional height() { + return height; + } + + /** + * Whether to add noise to the ouput image. Noise can reduce color banding with the gradients. Image sizes with noise will be larger. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional noise() { + return (Optional) noise; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetImageRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetImageRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetImageRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetImageRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetImageRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetImageRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetImageRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetImageRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetImageRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetImageRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetImageRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetImageRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetImageRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetImageRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetImageRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetImageRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetImageRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetImageRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetImageRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetImageRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetImageRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetImageRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The base color (hex) for the top left quadrant. + */ + public GetImageRequest withTopLeft(String topLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + this.topLeft = Optional.ofNullable(topLeft); + return this; + } + + + /** + * The base color (hex) for the top left quadrant. + */ + public GetImageRequest withTopLeft(Optional topLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + this.topLeft = topLeft; + return this; + } + + /** + * The base color (hex) for the top right quadrant. + */ + public GetImageRequest withTopRight(String topRight) { + Utils.checkNotNull(topRight, "topRight"); + this.topRight = Optional.ofNullable(topRight); + return this; + } + + + /** + * The base color (hex) for the top right quadrant. + */ + public GetImageRequest withTopRight(Optional topRight) { + Utils.checkNotNull(topRight, "topRight"); + this.topRight = topRight; + return this; + } + + /** + * The base color (hex) for the bottom right quadrant. + */ + public GetImageRequest withBottomRight(String bottomRight) { + Utils.checkNotNull(bottomRight, "bottomRight"); + this.bottomRight = Optional.ofNullable(bottomRight); + return this; + } + + + /** + * The base color (hex) for the bottom right quadrant. + */ + public GetImageRequest withBottomRight(Optional bottomRight) { + Utils.checkNotNull(bottomRight, "bottomRight"); + this.bottomRight = bottomRight; + return this; + } + + /** + * The base color (hex) for the bottom left quadrant. + */ + public GetImageRequest withBottomLeft(String bottomLeft) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = Optional.ofNullable(bottomLeft); + return this; + } + + + /** + * The base color (hex) for the bottom left quadrant. + */ + public GetImageRequest withBottomLeft(Optional bottomLeft) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = bottomLeft; + return this; + } + + /** + * Width in pixels for the image. + */ + public GetImageRequest withWidth(long width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + + /** + * Width in pixels for the image. + */ + public GetImageRequest withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + /** + * Height in pixels for the image. + */ + public GetImageRequest withHeight(long height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + + /** + * Height in pixels for the image. + */ + public GetImageRequest withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + /** + * Whether to add noise to the ouput image. Noise can reduce color banding with the gradients. Image sizes with noise will be larger. + */ + public GetImageRequest withNoise(BoolInt noise) { + Utils.checkNotNull(noise, "noise"); + this.noise = Optional.ofNullable(noise); + return this; + } + + + /** + * Whether to add noise to the ouput image. Noise can reduce color banding with the gradients. Image sizes with noise will be larger. + */ + public GetImageRequest withNoise(Optional noise) { + Utils.checkNotNull(noise, "noise"); + this.noise = noise; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetImageRequest other = (GetImageRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.topLeft, other.topLeft) && + Utils.enhancedDeepEquals(this.topRight, other.topRight) && + Utils.enhancedDeepEquals(this.bottomRight, other.bottomRight) && + Utils.enhancedDeepEquals(this.bottomLeft, other.bottomLeft) && + Utils.enhancedDeepEquals(this.width, other.width) && + Utils.enhancedDeepEquals(this.height, other.height) && + Utils.enhancedDeepEquals(this.noise, other.noise); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, topLeft, + topRight, bottomRight, bottomLeft, + width, height, noise); + } + + @Override + public String toString() { + return Utils.toString(GetImageRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "topLeft", topLeft, + "topRight", topRight, + "bottomRight", bottomRight, + "bottomLeft", bottomLeft, + "width", width, + "height", height, + "noise", noise); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional topLeft = Optional.empty(); + + private Optional topRight = Optional.empty(); + + private Optional bottomRight = Optional.empty(); + + private Optional bottomLeft = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional noise = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The base color (hex) for the top left quadrant. + */ + public Builder topLeft(String topLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + this.topLeft = Optional.ofNullable(topLeft); + return this; + } + + /** + * The base color (hex) for the top left quadrant. + */ + public Builder topLeft(Optional topLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + this.topLeft = topLeft; + return this; + } + + + /** + * The base color (hex) for the top right quadrant. + */ + public Builder topRight(String topRight) { + Utils.checkNotNull(topRight, "topRight"); + this.topRight = Optional.ofNullable(topRight); + return this; + } + + /** + * The base color (hex) for the top right quadrant. + */ + public Builder topRight(Optional topRight) { + Utils.checkNotNull(topRight, "topRight"); + this.topRight = topRight; + return this; + } + + + /** + * The base color (hex) for the bottom right quadrant. + */ + public Builder bottomRight(String bottomRight) { + Utils.checkNotNull(bottomRight, "bottomRight"); + this.bottomRight = Optional.ofNullable(bottomRight); + return this; + } + + /** + * The base color (hex) for the bottom right quadrant. + */ + public Builder bottomRight(Optional bottomRight) { + Utils.checkNotNull(bottomRight, "bottomRight"); + this.bottomRight = bottomRight; + return this; + } + + + /** + * The base color (hex) for the bottom left quadrant. + */ + public Builder bottomLeft(String bottomLeft) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = Optional.ofNullable(bottomLeft); + return this; + } + + /** + * The base color (hex) for the bottom left quadrant. + */ + public Builder bottomLeft(Optional bottomLeft) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = bottomLeft; + return this; + } + + + /** + * Width in pixels for the image. + */ + public Builder width(long width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + /** + * Width in pixels for the image. + */ + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + + /** + * Height in pixels for the image. + */ + public Builder height(long height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + /** + * Height in pixels for the image. + */ + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + + /** + * Whether to add noise to the ouput image. Noise can reduce color banding with the gradients. Image sizes with noise will be larger. + */ + public Builder noise(BoolInt noise) { + Utils.checkNotNull(noise, "noise"); + this.noise = Optional.ofNullable(noise); + return this; + } + + /** + * Whether to add noise to the ouput image. Noise can reduce color banding with the gradients. Image sizes with noise will be larger. + */ + public Builder noise(Optional noise) { + Utils.checkNotNull(noise, "noise"); + this.noise = noise; + return this; + } + + public GetImageRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetImageRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, topLeft, + topRight, bottomRight, bottomLeft, + width, height, noise); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetImageRequestBuilder.java new file mode 100644 index 00000000..433c935a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetImageRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetImage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetImageRequestBuilder { + + private GetImageRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetImageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetImageRequestBuilder request(GetImageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetImageResponse call() throws Exception { + + RequestOperation operation + = new GetImage.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetImageResponse.java new file mode 100644 index 00000000..ee4992f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetImageResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetImageResponse 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetImageResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetImageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetImageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetImageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetImageResponse withResponseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetImageResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetImageResponse other = (GetImageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetImageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetImageResponse build() { + + return new GetImageResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkPathParamElement.java b/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkPathParamElement.java new file mode 100644 index 00000000..9f056e44 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkPathParamElement.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * GetItemArtworkPathParamElement + */ +public enum GetItemArtworkPathParamElement { + THUMB("thumb"), + ART("art"), + CLEAR_LOGO("clearLogo"), + BANNER("banner"), + POSTER("poster"), + THEME("theme"); + + @JsonValue + private final String value; + + GetItemArtworkPathParamElement(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (GetItemArtworkPathParamElement o: GetItemArtworkPathParamElement.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkRequest.java new file mode 100644 index 00000000..985bd4be --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkRequest.java @@ -0,0 +1,843 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetItemArtworkRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=element") + private GetItemArtworkPathParamElement element; + + /** + * A timestamp on the element used for cache management in the client + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=timestamp") + private long timestamp; + + @JsonCreator + public GetItemArtworkRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + GetItemArtworkPathParamElement element, + long timestamp) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(element, "element"); + Utils.checkNotNull(timestamp, "timestamp"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.element = element; + this.timestamp = timestamp; + } + + public GetItemArtworkRequest( + String ids, + GetItemArtworkPathParamElement element, + long timestamp) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + element, timestamp); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @JsonIgnore + public GetItemArtworkPathParamElement element() { + return element; + } + + /** + * A timestamp on the element used for cache management in the client + */ + @JsonIgnore + public long timestamp() { + return timestamp; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetItemArtworkRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetItemArtworkRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetItemArtworkRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetItemArtworkRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetItemArtworkRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetItemArtworkRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetItemArtworkRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetItemArtworkRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetItemArtworkRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetItemArtworkRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetItemArtworkRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetItemArtworkRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetItemArtworkRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetItemArtworkRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetItemArtworkRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetItemArtworkRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetItemArtworkRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetItemArtworkRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetItemArtworkRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetItemArtworkRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetItemArtworkRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetItemArtworkRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public GetItemArtworkRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public GetItemArtworkRequest withElement(GetItemArtworkPathParamElement element) { + Utils.checkNotNull(element, "element"); + this.element = element; + return this; + } + + /** + * A timestamp on the element used for cache management in the client + */ + public GetItemArtworkRequest withTimestamp(long timestamp) { + Utils.checkNotNull(timestamp, "timestamp"); + this.timestamp = timestamp; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetItemArtworkRequest other = (GetItemArtworkRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.element, other.element) && + Utils.enhancedDeepEquals(this.timestamp, other.timestamp); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + element, timestamp); + } + + @Override + public String toString() { + return Utils.toString(GetItemArtworkRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "element", element, + "timestamp", timestamp); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private GetItemArtworkPathParamElement element; + + private Long timestamp; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder element(GetItemArtworkPathParamElement element) { + Utils.checkNotNull(element, "element"); + this.element = element; + return this; + } + + + /** + * A timestamp on the element used for cache management in the client + */ + public Builder timestamp(long timestamp) { + Utils.checkNotNull(timestamp, "timestamp"); + this.timestamp = timestamp; + return this; + } + + public GetItemArtworkRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetItemArtworkRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + element, timestamp); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkRequestBuilder.java new file mode 100644 index 00000000..f7aa368b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetItemArtwork; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetItemArtworkRequestBuilder { + + private GetItemArtworkRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetItemArtworkRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetItemArtworkRequestBuilder request(GetItemArtworkRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetItemArtworkResponse call() throws Exception { + + RequestOperation operation + = new GetItemArtwork.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkResponse.java new file mode 100644 index 00000000..c96f67ee --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetItemArtworkResponse.java @@ -0,0 +1,311 @@ +/* + * 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.Optional; + + +public class GetItemArtworkResponse 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; + + /** + * OK + */ + private Optional twoHundredAudioMpeg3ResponseStream; + + /** + * OK + */ + private Optional twoHundredImageJpegResponseStream; + + @JsonCreator + public GetItemArtworkResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredAudioMpeg3ResponseStream, + Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + } + + public GetItemArtworkResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredAudioMpeg3ResponseStream() { + return (Optional) twoHundredAudioMpeg3ResponseStream; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredImageJpegResponseStream() { + return (Optional) twoHundredImageJpegResponseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetItemArtworkResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetItemArtworkResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetItemArtworkResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetItemArtworkResponse withTwoHundredAudioMpeg3ResponseStream(InputStream twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = Optional.ofNullable(twoHundredAudioMpeg3ResponseStream); + return this; + } + + + /** + * OK + */ + public GetItemArtworkResponse withTwoHundredAudioMpeg3ResponseStream(Optional twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + return this; + } + + /** + * OK + */ + public GetItemArtworkResponse withTwoHundredImageJpegResponseStream(InputStream twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + + /** + * OK + */ + public GetItemArtworkResponse withTwoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetItemArtworkResponse other = (GetItemArtworkResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.twoHundredAudioMpeg3ResponseStream, other.twoHundredAudioMpeg3ResponseStream) && + Utils.enhancedDeepEquals(this.twoHundredImageJpegResponseStream, other.twoHundredImageJpegResponseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + twoHundredAudioMpeg3ResponseStream, twoHundredImageJpegResponseStream); + } + + @Override + public String toString() { + return Utils.toString(GetItemArtworkResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredAudioMpeg3ResponseStream", twoHundredAudioMpeg3ResponseStream, + "twoHundredImageJpegResponseStream", twoHundredImageJpegResponseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredAudioMpeg3ResponseStream = Optional.empty(); + + private Optional twoHundredImageJpegResponseStream = 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; + } + + + /** + * OK + */ + public Builder twoHundredAudioMpeg3ResponseStream(InputStream twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = Optional.ofNullable(twoHundredAudioMpeg3ResponseStream); + return this; + } + + /** + * OK + */ + public Builder twoHundredAudioMpeg3ResponseStream(Optional twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + return this; + } + + + /** + * OK + */ + public Builder twoHundredImageJpegResponseStream(InputStream twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + /** + * OK + */ + public Builder twoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + public GetItemArtworkResponse build() { + + return new GetItemArtworkResponse( + contentType, statusCode, rawResponse, + twoHundredAudioMpeg3ResponseStream, twoHundredImageJpegResponseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionRequest.java new file mode 100644 index 00000000..a54eeb5c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetItemDecisionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The queue id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=queueId") + private long queueId; + + /** + * The item ids + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=itemId") + private long itemId; + + @JsonCreator + public GetItemDecisionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long queueId, + long itemId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(queueId, "queueId"); + Utils.checkNotNull(itemId, "itemId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.queueId = queueId; + this.itemId = itemId; + } + + public GetItemDecisionRequest( + long queueId, + long itemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), queueId, + itemId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The queue id + */ + @JsonIgnore + public long queueId() { + return queueId; + } + + /** + * The item ids + */ + @JsonIgnore + public long itemId() { + return itemId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetItemDecisionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetItemDecisionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetItemDecisionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetItemDecisionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetItemDecisionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetItemDecisionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetItemDecisionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetItemDecisionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetItemDecisionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetItemDecisionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetItemDecisionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetItemDecisionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetItemDecisionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetItemDecisionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetItemDecisionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetItemDecisionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetItemDecisionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetItemDecisionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetItemDecisionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetItemDecisionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetItemDecisionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetItemDecisionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The queue id + */ + public GetItemDecisionRequest withQueueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + /** + * The item ids + */ + public GetItemDecisionRequest withItemId(long itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetItemDecisionRequest other = (GetItemDecisionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.queueId, other.queueId) && + Utils.enhancedDeepEquals(this.itemId, other.itemId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + itemId); + } + + @Override + public String toString() { + return Utils.toString(GetItemDecisionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "queueId", queueId, + "itemId", itemId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long queueId; + + private Long itemId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The queue id + */ + public Builder queueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + + /** + * The item ids + */ + public Builder itemId(long itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + public GetItemDecisionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetItemDecisionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + itemId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionRequestBuilder.java new file mode 100644 index 00000000..6dfff5d5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetItemDecision; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetItemDecisionRequestBuilder { + + private GetItemDecisionRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetItemDecisionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetItemDecisionRequestBuilder request(GetItemDecisionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetItemDecisionResponse call() throws Exception { + + RequestOperation operation + = new GetItemDecision.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionResponse.java new file mode 100644 index 00000000..5fa0882b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetItemDecisionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDecision; +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.Optional; + + +public class GetItemDecisionResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithDecision; + + @JsonCreator + public GetItemDecisionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDecision) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDecision = mediaContainerWithDecision; + } + + public GetItemDecisionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDecision() { + return (Optional) mediaContainerWithDecision; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetItemDecisionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetItemDecisionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetItemDecisionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetItemDecisionResponse withMediaContainerWithDecision(MediaContainerWithDecision mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = Optional.ofNullable(mediaContainerWithDecision); + return this; + } + + + /** + * OK + */ + public GetItemDecisionResponse withMediaContainerWithDecision(Optional mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = mediaContainerWithDecision; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetItemDecisionResponse other = (GetItemDecisionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDecision, other.mediaContainerWithDecision); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDecision); + } + + @Override + public String toString() { + return Utils.toString(GetItemDecisionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDecision", mediaContainerWithDecision); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDecision = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDecision(MediaContainerWithDecision mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = Optional.ofNullable(mediaContainerWithDecision); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDecision(Optional mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = mediaContainerWithDecision; + return this; + } + + public GetItemDecisionResponse build() { + + return new GetItemDecisionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDecision); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeRequest.java new file mode 100644 index 00000000..8ced014d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeRequest.java @@ -0,0 +1,768 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetItemTreeRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + @JsonCreator + public GetItemTreeRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + } + + public GetItemTreeRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetItemTreeRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetItemTreeRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetItemTreeRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetItemTreeRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetItemTreeRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetItemTreeRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetItemTreeRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetItemTreeRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetItemTreeRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetItemTreeRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetItemTreeRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetItemTreeRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetItemTreeRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetItemTreeRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetItemTreeRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetItemTreeRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetItemTreeRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetItemTreeRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetItemTreeRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetItemTreeRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetItemTreeRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetItemTreeRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public GetItemTreeRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetItemTreeRequest other = (GetItemTreeRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + @Override + public String toString() { + return Utils.toString(GetItemTreeRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public GetItemTreeRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetItemTreeRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeRequestBuilder.java new file mode 100644 index 00000000..6719a1a4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetItemTree; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetItemTreeRequestBuilder { + + private GetItemTreeRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetItemTreeRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetItemTreeRequestBuilder request(GetItemTreeRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetItemTreeResponse call() throws Exception { + + RequestOperation operation + = new GetItemTree.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeResponse.java new file mode 100644 index 00000000..7e53742d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetItemTreeResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithNestedMetadata; +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.Optional; + + +public class GetItemTreeResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithNestedMetadata; + + @JsonCreator + public GetItemTreeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithNestedMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithNestedMetadata, "mediaContainerWithNestedMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithNestedMetadata = mediaContainerWithNestedMetadata; + } + + public GetItemTreeResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithNestedMetadata() { + return (Optional) mediaContainerWithNestedMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetItemTreeResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetItemTreeResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetItemTreeResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetItemTreeResponse withMediaContainerWithNestedMetadata(MediaContainerWithNestedMetadata mediaContainerWithNestedMetadata) { + Utils.checkNotNull(mediaContainerWithNestedMetadata, "mediaContainerWithNestedMetadata"); + this.mediaContainerWithNestedMetadata = Optional.ofNullable(mediaContainerWithNestedMetadata); + return this; + } + + + /** + * OK + */ + public GetItemTreeResponse withMediaContainerWithNestedMetadata(Optional mediaContainerWithNestedMetadata) { + Utils.checkNotNull(mediaContainerWithNestedMetadata, "mediaContainerWithNestedMetadata"); + this.mediaContainerWithNestedMetadata = mediaContainerWithNestedMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetItemTreeResponse other = (GetItemTreeResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithNestedMetadata, other.mediaContainerWithNestedMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithNestedMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetItemTreeResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithNestedMetadata", mediaContainerWithNestedMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithNestedMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithNestedMetadata(MediaContainerWithNestedMetadata mediaContainerWithNestedMetadata) { + Utils.checkNotNull(mediaContainerWithNestedMetadata, "mediaContainerWithNestedMetadata"); + this.mediaContainerWithNestedMetadata = Optional.ofNullable(mediaContainerWithNestedMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithNestedMetadata(Optional mediaContainerWithNestedMetadata) { + Utils.checkNotNull(mediaContainerWithNestedMetadata, "mediaContainerWithNestedMetadata"); + this.mediaContainerWithNestedMetadata = mediaContainerWithNestedMetadata; + return this; + } + + public GetItemTreeResponse build() { + + return new GetItemTreeResponse( + contentType, statusCode, rawResponse, + mediaContainerWithNestedMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsDirectory.java deleted file mode 100644 index a816556e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsDirectory.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryDetailsDirectory { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("secondary") - private Optional secondary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("prompt") - private Optional prompt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("search") - private Optional search; - - @JsonCreator - public GetLibraryDetailsDirectory( - @JsonProperty("key") Optional key, - @JsonProperty("title") Optional title, - @JsonProperty("secondary") Optional secondary, - @JsonProperty("prompt") Optional prompt, - @JsonProperty("search") Optional search) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(secondary, "secondary"); - Utils.checkNotNull(prompt, "prompt"); - Utils.checkNotNull(search, "search"); - this.key = key; - this.title = title; - this.secondary = secondary; - this.prompt = prompt; - this.search = search; - } - - public GetLibraryDetailsDirectory() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional secondary() { - return secondary; - } - - @JsonIgnore - public Optional prompt() { - return prompt; - } - - @JsonIgnore - public Optional search() { - return search; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryDetailsDirectory withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetLibraryDetailsDirectory withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryDetailsDirectory withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetLibraryDetailsDirectory withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryDetailsDirectory withSecondary(boolean secondary) { - Utils.checkNotNull(secondary, "secondary"); - this.secondary = Optional.ofNullable(secondary); - return this; - } - - - public GetLibraryDetailsDirectory withSecondary(Optional secondary) { - Utils.checkNotNull(secondary, "secondary"); - this.secondary = secondary; - return this; - } - - public GetLibraryDetailsDirectory withPrompt(String prompt) { - Utils.checkNotNull(prompt, "prompt"); - this.prompt = Optional.ofNullable(prompt); - return this; - } - - - public GetLibraryDetailsDirectory withPrompt(Optional prompt) { - Utils.checkNotNull(prompt, "prompt"); - this.prompt = prompt; - return this; - } - - public GetLibraryDetailsDirectory withSearch(boolean search) { - Utils.checkNotNull(search, "search"); - this.search = Optional.ofNullable(search); - return this; - } - - - public GetLibraryDetailsDirectory withSearch(Optional search) { - Utils.checkNotNull(search, "search"); - this.search = search; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryDetailsDirectory other = (GetLibraryDetailsDirectory) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.secondary, other.secondary) && - Utils.enhancedDeepEquals(this.prompt, other.prompt) && - Utils.enhancedDeepEquals(this.search, other.search); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title, secondary, - prompt, search); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsDirectory.class, - "key", key, - "title", title, - "secondary", secondary, - "prompt", prompt, - "search", search); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional key = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional secondary = Optional.empty(); - - private Optional prompt = Optional.empty(); - - private Optional search = 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 secondary(boolean secondary) { - Utils.checkNotNull(secondary, "secondary"); - this.secondary = Optional.ofNullable(secondary); - return this; - } - - public Builder secondary(Optional secondary) { - Utils.checkNotNull(secondary, "secondary"); - this.secondary = secondary; - return this; - } - - - public Builder prompt(String prompt) { - Utils.checkNotNull(prompt, "prompt"); - this.prompt = Optional.ofNullable(prompt); - return this; - } - - public Builder prompt(Optional prompt) { - Utils.checkNotNull(prompt, "prompt"); - this.prompt = prompt; - return this; - } - - - public Builder search(boolean search) { - Utils.checkNotNull(search, "search"); - this.search = Optional.ofNullable(search); - return this; - } - - public Builder search(Optional search) { - Utils.checkNotNull(search, "search"); - this.search = search; - return this; - } - - public GetLibraryDetailsDirectory build() { - - return new GetLibraryDetailsDirectory( - key, title, secondary, - prompt, search); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsField.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsField.java deleted file mode 100644 index e0d7018e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsField.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.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 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 - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.subType, other.subType); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title, type, - subType); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsField.class, - "key", key, - "title", title, - "type", type, - "subType", subType); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index a4c8d89f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsFieldType.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -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 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 - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.operator, other.operator); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - type, operator); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsFieldType.class, - "type", type, - "operator", operator); - } - - @SuppressWarnings("UnusedReturnValue") - 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/GetLibraryDetailsFilter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsFilter.java deleted file mode 100644 index 38a93d2f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsFilter.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryDetailsFilter { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("filter") - private Optional filter; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("filterType") - private Optional filterType; - - - @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; - - @JsonCreator - public GetLibraryDetailsFilter( - @JsonProperty("filter") Optional filter, - @JsonProperty("filterType") Optional filterType, - @JsonProperty("key") Optional key, - @JsonProperty("title") Optional title, - @JsonProperty("type") Optional 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; - } - - public GetLibraryDetailsFilter() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional filter() { - return filter; - } - - @JsonIgnore - public Optional filterType() { - return filterType; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryDetailsFilter withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - - public GetLibraryDetailsFilter withFilter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetLibraryDetailsFilter withFilterType(String filterType) { - Utils.checkNotNull(filterType, "filterType"); - this.filterType = Optional.ofNullable(filterType); - return this; - } - - - public GetLibraryDetailsFilter withFilterType(Optional filterType) { - Utils.checkNotNull(filterType, "filterType"); - this.filterType = filterType; - return this; - } - - public GetLibraryDetailsFilter withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetLibraryDetailsFilter withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryDetailsFilter withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetLibraryDetailsFilter withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryDetailsFilter withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetLibraryDetailsFilter withType(Optional 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; - } - GetLibraryDetailsFilter other = (GetLibraryDetailsFilter) o; - return - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.filterType, other.filterType) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - filter, filterType, key, - title, type); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsFilter.class, - "filter", filter, - "filterType", filterType, - "key", key, - "title", title, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional filter = Optional.empty(); - - private Optional filterType = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional type = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder filter(String 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 filterType(String filterType) { - Utils.checkNotNull(filterType, "filterType"); - this.filterType = Optional.ofNullable(filterType); - return this; - } - - public Builder filterType(Optional filterType) { - Utils.checkNotNull(filterType, "filterType"); - this.filterType = filterType; - 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 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 GetLibraryDetailsFilter build() { - - return new GetLibraryDetailsFilter( - filter, filterType, key, - title, type); - } - - } -} 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 af4d1517..c2710409 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsMediaContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsMediaContainer.java @@ -8,9 +8,10 @@ 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.models.shared.Metadata; 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; @@ -19,10 +20,15 @@ import java.util.Optional; public class GetLibraryDetailsMediaContainer { - + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; + @JsonProperty("content") + private Optional content; @JsonInclude(Include.NON_ABSENT) @@ -36,8 +42,8 @@ public class GetLibraryDetailsMediaContainer { @JsonInclude(Include.NON_ABSENT) - @JsonProperty("content") - private Optional content; + @JsonProperty("Directory") + private Optional> directory; @JsonInclude(Include.NON_ABSENT) @@ -47,7 +53,7 @@ public class GetLibraryDetailsMediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("librarySectionID") - private Optional librarySectionID; + private Optional librarySectionID; @JsonInclude(Include.NON_ABSENT) @@ -57,7 +63,17 @@ public class GetLibraryDetailsMediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("mediaTagVersion") - private Optional mediaTagVersion; + private Optional mediaTagVersion; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sortAsc") + private Optional sortAsc; @JsonInclude(Include.NON_ABSENT) @@ -77,70 +93,52 @@ public class GetLibraryDetailsMediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("viewMode") - private Optional viewMode; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Directory") - private Optional> directory; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Type") - private Optional> type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("FieldType") - private Optional> fieldType; + private Optional viewMode; @JsonCreator public GetLibraryDetailsMediaContainer( - @JsonProperty("size") Optional size, + @JsonProperty("content") Optional content, @JsonProperty("allowSync") Optional allowSync, @JsonProperty("art") Optional art, - @JsonProperty("content") Optional content, + @JsonProperty("Directory") Optional> directory, @JsonProperty("identifier") Optional identifier, - @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionID") Optional librarySectionID, @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, - @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("size") Optional size, + @JsonProperty("sortAsc") Optional sortAsc, @JsonProperty("thumb") Optional thumb, @JsonProperty("title1") Optional title1, @JsonProperty("viewGroup") Optional viewGroup, - @JsonProperty("viewMode") Optional viewMode, - @JsonProperty("Directory") Optional> directory, - @JsonProperty("Type") Optional> type, - @JsonProperty("FieldType") Optional> fieldType) { - Utils.checkNotNull(size, "size"); + @JsonProperty("viewMode") Optional viewMode) { + Utils.checkNotNull(content, "content"); Utils.checkNotNull(allowSync, "allowSync"); Utils.checkNotNull(art, "art"); - Utils.checkNotNull(content, "content"); + Utils.checkNotNull(directory, "directory"); Utils.checkNotNull(identifier, "identifier"); Utils.checkNotNull(librarySectionID, "librarySectionID"); Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(sortAsc, "sortAsc"); Utils.checkNotNull(thumb, "thumb"); Utils.checkNotNull(title1, "title1"); Utils.checkNotNull(viewGroup, "viewGroup"); Utils.checkNotNull(viewMode, "viewMode"); - Utils.checkNotNull(directory, "directory"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(fieldType, "fieldType"); - this.size = size; + this.content = content; this.allowSync = allowSync; this.art = art; - this.content = content; + this.directory = directory; this.identifier = identifier; this.librarySectionID = librarySectionID; this.mediaTagPrefix = mediaTagPrefix; this.mediaTagVersion = mediaTagVersion; + this.size = size; + this.sortAsc = sortAsc; this.thumb = thumb; this.title1 = title1; this.viewGroup = viewGroup; this.viewMode = viewMode; - this.directory = directory; - this.type = type; - this.fieldType = fieldType; } public GetLibraryDetailsMediaContainer() { @@ -148,12 +146,18 @@ public class GetLibraryDetailsMediaContainer { Optional.empty(), Optional.empty(), 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 flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ @JsonIgnore - public Optional size() { - return size; + public Optional content() { + return content; } @JsonIgnore @@ -166,9 +170,10 @@ public class GetLibraryDetailsMediaContainer { return art; } + @SuppressWarnings("unchecked") @JsonIgnore - public Optional content() { - return content; + public Optional> directory() { + return (Optional>) directory; } @JsonIgnore @@ -177,7 +182,7 @@ public class GetLibraryDetailsMediaContainer { } @JsonIgnore - public Optional librarySectionID() { + public Optional librarySectionID() { return librarySectionID; } @@ -187,10 +192,20 @@ public class GetLibraryDetailsMediaContainer { } @JsonIgnore - public Optional mediaTagVersion() { + public Optional mediaTagVersion() { return mediaTagVersion; } + @JsonIgnore + public Optional size() { + return size; + } + + @JsonIgnore + public Optional sortAsc() { + return sortAsc; + } + @JsonIgnore public Optional thumb() { return thumb; @@ -207,43 +222,37 @@ public class GetLibraryDetailsMediaContainer { } @JsonIgnore - public Optional viewMode() { + public Optional viewMode() { return viewMode; } - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> directory() { - return (Optional>) directory; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> type() { - return (Optional>) type; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> fieldType() { - return (Optional>) fieldType; - } - public static Builder builder() { return new Builder(); } - public GetLibraryDetailsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ + public GetLibraryDetailsMediaContainer withContent(String content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); return this; } - public GetLibraryDetailsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ + public GetLibraryDetailsMediaContainer withContent(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; return this; } @@ -273,16 +282,16 @@ public class GetLibraryDetailsMediaContainer { return this; } - public GetLibraryDetailsMediaContainer withContent(String content) { - Utils.checkNotNull(content, "content"); - this.content = Optional.ofNullable(content); + public GetLibraryDetailsMediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); return this; } - public GetLibraryDetailsMediaContainer withContent(Optional content) { - Utils.checkNotNull(content, "content"); - this.content = content; + public GetLibraryDetailsMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; return this; } @@ -299,14 +308,14 @@ public class GetLibraryDetailsMediaContainer { return this; } - public GetLibraryDetailsMediaContainer withLibrarySectionID(int librarySectionID) { + public GetLibraryDetailsMediaContainer withLibrarySectionID(long librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = Optional.ofNullable(librarySectionID); return this; } - public GetLibraryDetailsMediaContainer withLibrarySectionID(Optional librarySectionID) { + public GetLibraryDetailsMediaContainer withLibrarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -325,19 +334,45 @@ public class GetLibraryDetailsMediaContainer { return this; } - public GetLibraryDetailsMediaContainer withMediaTagVersion(int mediaTagVersion) { + public GetLibraryDetailsMediaContainer withMediaTagVersion(long mediaTagVersion) { Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); return this; } - public GetLibraryDetailsMediaContainer withMediaTagVersion(Optional mediaTagVersion) { + public GetLibraryDetailsMediaContainer withMediaTagVersion(Optional mediaTagVersion) { Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); this.mediaTagVersion = mediaTagVersion; return this; } + public GetLibraryDetailsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetLibraryDetailsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetLibraryDetailsMediaContainer withSortAsc(boolean sortAsc) { + Utils.checkNotNull(sortAsc, "sortAsc"); + this.sortAsc = Optional.ofNullable(sortAsc); + return this; + } + + + public GetLibraryDetailsMediaContainer withSortAsc(Optional sortAsc) { + Utils.checkNotNull(sortAsc, "sortAsc"); + this.sortAsc = sortAsc; + return this; + } + public GetLibraryDetailsMediaContainer withThumb(String thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = Optional.ofNullable(thumb); @@ -377,58 +412,19 @@ public class GetLibraryDetailsMediaContainer { return this; } - public GetLibraryDetailsMediaContainer withViewMode(int viewMode) { + public GetLibraryDetailsMediaContainer withViewMode(long viewMode) { Utils.checkNotNull(viewMode, "viewMode"); this.viewMode = Optional.ofNullable(viewMode); return this; } - public GetLibraryDetailsMediaContainer withViewMode(Optional viewMode) { + public GetLibraryDetailsMediaContainer withViewMode(Optional viewMode) { Utils.checkNotNull(viewMode, "viewMode"); this.viewMode = viewMode; return this; } - public GetLibraryDetailsMediaContainer withDirectory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - - public GetLibraryDetailsMediaContainer withDirectory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - public GetLibraryDetailsMediaContainer withType(List type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetLibraryDetailsMediaContainer withType(Optional> type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryDetailsMediaContainer withFieldType(List fieldType) { - Utils.checkNotNull(fieldType, "fieldType"); - this.fieldType = Optional.ofNullable(fieldType); - return this; - } - - - public GetLibraryDetailsMediaContainer withFieldType(Optional> fieldType) { - Utils.checkNotNull(fieldType, "fieldType"); - this.fieldType = fieldType; - return this; - } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -439,71 +435,73 @@ public class GetLibraryDetailsMediaContainer { } GetLibraryDetailsMediaContainer other = (GetLibraryDetailsMediaContainer) o; return - Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.content, other.content) && Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.content, other.content) && + Utils.enhancedDeepEquals(this.directory, other.directory) && Utils.enhancedDeepEquals(this.identifier, other.identifier) && Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.sortAsc, other.sortAsc) && Utils.enhancedDeepEquals(this.thumb, other.thumb) && Utils.enhancedDeepEquals(this.title1, other.title1) && Utils.enhancedDeepEquals(this.viewGroup, other.viewGroup) && - Utils.enhancedDeepEquals(this.viewMode, other.viewMode) && - Utils.enhancedDeepEquals(this.directory, other.directory) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.fieldType, other.fieldType); + Utils.enhancedDeepEquals(this.viewMode, other.viewMode); } @Override public int hashCode() { return Utils.enhancedHash( - size, allowSync, art, - content, identifier, librarySectionID, - mediaTagPrefix, mediaTagVersion, thumb, - title1, viewGroup, viewMode, - directory, type, fieldType); + content, allowSync, art, + directory, identifier, librarySectionID, + mediaTagPrefix, mediaTagVersion, size, + sortAsc, thumb, title1, + viewGroup, viewMode); } @Override public String toString() { return Utils.toString(GetLibraryDetailsMediaContainer.class, - "size", size, + "content", content, "allowSync", allowSync, "art", art, - "content", content, + "directory", directory, "identifier", identifier, "librarySectionID", librarySectionID, "mediaTagPrefix", mediaTagPrefix, "mediaTagVersion", mediaTagVersion, + "size", size, + "sortAsc", sortAsc, "thumb", thumb, "title1", title1, "viewGroup", viewGroup, - "viewMode", viewMode, - "directory", directory, - "type", type, - "fieldType", fieldType); + "viewMode", viewMode); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional size = Optional.empty(); + private Optional content = Optional.empty(); private Optional allowSync = Optional.empty(); private Optional art = Optional.empty(); - private Optional content = Optional.empty(); + private Optional> directory = Optional.empty(); private Optional identifier = Optional.empty(); - private Optional librarySectionID = Optional.empty(); + private Optional librarySectionID = Optional.empty(); private Optional mediaTagPrefix = Optional.empty(); - private Optional mediaTagVersion = Optional.empty(); + private Optional mediaTagVersion = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional sortAsc = Optional.empty(); private Optional thumb = Optional.empty(); @@ -511,28 +509,34 @@ public class GetLibraryDetailsMediaContainer { private Optional viewGroup = Optional.empty(); - private Optional viewMode = Optional.empty(); - - private Optional> directory = Optional.empty(); - - private Optional> type = Optional.empty(); - - private Optional> fieldType = Optional.empty(); + private Optional viewMode = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ + public Builder content(String content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); return this; } - public Builder size(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ + public Builder content(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; return this; } @@ -563,15 +567,15 @@ public class GetLibraryDetailsMediaContainer { } - public Builder content(String content) { - Utils.checkNotNull(content, "content"); - this.content = Optional.ofNullable(content); + public Builder directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); return this; } - public Builder content(Optional content) { - Utils.checkNotNull(content, "content"); - this.content = content; + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; return this; } @@ -589,13 +593,13 @@ public class GetLibraryDetailsMediaContainer { } - public Builder librarySectionID(int librarySectionID) { + public Builder librarySectionID(long librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = Optional.ofNullable(librarySectionID); return this; } - public Builder librarySectionID(Optional librarySectionID) { + public Builder librarySectionID(Optional librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -615,19 +619,45 @@ public class GetLibraryDetailsMediaContainer { } - public Builder mediaTagVersion(int mediaTagVersion) { + public Builder mediaTagVersion(long mediaTagVersion) { Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); return this; } - public Builder mediaTagVersion(Optional mediaTagVersion) { + public Builder mediaTagVersion(Optional mediaTagVersion) { Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); this.mediaTagVersion = mediaTagVersion; return this; } + public Builder size(long 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 sortAsc(boolean sortAsc) { + Utils.checkNotNull(sortAsc, "sortAsc"); + this.sortAsc = Optional.ofNullable(sortAsc); + return this; + } + + public Builder sortAsc(Optional sortAsc) { + Utils.checkNotNull(sortAsc, "sortAsc"); + this.sortAsc = sortAsc; + return this; + } + + public Builder thumb(String thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = Optional.ofNullable(thumb); @@ -667,65 +697,26 @@ public class GetLibraryDetailsMediaContainer { } - public Builder viewMode(int viewMode) { + public Builder viewMode(long viewMode) { Utils.checkNotNull(viewMode, "viewMode"); this.viewMode = Optional.ofNullable(viewMode); return this; } - public Builder viewMode(Optional viewMode) { + public Builder viewMode(Optional viewMode) { Utils.checkNotNull(viewMode, "viewMode"); this.viewMode = viewMode; return this; } - - public Builder directory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - public Builder directory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - - public Builder 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 GetLibraryDetailsMediaContainer build() { return new GetLibraryDetailsMediaContainer( - size, allowSync, art, - content, identifier, librarySectionID, - mediaTagPrefix, mediaTagVersion, thumb, - title1, viewGroup, viewMode, - directory, type, fieldType); + content, allowSync, art, + directory, identifier, librarySectionID, + mediaTagPrefix, mediaTagVersion, size, + sortAsc, thumb, title1, + viewGroup, viewMode); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsOperator.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsOperator.java deleted file mode 100644 index 5351b115..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsOperator.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.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 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 - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsOperator.class, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - 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/GetLibraryDetailsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsRequest.java index 324393fc..d2ea66dc 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsRequest.java @@ -6,10 +6,11 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; 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.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -18,51 +19,239 @@ import java.util.Optional; public class GetLibraryDetailsRequest { /** - * Whether or not to include details for a section (types, filters, and sorts). - * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * Indicates the client accepts the indicated media types */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeDetails") - private Optional includeDetails; + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. + * An opaque identifier unique to the client */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey") - private int sectionKey; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private String sectionId; + + /** + * Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeDetails") + private Optional includeDetails; @JsonCreator public GetLibraryDetailsRequest( - Optional includeDetails, - int sectionKey) { + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String sectionId, + Optional includeDetails) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); Utils.checkNotNull(includeDetails, "includeDetails"); - Utils.checkNotNull(sectionKey, "sectionKey"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; this.includeDetails = includeDetails; - this.sectionKey = sectionKey; } public GetLibraryDetailsRequest( - int sectionKey) { - this(Optional.empty(), sectionKey); + String sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty()); } /** - * Whether or not to include details for a section (types, filters, and sorts). - * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * Indicates the client accepts the indicated media types */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional includeDetails() { - return (Optional) includeDetails; + public Optional accepts() { + return (Optional) accepts; } /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. + * An opaque identifier unique to the client */ @JsonIgnore - public int sectionKey() { - return sectionKey; + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section identifier + */ + @JsonIgnore + public String sectionId() { + return sectionId; + } + + /** + * Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeDetails() { + return (Optional) includeDetails; } public static Builder builder() { @@ -71,10 +260,227 @@ public class GetLibraryDetailsRequest { /** - * Whether or not to include details for a section (types, filters, and sorts). - * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * Indicates the client accepts the indicated media types */ - public GetLibraryDetailsRequest withIncludeDetails(IncludeDetails includeDetails) { + public GetLibraryDetailsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetLibraryDetailsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetLibraryDetailsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetLibraryDetailsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetLibraryDetailsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetLibraryDetailsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetLibraryDetailsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetLibraryDetailsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetLibraryDetailsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetLibraryDetailsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetLibraryDetailsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetLibraryDetailsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetLibraryDetailsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetLibraryDetailsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetLibraryDetailsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetLibraryDetailsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetLibraryDetailsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetLibraryDetailsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetLibraryDetailsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetLibraryDetailsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetLibraryDetailsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetLibraryDetailsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section identifier + */ + public GetLibraryDetailsRequest withSectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. + */ + public GetLibraryDetailsRequest withIncludeDetails(BoolInt includeDetails) { Utils.checkNotNull(includeDetails, "includeDetails"); this.includeDetails = Optional.ofNullable(includeDetails); return this; @@ -82,25 +488,14 @@ public class GetLibraryDetailsRequest { /** - * Whether or not to include details for a section (types, filters, and sorts). - * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. */ - public GetLibraryDetailsRequest withIncludeDetails(Optional includeDetails) { + public GetLibraryDetailsRequest withIncludeDetails(Optional includeDetails) { Utils.checkNotNull(includeDetails, "includeDetails"); this.includeDetails = includeDetails; return this; } - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public GetLibraryDetailsRequest withSectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -111,29 +506,77 @@ public class GetLibraryDetailsRequest { } GetLibraryDetailsRequest other = (GetLibraryDetailsRequest) o; return - Utils.enhancedDeepEquals(this.includeDetails, other.includeDetails) && - Utils.enhancedDeepEquals(this.sectionKey, other.sectionKey); + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.includeDetails, other.includeDetails); } @Override public int hashCode() { return Utils.enhancedHash( - includeDetails, sectionKey); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + includeDetails); } @Override public String toString() { return Utils.toString(GetLibraryDetailsRequest.class, - "includeDetails", includeDetails, - "sectionKey", sectionKey); + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "includeDetails", includeDetails); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional includeDetails; + private Optional accepts; - private Integer sectionKey; + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String sectionId; + + private Optional includeDetails = Optional.empty(); private Builder() { // force use of static builder() method @@ -141,50 +584,260 @@ public class GetLibraryDetailsRequest { /** - * Whether or not to include details for a section (types, filters, and sorts). - * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * Indicates the client accepts the indicated media types */ - public Builder includeDetails(IncludeDetails includeDetails) { + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section identifier + */ + public Builder sectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. + */ + public Builder includeDetails(BoolInt includeDetails) { Utils.checkNotNull(includeDetails, "includeDetails"); this.includeDetails = Optional.ofNullable(includeDetails); return this; } /** - * Whether or not to include details for a section (types, filters, and sorts). - * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + * Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. */ - public Builder includeDetails(Optional includeDetails) { + public Builder includeDetails(Optional includeDetails) { Utils.checkNotNull(includeDetails, "includeDetails"); this.includeDetails = includeDetails; return this; } - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public Builder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - public GetLibraryDetailsRequest build() { - if (includeDetails == null) { - includeDetails = _SINGLETON_VALUE_IncludeDetails.value(); + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); } return new GetLibraryDetailsRequest( - includeDetails, sectionKey); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + includeDetails); } - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeDetails = + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = new LazySingletonValue<>( - "includeDetails", - "0", - new TypeReference>() {}); + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsRequestBuilder.java index 68758ed8..45c206ca 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsRequestBuilder.java @@ -5,70 +5,31 @@ package dev.plexapi.sdk.models.operations; import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.operations.GetLibraryDetails; -import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Exception; -import java.lang.Integer; -import java.util.Optional; public class GetLibraryDetailsRequestBuilder { - private Optional includeDetails = Utils.readDefaultOrConstValue( - "includeDetails", - "0", - new TypeReference>() {}); - private Integer sectionKey; + private GetLibraryDetailsRequest request; private final SDKConfiguration sdkConfiguration; public GetLibraryDetailsRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - - public GetLibraryDetailsRequestBuilder includeDetails(IncludeDetails includeDetails) { - Utils.checkNotNull(includeDetails, "includeDetails"); - this.includeDetails = Optional.of(includeDetails); + + public GetLibraryDetailsRequestBuilder request(GetLibraryDetailsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - public GetLibraryDetailsRequestBuilder includeDetails(Optional includeDetails) { - Utils.checkNotNull(includeDetails, "includeDetails"); - this.includeDetails = includeDetails; - return this; - } - - public GetLibraryDetailsRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - private GetLibraryDetailsRequest buildRequest() { - if (includeDetails == null) { - includeDetails = _SINGLETON_VALUE_IncludeDetails.value(); - } - - GetLibraryDetailsRequest request = new GetLibraryDetailsRequest(includeDetails, - sectionKey); - - return request; - } - public GetLibraryDetailsResponse call() throws Exception { RequestOperation operation = new GetLibraryDetails.Sync(sdkConfiguration); - GetLibraryDetailsRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeDetails = - new LazySingletonValue<>( - "includeDetails", - "0", - new TypeReference>() {}); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsResponse.java index 709895a1..36d549ab 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsResponse.java @@ -33,7 +33,7 @@ public class GetLibraryDetailsResponse implements Response { private HttpResponse rawResponse; /** - * The details of the library + * OK */ private Optional object; @@ -86,7 +86,7 @@ public class GetLibraryDetailsResponse implements Response { } /** - * The details of the library + * OK */ @SuppressWarnings("unchecked") @JsonIgnore @@ -127,7 +127,7 @@ public class GetLibraryDetailsResponse implements Response { } /** - * The details of the library + * OK */ public GetLibraryDetailsResponse withObject(GetLibraryDetailsResponseBody object) { Utils.checkNotNull(object, "object"); @@ -137,7 +137,7 @@ public class GetLibraryDetailsResponse implements Response { /** - * The details of the library + * OK */ public GetLibraryDetailsResponse withObject(Optional object) { Utils.checkNotNull(object, "object"); @@ -224,7 +224,7 @@ public class GetLibraryDetailsResponse implements Response { /** - * The details of the library + * OK */ public Builder object(GetLibraryDetailsResponseBody object) { Utils.checkNotNull(object, "object"); @@ -233,7 +233,7 @@ public class GetLibraryDetailsResponse implements Response { } /** - * The details of the library + * OK */ public Builder object(Optional object) { Utils.checkNotNull(object, "object"); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsResponseBody.java index e7daacb0..1574f02c 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsResponseBody.java @@ -17,7 +17,7 @@ import java.util.Optional; /** * GetLibraryDetailsResponseBody * - *

The details of the library + *

OK */ public class GetLibraryDetailsResponseBody { diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsSort.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsSort.java deleted file mode 100644 index 930f3621..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsSort.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.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 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 - Utils.enhancedDeepEquals(this.default_, other.default_) && - Utils.enhancedDeepEquals(this.defaultDirection, other.defaultDirection) && - Utils.enhancedDeepEquals(this.descKey, other.descKey) && - Utils.enhancedDeepEquals(this.firstCharacterKey, other.firstCharacterKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - 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); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index 4a5d758f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsType.java +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetLibraryDetailsType { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("active") - private Optional 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 GetLibraryDetailsType( - @JsonProperty("key") Optional key, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, - @JsonProperty("active") Optional 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 GetLibraryDetailsType() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional 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 static Builder builder() { - return new Builder(); - } - - - public GetLibraryDetailsType withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetLibraryDetailsType withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryDetailsType withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetLibraryDetailsType withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryDetailsType withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetLibraryDetailsType withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryDetailsType withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - - public GetLibraryDetailsType withActive(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - public GetLibraryDetailsType withFilter(List filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - - public GetLibraryDetailsType withFilter(Optional> filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetLibraryDetailsType withSort(List sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - - public GetLibraryDetailsType withSort(Optional> sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - public GetLibraryDetailsType withField(List field) { - Utils.checkNotNull(field, "field"); - this.field = Optional.ofNullable(field); - return this; - } - - - public GetLibraryDetailsType 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; - } - GetLibraryDetailsType other = (GetLibraryDetailsType) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.sort, other.sort) && - Utils.enhancedDeepEquals(this.field, other.field); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, type, title, - active, filter, sort, - field); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryDetailsType.class, - "key", key, - "type", type, - "title", title, - "active", active, - "filter", filter, - "sort", sort, - "field", field); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional key = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional active = Optional.empty(); - - 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 = Optional.ofNullable(key); - return this; - } - - public Builder key(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - 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 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; - } - - - 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 GetLibraryDetailsType build() { - - return new GetLibraryDetailsType( - key, type, title, - active, filter, sort, - field); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsCountry.java deleted file mode 100644 index 2481e5eb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsCountry.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryHubsCountry { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetLibraryHubsCountry( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetLibraryHubsCountry() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsCountry withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetLibraryHubsCountry 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; - } - GetLibraryHubsCountry other = (GetLibraryHubsCountry) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsCountry.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibraryHubsCountry build() { - - return new GetLibraryHubsCountry( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsDirector.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsDirector.java deleted file mode 100644 index 0e232faf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsDirector.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryHubsDirector { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetLibraryHubsDirector( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetLibraryHubsDirector() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsDirector withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetLibraryHubsDirector 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; - } - GetLibraryHubsDirector other = (GetLibraryHubsDirector) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsDirector.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibraryHubsDirector build() { - - return new GetLibraryHubsDirector( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsGenre.java deleted file mode 100644 index 24025f44..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsGenre.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryHubsGenre { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetLibraryHubsGenre( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetLibraryHubsGenre() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsGenre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetLibraryHubsGenre 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; - } - GetLibraryHubsGenre other = (GetLibraryHubsGenre) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsGenre.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibraryHubsGenre build() { - - return new GetLibraryHubsGenre( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsHub.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsHub.java deleted file mode 100644 index 8d0cc8c4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsHub.java +++ /dev/null @@ -1,598 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetLibraryHubsHub { - - @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("hubIdentifier") - private Optional hubIdentifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("context") - private Optional context; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("more") - private Optional more; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("style") - private Optional style; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hubKey") - private Optional hubKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("promoted") - private Optional promoted; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("random") - private Optional random; - - @JsonCreator - public GetLibraryHubsHub( - @JsonProperty("key") Optional key, - @JsonProperty("title") Optional title, - @JsonProperty("type") Optional type, - @JsonProperty("hubIdentifier") Optional hubIdentifier, - @JsonProperty("context") Optional context, - @JsonProperty("size") Optional size, - @JsonProperty("more") Optional more, - @JsonProperty("style") Optional style, - @JsonProperty("hubKey") Optional hubKey, - @JsonProperty("Metadata") Optional> metadata, - @JsonProperty("promoted") Optional promoted, - @JsonProperty("random") Optional random) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(hubIdentifier, "hubIdentifier"); - Utils.checkNotNull(context, "context"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(more, "more"); - Utils.checkNotNull(style, "style"); - Utils.checkNotNull(hubKey, "hubKey"); - Utils.checkNotNull(metadata, "metadata"); - Utils.checkNotNull(promoted, "promoted"); - Utils.checkNotNull(random, "random"); - this.key = key; - this.title = title; - this.type = type; - this.hubIdentifier = hubIdentifier; - this.context = context; - this.size = size; - this.more = more; - this.style = style; - this.hubKey = hubKey; - this.metadata = metadata; - this.promoted = promoted; - this.random = random; - } - - public GetLibraryHubsHub() { - 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()); - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional hubIdentifier() { - return hubIdentifier; - } - - @JsonIgnore - public Optional context() { - return context; - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional more() { - return more; - } - - @JsonIgnore - public Optional style() { - return style; - } - - @JsonIgnore - public Optional hubKey() { - return hubKey; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - @JsonIgnore - public Optional promoted() { - return promoted; - } - - @JsonIgnore - public Optional random() { - return random; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsHub withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetLibraryHubsHub withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryHubsHub withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetLibraryHubsHub withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryHubsHub withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetLibraryHubsHub withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryHubsHub withHubIdentifier(String hubIdentifier) { - Utils.checkNotNull(hubIdentifier, "hubIdentifier"); - this.hubIdentifier = Optional.ofNullable(hubIdentifier); - return this; - } - - - public GetLibraryHubsHub withHubIdentifier(Optional hubIdentifier) { - Utils.checkNotNull(hubIdentifier, "hubIdentifier"); - this.hubIdentifier = hubIdentifier; - return this; - } - - public GetLibraryHubsHub withContext(String context) { - Utils.checkNotNull(context, "context"); - this.context = Optional.ofNullable(context); - return this; - } - - - public GetLibraryHubsHub withContext(Optional context) { - Utils.checkNotNull(context, "context"); - this.context = context; - return this; - } - - public GetLibraryHubsHub withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetLibraryHubsHub withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetLibraryHubsHub withMore(boolean more) { - Utils.checkNotNull(more, "more"); - this.more = Optional.ofNullable(more); - return this; - } - - - public GetLibraryHubsHub withMore(Optional more) { - Utils.checkNotNull(more, "more"); - this.more = more; - return this; - } - - public GetLibraryHubsHub withStyle(String style) { - Utils.checkNotNull(style, "style"); - this.style = Optional.ofNullable(style); - return this; - } - - - public GetLibraryHubsHub withStyle(Optional style) { - Utils.checkNotNull(style, "style"); - this.style = style; - return this; - } - - public GetLibraryHubsHub withHubKey(String hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = Optional.ofNullable(hubKey); - return this; - } - - - public GetLibraryHubsHub withHubKey(Optional hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = hubKey; - return this; - } - - public GetLibraryHubsHub withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetLibraryHubsHub withMetadata(Optional> metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - public GetLibraryHubsHub withPromoted(boolean promoted) { - Utils.checkNotNull(promoted, "promoted"); - this.promoted = Optional.ofNullable(promoted); - return this; - } - - - public GetLibraryHubsHub withPromoted(Optional promoted) { - Utils.checkNotNull(promoted, "promoted"); - this.promoted = promoted; - return this; - } - - public GetLibraryHubsHub withRandom(boolean random) { - Utils.checkNotNull(random, "random"); - this.random = Optional.ofNullable(random); - return this; - } - - - public GetLibraryHubsHub withRandom(Optional random) { - Utils.checkNotNull(random, "random"); - this.random = random; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryHubsHub other = (GetLibraryHubsHub) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.hubIdentifier, other.hubIdentifier) && - Utils.enhancedDeepEquals(this.context, other.context) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.more, other.more) && - Utils.enhancedDeepEquals(this.style, other.style) && - Utils.enhancedDeepEquals(this.hubKey, other.hubKey) && - Utils.enhancedDeepEquals(this.metadata, other.metadata) && - Utils.enhancedDeepEquals(this.promoted, other.promoted) && - Utils.enhancedDeepEquals(this.random, other.random); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title, type, - hubIdentifier, context, size, - more, style, hubKey, - metadata, promoted, random); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsHub.class, - "key", key, - "title", title, - "type", type, - "hubIdentifier", hubIdentifier, - "context", context, - "size", size, - "more", more, - "style", style, - "hubKey", hubKey, - "metadata", metadata, - "promoted", promoted, - "random", random); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional key = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional hubIdentifier = Optional.empty(); - - private Optional context = Optional.empty(); - - private Optional size = Optional.empty(); - - private Optional more = Optional.empty(); - - private Optional style = Optional.empty(); - - private Optional hubKey = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Optional promoted = Optional.empty(); - - private Optional random = 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 hubIdentifier(String hubIdentifier) { - Utils.checkNotNull(hubIdentifier, "hubIdentifier"); - this.hubIdentifier = Optional.ofNullable(hubIdentifier); - return this; - } - - public Builder hubIdentifier(Optional hubIdentifier) { - Utils.checkNotNull(hubIdentifier, "hubIdentifier"); - this.hubIdentifier = hubIdentifier; - return this; - } - - - public Builder context(String context) { - Utils.checkNotNull(context, "context"); - this.context = Optional.ofNullable(context); - return this; - } - - public Builder context(Optional context) { - Utils.checkNotNull(context, "context"); - this.context = context; - return this; - } - - - public Builder size(int 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 more(boolean more) { - Utils.checkNotNull(more, "more"); - this.more = Optional.ofNullable(more); - return this; - } - - public Builder more(Optional more) { - Utils.checkNotNull(more, "more"); - this.more = more; - return this; - } - - - public Builder style(String style) { - Utils.checkNotNull(style, "style"); - this.style = Optional.ofNullable(style); - return this; - } - - public Builder style(Optional style) { - Utils.checkNotNull(style, "style"); - this.style = style; - return this; - } - - - public Builder hubKey(String hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = Optional.ofNullable(hubKey); - return this; - } - - public Builder hubKey(Optional hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = hubKey; - 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 Builder promoted(boolean promoted) { - Utils.checkNotNull(promoted, "promoted"); - this.promoted = Optional.ofNullable(promoted); - return this; - } - - public Builder promoted(Optional promoted) { - Utils.checkNotNull(promoted, "promoted"); - this.promoted = promoted; - return this; - } - - - public Builder random(boolean random) { - Utils.checkNotNull(random, "random"); - this.random = Optional.ofNullable(random); - return this; - } - - public Builder random(Optional random) { - Utils.checkNotNull(random, "random"); - this.random = random; - return this; - } - - public GetLibraryHubsHub build() { - - return new GetLibraryHubsHub( - key, title, type, - hubIdentifier, context, size, - more, style, hubKey, - metadata, promoted, random); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMedia.java deleted file mode 100644 index 68bbdd95..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMedia.java +++ /dev/null @@ -1,820 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetLibraryHubsMedia { - - @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("audioProfile") - private Optional audioProfile; - - - @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 GetLibraryHubsMedia( - @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("audioProfile") Optional audioProfile, - @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(audioProfile, "audioProfile"); - 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.audioProfile = audioProfile; - this.has64bitOffsets = has64bitOffsets; - this.videoProfile = videoProfile; - this.part = part; - } - - public GetLibraryHubsMedia() { - 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()); - } - - @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 audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> part() { - return (Optional>) part; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsMedia withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetLibraryHubsMedia withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetLibraryHubsMedia withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetLibraryHubsMedia withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetLibraryHubsMedia withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - public GetLibraryHubsMedia withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - public GetLibraryHubsMedia withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - public GetLibraryHubsMedia withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - public GetLibraryHubsMedia withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - public GetLibraryHubsMedia withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - public GetLibraryHubsMedia withAspectRatio(double aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - - public GetLibraryHubsMedia withAspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - public GetLibraryHubsMedia withAudioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - - public GetLibraryHubsMedia withAudioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - public GetLibraryHubsMedia withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - - public GetLibraryHubsMedia withAudioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - public GetLibraryHubsMedia withVideoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - - public GetLibraryHubsMedia withVideoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - public GetLibraryHubsMedia withVideoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - - public GetLibraryHubsMedia withVideoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - public GetLibraryHubsMedia withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - public GetLibraryHubsMedia withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - public GetLibraryHubsMedia withVideoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - - public GetLibraryHubsMedia withVideoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - public GetLibraryHubsMedia withOptimizedForStreaming(int optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - public GetLibraryHubsMedia withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - public GetLibraryHubsMedia withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - public GetLibraryHubsMedia withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - public GetLibraryHubsMedia withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - public GetLibraryHubsMedia withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - public GetLibraryHubsMedia withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - public GetLibraryHubsMedia withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - public GetLibraryHubsMedia withPart(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - - public GetLibraryHubsMedia 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; - } - GetLibraryHubsMedia other = (GetLibraryHubsMedia) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && - Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.part, other.part); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, audioCodec, videoCodec, - videoResolution, container, videoFrameRate, - optimizedForStreaming, audioProfile, has64bitOffsets, - videoProfile, part); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsMedia.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, - "audioProfile", audioProfile, - "has64bitOffsets", has64bitOffsets, - "videoProfile", videoProfile, - "part", part); - } - - @SuppressWarnings("UnusedReturnValue") - 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 audioProfile = 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(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 duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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 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 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 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(int 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(String 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(int 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 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; - } - - - 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 GetLibraryHubsMedia build() { - - return new GetLibraryHubsMedia( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, audioCodec, videoCodec, - videoResolution, container, videoFrameRate, - optimizedForStreaming, audioProfile, has64bitOffsets, - videoProfile, part); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMediaContainer.java deleted file mode 100644 index c8bd8e48..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMediaContainer.java +++ /dev/null @@ -1,380 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetLibraryHubsMediaContainer { - - @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("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("Hub") - private Optional> hub; - - @JsonCreator - public GetLibraryHubsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("allowSync") Optional allowSync, - @JsonProperty("identifier") Optional identifier, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionUUID") Optional librarySectionUUID, - @JsonProperty("Hub") Optional> hub) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - Utils.checkNotNull(hub, "hub"); - this.size = size; - this.allowSync = allowSync; - this.identifier = identifier; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionUUID = librarySectionUUID; - this.hub = hub; - } - - public GetLibraryHubsMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional allowSync() { - return allowSync; - } - - @JsonIgnore - public Optional identifier() { - return identifier; - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional librarySectionUUID() { - return librarySectionUUID; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> hub() { - return (Optional>) hub; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetLibraryHubsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetLibraryHubsMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); - return this; - } - - - public GetLibraryHubsMediaContainer withAllowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - public GetLibraryHubsMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = Optional.ofNullable(identifier); - return this; - } - - - public GetLibraryHubsMediaContainer withIdentifier(Optional identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public GetLibraryHubsMediaContainer withLibrarySectionID(int librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - public GetLibraryHubsMediaContainer withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetLibraryHubsMediaContainer withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - public GetLibraryHubsMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetLibraryHubsMediaContainer withLibrarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - - public GetLibraryHubsMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - public GetLibraryHubsMediaContainer withHub(List hub) { - Utils.checkNotNull(hub, "hub"); - this.hub = Optional.ofNullable(hub); - return this; - } - - - public GetLibraryHubsMediaContainer withHub(Optional> hub) { - Utils.checkNotNull(hub, "hub"); - this.hub = hub; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryHubsMediaContainer other = (GetLibraryHubsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionUUID, other.librarySectionUUID) && - Utils.enhancedDeepEquals(this.hub, other.hub); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowSync, identifier, - librarySectionID, librarySectionTitle, librarySectionUUID, - hub); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsMediaContainer.class, - "size", size, - "allowSync", allowSync, - "identifier", identifier, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionUUID", librarySectionUUID, - "hub", hub); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional allowSync = Optional.empty(); - - private Optional identifier = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionUUID = Optional.empty(); - - private Optional> hub = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 librarySectionID(int 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 hub(List hub) { - Utils.checkNotNull(hub, "hub"); - this.hub = Optional.ofNullable(hub); - return this; - } - - public Builder hub(Optional> hub) { - Utils.checkNotNull(hub, "hub"); - this.hub = hub; - return this; - } - - public GetLibraryHubsMediaContainer build() { - - return new GetLibraryHubsMediaContainer( - size, allowSync, identifier, - librarySectionID, librarySectionTitle, librarySectionUUID, - hub); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMetadata.java deleted file mode 100644 index cc88ed68..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsMetadata.java +++ /dev/null @@ -1,1574 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.LocalDate; -import java.util.List; -import java.util.Optional; - - -public class GetLibraryHubsMetadata { - - @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("librarySectionTitle") - private Optional librarySectionTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionKey") - private Optional librarySectionKey; - - - @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("viewCount") - private Optional viewCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - - @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("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("Country") - private Optional> country; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Director") - private Optional> director; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Role") - private Optional> role; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Writer") - private Optional> writer; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipCount") - private Optional skipCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chapterSource") - private Optional chapterSource; - - @JsonCreator - public GetLibraryHubsMetadata( - @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("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionKey") Optional librarySectionKey, - @JsonProperty("contentRating") Optional contentRating, - @JsonProperty("summary") Optional summary, - @JsonProperty("rating") Optional rating, - @JsonProperty("audienceRating") Optional audienceRating, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @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("primaryExtraKey") Optional primaryExtraKey, - @JsonProperty("ratingImage") Optional ratingImage, - @JsonProperty("Media") Optional> media, - @JsonProperty("Genre") Optional> genre, - @JsonProperty("Country") Optional> country, - @JsonProperty("Director") Optional> director, - @JsonProperty("Role") Optional> role, - @JsonProperty("Writer") Optional> writer, - @JsonProperty("skipCount") Optional skipCount, - @JsonProperty("chapterSource") Optional chapterSource) { - 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(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - Utils.checkNotNull(contentRating, "contentRating"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(rating, "rating"); - Utils.checkNotNull(audienceRating, "audienceRating"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - 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(primaryExtraKey, "primaryExtraKey"); - Utils.checkNotNull(ratingImage, "ratingImage"); - Utils.checkNotNull(media, "media"); - Utils.checkNotNull(genre, "genre"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(director, "director"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(writer, "writer"); - Utils.checkNotNull(skipCount, "skipCount"); - Utils.checkNotNull(chapterSource, "chapterSource"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.studio = studio; - this.type = type; - this.title = title; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionID = librarySectionID; - this.librarySectionKey = librarySectionKey; - this.contentRating = contentRating; - this.summary = summary; - this.rating = rating; - this.audienceRating = audienceRating; - this.viewCount = viewCount; - this.lastViewedAt = lastViewedAt; - 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.primaryExtraKey = primaryExtraKey; - this.ratingImage = ratingImage; - this.media = media; - this.genre = genre; - this.country = country; - this.director = director; - this.role = role; - this.writer = writer; - this.skipCount = skipCount; - this.chapterSource = chapterSource; - } - - public GetLibraryHubsMetadata() { - 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(), Optional.empty(), - Optional.empty()); - } - - @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 librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional librarySectionKey() { - return librarySectionKey; - } - - @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 viewCount() { - return viewCount; - } - - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - @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 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> country() { - return (Optional>) country; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> director() { - return (Optional>) director; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> role() { - return (Optional>) role; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> writer() { - return (Optional>) writer; - } - - @JsonIgnore - public Optional skipCount() { - return skipCount; - } - - @JsonIgnore - public Optional chapterSource() { - return chapterSource; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetLibraryHubsMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetLibraryHubsMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetLibraryHubsMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryHubsMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public GetLibraryHubsMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public GetLibraryHubsMetadata withStudio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - - public GetLibraryHubsMetadata withStudio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - public GetLibraryHubsMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetLibraryHubsMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryHubsMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetLibraryHubsMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryHubsMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - public GetLibraryHubsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetLibraryHubsMetadata withLibrarySectionID(int librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - public GetLibraryHubsMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetLibraryHubsMetadata withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - - public GetLibraryHubsMetadata withLibrarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - public GetLibraryHubsMetadata withContentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - - public GetLibraryHubsMetadata withContentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - public GetLibraryHubsMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public GetLibraryHubsMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public GetLibraryHubsMetadata withRating(double rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = Optional.ofNullable(rating); - return this; - } - - - public GetLibraryHubsMetadata withRating(Optional rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - public GetLibraryHubsMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = Optional.ofNullable(audienceRating); - return this; - } - - - public GetLibraryHubsMetadata withAudienceRating(Optional audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - public GetLibraryHubsMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - - public GetLibraryHubsMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - public GetLibraryHubsMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - - public GetLibraryHubsMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - public GetLibraryHubsMetadata withYear(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - - public GetLibraryHubsMetadata withYear(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - public GetLibraryHubsMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = Optional.ofNullable(tagline); - return this; - } - - - public GetLibraryHubsMetadata withTagline(Optional tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - public GetLibraryHubsMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetLibraryHubsMetadata withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetLibraryHubsMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - - public GetLibraryHubsMetadata withArt(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - public GetLibraryHubsMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetLibraryHubsMetadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetLibraryHubsMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - - public GetLibraryHubsMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - public GetLibraryHubsMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public GetLibraryHubsMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public GetLibraryHubsMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetLibraryHubsMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - public GetLibraryHubsMetadata withAudienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - - public GetLibraryHubsMetadata withAudienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - public GetLibraryHubsMetadata withPrimaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - - public GetLibraryHubsMetadata withPrimaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - public GetLibraryHubsMetadata withRatingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - - public GetLibraryHubsMetadata withRatingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - public GetLibraryHubsMetadata withMedia(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - - public GetLibraryHubsMetadata withMedia(Optional> media) { - Utils.checkNotNull(media, "media"); - this.media = media; - return this; - } - - public GetLibraryHubsMetadata withGenre(List genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = Optional.ofNullable(genre); - return this; - } - - - public GetLibraryHubsMetadata withGenre(Optional> genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = genre; - return this; - } - - public GetLibraryHubsMetadata withCountry(List country) { - Utils.checkNotNull(country, "country"); - this.country = Optional.ofNullable(country); - return this; - } - - - public GetLibraryHubsMetadata withCountry(Optional> country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - public GetLibraryHubsMetadata withDirector(List director) { - Utils.checkNotNull(director, "director"); - this.director = Optional.ofNullable(director); - return this; - } - - - public GetLibraryHubsMetadata withDirector(Optional> director) { - Utils.checkNotNull(director, "director"); - this.director = director; - return this; - } - - public GetLibraryHubsMetadata withRole(List role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - public GetLibraryHubsMetadata withRole(Optional> role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - public GetLibraryHubsMetadata withWriter(List writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = Optional.ofNullable(writer); - return this; - } - - - public GetLibraryHubsMetadata withWriter(Optional> writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = writer; - return this; - } - - public GetLibraryHubsMetadata withSkipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - - public GetLibraryHubsMetadata withSkipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - public GetLibraryHubsMetadata withChapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - - public GetLibraryHubsMetadata withChapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryHubsMetadata other = (GetLibraryHubsMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionKey, other.librarySectionKey) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.rating, other.rating) && - Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && - Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && - Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && - Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && - Utils.enhancedDeepEquals(this.media, other.media) && - Utils.enhancedDeepEquals(this.genre, other.genre) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.director, other.director) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.writer, other.writer) && - Utils.enhancedDeepEquals(this.skipCount, other.skipCount) && - Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - studio, type, title, - librarySectionTitle, librarySectionID, librarySectionKey, - contentRating, summary, rating, - audienceRating, viewCount, lastViewedAt, - year, tagline, thumb, - art, duration, originallyAvailableAt, - addedAt, updatedAt, audienceRatingImage, - primaryExtraKey, ratingImage, media, - genre, country, director, - role, writer, skipCount, - chapterSource); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "studio", studio, - "type", type, - "title", title, - "librarySectionTitle", librarySectionTitle, - "librarySectionID", librarySectionID, - "librarySectionKey", librarySectionKey, - "contentRating", contentRating, - "summary", summary, - "rating", rating, - "audienceRating", audienceRating, - "viewCount", viewCount, - "lastViewedAt", lastViewedAt, - "year", year, - "tagline", tagline, - "thumb", thumb, - "art", art, - "duration", duration, - "originallyAvailableAt", originallyAvailableAt, - "addedAt", addedAt, - "updatedAt", updatedAt, - "audienceRatingImage", audienceRatingImage, - "primaryExtraKey", primaryExtraKey, - "ratingImage", ratingImage, - "media", media, - "genre", genre, - "country", country, - "director", director, - "role", role, - "writer", writer, - "skipCount", skipCount, - "chapterSource", chapterSource); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - 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 librarySectionTitle = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionKey = Optional.empty(); - - private Optional contentRating = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional rating = Optional.empty(); - - private Optional audienceRating = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional lastViewedAt = 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 primaryExtraKey = Optional.empty(); - - private Optional ratingImage = Optional.empty(); - - private Optional> media = Optional.empty(); - - private Optional> genre = Optional.empty(); - - private Optional> country = Optional.empty(); - - private Optional> director = Optional.empty(); - - private Optional> role = Optional.empty(); - - private Optional> writer = Optional.empty(); - - private Optional skipCount = Optional.empty(); - - private Optional chapterSource = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder ratingKey(String 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 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 librarySectionID(int 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 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; - } - - - 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 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 year(int 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(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - public Builder originallyAvailableAt(LocalDate 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(int 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(int 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 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 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); - return this; - } - - public Builder director(Optional> director) { - Utils.checkNotNull(director, "director"); - this.director = director; - 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 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 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 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 GetLibraryHubsMetadata build() { - - return new GetLibraryHubsMetadata( - ratingKey, key, guid, - studio, type, title, - librarySectionTitle, librarySectionID, librarySectionKey, - contentRating, summary, rating, - audienceRating, viewCount, lastViewedAt, - year, tagline, thumb, - art, duration, originallyAvailableAt, - addedAt, updatedAt, audienceRatingImage, - primaryExtraKey, ratingImage, media, - genre, country, director, - role, writer, skipCount, - chapterSource); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsPart.java deleted file mode 100644 index 46bdc747..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsPart.java +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryHubsPart { - - @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("audioProfile") - private Optional audioProfile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - @JsonCreator - public GetLibraryHubsPart( - @JsonProperty("id") Optional id, - @JsonProperty("key") Optional key, - @JsonProperty("duration") Optional duration, - @JsonProperty("file") Optional file, - @JsonProperty("size") Optional size, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("container") Optional container, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @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(audioProfile, "audioProfile"); - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(videoProfile, "videoProfile"); - this.id = id; - this.key = key; - this.duration = duration; - this.file = file; - this.size = size; - this.audioProfile = audioProfile; - this.container = container; - this.has64bitOffsets = has64bitOffsets; - this.optimizedForStreaming = optimizedForStreaming; - this.videoProfile = videoProfile; - } - - public GetLibraryHubsPart() { - 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 audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional container() { - return container; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - @JsonIgnore - public Optional optimizedForStreaming() { - return optimizedForStreaming; - } - - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsPart withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetLibraryHubsPart withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetLibraryHubsPart withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetLibraryHubsPart withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryHubsPart withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetLibraryHubsPart withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetLibraryHubsPart withFile(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - - public GetLibraryHubsPart withFile(Optional file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - public GetLibraryHubsPart withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetLibraryHubsPart withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetLibraryHubsPart withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - public GetLibraryHubsPart withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - public GetLibraryHubsPart withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - public GetLibraryHubsPart withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - public GetLibraryHubsPart withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - public GetLibraryHubsPart withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - public GetLibraryHubsPart withOptimizedForStreaming(boolean optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - public GetLibraryHubsPart withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - public GetLibraryHubsPart withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - public GetLibraryHubsPart 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; - } - GetLibraryHubsPart other = (GetLibraryHubsPart) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.file, other.file) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, key, duration, - file, size, audioProfile, - container, has64bitOffsets, optimizedForStreaming, - videoProfile); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsPart.class, - "id", id, - "key", key, - "duration", duration, - "file", file, - "size", size, - "audioProfile", audioProfile, - "container", container, - "has64bitOffsets", has64bitOffsets, - "optimizedForStreaming", optimizedForStreaming, - "videoProfile", videoProfile); - } - - @SuppressWarnings("UnusedReturnValue") - 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 audioProfile = Optional.empty(); - - private Optional container = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional videoProfile = 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 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(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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(int 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 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; - } - - - 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 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 GetLibraryHubsPart build() { - - return new GetLibraryHubsPart( - id, key, duration, - file, size, audioProfile, - container, has64bitOffsets, optimizedForStreaming, - videoProfile); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRequest.java deleted file mode 100644 index 3bcc68e7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRequest.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetLibraryHubsRequest { - /** - * the Id of the library to query - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") - private double sectionId; - - /** - * The number of items to return with each hub. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") - private Optional count; - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=onlyTransient") - private Optional onlyTransient; - - @JsonCreator - public GetLibraryHubsRequest( - double sectionId, - Optional count, - Optional onlyTransient) { - Utils.checkNotNull(sectionId, "sectionId"); - Utils.checkNotNull(count, "count"); - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.sectionId = sectionId; - this.count = count; - this.onlyTransient = onlyTransient; - } - - public GetLibraryHubsRequest( - double sectionId) { - this(sectionId, Optional.empty(), Optional.empty()); - } - - /** - * the Id of the library to query - */ - @JsonIgnore - public double sectionId() { - return sectionId; - } - - /** - * The number of items to return with each hub. - */ - @JsonIgnore - public Optional count() { - return count; - } - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional onlyTransient() { - return (Optional) onlyTransient; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the Id of the library to query - */ - public GetLibraryHubsRequest withSectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - /** - * The number of items to return with each hub. - */ - public GetLibraryHubsRequest withCount(double count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.ofNullable(count); - return this; - } - - - /** - * The number of items to return with each hub. - */ - public GetLibraryHubsRequest withCount(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - public GetLibraryHubsRequest withOnlyTransient(QueryParamOnlyTransient onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = Optional.ofNullable(onlyTransient); - return this; - } - - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - public GetLibraryHubsRequest withOnlyTransient(Optional onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = onlyTransient; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryHubsRequest other = (GetLibraryHubsRequest) o; - return - Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && - Utils.enhancedDeepEquals(this.count, other.count) && - Utils.enhancedDeepEquals(this.onlyTransient, other.onlyTransient); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - sectionId, count, onlyTransient); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsRequest.class, - "sectionId", sectionId, - "count", count, - "onlyTransient", onlyTransient); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Double sectionId; - - private Optional count = Optional.empty(); - - private Optional onlyTransient = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * the Id of the library to query - */ - public Builder sectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - - /** - * The number of items to return with each hub. - */ - public Builder count(double count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.ofNullable(count); - return this; - } - - /** - * The number of items to return with each hub. - */ - public Builder count(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - public Builder onlyTransient(QueryParamOnlyTransient onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = Optional.ofNullable(onlyTransient); - return this; - } - - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - public Builder onlyTransient(Optional onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = onlyTransient; - return this; - } - - public GetLibraryHubsRequest build() { - - return new GetLibraryHubsRequest( - sectionId, count, onlyTransient); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRequestBuilder.java deleted file mode 100644 index 11cd5c31..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRequestBuilder.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetLibraryHubs; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.util.Optional; - -public class GetLibraryHubsRequestBuilder { - - private Double sectionId; - private Optional count = Optional.empty(); - private Optional onlyTransient = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetLibraryHubsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetLibraryHubsRequestBuilder sectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - public GetLibraryHubsRequestBuilder count(double count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.of(count); - return this; - } - - public GetLibraryHubsRequestBuilder count(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - public GetLibraryHubsRequestBuilder onlyTransient(QueryParamOnlyTransient onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = Optional.of(onlyTransient); - return this; - } - - public GetLibraryHubsRequestBuilder onlyTransient(Optional onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = onlyTransient; - return this; - } - - - private GetLibraryHubsRequest buildRequest() { - - GetLibraryHubsRequest request = new GetLibraryHubsRequest(sectionId, - count, - onlyTransient); - - return request; - } - - public GetLibraryHubsResponse call() throws Exception { - - RequestOperation operation - = new GetLibraryHubs.Sync(sdkConfiguration); - GetLibraryHubsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsResponse.java deleted file mode 100644 index 23d92bab..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetLibraryHubsResponse 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 hubs specific to the library - */ - private Optional object; - - @JsonCreator - public GetLibraryHubsResponse( - 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 GetLibraryHubsResponse( - 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 hubs specific to the library - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetLibraryHubsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetLibraryHubsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryHubsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The hubs specific to the library - */ - public GetLibraryHubsResponse withObject(GetLibraryHubsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The hubs specific to the library - */ - public GetLibraryHubsResponse 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; - } - GetLibraryHubsResponse other = (GetLibraryHubsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 hubs specific to the library - */ - public Builder object(GetLibraryHubsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The hubs specific to the library - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetLibraryHubsResponse build() { - - return new GetLibraryHubsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsResponseBody.java deleted file mode 100644 index 5ec8a45d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetLibraryHubsResponseBody - * - *

The hubs specific to the library - */ -public class GetLibraryHubsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetLibraryHubsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetLibraryHubsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsResponseBody withMediaContainer(GetLibraryHubsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetLibraryHubsResponseBody 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; - } - GetLibraryHubsResponseBody other = (GetLibraryHubsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetLibraryHubsMediaContainer 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 GetLibraryHubsResponseBody build() { - - return new GetLibraryHubsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRole.java deleted file mode 100644 index 15587e69..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRole.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryHubsRole { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetLibraryHubsRole( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetLibraryHubsRole() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsRole withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetLibraryHubsRole 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; - } - GetLibraryHubsRole other = (GetLibraryHubsRole) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsRole.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibraryHubsRole build() { - - return new GetLibraryHubsRole( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsWriter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsWriter.java deleted file mode 100644 index d5d912c1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsWriter.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryHubsWriter { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetLibraryHubsWriter( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetLibraryHubsWriter() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryHubsWriter withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetLibraryHubsWriter 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; - } - GetLibraryHubsWriter other = (GetLibraryHubsWriter) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsWriter.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibraryHubsWriter build() { - - return new GetLibraryHubsWriter( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsActiveDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsActiveDirection.java deleted file mode 100644 index 080cbbc5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsActiveDirection.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetLibraryItemsActiveDirection - * - *

The direction of the sort. Can be either `asc` or `desc`. - */ -public enum GetLibraryItemsActiveDirection { - Ascending("asc"), - Descending("desc"); - - @JsonValue - private final String value; - - GetLibraryItemsActiveDirection(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetLibraryItemsActiveDirection o: GetLibraryItemsActiveDirection.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java deleted file mode 100644 index cd4abdd7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibraryItemsCollection { - /** - * The user-made collection this media item belongs to - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetLibraryItemsCollection( - @JsonProperty("tag") String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - /** - * The user-made collection this media item belongs to - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The user-made collection this media item belongs to - */ - public GetLibraryItemsCollection withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsCollection other = (GetLibraryItemsCollection) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsCollection.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The user-made collection this media item belongs to - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetLibraryItemsCollection build() { - - return new GetLibraryItemsCollection( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCountry.java deleted file mode 100644 index f6d4dd73..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCountry.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - - -public class GetLibraryItemsCountry { - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - /** - * The country of origin of this media item - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetLibraryItemsCountry( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - this.id = id; - this.tag = tag; - } - - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The country of origin of this media item - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public GetLibraryItemsCountry withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The country of origin of this media item - */ - public GetLibraryItemsCountry withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsCountry other = (GetLibraryItemsCountry) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsCountry.class, - "id", id, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The country of origin of this media item - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetLibraryItemsCountry build() { - - return new GetLibraryItemsCountry( - id, 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 deleted file mode 100644 index c0057b25..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDefaultDirection.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetLibraryItemsDefaultDirection - * - *

The direction of the sort. Can be either `asc` or `desc`. - */ -public enum GetLibraryItemsDefaultDirection { - Ascending("asc"), - Descending("desc"); - - @JsonValue - private final String value; - - GetLibraryItemsDefaultDirection(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetLibraryItemsDefaultDirection o: GetLibraryItemsDefaultDirection.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDirector.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDirector.java deleted file mode 100644 index 62da3b66..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDirector.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryItemsDirector { - /** - * Unique identifier for the director. - */ - @JsonProperty("id") - private int id; - - /** - * The role of Director - */ - @JsonProperty("tag") - private String tag; - - /** - * The absolute URL of the thumbnail image for the director. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetLibraryItemsDirector( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.tag = tag; - this.thumb = thumb; - } - - public GetLibraryItemsDirector( - int id, - String tag) { - this(id, tag, Optional.empty()); - } - - /** - * Unique identifier for the director. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The role of Director - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique identifier for the director. - */ - public GetLibraryItemsDirector withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The role of Director - */ - public GetLibraryItemsDirector withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - public GetLibraryItemsDirector withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the director. - */ - public GetLibraryItemsDirector withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsDirector other = (GetLibraryItemsDirector) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsDirector.class, - "id", id, - "tag", tag, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique identifier for the director. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The role of Director - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the director. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetLibraryItemsDirector build() { - - return new GetLibraryItemsDirector( - id, tag, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsField.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsField.java deleted file mode 100644 index 9e48336c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsField.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryItemsField { - - @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 GetLibraryItemsField( - @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 GetLibraryItemsField( - 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 static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsField withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsField withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryItemsField withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryItemsField withSubType(String subType) { - Utils.checkNotNull(subType, "subType"); - this.subType = Optional.ofNullable(subType); - return this; - } - - - public GetLibraryItemsField 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; - } - GetLibraryItemsField other = (GetLibraryItemsField) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.subType, other.subType); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title, type, - subType); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsField.class, - "key", key, - "title", title, - "type", type, - "subType", subType); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibraryItemsField build() { - - return new GetLibraryItemsField( - key, title, type, - subType); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFieldType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFieldType.java deleted file mode 100644 index cdaac4dd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFieldType.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.List; - - -public class GetLibraryItemsFieldType { - - @JsonProperty("type") - private String type; - - - @JsonProperty("Operator") - private List operator; - - @JsonCreator - public GetLibraryItemsFieldType( - @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 static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsFieldType withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryItemsFieldType 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; - } - GetLibraryItemsFieldType other = (GetLibraryItemsFieldType) o; - return - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.operator, other.operator); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - type, operator); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsFieldType.class, - "type", type, - "operator", operator); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibraryItemsFieldType build() { - - return new GetLibraryItemsFieldType( - type, operator); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFilter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFilter.java deleted file mode 100644 index 9153391d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFilter.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibraryItemsFilter { - - @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 GetLibraryItemsFilter( - @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 static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsFilter withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetLibraryItemsFilter withFilterType(String filterType) { - Utils.checkNotNull(filterType, "filterType"); - this.filterType = filterType; - return this; - } - - public GetLibraryItemsFilter withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsFilter withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibraryItemsFilter 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; - } - GetLibraryItemsFilter other = (GetLibraryItemsFilter) o; - return - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.filterType, other.filterType) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - filter, filterType, key, - title, type); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsFilter.class, - "filter", filter, - "filterType", filterType, - "key", key, - "title", title, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibraryItemsFilter build() { - - return new GetLibraryItemsFilter( - filter, filterType, key, - title, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGenre.java deleted file mode 100644 index bc4c7c9d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGenre.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - - -public class GetLibraryItemsGenre { - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - /** - * The genre name of this media-item - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetLibraryItemsGenre( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - this.id = id; - this.tag = tag; - } - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The genre name of this media-item - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public GetLibraryItemsGenre withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The genre name of this media-item - */ - public GetLibraryItemsGenre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsGenre other = (GetLibraryItemsGenre) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsGenre.class, - "id", id, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The genre name of this media-item - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetLibraryItemsGenre build() { - - return new GetLibraryItemsGenre( - id, tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGuids.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGuids.java deleted file mode 100644 index b7bc7fa8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGuids.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibraryItemsGuids { - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - @JsonProperty("id") - private String id; - - @JsonCreator - public GetLibraryItemsGuids( - @JsonProperty("id") String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - } - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - @JsonIgnore - public String id() { - return id; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - public GetLibraryItemsGuids 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; - } - GetLibraryItemsGuids other = (GetLibraryItemsGuids) o; - return - Utils.enhancedDeepEquals(this.id, other.id); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsGuids.class, - "id", id); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String id; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetLibraryItemsGuids build() { - - return new GetLibraryItemsGuids( - id); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java deleted file mode 100644 index fa389c2e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetLibraryItemsHasThumbnail - * - *

Indicates if the part has a thumbnail. - */ -public enum GetLibraryItemsHasThumbnail { - False("0"), - True("1"); - - @JsonValue - private final String value; - - GetLibraryItemsHasThumbnail(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetLibraryItemsHasThumbnail o: GetLibraryItemsHasThumbnail.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java deleted file mode 100644 index 20964ea2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibraryItemsImage { - - @JsonProperty("alt") - private String alt; - - - @JsonProperty("type") - private GetLibraryItemsLibraryResponseType type; - - - @JsonProperty("url") - private String url; - - @JsonCreator - public GetLibraryItemsImage( - @JsonProperty("alt") String alt, - @JsonProperty("type") GetLibraryItemsLibraryResponseType 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 GetLibraryItemsLibraryResponseType type() { - return type; - } - - @JsonIgnore - public String url() { - return url; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsImage withAlt(String alt) { - Utils.checkNotNull(alt, "alt"); - this.alt = alt; - return this; - } - - public GetLibraryItemsImage withType(GetLibraryItemsLibraryResponseType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibraryItemsImage 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; - } - GetLibraryItemsImage other = (GetLibraryItemsImage) o; - return - Utils.enhancedDeepEquals(this.alt, other.alt) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.url, other.url); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - alt, type, url); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsImage.class, - "alt", alt, - "type", type, - "url", url); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String alt; - - private GetLibraryItemsLibraryResponseType 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(GetLibraryItemsLibraryResponseType 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 GetLibraryItemsImage build() { - - return new GetLibraryItemsImage( - alt, type, url); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.java deleted file mode 100644 index 9e940f6f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOptimizedForStreaming.java +++ /dev/null @@ -1,100 +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.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; - -/** - * GetLibraryItemsLibraryOptimizedForStreaming - * - *

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

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

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

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

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

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

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

The folder path for the media item. - */ -public class GetLibraryItemsLocation { - - @JsonProperty("path") - private String path; - - @JsonCreator - public GetLibraryItemsLocation( - @JsonProperty("path") String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - } - - @JsonIgnore - public String path() { - return path; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsLocation withPath(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsLocation other = (GetLibraryItemsLocation) o; - return - Utils.enhancedDeepEquals(this.path, other.path); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - path); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsLocation.class, - "path", path); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String path; - - private Builder() { - // force use of static builder() method - } - - - public Builder path(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - return this; - } - - public GetLibraryItemsLocation build() { - - return new GetLibraryItemsLocation( - path); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java deleted file mode 100644 index 298aa3e0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java +++ /dev/null @@ -1,1187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Float; -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.Optional; - - -public class GetLibraryItemsMedia { - /** - * Unique media identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Duration of the media in milliseconds. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - /** - * Bitrate in bits per second. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - /** - * Video width in pixels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("width") - private Optional width; - - /** - * Video height in pixels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("height") - private Optional height; - - /** - * Aspect ratio of the video. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("aspectRatio") - private Optional aspectRatio; - - /** - * Number of audio channels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannels") - private Optional audioChannels; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("displayOffset") - private Optional displayOffset; - - /** - * Audio codec used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioCodec") - private Optional audioCodec; - - /** - * Video codec used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoCodec") - private Optional videoCodec; - - /** - * Video resolution (e.g., 4k). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoResolution") - private Optional videoResolution; - - /** - * Container format of the media. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoFrameRate") - private Optional videoFrameRate; - - /** - * Video profile (e.g., main 10). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - /** - * Indicates whether voice activity is detected. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasVoiceActivity") - private Optional hasVoiceActivity; - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Part") - private Optional> part; - - @JsonCreator - public GetLibraryItemsMedia( - @JsonProperty("id") long id, - @JsonProperty("duration") Optional duration, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("width") Optional width, - @JsonProperty("height") Optional height, - @JsonProperty("aspectRatio") Optional aspectRatio, - @JsonProperty("audioChannels") Optional audioChannels, - @JsonProperty("displayOffset") Optional displayOffset, - @JsonProperty("audioCodec") Optional audioCodec, - @JsonProperty("videoCodec") Optional videoCodec, - @JsonProperty("videoResolution") Optional videoResolution, - @JsonProperty("container") Optional container, - @JsonProperty("videoFrameRate") Optional videoFrameRate, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("Part") 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(displayOffset, "displayOffset"); - 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(audioProfile, "audioProfile"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - 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.displayOffset = displayOffset; - this.audioCodec = audioCodec; - this.videoCodec = videoCodec; - this.videoResolution = videoResolution; - this.container = container; - this.videoFrameRate = videoFrameRate; - this.videoProfile = videoProfile; - this.hasVoiceActivity = hasVoiceActivity; - this.audioProfile = audioProfile; - this.optimizedForStreaming = optimizedForStreaming; - this.has64bitOffsets = has64bitOffsets; - this.part = part; - } - - public GetLibraryItemsMedia( - long id) { - this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Unique media identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Duration of the media in milliseconds. - */ - @JsonIgnore - public Optional duration() { - return duration; - } - - /** - * Bitrate in bits per second. - */ - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - /** - * Video width in pixels. - */ - @JsonIgnore - public Optional width() { - return width; - } - - /** - * Video height in pixels. - */ - @JsonIgnore - public Optional height() { - return height; - } - - /** - * Aspect ratio of the video. - */ - @JsonIgnore - public Optional aspectRatio() { - return aspectRatio; - } - - /** - * Number of audio channels. - */ - @JsonIgnore - public Optional audioChannels() { - return audioChannels; - } - - @JsonIgnore - public Optional displayOffset() { - return displayOffset; - } - - /** - * Audio codec used. - */ - @JsonIgnore - public Optional audioCodec() { - return audioCodec; - } - - /** - * Video codec used. - */ - @JsonIgnore - public Optional videoCodec() { - return videoCodec; - } - - /** - * Video resolution (e.g., 4k). - */ - @JsonIgnore - public Optional videoResolution() { - return videoResolution; - } - - /** - * Container format of the media. - */ - @JsonIgnore - public Optional container() { - return container; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - @JsonIgnore - public Optional videoFrameRate() { - return videoFrameRate; - } - - /** - * Video profile (e.g., main 10). - */ - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - /** - * Indicates whether voice activity is detected. - */ - @JsonIgnore - public Optional hasVoiceActivity() { - return hasVoiceActivity; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional optimizedForStreaming() { - return (Optional) optimizedForStreaming; - } - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> part() { - return (Optional>) part; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique media identifier. - */ - public GetLibraryItemsMedia withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Duration of the media in milliseconds. - */ - public GetLibraryItemsMedia withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - /** - * Duration of the media in milliseconds. - */ - public GetLibraryItemsMedia withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * Bitrate in bits per second. - */ - public GetLibraryItemsMedia withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - /** - * Bitrate in bits per second. - */ - public GetLibraryItemsMedia withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * Video width in pixels. - */ - public GetLibraryItemsMedia withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - /** - * Video width in pixels. - */ - public GetLibraryItemsMedia withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Video height in pixels. - */ - public GetLibraryItemsMedia withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - /** - * Video height in pixels. - */ - public GetLibraryItemsMedia withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * Aspect ratio of the video. - */ - public GetLibraryItemsMedia withAspectRatio(float aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - - /** - * Aspect ratio of the video. - */ - public GetLibraryItemsMedia withAspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - /** - * Number of audio channels. - */ - public GetLibraryItemsMedia withAudioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - - /** - * Number of audio channels. - */ - public GetLibraryItemsMedia withAudioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - public GetLibraryItemsMedia withDisplayOffset(int displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = Optional.ofNullable(displayOffset); - return this; - } - - - public GetLibraryItemsMedia withDisplayOffset(Optional displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = displayOffset; - return this; - } - - /** - * Audio codec used. - */ - public GetLibraryItemsMedia withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - - /** - * Audio codec used. - */ - public GetLibraryItemsMedia withAudioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - /** - * Video codec used. - */ - public GetLibraryItemsMedia withVideoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - - /** - * Video codec used. - */ - public GetLibraryItemsMedia withVideoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - /** - * Video resolution (e.g., 4k). - */ - public GetLibraryItemsMedia withVideoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - - /** - * Video resolution (e.g., 4k). - */ - public GetLibraryItemsMedia withVideoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - /** - * Container format of the media. - */ - public GetLibraryItemsMedia withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - /** - * Container format of the media. - */ - public GetLibraryItemsMedia withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public GetLibraryItemsMedia withVideoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public GetLibraryItemsMedia withVideoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - /** - * Video profile (e.g., main 10). - */ - public GetLibraryItemsMedia withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - /** - * Video profile (e.g., main 10). - */ - public GetLibraryItemsMedia withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - /** - * Indicates whether voice activity is detected. - */ - public GetLibraryItemsMedia withHasVoiceActivity(boolean hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); - return this; - } - - - /** - * Indicates whether voice activity is detected. - */ - public GetLibraryItemsMedia withHasVoiceActivity(Optional hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = hasVoiceActivity; - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetLibraryItemsMedia withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetLibraryItemsMedia withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetLibraryItemsMedia withOptimizedForStreaming(GetLibraryItemsOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetLibraryItemsMedia withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public GetLibraryItemsMedia withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public GetLibraryItemsMedia withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - public GetLibraryItemsMedia withPart(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - - public GetLibraryItemsMedia withPart(Optional> part) { - Utils.checkNotNull(part, "part"); - this.part = part; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsMedia other = (GetLibraryItemsMedia) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.displayOffset, other.displayOffset) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && - Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.part, other.part); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, displayOffset, audioCodec, - videoCodec, videoResolution, container, - videoFrameRate, videoProfile, hasVoiceActivity, - audioProfile, optimizedForStreaming, has64bitOffsets, - part); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsMedia.class, - "id", id, - "duration", duration, - "bitrate", bitrate, - "width", width, - "height", height, - "aspectRatio", aspectRatio, - "audioChannels", audioChannels, - "displayOffset", displayOffset, - "audioCodec", audioCodec, - "videoCodec", videoCodec, - "videoResolution", videoResolution, - "container", container, - "videoFrameRate", videoFrameRate, - "videoProfile", videoProfile, - "hasVoiceActivity", hasVoiceActivity, - "audioProfile", audioProfile, - "optimizedForStreaming", optimizedForStreaming, - "has64bitOffsets", has64bitOffsets, - "part", part); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - 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 displayOffset = 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 videoProfile = Optional.empty(); - - private Optional hasVoiceActivity = Optional.empty(); - - private Optional audioProfile = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional> part = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique media identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Duration of the media in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - /** - * Duration of the media in milliseconds. - */ - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * Bitrate in bits per second. - */ - public Builder bitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * Bitrate in bits per second. - */ - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - - /** - * Video width in pixels. - */ - public Builder width(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * Video width in pixels. - */ - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - /** - * Video height in pixels. - */ - public Builder height(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * Video height in pixels. - */ - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - /** - * Aspect ratio of the video. - */ - public Builder aspectRatio(float aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - /** - * Aspect ratio of the video. - */ - public Builder aspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - - /** - * Number of audio channels. - */ - public Builder audioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - /** - * Number of audio channels. - */ - public Builder audioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - - public Builder displayOffset(int displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = Optional.ofNullable(displayOffset); - return this; - } - - public Builder displayOffset(Optional displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = displayOffset; - return this; - } - - - /** - * Audio codec used. - */ - public Builder audioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - /** - * Audio codec used. - */ - public Builder audioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - - /** - * Video codec used. - */ - public Builder videoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - /** - * Video codec used. - */ - public Builder videoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - - /** - * Video resolution (e.g., 4k). - */ - public Builder videoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - /** - * Video resolution (e.g., 4k). - */ - public Builder videoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - - /** - * Container format of the media. - */ - public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - /** - * Container format of the media. - */ - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Builder videoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Builder videoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - - /** - * Video profile (e.g., main 10). - */ - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - /** - * Video profile (e.g., main 10). - */ - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - - /** - * Indicates whether voice activity is detected. - */ - public Builder hasVoiceActivity(boolean hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); - return this; - } - - /** - * Indicates whether voice activity is detected. - */ - public Builder hasVoiceActivity(Optional hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = hasVoiceActivity; - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(GetLibraryItemsOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public Builder has64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public Builder has64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - 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 GetLibraryItemsMedia build() { - - return new GetLibraryItemsMedia( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, displayOffset, audioCodec, - videoCodec, videoResolution, container, - videoFrameRate, videoProfile, hasVoiceActivity, - audioProfile, optimizedForStreaming, has64bitOffsets, - part); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java deleted file mode 100644 index 12f69ccc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java +++ /dev/null @@ -1,1067 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetLibraryItemsMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * Total number of media items in the library. - */ - @JsonProperty("totalSize") - private int totalSize; - - /** - * Offset value for pagination. - */ - @JsonProperty("offset") - private long offset; - - /** - * The content type or mode. - */ - @JsonProperty("content") - private String content; - - /** - * Indicates whether syncing is allowed. - */ - @JsonProperty("allowSync") - private boolean allowSync; - - /** - * Specifies whether caching is disabled. - */ - @JsonProperty("nocache") - private boolean nocache; - - /** - * URL for the background artwork of the media container. - */ - @JsonProperty("art") - private String art; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - /** - * The unique identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - /** - * The title of the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - /** - * The universally unique identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionUUID") - private Optional librarySectionUUID; - - /** - * The prefix used for media tag resource paths. - */ - @JsonProperty("mediaTagPrefix") - private String mediaTagPrefix; - - /** - * The version number for media tags. - */ - @JsonProperty("mediaTagVersion") - private long mediaTagVersion; - - /** - * URL for the thumbnail image of the media container. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The primary title of the media container. - */ - @JsonProperty("title1") - private String title1; - - /** - * The secondary title of the media container. - */ - @JsonProperty("title2") - private String title2; - - /** - * Identifier for the view group layout. - */ - @JsonProperty("viewGroup") - private String viewGroup; - - /** - * Identifier for the view mode. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewMode") - private Optional viewMode; - - /** - * Indicates if the media container has mixed parents. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mixedParents") - private Optional mixedParents; - - /** - * An array of metadata items. - */ - @JsonProperty("Metadata") - private List metadata; - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Meta") - private Optional meta; - - @JsonCreator - public GetLibraryItemsMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("totalSize") int totalSize, - @JsonProperty("offset") long offset, - @JsonProperty("content") String content, - @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("nocache") boolean nocache, - @JsonProperty("art") String art, - @JsonProperty("identifier") String identifier, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionUUID") Optional librarySectionUUID, - @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("mediaTagVersion") long mediaTagVersion, - @JsonProperty("thumb") String thumb, - @JsonProperty("title1") String title1, - @JsonProperty("title2") String title2, - @JsonProperty("viewGroup") String viewGroup, - @JsonProperty("viewMode") Optional viewMode, - @JsonProperty("mixedParents") Optional mixedParents, - @JsonProperty("Metadata") List metadata, - @JsonProperty("Meta") Optional meta) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(totalSize, "totalSize"); - Utils.checkNotNull(offset, "offset"); - Utils.checkNotNull(content, "content"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(nocache, "nocache"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title1, "title1"); - Utils.checkNotNull(title2, "title2"); - Utils.checkNotNull(viewGroup, "viewGroup"); - Utils.checkNotNull(viewMode, "viewMode"); - Utils.checkNotNull(mixedParents, "mixedParents"); - Utils.checkNotNull(metadata, "metadata"); - Utils.checkNotNull(meta, "meta"); - this.size = size; - this.totalSize = totalSize; - this.offset = offset; - this.content = content; - this.allowSync = allowSync; - this.nocache = nocache; - this.art = art; - this.identifier = identifier; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionUUID = librarySectionUUID; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.thumb = thumb; - this.title1 = title1; - this.title2 = title2; - this.viewGroup = viewGroup; - this.viewMode = viewMode; - this.mixedParents = mixedParents; - this.metadata = metadata; - this.meta = meta; - } - - public GetLibraryItemsMediaContainer( - int size, - int totalSize, - long offset, - String content, - boolean allowSync, - boolean nocache, - String art, - String identifier, - String mediaTagPrefix, - long mediaTagVersion, - String thumb, - String title1, - String title2, - String viewGroup, - List metadata) { - this(size, totalSize, offset, - content, allowSync, nocache, - art, identifier, Optional.empty(), - Optional.empty(), Optional.empty(), mediaTagPrefix, - mediaTagVersion, thumb, title1, - title2, viewGroup, Optional.empty(), - Optional.empty(), metadata, Optional.empty()); - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * Total number of media items in the library. - */ - @JsonIgnore - public int totalSize() { - return totalSize; - } - - /** - * Offset value for pagination. - */ - @JsonIgnore - public long offset() { - return offset; - } - - /** - * The content type or mode. - */ - @JsonIgnore - public String content() { - return content; - } - - /** - * Indicates whether syncing is allowed. - */ - @JsonIgnore - public boolean allowSync() { - return allowSync; - } - - /** - * Specifies whether caching is disabled. - */ - @JsonIgnore - public boolean nocache() { - return nocache; - } - - /** - * URL for the background artwork of the media container. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - /** - * The unique identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - /** - * The title of the library section. - */ - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - /** - * The universally unique identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionUUID() { - return librarySectionUUID; - } - - /** - * The prefix used for media tag resource paths. - */ - @JsonIgnore - public String mediaTagPrefix() { - return mediaTagPrefix; - } - - /** - * The version number for media tags. - */ - @JsonIgnore - public long mediaTagVersion() { - return mediaTagVersion; - } - - /** - * URL for the thumbnail image of the media container. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The primary title of the media container. - */ - @JsonIgnore - public String title1() { - return title1; - } - - /** - * The secondary title of the media container. - */ - @JsonIgnore - public String title2() { - return title2; - } - - /** - * Identifier for the view group layout. - */ - @JsonIgnore - public String viewGroup() { - return viewGroup; - } - - /** - * Identifier for the view mode. - */ - @JsonIgnore - public Optional viewMode() { - return viewMode; - } - - /** - * Indicates if the media container has mixed parents. - */ - @JsonIgnore - public Optional mixedParents() { - return mixedParents; - } - - /** - * An array of metadata items. - */ - @JsonIgnore - public List metadata() { - return metadata; - } - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional meta() { - return (Optional) meta; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetLibraryItemsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * Total number of media items in the library. - */ - public GetLibraryItemsMediaContainer withTotalSize(int totalSize) { - Utils.checkNotNull(totalSize, "totalSize"); - this.totalSize = totalSize; - return this; - } - - /** - * Offset value for pagination. - */ - public GetLibraryItemsMediaContainer withOffset(long offset) { - Utils.checkNotNull(offset, "offset"); - this.offset = offset; - return this; - } - - /** - * The content type or mode. - */ - public GetLibraryItemsMediaContainer withContent(String content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - /** - * Indicates whether syncing is allowed. - */ - public GetLibraryItemsMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - /** - * Specifies whether caching is disabled. - */ - public GetLibraryItemsMediaContainer withNocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - /** - * URL for the background artwork of the media container. - */ - public GetLibraryItemsMediaContainer withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetLibraryItemsMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - /** - * The unique identifier for the library section. - */ - public GetLibraryItemsMediaContainer withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - /** - * The unique identifier for the library section. - */ - public GetLibraryItemsMediaContainer withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - /** - * The title of the library section. - */ - public GetLibraryItemsMediaContainer withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - /** - * The title of the library section. - */ - public GetLibraryItemsMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - /** - * The universally unique identifier for the library section. - */ - public GetLibraryItemsMediaContainer withLibrarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - - /** - * The universally unique identifier for the library section. - */ - public GetLibraryItemsMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - /** - * The prefix used for media tag resource paths. - */ - public GetLibraryItemsMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - /** - * The version number for media tags. - */ - public GetLibraryItemsMediaContainer withMediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - /** - * URL for the thumbnail image of the media container. - */ - public GetLibraryItemsMediaContainer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The primary title of the media container. - */ - public GetLibraryItemsMediaContainer withTitle1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - /** - * The secondary title of the media container. - */ - public GetLibraryItemsMediaContainer withTitle2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - /** - * Identifier for the view group layout. - */ - public GetLibraryItemsMediaContainer withViewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - /** - * Identifier for the view mode. - */ - public GetLibraryItemsMediaContainer withViewMode(String viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = Optional.ofNullable(viewMode); - return this; - } - - - /** - * Identifier for the view mode. - */ - public GetLibraryItemsMediaContainer withViewMode(Optional viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = viewMode; - return this; - } - - /** - * Indicates if the media container has mixed parents. - */ - public GetLibraryItemsMediaContainer withMixedParents(boolean mixedParents) { - Utils.checkNotNull(mixedParents, "mixedParents"); - this.mixedParents = Optional.ofNullable(mixedParents); - return this; - } - - - /** - * Indicates if the media container has mixed parents. - */ - public GetLibraryItemsMediaContainer withMixedParents(Optional mixedParents) { - Utils.checkNotNull(mixedParents, "mixedParents"); - this.mixedParents = mixedParents; - return this; - } - - /** - * An array of metadata items. - */ - public GetLibraryItemsMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - public GetLibraryItemsMediaContainer withMeta(GetLibraryItemsMeta meta) { - Utils.checkNotNull(meta, "meta"); - this.meta = Optional.ofNullable(meta); - return this; - } - - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - public GetLibraryItemsMediaContainer withMeta(Optional meta) { - Utils.checkNotNull(meta, "meta"); - this.meta = meta; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsMediaContainer other = (GetLibraryItemsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && - Utils.enhancedDeepEquals(this.offset, other.offset) && - Utils.enhancedDeepEquals(this.content, other.content) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.nocache, other.nocache) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionUUID, other.librarySectionUUID) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title1, other.title1) && - Utils.enhancedDeepEquals(this.title2, other.title2) && - Utils.enhancedDeepEquals(this.viewGroup, other.viewGroup) && - Utils.enhancedDeepEquals(this.viewMode, other.viewMode) && - Utils.enhancedDeepEquals(this.mixedParents, other.mixedParents) && - Utils.enhancedDeepEquals(this.metadata, other.metadata) && - Utils.enhancedDeepEquals(this.meta, other.meta); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, totalSize, offset, - content, allowSync, nocache, - art, identifier, librarySectionID, - librarySectionTitle, librarySectionUUID, mediaTagPrefix, - mediaTagVersion, thumb, title1, - title2, viewGroup, viewMode, - mixedParents, metadata, meta); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsMediaContainer.class, - "size", size, - "totalSize", totalSize, - "offset", offset, - "content", content, - "allowSync", allowSync, - "nocache", nocache, - "art", art, - "identifier", identifier, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionUUID", librarySectionUUID, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "thumb", thumb, - "title1", title1, - "title2", title2, - "viewGroup", viewGroup, - "viewMode", viewMode, - "mixedParents", mixedParents, - "metadata", metadata, - "meta", meta); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Integer totalSize; - - private Long offset; - - private String content; - - private Boolean allowSync; - - private Boolean nocache; - - private String art; - - private String identifier; - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionUUID = Optional.empty(); - - private String mediaTagPrefix; - - private Long mediaTagVersion; - - private String thumb; - - private String title1; - - private String title2; - - private String viewGroup; - - private Optional viewMode = Optional.empty(); - - private Optional mixedParents = Optional.empty(); - - private List metadata; - - private Optional meta = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * Total number of media items in the library. - */ - public Builder totalSize(int totalSize) { - Utils.checkNotNull(totalSize, "totalSize"); - this.totalSize = totalSize; - return this; - } - - - /** - * Offset value for pagination. - */ - public Builder offset(long offset) { - Utils.checkNotNull(offset, "offset"); - this.offset = offset; - return this; - } - - - /** - * The content type or mode. - */ - public Builder content(String content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - - /** - * Indicates whether syncing is allowed. - */ - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - - /** - * Specifies whether caching is disabled. - */ - public Builder nocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - - /** - * URL for the background artwork of the media container. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - /** - * The unique identifier for the library section. - */ - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - /** - * The unique identifier for the library section. - */ - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - - /** - * The universally unique identifier for the library section. - */ - public Builder librarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - /** - * The universally unique identifier for the library section. - */ - public Builder librarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - - /** - * The prefix used for media tag resource paths. - */ - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - - /** - * The version number for media tags. - */ - public Builder mediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - - /** - * URL for the thumbnail image of the media container. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The primary title of the media container. - */ - public Builder title1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - - /** - * The secondary title of the media container. - */ - public Builder title2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - - /** - * Identifier for the view group layout. - */ - public Builder viewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - - /** - * Identifier for the view mode. - */ - public Builder viewMode(String viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = Optional.ofNullable(viewMode); - return this; - } - - /** - * Identifier for the view mode. - */ - public Builder viewMode(Optional viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = viewMode; - return this; - } - - - /** - * Indicates if the media container has mixed parents. - */ - public Builder mixedParents(boolean mixedParents) { - Utils.checkNotNull(mixedParents, "mixedParents"); - this.mixedParents = Optional.ofNullable(mixedParents); - return this; - } - - /** - * Indicates if the media container has mixed parents. - */ - public Builder mixedParents(Optional mixedParents) { - Utils.checkNotNull(mixedParents, "mixedParents"); - this.mixedParents = mixedParents; - return this; - } - - - /** - * An array of metadata items. - */ - public Builder metadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - public Builder meta(GetLibraryItemsMeta meta) { - Utils.checkNotNull(meta, "meta"); - this.meta = Optional.ofNullable(meta); - return this; - } - - /** - * 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; - } - - public GetLibraryItemsMediaContainer build() { - - return new GetLibraryItemsMediaContainer( - size, totalSize, offset, - content, allowSync, nocache, - art, identifier, librarySectionID, - librarySectionTitle, librarySectionUUID, mediaTagPrefix, - mediaTagVersion, thumb, title1, - title2, viewGroup, viewMode, - mixedParents, metadata, meta); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java deleted file mode 100644 index fa07966f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -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 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 - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.fieldType, other.fieldType); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - type, fieldType); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsMeta.class, - "type", type, - "fieldType", fieldType); - } - - @SuppressWarnings("UnusedReturnValue") - 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/GetLibraryItemsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetadata.java deleted file mode 100644 index 1f7de875..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetadata.java +++ /dev/null @@ -1,4199 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Float; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.LocalDate; -import java.util.List; -import java.util.Optional; - -/** - * GetLibraryItemsMetadata - * - *

Unknown - */ -public class GetLibraryItemsMetadata { - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - @JsonProperty("ratingKey") - private String ratingKey; - - /** - * The unique key for the media item. - */ - @JsonProperty("key") - private String key; - - /** - * The globally unique identifier for the media item. - */ - @JsonProperty("guid") - private String guid; - - /** - * A URL‐friendly version of the media title. - */ - @JsonProperty("slug") - private String slug; - - /** - * The studio that produced the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("studio") - private Optional studio; - - - @JsonProperty("type") - private GetLibraryItemsType type; - - /** - * The title of the media item. - */ - @JsonProperty("title") - private String title; - - /** - * The banner image URL for the media item. - */ - @JsonProperty("banner") - private String banner; - - /** - * The sort title used for ordering media items. - */ - @JsonProperty("titleSort") - private String titleSort; - - /** - * The content rating for the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("contentRating") - private Optional contentRating; - - /** - * A synopsis of the media item. - */ - @JsonProperty("summary") - private String summary; - - /** - * The critic rating for the media item. - */ - @JsonProperty("rating") - private float rating; - - /** - * The audience rating for the media item. - */ - @JsonProperty("audienceRating") - private double audienceRating; - - /** - * The release year of the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("year") - private Optional year; - - /** - * A brief tagline for the media item. - */ - @JsonProperty("tagline") - private String tagline; - - /** - * The thumbnail image URL for the media item. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The art image URL for the media item. - */ - @JsonProperty("art") - private String art; - - /** - * The theme URL for the media item. - */ - @JsonProperty("theme") - private String theme; - - /** - * The index position of the media item. - */ - @JsonProperty("index") - private int index; - - /** - * The number of leaf items (end nodes) under this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - /** - * The number of leaf items that have been viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewedLeafCount") - private Optional viewedLeafCount; - - /** - * The number of child items associated with this media item. - */ - @JsonProperty("childCount") - private int childCount; - - /** - * The total number of seasons (for TV shows). - */ - @JsonProperty("seasonCount") - private int seasonCount; - - /** - * The duration of the media item in milliseconds. - */ - @JsonProperty("duration") - private int duration; - - /** - * The original release date of the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originallyAvailableAt") - private Optional originallyAvailableAt; - - - @JsonProperty("addedAt") - private long addedAt; - - /** - * Unix epoch datetime in seconds - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - /** - * The URL for the audience rating image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audienceRatingImage") - private Optional audienceRatingImage; - - /** - * The source from which chapter data is derived. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chapterSource") - private Optional chapterSource; - - /** - * The primary extra key associated with this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("primaryExtraKey") - private Optional primaryExtraKey; - - /** - * The original title of the media item (if different). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originalTitle") - private Optional originalTitle; - - /** - * The rating key of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentRatingKey") - private Optional parentRatingKey; - - /** - * The rating key of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentRatingKey") - private Optional grandparentRatingKey; - - /** - * The GUID of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentGuid") - private Optional parentGuid; - - /** - * The GUID of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentGuid") - private Optional grandparentGuid; - - /** - * The slug for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentSlug") - private Optional grandparentSlug; - - /** - * The key of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentKey") - private Optional grandparentKey; - - /** - * The key of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - /** - * The title of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTitle") - private Optional grandparentTitle; - - /** - * The thumbnail URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentThumb") - private Optional grandparentThumb; - - /** - * The theme URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTheme") - private Optional grandparentTheme; - - /** - * The art URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentArt") - private Optional grandparentArt; - - /** - * The title of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - /** - * The index position of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - /** - * The thumbnail URL for the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - /** - * The URL for the rating image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingImage") - private Optional ratingImage; - - /** - * The number of times this media item has been viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - /** - * The current playback offset (in milliseconds). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewOffset") - private Optional viewOffset; - - /** - * The number of times this media item has been skipped. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipCount") - private Optional skipCount; - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; - - /** - * The Unix timestamp representing the last time the item was rated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastRatedAt") - private Optional lastRatedAt; - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAtAccuracy") - private Optional createdAtAccuracy; - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAtTZOffset") - private Optional createdAtTZOffset; - - /** - * Unix timestamp for when the media item was last viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("userRating") - private Optional userRating; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Image") - private Optional> image; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("UltraBlurColors") - private Optional ultraBlurColors; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Guid") - private Optional> guids; - - /** - * The identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - /** - * The title of the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - /** - * The key corresponding to the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionKey") - private Optional librarySectionKey; - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("showOrdering") - private Optional showOrdering; - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("flattenSeasons") - private Optional flattenSeasons; - - /** - * Indicates whether child items should be skipped. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipChildren") - private Optional skipChildren; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Media") - private Optional> media; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Genre") - private Optional> genre; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Country") - private Optional> country; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Director") - private Optional> director; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Writer") - private Optional> writer; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Producer") - private Optional> producer; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Collection") - private Optional> collection; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Role") - private Optional> role; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Rating") - private Optional> ratings; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Similar") - private Optional> similar; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Location") - private Optional> location; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Chapter") - private Optional> chapter; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Marker") - private Optional> marker; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Extras") - private Optional extras; - - @JsonCreator - public GetLibraryItemsMetadata( - @JsonProperty("ratingKey") String ratingKey, - @JsonProperty("key") String key, - @JsonProperty("guid") String guid, - @JsonProperty("slug") String slug, - @JsonProperty("studio") Optional studio, - @JsonProperty("type") GetLibraryItemsType type, - @JsonProperty("title") String title, - @JsonProperty("banner") String banner, - @JsonProperty("titleSort") String titleSort, - @JsonProperty("contentRating") Optional contentRating, - @JsonProperty("summary") String summary, - @JsonProperty("rating") float rating, - @JsonProperty("audienceRating") double audienceRating, - @JsonProperty("year") Optional year, - @JsonProperty("tagline") String tagline, - @JsonProperty("thumb") String thumb, - @JsonProperty("art") String art, - @JsonProperty("theme") String theme, - @JsonProperty("index") int index, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("viewedLeafCount") Optional viewedLeafCount, - @JsonProperty("childCount") int childCount, - @JsonProperty("seasonCount") int seasonCount, - @JsonProperty("duration") int duration, - @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, - @JsonProperty("addedAt") long addedAt, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("audienceRatingImage") Optional audienceRatingImage, - @JsonProperty("chapterSource") Optional chapterSource, - @JsonProperty("primaryExtraKey") Optional primaryExtraKey, - @JsonProperty("originalTitle") Optional originalTitle, - @JsonProperty("parentRatingKey") Optional parentRatingKey, - @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, - @JsonProperty("parentGuid") Optional parentGuid, - @JsonProperty("grandparentGuid") Optional grandparentGuid, - @JsonProperty("grandparentSlug") Optional grandparentSlug, - @JsonProperty("grandparentKey") Optional grandparentKey, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("grandparentTitle") Optional grandparentTitle, - @JsonProperty("grandparentThumb") Optional grandparentThumb, - @JsonProperty("grandparentTheme") Optional grandparentTheme, - @JsonProperty("grandparentArt") Optional grandparentArt, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("ratingImage") Optional ratingImage, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("viewOffset") Optional viewOffset, - @JsonProperty("skipCount") Optional skipCount, - @JsonProperty("subtype") Optional subtype, - @JsonProperty("lastRatedAt") Optional lastRatedAt, - @JsonProperty("createdAtAccuracy") Optional createdAtAccuracy, - @JsonProperty("createdAtTZOffset") Optional createdAtTZOffset, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("userRating") Optional userRating, - @JsonProperty("Image") Optional> image, - @JsonProperty("UltraBlurColors") Optional ultraBlurColors, - @JsonProperty("Guid") Optional> guids, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionKey") Optional librarySectionKey, - @JsonProperty("showOrdering") Optional showOrdering, - @JsonProperty("flattenSeasons") Optional flattenSeasons, - @JsonProperty("skipChildren") Optional skipChildren, - @JsonProperty("Media") Optional> media, - @JsonProperty("Genre") Optional> genre, - @JsonProperty("Country") Optional> country, - @JsonProperty("Director") Optional> director, - @JsonProperty("Writer") Optional> writer, - @JsonProperty("Producer") Optional> producer, - @JsonProperty("Collection") Optional> collection, - @JsonProperty("Role") Optional> role, - @JsonProperty("Rating") Optional> ratings, - @JsonProperty("Similar") Optional> similar, - @JsonProperty("Location") Optional> location, - @JsonProperty("Chapter") Optional> chapter, - @JsonProperty("Marker") Optional> marker, - @JsonProperty("Extras") Optional extras) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(slug, "slug"); - Utils.checkNotNull(studio, "studio"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(banner, "banner"); - Utils.checkNotNull(titleSort, "titleSort"); - Utils.checkNotNull(contentRating, "contentRating"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(rating, "rating"); - Utils.checkNotNull(audienceRating, "audienceRating"); - Utils.checkNotNull(year, "year"); - Utils.checkNotNull(tagline, "tagline"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(theme, "theme"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - Utils.checkNotNull(childCount, "childCount"); - Utils.checkNotNull(seasonCount, "seasonCount"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - Utils.checkNotNull(chapterSource, "chapterSource"); - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - Utils.checkNotNull(originalTitle, "originalTitle"); - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - Utils.checkNotNull(parentGuid, "parentGuid"); - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - Utils.checkNotNull(grandparentKey, "grandparentKey"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - Utils.checkNotNull(grandparentArt, "grandparentArt"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(ratingImage, "ratingImage"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(viewOffset, "viewOffset"); - Utils.checkNotNull(skipCount, "skipCount"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(userRating, "userRating"); - Utils.checkNotNull(image, "image"); - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - Utils.checkNotNull(guids, "guids"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - Utils.checkNotNull(showOrdering, "showOrdering"); - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - Utils.checkNotNull(skipChildren, "skipChildren"); - Utils.checkNotNull(media, "media"); - Utils.checkNotNull(genre, "genre"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(director, "director"); - Utils.checkNotNull(writer, "writer"); - Utils.checkNotNull(producer, "producer"); - Utils.checkNotNull(collection, "collection"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(ratings, "ratings"); - Utils.checkNotNull(similar, "similar"); - Utils.checkNotNull(location, "location"); - Utils.checkNotNull(chapter, "chapter"); - Utils.checkNotNull(marker, "marker"); - Utils.checkNotNull(extras, "extras"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.slug = slug; - this.studio = studio; - this.type = type; - this.title = title; - this.banner = banner; - this.titleSort = titleSort; - 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.theme = theme; - this.index = index; - this.leafCount = leafCount; - this.viewedLeafCount = viewedLeafCount; - this.childCount = childCount; - this.seasonCount = seasonCount; - this.duration = duration; - this.originallyAvailableAt = originallyAvailableAt; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - this.audienceRatingImage = audienceRatingImage; - this.chapterSource = chapterSource; - this.primaryExtraKey = primaryExtraKey; - this.originalTitle = originalTitle; - this.parentRatingKey = parentRatingKey; - this.grandparentRatingKey = grandparentRatingKey; - this.parentGuid = parentGuid; - this.grandparentGuid = grandparentGuid; - this.grandparentSlug = grandparentSlug; - this.grandparentKey = grandparentKey; - this.parentKey = parentKey; - this.grandparentTitle = grandparentTitle; - this.grandparentThumb = grandparentThumb; - this.grandparentTheme = grandparentTheme; - this.grandparentArt = grandparentArt; - this.parentTitle = parentTitle; - this.parentIndex = parentIndex; - this.parentThumb = parentThumb; - this.ratingImage = ratingImage; - this.viewCount = viewCount; - this.viewOffset = viewOffset; - this.skipCount = skipCount; - this.subtype = subtype; - this.lastRatedAt = lastRatedAt; - this.createdAtAccuracy = createdAtAccuracy; - this.createdAtTZOffset = createdAtTZOffset; - this.lastViewedAt = lastViewedAt; - this.userRating = userRating; - this.image = image; - this.ultraBlurColors = ultraBlurColors; - this.guids = guids; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionKey = librarySectionKey; - this.showOrdering = showOrdering; - this.flattenSeasons = flattenSeasons; - this.skipChildren = skipChildren; - this.media = media; - this.genre = genre; - this.country = country; - this.director = director; - this.writer = writer; - this.producer = producer; - this.collection = collection; - this.role = role; - this.ratings = ratings; - this.similar = similar; - this.location = location; - this.chapter = chapter; - this.marker = marker; - this.extras = extras; - } - - public GetLibraryItemsMetadata( - String ratingKey, - String key, - String guid, - String slug, - GetLibraryItemsType type, - String title, - String banner, - String titleSort, - String summary, - float rating, - double audienceRating, - String tagline, - String thumb, - String art, - String theme, - int index, - int childCount, - int seasonCount, - int duration, - long addedAt) { - this(ratingKey, key, guid, - slug, Optional.empty(), type, - title, banner, titleSort, - Optional.empty(), summary, rating, - audienceRating, Optional.empty(), tagline, - thumb, art, theme, - index, Optional.empty(), Optional.empty(), - childCount, seasonCount, duration, - Optional.empty(), addedAt, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - @JsonIgnore - public String ratingKey() { - return ratingKey; - } - - /** - * The unique key for the media item. - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The globally unique identifier for the media item. - */ - @JsonIgnore - public String guid() { - return guid; - } - - /** - * A URL‐friendly version of the media title. - */ - @JsonIgnore - public String slug() { - return slug; - } - - /** - * The studio that produced the media item. - */ - @JsonIgnore - public Optional studio() { - return studio; - } - - @JsonIgnore - public GetLibraryItemsType type() { - return type; - } - - /** - * The title of the media item. - */ - @JsonIgnore - public String title() { - return title; - } - - /** - * The banner image URL for the media item. - */ - @JsonIgnore - public String banner() { - return banner; - } - - /** - * The sort title used for ordering media items. - */ - @JsonIgnore - public String titleSort() { - return titleSort; - } - - /** - * The content rating for the media item. - */ - @JsonIgnore - public Optional contentRating() { - return contentRating; - } - - /** - * A synopsis of the media item. - */ - @JsonIgnore - public String summary() { - return summary; - } - - /** - * The critic rating for the media item. - */ - @JsonIgnore - public float rating() { - return rating; - } - - /** - * The audience rating for the media item. - */ - @JsonIgnore - public double audienceRating() { - return audienceRating; - } - - /** - * The release year of the media item. - */ - @JsonIgnore - public Optional year() { - return year; - } - - /** - * A brief tagline for the media item. - */ - @JsonIgnore - public String tagline() { - return tagline; - } - - /** - * The thumbnail image URL for the media item. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The art image URL for the media item. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * The theme URL for the media item. - */ - @JsonIgnore - public String theme() { - return theme; - } - - /** - * The index position of the media item. - */ - @JsonIgnore - public int index() { - return index; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - /** - * The number of leaf items that have been viewed. - */ - @JsonIgnore - public Optional viewedLeafCount() { - return viewedLeafCount; - } - - /** - * The number of child items associated with this media item. - */ - @JsonIgnore - public int childCount() { - return childCount; - } - - /** - * The total number of seasons (for TV shows). - */ - @JsonIgnore - public int seasonCount() { - return seasonCount; - } - - /** - * The duration of the media item in milliseconds. - */ - @JsonIgnore - public int duration() { - return duration; - } - - /** - * The original release date of the media item. - */ - @JsonIgnore - public Optional originallyAvailableAt() { - return originallyAvailableAt; - } - - @JsonIgnore - public long addedAt() { - return addedAt; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - /** - * The URL for the audience rating image. - */ - @JsonIgnore - public Optional audienceRatingImage() { - return audienceRatingImage; - } - - /** - * The source from which chapter data is derived. - */ - @JsonIgnore - public Optional chapterSource() { - return chapterSource; - } - - /** - * The primary extra key associated with this media item. - */ - @JsonIgnore - public Optional primaryExtraKey() { - return primaryExtraKey; - } - - /** - * The original title of the media item (if different). - */ - @JsonIgnore - public Optional originalTitle() { - return originalTitle; - } - - /** - * The rating key of the parent media item. - */ - @JsonIgnore - public Optional parentRatingKey() { - return parentRatingKey; - } - - /** - * The rating key of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentRatingKey() { - return grandparentRatingKey; - } - - /** - * The GUID of the parent media item. - */ - @JsonIgnore - public Optional parentGuid() { - return parentGuid; - } - - /** - * The GUID of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentGuid() { - return grandparentGuid; - } - - /** - * The slug for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentSlug() { - return grandparentSlug; - } - - /** - * The key of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentKey() { - return grandparentKey; - } - - /** - * The key of the parent media item. - */ - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - /** - * The title of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentTitle() { - return grandparentTitle; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentThumb() { - return grandparentThumb; - } - - /** - * The theme URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentTheme() { - return grandparentTheme; - } - - /** - * The art URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentArt() { - return grandparentArt; - } - - /** - * The title of the parent media item. - */ - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - /** - * The index position of the parent media item. - */ - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - /** - * The thumbnail URL for the parent media item. - */ - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - /** - * The URL for the rating image. - */ - @JsonIgnore - public Optional ratingImage() { - return ratingImage; - } - - /** - * The number of times this media item has been viewed. - */ - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - /** - * The current playback offset (in milliseconds). - */ - @JsonIgnore - public Optional viewOffset() { - return viewOffset; - } - - /** - * The number of times this media item has been skipped. - */ - @JsonIgnore - public Optional skipCount() { - return skipCount; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - @JsonIgnore - public Optional subtype() { - return subtype; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - @JsonIgnore - public Optional lastRatedAt() { - return lastRatedAt; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - @JsonIgnore - public Optional createdAtAccuracy() { - return createdAtAccuracy; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - @JsonIgnore - public Optional createdAtTZOffset() { - return createdAtTZOffset; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - @JsonIgnore - public Optional userRating() { - return userRating; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> image() { - return (Optional>) image; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional ultraBlurColors() { - return (Optional) ultraBlurColors; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> guids() { - return (Optional>) guids; - } - - /** - * The identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - /** - * The title of the library section. - */ - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - /** - * The key corresponding to the library section. - */ - @JsonIgnore - public Optional librarySectionKey() { - return librarySectionKey; - } - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional showOrdering() { - return (Optional) showOrdering; - } - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional flattenSeasons() { - return (Optional) flattenSeasons; - } - - /** - * Indicates whether child items should be skipped. - */ - @JsonIgnore - public Optional skipChildren() { - return skipChildren; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> media() { - return (Optional>) media; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> genre() { - return (Optional>) genre; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> country() { - return (Optional>) country; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> director() { - return (Optional>) director; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> writer() { - return (Optional>) writer; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> producer() { - return (Optional>) producer; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> collection() { - return (Optional>) collection; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> role() { - return (Optional>) role; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> ratings() { - return (Optional>) ratings; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> similar() { - return (Optional>) similar; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> location() { - return (Optional>) location; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> chapter() { - return (Optional>) chapter; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> marker() { - return (Optional>) marker; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional extras() { - return (Optional) extras; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - public GetLibraryItemsMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * The unique key for the media item. - */ - public GetLibraryItemsMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The globally unique identifier for the media item. - */ - public GetLibraryItemsMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - /** - * A URL‐friendly version of the media title. - */ - public GetLibraryItemsMetadata withSlug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - /** - * The studio that produced the media item. - */ - public GetLibraryItemsMetadata withStudio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - - /** - * The studio that produced the media item. - */ - public GetLibraryItemsMetadata withStudio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - public GetLibraryItemsMetadata withType(GetLibraryItemsType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The title of the media item. - */ - public GetLibraryItemsMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * The banner image URL for the media item. - */ - public GetLibraryItemsMetadata withBanner(String banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = banner; - return this; - } - - /** - * The sort title used for ordering media items. - */ - public GetLibraryItemsMetadata withTitleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - /** - * The content rating for the media item. - */ - public GetLibraryItemsMetadata withContentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - - /** - * The content rating for the media item. - */ - public GetLibraryItemsMetadata withContentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - /** - * A synopsis of the media item. - */ - public GetLibraryItemsMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - /** - * The critic rating for the media item. - */ - public GetLibraryItemsMetadata withRating(float rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - /** - * The audience rating for the media item. - */ - public GetLibraryItemsMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - /** - * The release year of the media item. - */ - public GetLibraryItemsMetadata withYear(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - - /** - * The release year of the media item. - */ - public GetLibraryItemsMetadata withYear(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - /** - * A brief tagline for the media item. - */ - public GetLibraryItemsMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - /** - * The thumbnail image URL for the media item. - */ - public GetLibraryItemsMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The art image URL for the media item. - */ - public GetLibraryItemsMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * The theme URL for the media item. - */ - public GetLibraryItemsMetadata withTheme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - /** - * The index position of the media item. - */ - public GetLibraryItemsMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - public GetLibraryItemsMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - /** - * The number of leaf items (end nodes) under this media item. - */ - public GetLibraryItemsMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - /** - * The number of leaf items that have been viewed. - */ - public GetLibraryItemsMetadata withViewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - - /** - * The number of leaf items that have been viewed. - */ - public GetLibraryItemsMetadata withViewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - /** - * The number of child items associated with this media item. - */ - public GetLibraryItemsMetadata withChildCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - /** - * The total number of seasons (for TV shows). - */ - public GetLibraryItemsMetadata withSeasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - - /** - * The duration of the media item in milliseconds. - */ - public GetLibraryItemsMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * The original release date of the media item. - */ - public GetLibraryItemsMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - - /** - * The original release date of the media item. - */ - public GetLibraryItemsMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - public GetLibraryItemsMetadata withAddedAt(long addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public GetLibraryItemsMetadata withUpdatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public GetLibraryItemsMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - /** - * The URL for the audience rating image. - */ - public GetLibraryItemsMetadata withAudienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - - /** - * The URL for the audience rating image. - */ - public GetLibraryItemsMetadata withAudienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - /** - * The source from which chapter data is derived. - */ - public GetLibraryItemsMetadata withChapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - - /** - * The source from which chapter data is derived. - */ - public GetLibraryItemsMetadata withChapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - /** - * The primary extra key associated with this media item. - */ - public GetLibraryItemsMetadata withPrimaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - - /** - * The primary extra key associated with this media item. - */ - public GetLibraryItemsMetadata withPrimaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - /** - * The original title of the media item (if different). - */ - public GetLibraryItemsMetadata withOriginalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - - /** - * The original title of the media item (if different). - */ - public GetLibraryItemsMetadata withOriginalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - /** - * The rating key of the parent media item. - */ - public GetLibraryItemsMetadata withParentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - - /** - * The rating key of the parent media item. - */ - public GetLibraryItemsMetadata withParentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - /** - * The rating key of the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - - /** - * The rating key of the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - /** - * The GUID of the parent media item. - */ - public GetLibraryItemsMetadata withParentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - - /** - * The GUID of the parent media item. - */ - public GetLibraryItemsMetadata withParentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - /** - * The GUID of the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - - /** - * The GUID of the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - /** - * The slug for the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentSlug(String grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = Optional.ofNullable(grandparentSlug); - return this; - } - - - /** - * The slug for the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentSlug(Optional grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = grandparentSlug; - return this; - } - - /** - * The key of the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - - /** - * The key of the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - /** - * The key of the parent media item. - */ - public GetLibraryItemsMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - - /** - * The key of the parent media item. - */ - public GetLibraryItemsMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - /** - * The title of the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - - /** - * The title of the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - - /** - * The thumbnail URL for the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - /** - * The theme URL for the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentTheme(String grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = Optional.ofNullable(grandparentTheme); - return this; - } - - - /** - * The theme URL for the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentTheme(Optional grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = grandparentTheme; - return this; - } - - /** - * The art URL for the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - - /** - * The art URL for the grandparent media item. - */ - public GetLibraryItemsMetadata withGrandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - /** - * The title of the parent media item. - */ - public GetLibraryItemsMetadata withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - - /** - * The title of the parent media item. - */ - public GetLibraryItemsMetadata withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - /** - * The index position of the parent media item. - */ - public GetLibraryItemsMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - - /** - * The index position of the parent media item. - */ - public GetLibraryItemsMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - /** - * The thumbnail URL for the parent media item. - */ - public GetLibraryItemsMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - - /** - * The thumbnail URL for the parent media item. - */ - public GetLibraryItemsMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - /** - * The URL for the rating image. - */ - public GetLibraryItemsMetadata withRatingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - - /** - * The URL for the rating image. - */ - public GetLibraryItemsMetadata withRatingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - /** - * The number of times this media item has been viewed. - */ - public GetLibraryItemsMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - - /** - * The number of times this media item has been viewed. - */ - public GetLibraryItemsMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - /** - * The current playback offset (in milliseconds). - */ - public GetLibraryItemsMetadata withViewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - - /** - * The current playback offset (in milliseconds). - */ - public GetLibraryItemsMetadata withViewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - /** - * The number of times this media item has been skipped. - */ - public GetLibraryItemsMetadata withSkipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - - /** - * The number of times this media item has been skipped. - */ - public GetLibraryItemsMetadata withSkipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public GetLibraryItemsMetadata withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public GetLibraryItemsMetadata withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public GetLibraryItemsMetadata withLastRatedAt(long lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public GetLibraryItemsMetadata withLastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public GetLibraryItemsMetadata withCreatedAtAccuracy(String createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); - return this; - } - - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public GetLibraryItemsMetadata withCreatedAtAccuracy(Optional createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = createdAtAccuracy; - return this; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public GetLibraryItemsMetadata withCreatedAtTZOffset(String createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); - return this; - } - - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public GetLibraryItemsMetadata withCreatedAtTZOffset(Optional createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = createdAtTZOffset; - return this; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - public GetLibraryItemsMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - - /** - * Unix timestamp for when the media item was last viewed. - */ - public GetLibraryItemsMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public GetLibraryItemsMetadata withUserRating(float userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public GetLibraryItemsMetadata withUserRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - public GetLibraryItemsMetadata withImage(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - - public GetLibraryItemsMetadata withImage(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - public GetLibraryItemsMetadata withUltraBlurColors(GetLibraryItemsUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); - return this; - } - - - public GetLibraryItemsMetadata withUltraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; - return this; - } - - public GetLibraryItemsMetadata withGuids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - - public GetLibraryItemsMetadata withGuids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - /** - * The identifier for the library section. - */ - public GetLibraryItemsMetadata withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - /** - * The identifier for the library section. - */ - public GetLibraryItemsMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - /** - * The title of the library section. - */ - public GetLibraryItemsMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - /** - * The title of the library section. - */ - public GetLibraryItemsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - /** - * The key corresponding to the library section. - */ - public GetLibraryItemsMetadata withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - - /** - * The key corresponding to the library section. - */ - public GetLibraryItemsMetadata withLibrarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - public GetLibraryItemsMetadata withShowOrdering(ShowOrdering showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = Optional.ofNullable(showOrdering); - return this; - } - - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - public GetLibraryItemsMetadata withShowOrdering(Optional showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = showOrdering; - return this; - } - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public GetLibraryItemsMetadata withFlattenSeasons(FlattenSeasons flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = Optional.ofNullable(flattenSeasons); - return this; - } - - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public GetLibraryItemsMetadata withFlattenSeasons(Optional flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = flattenSeasons; - return this; - } - - /** - * Indicates whether child items should be skipped. - */ - public GetLibraryItemsMetadata withSkipChildren(boolean skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = Optional.ofNullable(skipChildren); - return this; - } - - - /** - * Indicates whether child items should be skipped. - */ - public GetLibraryItemsMetadata withSkipChildren(Optional skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = skipChildren; - return this; - } - - public GetLibraryItemsMetadata withMedia(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - - public GetLibraryItemsMetadata withMedia(Optional> media) { - Utils.checkNotNull(media, "media"); - this.media = media; - return this; - } - - public GetLibraryItemsMetadata withGenre(List genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = Optional.ofNullable(genre); - return this; - } - - - public GetLibraryItemsMetadata withGenre(Optional> genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = genre; - return this; - } - - public GetLibraryItemsMetadata withCountry(List country) { - Utils.checkNotNull(country, "country"); - this.country = Optional.ofNullable(country); - return this; - } - - - public GetLibraryItemsMetadata withCountry(Optional> country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - public GetLibraryItemsMetadata withDirector(List director) { - Utils.checkNotNull(director, "director"); - this.director = Optional.ofNullable(director); - return this; - } - - - public GetLibraryItemsMetadata withDirector(Optional> director) { - Utils.checkNotNull(director, "director"); - this.director = director; - return this; - } - - public GetLibraryItemsMetadata withWriter(List writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = Optional.ofNullable(writer); - return this; - } - - - public GetLibraryItemsMetadata withWriter(Optional> writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = writer; - return this; - } - - public GetLibraryItemsMetadata withProducer(List producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = Optional.ofNullable(producer); - return this; - } - - - public GetLibraryItemsMetadata withProducer(Optional> producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = producer; - return this; - } - - public GetLibraryItemsMetadata withCollection(List collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = Optional.ofNullable(collection); - return this; - } - - - public GetLibraryItemsMetadata withCollection(Optional> collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = collection; - return this; - } - - public GetLibraryItemsMetadata withRole(List role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - public GetLibraryItemsMetadata withRole(Optional> role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - public GetLibraryItemsMetadata withRatings(List ratings) { - Utils.checkNotNull(ratings, "ratings"); - this.ratings = Optional.ofNullable(ratings); - return this; - } - - - public GetLibraryItemsMetadata withRatings(Optional> ratings) { - Utils.checkNotNull(ratings, "ratings"); - this.ratings = ratings; - return this; - } - - public GetLibraryItemsMetadata withSimilar(List similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = Optional.ofNullable(similar); - return this; - } - - - public GetLibraryItemsMetadata withSimilar(Optional> similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = similar; - return this; - } - - public GetLibraryItemsMetadata withLocation(List location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - - public GetLibraryItemsMetadata withLocation(Optional> location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - public GetLibraryItemsMetadata withChapter(List chapter) { - Utils.checkNotNull(chapter, "chapter"); - this.chapter = Optional.ofNullable(chapter); - return this; - } - - - public GetLibraryItemsMetadata withChapter(Optional> chapter) { - Utils.checkNotNull(chapter, "chapter"); - this.chapter = chapter; - return this; - } - - public GetLibraryItemsMetadata withMarker(List marker) { - Utils.checkNotNull(marker, "marker"); - this.marker = Optional.ofNullable(marker); - return this; - } - - - public GetLibraryItemsMetadata withMarker(Optional> marker) { - Utils.checkNotNull(marker, "marker"); - this.marker = marker; - return this; - } - - public GetLibraryItemsMetadata withExtras(Extras extras) { - Utils.checkNotNull(extras, "extras"); - this.extras = Optional.ofNullable(extras); - return this; - } - - - public GetLibraryItemsMetadata withExtras(Optional extras) { - Utils.checkNotNull(extras, "extras"); - this.extras = extras; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsMetadata other = (GetLibraryItemsMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.slug, other.slug) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.banner, other.banner) && - Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.rating, other.rating) && - Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.theme, other.theme) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && - Utils.enhancedDeepEquals(this.childCount, other.childCount) && - Utils.enhancedDeepEquals(this.seasonCount, other.seasonCount) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && - Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && - Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && - Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && - Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && - Utils.enhancedDeepEquals(this.parentGuid, other.parentGuid) && - Utils.enhancedDeepEquals(this.grandparentGuid, other.grandparentGuid) && - Utils.enhancedDeepEquals(this.grandparentSlug, other.grandparentSlug) && - Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && - Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && - Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && - Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && - Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && - Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && - Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && - Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && - Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && - Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && - Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && - Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && - Utils.enhancedDeepEquals(this.skipCount, other.skipCount) && - Utils.enhancedDeepEquals(this.subtype, other.subtype) && - Utils.enhancedDeepEquals(this.lastRatedAt, other.lastRatedAt) && - Utils.enhancedDeepEquals(this.createdAtAccuracy, other.createdAtAccuracy) && - Utils.enhancedDeepEquals(this.createdAtTZOffset, other.createdAtTZOffset) && - Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && - Utils.enhancedDeepEquals(this.userRating, other.userRating) && - Utils.enhancedDeepEquals(this.image, other.image) && - Utils.enhancedDeepEquals(this.ultraBlurColors, other.ultraBlurColors) && - Utils.enhancedDeepEquals(this.guids, other.guids) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionKey, other.librarySectionKey) && - Utils.enhancedDeepEquals(this.showOrdering, other.showOrdering) && - Utils.enhancedDeepEquals(this.flattenSeasons, other.flattenSeasons) && - Utils.enhancedDeepEquals(this.skipChildren, other.skipChildren) && - Utils.enhancedDeepEquals(this.media, other.media) && - Utils.enhancedDeepEquals(this.genre, other.genre) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.director, other.director) && - Utils.enhancedDeepEquals(this.writer, other.writer) && - Utils.enhancedDeepEquals(this.producer, other.producer) && - Utils.enhancedDeepEquals(this.collection, other.collection) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.ratings, other.ratings) && - Utils.enhancedDeepEquals(this.similar, other.similar) && - Utils.enhancedDeepEquals(this.location, other.location) && - Utils.enhancedDeepEquals(this.chapter, other.chapter) && - Utils.enhancedDeepEquals(this.marker, other.marker) && - Utils.enhancedDeepEquals(this.extras, other.extras); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - slug, studio, type, - title, banner, titleSort, - contentRating, summary, rating, - audienceRating, year, tagline, - thumb, art, theme, - index, leafCount, viewedLeafCount, - childCount, seasonCount, duration, - originallyAvailableAt, addedAt, updatedAt, - audienceRatingImage, chapterSource, primaryExtraKey, - originalTitle, parentRatingKey, grandparentRatingKey, - parentGuid, grandparentGuid, grandparentSlug, - grandparentKey, parentKey, grandparentTitle, - grandparentThumb, grandparentTheme, grandparentArt, - parentTitle, parentIndex, parentThumb, - ratingImage, viewCount, viewOffset, - skipCount, subtype, lastRatedAt, - createdAtAccuracy, createdAtTZOffset, lastViewedAt, - userRating, image, ultraBlurColors, - guids, librarySectionID, librarySectionTitle, - librarySectionKey, showOrdering, flattenSeasons, - skipChildren, media, genre, - country, director, writer, - producer, collection, role, - ratings, similar, location, - chapter, marker, extras); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "slug", slug, - "studio", studio, - "type", type, - "title", title, - "banner", banner, - "titleSort", titleSort, - "contentRating", contentRating, - "summary", summary, - "rating", rating, - "audienceRating", audienceRating, - "year", year, - "tagline", tagline, - "thumb", thumb, - "art", art, - "theme", theme, - "index", index, - "leafCount", leafCount, - "viewedLeafCount", viewedLeafCount, - "childCount", childCount, - "seasonCount", seasonCount, - "duration", duration, - "originallyAvailableAt", originallyAvailableAt, - "addedAt", addedAt, - "updatedAt", updatedAt, - "audienceRatingImage", audienceRatingImage, - "chapterSource", chapterSource, - "primaryExtraKey", primaryExtraKey, - "originalTitle", originalTitle, - "parentRatingKey", parentRatingKey, - "grandparentRatingKey", grandparentRatingKey, - "parentGuid", parentGuid, - "grandparentGuid", grandparentGuid, - "grandparentSlug", grandparentSlug, - "grandparentKey", grandparentKey, - "parentKey", parentKey, - "grandparentTitle", grandparentTitle, - "grandparentThumb", grandparentThumb, - "grandparentTheme", grandparentTheme, - "grandparentArt", grandparentArt, - "parentTitle", parentTitle, - "parentIndex", parentIndex, - "parentThumb", parentThumb, - "ratingImage", ratingImage, - "viewCount", viewCount, - "viewOffset", viewOffset, - "skipCount", skipCount, - "subtype", subtype, - "lastRatedAt", lastRatedAt, - "createdAtAccuracy", createdAtAccuracy, - "createdAtTZOffset", createdAtTZOffset, - "lastViewedAt", lastViewedAt, - "userRating", userRating, - "image", image, - "ultraBlurColors", ultraBlurColors, - "guids", guids, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionKey", librarySectionKey, - "showOrdering", showOrdering, - "flattenSeasons", flattenSeasons, - "skipChildren", skipChildren, - "media", media, - "genre", genre, - "country", country, - "director", director, - "writer", writer, - "producer", producer, - "collection", collection, - "role", role, - "ratings", ratings, - "similar", similar, - "location", location, - "chapter", chapter, - "marker", marker, - "extras", extras); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String ratingKey; - - private String key; - - private String guid; - - private String slug; - - private Optional studio = Optional.empty(); - - private GetLibraryItemsType type; - - private String title; - - private String banner; - - private String titleSort; - - private Optional contentRating = Optional.empty(); - - private String summary; - - private Float rating; - - private Double audienceRating; - - private Optional year = Optional.empty(); - - private String tagline; - - private String thumb; - - private String art; - - private String theme; - - private Integer index; - - private Optional leafCount = Optional.empty(); - - private Optional viewedLeafCount = Optional.empty(); - - private Integer childCount; - - private Integer seasonCount; - - private Integer duration; - - private Optional originallyAvailableAt = Optional.empty(); - - private Long addedAt; - - private Optional updatedAt = Optional.empty(); - - private Optional audienceRatingImage = Optional.empty(); - - private Optional chapterSource = Optional.empty(); - - private Optional primaryExtraKey = Optional.empty(); - - private Optional originalTitle = Optional.empty(); - - private Optional parentRatingKey = Optional.empty(); - - private Optional grandparentRatingKey = Optional.empty(); - - private Optional parentGuid = Optional.empty(); - - private Optional grandparentGuid = Optional.empty(); - - private Optional grandparentSlug = Optional.empty(); - - private Optional grandparentKey = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional grandparentTitle = Optional.empty(); - - private Optional grandparentThumb = Optional.empty(); - - private Optional grandparentTheme = Optional.empty(); - - private Optional grandparentArt = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional parentThumb = Optional.empty(); - - private Optional ratingImage = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional viewOffset = Optional.empty(); - - private Optional skipCount = Optional.empty(); - - private Optional subtype = Optional.empty(); - - private Optional lastRatedAt = Optional.empty(); - - private Optional createdAtAccuracy = Optional.empty(); - - private Optional createdAtTZOffset = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional userRating = Optional.empty(); - - private Optional> image = Optional.empty(); - - private Optional ultraBlurColors = Optional.empty(); - - private Optional> guids = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionKey = Optional.empty(); - - private Optional showOrdering = Optional.empty(); - - private Optional flattenSeasons = Optional.empty(); - - private Optional skipChildren = Optional.empty(); - - private Optional> media = Optional.empty(); - - private Optional> genre = Optional.empty(); - - private Optional> country = Optional.empty(); - - private Optional> director = Optional.empty(); - - private Optional> writer = Optional.empty(); - - private Optional> producer = Optional.empty(); - - private Optional> collection = Optional.empty(); - - private Optional> role = Optional.empty(); - - private Optional> ratings = Optional.empty(); - - private Optional> similar = Optional.empty(); - - private Optional> location = Optional.empty(); - - private Optional> chapter = Optional.empty(); - - private Optional> marker = Optional.empty(); - - private Optional extras = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - public Builder ratingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * The unique key for the media item. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The globally unique identifier for the media item. - */ - public Builder guid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - - /** - * A URL‐friendly version of the media title. - */ - public Builder slug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - - /** - * The studio that produced the media item. - */ - public Builder studio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - /** - * The studio that produced the media item. - */ - public Builder studio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - - public Builder type(GetLibraryItemsType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The title of the media item. - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - /** - * The banner image URL for the media item. - */ - public Builder banner(String banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = banner; - return this; - } - - - /** - * The sort title used for ordering media items. - */ - public Builder titleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - - /** - * The content rating for the media item. - */ - public Builder contentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - /** - * The content rating for the media item. - */ - public Builder contentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - - /** - * A synopsis of the media item. - */ - public Builder summary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - - /** - * The critic rating for the media item. - */ - public Builder rating(float rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - - /** - * The audience rating for the media item. - */ - public Builder audienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - - /** - * The release year of the media item. - */ - public Builder year(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - /** - * The release year of the media item. - */ - public Builder year(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - - /** - * A brief tagline for the media item. - */ - public Builder tagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - - /** - * The thumbnail image URL for the media item. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The art image URL for the media item. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * The theme URL for the media item. - */ - public Builder theme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - - /** - * The index position of the media item. - */ - public Builder index(int index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - - /** - * The number of leaf items (end nodes) under this media item. - */ - public Builder leafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - public Builder leafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - - /** - * The number of leaf items that have been viewed. - */ - public Builder viewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - /** - * The number of leaf items that have been viewed. - */ - public Builder viewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - - /** - * The number of child items associated with this media item. - */ - public Builder childCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - - /** - * The total number of seasons (for TV shows). - */ - public Builder seasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - - - /** - * The duration of the media item in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * The original release date of the media item. - */ - public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - /** - * The original release date of the media item. - */ - public Builder originallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - - public Builder addedAt(long addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - - /** - * The URL for the audience rating image. - */ - public Builder audienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - /** - * The URL for the audience rating image. - */ - public Builder audienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - - /** - * The source from which chapter data is derived. - */ - public Builder chapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - /** - * The source from which chapter data is derived. - */ - public Builder chapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - - /** - * The primary extra key associated with this media item. - */ - public Builder primaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - /** - * The primary extra key associated with this media item. - */ - public Builder primaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - - /** - * The original title of the media item (if different). - */ - public Builder originalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - /** - * The original title of the media item (if different). - */ - public Builder originalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - - /** - * The rating key of the parent media item. - */ - public Builder parentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - /** - * The rating key of the parent media item. - */ - public Builder parentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - - /** - * The rating key of the grandparent media item. - */ - public Builder grandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - /** - * The rating key of the grandparent media item. - */ - public Builder grandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - - /** - * The GUID of the parent media item. - */ - public Builder parentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - /** - * The GUID of the parent media item. - */ - public Builder parentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - - /** - * The GUID of the grandparent media item. - */ - public Builder grandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - /** - * The GUID of the grandparent media item. - */ - public Builder grandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - - /** - * The slug for the grandparent media item. - */ - public Builder grandparentSlug(String grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = Optional.ofNullable(grandparentSlug); - return this; - } - - /** - * The slug for the grandparent media item. - */ - public Builder grandparentSlug(Optional grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = grandparentSlug; - return this; - } - - - /** - * The key of the grandparent media item. - */ - public Builder grandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - /** - * The key of the grandparent media item. - */ - public Builder grandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - - /** - * The key of the parent media item. - */ - public Builder parentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - /** - * The key of the parent media item. - */ - public Builder parentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - - /** - * The title of the grandparent media item. - */ - public Builder grandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - /** - * The title of the grandparent media item. - */ - public Builder grandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - - /** - * The thumbnail URL for the grandparent media item. - */ - public Builder grandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - public Builder grandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - - /** - * The theme URL for the grandparent media item. - */ - public Builder grandparentTheme(String grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = Optional.ofNullable(grandparentTheme); - return this; - } - - /** - * The theme URL for the grandparent media item. - */ - public Builder grandparentTheme(Optional grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = grandparentTheme; - return this; - } - - - /** - * The art URL for the grandparent media item. - */ - public Builder grandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - /** - * The art URL for the grandparent media item. - */ - public Builder grandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - - /** - * The title of the parent media item. - */ - public Builder parentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - /** - * The title of the parent media item. - */ - public Builder parentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - - /** - * The index position of the parent media item. - */ - public Builder parentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - /** - * The index position of the parent media item. - */ - public Builder parentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - - /** - * The thumbnail URL for the parent media item. - */ - public Builder parentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - /** - * The thumbnail URL for the parent media item. - */ - public Builder parentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - - /** - * The URL for the rating image. - */ - public Builder ratingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - /** - * The URL for the rating image. - */ - public Builder ratingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - - /** - * The number of times this media item has been viewed. - */ - public Builder viewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - /** - * The number of times this media item has been viewed. - */ - public Builder viewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - - /** - * The current playback offset (in milliseconds). - */ - public Builder viewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - /** - * The current playback offset (in milliseconds). - */ - public Builder viewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - - /** - * The number of times this media item has been skipped. - */ - public Builder skipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - /** - * The number of times this media item has been skipped. - */ - public Builder skipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public Builder subtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public Builder subtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public Builder lastRatedAt(long lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public Builder lastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public Builder createdAtAccuracy(String createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); - return this; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public Builder createdAtAccuracy(Optional createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = createdAtAccuracy; - return this; - } - - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public Builder createdAtTZOffset(String createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); - return this; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public Builder createdAtTZOffset(Optional createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = createdAtTZOffset; - return this; - } - - - /** - * Unix timestamp for when the media item was last viewed. - */ - public Builder lastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - public Builder lastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public Builder userRating(float userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public Builder userRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - - public Builder image(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - public Builder image(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - - public Builder ultraBlurColors(GetLibraryItemsUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); - return this; - } - - public Builder ultraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; - return this; - } - - - public Builder guids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - public Builder guids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - - /** - * The identifier for the library section. - */ - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - /** - * The identifier for the library section. - */ - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - - /** - * The key corresponding to the library section. - */ - public Builder librarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - /** - * The key corresponding to the library section. - */ - public Builder librarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - public Builder showOrdering(ShowOrdering showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = Optional.ofNullable(showOrdering); - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - public Builder showOrdering(Optional showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = showOrdering; - return this; - } - - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public Builder flattenSeasons(FlattenSeasons flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = Optional.ofNullable(flattenSeasons); - return this; - } - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public Builder flattenSeasons(Optional flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = flattenSeasons; - return this; - } - - - /** - * Indicates whether child items should be skipped. - */ - public Builder skipChildren(boolean skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = Optional.ofNullable(skipChildren); - return this; - } - - /** - * Indicates whether child items should be skipped. - */ - public Builder skipChildren(Optional skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = skipChildren; - return this; - } - - - public Builder media(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - 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 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); - 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 producer(List producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = Optional.ofNullable(producer); - return this; - } - - public Builder producer(Optional> producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = producer; - return this; - } - - - public Builder collection(List collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = Optional.ofNullable(collection); - return this; - } - - public Builder collection(Optional> collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = collection; - return this; - } - - - public Builder role(List role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - public Builder role(Optional> role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - - public Builder ratings(List ratings) { - Utils.checkNotNull(ratings, "ratings"); - this.ratings = Optional.ofNullable(ratings); - return this; - } - - public Builder ratings(Optional> ratings) { - Utils.checkNotNull(ratings, "ratings"); - this.ratings = ratings; - return this; - } - - - public Builder similar(List similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = Optional.ofNullable(similar); - return this; - } - - public Builder similar(Optional> similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = similar; - return this; - } - - - public Builder location(List location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - public Builder location(Optional> location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - - public Builder chapter(List chapter) { - Utils.checkNotNull(chapter, "chapter"); - this.chapter = Optional.ofNullable(chapter); - return this; - } - - public Builder chapter(Optional> chapter) { - Utils.checkNotNull(chapter, "chapter"); - this.chapter = chapter; - return this; - } - - - public Builder marker(List marker) { - Utils.checkNotNull(marker, "marker"); - this.marker = Optional.ofNullable(marker); - return this; - } - - public Builder marker(Optional> marker) { - Utils.checkNotNull(marker, "marker"); - this.marker = marker; - return this; - } - - - public Builder extras(Extras extras) { - Utils.checkNotNull(extras, "extras"); - this.extras = Optional.ofNullable(extras); - return this; - } - - public Builder extras(Optional extras) { - Utils.checkNotNull(extras, "extras"); - this.extras = extras; - return this; - } - - public GetLibraryItemsMetadata build() { - - return new GetLibraryItemsMetadata( - ratingKey, key, guid, - slug, studio, type, - title, banner, titleSort, - contentRating, summary, rating, - audienceRating, year, tagline, - thumb, art, theme, - index, leafCount, viewedLeafCount, - childCount, seasonCount, duration, - originallyAvailableAt, addedAt, updatedAt, - audienceRatingImage, chapterSource, primaryExtraKey, - originalTitle, parentRatingKey, grandparentRatingKey, - parentGuid, grandparentGuid, grandparentSlug, - grandparentKey, parentKey, grandparentTitle, - grandparentThumb, grandparentTheme, grandparentArt, - parentTitle, parentIndex, parentThumb, - ratingImage, viewCount, viewOffset, - skipCount, subtype, lastRatedAt, - createdAtAccuracy, createdAtTZOffset, lastViewedAt, - userRating, image, ultraBlurColors, - guids, librarySectionID, librarySectionTitle, - librarySectionKey, showOrdering, flattenSeasons, - skipChildren, media, genre, - country, director, writer, - producer, collection, role, - ratings, similar, location, - chapter, marker, extras); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOperator.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOperator.java deleted file mode 100644 index 170da5a2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOperator.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibraryItemsOperator { - - @JsonProperty("key") - private String key; - - - @JsonProperty("title") - private String title; - - @JsonCreator - public GetLibraryItemsOperator( - @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 static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsOperator withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsOperator 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; - } - GetLibraryItemsOperator other = (GetLibraryItemsOperator) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsOperator.class, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibraryItemsOperator build() { - - return new GetLibraryItemsOperator( - key, title); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java deleted file mode 100644 index aaf12bb5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java +++ /dev/null @@ -1,100 +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.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; - -/** - * GetLibraryItemsOptimizedForStreaming - * - *

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

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

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

-     * if (obj.value() instanceof String) {
-     *     String answer = (String) obj.value();
-     *     System.out.println("answer=" + answer);
-     * }
-     * 
- * - * @return value of oneOf type - **/ - public java.lang.Object value() { - return value.value(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsOptimizedForStreaming other = (GetLibraryItemsOptimizedForStreaming) o; - return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); - } - - @Override - public int hashCode() { - return Utils.enhancedHash(value.value()); - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends OneOfDeserializer { - - public _Deserializer() { - super(GetLibraryItemsOptimizedForStreaming.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); - } - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsOptimizedForStreaming.class, - "value", value); - } - -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming1.java deleted file mode 100644 index 7a0c278d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming1.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public enum GetLibraryItemsOptimizedForStreaming1 { - ZERO(0), - ONE(1); - - @JsonValue - private final int value; - - GetLibraryItemsOptimizedForStreaming1(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetLibraryItemsOptimizedForStreaming1 o: GetLibraryItemsOptimizedForStreaming1.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java deleted file mode 100644 index 3f935457..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java +++ /dev/null @@ -1,910 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetLibraryItemsPart { - /** - * Indicates if the part is accessible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("accessible") - private Optional accessible; - - /** - * Indicates if the part exists. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("exists") - private Optional exists; - - /** - * Unique part identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Key to access this part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("indexes") - private Optional indexes; - - /** - * Duration of the part in milliseconds. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - /** - * File path for the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("file") - private Optional file; - - /** - * File size in bytes. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("packetLength") - private Optional packetLength; - - /** - * Container format of the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - /** - * Video profile for the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasThumbnail") - private Optional hasThumbnail; - - @JsonCreator - public GetLibraryItemsPart( - @JsonProperty("accessible") Optional accessible, - @JsonProperty("exists") Optional exists, - @JsonProperty("id") long id, - @JsonProperty("key") Optional key, - @JsonProperty("indexes") Optional indexes, - @JsonProperty("duration") Optional duration, - @JsonProperty("file") Optional file, - @JsonProperty("size") Optional size, - @JsonProperty("packetLength") Optional packetLength, - @JsonProperty("container") Optional container, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("hasThumbnail") Optional hasThumbnail) { - Utils.checkNotNull(accessible, "accessible"); - Utils.checkNotNull(exists, "exists"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(indexes, "indexes"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(file, "file"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(packetLength, "packetLength"); - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(videoProfile, "videoProfile"); - Utils.checkNotNull(audioProfile, "audioProfile"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.accessible = accessible; - this.exists = exists; - this.id = id; - this.key = key; - this.indexes = indexes; - this.duration = duration; - this.file = file; - this.size = size; - this.packetLength = packetLength; - this.container = container; - this.videoProfile = videoProfile; - this.audioProfile = audioProfile; - this.has64bitOffsets = has64bitOffsets; - this.optimizedForStreaming = optimizedForStreaming; - this.hasThumbnail = hasThumbnail; - } - - public GetLibraryItemsPart( - long id) { - this(Optional.empty(), Optional.empty(), id, - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - /** - * Indicates if the part is accessible. - */ - @JsonIgnore - public Optional accessible() { - return accessible; - } - - /** - * Indicates if the part exists. - */ - @JsonIgnore - public Optional exists() { - return exists; - } - - /** - * Unique part identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Key to access this part. - */ - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional indexes() { - return indexes; - } - - /** - * Duration of the part in milliseconds. - */ - @JsonIgnore - public Optional duration() { - return duration; - } - - /** - * File path for the part. - */ - @JsonIgnore - public Optional file() { - return file; - } - - /** - * File size in bytes. - */ - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional packetLength() { - return packetLength; - } - - /** - * Container format of the part. - */ - @JsonIgnore - public Optional container() { - return container; - } - - /** - * Video profile for the part. - */ - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional optimizedForStreaming() { - return (Optional) optimizedForStreaming; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional hasThumbnail() { - return (Optional) hasThumbnail; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Indicates if the part is accessible. - */ - public GetLibraryItemsPart withAccessible(boolean accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = Optional.ofNullable(accessible); - return this; - } - - - /** - * Indicates if the part is accessible. - */ - public GetLibraryItemsPart withAccessible(Optional accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = accessible; - return this; - } - - /** - * Indicates if the part exists. - */ - public GetLibraryItemsPart withExists(boolean exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = Optional.ofNullable(exists); - return this; - } - - - /** - * Indicates if the part exists. - */ - public GetLibraryItemsPart withExists(Optional exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = exists; - return this; - } - - /** - * Unique part identifier. - */ - public GetLibraryItemsPart withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Key to access this part. - */ - public GetLibraryItemsPart withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - /** - * Key to access this part. - */ - public GetLibraryItemsPart withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsPart withIndexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - - public GetLibraryItemsPart withIndexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - - /** - * Duration of the part in milliseconds. - */ - public GetLibraryItemsPart withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - /** - * Duration of the part in milliseconds. - */ - public GetLibraryItemsPart withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * File path for the part. - */ - public GetLibraryItemsPart withFile(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - - /** - * File path for the part. - */ - public GetLibraryItemsPart withFile(Optional file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - /** - * File size in bytes. - */ - public GetLibraryItemsPart withSize(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - /** - * File size in bytes. - */ - public GetLibraryItemsPart withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetLibraryItemsPart withPacketLength(int packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = Optional.ofNullable(packetLength); - return this; - } - - - public GetLibraryItemsPart withPacketLength(Optional packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = packetLength; - return this; - } - - /** - * Container format of the part. - */ - public GetLibraryItemsPart withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - /** - * Container format of the part. - */ - public GetLibraryItemsPart withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - /** - * Video profile for the part. - */ - public GetLibraryItemsPart withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - /** - * Video profile for the part. - */ - public GetLibraryItemsPart withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetLibraryItemsPart withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetLibraryItemsPart withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - 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; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetLibraryItemsPart withOptimizedForStreaming(GetLibraryItemsLibraryOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetLibraryItemsPart withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - public GetLibraryItemsPart withHasThumbnail(GetLibraryItemsHasThumbnail hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = Optional.ofNullable(hasThumbnail); - return this; - } - - - public GetLibraryItemsPart withHasThumbnail(Optional hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = hasThumbnail; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsPart other = (GetLibraryItemsPart) o; - return - Utils.enhancedDeepEquals(this.accessible, other.accessible) && - Utils.enhancedDeepEquals(this.exists, other.exists) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.indexes, other.indexes) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.file, other.file) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.packetLength, other.packetLength) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.hasThumbnail, other.hasThumbnail); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - accessible, exists, id, - key, indexes, duration, - file, size, packetLength, - container, videoProfile, audioProfile, - has64bitOffsets, optimizedForStreaming, hasThumbnail); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsPart.class, - "accessible", accessible, - "exists", exists, - "id", id, - "key", key, - "indexes", indexes, - "duration", duration, - "file", file, - "size", size, - "packetLength", packetLength, - "container", container, - "videoProfile", videoProfile, - "audioProfile", audioProfile, - "has64bitOffsets", has64bitOffsets, - "optimizedForStreaming", optimizedForStreaming, - "hasThumbnail", hasThumbnail); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional accessible = Optional.empty(); - - private Optional exists = Optional.empty(); - - private Long id; - - private Optional key = Optional.empty(); - - private Optional indexes = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional file = Optional.empty(); - - private Optional size = Optional.empty(); - - private Optional packetLength = Optional.empty(); - - private Optional container = Optional.empty(); - - private Optional videoProfile = Optional.empty(); - - private Optional audioProfile = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional hasThumbnail; - - private Builder() { - // force use of static builder() method - } - - - /** - * Indicates if the part is accessible. - */ - public Builder accessible(boolean accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = Optional.ofNullable(accessible); - return this; - } - - /** - * Indicates if the part is accessible. - */ - public Builder accessible(Optional accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = accessible; - return this; - } - - - /** - * Indicates if the part exists. - */ - public Builder exists(boolean exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = Optional.ofNullable(exists); - return this; - } - - /** - * Indicates if the part exists. - */ - public Builder exists(Optional exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = exists; - return this; - } - - - /** - * Unique part identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Key to access this part. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - /** - * Key to access this part. - */ - public Builder key(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - public Builder indexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - public Builder indexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - - - /** - * Duration of the part in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - /** - * Duration of the part in milliseconds. - */ - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * File path for the part. - */ - public Builder file(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - /** - * File path for the part. - */ - public Builder file(Optional file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - - /** - * File size in bytes. - */ - public Builder size(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - /** - * File size in bytes. - */ - public Builder size(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - public Builder packetLength(int packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = Optional.ofNullable(packetLength); - return this; - } - - public Builder packetLength(Optional packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = packetLength; - return this; - } - - - /** - * Container format of the part. - */ - public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - /** - * Container format of the part. - */ - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - - /** - * Video profile for the part. - */ - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - /** - * Video profile for the part. - */ - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - 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; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(GetLibraryItemsLibraryOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - - public Builder hasThumbnail(GetLibraryItemsHasThumbnail 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 GetLibraryItemsPart build() { - if (hasThumbnail == null) { - hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value(); - } - - return new GetLibraryItemsPart( - accessible, exists, id, - key, indexes, duration, - file, size, packetLength, - container, videoProfile, audioProfile, - has64bitOffsets, optimizedForStreaming, hasThumbnail); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_HasThumbnail = - new LazySingletonValue<>( - "hasThumbnail", - "\"0\"", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsProducer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsProducer.java deleted file mode 100644 index 313fbb82..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsProducer.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryItemsProducer { - /** - * The unique role identifier. - */ - @JsonProperty("id") - private long id; - - /** - * The filter string for the role. - */ - @JsonProperty("filter") - private String filter; - - /** - * The actor's name. - */ - @JsonProperty("tag") - private String tag; - - /** - * A key associated with the actor tag. - */ - @JsonProperty("tagKey") - private String tagKey; - - /** - * The character name or role. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("role") - private Optional role; - - /** - * URL for the role thumbnail image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetLibraryItemsProducer( - @JsonProperty("id") long id, - @JsonProperty("filter") String filter, - @JsonProperty("tag") String tag, - @JsonProperty("tagKey") String tagKey, - @JsonProperty("role") Optional role, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(tagKey, "tagKey"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.filter = filter; - this.tag = tag; - this.tagKey = tagKey; - this.role = role; - this.thumb = thumb; - } - - public GetLibraryItemsProducer( - long id, - String filter, - String tag, - String tagKey) { - this(id, filter, tag, - tagKey, Optional.empty(), Optional.empty()); - } - - /** - * The unique role identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * The filter string for the role. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * The actor's name. - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * A key associated with the actor tag. - */ - @JsonIgnore - public String tagKey() { - return tagKey; - } - - /** - * The character name or role. - */ - @JsonIgnore - public Optional role() { - return role; - } - - /** - * URL for the role thumbnail image. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique role identifier. - */ - public GetLibraryItemsProducer withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The filter string for the role. - */ - public GetLibraryItemsProducer withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The actor's name. - */ - public GetLibraryItemsProducer withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * A key associated with the actor tag. - */ - public GetLibraryItemsProducer withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The character name or role. - */ - public GetLibraryItemsProducer withRole(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - /** - * The character name or role. - */ - public GetLibraryItemsProducer withRole(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - /** - * URL for the role thumbnail image. - */ - public GetLibraryItemsProducer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * URL for the role thumbnail image. - */ - public GetLibraryItemsProducer withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsProducer other = (GetLibraryItemsProducer) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag, - tagKey, role, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsProducer.class, - "id", id, - "filter", filter, - "tag", tag, - "tagKey", tagKey, - "role", role, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String filter; - - private String tag; - - private String tagKey; - - private Optional role = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique role identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The filter string for the role. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * The actor's name. - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * A key associated with the actor tag. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - - /** - * The character name or role. - */ - public Builder role(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - /** - * The character name or role. - */ - public Builder role(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - - /** - * URL for the role thumbnail image. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * URL for the role thumbnail image. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetLibraryItemsProducer build() { - - return new GetLibraryItemsProducer( - id, filter, tag, - tagKey, role, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamIncludeMeta.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamIncludeMeta.java deleted file mode 100644 index 2c7b9815..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamIncludeMeta.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * GetLibraryItemsQueryParamIncludeMeta - * - *

Adds the Meta object to the response - */ -public enum GetLibraryItemsQueryParamIncludeMeta { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - GetLibraryItemsQueryParamIncludeMeta(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetLibraryItemsQueryParamIncludeMeta o: GetLibraryItemsQueryParamIncludeMeta.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamType.java deleted file mode 100644 index 7aefb7e7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamType.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ -@JsonDeserialize(using = GetLibraryItemsQueryParamType._Deserializer.class) -@JsonSerialize(using = GetLibraryItemsQueryParamType._Serializer.class) -public class GetLibraryItemsQueryParamType { - - public static final GetLibraryItemsQueryParamType Movie = new GetLibraryItemsQueryParamType(1L); - public static final GetLibraryItemsQueryParamType TvShow = new GetLibraryItemsQueryParamType(2L); - public static final GetLibraryItemsQueryParamType Season = new GetLibraryItemsQueryParamType(3L); - public static final GetLibraryItemsQueryParamType Episode = new GetLibraryItemsQueryParamType(4L); - public static final GetLibraryItemsQueryParamType Artist = new GetLibraryItemsQueryParamType(5L); - public static final GetLibraryItemsQueryParamType Album = new GetLibraryItemsQueryParamType(6L); - public static final GetLibraryItemsQueryParamType Track = new GetLibraryItemsQueryParamType(7L); - public static final GetLibraryItemsQueryParamType PhotoAlbum = new GetLibraryItemsQueryParamType(8L); - public static final GetLibraryItemsQueryParamType Photo = new GetLibraryItemsQueryParamType(9L); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final long value; - - private GetLibraryItemsQueryParamType(long value) { - this.value = value; - } - - /** - * Returns a GetLibraryItemsQueryParamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetLibraryItemsQueryParamType - */ - public static GetLibraryItemsQueryParamType of(long value) { - synchronized (GetLibraryItemsQueryParamType.class) { - return values.computeIfAbsent(value, v -> new GetLibraryItemsQueryParamType(v)); - } - } - - public long value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetLibraryItemsQueryParamType other = (GetLibraryItemsQueryParamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetLibraryItemsQueryParamType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetLibraryItemsQueryParamType[] values() { - synchronized (GetLibraryItemsQueryParamType.class) { - return values.values().toArray(new GetLibraryItemsQueryParamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1L, Movie); - map.put(2L, TvShow); - map.put(3L, Season); - map.put(4L, Episode); - map.put(5L, Artist); - map.put(6L, Album); - map.put(7L, Track); - map.put(8L, PhotoAlbum); - map.put(9L, Photo); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1L, GetLibraryItemsQueryParamTypeEnum.Movie); - map.put(2L, GetLibraryItemsQueryParamTypeEnum.TvShow); - map.put(3L, GetLibraryItemsQueryParamTypeEnum.Season); - map.put(4L, GetLibraryItemsQueryParamTypeEnum.Episode); - map.put(5L, GetLibraryItemsQueryParamTypeEnum.Artist); - map.put(6L, GetLibraryItemsQueryParamTypeEnum.Album); - map.put(7L, GetLibraryItemsQueryParamTypeEnum.Track); - map.put(8L, GetLibraryItemsQueryParamTypeEnum.PhotoAlbum); - map.put(9L, GetLibraryItemsQueryParamTypeEnum.Photo); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetLibraryItemsQueryParamType.class); - } - - @Override - public void serialize(GetLibraryItemsQueryParamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetLibraryItemsQueryParamType.class); - } - - @Override - public GetLibraryItemsQueryParamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - long v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetLibraryItemsQueryParamType.of(v); - } - } - - public enum GetLibraryItemsQueryParamTypeEnum { - - Movie(1L), - TvShow(2L), - Season(3L), - Episode(4L), - Artist(5L), - Album(6L), - Track(7L), - PhotoAlbum(8L), - Photo(9L),; - - private final long value; - - private GetLibraryItemsQueryParamTypeEnum(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 cbf1fee1..a87cb0ac 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRequest.java @@ -6,10 +6,11 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.MediaQuery; 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.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -18,157 +19,220 @@ import java.util.Optional; public class GetLibraryItemsRequest { /** - * A key representing a specific tag within the section. + * Indicates the client accepts the indicated media types */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tag") - private Tag tag; + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; /** - * Adds the Guids object to the response + * An opaque identifier unique to the client */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids") - private Optional includeGuids; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * The name of the client product */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private GetLibraryItemsQueryParamType type; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. + * The version of the client application */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey") - private int sectionKey; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; /** - * Adds the Meta object to the response + * The platform of the client */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta") - private Optional includeMeta; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; /** - * 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 + * The version of the platform */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start") - private Optional xPlexContainerStart; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; /** - * 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 + * A relatively friendly name for the client device */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size") - private Optional xPlexContainerSize; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaQuery") + private Optional mediaQuery; @JsonCreator public GetLibraryItemsRequest( - Tag tag, - Optional includeGuids, - GetLibraryItemsQueryParamType type, - int sectionKey, - Optional includeMeta, - Optional xPlexContainerStart, - Optional xPlexContainerSize) { - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(includeGuids, "includeGuids"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(sectionKey, "sectionKey"); - Utils.checkNotNull(includeMeta, "includeMeta"); - Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); - Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); - this.tag = tag; - this.includeGuids = includeGuids; - this.type = type; - this.sectionKey = sectionKey; - this.includeMeta = includeMeta; - this.xPlexContainerStart = xPlexContainerStart; - this.xPlexContainerSize = xPlexContainerSize; + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional mediaQuery) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.mediaQuery = mediaQuery; } - public GetLibraryItemsRequest( - Tag tag, - GetLibraryItemsQueryParamType type, - int sectionKey) { - this(tag, Optional.empty(), type, - sectionKey, Optional.empty(), Optional.empty(), - Optional.empty()); + public GetLibraryItemsRequest() { + 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()); } /** - * A key representing a specific tag within the section. - */ - @JsonIgnore - public Tag tag() { - return tag; - } - - /** - * Adds the Guids object to the response + * Indicates the client accepts the indicated media types */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional includeGuids() { - return (Optional) includeGuids; + public Optional accepts() { + return (Optional) accepts; } /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * An opaque identifier unique to the client */ @JsonIgnore - public GetLibraryItemsQueryParamType type() { - return type; + public Optional clientIdentifier() { + return clientIdentifier; } /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. + * The name of the client product */ @JsonIgnore - public int sectionKey() { - return sectionKey; + public Optional product() { + return product; } /** - * Adds the Meta object to the response + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries */ @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 Optional mediaQuery() { + return (Optional) mediaQuery; } public static Builder builder() { @@ -177,119 +241,230 @@ public class GetLibraryItemsRequest { /** - * A key representing a specific tag within the section. + * Indicates the client accepts the indicated media types */ - public GetLibraryItemsRequest withTag(Tag tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * Adds the Guids object to the response - */ - public GetLibraryItemsRequest withIncludeGuids(IncludeGuids includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = Optional.ofNullable(includeGuids); + public GetLibraryItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); return this; } /** - * Adds the Guids object to the response + * Indicates the client accepts the indicated media types */ - public GetLibraryItemsRequest withIncludeGuids(Optional includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = includeGuids; + public GetLibraryItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; return this; } /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * An opaque identifier unique to the client */ - public GetLibraryItemsRequest withType(GetLibraryItemsQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public GetLibraryItemsRequest withSectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - /** - * Adds the Meta object to the response - */ - public GetLibraryItemsRequest withIncludeMeta(GetLibraryItemsQueryParamIncludeMeta includeMeta) { - Utils.checkNotNull(includeMeta, "includeMeta"); - this.includeMeta = Optional.ofNullable(includeMeta); + public GetLibraryItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); return this; } /** - * Adds the Meta object to the response + * An opaque identifier unique to the client */ - public GetLibraryItemsRequest withIncludeMeta(Optional includeMeta) { - Utils.checkNotNull(includeMeta, "includeMeta"); - this.includeMeta = includeMeta; + public GetLibraryItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; 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 + * The name of the client product */ - public GetLibraryItemsRequest withXPlexContainerStart(int xPlexContainerStart) { - Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); - this.xPlexContainerStart = Optional.ofNullable(xPlexContainerStart); + public GetLibraryItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); 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 + * The name of the client product */ - public GetLibraryItemsRequest withXPlexContainerStart(Optional xPlexContainerStart) { - Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); - this.xPlexContainerStart = xPlexContainerStart; + public GetLibraryItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; 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 + * The version of the client application */ - public GetLibraryItemsRequest withXPlexContainerSize(int xPlexContainerSize) { - Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); - this.xPlexContainerSize = Optional.ofNullable(xPlexContainerSize); + public GetLibraryItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); 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 + * The version of the client application */ - public GetLibraryItemsRequest withXPlexContainerSize(Optional xPlexContainerSize) { - Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); - this.xPlexContainerSize = xPlexContainerSize; + public GetLibraryItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetLibraryItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetLibraryItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetLibraryItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetLibraryItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetLibraryItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetLibraryItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetLibraryItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetLibraryItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetLibraryItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetLibraryItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetLibraryItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetLibraryItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetLibraryItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetLibraryItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public GetLibraryItemsRequest withMediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public GetLibraryItemsRequest withMediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; return this; } @@ -303,51 +478,72 @@ public class GetLibraryItemsRequest { } GetLibraryItemsRequest other = (GetLibraryItemsRequest) o; return - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.includeGuids, other.includeGuids) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.sectionKey, other.sectionKey) && - Utils.enhancedDeepEquals(this.includeMeta, other.includeMeta) && - Utils.enhancedDeepEquals(this.xPlexContainerStart, other.xPlexContainerStart) && - Utils.enhancedDeepEquals(this.xPlexContainerSize, other.xPlexContainerSize); + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.mediaQuery, other.mediaQuery); } @Override public int hashCode() { return Utils.enhancedHash( - tag, includeGuids, type, - sectionKey, includeMeta, xPlexContainerStart, - xPlexContainerSize); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, mediaQuery); } @Override public String toString() { return Utils.toString(GetLibraryItemsRequest.class, - "tag", tag, - "includeGuids", includeGuids, - "type", type, - "sectionKey", sectionKey, - "includeMeta", includeMeta, - "xPlexContainerStart", xPlexContainerStart, - "xPlexContainerSize", xPlexContainerSize); + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "mediaQuery", mediaQuery); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Tag tag; + private Optional accepts; - private Optional includeGuids; + private Optional clientIdentifier = Optional.empty(); - private GetLibraryItemsQueryParamType type; + private Optional product = Optional.empty(); - private Integer sectionKey; + private Optional version = Optional.empty(); - private Optional includeMeta; + private Optional platform = Optional.empty(); - private Optional xPlexContainerStart; + private Optional platformVersion = Optional.empty(); - private Optional xPlexContainerSize; + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional mediaQuery = Optional.empty(); private Builder() { // force use of static builder() method @@ -355,167 +551,249 @@ public class GetLibraryItemsRequest { /** - * A key representing a specific tag within the section. + * Indicates the client accepts the indicated media types */ - public Builder tag(Tag tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; return this; } /** - * Adds the Guids object to the response + * An opaque identifier unique to the client */ - public Builder includeGuids(IncludeGuids includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = Optional.ofNullable(includeGuids); + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); return this; } /** - * Adds the Guids object to the response + * An opaque identifier unique to the client */ - public Builder includeGuids(Optional includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = includeGuids; + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; return this; } /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * The name of the client product */ - public Builder type(GetLibraryItemsQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; return this; } /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. + * The version of the client application */ - public Builder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; return this; } /** - * Adds the Meta object to the response + * The platform of the client */ - public Builder includeMeta(GetLibraryItemsQueryParamIncludeMeta includeMeta) { - Utils.checkNotNull(includeMeta, "includeMeta"); - this.includeMeta = Optional.ofNullable(includeMeta); + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); return this; } /** - * Adds the Meta object to the response + * The platform of the client */ - public Builder includeMeta(Optional includeMeta) { - Utils.checkNotNull(includeMeta, "includeMeta"); - this.includeMeta = includeMeta; + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; 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 + * The version of the platform */ - public Builder xPlexContainerStart(int xPlexContainerStart) { - Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); - this.xPlexContainerStart = Optional.ofNullable(xPlexContainerStart); + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); 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 + * The version of the platform */ - public Builder xPlexContainerStart(Optional xPlexContainerStart) { - Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); - this.xPlexContainerStart = xPlexContainerStart; + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; 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 + * A relatively friendly name for the client device */ - public Builder xPlexContainerSize(int xPlexContainerSize) { - Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); - this.xPlexContainerSize = Optional.ofNullable(xPlexContainerSize); + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); 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 + * A relatively friendly name for the client device */ - public Builder xPlexContainerSize(Optional xPlexContainerSize) { - Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); - this.xPlexContainerSize = xPlexContainerSize; + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; return this; } public GetLibraryItemsRequest build() { - if (includeGuids == null) { - includeGuids = _SINGLETON_VALUE_IncludeGuids.value(); - } - if (includeMeta == null) { - includeMeta = _SINGLETON_VALUE_IncludeMeta.value(); - } - if (xPlexContainerStart == null) { - xPlexContainerStart = _SINGLETON_VALUE_XPlexContainerStart.value(); - } - if (xPlexContainerSize == null) { - xPlexContainerSize = _SINGLETON_VALUE_XPlexContainerSize.value(); + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); } return new GetLibraryItemsRequest( - tag, includeGuids, type, - sectionKey, includeMeta, xPlexContainerStart, - xPlexContainerSize); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, mediaQuery); } - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeGuids = + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = new LazySingletonValue<>( - "includeGuids", - "0", - new TypeReference>() {}); - - 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>() {}); + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsResponse.java index f15fa323..efb4ce9f 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsResponse.java @@ -5,6 +5,7 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; import dev.plexapi.sdk.utils.Response; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; @@ -13,6 +14,8 @@ import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; import java.util.Optional; @@ -33,32 +36,40 @@ public class GetLibraryItemsResponse implements Response { private HttpResponse rawResponse; /** - * The contents of the library by section and tag + * OK */ - private Optional object; + private Optional mediaContainerWithMetadata; + + + private Map> headers; @JsonCreator public GetLibraryItemsResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional object) { + Optional mediaContainerWithMetadata, + Map> headers) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.object = object; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; } public GetLibraryItemsResponse( String contentType, int statusCode, - HttpResponse rawResponse) { + HttpResponse rawResponse, + Map> headers) { this(contentType, statusCode, rawResponse, - Optional.empty()); + Optional.empty(), headers); } /** @@ -86,12 +97,17 @@ public class GetLibraryItemsResponse implements Response { } /** - * The contents of the library by section and tag + * OK */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional object() { - return (Optional) object; + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; } public static Builder builder() { @@ -127,21 +143,27 @@ public class GetLibraryItemsResponse implements Response { } /** - * The contents of the library by section and tag + * OK */ - public GetLibraryItemsResponse withObject(GetLibraryItemsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public GetLibraryItemsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); return this; } /** - * The contents of the library by section and tag + * OK */ - public GetLibraryItemsResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public GetLibraryItemsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetLibraryItemsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; return this; } @@ -158,14 +180,15 @@ public class GetLibraryItemsResponse implements Response { Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); } @Override public int hashCode() { return Utils.enhancedHash( contentType, statusCode, rawResponse, - object); + mediaContainerWithMetadata, headers); } @Override @@ -174,7 +197,8 @@ public class GetLibraryItemsResponse implements Response { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "object", object); + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); } @SuppressWarnings("UnusedReturnValue") @@ -186,7 +210,9 @@ public class GetLibraryItemsResponse implements Response { private HttpResponse rawResponse; - private Optional object = Optional.empty(); + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; private Builder() { // force use of static builder() method @@ -224,20 +250,27 @@ public class GetLibraryItemsResponse implements Response { /** - * The contents of the library by section and tag + * OK */ - public Builder object(GetLibraryItemsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); return this; } /** - * The contents of the library by section and tag + * OK */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; return this; } @@ -245,7 +278,7 @@ public class GetLibraryItemsResponse implements Response { return new GetLibraryItemsResponse( contentType, statusCode, rawResponse, - object); + mediaContainerWithMetadata, headers); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsResponseBody.java deleted file mode 100644 index a2c82c54..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetLibraryItemsResponseBody - * - *

The contents of the library by section and tag - */ -public class GetLibraryItemsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetLibraryItemsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetLibraryItemsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsResponseBody withMediaContainer(GetLibraryItemsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetLibraryItemsResponseBody 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; - } - GetLibraryItemsResponseBody other = (GetLibraryItemsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetLibraryItemsMediaContainer 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 GetLibraryItemsResponseBody build() { - - return new GetLibraryItemsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRole.java deleted file mode 100644 index 276ddc4c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRole.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryItemsRole { - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - /** - * The display tag for the actor (typically the actor's name). - */ - @JsonProperty("tag") - private String tag; - - /** - * The role played by the actor in the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("role") - private Optional role; - - /** - * The absolute URL of the thumbnail image for the actor. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetLibraryItemsRole( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("role") Optional role, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.tag = tag; - this.role = role; - this.thumb = thumb; - } - - public GetLibraryItemsRole( - int id, - String tag) { - this(id, tag, Optional.empty(), - Optional.empty()); - } - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The display tag for the actor (typically the actor's name). - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * The role played by the actor in the media item. - */ - @JsonIgnore - public Optional role() { - return role; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public GetLibraryItemsRole withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The display tag for the actor (typically the actor's name). - */ - public GetLibraryItemsRole withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * The role played by the actor in the media item. - */ - public GetLibraryItemsRole withRole(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - /** - * The role played by the actor in the media item. - */ - public GetLibraryItemsRole withRole(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public GetLibraryItemsRole withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public GetLibraryItemsRole withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsRole other = (GetLibraryItemsRole) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, role, - thumb); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsRole.class, - "id", id, - "tag", tag, - "role", role, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Optional role = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The display tag for the actor (typically the actor's name). - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * The role played by the actor in the media item. - */ - public Builder role(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - /** - * The role played by the actor in the media item. - */ - public Builder role(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetLibraryItemsRole build() { - - return new GetLibraryItemsRole( - id, tag, role, - thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSimilar.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSimilar.java deleted file mode 100644 index c9742da0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSimilar.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; - - -public class GetLibraryItemsSimilar { - /** - * The unique similar item identifier. - */ - @JsonProperty("id") - private long id; - - /** - * The filter string for similar items. - */ - @JsonProperty("filter") - private String filter; - - /** - * The tag or title of the similar content. - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetLibraryItemsSimilar( - @JsonProperty("id") long id, - @JsonProperty("filter") String filter, - @JsonProperty("tag") String tag) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - this.id = id; - this.filter = filter; - this.tag = tag; - } - - /** - * The unique similar item identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * The filter string for similar items. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * The tag or title of the similar content. - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique similar item identifier. - */ - public GetLibraryItemsSimilar withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The filter string for similar items. - */ - public GetLibraryItemsSimilar withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The tag or title of the similar content. - */ - public GetLibraryItemsSimilar withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsSimilar other = (GetLibraryItemsSimilar) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsSimilar.class, - "id", id, - "filter", filter, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String filter; - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique similar item identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The filter string for similar items. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * The tag or title of the similar content. - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetLibraryItemsSimilar build() { - - return new GetLibraryItemsSimilar( - id, filter, tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSort.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSort.java deleted file mode 100644 index a63767fb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSort.java +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetLibraryItemsSort { - - @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 GetLibraryItemsSort( - @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 GetLibraryItemsSort( - 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 static Builder builder() { - return new Builder(); - } - - - public GetLibraryItemsSort withDefault(String default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - - public GetLibraryItemsSort withDefault(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - public GetLibraryItemsSort withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - - public GetLibraryItemsSort withActive(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibraryItemsSort withActiveDirection(GetLibraryItemsActiveDirection activeDirection) { - Utils.checkNotNull(activeDirection, "activeDirection"); - this.activeDirection = Optional.ofNullable(activeDirection); - return this; - } - - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibraryItemsSort withActiveDirection(Optional activeDirection) { - Utils.checkNotNull(activeDirection, "activeDirection"); - this.activeDirection = activeDirection; - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibraryItemsSort withDefaultDirection(GetLibraryItemsDefaultDirection defaultDirection) { - Utils.checkNotNull(defaultDirection, "defaultDirection"); - this.defaultDirection = Optional.ofNullable(defaultDirection); - return this; - } - - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibraryItemsSort withDefaultDirection(Optional defaultDirection) { - Utils.checkNotNull(defaultDirection, "defaultDirection"); - this.defaultDirection = defaultDirection; - return this; - } - - public GetLibraryItemsSort withDescKey(String descKey) { - Utils.checkNotNull(descKey, "descKey"); - this.descKey = Optional.ofNullable(descKey); - return this; - } - - - public GetLibraryItemsSort withDescKey(Optional descKey) { - Utils.checkNotNull(descKey, "descKey"); - this.descKey = descKey; - return this; - } - - public GetLibraryItemsSort withFirstCharacterKey(String firstCharacterKey) { - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); - return this; - } - - - public GetLibraryItemsSort withFirstCharacterKey(Optional firstCharacterKey) { - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - this.firstCharacterKey = firstCharacterKey; - return this; - } - - public GetLibraryItemsSort withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibraryItemsSort 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; - } - GetLibraryItemsSort other = (GetLibraryItemsSort) o; - return - Utils.enhancedDeepEquals(this.default_, other.default_) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.activeDirection, other.activeDirection) && - Utils.enhancedDeepEquals(this.defaultDirection, other.defaultDirection) && - Utils.enhancedDeepEquals(this.descKey, other.descKey) && - Utils.enhancedDeepEquals(this.firstCharacterKey, other.firstCharacterKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - default_, active, activeDirection, - defaultDirection, descKey, firstCharacterKey, - key, title); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsSort.class, - "default_", default_, - "active", active, - "activeDirection", activeDirection, - "defaultDirection", defaultDirection, - "descKey", descKey, - "firstCharacterKey", firstCharacterKey, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - 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(GetLibraryItemsActiveDirection 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(GetLibraryItemsDefaultDirection 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 GetLibraryItemsSort build() { - if (activeDirection == null) { - activeDirection = _SINGLETON_VALUE_ActiveDirection.value(); - } - if (defaultDirection == null) { - defaultDirection = _SINGLETON_VALUE_DefaultDirection.value(); - } - - return new GetLibraryItemsSort( - 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/GetLibraryItemsType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsType.java deleted file mode 100644 index 4ad02227..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsType.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The type of media content in the Plex library. This can represent videos, music, or photos. - */ -@JsonDeserialize(using = GetLibraryItemsType._Deserializer.class) -@JsonSerialize(using = GetLibraryItemsType._Serializer.class) -public class GetLibraryItemsType { - - public static final GetLibraryItemsType Movie = new GetLibraryItemsType("movie"); - public static final GetLibraryItemsType TvShow = new GetLibraryItemsType("show"); - public static final GetLibraryItemsType Season = new GetLibraryItemsType("season"); - public static final GetLibraryItemsType Episode = new GetLibraryItemsType("episode"); - public static final GetLibraryItemsType Artist = new GetLibraryItemsType("artist"); - public static final GetLibraryItemsType Album = new GetLibraryItemsType("album"); - public static final GetLibraryItemsType Track = new GetLibraryItemsType("track"); - public static final GetLibraryItemsType PhotoAlbum = new GetLibraryItemsType("photoalbum"); - public static final GetLibraryItemsType Photo = new GetLibraryItemsType("photo"); - public static final GetLibraryItemsType Collection = new GetLibraryItemsType("collection"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetLibraryItemsType(String value) { - this.value = value; - } - - /** - * Returns a GetLibraryItemsType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetLibraryItemsType - */ - public static GetLibraryItemsType of(String value) { - synchronized (GetLibraryItemsType.class) { - return values.computeIfAbsent(value, v -> new GetLibraryItemsType(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetLibraryItemsType other = (GetLibraryItemsType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetLibraryItemsType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetLibraryItemsType[] values() { - synchronized (GetLibraryItemsType.class) { - return values.values().toArray(new GetLibraryItemsType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("movie", Movie); - map.put("show", TvShow); - map.put("season", Season); - map.put("episode", Episode); - map.put("artist", Artist); - map.put("album", Album); - map.put("track", Track); - map.put("photoalbum", PhotoAlbum); - map.put("photo", Photo); - map.put("collection", Collection); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("movie", GetLibraryItemsTypeEnum.Movie); - map.put("show", GetLibraryItemsTypeEnum.TvShow); - map.put("season", GetLibraryItemsTypeEnum.Season); - map.put("episode", GetLibraryItemsTypeEnum.Episode); - map.put("artist", GetLibraryItemsTypeEnum.Artist); - map.put("album", GetLibraryItemsTypeEnum.Album); - map.put("track", GetLibraryItemsTypeEnum.Track); - map.put("photoalbum", GetLibraryItemsTypeEnum.PhotoAlbum); - map.put("photo", GetLibraryItemsTypeEnum.Photo); - map.put("collection", GetLibraryItemsTypeEnum.Collection); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetLibraryItemsType.class); - } - - @Override - public void serialize(GetLibraryItemsType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetLibraryItemsType.class); - } - - @Override - public GetLibraryItemsType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetLibraryItemsType.of(v); - } - } - - public enum GetLibraryItemsTypeEnum { - - Movie("movie"), - TvShow("show"), - Season("season"), - Episode("episode"), - Artist("artist"), - Album("album"), - Track("track"), - PhotoAlbum("photoalbum"), - Photo("photo"), - Collection("collection"),; - - private final String value; - - private GetLibraryItemsTypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsUltraBlurColors.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsUltraBlurColors.java deleted file mode 100644 index 65ee96b2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsUltraBlurColors.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -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 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 - Utils.enhancedDeepEquals(this.topLeft, other.topLeft) && - Utils.enhancedDeepEquals(this.topRight, other.topRight) && - Utils.enhancedDeepEquals(this.bottomRight, other.bottomRight) && - Utils.enhancedDeepEquals(this.bottomLeft, other.bottomLeft); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - topLeft, topRight, bottomRight, - bottomLeft); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsUltraBlurColors.class, - "topLeft", topLeft, - "topRight", topRight, - "bottomRight", bottomRight, - "bottomLeft", bottomLeft); - } - - @SuppressWarnings("UnusedReturnValue") - 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/GetLibraryItemsWriter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsWriter.java deleted file mode 100644 index 0488d74b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsWriter.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibraryItemsWriter { - /** - * Unique identifier for the writer. - */ - @JsonProperty("id") - private int id; - - /** - * The role of Writer - */ - @JsonProperty("tag") - private String tag; - - /** - * The absolute URL of the thumbnail image for the writer. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetLibraryItemsWriter( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.tag = tag; - this.thumb = thumb; - } - - public GetLibraryItemsWriter( - int id, - String tag) { - this(id, tag, Optional.empty()); - } - - /** - * Unique identifier for the writer. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The role of Writer - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique identifier for the writer. - */ - public GetLibraryItemsWriter withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The role of Writer - */ - public GetLibraryItemsWriter withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public GetLibraryItemsWriter withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public GetLibraryItemsWriter withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibraryItemsWriter other = (GetLibraryItemsWriter) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsWriter.class, - "id", id, - "tag", tag, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique identifier for the writer. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The role of Writer - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetLibraryItemsWriter build() { - - return new GetLibraryItemsWriter( - id, tag, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesRequest.java new file mode 100644 index 00000000..4682ec8d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesRequest.java @@ -0,0 +1,1533 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetLibraryMatchesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The metadata type to filter by + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeFullMetadata") + private Optional includeFullMetadata; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeAncestorMetadata") + private Optional includeAncestorMetadata; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeAlternateMetadataSources") + private Optional includeAlternateMetadataSources; + + /** + * Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=guid") + private Optional guid; + + /** + * The title to filter by or assign + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=title") + private Optional title; + + /** + * Used for movies shows, and albums. Optional. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=year") + private Optional year; + + /** + * Used for movies, episodes, and tracks. The full path to the media file, used for "cloud-scanning" an item. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=path") + private Optional path; + + /** + * Used for episodes and tracks. The title of the show/artist. Required if `path` isn't passed. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=grandparentTitle") + private Optional grandparentTitle; + + /** + * Used for episodes. The year of the show. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=grandparentYear") + private Optional grandparentYear; + + /** + * Used for episodes and tracks. The season/album number. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=parentIndex") + private Optional parentIndex; + + /** + * Used for episodes and tracks. The episode/tracks number in the season/album. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=index") + private Optional index; + + /** + * Used for episodes. In the format `YYYY-MM-DD`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=originallyAvailableAt") + private Optional originallyAvailableAt; + + /** + * Used for albums and tracks. The artist name for albums or the album name for tracks. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=parentTitle") + private Optional parentTitle; + + @JsonCreator + public GetLibraryMatchesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional type, + Optional includeFullMetadata, + Optional includeAncestorMetadata, + Optional includeAlternateMetadataSources, + Optional guid, + Optional title, + Optional year, + Optional path, + Optional grandparentTitle, + Optional grandparentYear, + Optional parentIndex, + Optional index, + Optional originallyAvailableAt, + Optional parentTitle) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(includeFullMetadata, "includeFullMetadata"); + Utils.checkNotNull(includeAncestorMetadata, "includeAncestorMetadata"); + Utils.checkNotNull(includeAlternateMetadataSources, "includeAlternateMetadataSources"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(grandparentYear, "grandparentYear"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(parentTitle, "parentTitle"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.type = type; + this.includeFullMetadata = includeFullMetadata; + this.includeAncestorMetadata = includeAncestorMetadata; + this.includeAlternateMetadataSources = includeAlternateMetadataSources; + this.guid = guid; + this.title = title; + this.year = year; + this.path = path; + this.grandparentTitle = grandparentTitle; + this.grandparentYear = grandparentYear; + this.parentIndex = parentIndex; + this.index = index; + this.originallyAvailableAt = originallyAvailableAt; + this.parentTitle = parentTitle; + } + + public GetLibraryMatchesRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The metadata type to filter by + */ + @JsonIgnore + public Optional type() { + return type; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeFullMetadata() { + return (Optional) includeFullMetadata; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeAncestorMetadata() { + return (Optional) includeAncestorMetadata; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeAlternateMetadataSources() { + return (Optional) includeAlternateMetadataSources; + } + + /** + * Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined. + */ + @JsonIgnore + public Optional guid() { + return guid; + } + + /** + * The title to filter by or assign + */ + @JsonIgnore + public Optional title() { + return title; + } + + /** + * Used for movies shows, and albums. Optional. + */ + @JsonIgnore + public Optional year() { + return year; + } + + /** + * Used for movies, episodes, and tracks. The full path to the media file, used for "cloud-scanning" an item. + */ + @JsonIgnore + public Optional path() { + return path; + } + + /** + * Used for episodes and tracks. The title of the show/artist. Required if `path` isn't passed. + */ + @JsonIgnore + public Optional grandparentTitle() { + return grandparentTitle; + } + + /** + * Used for episodes. The year of the show. + */ + @JsonIgnore + public Optional grandparentYear() { + return grandparentYear; + } + + /** + * Used for episodes and tracks. The season/album number. + */ + @JsonIgnore + public Optional parentIndex() { + return parentIndex; + } + + /** + * Used for episodes and tracks. The episode/tracks number in the season/album. + */ + @JsonIgnore + public Optional index() { + return index; + } + + /** + * Used for episodes. In the format `YYYY-MM-DD`. + */ + @JsonIgnore + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + /** + * Used for albums and tracks. The artist name for albums or the album name for tracks. + */ + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetLibraryMatchesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetLibraryMatchesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetLibraryMatchesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetLibraryMatchesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetLibraryMatchesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetLibraryMatchesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetLibraryMatchesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetLibraryMatchesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetLibraryMatchesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetLibraryMatchesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetLibraryMatchesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetLibraryMatchesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetLibraryMatchesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetLibraryMatchesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetLibraryMatchesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetLibraryMatchesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetLibraryMatchesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetLibraryMatchesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetLibraryMatchesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetLibraryMatchesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetLibraryMatchesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetLibraryMatchesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The metadata type to filter by + */ + public GetLibraryMatchesRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The metadata type to filter by + */ + public GetLibraryMatchesRequest withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibraryMatchesRequest withIncludeFullMetadata(BoolInt includeFullMetadata) { + Utils.checkNotNull(includeFullMetadata, "includeFullMetadata"); + this.includeFullMetadata = Optional.ofNullable(includeFullMetadata); + return this; + } + + + public GetLibraryMatchesRequest withIncludeFullMetadata(Optional includeFullMetadata) { + Utils.checkNotNull(includeFullMetadata, "includeFullMetadata"); + this.includeFullMetadata = includeFullMetadata; + return this; + } + + public GetLibraryMatchesRequest withIncludeAncestorMetadata(BoolInt includeAncestorMetadata) { + Utils.checkNotNull(includeAncestorMetadata, "includeAncestorMetadata"); + this.includeAncestorMetadata = Optional.ofNullable(includeAncestorMetadata); + return this; + } + + + public GetLibraryMatchesRequest withIncludeAncestorMetadata(Optional includeAncestorMetadata) { + Utils.checkNotNull(includeAncestorMetadata, "includeAncestorMetadata"); + this.includeAncestorMetadata = includeAncestorMetadata; + return this; + } + + public GetLibraryMatchesRequest withIncludeAlternateMetadataSources(BoolInt includeAlternateMetadataSources) { + Utils.checkNotNull(includeAlternateMetadataSources, "includeAlternateMetadataSources"); + this.includeAlternateMetadataSources = Optional.ofNullable(includeAlternateMetadataSources); + return this; + } + + + public GetLibraryMatchesRequest withIncludeAlternateMetadataSources(Optional includeAlternateMetadataSources) { + Utils.checkNotNull(includeAlternateMetadataSources, "includeAlternateMetadataSources"); + this.includeAlternateMetadataSources = includeAlternateMetadataSources; + return this; + } + + /** + * Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined. + */ + public GetLibraryMatchesRequest withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + + /** + * Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined. + */ + public GetLibraryMatchesRequest withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + /** + * The title to filter by or assign + */ + public GetLibraryMatchesRequest withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title to filter by or assign + */ + public GetLibraryMatchesRequest withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * Used for movies shows, and albums. Optional. + */ + public GetLibraryMatchesRequest withYear(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + + /** + * Used for movies shows, and albums. Optional. + */ + public GetLibraryMatchesRequest withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + /** + * Used for movies, episodes, and tracks. The full path to the media file, used for "cloud-scanning" an item. + */ + public GetLibraryMatchesRequest withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + + /** + * Used for movies, episodes, and tracks. The full path to the media file, used for "cloud-scanning" an item. + */ + public GetLibraryMatchesRequest withPath(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Used for episodes and tracks. The title of the show/artist. Required if `path` isn't passed. + */ + public GetLibraryMatchesRequest withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + + /** + * Used for episodes and tracks. The title of the show/artist. Required if `path` isn't passed. + */ + public GetLibraryMatchesRequest withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + /** + * Used for episodes. The year of the show. + */ + public GetLibraryMatchesRequest withGrandparentYear(long grandparentYear) { + Utils.checkNotNull(grandparentYear, "grandparentYear"); + this.grandparentYear = Optional.ofNullable(grandparentYear); + return this; + } + + + /** + * Used for episodes. The year of the show. + */ + public GetLibraryMatchesRequest withGrandparentYear(Optional grandparentYear) { + Utils.checkNotNull(grandparentYear, "grandparentYear"); + this.grandparentYear = grandparentYear; + return this; + } + + /** + * Used for episodes and tracks. The season/album number. + */ + public GetLibraryMatchesRequest withParentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + + /** + * Used for episodes and tracks. The season/album number. + */ + public GetLibraryMatchesRequest withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * Used for episodes and tracks. The episode/tracks number in the season/album. + */ + public GetLibraryMatchesRequest withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + + /** + * Used for episodes and tracks. The episode/tracks number in the season/album. + */ + public GetLibraryMatchesRequest withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * Used for episodes. In the format `YYYY-MM-DD`. + */ + public GetLibraryMatchesRequest withOriginallyAvailableAt(String originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + + /** + * Used for episodes. In the format `YYYY-MM-DD`. + */ + public GetLibraryMatchesRequest withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + /** + * Used for albums and tracks. The artist name for albums or the album name for tracks. + */ + public GetLibraryMatchesRequest withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + + /** + * Used for albums and tracks. The artist name for albums or the album name for tracks. + */ + public GetLibraryMatchesRequest withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryMatchesRequest other = (GetLibraryMatchesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.includeFullMetadata, other.includeFullMetadata) && + Utils.enhancedDeepEquals(this.includeAncestorMetadata, other.includeAncestorMetadata) && + Utils.enhancedDeepEquals(this.includeAlternateMetadataSources, other.includeAlternateMetadataSources) && + Utils.enhancedDeepEquals(this.guid, other.guid) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.year, other.year) && + Utils.enhancedDeepEquals(this.path, other.path) && + Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && + Utils.enhancedDeepEquals(this.grandparentYear, other.grandparentYear) && + Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, type, + includeFullMetadata, includeAncestorMetadata, includeAlternateMetadataSources, + guid, title, year, + path, grandparentTitle, grandparentYear, + parentIndex, index, originallyAvailableAt, + parentTitle); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryMatchesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "type", type, + "includeFullMetadata", includeFullMetadata, + "includeAncestorMetadata", includeAncestorMetadata, + "includeAlternateMetadataSources", includeAlternateMetadataSources, + "guid", guid, + "title", title, + "year", year, + "path", path, + "grandparentTitle", grandparentTitle, + "grandparentYear", grandparentYear, + "parentIndex", parentIndex, + "index", index, + "originallyAvailableAt", originallyAvailableAt, + "parentTitle", parentTitle); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional includeFullMetadata = Optional.empty(); + + private Optional includeAncestorMetadata = Optional.empty(); + + private Optional includeAlternateMetadataSources = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional path = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional grandparentYear = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The metadata type to filter by + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The metadata type to filter by + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + public Builder includeFullMetadata(BoolInt includeFullMetadata) { + Utils.checkNotNull(includeFullMetadata, "includeFullMetadata"); + this.includeFullMetadata = Optional.ofNullable(includeFullMetadata); + return this; + } + + public Builder includeFullMetadata(Optional includeFullMetadata) { + Utils.checkNotNull(includeFullMetadata, "includeFullMetadata"); + this.includeFullMetadata = includeFullMetadata; + return this; + } + + + public Builder includeAncestorMetadata(BoolInt includeAncestorMetadata) { + Utils.checkNotNull(includeAncestorMetadata, "includeAncestorMetadata"); + this.includeAncestorMetadata = Optional.ofNullable(includeAncestorMetadata); + return this; + } + + public Builder includeAncestorMetadata(Optional includeAncestorMetadata) { + Utils.checkNotNull(includeAncestorMetadata, "includeAncestorMetadata"); + this.includeAncestorMetadata = includeAncestorMetadata; + return this; + } + + + public Builder includeAlternateMetadataSources(BoolInt includeAlternateMetadataSources) { + Utils.checkNotNull(includeAlternateMetadataSources, "includeAlternateMetadataSources"); + this.includeAlternateMetadataSources = Optional.ofNullable(includeAlternateMetadataSources); + return this; + } + + public Builder includeAlternateMetadataSources(Optional includeAlternateMetadataSources) { + Utils.checkNotNull(includeAlternateMetadataSources, "includeAlternateMetadataSources"); + this.includeAlternateMetadataSources = includeAlternateMetadataSources; + return this; + } + + + /** + * Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined. + */ + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + /** + * Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined. + */ + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + + /** + * The title to filter by or assign + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title to filter by or assign + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * Used for movies shows, and albums. Optional. + */ + public Builder year(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + /** + * Used for movies shows, and albums. Optional. + */ + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + + /** + * Used for movies, episodes, and tracks. The full path to the media file, used for "cloud-scanning" an item. + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + /** + * Used for movies, episodes, and tracks. The full path to the media file, used for "cloud-scanning" an item. + */ + public Builder path(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + + /** + * Used for episodes and tracks. The title of the show/artist. Required if `path` isn't passed. + */ + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * Used for episodes and tracks. The title of the show/artist. Required if `path` isn't passed. + */ + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + + /** + * Used for episodes. The year of the show. + */ + public Builder grandparentYear(long grandparentYear) { + Utils.checkNotNull(grandparentYear, "grandparentYear"); + this.grandparentYear = Optional.ofNullable(grandparentYear); + return this; + } + + /** + * Used for episodes. The year of the show. + */ + public Builder grandparentYear(Optional grandparentYear) { + Utils.checkNotNull(grandparentYear, "grandparentYear"); + this.grandparentYear = grandparentYear; + return this; + } + + + /** + * Used for episodes and tracks. The season/album number. + */ + public Builder parentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * Used for episodes and tracks. The season/album number. + */ + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + + /** + * Used for episodes and tracks. The episode/tracks number in the season/album. + */ + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + /** + * Used for episodes and tracks. The episode/tracks number in the season/album. + */ + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * Used for episodes. In the format `YYYY-MM-DD`. + */ + public Builder originallyAvailableAt(String originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * Used for episodes. In the format `YYYY-MM-DD`. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + + /** + * Used for albums and tracks. The artist name for albums or the album name for tracks. + */ + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * Used for albums and tracks. The artist name for albums or the album name for tracks. + */ + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public GetLibraryMatchesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetLibraryMatchesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, type, + includeFullMetadata, includeAncestorMetadata, includeAlternateMetadataSources, + guid, title, year, + path, grandparentTitle, grandparentYear, + parentIndex, index, originallyAvailableAt, + parentTitle); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesRequestBuilder.java new file mode 100644 index 00000000..0e272808 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetLibraryMatches; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetLibraryMatchesRequestBuilder { + + private GetLibraryMatchesRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetLibraryMatchesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetLibraryMatchesRequestBuilder request(GetLibraryMatchesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetLibraryMatchesResponse call() throws Exception { + + RequestOperation operation + = new GetLibraryMatches.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesResponse.java new file mode 100644 index 00000000..f8a34c2a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryMatchesResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetLibraryMatchesResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetLibraryMatchesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetLibraryMatchesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetLibraryMatchesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLibraryMatchesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLibraryMatchesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetLibraryMatchesResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetLibraryMatchesResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetLibraryMatchesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryMatchesResponse other = (GetLibraryMatchesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryMatchesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetLibraryMatchesResponse build() { + + return new GetLibraryMatchesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllActiveDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllActiveDirection.java deleted file mode 100644 index 14a29aff..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllActiveDirection.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetLibrarySectionsAllActiveDirection - * - *

The direction of the sort. Can be either `asc` or `desc`. - */ -public enum GetLibrarySectionsAllActiveDirection { - Ascending("asc"), - Descending("desc"); - - @JsonValue - private final String value; - - GetLibrarySectionsAllActiveDirection(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetLibrarySectionsAllActiveDirection o: GetLibrarySectionsAllActiveDirection.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllCollection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllCollection.java deleted file mode 100644 index 46c599d1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllCollection.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibrarySectionsAllCollection { - /** - * The user-made collection this media item belongs to - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetLibrarySectionsAllCollection( - @JsonProperty("tag") String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - /** - * The user-made collection this media item belongs to - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The user-made collection this media item belongs to - */ - public GetLibrarySectionsAllCollection withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllCollection other = (GetLibrarySectionsAllCollection) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllCollection.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The user-made collection this media item belongs to - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetLibrarySectionsAllCollection build() { - - return new GetLibrarySectionsAllCollection( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllCountry.java deleted file mode 100644 index 01031981..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllCountry.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibrarySectionsAllCountry { - /** - * The country of origin of this media item - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetLibrarySectionsAllCountry( - @JsonProperty("tag") String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - /** - * The country of origin of this media item - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The country of origin of this media item - */ - public GetLibrarySectionsAllCountry withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllCountry other = (GetLibrarySectionsAllCountry) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllCountry.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The country of origin of this media item - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetLibrarySectionsAllCountry build() { - - return new GetLibrarySectionsAllCountry( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllDefaultDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllDefaultDirection.java deleted file mode 100644 index 4b7773eb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllDefaultDirection.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetLibrarySectionsAllDefaultDirection - * - *

The direction of the sort. Can be either `asc` or `desc`. - */ -public enum GetLibrarySectionsAllDefaultDirection { - Ascending("asc"), - Descending("desc"); - - @JsonValue - private final String value; - - GetLibrarySectionsAllDefaultDirection(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetLibrarySectionsAllDefaultDirection o: GetLibrarySectionsAllDefaultDirection.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllDirector.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllDirector.java deleted file mode 100644 index 756854a4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllDirector.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibrarySectionsAllDirector { - /** - * The role of Director - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetLibrarySectionsAllDirector( - @JsonProperty("tag") String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - /** - * The role of Director - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The role of Director - */ - public GetLibrarySectionsAllDirector withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllDirector other = (GetLibrarySectionsAllDirector) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllDirector.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The role of Director - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetLibrarySectionsAllDirector build() { - - return new GetLibrarySectionsAllDirector( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllField.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllField.java deleted file mode 100644 index ccd9f7d5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllField.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibrarySectionsAllField { - - @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 GetLibrarySectionsAllField( - @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 GetLibrarySectionsAllField( - 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 static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllField withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibrarySectionsAllField withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibrarySectionsAllField withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibrarySectionsAllField withSubType(String subType) { - Utils.checkNotNull(subType, "subType"); - this.subType = Optional.ofNullable(subType); - return this; - } - - - public GetLibrarySectionsAllField 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; - } - GetLibrarySectionsAllField other = (GetLibrarySectionsAllField) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.subType, other.subType); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title, type, - subType); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllField.class, - "key", key, - "title", title, - "type", type, - "subType", subType); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibrarySectionsAllField build() { - - return new GetLibrarySectionsAllField( - key, title, type, - subType); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllFieldType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllFieldType.java deleted file mode 100644 index e77f7e73..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllFieldType.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.List; - - -public class GetLibrarySectionsAllFieldType { - - @JsonProperty("type") - private String type; - - - @JsonProperty("Operator") - private List operator; - - @JsonCreator - public GetLibrarySectionsAllFieldType( - @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 static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllFieldType withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibrarySectionsAllFieldType 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; - } - GetLibrarySectionsAllFieldType other = (GetLibrarySectionsAllFieldType) o; - return - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.operator, other.operator); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - type, operator); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllFieldType.class, - "type", type, - "operator", operator); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibrarySectionsAllFieldType build() { - - return new GetLibrarySectionsAllFieldType( - type, operator); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllFilter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllFilter.java deleted file mode 100644 index b8f84c54..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllFilter.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibrarySectionsAllFilter { - - @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; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("advanced") - private Optional advanced; - - @JsonCreator - public GetLibrarySectionsAllFilter( - @JsonProperty("filter") String filter, - @JsonProperty("filterType") String filterType, - @JsonProperty("key") String key, - @JsonProperty("title") String title, - @JsonProperty("type") String type, - @JsonProperty("advanced") Optional advanced) { - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(filterType, "filterType"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(advanced, "advanced"); - this.filter = filter; - this.filterType = filterType; - this.key = key; - this.title = title; - this.type = type; - this.advanced = advanced; - } - - public GetLibrarySectionsAllFilter( - String filter, - String filterType, - String key, - String title, - String type) { - this(filter, filterType, key, - title, type, Optional.empty()); - } - - @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; - } - - @JsonIgnore - public Optional advanced() { - return advanced; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllFilter withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetLibrarySectionsAllFilter withFilterType(String filterType) { - Utils.checkNotNull(filterType, "filterType"); - this.filterType = filterType; - return this; - } - - public GetLibrarySectionsAllFilter withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibrarySectionsAllFilter withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibrarySectionsAllFilter withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibrarySectionsAllFilter withAdvanced(boolean advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = Optional.ofNullable(advanced); - return this; - } - - - public GetLibrarySectionsAllFilter withAdvanced(Optional advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = advanced; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllFilter other = (GetLibrarySectionsAllFilter) o; - return - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.filterType, other.filterType) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.advanced, other.advanced); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - filter, filterType, key, - title, type, advanced); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllFilter.class, - "filter", filter, - "filterType", filterType, - "key", key, - "title", title, - "type", type, - "advanced", advanced); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String filter; - - private String filterType; - - private String key; - - private String title; - - private String type; - - private Optional advanced = Optional.empty(); - - 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 Builder advanced(boolean advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = Optional.ofNullable(advanced); - return this; - } - - public Builder advanced(Optional advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = advanced; - return this; - } - - public GetLibrarySectionsAllFilter build() { - - return new GetLibrarySectionsAllFilter( - filter, filterType, key, - title, type, advanced); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllGenre.java deleted file mode 100644 index cdf6cd96..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllGenre.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibrarySectionsAllGenre { - /** - * The genre name of this media-item - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetLibrarySectionsAllGenre( - @JsonProperty("tag") String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - /** - * The genre name of this media-item - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The genre name of this media-item - */ - public GetLibrarySectionsAllGenre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllGenre other = (GetLibrarySectionsAllGenre) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllGenre.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The genre name of this media-item - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetLibrarySectionsAllGenre build() { - - return new GetLibrarySectionsAllGenre( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllGuids.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllGuids.java deleted file mode 100644 index 41a0d88b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllGuids.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibrarySectionsAllGuids { - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - @JsonProperty("id") - private String id; - - @JsonCreator - public GetLibrarySectionsAllGuids( - @JsonProperty("id") String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - } - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - @JsonIgnore - public String id() { - return id; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - public GetLibrarySectionsAllGuids 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; - } - GetLibrarySectionsAllGuids other = (GetLibrarySectionsAllGuids) o; - return - Utils.enhancedDeepEquals(this.id, other.id); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllGuids.class, - "id", id); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String id; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetLibrarySectionsAllGuids build() { - - return new GetLibrarySectionsAllGuids( - id); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllHasThumbnail.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllHasThumbnail.java deleted file mode 100644 index fd7854a2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllHasThumbnail.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetLibrarySectionsAllHasThumbnail - * - *

Indicates if the part has a thumbnail. - */ -public enum GetLibrarySectionsAllHasThumbnail { - False("0"), - True("1"); - - @JsonValue - private final String value; - - GetLibrarySectionsAllHasThumbnail(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetLibrarySectionsAllHasThumbnail o: GetLibrarySectionsAllHasThumbnail.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllImage.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllImage.java deleted file mode 100644 index 3695bb85..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllImage.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibrarySectionsAllImage { - - @JsonProperty("alt") - private String alt; - - - @JsonProperty("type") - private GetLibrarySectionsAllLibraryResponseType type; - - - @JsonProperty("url") - private String url; - - @JsonCreator - public GetLibrarySectionsAllImage( - @JsonProperty("alt") String alt, - @JsonProperty("type") GetLibrarySectionsAllLibraryResponseType 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 GetLibrarySectionsAllLibraryResponseType type() { - return type; - } - - @JsonIgnore - public String url() { - return url; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllImage withAlt(String alt) { - Utils.checkNotNull(alt, "alt"); - this.alt = alt; - return this; - } - - public GetLibrarySectionsAllImage withType(GetLibrarySectionsAllLibraryResponseType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibrarySectionsAllImage 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; - } - GetLibrarySectionsAllImage other = (GetLibrarySectionsAllImage) o; - return - Utils.enhancedDeepEquals(this.alt, other.alt) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.url, other.url); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - alt, type, url); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllImage.class, - "alt", alt, - "type", type, - "url", url); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String alt; - - private GetLibrarySectionsAllLibraryResponseType 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(GetLibrarySectionsAllLibraryResponseType 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 GetLibrarySectionsAllImage build() { - - return new GetLibrarySectionsAllImage( - alt, type, url); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.java deleted file mode 100644 index 3405c6ff..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllLibraryOptimizedForStreaming.java +++ /dev/null @@ -1,100 +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.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; - -/** - * GetLibrarySectionsAllLibraryOptimizedForStreaming - * - *

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

    - *
  • {@code dev.plexapi.sdk.models.operations.GetLibrarySectionsAllOptimizedForStreamingLibrary1}
  • - *
  • {@code boolean}
  • - *
- * - *

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

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

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

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

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

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

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

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

The type of media content in the Plex library. This can represent videos, music, or photos. - */ -@JsonDeserialize(using = GetLibrarySectionsAllLibraryType._Deserializer.class) -@JsonSerialize(using = GetLibrarySectionsAllLibraryType._Serializer.class) -public class GetLibrarySectionsAllLibraryType { - - public static final GetLibrarySectionsAllLibraryType Movie = new GetLibrarySectionsAllLibraryType("movie"); - public static final GetLibrarySectionsAllLibraryType TvShow = new GetLibrarySectionsAllLibraryType("show"); - public static final GetLibrarySectionsAllLibraryType Season = new GetLibrarySectionsAllLibraryType("season"); - public static final GetLibrarySectionsAllLibraryType Episode = new GetLibrarySectionsAllLibraryType("episode"); - public static final GetLibrarySectionsAllLibraryType Artist = new GetLibrarySectionsAllLibraryType("artist"); - public static final GetLibrarySectionsAllLibraryType Album = new GetLibrarySectionsAllLibraryType("album"); - public static final GetLibrarySectionsAllLibraryType Track = new GetLibrarySectionsAllLibraryType("track"); - public static final GetLibrarySectionsAllLibraryType PhotoAlbum = new GetLibrarySectionsAllLibraryType("photoalbum"); - public static final GetLibrarySectionsAllLibraryType Photo = new GetLibrarySectionsAllLibraryType("photo"); - public static final GetLibrarySectionsAllLibraryType Collection = new GetLibrarySectionsAllLibraryType("collection"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetLibrarySectionsAllLibraryType(String value) { - this.value = value; - } - - /** - * Returns a GetLibrarySectionsAllLibraryType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetLibrarySectionsAllLibraryType - */ - public static GetLibrarySectionsAllLibraryType of(String value) { - synchronized (GetLibrarySectionsAllLibraryType.class) { - return values.computeIfAbsent(value, v -> new GetLibrarySectionsAllLibraryType(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetLibrarySectionsAllLibraryType other = (GetLibrarySectionsAllLibraryType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetLibrarySectionsAllLibraryType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetLibrarySectionsAllLibraryType[] values() { - synchronized (GetLibrarySectionsAllLibraryType.class) { - return values.values().toArray(new GetLibrarySectionsAllLibraryType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("movie", Movie); - map.put("show", TvShow); - map.put("season", Season); - map.put("episode", Episode); - map.put("artist", Artist); - map.put("album", Album); - map.put("track", Track); - map.put("photoalbum", PhotoAlbum); - map.put("photo", Photo); - map.put("collection", Collection); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("movie", GetLibrarySectionsAllLibraryTypeEnum.Movie); - map.put("show", GetLibrarySectionsAllLibraryTypeEnum.TvShow); - map.put("season", GetLibrarySectionsAllLibraryTypeEnum.Season); - map.put("episode", GetLibrarySectionsAllLibraryTypeEnum.Episode); - map.put("artist", GetLibrarySectionsAllLibraryTypeEnum.Artist); - map.put("album", GetLibrarySectionsAllLibraryTypeEnum.Album); - map.put("track", GetLibrarySectionsAllLibraryTypeEnum.Track); - map.put("photoalbum", GetLibrarySectionsAllLibraryTypeEnum.PhotoAlbum); - map.put("photo", GetLibrarySectionsAllLibraryTypeEnum.Photo); - map.put("collection", GetLibrarySectionsAllLibraryTypeEnum.Collection); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetLibrarySectionsAllLibraryType.class); - } - - @Override - public void serialize(GetLibrarySectionsAllLibraryType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetLibrarySectionsAllLibraryType.class); - } - - @Override - public GetLibrarySectionsAllLibraryType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetLibrarySectionsAllLibraryType.of(v); - } - } - - public enum GetLibrarySectionsAllLibraryTypeEnum { - - Movie("movie"), - TvShow("show"), - Season("season"), - Episode("episode"), - Artist("artist"), - Album("album"), - Track("track"), - PhotoAlbum("photoalbum"), - Photo("photo"), - Collection("collection"),; - - private final String value; - - private GetLibrarySectionsAllLibraryTypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMedia.java deleted file mode 100644 index 648c3853..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMedia.java +++ /dev/null @@ -1,1181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Float; -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.Optional; - - -public class GetLibrarySectionsAllMedia { - /** - * Unique media identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Duration of the media in milliseconds. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - /** - * Bitrate in bits per second. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - /** - * Video width in pixels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("width") - private Optional width; - - /** - * Video height in pixels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("height") - private Optional height; - - /** - * Aspect ratio of the video. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("aspectRatio") - private Optional aspectRatio; - - /** - * Number of audio channels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannels") - private Optional audioChannels; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("displayOffset") - private Optional displayOffset; - - /** - * Audio codec used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioCodec") - private Optional audioCodec; - - /** - * Video codec used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoCodec") - private Optional videoCodec; - - /** - * Video resolution (e.g., 4k). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoResolution") - private Optional videoResolution; - - /** - * File container type. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoFrameRate") - private Optional videoFrameRate; - - /** - * Video profile (e.g., main 10). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - /** - * Indicates whether voice activity is detected. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasVoiceActivity") - private Optional hasVoiceActivity; - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - /** - * An array of parts for this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Part") - private Optional> part; - - @JsonCreator - public GetLibrarySectionsAllMedia( - @JsonProperty("id") long id, - @JsonProperty("duration") Optional duration, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("width") Optional width, - @JsonProperty("height") Optional height, - @JsonProperty("aspectRatio") Optional aspectRatio, - @JsonProperty("audioChannels") Optional audioChannels, - @JsonProperty("displayOffset") Optional displayOffset, - @JsonProperty("audioCodec") Optional audioCodec, - @JsonProperty("videoCodec") Optional videoCodec, - @JsonProperty("videoResolution") Optional videoResolution, - @JsonProperty("container") Optional container, - @JsonProperty("videoFrameRate") Optional videoFrameRate, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("Part") 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(displayOffset, "displayOffset"); - 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(audioProfile, "audioProfile"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - 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.displayOffset = displayOffset; - this.audioCodec = audioCodec; - this.videoCodec = videoCodec; - this.videoResolution = videoResolution; - this.container = container; - this.videoFrameRate = videoFrameRate; - this.videoProfile = videoProfile; - this.hasVoiceActivity = hasVoiceActivity; - this.audioProfile = audioProfile; - this.optimizedForStreaming = optimizedForStreaming; - this.has64bitOffsets = has64bitOffsets; - this.part = part; - } - - public GetLibrarySectionsAllMedia( - long id) { - this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Unique media identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Duration of the media in milliseconds. - */ - @JsonIgnore - public Optional duration() { - return duration; - } - - /** - * Bitrate in bits per second. - */ - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - /** - * Video width in pixels. - */ - @JsonIgnore - public Optional width() { - return width; - } - - /** - * Video height in pixels. - */ - @JsonIgnore - public Optional height() { - return height; - } - - /** - * Aspect ratio of the video. - */ - @JsonIgnore - public Optional aspectRatio() { - return aspectRatio; - } - - /** - * Number of audio channels. - */ - @JsonIgnore - public Optional audioChannels() { - return audioChannels; - } - - @JsonIgnore - public Optional displayOffset() { - return displayOffset; - } - - /** - * Audio codec used. - */ - @JsonIgnore - public Optional audioCodec() { - return audioCodec; - } - - /** - * Video codec used. - */ - @JsonIgnore - public Optional videoCodec() { - return videoCodec; - } - - /** - * Video resolution (e.g., 4k). - */ - @JsonIgnore - public Optional videoResolution() { - return videoResolution; - } - - /** - * File container type. - */ - @JsonIgnore - public Optional container() { - return container; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - @JsonIgnore - public Optional videoFrameRate() { - return videoFrameRate; - } - - /** - * Video profile (e.g., main 10). - */ - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - /** - * Indicates whether voice activity is detected. - */ - @JsonIgnore - public Optional hasVoiceActivity() { - return hasVoiceActivity; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional optimizedForStreaming() { - return (Optional) optimizedForStreaming; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - /** - * An array of parts for this media item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> part() { - return (Optional>) part; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique media identifier. - */ - public GetLibrarySectionsAllMedia withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Duration of the media in milliseconds. - */ - public GetLibrarySectionsAllMedia withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - /** - * Duration of the media in milliseconds. - */ - public GetLibrarySectionsAllMedia withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * Bitrate in bits per second. - */ - public GetLibrarySectionsAllMedia withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - /** - * Bitrate in bits per second. - */ - public GetLibrarySectionsAllMedia withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * Video width in pixels. - */ - public GetLibrarySectionsAllMedia withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - /** - * Video width in pixels. - */ - public GetLibrarySectionsAllMedia withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Video height in pixels. - */ - public GetLibrarySectionsAllMedia withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - /** - * Video height in pixels. - */ - public GetLibrarySectionsAllMedia withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * Aspect ratio of the video. - */ - public GetLibrarySectionsAllMedia withAspectRatio(float aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - - /** - * Aspect ratio of the video. - */ - public GetLibrarySectionsAllMedia withAspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - /** - * Number of audio channels. - */ - public GetLibrarySectionsAllMedia withAudioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - - /** - * Number of audio channels. - */ - public GetLibrarySectionsAllMedia withAudioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - public GetLibrarySectionsAllMedia withDisplayOffset(int displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = Optional.ofNullable(displayOffset); - return this; - } - - - public GetLibrarySectionsAllMedia withDisplayOffset(Optional displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = displayOffset; - return this; - } - - /** - * Audio codec used. - */ - public GetLibrarySectionsAllMedia withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - - /** - * Audio codec used. - */ - public GetLibrarySectionsAllMedia withAudioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - /** - * Video codec used. - */ - public GetLibrarySectionsAllMedia withVideoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - - /** - * Video codec used. - */ - public GetLibrarySectionsAllMedia withVideoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - /** - * Video resolution (e.g., 4k). - */ - public GetLibrarySectionsAllMedia withVideoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - - /** - * Video resolution (e.g., 4k). - */ - public GetLibrarySectionsAllMedia withVideoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - /** - * File container type. - */ - public GetLibrarySectionsAllMedia withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - /** - * File container type. - */ - public GetLibrarySectionsAllMedia withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public GetLibrarySectionsAllMedia withVideoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public GetLibrarySectionsAllMedia withVideoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - /** - * Video profile (e.g., main 10). - */ - public GetLibrarySectionsAllMedia withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - /** - * Video profile (e.g., main 10). - */ - public GetLibrarySectionsAllMedia withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - /** - * Indicates whether voice activity is detected. - */ - public GetLibrarySectionsAllMedia withHasVoiceActivity(boolean hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); - return this; - } - - - /** - * Indicates whether voice activity is detected. - */ - public GetLibrarySectionsAllMedia withHasVoiceActivity(Optional hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = hasVoiceActivity; - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetLibrarySectionsAllMedia withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetLibrarySectionsAllMedia withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetLibrarySectionsAllMedia withOptimizedForStreaming(GetLibrarySectionsAllOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetLibrarySectionsAllMedia withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - public GetLibrarySectionsAllMedia withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - public GetLibrarySectionsAllMedia withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - /** - * An array of parts for this media item. - */ - public GetLibrarySectionsAllMedia withPart(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - - /** - * An array of parts for this media item. - */ - public GetLibrarySectionsAllMedia 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; - } - GetLibrarySectionsAllMedia other = (GetLibrarySectionsAllMedia) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.displayOffset, other.displayOffset) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && - Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.part, other.part); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, displayOffset, audioCodec, - videoCodec, videoResolution, container, - videoFrameRate, videoProfile, hasVoiceActivity, - audioProfile, optimizedForStreaming, has64bitOffsets, - part); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllMedia.class, - "id", id, - "duration", duration, - "bitrate", bitrate, - "width", width, - "height", height, - "aspectRatio", aspectRatio, - "audioChannels", audioChannels, - "displayOffset", displayOffset, - "audioCodec", audioCodec, - "videoCodec", videoCodec, - "videoResolution", videoResolution, - "container", container, - "videoFrameRate", videoFrameRate, - "videoProfile", videoProfile, - "hasVoiceActivity", hasVoiceActivity, - "audioProfile", audioProfile, - "optimizedForStreaming", optimizedForStreaming, - "has64bitOffsets", has64bitOffsets, - "part", part); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - 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 displayOffset = 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 videoProfile = Optional.empty(); - - private Optional hasVoiceActivity = Optional.empty(); - - private Optional audioProfile = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional> part = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique media identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Duration of the media in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - /** - * Duration of the media in milliseconds. - */ - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * Bitrate in bits per second. - */ - public Builder bitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * Bitrate in bits per second. - */ - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - - /** - * Video width in pixels. - */ - public Builder width(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * Video width in pixels. - */ - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - /** - * Video height in pixels. - */ - public Builder height(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * Video height in pixels. - */ - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - /** - * Aspect ratio of the video. - */ - public Builder aspectRatio(float aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - /** - * Aspect ratio of the video. - */ - public Builder aspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - - /** - * Number of audio channels. - */ - public Builder audioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - /** - * Number of audio channels. - */ - public Builder audioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - - public Builder displayOffset(int displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = Optional.ofNullable(displayOffset); - return this; - } - - public Builder displayOffset(Optional displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = displayOffset; - return this; - } - - - /** - * Audio codec used. - */ - public Builder audioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - /** - * Audio codec used. - */ - public Builder audioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - - /** - * Video codec used. - */ - public Builder videoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - /** - * Video codec used. - */ - public Builder videoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - - /** - * Video resolution (e.g., 4k). - */ - public Builder videoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - /** - * Video resolution (e.g., 4k). - */ - public Builder videoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - - /** - * File container type. - */ - public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - /** - * File container type. - */ - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Builder videoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Builder videoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - - /** - * Video profile (e.g., main 10). - */ - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - /** - * Video profile (e.g., main 10). - */ - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - - /** - * Indicates whether voice activity is detected. - */ - public Builder hasVoiceActivity(boolean hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); - return this; - } - - /** - * Indicates whether voice activity is detected. - */ - public Builder hasVoiceActivity(Optional hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = hasVoiceActivity; - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(GetLibrarySectionsAllOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - - 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; - } - - - /** - * An array of parts for this media item. - */ - public Builder part(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - /** - * An array of parts for this media item. - */ - public Builder part(Optional> part) { - Utils.checkNotNull(part, "part"); - this.part = part; - return this; - } - - public GetLibrarySectionsAllMedia build() { - - return new GetLibrarySectionsAllMedia( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, displayOffset, audioCodec, - videoCodec, videoResolution, container, - videoFrameRate, videoProfile, hasVoiceActivity, - audioProfile, optimizedForStreaming, has64bitOffsets, - part); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMediaContainer.java deleted file mode 100644 index 1fec9731..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMediaContainer.java +++ /dev/null @@ -1,967 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetLibrarySectionsAllMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * Total number of media items in the library. - */ - @JsonProperty("totalSize") - private int totalSize; - - /** - * Offset value for pagination. - */ - @JsonProperty("offset") - private long offset; - - /** - * Indicates whether syncing is allowed. - */ - @JsonProperty("allowSync") - private boolean allowSync; - - /** - * URL for the background artwork of the media container. - */ - @JsonProperty("art") - private String art; - - /** - * The content type or mode. - */ - @JsonProperty("content") - private String content; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - /** - * The unique identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - /** - * The title of the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - /** - * The universally unique identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionUUID") - private Optional librarySectionUUID; - - /** - * The prefix used for media tag resource paths. - */ - @JsonProperty("mediaTagPrefix") - private String mediaTagPrefix; - - /** - * The version number for media tags. - */ - @JsonProperty("mediaTagVersion") - private long mediaTagVersion; - - /** - * URL for the thumbnail image of the media container. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * Specifies whether caching is disabled. - */ - @JsonProperty("nocache") - private boolean nocache; - - /** - * The primary title of the media container. - */ - @JsonProperty("title1") - private String title1; - - /** - * The secondary title of the media container. - */ - @JsonProperty("title2") - private String title2; - - /** - * Identifier for the view group layout. - */ - @JsonProperty("viewGroup") - private String viewGroup; - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Meta") - private Optional meta; - - /** - * An array of metadata items. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetLibrarySectionsAllMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("totalSize") int totalSize, - @JsonProperty("offset") long offset, - @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("art") String art, - @JsonProperty("content") String content, - @JsonProperty("identifier") String identifier, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionUUID") Optional librarySectionUUID, - @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("mediaTagVersion") long mediaTagVersion, - @JsonProperty("thumb") String thumb, - @JsonProperty("nocache") boolean nocache, - @JsonProperty("title1") String title1, - @JsonProperty("title2") String title2, - @JsonProperty("viewGroup") String viewGroup, - @JsonProperty("Meta") Optional meta, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(totalSize, "totalSize"); - Utils.checkNotNull(offset, "offset"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(content, "content"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(nocache, "nocache"); - Utils.checkNotNull(title1, "title1"); - Utils.checkNotNull(title2, "title2"); - Utils.checkNotNull(viewGroup, "viewGroup"); - Utils.checkNotNull(meta, "meta"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.totalSize = totalSize; - this.offset = offset; - this.allowSync = allowSync; - this.art = art; - this.content = content; - this.identifier = identifier; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionUUID = librarySectionUUID; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.thumb = thumb; - this.nocache = nocache; - this.title1 = title1; - this.title2 = title2; - this.viewGroup = viewGroup; - this.meta = meta; - this.metadata = metadata; - } - - public GetLibrarySectionsAllMediaContainer( - int size, - int totalSize, - long offset, - boolean allowSync, - String art, - String content, - String identifier, - String mediaTagPrefix, - long mediaTagVersion, - String thumb, - boolean nocache, - String title1, - String title2, - String viewGroup) { - this(size, totalSize, offset, - allowSync, art, content, - identifier, Optional.empty(), Optional.empty(), - Optional.empty(), mediaTagPrefix, mediaTagVersion, - thumb, nocache, title1, - title2, viewGroup, Optional.empty(), - Optional.empty()); - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * Total number of media items in the library. - */ - @JsonIgnore - public int totalSize() { - return totalSize; - } - - /** - * Offset value for pagination. - */ - @JsonIgnore - public long offset() { - return offset; - } - - /** - * Indicates whether syncing is allowed. - */ - @JsonIgnore - public boolean allowSync() { - return allowSync; - } - - /** - * URL for the background artwork of the media container. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * The content type or mode. - */ - @JsonIgnore - public String content() { - return content; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - /** - * The unique identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - /** - * The title of the library section. - */ - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - /** - * The universally unique identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionUUID() { - return librarySectionUUID; - } - - /** - * The prefix used for media tag resource paths. - */ - @JsonIgnore - public String mediaTagPrefix() { - return mediaTagPrefix; - } - - /** - * The version number for media tags. - */ - @JsonIgnore - public long mediaTagVersion() { - return mediaTagVersion; - } - - /** - * URL for the thumbnail image of the media container. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * Specifies whether caching is disabled. - */ - @JsonIgnore - public boolean nocache() { - return nocache; - } - - /** - * The primary title of the media container. - */ - @JsonIgnore - public String title1() { - return title1; - } - - /** - * The secondary title of the media container. - */ - @JsonIgnore - public String title2() { - return title2; - } - - /** - * Identifier for the view group layout. - */ - @JsonIgnore - public String viewGroup() { - return viewGroup; - } - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional meta() { - return (Optional) meta; - } - - /** - * An array of metadata items. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetLibrarySectionsAllMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * Total number of media items in the library. - */ - public GetLibrarySectionsAllMediaContainer withTotalSize(int totalSize) { - Utils.checkNotNull(totalSize, "totalSize"); - this.totalSize = totalSize; - return this; - } - - /** - * Offset value for pagination. - */ - public GetLibrarySectionsAllMediaContainer withOffset(long offset) { - Utils.checkNotNull(offset, "offset"); - this.offset = offset; - return this; - } - - /** - * Indicates whether syncing is allowed. - */ - public GetLibrarySectionsAllMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - /** - * URL for the background artwork of the media container. - */ - public GetLibrarySectionsAllMediaContainer withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * The content type or mode. - */ - public GetLibrarySectionsAllMediaContainer withContent(String content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetLibrarySectionsAllMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - /** - * The unique identifier for the library section. - */ - public GetLibrarySectionsAllMediaContainer withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - /** - * The unique identifier for the library section. - */ - public GetLibrarySectionsAllMediaContainer withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - /** - * The title of the library section. - */ - public GetLibrarySectionsAllMediaContainer withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - /** - * The title of the library section. - */ - public GetLibrarySectionsAllMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - /** - * The universally unique identifier for the library section. - */ - public GetLibrarySectionsAllMediaContainer withLibrarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - - /** - * The universally unique identifier for the library section. - */ - public GetLibrarySectionsAllMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - /** - * The prefix used for media tag resource paths. - */ - public GetLibrarySectionsAllMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - /** - * The version number for media tags. - */ - public GetLibrarySectionsAllMediaContainer withMediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - /** - * URL for the thumbnail image of the media container. - */ - public GetLibrarySectionsAllMediaContainer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * Specifies whether caching is disabled. - */ - public GetLibrarySectionsAllMediaContainer withNocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - /** - * The primary title of the media container. - */ - public GetLibrarySectionsAllMediaContainer withTitle1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - /** - * The secondary title of the media container. - */ - public GetLibrarySectionsAllMediaContainer withTitle2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - /** - * Identifier for the view group layout. - */ - public GetLibrarySectionsAllMediaContainer withViewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - public GetLibrarySectionsAllMediaContainer withMeta(GetLibrarySectionsAllMeta meta) { - Utils.checkNotNull(meta, "meta"); - this.meta = Optional.ofNullable(meta); - return this; - } - - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - public GetLibrarySectionsAllMediaContainer withMeta(Optional meta) { - Utils.checkNotNull(meta, "meta"); - this.meta = meta; - return this; - } - - /** - * An array of metadata items. - */ - public GetLibrarySectionsAllMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - /** - * An array of metadata items. - */ - public GetLibrarySectionsAllMediaContainer 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; - } - GetLibrarySectionsAllMediaContainer other = (GetLibrarySectionsAllMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && - Utils.enhancedDeepEquals(this.offset, other.offset) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.content, other.content) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionUUID, other.librarySectionUUID) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.nocache, other.nocache) && - Utils.enhancedDeepEquals(this.title1, other.title1) && - Utils.enhancedDeepEquals(this.title2, other.title2) && - Utils.enhancedDeepEquals(this.viewGroup, other.viewGroup) && - Utils.enhancedDeepEquals(this.meta, other.meta) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, totalSize, offset, - allowSync, art, content, - identifier, librarySectionID, librarySectionTitle, - librarySectionUUID, mediaTagPrefix, mediaTagVersion, - thumb, nocache, title1, - title2, viewGroup, meta, - metadata); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllMediaContainer.class, - "size", size, - "totalSize", totalSize, - "offset", offset, - "allowSync", allowSync, - "art", art, - "content", content, - "identifier", identifier, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionUUID", librarySectionUUID, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "thumb", thumb, - "nocache", nocache, - "title1", title1, - "title2", title2, - "viewGroup", viewGroup, - "meta", meta, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Integer totalSize; - - private Long offset; - - private Boolean allowSync; - - private String art; - - private String content; - - private String identifier; - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionUUID = Optional.empty(); - - private String mediaTagPrefix; - - private Long mediaTagVersion; - - private String thumb; - - private Boolean nocache; - - private String title1; - - private String title2; - - private String viewGroup; - - private Optional meta = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * Total number of media items in the library. - */ - public Builder totalSize(int totalSize) { - Utils.checkNotNull(totalSize, "totalSize"); - this.totalSize = totalSize; - return this; - } - - - /** - * Offset value for pagination. - */ - public Builder offset(long offset) { - Utils.checkNotNull(offset, "offset"); - this.offset = offset; - return this; - } - - - /** - * Indicates whether syncing is allowed. - */ - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - - /** - * URL for the background artwork of the media container. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * The content type or mode. - */ - public Builder content(String content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - /** - * The unique identifier for the library section. - */ - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - /** - * The unique identifier for the library section. - */ - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - - /** - * The universally unique identifier for the library section. - */ - public Builder librarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - /** - * The universally unique identifier for the library section. - */ - public Builder librarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - - /** - * The prefix used for media tag resource paths. - */ - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - - /** - * The version number for media tags. - */ - public Builder mediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - - /** - * URL for the thumbnail image of the media container. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * Specifies whether caching is disabled. - */ - public Builder nocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - - /** - * The primary title of the media container. - */ - public Builder title1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - - /** - * The secondary title of the media container. - */ - public Builder title2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - - /** - * Identifier for the view group layout. - */ - public Builder viewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - public Builder meta(GetLibrarySectionsAllMeta meta) { - Utils.checkNotNull(meta, "meta"); - this.meta = Optional.ofNullable(meta); - return this; - } - - /** - * 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; - } - - - /** - * An array of metadata items. - */ - public Builder metadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - /** - * An array of metadata items. - */ - public Builder metadata(Optional> metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - public GetLibrarySectionsAllMediaContainer build() { - - return new GetLibrarySectionsAllMediaContainer( - size, totalSize, offset, - allowSync, art, content, - identifier, librarySectionID, librarySectionTitle, - librarySectionUUID, mediaTagPrefix, mediaTagVersion, - thumb, nocache, title1, - title2, viewGroup, meta, - metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMeta.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMeta.java deleted file mode 100644 index 4cf575bf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMeta.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - -/** - * GetLibrarySectionsAllMeta - * - *

The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ -public class GetLibrarySectionsAllMeta { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Type") - private Optional> type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("FieldType") - private Optional> fieldType; - - @JsonCreator - public GetLibrarySectionsAllMeta( - @JsonProperty("Type") Optional> type, - @JsonProperty("FieldType") Optional> fieldType) { - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(fieldType, "fieldType"); - this.type = type; - this.fieldType = fieldType; - } - - public GetLibrarySectionsAllMeta() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> type() { - return (Optional>) type; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> fieldType() { - return (Optional>) fieldType; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllMeta withType(List type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetLibrarySectionsAllMeta withType(Optional> type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibrarySectionsAllMeta withFieldType(List fieldType) { - Utils.checkNotNull(fieldType, "fieldType"); - this.fieldType = Optional.ofNullable(fieldType); - return this; - } - - - public GetLibrarySectionsAllMeta 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; - } - GetLibrarySectionsAllMeta other = (GetLibrarySectionsAllMeta) o; - return - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.fieldType, other.fieldType); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - type, fieldType); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllMeta.class, - "type", type, - "fieldType", fieldType); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibrarySectionsAllMeta build() { - - return new GetLibrarySectionsAllMeta( - type, fieldType); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMetadata.java deleted file mode 100644 index a3acfb8d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllMetadata.java +++ /dev/null @@ -1,3439 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Float; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.LocalDate; -import java.util.List; -import java.util.Optional; - -/** - * GetLibrarySectionsAllMetadata - * - *

Unknown - */ -public class GetLibrarySectionsAllMetadata { - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - @JsonProperty("ratingKey") - private String ratingKey; - - /** - * The unique key for the media item. - */ - @JsonProperty("key") - private String key; - - /** - * The globally unique identifier for the media item. - */ - @JsonProperty("guid") - private String guid; - - /** - * A URL‐friendly version of the media title. - */ - @JsonProperty("slug") - private String slug; - - /** - * The studio that produced the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("studio") - private Optional studio; - - - @JsonProperty("type") - private GetLibrarySectionsAllLibraryType type; - - /** - * The title of the media item. - */ - @JsonProperty("title") - private String title; - - /** - * The sort title used for ordering media items. - */ - @JsonProperty("titleSort") - private String titleSort; - - /** - * The content rating for the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("contentRating") - private Optional contentRating; - - /** - * A synopsis of the media item. - */ - @JsonProperty("summary") - private String summary; - - /** - * The critic rating for the media item. - */ - @JsonProperty("rating") - private float rating; - - /** - * The audience rating for the media item. - */ - @JsonProperty("audienceRating") - private double audienceRating; - - /** - * The release year of the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("year") - private Optional year; - - /** - * A brief tagline for the media item. - */ - @JsonProperty("tagline") - private String tagline; - - /** - * The thumbnail image URL for the media item. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The art image URL for the media item. - */ - @JsonProperty("art") - private String art; - - /** - * The theme URL for the media item. - */ - @JsonProperty("theme") - private String theme; - - /** - * The index position of the media item. - */ - @JsonProperty("index") - private int index; - - /** - * The number of leaf items (end nodes) under this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - /** - * The number of leaf items that have been viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewedLeafCount") - private Optional viewedLeafCount; - - /** - * The number of child items associated with this media item. - */ - @JsonProperty("childCount") - private int childCount; - - /** - * The total number of seasons (for TV shows). - */ - @JsonProperty("seasonCount") - private int seasonCount; - - /** - * The duration of the media item in milliseconds. - */ - @JsonProperty("duration") - private int duration; - - /** - * The original release date of the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originallyAvailableAt") - private Optional originallyAvailableAt; - - - @JsonProperty("addedAt") - private long addedAt; - - /** - * Unix epoch datetime in seconds - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - /** - * The URL for the audience rating image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audienceRatingImage") - private Optional audienceRatingImage; - - /** - * The source from which chapter data is derived. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chapterSource") - private Optional chapterSource; - - /** - * The primary extra key associated with this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("primaryExtraKey") - private Optional primaryExtraKey; - - /** - * The original title of the media item (if different). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originalTitle") - private Optional originalTitle; - - /** - * The rating key of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentRatingKey") - private Optional parentRatingKey; - - /** - * The rating key of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentRatingKey") - private Optional grandparentRatingKey; - - /** - * The GUID of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentGuid") - private Optional parentGuid; - - /** - * The GUID of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentGuid") - private Optional grandparentGuid; - - /** - * The slug for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentSlug") - private Optional grandparentSlug; - - /** - * The key of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentKey") - private Optional grandparentKey; - - /** - * The key of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - /** - * The title of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTitle") - private Optional grandparentTitle; - - /** - * The thumbnail URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentThumb") - private Optional grandparentThumb; - - /** - * The theme URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTheme") - private Optional grandparentTheme; - - /** - * The art URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentArt") - private Optional grandparentArt; - - /** - * The title of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - /** - * The index position of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - /** - * The thumbnail URL for the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - /** - * The URL for the rating image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingImage") - private Optional ratingImage; - - /** - * The number of times this media item has been viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - /** - * The current playback offset (in milliseconds). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewOffset") - private Optional viewOffset; - - /** - * The number of times this media item has been skipped. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipCount") - private Optional skipCount; - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; - - /** - * The Unix timestamp representing the last time the item was rated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastRatedAt") - private Optional lastRatedAt; - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAtAccuracy") - private Optional createdAtAccuracy; - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAtTZOffset") - private Optional createdAtTZOffset; - - /** - * Unix timestamp for when the media item was last viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("userRating") - private Optional userRating; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Image") - private Optional> image; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("UltraBlurColors") - private Optional ultraBlurColors; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Guid") - private Optional> guids; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Media") - private Optional> media; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Genre") - private Optional> genre; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Country") - private Optional> country; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Director") - private Optional> director; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Writer") - private Optional> writer; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Role") - private Optional> role; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Collection") - private Optional> collection; - - @JsonCreator - public GetLibrarySectionsAllMetadata( - @JsonProperty("ratingKey") String ratingKey, - @JsonProperty("key") String key, - @JsonProperty("guid") String guid, - @JsonProperty("slug") String slug, - @JsonProperty("studio") Optional studio, - @JsonProperty("type") GetLibrarySectionsAllLibraryType type, - @JsonProperty("title") String title, - @JsonProperty("titleSort") String titleSort, - @JsonProperty("contentRating") Optional contentRating, - @JsonProperty("summary") String summary, - @JsonProperty("rating") float rating, - @JsonProperty("audienceRating") double audienceRating, - @JsonProperty("year") Optional year, - @JsonProperty("tagline") String tagline, - @JsonProperty("thumb") String thumb, - @JsonProperty("art") String art, - @JsonProperty("theme") String theme, - @JsonProperty("index") int index, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("viewedLeafCount") Optional viewedLeafCount, - @JsonProperty("childCount") int childCount, - @JsonProperty("seasonCount") int seasonCount, - @JsonProperty("duration") int duration, - @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, - @JsonProperty("addedAt") long addedAt, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("audienceRatingImage") Optional audienceRatingImage, - @JsonProperty("chapterSource") Optional chapterSource, - @JsonProperty("primaryExtraKey") Optional primaryExtraKey, - @JsonProperty("originalTitle") Optional originalTitle, - @JsonProperty("parentRatingKey") Optional parentRatingKey, - @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, - @JsonProperty("parentGuid") Optional parentGuid, - @JsonProperty("grandparentGuid") Optional grandparentGuid, - @JsonProperty("grandparentSlug") Optional grandparentSlug, - @JsonProperty("grandparentKey") Optional grandparentKey, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("grandparentTitle") Optional grandparentTitle, - @JsonProperty("grandparentThumb") Optional grandparentThumb, - @JsonProperty("grandparentTheme") Optional grandparentTheme, - @JsonProperty("grandparentArt") Optional grandparentArt, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("ratingImage") Optional ratingImage, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("viewOffset") Optional viewOffset, - @JsonProperty("skipCount") Optional skipCount, - @JsonProperty("subtype") Optional subtype, - @JsonProperty("lastRatedAt") Optional lastRatedAt, - @JsonProperty("createdAtAccuracy") Optional createdAtAccuracy, - @JsonProperty("createdAtTZOffset") Optional createdAtTZOffset, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("userRating") Optional userRating, - @JsonProperty("Image") Optional> image, - @JsonProperty("UltraBlurColors") Optional ultraBlurColors, - @JsonProperty("Guid") Optional> guids, - @JsonProperty("Media") Optional> media, - @JsonProperty("Genre") Optional> genre, - @JsonProperty("Country") Optional> country, - @JsonProperty("Director") Optional> director, - @JsonProperty("Writer") Optional> writer, - @JsonProperty("Role") Optional> role, - @JsonProperty("Collection") Optional> collection) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(slug, "slug"); - Utils.checkNotNull(studio, "studio"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(titleSort, "titleSort"); - Utils.checkNotNull(contentRating, "contentRating"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(rating, "rating"); - Utils.checkNotNull(audienceRating, "audienceRating"); - Utils.checkNotNull(year, "year"); - Utils.checkNotNull(tagline, "tagline"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(theme, "theme"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - Utils.checkNotNull(childCount, "childCount"); - Utils.checkNotNull(seasonCount, "seasonCount"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - Utils.checkNotNull(chapterSource, "chapterSource"); - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - Utils.checkNotNull(originalTitle, "originalTitle"); - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - Utils.checkNotNull(parentGuid, "parentGuid"); - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - Utils.checkNotNull(grandparentKey, "grandparentKey"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - Utils.checkNotNull(grandparentArt, "grandparentArt"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(ratingImage, "ratingImage"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(viewOffset, "viewOffset"); - Utils.checkNotNull(skipCount, "skipCount"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(userRating, "userRating"); - Utils.checkNotNull(image, "image"); - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - Utils.checkNotNull(guids, "guids"); - Utils.checkNotNull(media, "media"); - Utils.checkNotNull(genre, "genre"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(director, "director"); - Utils.checkNotNull(writer, "writer"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(collection, "collection"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.slug = slug; - this.studio = studio; - this.type = type; - this.title = title; - this.titleSort = titleSort; - 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.theme = theme; - this.index = index; - this.leafCount = leafCount; - this.viewedLeafCount = viewedLeafCount; - this.childCount = childCount; - this.seasonCount = seasonCount; - this.duration = duration; - this.originallyAvailableAt = originallyAvailableAt; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - this.audienceRatingImage = audienceRatingImage; - this.chapterSource = chapterSource; - this.primaryExtraKey = primaryExtraKey; - this.originalTitle = originalTitle; - this.parentRatingKey = parentRatingKey; - this.grandparentRatingKey = grandparentRatingKey; - this.parentGuid = parentGuid; - this.grandparentGuid = grandparentGuid; - this.grandparentSlug = grandparentSlug; - this.grandparentKey = grandparentKey; - this.parentKey = parentKey; - this.grandparentTitle = grandparentTitle; - this.grandparentThumb = grandparentThumb; - this.grandparentTheme = grandparentTheme; - this.grandparentArt = grandparentArt; - this.parentTitle = parentTitle; - this.parentIndex = parentIndex; - this.parentThumb = parentThumb; - this.ratingImage = ratingImage; - this.viewCount = viewCount; - this.viewOffset = viewOffset; - this.skipCount = skipCount; - this.subtype = subtype; - this.lastRatedAt = lastRatedAt; - this.createdAtAccuracy = createdAtAccuracy; - this.createdAtTZOffset = createdAtTZOffset; - this.lastViewedAt = lastViewedAt; - this.userRating = userRating; - this.image = image; - this.ultraBlurColors = ultraBlurColors; - this.guids = guids; - this.media = media; - this.genre = genre; - this.country = country; - this.director = director; - this.writer = writer; - this.role = role; - this.collection = collection; - } - - public GetLibrarySectionsAllMetadata( - String ratingKey, - String key, - String guid, - String slug, - GetLibrarySectionsAllLibraryType type, - String title, - String titleSort, - String summary, - float rating, - double audienceRating, - String tagline, - String thumb, - String art, - String theme, - int index, - int childCount, - int seasonCount, - int duration, - long addedAt) { - this(ratingKey, key, guid, - slug, Optional.empty(), type, - title, titleSort, Optional.empty(), - summary, rating, audienceRating, - Optional.empty(), tagline, thumb, - art, theme, index, - Optional.empty(), Optional.empty(), childCount, - seasonCount, duration, Optional.empty(), - addedAt, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - @JsonIgnore - public String ratingKey() { - return ratingKey; - } - - /** - * The unique key for the media item. - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The globally unique identifier for the media item. - */ - @JsonIgnore - public String guid() { - return guid; - } - - /** - * A URL‐friendly version of the media title. - */ - @JsonIgnore - public String slug() { - return slug; - } - - /** - * The studio that produced the media item. - */ - @JsonIgnore - public Optional studio() { - return studio; - } - - @JsonIgnore - public GetLibrarySectionsAllLibraryType type() { - return type; - } - - /** - * The title of the media item. - */ - @JsonIgnore - public String title() { - return title; - } - - /** - * The sort title used for ordering media items. - */ - @JsonIgnore - public String titleSort() { - return titleSort; - } - - /** - * The content rating for the media item. - */ - @JsonIgnore - public Optional contentRating() { - return contentRating; - } - - /** - * A synopsis of the media item. - */ - @JsonIgnore - public String summary() { - return summary; - } - - /** - * The critic rating for the media item. - */ - @JsonIgnore - public float rating() { - return rating; - } - - /** - * The audience rating for the media item. - */ - @JsonIgnore - public double audienceRating() { - return audienceRating; - } - - /** - * The release year of the media item. - */ - @JsonIgnore - public Optional year() { - return year; - } - - /** - * A brief tagline for the media item. - */ - @JsonIgnore - public String tagline() { - return tagline; - } - - /** - * The thumbnail image URL for the media item. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The art image URL for the media item. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * The theme URL for the media item. - */ - @JsonIgnore - public String theme() { - return theme; - } - - /** - * The index position of the media item. - */ - @JsonIgnore - public int index() { - return index; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - /** - * The number of leaf items that have been viewed. - */ - @JsonIgnore - public Optional viewedLeafCount() { - return viewedLeafCount; - } - - /** - * The number of child items associated with this media item. - */ - @JsonIgnore - public int childCount() { - return childCount; - } - - /** - * The total number of seasons (for TV shows). - */ - @JsonIgnore - public int seasonCount() { - return seasonCount; - } - - /** - * The duration of the media item in milliseconds. - */ - @JsonIgnore - public int duration() { - return duration; - } - - /** - * The original release date of the media item. - */ - @JsonIgnore - public Optional originallyAvailableAt() { - return originallyAvailableAt; - } - - @JsonIgnore - public long addedAt() { - return addedAt; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - /** - * The URL for the audience rating image. - */ - @JsonIgnore - public Optional audienceRatingImage() { - return audienceRatingImage; - } - - /** - * The source from which chapter data is derived. - */ - @JsonIgnore - public Optional chapterSource() { - return chapterSource; - } - - /** - * The primary extra key associated with this media item. - */ - @JsonIgnore - public Optional primaryExtraKey() { - return primaryExtraKey; - } - - /** - * The original title of the media item (if different). - */ - @JsonIgnore - public Optional originalTitle() { - return originalTitle; - } - - /** - * The rating key of the parent media item. - */ - @JsonIgnore - public Optional parentRatingKey() { - return parentRatingKey; - } - - /** - * The rating key of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentRatingKey() { - return grandparentRatingKey; - } - - /** - * The GUID of the parent media item. - */ - @JsonIgnore - public Optional parentGuid() { - return parentGuid; - } - - /** - * The GUID of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentGuid() { - return grandparentGuid; - } - - /** - * The slug for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentSlug() { - return grandparentSlug; - } - - /** - * The key of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentKey() { - return grandparentKey; - } - - /** - * The key of the parent media item. - */ - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - /** - * The title of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentTitle() { - return grandparentTitle; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentThumb() { - return grandparentThumb; - } - - /** - * The theme URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentTheme() { - return grandparentTheme; - } - - /** - * The art URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentArt() { - return grandparentArt; - } - - /** - * The title of the parent media item. - */ - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - /** - * The index position of the parent media item. - */ - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - /** - * The thumbnail URL for the parent media item. - */ - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - /** - * The URL for the rating image. - */ - @JsonIgnore - public Optional ratingImage() { - return ratingImage; - } - - /** - * The number of times this media item has been viewed. - */ - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - /** - * The current playback offset (in milliseconds). - */ - @JsonIgnore - public Optional viewOffset() { - return viewOffset; - } - - /** - * The number of times this media item has been skipped. - */ - @JsonIgnore - public Optional skipCount() { - return skipCount; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - @JsonIgnore - public Optional subtype() { - return subtype; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - @JsonIgnore - public Optional lastRatedAt() { - return lastRatedAt; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - @JsonIgnore - public Optional createdAtAccuracy() { - return createdAtAccuracy; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - @JsonIgnore - public Optional createdAtTZOffset() { - return createdAtTZOffset; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - @JsonIgnore - public Optional userRating() { - return userRating; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> image() { - return (Optional>) image; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional ultraBlurColors() { - return (Optional) ultraBlurColors; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> guids() { - return (Optional>) guids; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> media() { - return (Optional>) media; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> genre() { - return (Optional>) genre; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> country() { - return (Optional>) country; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> director() { - return (Optional>) director; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> writer() { - return (Optional>) writer; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> role() { - return (Optional>) role; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> collection() { - return (Optional>) collection; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - public GetLibrarySectionsAllMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * The unique key for the media item. - */ - public GetLibrarySectionsAllMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The globally unique identifier for the media item. - */ - public GetLibrarySectionsAllMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - /** - * A URL‐friendly version of the media title. - */ - public GetLibrarySectionsAllMetadata withSlug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - /** - * The studio that produced the media item. - */ - public GetLibrarySectionsAllMetadata withStudio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - - /** - * The studio that produced the media item. - */ - public GetLibrarySectionsAllMetadata withStudio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - public GetLibrarySectionsAllMetadata withType(GetLibrarySectionsAllLibraryType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The title of the media item. - */ - public GetLibrarySectionsAllMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * The sort title used for ordering media items. - */ - public GetLibrarySectionsAllMetadata withTitleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - /** - * The content rating for the media item. - */ - public GetLibrarySectionsAllMetadata withContentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - - /** - * The content rating for the media item. - */ - public GetLibrarySectionsAllMetadata withContentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - /** - * A synopsis of the media item. - */ - public GetLibrarySectionsAllMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - /** - * The critic rating for the media item. - */ - public GetLibrarySectionsAllMetadata withRating(float rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - /** - * The audience rating for the media item. - */ - public GetLibrarySectionsAllMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - /** - * The release year of the media item. - */ - public GetLibrarySectionsAllMetadata withYear(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - - /** - * The release year of the media item. - */ - public GetLibrarySectionsAllMetadata withYear(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - /** - * A brief tagline for the media item. - */ - public GetLibrarySectionsAllMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - /** - * The thumbnail image URL for the media item. - */ - public GetLibrarySectionsAllMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The art image URL for the media item. - */ - public GetLibrarySectionsAllMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * The theme URL for the media item. - */ - public GetLibrarySectionsAllMetadata withTheme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - /** - * The index position of the media item. - */ - public GetLibrarySectionsAllMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - public GetLibrarySectionsAllMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - /** - * The number of leaf items (end nodes) under this media item. - */ - public GetLibrarySectionsAllMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - /** - * The number of leaf items that have been viewed. - */ - public GetLibrarySectionsAllMetadata withViewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - - /** - * The number of leaf items that have been viewed. - */ - public GetLibrarySectionsAllMetadata withViewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - /** - * The number of child items associated with this media item. - */ - public GetLibrarySectionsAllMetadata withChildCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - /** - * The total number of seasons (for TV shows). - */ - public GetLibrarySectionsAllMetadata withSeasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - - /** - * The duration of the media item in milliseconds. - */ - public GetLibrarySectionsAllMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * The original release date of the media item. - */ - public GetLibrarySectionsAllMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - - /** - * The original release date of the media item. - */ - public GetLibrarySectionsAllMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - public GetLibrarySectionsAllMetadata withAddedAt(long addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public GetLibrarySectionsAllMetadata withUpdatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public GetLibrarySectionsAllMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - /** - * The URL for the audience rating image. - */ - public GetLibrarySectionsAllMetadata withAudienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - - /** - * The URL for the audience rating image. - */ - public GetLibrarySectionsAllMetadata withAudienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - /** - * The source from which chapter data is derived. - */ - public GetLibrarySectionsAllMetadata withChapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - - /** - * The source from which chapter data is derived. - */ - public GetLibrarySectionsAllMetadata withChapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - /** - * The primary extra key associated with this media item. - */ - public GetLibrarySectionsAllMetadata withPrimaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - - /** - * The primary extra key associated with this media item. - */ - public GetLibrarySectionsAllMetadata withPrimaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - /** - * The original title of the media item (if different). - */ - public GetLibrarySectionsAllMetadata withOriginalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - - /** - * The original title of the media item (if different). - */ - public GetLibrarySectionsAllMetadata withOriginalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - /** - * The rating key of the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - - /** - * The rating key of the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - /** - * The rating key of the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - - /** - * The rating key of the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - /** - * The GUID of the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - - /** - * The GUID of the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - /** - * The GUID of the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - - /** - * The GUID of the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - /** - * The slug for the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentSlug(String grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = Optional.ofNullable(grandparentSlug); - return this; - } - - - /** - * The slug for the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentSlug(Optional grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = grandparentSlug; - return this; - } - - /** - * The key of the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - - /** - * The key of the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - /** - * The key of the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - - /** - * The key of the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - /** - * The title of the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - - /** - * The title of the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - - /** - * The thumbnail URL for the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - /** - * The theme URL for the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentTheme(String grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = Optional.ofNullable(grandparentTheme); - return this; - } - - - /** - * The theme URL for the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentTheme(Optional grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = grandparentTheme; - return this; - } - - /** - * The art URL for the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - - /** - * The art URL for the grandparent media item. - */ - public GetLibrarySectionsAllMetadata withGrandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - /** - * The title of the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - - /** - * The title of the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - /** - * The index position of the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - - /** - * The index position of the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - /** - * The thumbnail URL for the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - - /** - * The thumbnail URL for the parent media item. - */ - public GetLibrarySectionsAllMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - /** - * The URL for the rating image. - */ - public GetLibrarySectionsAllMetadata withRatingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - - /** - * The URL for the rating image. - */ - public GetLibrarySectionsAllMetadata withRatingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - /** - * The number of times this media item has been viewed. - */ - public GetLibrarySectionsAllMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - - /** - * The number of times this media item has been viewed. - */ - public GetLibrarySectionsAllMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - /** - * The current playback offset (in milliseconds). - */ - public GetLibrarySectionsAllMetadata withViewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - - /** - * The current playback offset (in milliseconds). - */ - public GetLibrarySectionsAllMetadata withViewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - /** - * The number of times this media item has been skipped. - */ - public GetLibrarySectionsAllMetadata withSkipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - - /** - * The number of times this media item has been skipped. - */ - public GetLibrarySectionsAllMetadata withSkipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public GetLibrarySectionsAllMetadata withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public GetLibrarySectionsAllMetadata withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public GetLibrarySectionsAllMetadata withLastRatedAt(long lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public GetLibrarySectionsAllMetadata withLastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public GetLibrarySectionsAllMetadata withCreatedAtAccuracy(String createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); - return this; - } - - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public GetLibrarySectionsAllMetadata withCreatedAtAccuracy(Optional createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = createdAtAccuracy; - return this; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public GetLibrarySectionsAllMetadata withCreatedAtTZOffset(String createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); - return this; - } - - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public GetLibrarySectionsAllMetadata withCreatedAtTZOffset(Optional createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = createdAtTZOffset; - return this; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - public GetLibrarySectionsAllMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - - /** - * Unix timestamp for when the media item was last viewed. - */ - public GetLibrarySectionsAllMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public GetLibrarySectionsAllMetadata withUserRating(float userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public GetLibrarySectionsAllMetadata withUserRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - public GetLibrarySectionsAllMetadata withImage(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - - public GetLibrarySectionsAllMetadata withImage(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - public GetLibrarySectionsAllMetadata withUltraBlurColors(GetLibrarySectionsAllUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); - return this; - } - - - public GetLibrarySectionsAllMetadata withUltraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; - return this; - } - - public GetLibrarySectionsAllMetadata withGuids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - - public GetLibrarySectionsAllMetadata withGuids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - public GetLibrarySectionsAllMetadata withMedia(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - - public GetLibrarySectionsAllMetadata withMedia(Optional> media) { - Utils.checkNotNull(media, "media"); - this.media = media; - return this; - } - - public GetLibrarySectionsAllMetadata withGenre(List genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = Optional.ofNullable(genre); - return this; - } - - - public GetLibrarySectionsAllMetadata withGenre(Optional> genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = genre; - return this; - } - - public GetLibrarySectionsAllMetadata withCountry(List country) { - Utils.checkNotNull(country, "country"); - this.country = Optional.ofNullable(country); - return this; - } - - - public GetLibrarySectionsAllMetadata withCountry(Optional> country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - public GetLibrarySectionsAllMetadata withDirector(List director) { - Utils.checkNotNull(director, "director"); - this.director = Optional.ofNullable(director); - return this; - } - - - public GetLibrarySectionsAllMetadata withDirector(Optional> director) { - Utils.checkNotNull(director, "director"); - this.director = director; - return this; - } - - public GetLibrarySectionsAllMetadata withWriter(List writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = Optional.ofNullable(writer); - return this; - } - - - public GetLibrarySectionsAllMetadata withWriter(Optional> writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = writer; - return this; - } - - public GetLibrarySectionsAllMetadata withRole(List role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - public GetLibrarySectionsAllMetadata withRole(Optional> role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - public GetLibrarySectionsAllMetadata withCollection(List collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = Optional.ofNullable(collection); - return this; - } - - - public GetLibrarySectionsAllMetadata withCollection(Optional> collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = collection; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllMetadata other = (GetLibrarySectionsAllMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.slug, other.slug) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.rating, other.rating) && - Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.theme, other.theme) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && - Utils.enhancedDeepEquals(this.childCount, other.childCount) && - Utils.enhancedDeepEquals(this.seasonCount, other.seasonCount) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && - Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && - Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && - Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && - Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && - Utils.enhancedDeepEquals(this.parentGuid, other.parentGuid) && - Utils.enhancedDeepEquals(this.grandparentGuid, other.grandparentGuid) && - Utils.enhancedDeepEquals(this.grandparentSlug, other.grandparentSlug) && - Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && - Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && - Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && - Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && - Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && - Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && - Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && - Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && - Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && - Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && - Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && - Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && - Utils.enhancedDeepEquals(this.skipCount, other.skipCount) && - Utils.enhancedDeepEquals(this.subtype, other.subtype) && - Utils.enhancedDeepEquals(this.lastRatedAt, other.lastRatedAt) && - Utils.enhancedDeepEquals(this.createdAtAccuracy, other.createdAtAccuracy) && - Utils.enhancedDeepEquals(this.createdAtTZOffset, other.createdAtTZOffset) && - Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && - Utils.enhancedDeepEquals(this.userRating, other.userRating) && - Utils.enhancedDeepEquals(this.image, other.image) && - Utils.enhancedDeepEquals(this.ultraBlurColors, other.ultraBlurColors) && - Utils.enhancedDeepEquals(this.guids, other.guids) && - Utils.enhancedDeepEquals(this.media, other.media) && - Utils.enhancedDeepEquals(this.genre, other.genre) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.director, other.director) && - Utils.enhancedDeepEquals(this.writer, other.writer) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.collection, other.collection); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - slug, studio, type, - title, titleSort, contentRating, - summary, rating, audienceRating, - year, tagline, thumb, - art, theme, index, - leafCount, viewedLeafCount, childCount, - seasonCount, duration, originallyAvailableAt, - addedAt, updatedAt, audienceRatingImage, - chapterSource, primaryExtraKey, originalTitle, - parentRatingKey, grandparentRatingKey, parentGuid, - grandparentGuid, grandparentSlug, grandparentKey, - parentKey, grandparentTitle, grandparentThumb, - grandparentTheme, grandparentArt, parentTitle, - parentIndex, parentThumb, ratingImage, - viewCount, viewOffset, skipCount, - subtype, lastRatedAt, createdAtAccuracy, - createdAtTZOffset, lastViewedAt, userRating, - image, ultraBlurColors, guids, - media, genre, country, - director, writer, role, - collection); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "slug", slug, - "studio", studio, - "type", type, - "title", title, - "titleSort", titleSort, - "contentRating", contentRating, - "summary", summary, - "rating", rating, - "audienceRating", audienceRating, - "year", year, - "tagline", tagline, - "thumb", thumb, - "art", art, - "theme", theme, - "index", index, - "leafCount", leafCount, - "viewedLeafCount", viewedLeafCount, - "childCount", childCount, - "seasonCount", seasonCount, - "duration", duration, - "originallyAvailableAt", originallyAvailableAt, - "addedAt", addedAt, - "updatedAt", updatedAt, - "audienceRatingImage", audienceRatingImage, - "chapterSource", chapterSource, - "primaryExtraKey", primaryExtraKey, - "originalTitle", originalTitle, - "parentRatingKey", parentRatingKey, - "grandparentRatingKey", grandparentRatingKey, - "parentGuid", parentGuid, - "grandparentGuid", grandparentGuid, - "grandparentSlug", grandparentSlug, - "grandparentKey", grandparentKey, - "parentKey", parentKey, - "grandparentTitle", grandparentTitle, - "grandparentThumb", grandparentThumb, - "grandparentTheme", grandparentTheme, - "grandparentArt", grandparentArt, - "parentTitle", parentTitle, - "parentIndex", parentIndex, - "parentThumb", parentThumb, - "ratingImage", ratingImage, - "viewCount", viewCount, - "viewOffset", viewOffset, - "skipCount", skipCount, - "subtype", subtype, - "lastRatedAt", lastRatedAt, - "createdAtAccuracy", createdAtAccuracy, - "createdAtTZOffset", createdAtTZOffset, - "lastViewedAt", lastViewedAt, - "userRating", userRating, - "image", image, - "ultraBlurColors", ultraBlurColors, - "guids", guids, - "media", media, - "genre", genre, - "country", country, - "director", director, - "writer", writer, - "role", role, - "collection", collection); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String ratingKey; - - private String key; - - private String guid; - - private String slug; - - private Optional studio = Optional.empty(); - - private GetLibrarySectionsAllLibraryType type; - - private String title; - - private String titleSort; - - private Optional contentRating = Optional.empty(); - - private String summary; - - private Float rating; - - private Double audienceRating; - - private Optional year = Optional.empty(); - - private String tagline; - - private String thumb; - - private String art; - - private String theme; - - private Integer index; - - private Optional leafCount = Optional.empty(); - - private Optional viewedLeafCount = Optional.empty(); - - private Integer childCount; - - private Integer seasonCount; - - private Integer duration; - - private Optional originallyAvailableAt = Optional.empty(); - - private Long addedAt; - - private Optional updatedAt = Optional.empty(); - - private Optional audienceRatingImage = Optional.empty(); - - private Optional chapterSource = Optional.empty(); - - private Optional primaryExtraKey = Optional.empty(); - - private Optional originalTitle = Optional.empty(); - - private Optional parentRatingKey = Optional.empty(); - - private Optional grandparentRatingKey = Optional.empty(); - - private Optional parentGuid = Optional.empty(); - - private Optional grandparentGuid = Optional.empty(); - - private Optional grandparentSlug = Optional.empty(); - - private Optional grandparentKey = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional grandparentTitle = Optional.empty(); - - private Optional grandparentThumb = Optional.empty(); - - private Optional grandparentTheme = Optional.empty(); - - private Optional grandparentArt = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional parentThumb = Optional.empty(); - - private Optional ratingImage = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional viewOffset = Optional.empty(); - - private Optional skipCount = Optional.empty(); - - private Optional subtype = Optional.empty(); - - private Optional lastRatedAt = Optional.empty(); - - private Optional createdAtAccuracy = Optional.empty(); - - private Optional createdAtTZOffset = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional userRating = Optional.empty(); - - private Optional> image = Optional.empty(); - - private Optional ultraBlurColors = Optional.empty(); - - private Optional> guids = Optional.empty(); - - private Optional> 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> role = Optional.empty(); - - private Optional> collection = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - public Builder ratingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * The unique key for the media item. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The globally unique identifier for the media item. - */ - public Builder guid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - - /** - * A URL‐friendly version of the media title. - */ - public Builder slug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - - /** - * The studio that produced the media item. - */ - public Builder studio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - /** - * The studio that produced the media item. - */ - public Builder studio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - - public Builder type(GetLibrarySectionsAllLibraryType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The title of the media item. - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - /** - * The sort title used for ordering media items. - */ - public Builder titleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - - /** - * The content rating for the media item. - */ - public Builder contentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - /** - * The content rating for the media item. - */ - public Builder contentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - - /** - * A synopsis of the media item. - */ - public Builder summary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - - /** - * The critic rating for the media item. - */ - public Builder rating(float rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - - /** - * The audience rating for the media item. - */ - public Builder audienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - - /** - * The release year of the media item. - */ - public Builder year(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - /** - * The release year of the media item. - */ - public Builder year(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - - /** - * A brief tagline for the media item. - */ - public Builder tagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - - /** - * The thumbnail image URL for the media item. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The art image URL for the media item. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * The theme URL for the media item. - */ - public Builder theme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - - /** - * The index position of the media item. - */ - public Builder index(int index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - - /** - * The number of leaf items (end nodes) under this media item. - */ - public Builder leafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - public Builder leafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - - /** - * The number of leaf items that have been viewed. - */ - public Builder viewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - /** - * The number of leaf items that have been viewed. - */ - public Builder viewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - - /** - * The number of child items associated with this media item. - */ - public Builder childCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - - /** - * The total number of seasons (for TV shows). - */ - public Builder seasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - - - /** - * The duration of the media item in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * The original release date of the media item. - */ - public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - /** - * The original release date of the media item. - */ - public Builder originallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - - public Builder addedAt(long addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - - /** - * The URL for the audience rating image. - */ - public Builder audienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - /** - * The URL for the audience rating image. - */ - public Builder audienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - - /** - * The source from which chapter data is derived. - */ - public Builder chapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - /** - * The source from which chapter data is derived. - */ - public Builder chapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - - /** - * The primary extra key associated with this media item. - */ - public Builder primaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - /** - * The primary extra key associated with this media item. - */ - public Builder primaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - - /** - * The original title of the media item (if different). - */ - public Builder originalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - /** - * The original title of the media item (if different). - */ - public Builder originalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - - /** - * The rating key of the parent media item. - */ - public Builder parentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - /** - * The rating key of the parent media item. - */ - public Builder parentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - - /** - * The rating key of the grandparent media item. - */ - public Builder grandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - /** - * The rating key of the grandparent media item. - */ - public Builder grandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - - /** - * The GUID of the parent media item. - */ - public Builder parentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - /** - * The GUID of the parent media item. - */ - public Builder parentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - - /** - * The GUID of the grandparent media item. - */ - public Builder grandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - /** - * The GUID of the grandparent media item. - */ - public Builder grandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - - /** - * The slug for the grandparent media item. - */ - public Builder grandparentSlug(String grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = Optional.ofNullable(grandparentSlug); - return this; - } - - /** - * The slug for the grandparent media item. - */ - public Builder grandparentSlug(Optional grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = grandparentSlug; - return this; - } - - - /** - * The key of the grandparent media item. - */ - public Builder grandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - /** - * The key of the grandparent media item. - */ - public Builder grandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - - /** - * The key of the parent media item. - */ - public Builder parentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - /** - * The key of the parent media item. - */ - public Builder parentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - - /** - * The title of the grandparent media item. - */ - public Builder grandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - /** - * The title of the grandparent media item. - */ - public Builder grandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - - /** - * The thumbnail URL for the grandparent media item. - */ - public Builder grandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - public Builder grandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - - /** - * The theme URL for the grandparent media item. - */ - public Builder grandparentTheme(String grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = Optional.ofNullable(grandparentTheme); - return this; - } - - /** - * The theme URL for the grandparent media item. - */ - public Builder grandparentTheme(Optional grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = grandparentTheme; - return this; - } - - - /** - * The art URL for the grandparent media item. - */ - public Builder grandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - /** - * The art URL for the grandparent media item. - */ - public Builder grandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - - /** - * The title of the parent media item. - */ - public Builder parentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - /** - * The title of the parent media item. - */ - public Builder parentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - - /** - * The index position of the parent media item. - */ - public Builder parentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - /** - * The index position of the parent media item. - */ - public Builder parentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - - /** - * The thumbnail URL for the parent media item. - */ - public Builder parentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - /** - * The thumbnail URL for the parent media item. - */ - public Builder parentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - - /** - * The URL for the rating image. - */ - public Builder ratingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - /** - * The URL for the rating image. - */ - public Builder ratingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - - /** - * The number of times this media item has been viewed. - */ - public Builder viewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - /** - * The number of times this media item has been viewed. - */ - public Builder viewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - - /** - * The current playback offset (in milliseconds). - */ - public Builder viewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - /** - * The current playback offset (in milliseconds). - */ - public Builder viewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - - /** - * The number of times this media item has been skipped. - */ - public Builder skipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - /** - * The number of times this media item has been skipped. - */ - public Builder skipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public Builder subtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public Builder subtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public Builder lastRatedAt(long lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public Builder lastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public Builder createdAtAccuracy(String createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); - return this; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public Builder createdAtAccuracy(Optional createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = createdAtAccuracy; - return this; - } - - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public Builder createdAtTZOffset(String createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); - return this; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public Builder createdAtTZOffset(Optional createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = createdAtTZOffset; - return this; - } - - - /** - * Unix timestamp for when the media item was last viewed. - */ - public Builder lastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - public Builder lastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public Builder userRating(float userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public Builder userRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - - public Builder image(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - public Builder image(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - - public Builder ultraBlurColors(GetLibrarySectionsAllUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); - return this; - } - - public Builder ultraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; - return this; - } - - - public Builder guids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - public Builder guids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - - 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 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); - 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 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 Builder collection(List collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = Optional.ofNullable(collection); - return this; - } - - public Builder collection(Optional> collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = collection; - return this; - } - - public GetLibrarySectionsAllMetadata build() { - - return new GetLibrarySectionsAllMetadata( - ratingKey, key, guid, - slug, studio, type, - title, titleSort, contentRating, - summary, rating, audienceRating, - year, tagline, thumb, - art, theme, index, - leafCount, viewedLeafCount, childCount, - seasonCount, duration, originallyAvailableAt, - addedAt, updatedAt, audienceRatingImage, - chapterSource, primaryExtraKey, originalTitle, - parentRatingKey, grandparentRatingKey, parentGuid, - grandparentGuid, grandparentSlug, grandparentKey, - parentKey, grandparentTitle, grandparentThumb, - grandparentTheme, grandparentArt, parentTitle, - parentIndex, parentThumb, ratingImage, - viewCount, viewOffset, skipCount, - subtype, lastRatedAt, createdAtAccuracy, - createdAtTZOffset, lastViewedAt, userRating, - image, ultraBlurColors, guids, - media, genre, country, - director, writer, role, - collection); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOperator.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOperator.java deleted file mode 100644 index 9c34a7ce..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOperator.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibrarySectionsAllOperator { - - @JsonProperty("key") - private String key; - - - @JsonProperty("title") - private String title; - - @JsonCreator - public GetLibrarySectionsAllOperator( - @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 static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllOperator withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibrarySectionsAllOperator 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; - } - GetLibrarySectionsAllOperator other = (GetLibrarySectionsAllOperator) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllOperator.class, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibrarySectionsAllOperator build() { - - return new GetLibrarySectionsAllOperator( - key, title); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming.java deleted file mode 100644 index aacd0f55..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming.java +++ /dev/null @@ -1,100 +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.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; - -/** - * GetLibrarySectionsAllOptimizedForStreaming - * - *

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

    - *
  • {@code dev.plexapi.sdk.models.operations.GetLibrarySectionsAllOptimizedForStreaming1}
  • - *
  • {@code boolean}
  • - *
- * - *

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

-     * if (obj.value() instanceof String) {
-     *     String answer = (String) obj.value();
-     *     System.out.println("answer=" + answer);
-     * }
-     * 
- * - * @return value of oneOf type - **/ - public java.lang.Object value() { - return value.value(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllOptimizedForStreaming other = (GetLibrarySectionsAllOptimizedForStreaming) o; - return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); - } - - @Override - public int hashCode() { - return Utils.enhancedHash(value.value()); - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends OneOfDeserializer { - - public _Deserializer() { - super(GetLibrarySectionsAllOptimizedForStreaming.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); - } - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllOptimizedForStreaming.class, - "value", value); - } - -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming1.java deleted file mode 100644 index db74c24f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreaming1.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public enum GetLibrarySectionsAllOptimizedForStreaming1 { - ZERO(0), - ONE(1); - - @JsonValue - private final int value; - - GetLibrarySectionsAllOptimizedForStreaming1(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetLibrarySectionsAllOptimizedForStreaming1 o: GetLibrarySectionsAllOptimizedForStreaming1.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.java deleted file mode 100644 index 8f9e9afe..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllOptimizedForStreamingLibrary1.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public enum GetLibrarySectionsAllOptimizedForStreamingLibrary1 { - ZERO(0), - ONE(1); - - @JsonValue - private final int value; - - GetLibrarySectionsAllOptimizedForStreamingLibrary1(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetLibrarySectionsAllOptimizedForStreamingLibrary1 o: GetLibrarySectionsAllOptimizedForStreamingLibrary1.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllPart.java deleted file mode 100644 index 1b5aa40b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllPart.java +++ /dev/null @@ -1,918 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetLibrarySectionsAllPart { - /** - * Indicates if the part is accessible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("accessible") - private Optional accessible; - - /** - * Indicates if the part exists. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("exists") - private Optional exists; - - /** - * Unique part identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Key to access this part. - */ - @JsonProperty("key") - private String key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("indexes") - private Optional indexes; - - /** - * Duration of the part in milliseconds. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - /** - * File path for the part. - */ - @JsonProperty("file") - private String file; - - /** - * File size in bytes. - */ - @JsonProperty("size") - private long size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("packetLength") - private Optional packetLength; - - /** - * Container format of the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - /** - * Video profile for the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasThumbnail") - private Optional hasThumbnail; - - /** - * An array of streams for this part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Stream") - private Optional> stream; - - @JsonCreator - public GetLibrarySectionsAllPart( - @JsonProperty("accessible") Optional accessible, - @JsonProperty("exists") Optional exists, - @JsonProperty("id") long id, - @JsonProperty("key") String key, - @JsonProperty("indexes") Optional indexes, - @JsonProperty("duration") Optional duration, - @JsonProperty("file") String file, - @JsonProperty("size") long size, - @JsonProperty("packetLength") Optional packetLength, - @JsonProperty("container") Optional container, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("hasThumbnail") Optional hasThumbnail, - @JsonProperty("Stream") Optional> stream) { - Utils.checkNotNull(accessible, "accessible"); - Utils.checkNotNull(exists, "exists"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(indexes, "indexes"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(file, "file"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(packetLength, "packetLength"); - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(videoProfile, "videoProfile"); - Utils.checkNotNull(audioProfile, "audioProfile"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - Utils.checkNotNull(stream, "stream"); - this.accessible = accessible; - this.exists = exists; - this.id = id; - this.key = key; - this.indexes = indexes; - this.duration = duration; - this.file = file; - this.size = size; - this.packetLength = packetLength; - this.container = container; - this.videoProfile = videoProfile; - this.audioProfile = audioProfile; - this.has64bitOffsets = has64bitOffsets; - this.optimizedForStreaming = optimizedForStreaming; - this.hasThumbnail = hasThumbnail; - this.stream = stream; - } - - public GetLibrarySectionsAllPart( - long id, - String key, - String file, - long size) { - this(Optional.empty(), Optional.empty(), id, - key, Optional.empty(), Optional.empty(), - file, size, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Indicates if the part is accessible. - */ - @JsonIgnore - public Optional accessible() { - return accessible; - } - - /** - * Indicates if the part exists. - */ - @JsonIgnore - public Optional exists() { - return exists; - } - - /** - * Unique part identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Key to access this part. - */ - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public Optional indexes() { - return indexes; - } - - /** - * Duration of the part in milliseconds. - */ - @JsonIgnore - public Optional duration() { - return duration; - } - - /** - * File path for the part. - */ - @JsonIgnore - public String file() { - return file; - } - - /** - * File size in bytes. - */ - @JsonIgnore - public long size() { - return size; - } - - @JsonIgnore - public Optional packetLength() { - return packetLength; - } - - /** - * Container format of the part. - */ - @JsonIgnore - public Optional container() { - return container; - } - - /** - * Video profile for the part. - */ - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional optimizedForStreaming() { - return (Optional) optimizedForStreaming; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional hasThumbnail() { - return (Optional) hasThumbnail; - } - - /** - * An array of streams for this part. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> stream() { - return (Optional>) stream; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Indicates if the part is accessible. - */ - public GetLibrarySectionsAllPart withAccessible(boolean accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = Optional.ofNullable(accessible); - return this; - } - - - /** - * Indicates if the part is accessible. - */ - public GetLibrarySectionsAllPart withAccessible(Optional accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = accessible; - return this; - } - - /** - * Indicates if the part exists. - */ - public GetLibrarySectionsAllPart withExists(boolean exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = Optional.ofNullable(exists); - return this; - } - - - /** - * Indicates if the part exists. - */ - public GetLibrarySectionsAllPart withExists(Optional exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = exists; - return this; - } - - /** - * Unique part identifier. - */ - public GetLibrarySectionsAllPart withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Key to access this part. - */ - public GetLibrarySectionsAllPart withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibrarySectionsAllPart withIndexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - - public GetLibrarySectionsAllPart withIndexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - - /** - * Duration of the part in milliseconds. - */ - public GetLibrarySectionsAllPart withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - /** - * Duration of the part in milliseconds. - */ - public GetLibrarySectionsAllPart withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * File path for the part. - */ - public GetLibrarySectionsAllPart withFile(String file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - /** - * File size in bytes. - */ - public GetLibrarySectionsAllPart withSize(long size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetLibrarySectionsAllPart withPacketLength(int packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = Optional.ofNullable(packetLength); - return this; - } - - - public GetLibrarySectionsAllPart withPacketLength(Optional packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = packetLength; - return this; - } - - /** - * Container format of the part. - */ - public GetLibrarySectionsAllPart withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - /** - * Container format of the part. - */ - public GetLibrarySectionsAllPart withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - /** - * Video profile for the part. - */ - public GetLibrarySectionsAllPart withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - /** - * Video profile for the part. - */ - public GetLibrarySectionsAllPart withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetLibrarySectionsAllPart withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetLibrarySectionsAllPart withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - public GetLibrarySectionsAllPart withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - public GetLibrarySectionsAllPart withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetLibrarySectionsAllPart withOptimizedForStreaming(GetLibrarySectionsAllLibraryOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetLibrarySectionsAllPart withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - public GetLibrarySectionsAllPart withHasThumbnail(GetLibrarySectionsAllHasThumbnail hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = Optional.ofNullable(hasThumbnail); - return this; - } - - - public GetLibrarySectionsAllPart withHasThumbnail(Optional hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = hasThumbnail; - return this; - } - - /** - * An array of streams for this part. - */ - public GetLibrarySectionsAllPart withStream(List stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = Optional.ofNullable(stream); - return this; - } - - - /** - * An array of streams for this part. - */ - public GetLibrarySectionsAllPart withStream(Optional> stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = stream; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllPart other = (GetLibrarySectionsAllPart) o; - return - Utils.enhancedDeepEquals(this.accessible, other.accessible) && - Utils.enhancedDeepEquals(this.exists, other.exists) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.indexes, other.indexes) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.file, other.file) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.packetLength, other.packetLength) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.hasThumbnail, other.hasThumbnail) && - Utils.enhancedDeepEquals(this.stream, other.stream); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - accessible, exists, id, - key, indexes, duration, - file, size, packetLength, - container, videoProfile, audioProfile, - has64bitOffsets, optimizedForStreaming, hasThumbnail, - stream); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllPart.class, - "accessible", accessible, - "exists", exists, - "id", id, - "key", key, - "indexes", indexes, - "duration", duration, - "file", file, - "size", size, - "packetLength", packetLength, - "container", container, - "videoProfile", videoProfile, - "audioProfile", audioProfile, - "has64bitOffsets", has64bitOffsets, - "optimizedForStreaming", optimizedForStreaming, - "hasThumbnail", hasThumbnail, - "stream", stream); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional accessible = Optional.empty(); - - private Optional exists = Optional.empty(); - - private Long id; - - private String key; - - private Optional indexes = Optional.empty(); - - private Optional duration = Optional.empty(); - - private String file; - - private Long size; - - private Optional packetLength = Optional.empty(); - - private Optional container = Optional.empty(); - - private Optional videoProfile = Optional.empty(); - - private Optional audioProfile = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional hasThumbnail; - - private Optional> stream = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Indicates if the part is accessible. - */ - public Builder accessible(boolean accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = Optional.ofNullable(accessible); - return this; - } - - /** - * Indicates if the part is accessible. - */ - public Builder accessible(Optional accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = accessible; - return this; - } - - - /** - * Indicates if the part exists. - */ - public Builder exists(boolean exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = Optional.ofNullable(exists); - return this; - } - - /** - * Indicates if the part exists. - */ - public Builder exists(Optional exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = exists; - return this; - } - - - /** - * Unique part identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Key to access this part. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - public Builder indexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - public Builder indexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - - - /** - * Duration of the part in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - /** - * Duration of the part in milliseconds. - */ - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * File path for the part. - */ - public Builder file(String file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - - /** - * File size in bytes. - */ - public Builder size(long size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - public Builder packetLength(int packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = Optional.ofNullable(packetLength); - return this; - } - - public Builder packetLength(Optional packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = packetLength; - return this; - } - - - /** - * Container format of the part. - */ - public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - /** - * Container format of the part. - */ - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - - /** - * Video profile for the part. - */ - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - /** - * Video profile for the part. - */ - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - 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; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(GetLibrarySectionsAllLibraryOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - - public Builder hasThumbnail(GetLibrarySectionsAllHasThumbnail 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; - } - - - /** - * An array of streams for this part. - */ - public Builder stream(List stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = Optional.ofNullable(stream); - return this; - } - - /** - * An array of streams for this part. - */ - public Builder stream(Optional> stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = stream; - return this; - } - - public GetLibrarySectionsAllPart build() { - if (hasThumbnail == null) { - hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value(); - } - - return new GetLibrarySectionsAllPart( - accessible, exists, id, - key, indexes, duration, - file, size, packetLength, - container, videoProfile, audioProfile, - has64bitOffsets, optimizedForStreaming, 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/GetLibrarySectionsAllQueryParamIncludeMeta.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllQueryParamIncludeMeta.java deleted file mode 100644 index b4bca46f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllQueryParamIncludeMeta.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * GetLibrarySectionsAllQueryParamIncludeMeta - * - *

Adds the Meta object to the response - */ -public enum GetLibrarySectionsAllQueryParamIncludeMeta { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - GetLibrarySectionsAllQueryParamIncludeMeta(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetLibrarySectionsAllQueryParamIncludeMeta o: GetLibrarySectionsAllQueryParamIncludeMeta.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllQueryParamType.java deleted file mode 100644 index d67e9ca8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllQueryParamType.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ -@JsonDeserialize(using = GetLibrarySectionsAllQueryParamType._Deserializer.class) -@JsonSerialize(using = GetLibrarySectionsAllQueryParamType._Serializer.class) -public class GetLibrarySectionsAllQueryParamType { - - public static final GetLibrarySectionsAllQueryParamType Movie = new GetLibrarySectionsAllQueryParamType(1L); - public static final GetLibrarySectionsAllQueryParamType TvShow = new GetLibrarySectionsAllQueryParamType(2L); - public static final GetLibrarySectionsAllQueryParamType Season = new GetLibrarySectionsAllQueryParamType(3L); - public static final GetLibrarySectionsAllQueryParamType Episode = new GetLibrarySectionsAllQueryParamType(4L); - public static final GetLibrarySectionsAllQueryParamType Artist = new GetLibrarySectionsAllQueryParamType(5L); - public static final GetLibrarySectionsAllQueryParamType Album = new GetLibrarySectionsAllQueryParamType(6L); - public static final GetLibrarySectionsAllQueryParamType Track = new GetLibrarySectionsAllQueryParamType(7L); - public static final GetLibrarySectionsAllQueryParamType PhotoAlbum = new GetLibrarySectionsAllQueryParamType(8L); - public static final GetLibrarySectionsAllQueryParamType Photo = new GetLibrarySectionsAllQueryParamType(9L); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final long value; - - private GetLibrarySectionsAllQueryParamType(long value) { - this.value = value; - } - - /** - * Returns a GetLibrarySectionsAllQueryParamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetLibrarySectionsAllQueryParamType - */ - public static GetLibrarySectionsAllQueryParamType of(long value) { - synchronized (GetLibrarySectionsAllQueryParamType.class) { - return values.computeIfAbsent(value, v -> new GetLibrarySectionsAllQueryParamType(v)); - } - } - - public long value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetLibrarySectionsAllQueryParamType other = (GetLibrarySectionsAllQueryParamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetLibrarySectionsAllQueryParamType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetLibrarySectionsAllQueryParamType[] values() { - synchronized (GetLibrarySectionsAllQueryParamType.class) { - return values.values().toArray(new GetLibrarySectionsAllQueryParamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1L, Movie); - map.put(2L, TvShow); - map.put(3L, Season); - map.put(4L, Episode); - map.put(5L, Artist); - map.put(6L, Album); - map.put(7L, Track); - map.put(8L, PhotoAlbum); - map.put(9L, Photo); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1L, GetLibrarySectionsAllQueryParamTypeEnum.Movie); - map.put(2L, GetLibrarySectionsAllQueryParamTypeEnum.TvShow); - map.put(3L, GetLibrarySectionsAllQueryParamTypeEnum.Season); - map.put(4L, GetLibrarySectionsAllQueryParamTypeEnum.Episode); - map.put(5L, GetLibrarySectionsAllQueryParamTypeEnum.Artist); - map.put(6L, GetLibrarySectionsAllQueryParamTypeEnum.Album); - map.put(7L, GetLibrarySectionsAllQueryParamTypeEnum.Track); - map.put(8L, GetLibrarySectionsAllQueryParamTypeEnum.PhotoAlbum); - map.put(9L, GetLibrarySectionsAllQueryParamTypeEnum.Photo); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetLibrarySectionsAllQueryParamType.class); - } - - @Override - public void serialize(GetLibrarySectionsAllQueryParamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetLibrarySectionsAllQueryParamType.class); - } - - @Override - public GetLibrarySectionsAllQueryParamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - long v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetLibrarySectionsAllQueryParamType.of(v); - } - } - - public enum GetLibrarySectionsAllQueryParamTypeEnum { - - Movie(1L), - TvShow(2L), - Season(3L), - Episode(4L), - Artist(5L), - Album(6L), - Track(7L), - PhotoAlbum(8L), - Photo(9L),; - - private final long value; - - private GetLibrarySectionsAllQueryParamTypeEnum(long value) { - this.value = value; - } - - public long value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRequest.java deleted file mode 100644 index 4f1eabc4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRequest.java +++ /dev/null @@ -1,636 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.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.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetLibrarySectionsAllRequest { - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey") - private int sectionKey; - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private GetLibrarySectionsAllQueryParamType type; - - /** - * Adds the Meta object to the response - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta") - private Optional includeMeta; - - /** - * Adds the Guid object to the response - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids") - private Optional includeGuids; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeAdvanced") - private Optional includeAdvanced; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeCollections") - private Optional includeCollections; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeExternalMedia") - private Optional includeExternalMedia; - - /** - * 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 GetLibrarySectionsAllRequest( - int sectionKey, - GetLibrarySectionsAllQueryParamType type, - Optional includeMeta, - Optional includeGuids, - Optional includeAdvanced, - Optional includeCollections, - Optional includeExternalMedia, - Optional xPlexContainerStart, - Optional xPlexContainerSize) { - Utils.checkNotNull(sectionKey, "sectionKey"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(includeMeta, "includeMeta"); - Utils.checkNotNull(includeGuids, "includeGuids"); - Utils.checkNotNull(includeAdvanced, "includeAdvanced"); - Utils.checkNotNull(includeCollections, "includeCollections"); - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); - Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); - this.sectionKey = sectionKey; - this.type = type; - this.includeMeta = includeMeta; - this.includeGuids = includeGuids; - this.includeAdvanced = includeAdvanced; - this.includeCollections = includeCollections; - this.includeExternalMedia = includeExternalMedia; - this.xPlexContainerStart = xPlexContainerStart; - this.xPlexContainerSize = xPlexContainerSize; - } - - public GetLibrarySectionsAllRequest( - int sectionKey, - GetLibrarySectionsAllQueryParamType type) { - this(sectionKey, type, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @JsonIgnore - public int sectionKey() { - return sectionKey; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @JsonIgnore - public GetLibrarySectionsAllQueryParamType type() { - return type; - } - - /** - * Adds the Meta object to the response - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeMeta() { - return (Optional) includeMeta; - } - - /** - * Adds the Guid object to the response - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeGuids() { - return (Optional) includeGuids; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeAdvanced() { - return (Optional) includeAdvanced; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeCollections() { - return (Optional) includeCollections; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeExternalMedia() { - return (Optional) includeExternalMedia; - } - - /** - * 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 static Builder builder() { - return new Builder(); - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public GetLibrarySectionsAllRequest withSectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public GetLibrarySectionsAllRequest withType(GetLibrarySectionsAllQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * Adds the Meta object to the response - */ - public GetLibrarySectionsAllRequest withIncludeMeta(GetLibrarySectionsAllQueryParamIncludeMeta includeMeta) { - Utils.checkNotNull(includeMeta, "includeMeta"); - this.includeMeta = Optional.ofNullable(includeMeta); - return this; - } - - - /** - * Adds the Meta object to the response - */ - public GetLibrarySectionsAllRequest withIncludeMeta(Optional includeMeta) { - Utils.checkNotNull(includeMeta, "includeMeta"); - this.includeMeta = includeMeta; - return this; - } - - /** - * Adds the Guid object to the response - */ - public GetLibrarySectionsAllRequest withIncludeGuids(QueryParamIncludeGuids includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = Optional.ofNullable(includeGuids); - return this; - } - - - /** - * Adds the Guid object to the response - */ - public GetLibrarySectionsAllRequest withIncludeGuids(Optional includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = includeGuids; - return this; - } - - public GetLibrarySectionsAllRequest withIncludeAdvanced(IncludeAdvanced includeAdvanced) { - Utils.checkNotNull(includeAdvanced, "includeAdvanced"); - this.includeAdvanced = Optional.ofNullable(includeAdvanced); - return this; - } - - - public GetLibrarySectionsAllRequest withIncludeAdvanced(Optional includeAdvanced) { - Utils.checkNotNull(includeAdvanced, "includeAdvanced"); - this.includeAdvanced = includeAdvanced; - return this; - } - - public GetLibrarySectionsAllRequest withIncludeCollections(QueryParamIncludeCollections includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = Optional.ofNullable(includeCollections); - return this; - } - - - public GetLibrarySectionsAllRequest withIncludeCollections(Optional includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = includeCollections; - return this; - } - - public GetLibrarySectionsAllRequest withIncludeExternalMedia(QueryParamIncludeExternalMedia includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = Optional.ofNullable(includeExternalMedia); - return this; - } - - - public GetLibrarySectionsAllRequest withIncludeExternalMedia(Optional includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = includeExternalMedia; - 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 GetLibrarySectionsAllRequest 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 GetLibrarySectionsAllRequest 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 GetLibrarySectionsAllRequest 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 GetLibrarySectionsAllRequest 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; - } - GetLibrarySectionsAllRequest other = (GetLibrarySectionsAllRequest) o; - return - Utils.enhancedDeepEquals(this.sectionKey, other.sectionKey) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.includeMeta, other.includeMeta) && - Utils.enhancedDeepEquals(this.includeGuids, other.includeGuids) && - Utils.enhancedDeepEquals(this.includeAdvanced, other.includeAdvanced) && - Utils.enhancedDeepEquals(this.includeCollections, other.includeCollections) && - Utils.enhancedDeepEquals(this.includeExternalMedia, other.includeExternalMedia) && - Utils.enhancedDeepEquals(this.xPlexContainerStart, other.xPlexContainerStart) && - Utils.enhancedDeepEquals(this.xPlexContainerSize, other.xPlexContainerSize); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - sectionKey, type, includeMeta, - includeGuids, includeAdvanced, includeCollections, - includeExternalMedia, xPlexContainerStart, xPlexContainerSize); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllRequest.class, - "sectionKey", sectionKey, - "type", type, - "includeMeta", includeMeta, - "includeGuids", includeGuids, - "includeAdvanced", includeAdvanced, - "includeCollections", includeCollections, - "includeExternalMedia", includeExternalMedia, - "xPlexContainerStart", xPlexContainerStart, - "xPlexContainerSize", xPlexContainerSize); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer sectionKey; - - private GetLibrarySectionsAllQueryParamType type; - - private Optional includeMeta; - - private Optional includeGuids; - - private Optional includeAdvanced; - - private Optional includeCollections; - - private Optional includeExternalMedia; - - private Optional xPlexContainerStart; - - private Optional xPlexContainerSize; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public Builder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public Builder type(GetLibrarySectionsAllQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * Adds the Meta object to the response - */ - public Builder includeMeta(GetLibrarySectionsAllQueryParamIncludeMeta 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; - } - - - /** - * Adds the Guid object to the response - */ - public Builder includeGuids(QueryParamIncludeGuids includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = Optional.ofNullable(includeGuids); - return this; - } - - /** - * Adds the Guid object to the response - */ - public Builder includeGuids(Optional includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = includeGuids; - return this; - } - - - public Builder includeAdvanced(IncludeAdvanced includeAdvanced) { - Utils.checkNotNull(includeAdvanced, "includeAdvanced"); - this.includeAdvanced = Optional.ofNullable(includeAdvanced); - return this; - } - - public Builder includeAdvanced(Optional includeAdvanced) { - Utils.checkNotNull(includeAdvanced, "includeAdvanced"); - this.includeAdvanced = includeAdvanced; - return this; - } - - - public Builder includeCollections(QueryParamIncludeCollections includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = Optional.ofNullable(includeCollections); - return this; - } - - public Builder includeCollections(Optional includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = includeCollections; - return this; - } - - - public Builder includeExternalMedia(QueryParamIncludeExternalMedia includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = Optional.ofNullable(includeExternalMedia); - return this; - } - - public Builder includeExternalMedia(Optional includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = includeExternalMedia; - 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 GetLibrarySectionsAllRequest build() { - if (includeMeta == null) { - includeMeta = _SINGLETON_VALUE_IncludeMeta.value(); - } - if (includeGuids == null) { - includeGuids = _SINGLETON_VALUE_IncludeGuids.value(); - } - if (includeAdvanced == null) { - includeAdvanced = _SINGLETON_VALUE_IncludeAdvanced.value(); - } - if (includeCollections == null) { - includeCollections = _SINGLETON_VALUE_IncludeCollections.value(); - } - if (includeExternalMedia == null) { - includeExternalMedia = _SINGLETON_VALUE_IncludeExternalMedia.value(); - } - if (xPlexContainerStart == null) { - xPlexContainerStart = _SINGLETON_VALUE_XPlexContainerStart.value(); - } - if (xPlexContainerSize == null) { - xPlexContainerSize = _SINGLETON_VALUE_XPlexContainerSize.value(); - } - - return new GetLibrarySectionsAllRequest( - sectionKey, type, includeMeta, - includeGuids, includeAdvanced, includeCollections, - includeExternalMedia, xPlexContainerStart, xPlexContainerSize); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeMeta = - new LazySingletonValue<>( - "includeMeta", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeGuids = - new LazySingletonValue<>( - "includeGuids", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeAdvanced = - new LazySingletonValue<>( - "includeAdvanced", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeCollections = - new LazySingletonValue<>( - "includeCollections", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeExternalMedia = - new LazySingletonValue<>( - "includeExternalMedia", - "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/GetLibrarySectionsAllRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRequestBuilder.java deleted file mode 100644 index 0e587603..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRequestBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetLibrarySectionsAll; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; - -public class GetLibrarySectionsAllRequestBuilder { - - private GetLibrarySectionsAllRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetLibrarySectionsAllRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetLibrarySectionsAllRequestBuilder request(GetLibrarySectionsAllRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetLibrarySectionsAllResponse call() throws Exception { - - RequestOperation operation - = new GetLibrarySectionsAll.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllResponse.java deleted file mode 100644 index 54975d79..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetLibrarySectionsAllResponse 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; - - /** - * Successful response containing media container data. - */ - private Optional object; - - @JsonCreator - public GetLibrarySectionsAllResponse( - 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 GetLibrarySectionsAllResponse( - 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; - } - - /** - * Successful response containing media container data. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetLibrarySectionsAllResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetLibrarySectionsAllResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibrarySectionsAllResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response containing media container data. - */ - public GetLibrarySectionsAllResponse withObject(GetLibrarySectionsAllResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Successful response containing media container data. - */ - public GetLibrarySectionsAllResponse 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; - } - GetLibrarySectionsAllResponse other = (GetLibrarySectionsAllResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Successful response containing media container data. - */ - public Builder object(GetLibrarySectionsAllResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Successful response containing media container data. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetLibrarySectionsAllResponse build() { - - return new GetLibrarySectionsAllResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllResponseBody.java deleted file mode 100644 index 508fe7a5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetLibrarySectionsAllResponseBody - * - *

Successful response containing media container data. - */ -public class GetLibrarySectionsAllResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetLibrarySectionsAllResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetLibrarySectionsAllResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllResponseBody withMediaContainer(GetLibrarySectionsAllMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetLibrarySectionsAllResponseBody 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; - } - GetLibrarySectionsAllResponseBody other = (GetLibrarySectionsAllResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetLibrarySectionsAllMediaContainer 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 GetLibrarySectionsAllResponseBody build() { - - return new GetLibrarySectionsAllResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRole.java deleted file mode 100644 index d6ff30e2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllRole.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibrarySectionsAllRole { - /** - * The display tag for the actor (typically the actor's name). - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetLibrarySectionsAllRole( - @JsonProperty("tag") String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - /** - * The display tag for the actor (typically the actor's name). - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The display tag for the actor (typically the actor's name). - */ - public GetLibrarySectionsAllRole withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllRole other = (GetLibrarySectionsAllRole) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllRole.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The display tag for the actor (typically the actor's name). - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetLibrarySectionsAllRole build() { - - return new GetLibrarySectionsAllRole( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllSort.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllSort.java deleted file mode 100644 index a6c174a8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllSort.java +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetLibrarySectionsAllSort { - - @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 GetLibrarySectionsAllSort( - @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 GetLibrarySectionsAllSort( - 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 static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllSort withDefault(String default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - - public GetLibrarySectionsAllSort withDefault(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - public GetLibrarySectionsAllSort withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - - public GetLibrarySectionsAllSort withActive(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibrarySectionsAllSort withActiveDirection(GetLibrarySectionsAllActiveDirection activeDirection) { - Utils.checkNotNull(activeDirection, "activeDirection"); - this.activeDirection = Optional.ofNullable(activeDirection); - return this; - } - - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibrarySectionsAllSort withActiveDirection(Optional activeDirection) { - Utils.checkNotNull(activeDirection, "activeDirection"); - this.activeDirection = activeDirection; - return this; - } - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibrarySectionsAllSort withDefaultDirection(GetLibrarySectionsAllDefaultDirection defaultDirection) { - Utils.checkNotNull(defaultDirection, "defaultDirection"); - this.defaultDirection = Optional.ofNullable(defaultDirection); - return this; - } - - - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - public GetLibrarySectionsAllSort withDefaultDirection(Optional defaultDirection) { - Utils.checkNotNull(defaultDirection, "defaultDirection"); - this.defaultDirection = defaultDirection; - return this; - } - - public GetLibrarySectionsAllSort withDescKey(String descKey) { - Utils.checkNotNull(descKey, "descKey"); - this.descKey = Optional.ofNullable(descKey); - return this; - } - - - public GetLibrarySectionsAllSort withDescKey(Optional descKey) { - Utils.checkNotNull(descKey, "descKey"); - this.descKey = descKey; - return this; - } - - public GetLibrarySectionsAllSort withFirstCharacterKey(String firstCharacterKey) { - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); - return this; - } - - - public GetLibrarySectionsAllSort withFirstCharacterKey(Optional firstCharacterKey) { - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - this.firstCharacterKey = firstCharacterKey; - return this; - } - - public GetLibrarySectionsAllSort withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibrarySectionsAllSort 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; - } - GetLibrarySectionsAllSort other = (GetLibrarySectionsAllSort) o; - return - Utils.enhancedDeepEquals(this.default_, other.default_) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.activeDirection, other.activeDirection) && - Utils.enhancedDeepEquals(this.defaultDirection, other.defaultDirection) && - Utils.enhancedDeepEquals(this.descKey, other.descKey) && - Utils.enhancedDeepEquals(this.firstCharacterKey, other.firstCharacterKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - default_, active, activeDirection, - defaultDirection, descKey, firstCharacterKey, - key, title); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllSort.class, - "default_", default_, - "active", active, - "activeDirection", activeDirection, - "defaultDirection", defaultDirection, - "descKey", descKey, - "firstCharacterKey", firstCharacterKey, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - 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(GetLibrarySectionsAllActiveDirection 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(GetLibrarySectionsAllDefaultDirection 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 GetLibrarySectionsAllSort build() { - if (activeDirection == null) { - activeDirection = _SINGLETON_VALUE_ActiveDirection.value(); - } - if (defaultDirection == null) { - defaultDirection = _SINGLETON_VALUE_DefaultDirection.value(); - } - - return new GetLibrarySectionsAllSort( - 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/GetLibrarySectionsAllStream.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStream.java deleted file mode 100644 index 47d4e674..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllStream.java +++ /dev/null @@ -1,2990 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Float; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetLibrarySectionsAllStream { - /** - * Unique stream identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Stream type: - * - VIDEO = 1 - * - AUDIO = 2 - * - SUBTITLE = 3 - */ - @JsonProperty("streamType") - private long streamType; - - /** - * Format of the stream (e.g., srt). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("format") - private Optional format; - - /** - * Indicates if this stream is default. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("default") - private Optional default_; - - /** - * Codec used by the stream. - */ - @JsonProperty("codec") - private String codec; - - /** - * Index of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - /** - * Bitrate of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - /** - * Language of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("language") - private Optional language; - - /** - * Language tag (e.g., en). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("languageTag") - private Optional languageTag; - - /** - * ISO language code. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("languageCode") - private Optional languageCode; - - /** - * Indicates whether header compression is enabled. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("headerCompression") - private Optional headerCompression; - - /** - * Dolby Vision BL compatibility ID. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIBLCompatID") - private Optional doviblCompatID; - - /** - * Indicates if Dolby Vision BL is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIBLPresent") - private Optional doviblPresent; - - /** - * Indicates if Dolby Vision EL is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIELPresent") - private Optional dovielPresent; - - /** - * Dolby Vision level. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVILevel") - private Optional doviLevel; - - /** - * Indicates if Dolby Vision is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIPresent") - private Optional doviPresent; - - /** - * Dolby Vision profile. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIProfile") - private Optional doviProfile; - - /** - * Indicates if Dolby Vision RPU is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIRPUPresent") - private Optional dovirpuPresent; - - /** - * Dolby Vision version. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIVersion") - private Optional doviVersion; - - /** - * Bit depth of the video stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitDepth") - private Optional bitDepth; - - /** - * Chroma sample location. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaLocation") - private Optional chromaLocation; - - /** - * Chroma subsampling format. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaSubsampling") - private Optional chromaSubsampling; - - /** - * Coded video height. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedHeight") - private Optional codedHeight; - - /** - * Coded video width. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedWidth") - private Optional codedWidth; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("closedCaptions") - private Optional closedCaptions; - - /** - * Color primaries used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorPrimaries") - private Optional colorPrimaries; - - /** - * Color range (e.g., tv). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorRange") - private Optional colorRange; - - /** - * Color space. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorSpace") - private Optional colorSpace; - - /** - * Color transfer characteristics. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorTrc") - private Optional colorTrc; - - /** - * Frame rate of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("frameRate") - private Optional frameRate; - - /** - * Key to access this stream part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - /** - * Height of the video stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("height") - private Optional height; - - /** - * Video level. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("level") - private Optional level; - - /** - * Indicates if this is the original stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("original") - private Optional original; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasScalingMatrix") - private Optional hasScalingMatrix; - - /** - * Video profile. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("profile") - private Optional profile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("scanType") - private Optional scanType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("embeddedInVideo") - private Optional embeddedInVideo; - - /** - * Number of reference frames. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("refFrames") - private Optional refFrames; - - /** - * Width of the video stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("width") - private Optional width; - - /** - * Display title for the stream. - */ - @JsonProperty("displayTitle") - private String displayTitle; - - /** - * Extended display title for the stream. - */ - @JsonProperty("extendedDisplayTitle") - private String extendedDisplayTitle; - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("selected") - private Optional selected; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("forced") - private Optional forced; - - /** - * Number of audio channels (for audio streams). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("channels") - private Optional channels; - - /** - * Audio channel layout. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannelLayout") - private Optional audioChannelLayout; - - /** - * Sampling rate for the audio stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("samplingRate") - private Optional samplingRate; - - /** - * Indicates if the stream can auto-sync. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canAutoSync") - private Optional canAutoSync; - - /** - * Indicates if the stream is for the hearing impaired. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hearingImpaired") - private Optional hearingImpaired; - - /** - * Indicates if the stream is a dub. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("dub") - private Optional dub; - - /** - * Optional title for the stream (e.g., language variant). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - @JsonCreator - public GetLibrarySectionsAllStream( - @JsonProperty("id") long id, - @JsonProperty("format") Optional format, - @JsonProperty("default") Optional default_, - @JsonProperty("codec") String codec, - @JsonProperty("index") Optional index, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("language") Optional language, - @JsonProperty("languageTag") Optional languageTag, - @JsonProperty("languageCode") Optional languageCode, - @JsonProperty("headerCompression") Optional headerCompression, - @JsonProperty("DOVIBLCompatID") Optional doviblCompatID, - @JsonProperty("DOVIBLPresent") Optional doviblPresent, - @JsonProperty("DOVIELPresent") Optional dovielPresent, - @JsonProperty("DOVILevel") Optional doviLevel, - @JsonProperty("DOVIPresent") Optional doviPresent, - @JsonProperty("DOVIProfile") Optional doviProfile, - @JsonProperty("DOVIRPUPresent") Optional dovirpuPresent, - @JsonProperty("DOVIVersion") Optional doviVersion, - @JsonProperty("bitDepth") Optional bitDepth, - @JsonProperty("chromaLocation") Optional chromaLocation, - @JsonProperty("chromaSubsampling") Optional chromaSubsampling, - @JsonProperty("codedHeight") Optional codedHeight, - @JsonProperty("codedWidth") Optional codedWidth, - @JsonProperty("closedCaptions") Optional closedCaptions, - @JsonProperty("colorPrimaries") Optional colorPrimaries, - @JsonProperty("colorRange") Optional colorRange, - @JsonProperty("colorSpace") Optional colorSpace, - @JsonProperty("colorTrc") Optional colorTrc, - @JsonProperty("frameRate") Optional frameRate, - @JsonProperty("key") Optional key, - @JsonProperty("height") Optional height, - @JsonProperty("level") Optional level, - @JsonProperty("original") Optional original, - @JsonProperty("hasScalingMatrix") Optional hasScalingMatrix, - @JsonProperty("profile") Optional profile, - @JsonProperty("scanType") Optional scanType, - @JsonProperty("embeddedInVideo") Optional embeddedInVideo, - @JsonProperty("refFrames") Optional refFrames, - @JsonProperty("width") Optional width, - @JsonProperty("displayTitle") String displayTitle, - @JsonProperty("extendedDisplayTitle") String extendedDisplayTitle, - @JsonProperty("selected") Optional selected, - @JsonProperty("forced") Optional forced, - @JsonProperty("channels") Optional channels, - @JsonProperty("audioChannelLayout") Optional audioChannelLayout, - @JsonProperty("samplingRate") Optional samplingRate, - @JsonProperty("canAutoSync") Optional canAutoSync, - @JsonProperty("hearingImpaired") Optional hearingImpaired, - @JsonProperty("dub") Optional dub, - @JsonProperty("title") Optional title) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(format, "format"); - Utils.checkNotNull(default_, "default_"); - Utils.checkNotNull(codec, "codec"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(bitrate, "bitrate"); - Utils.checkNotNull(language, "language"); - Utils.checkNotNull(languageTag, "languageTag"); - Utils.checkNotNull(languageCode, "languageCode"); - Utils.checkNotNull(headerCompression, "headerCompression"); - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - Utils.checkNotNull(doviblPresent, "doviblPresent"); - Utils.checkNotNull(dovielPresent, "dovielPresent"); - Utils.checkNotNull(doviLevel, "doviLevel"); - Utils.checkNotNull(doviPresent, "doviPresent"); - Utils.checkNotNull(doviProfile, "doviProfile"); - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - Utils.checkNotNull(doviVersion, "doviVersion"); - Utils.checkNotNull(bitDepth, "bitDepth"); - Utils.checkNotNull(chromaLocation, "chromaLocation"); - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - Utils.checkNotNull(codedHeight, "codedHeight"); - Utils.checkNotNull(codedWidth, "codedWidth"); - Utils.checkNotNull(closedCaptions, "closedCaptions"); - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - Utils.checkNotNull(colorRange, "colorRange"); - Utils.checkNotNull(colorSpace, "colorSpace"); - Utils.checkNotNull(colorTrc, "colorTrc"); - Utils.checkNotNull(frameRate, "frameRate"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(height, "height"); - Utils.checkNotNull(level, "level"); - Utils.checkNotNull(original, "original"); - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - Utils.checkNotNull(profile, "profile"); - Utils.checkNotNull(scanType, "scanType"); - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - Utils.checkNotNull(refFrames, "refFrames"); - Utils.checkNotNull(width, "width"); - Utils.checkNotNull(displayTitle, "displayTitle"); - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - Utils.checkNotNull(selected, "selected"); - Utils.checkNotNull(forced, "forced"); - Utils.checkNotNull(channels, "channels"); - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - Utils.checkNotNull(samplingRate, "samplingRate"); - Utils.checkNotNull(canAutoSync, "canAutoSync"); - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - Utils.checkNotNull(dub, "dub"); - Utils.checkNotNull(title, "title"); - this.id = id; - this.streamType = Builder._SINGLETON_VALUE_StreamType.value(); - this.format = format; - this.default_ = default_; - this.codec = codec; - this.index = index; - this.bitrate = bitrate; - this.language = language; - this.languageTag = languageTag; - this.languageCode = languageCode; - this.headerCompression = headerCompression; - this.doviblCompatID = doviblCompatID; - this.doviblPresent = doviblPresent; - this.dovielPresent = dovielPresent; - this.doviLevel = doviLevel; - this.doviPresent = doviPresent; - this.doviProfile = doviProfile; - this.dovirpuPresent = dovirpuPresent; - this.doviVersion = doviVersion; - this.bitDepth = bitDepth; - this.chromaLocation = chromaLocation; - this.chromaSubsampling = chromaSubsampling; - this.codedHeight = codedHeight; - this.codedWidth = codedWidth; - this.closedCaptions = closedCaptions; - this.colorPrimaries = colorPrimaries; - this.colorRange = colorRange; - this.colorSpace = colorSpace; - this.colorTrc = colorTrc; - this.frameRate = frameRate; - this.key = key; - this.height = height; - this.level = level; - this.original = original; - this.hasScalingMatrix = hasScalingMatrix; - this.profile = profile; - this.scanType = scanType; - this.embeddedInVideo = embeddedInVideo; - this.refFrames = refFrames; - this.width = width; - this.displayTitle = displayTitle; - this.extendedDisplayTitle = extendedDisplayTitle; - this.selected = selected; - this.forced = forced; - this.channels = channels; - this.audioChannelLayout = audioChannelLayout; - this.samplingRate = samplingRate; - this.canAutoSync = canAutoSync; - this.hearingImpaired = hearingImpaired; - this.dub = dub; - this.title = title; - } - - public GetLibrarySectionsAllStream( - long id, - String codec, - String displayTitle, - String extendedDisplayTitle) { - this(id, Optional.empty(), Optional.empty(), - codec, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - displayTitle, extendedDisplayTitle, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - /** - * Unique stream identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Stream type: - * - VIDEO = 1 - * - AUDIO = 2 - * - SUBTITLE = 3 - */ - @JsonIgnore - public long streamType() { - return streamType; - } - - /** - * Format of the stream (e.g., srt). - */ - @JsonIgnore - public Optional format() { - return format; - } - - /** - * Indicates if this stream is default. - */ - @JsonIgnore - public Optional default_() { - return default_; - } - - /** - * Codec used by the stream. - */ - @JsonIgnore - public String codec() { - return codec; - } - - /** - * Index of the stream. - */ - @JsonIgnore - public Optional index() { - return index; - } - - /** - * Bitrate of the stream. - */ - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - /** - * Language of the stream. - */ - @JsonIgnore - public Optional language() { - return language; - } - - /** - * Language tag (e.g., en). - */ - @JsonIgnore - public Optional languageTag() { - return languageTag; - } - - /** - * ISO language code. - */ - @JsonIgnore - public Optional languageCode() { - return languageCode; - } - - /** - * Indicates whether header compression is enabled. - */ - @JsonIgnore - public Optional headerCompression() { - return headerCompression; - } - - /** - * Dolby Vision BL compatibility ID. - */ - @JsonIgnore - public Optional doviblCompatID() { - return doviblCompatID; - } - - /** - * Indicates if Dolby Vision BL is present. - */ - @JsonIgnore - public Optional doviblPresent() { - return doviblPresent; - } - - /** - * Indicates if Dolby Vision EL is present. - */ - @JsonIgnore - public Optional dovielPresent() { - return dovielPresent; - } - - /** - * Dolby Vision level. - */ - @JsonIgnore - public Optional doviLevel() { - return doviLevel; - } - - /** - * Indicates if Dolby Vision is present. - */ - @JsonIgnore - public Optional doviPresent() { - return doviPresent; - } - - /** - * Dolby Vision profile. - */ - @JsonIgnore - public Optional doviProfile() { - return doviProfile; - } - - /** - * Indicates if Dolby Vision RPU is present. - */ - @JsonIgnore - public Optional dovirpuPresent() { - return dovirpuPresent; - } - - /** - * Dolby Vision version. - */ - @JsonIgnore - public Optional doviVersion() { - return doviVersion; - } - - /** - * Bit depth of the video stream. - */ - @JsonIgnore - public Optional bitDepth() { - return bitDepth; - } - - /** - * Chroma sample location. - */ - @JsonIgnore - public Optional chromaLocation() { - return chromaLocation; - } - - /** - * Chroma subsampling format. - */ - @JsonIgnore - public Optional chromaSubsampling() { - return chromaSubsampling; - } - - /** - * Coded video height. - */ - @JsonIgnore - public Optional codedHeight() { - return codedHeight; - } - - /** - * Coded video width. - */ - @JsonIgnore - public Optional codedWidth() { - return codedWidth; - } - - @JsonIgnore - public Optional closedCaptions() { - return closedCaptions; - } - - /** - * Color primaries used. - */ - @JsonIgnore - public Optional colorPrimaries() { - return colorPrimaries; - } - - /** - * Color range (e.g., tv). - */ - @JsonIgnore - public Optional colorRange() { - return colorRange; - } - - /** - * Color space. - */ - @JsonIgnore - public Optional colorSpace() { - return colorSpace; - } - - /** - * Color transfer characteristics. - */ - @JsonIgnore - public Optional colorTrc() { - return colorTrc; - } - - /** - * Frame rate of the stream. - */ - @JsonIgnore - public Optional frameRate() { - return frameRate; - } - - /** - * Key to access this stream part. - */ - @JsonIgnore - public Optional key() { - return key; - } - - /** - * Height of the video stream. - */ - @JsonIgnore - public Optional height() { - return height; - } - - /** - * Video level. - */ - @JsonIgnore - public Optional level() { - return level; - } - - /** - * Indicates if this is the original stream. - */ - @JsonIgnore - public Optional original() { - return original; - } - - @JsonIgnore - public Optional hasScalingMatrix() { - return hasScalingMatrix; - } - - /** - * Video profile. - */ - @JsonIgnore - public Optional profile() { - return profile; - } - - @JsonIgnore - public Optional scanType() { - return scanType; - } - - @JsonIgnore - public Optional embeddedInVideo() { - return embeddedInVideo; - } - - /** - * Number of reference frames. - */ - @JsonIgnore - public Optional refFrames() { - return refFrames; - } - - /** - * Width of the video stream. - */ - @JsonIgnore - public Optional width() { - return width; - } - - /** - * Display title for the stream. - */ - @JsonIgnore - public String displayTitle() { - return displayTitle; - } - - /** - * Extended display title for the stream. - */ - @JsonIgnore - public String extendedDisplayTitle() { - return extendedDisplayTitle; - } - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - @JsonIgnore - public Optional selected() { - return selected; - } - - @JsonIgnore - public Optional forced() { - return forced; - } - - /** - * Number of audio channels (for audio streams). - */ - @JsonIgnore - public Optional channels() { - return channels; - } - - /** - * Audio channel layout. - */ - @JsonIgnore - public Optional audioChannelLayout() { - return audioChannelLayout; - } - - /** - * Sampling rate for the audio stream. - */ - @JsonIgnore - public Optional samplingRate() { - return samplingRate; - } - - /** - * Indicates if the stream can auto-sync. - */ - @JsonIgnore - public Optional canAutoSync() { - return canAutoSync; - } - - /** - * Indicates if the stream is for the hearing impaired. - */ - @JsonIgnore - public Optional hearingImpaired() { - return hearingImpaired; - } - - /** - * Indicates if the stream is a dub. - */ - @JsonIgnore - public Optional dub() { - return dub; - } - - /** - * Optional title for the stream (e.g., language variant). - */ - @JsonIgnore - public Optional title() { - return title; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique stream identifier. - */ - public GetLibrarySectionsAllStream withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Format of the stream (e.g., srt). - */ - public GetLibrarySectionsAllStream withFormat(String format) { - Utils.checkNotNull(format, "format"); - this.format = Optional.ofNullable(format); - return this; - } - - - /** - * Format of the stream (e.g., srt). - */ - public GetLibrarySectionsAllStream withFormat(Optional format) { - Utils.checkNotNull(format, "format"); - this.format = format; - return this; - } - - /** - * Indicates if this stream is default. - */ - public GetLibrarySectionsAllStream withDefault(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - - /** - * Indicates if this stream is default. - */ - public GetLibrarySectionsAllStream withDefault(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - /** - * Codec used by the stream. - */ - public GetLibrarySectionsAllStream withCodec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - /** - * Index of the stream. - */ - public GetLibrarySectionsAllStream withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - - /** - * Index of the stream. - */ - public GetLibrarySectionsAllStream withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * Bitrate of the stream. - */ - public GetLibrarySectionsAllStream withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - /** - * Bitrate of the stream. - */ - public GetLibrarySectionsAllStream withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * Language of the stream. - */ - public GetLibrarySectionsAllStream withLanguage(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - - /** - * Language of the stream. - */ - public GetLibrarySectionsAllStream withLanguage(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - /** - * Language tag (e.g., en). - */ - public GetLibrarySectionsAllStream withLanguageTag(String languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = Optional.ofNullable(languageTag); - return this; - } - - - /** - * Language tag (e.g., en). - */ - public GetLibrarySectionsAllStream withLanguageTag(Optional languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = languageTag; - return this; - } - - /** - * ISO language code. - */ - public GetLibrarySectionsAllStream withLanguageCode(String languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = Optional.ofNullable(languageCode); - return this; - } - - - /** - * ISO language code. - */ - public GetLibrarySectionsAllStream withLanguageCode(Optional languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = languageCode; - return this; - } - - /** - * Indicates whether header compression is enabled. - */ - public GetLibrarySectionsAllStream withHeaderCompression(boolean headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = Optional.ofNullable(headerCompression); - return this; - } - - - /** - * Indicates whether header compression is enabled. - */ - public GetLibrarySectionsAllStream withHeaderCompression(Optional headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = headerCompression; - return this; - } - - /** - * Dolby Vision BL compatibility ID. - */ - public GetLibrarySectionsAllStream withDOVIBLCompatID(int doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = Optional.ofNullable(doviblCompatID); - return this; - } - - - /** - * Dolby Vision BL compatibility ID. - */ - public GetLibrarySectionsAllStream withDOVIBLCompatID(Optional doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = doviblCompatID; - return this; - } - - /** - * Indicates if Dolby Vision BL is present. - */ - public GetLibrarySectionsAllStream withDOVIBLPresent(boolean doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = Optional.ofNullable(doviblPresent); - return this; - } - - - /** - * Indicates if Dolby Vision BL is present. - */ - public GetLibrarySectionsAllStream withDOVIBLPresent(Optional doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = doviblPresent; - return this; - } - - /** - * Indicates if Dolby Vision EL is present. - */ - public GetLibrarySectionsAllStream withDOVIELPresent(boolean dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = Optional.ofNullable(dovielPresent); - return this; - } - - - /** - * Indicates if Dolby Vision EL is present. - */ - public GetLibrarySectionsAllStream withDOVIELPresent(Optional dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = dovielPresent; - return this; - } - - /** - * Dolby Vision level. - */ - public GetLibrarySectionsAllStream withDOVILevel(int doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = Optional.ofNullable(doviLevel); - return this; - } - - - /** - * Dolby Vision level. - */ - public GetLibrarySectionsAllStream withDOVILevel(Optional doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = doviLevel; - return this; - } - - /** - * Indicates if Dolby Vision is present. - */ - public GetLibrarySectionsAllStream withDOVIPresent(boolean doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = Optional.ofNullable(doviPresent); - return this; - } - - - /** - * Indicates if Dolby Vision is present. - */ - public GetLibrarySectionsAllStream withDOVIPresent(Optional doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = doviPresent; - return this; - } - - /** - * Dolby Vision profile. - */ - public GetLibrarySectionsAllStream withDOVIProfile(int doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = Optional.ofNullable(doviProfile); - return this; - } - - - /** - * Dolby Vision profile. - */ - public GetLibrarySectionsAllStream withDOVIProfile(Optional doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = doviProfile; - return this; - } - - /** - * Indicates if Dolby Vision RPU is present. - */ - public GetLibrarySectionsAllStream withDOVIRPUPresent(boolean dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = Optional.ofNullable(dovirpuPresent); - return this; - } - - - /** - * Indicates if Dolby Vision RPU is present. - */ - public GetLibrarySectionsAllStream withDOVIRPUPresent(Optional dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = dovirpuPresent; - return this; - } - - /** - * Dolby Vision version. - */ - public GetLibrarySectionsAllStream withDOVIVersion(String doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = Optional.ofNullable(doviVersion); - return this; - } - - - /** - * Dolby Vision version. - */ - public GetLibrarySectionsAllStream withDOVIVersion(Optional doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = doviVersion; - return this; - } - - /** - * Bit depth of the video stream. - */ - public GetLibrarySectionsAllStream withBitDepth(int bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - - /** - * Bit depth of the video stream. - */ - public GetLibrarySectionsAllStream withBitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - /** - * Chroma sample location. - */ - public GetLibrarySectionsAllStream withChromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - - /** - * Chroma sample location. - */ - public GetLibrarySectionsAllStream withChromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - /** - * Chroma subsampling format. - */ - public GetLibrarySectionsAllStream withChromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - - /** - * Chroma subsampling format. - */ - public GetLibrarySectionsAllStream withChromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - /** - * Coded video height. - */ - public GetLibrarySectionsAllStream withCodedHeight(int codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - - /** - * Coded video height. - */ - public GetLibrarySectionsAllStream withCodedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - /** - * Coded video width. - */ - public GetLibrarySectionsAllStream withCodedWidth(int codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - - /** - * Coded video width. - */ - public GetLibrarySectionsAllStream withCodedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - return this; - } - - public GetLibrarySectionsAllStream withClosedCaptions(boolean closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = Optional.ofNullable(closedCaptions); - return this; - } - - - public GetLibrarySectionsAllStream withClosedCaptions(Optional closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = closedCaptions; - return this; - } - - /** - * Color primaries used. - */ - public GetLibrarySectionsAllStream withColorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - - /** - * Color primaries used. - */ - public GetLibrarySectionsAllStream withColorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - /** - * Color range (e.g., tv). - */ - public GetLibrarySectionsAllStream withColorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - - /** - * Color range (e.g., tv). - */ - public GetLibrarySectionsAllStream withColorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - /** - * Color space. - */ - public GetLibrarySectionsAllStream withColorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - - /** - * Color space. - */ - public GetLibrarySectionsAllStream withColorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - /** - * Color transfer characteristics. - */ - public GetLibrarySectionsAllStream withColorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - - /** - * Color transfer characteristics. - */ - public GetLibrarySectionsAllStream withColorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - /** - * Frame rate of the stream. - */ - public GetLibrarySectionsAllStream withFrameRate(float frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - - /** - * Frame rate of the stream. - */ - public GetLibrarySectionsAllStream withFrameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - /** - * Key to access this stream part. - */ - public GetLibrarySectionsAllStream withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - /** - * Key to access this stream part. - */ - public GetLibrarySectionsAllStream withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * Height of the video stream. - */ - public GetLibrarySectionsAllStream withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - /** - * Height of the video stream. - */ - public GetLibrarySectionsAllStream withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * Video level. - */ - public GetLibrarySectionsAllStream withLevel(int level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - - /** - * Video level. - */ - public GetLibrarySectionsAllStream withLevel(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - /** - * Indicates if this is the original stream. - */ - public GetLibrarySectionsAllStream withOriginal(boolean original) { - Utils.checkNotNull(original, "original"); - this.original = Optional.ofNullable(original); - return this; - } - - - /** - * Indicates if this is the original stream. - */ - public GetLibrarySectionsAllStream withOriginal(Optional original) { - Utils.checkNotNull(original, "original"); - this.original = original; - return this; - } - - public GetLibrarySectionsAllStream withHasScalingMatrix(boolean hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); - return this; - } - - - public GetLibrarySectionsAllStream withHasScalingMatrix(Optional hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = hasScalingMatrix; - return this; - } - - /** - * Video profile. - */ - public GetLibrarySectionsAllStream withProfile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - - /** - * Video profile. - */ - public GetLibrarySectionsAllStream withProfile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - public GetLibrarySectionsAllStream withScanType(String scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = Optional.ofNullable(scanType); - return this; - } - - - public GetLibrarySectionsAllStream withScanType(Optional scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = scanType; - return this; - } - - public GetLibrarySectionsAllStream withEmbeddedInVideo(String embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = Optional.ofNullable(embeddedInVideo); - return this; - } - - - public GetLibrarySectionsAllStream withEmbeddedInVideo(Optional embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = embeddedInVideo; - return this; - } - - /** - * Number of reference frames. - */ - public GetLibrarySectionsAllStream withRefFrames(int refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = Optional.ofNullable(refFrames); - return this; - } - - - /** - * Number of reference frames. - */ - public GetLibrarySectionsAllStream withRefFrames(Optional refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = refFrames; - return this; - } - - /** - * Width of the video stream. - */ - public GetLibrarySectionsAllStream withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - /** - * Width of the video stream. - */ - public GetLibrarySectionsAllStream withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Display title for the stream. - */ - public GetLibrarySectionsAllStream withDisplayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - /** - * Extended display title for the stream. - */ - public GetLibrarySectionsAllStream withExtendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public GetLibrarySectionsAllStream withSelected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public GetLibrarySectionsAllStream withSelected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - public GetLibrarySectionsAllStream withForced(boolean forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = Optional.ofNullable(forced); - return this; - } - - - public GetLibrarySectionsAllStream withForced(Optional forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = forced; - return this; - } - - /** - * Number of audio channels (for audio streams). - */ - public GetLibrarySectionsAllStream withChannels(int channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = Optional.ofNullable(channels); - return this; - } - - - /** - * Number of audio channels (for audio streams). - */ - public GetLibrarySectionsAllStream withChannels(Optional channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = channels; - return this; - } - - /** - * Audio channel layout. - */ - public GetLibrarySectionsAllStream withAudioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - - /** - * Audio channel layout. - */ - public GetLibrarySectionsAllStream withAudioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - /** - * Sampling rate for the audio stream. - */ - public GetLibrarySectionsAllStream withSamplingRate(int samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - - /** - * Sampling rate for the audio stream. - */ - public GetLibrarySectionsAllStream withSamplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - /** - * Indicates if the stream can auto-sync. - */ - public GetLibrarySectionsAllStream withCanAutoSync(boolean canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = Optional.ofNullable(canAutoSync); - return this; - } - - - /** - * Indicates if the stream can auto-sync. - */ - public GetLibrarySectionsAllStream withCanAutoSync(Optional canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = canAutoSync; - return this; - } - - /** - * Indicates if the stream is for the hearing impaired. - */ - public GetLibrarySectionsAllStream withHearingImpaired(boolean hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = Optional.ofNullable(hearingImpaired); - return this; - } - - - /** - * Indicates if the stream is for the hearing impaired. - */ - public GetLibrarySectionsAllStream withHearingImpaired(Optional hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = hearingImpaired; - return this; - } - - /** - * Indicates if the stream is a dub. - */ - public GetLibrarySectionsAllStream withDub(boolean dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = Optional.ofNullable(dub); - return this; - } - - - /** - * Indicates if the stream is a dub. - */ - public GetLibrarySectionsAllStream withDub(Optional dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = dub; - return this; - } - - /** - * Optional title for the stream (e.g., language variant). - */ - public GetLibrarySectionsAllStream withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - /** - * Optional title for the stream (e.g., language variant). - */ - public GetLibrarySectionsAllStream 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; - } - GetLibrarySectionsAllStream other = (GetLibrarySectionsAllStream) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.streamType, other.streamType) && - Utils.enhancedDeepEquals(this.format, other.format) && - Utils.enhancedDeepEquals(this.default_, other.default_) && - Utils.enhancedDeepEquals(this.codec, other.codec) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.language, other.language) && - Utils.enhancedDeepEquals(this.languageTag, other.languageTag) && - Utils.enhancedDeepEquals(this.languageCode, other.languageCode) && - Utils.enhancedDeepEquals(this.headerCompression, other.headerCompression) && - Utils.enhancedDeepEquals(this.doviblCompatID, other.doviblCompatID) && - Utils.enhancedDeepEquals(this.doviblPresent, other.doviblPresent) && - Utils.enhancedDeepEquals(this.dovielPresent, other.dovielPresent) && - Utils.enhancedDeepEquals(this.doviLevel, other.doviLevel) && - Utils.enhancedDeepEquals(this.doviPresent, other.doviPresent) && - Utils.enhancedDeepEquals(this.doviProfile, other.doviProfile) && - Utils.enhancedDeepEquals(this.dovirpuPresent, other.dovirpuPresent) && - Utils.enhancedDeepEquals(this.doviVersion, other.doviVersion) && - Utils.enhancedDeepEquals(this.bitDepth, other.bitDepth) && - Utils.enhancedDeepEquals(this.chromaLocation, other.chromaLocation) && - Utils.enhancedDeepEquals(this.chromaSubsampling, other.chromaSubsampling) && - Utils.enhancedDeepEquals(this.codedHeight, other.codedHeight) && - Utils.enhancedDeepEquals(this.codedWidth, other.codedWidth) && - Utils.enhancedDeepEquals(this.closedCaptions, other.closedCaptions) && - Utils.enhancedDeepEquals(this.colorPrimaries, other.colorPrimaries) && - Utils.enhancedDeepEquals(this.colorRange, other.colorRange) && - Utils.enhancedDeepEquals(this.colorSpace, other.colorSpace) && - Utils.enhancedDeepEquals(this.colorTrc, other.colorTrc) && - Utils.enhancedDeepEquals(this.frameRate, other.frameRate) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.level, other.level) && - Utils.enhancedDeepEquals(this.original, other.original) && - Utils.enhancedDeepEquals(this.hasScalingMatrix, other.hasScalingMatrix) && - Utils.enhancedDeepEquals(this.profile, other.profile) && - Utils.enhancedDeepEquals(this.scanType, other.scanType) && - Utils.enhancedDeepEquals(this.embeddedInVideo, other.embeddedInVideo) && - Utils.enhancedDeepEquals(this.refFrames, other.refFrames) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.displayTitle, other.displayTitle) && - Utils.enhancedDeepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) && - Utils.enhancedDeepEquals(this.selected, other.selected) && - Utils.enhancedDeepEquals(this.forced, other.forced) && - Utils.enhancedDeepEquals(this.channels, other.channels) && - Utils.enhancedDeepEquals(this.audioChannelLayout, other.audioChannelLayout) && - Utils.enhancedDeepEquals(this.samplingRate, other.samplingRate) && - Utils.enhancedDeepEquals(this.canAutoSync, other.canAutoSync) && - Utils.enhancedDeepEquals(this.hearingImpaired, other.hearingImpaired) && - Utils.enhancedDeepEquals(this.dub, other.dub) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, streamType, format, - default_, codec, index, - bitrate, language, languageTag, - languageCode, headerCompression, doviblCompatID, - doviblPresent, dovielPresent, doviLevel, - doviPresent, doviProfile, dovirpuPresent, - doviVersion, bitDepth, chromaLocation, - chromaSubsampling, codedHeight, codedWidth, - closedCaptions, colorPrimaries, colorRange, - colorSpace, colorTrc, frameRate, - key, height, level, - original, hasScalingMatrix, profile, - scanType, embeddedInVideo, refFrames, - width, displayTitle, extendedDisplayTitle, - selected, forced, channels, - audioChannelLayout, samplingRate, canAutoSync, - hearingImpaired, dub, title); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllStream.class, - "id", id, - "streamType", streamType, - "format", format, - "default_", default_, - "codec", codec, - "index", index, - "bitrate", bitrate, - "language", language, - "languageTag", languageTag, - "languageCode", languageCode, - "headerCompression", headerCompression, - "doviblCompatID", doviblCompatID, - "doviblPresent", doviblPresent, - "dovielPresent", dovielPresent, - "doviLevel", doviLevel, - "doviPresent", doviPresent, - "doviProfile", doviProfile, - "dovirpuPresent", dovirpuPresent, - "doviVersion", doviVersion, - "bitDepth", bitDepth, - "chromaLocation", chromaLocation, - "chromaSubsampling", chromaSubsampling, - "codedHeight", codedHeight, - "codedWidth", codedWidth, - "closedCaptions", closedCaptions, - "colorPrimaries", colorPrimaries, - "colorRange", colorRange, - "colorSpace", colorSpace, - "colorTrc", colorTrc, - "frameRate", frameRate, - "key", key, - "height", height, - "level", level, - "original", original, - "hasScalingMatrix", hasScalingMatrix, - "profile", profile, - "scanType", scanType, - "embeddedInVideo", embeddedInVideo, - "refFrames", refFrames, - "width", width, - "displayTitle", displayTitle, - "extendedDisplayTitle", extendedDisplayTitle, - "selected", selected, - "forced", forced, - "channels", channels, - "audioChannelLayout", audioChannelLayout, - "samplingRate", samplingRate, - "canAutoSync", canAutoSync, - "hearingImpaired", hearingImpaired, - "dub", dub, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private Optional format = Optional.empty(); - - private Optional default_ = Optional.empty(); - - private String codec; - - private Optional index = Optional.empty(); - - private Optional bitrate = Optional.empty(); - - private Optional language = Optional.empty(); - - private Optional languageTag = Optional.empty(); - - private Optional languageCode = Optional.empty(); - - private Optional headerCompression = Optional.empty(); - - private Optional doviblCompatID = Optional.empty(); - - private Optional doviblPresent = Optional.empty(); - - private Optional dovielPresent = Optional.empty(); - - private Optional doviLevel = Optional.empty(); - - private Optional doviPresent = Optional.empty(); - - private Optional doviProfile = Optional.empty(); - - private Optional dovirpuPresent = Optional.empty(); - - private Optional doviVersion = 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 closedCaptions = 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 key = Optional.empty(); - - private Optional height = Optional.empty(); - - private Optional level = Optional.empty(); - - private Optional original = Optional.empty(); - - private Optional hasScalingMatrix = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional scanType = Optional.empty(); - - private Optional embeddedInVideo = Optional.empty(); - - private Optional refFrames = Optional.empty(); - - private Optional width = Optional.empty(); - - private String displayTitle; - - private String extendedDisplayTitle; - - private Optional selected = Optional.empty(); - - private Optional forced = Optional.empty(); - - private Optional channels = Optional.empty(); - - private Optional audioChannelLayout = Optional.empty(); - - private Optional samplingRate = Optional.empty(); - - private Optional canAutoSync = Optional.empty(); - - private Optional hearingImpaired = Optional.empty(); - - private Optional dub = Optional.empty(); - - private Optional title = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique stream identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Format of the stream (e.g., srt). - */ - public Builder format(String format) { - Utils.checkNotNull(format, "format"); - this.format = Optional.ofNullable(format); - return this; - } - - /** - * Format of the stream (e.g., srt). - */ - public Builder format(Optional format) { - Utils.checkNotNull(format, "format"); - this.format = format; - return this; - } - - - /** - * Indicates if this stream is default. - */ - public Builder default_(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - /** - * Indicates if this stream is default. - */ - public Builder default_(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - - /** - * Codec used by the stream. - */ - public Builder codec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - - /** - * Index of the stream. - */ - public Builder index(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - /** - * Index of the stream. - */ - public Builder index(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - - /** - * Bitrate of the stream. - */ - public Builder bitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * Bitrate of the stream. - */ - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - - /** - * Language of the stream. - */ - public Builder language(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - /** - * Language of the stream. - */ - public Builder language(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - - /** - * Language tag (e.g., en). - */ - public Builder languageTag(String languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = Optional.ofNullable(languageTag); - return this; - } - - /** - * Language tag (e.g., en). - */ - public Builder languageTag(Optional languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = languageTag; - return this; - } - - - /** - * ISO language code. - */ - public Builder languageCode(String languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = Optional.ofNullable(languageCode); - return this; - } - - /** - * ISO language code. - */ - public Builder languageCode(Optional languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = languageCode; - return this; - } - - - /** - * Indicates whether header compression is enabled. - */ - public Builder headerCompression(boolean headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = Optional.ofNullable(headerCompression); - return this; - } - - /** - * Indicates whether header compression is enabled. - */ - public Builder headerCompression(Optional headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = headerCompression; - return this; - } - - - /** - * Dolby Vision BL compatibility ID. - */ - public Builder doviblCompatID(int doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = Optional.ofNullable(doviblCompatID); - return this; - } - - /** - * Dolby Vision BL compatibility ID. - */ - public Builder doviblCompatID(Optional doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = doviblCompatID; - return this; - } - - - /** - * Indicates if Dolby Vision BL is present. - */ - public Builder doviblPresent(boolean doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = Optional.ofNullable(doviblPresent); - return this; - } - - /** - * Indicates if Dolby Vision BL is present. - */ - public Builder doviblPresent(Optional doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = doviblPresent; - return this; - } - - - /** - * Indicates if Dolby Vision EL is present. - */ - public Builder dovielPresent(boolean dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = Optional.ofNullable(dovielPresent); - return this; - } - - /** - * Indicates if Dolby Vision EL is present. - */ - public Builder dovielPresent(Optional dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = dovielPresent; - return this; - } - - - /** - * Dolby Vision level. - */ - public Builder doviLevel(int doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = Optional.ofNullable(doviLevel); - return this; - } - - /** - * Dolby Vision level. - */ - public Builder doviLevel(Optional doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = doviLevel; - return this; - } - - - /** - * Indicates if Dolby Vision is present. - */ - public Builder doviPresent(boolean doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = Optional.ofNullable(doviPresent); - return this; - } - - /** - * Indicates if Dolby Vision is present. - */ - public Builder doviPresent(Optional doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = doviPresent; - return this; - } - - - /** - * Dolby Vision profile. - */ - public Builder doviProfile(int doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = Optional.ofNullable(doviProfile); - return this; - } - - /** - * Dolby Vision profile. - */ - public Builder doviProfile(Optional doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = doviProfile; - return this; - } - - - /** - * Indicates if Dolby Vision RPU is present. - */ - public Builder dovirpuPresent(boolean dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = Optional.ofNullable(dovirpuPresent); - return this; - } - - /** - * Indicates if Dolby Vision RPU is present. - */ - public Builder dovirpuPresent(Optional dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = dovirpuPresent; - return this; - } - - - /** - * Dolby Vision version. - */ - public Builder doviVersion(String doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = Optional.ofNullable(doviVersion); - return this; - } - - /** - * Dolby Vision version. - */ - public Builder doviVersion(Optional doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = doviVersion; - return this; - } - - - /** - * Bit depth of the video stream. - */ - public Builder bitDepth(int bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - /** - * Bit depth of the video stream. - */ - public Builder bitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - - /** - * Chroma sample location. - */ - public Builder chromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - /** - * Chroma sample location. - */ - public Builder chromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - - /** - * Chroma subsampling format. - */ - public Builder chromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - /** - * Chroma subsampling format. - */ - public Builder chromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - - /** - * Coded video height. - */ - public Builder codedHeight(int codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - /** - * Coded video height. - */ - public Builder codedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - - /** - * Coded video width. - */ - public Builder codedWidth(int codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - /** - * Coded video width. - */ - public Builder codedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - 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; - } - - - /** - * Color primaries used. - */ - public Builder colorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - /** - * Color primaries used. - */ - public Builder colorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - - /** - * Color range (e.g., tv). - */ - public Builder colorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - /** - * Color range (e.g., tv). - */ - public Builder colorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - - /** - * Color space. - */ - public Builder colorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - /** - * Color space. - */ - public Builder colorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - - /** - * Color transfer characteristics. - */ - public Builder colorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - /** - * Color transfer characteristics. - */ - public Builder colorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - - /** - * Frame rate of the stream. - */ - public Builder frameRate(float frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - /** - * Frame rate of the stream. - */ - public Builder frameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - - /** - * Key to access this stream part. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - /** - * Key to access this stream part. - */ - public Builder key(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * Height of the video stream. - */ - public Builder height(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * Height of the video stream. - */ - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - /** - * Video level. - */ - public Builder level(int level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - /** - * Video level. - */ - public Builder level(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - - /** - * Indicates if this is the original stream. - */ - public Builder original(boolean original) { - Utils.checkNotNull(original, "original"); - this.original = Optional.ofNullable(original); - return this; - } - - /** - * Indicates if this is the original stream. - */ - public Builder original(Optional original) { - Utils.checkNotNull(original, "original"); - this.original = original; - 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; - } - - - /** - * Video profile. - */ - public Builder profile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - /** - * Video profile. - */ - public Builder profile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - 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 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; - } - - - /** - * Number of reference frames. - */ - public Builder refFrames(int 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; - } - - - /** - * Width of the video stream. - */ - public Builder width(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * Width of the video stream. - */ - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - /** - * Display title for the stream. - */ - public Builder displayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - - /** - * Extended display title for the stream. - */ - public Builder extendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public Builder selected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public Builder selected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - - public Builder forced(boolean forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = Optional.ofNullable(forced); - return this; - } - - public Builder forced(Optional forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = forced; - return this; - } - - - /** - * Number of audio channels (for audio streams). - */ - public Builder channels(int 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; - } - - - /** - * Audio channel layout. - */ - public Builder audioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - /** - * Audio channel layout. - */ - public Builder audioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - - /** - * Sampling rate for the audio stream. - */ - public Builder samplingRate(int samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - /** - * Sampling rate for the audio stream. - */ - public Builder samplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - - /** - * Indicates if the stream can auto-sync. - */ - public Builder canAutoSync(boolean canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = Optional.ofNullable(canAutoSync); - return this; - } - - /** - * Indicates if the stream can auto-sync. - */ - public Builder canAutoSync(Optional canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = canAutoSync; - return this; - } - - - /** - * Indicates if the stream is for the hearing impaired. - */ - public Builder hearingImpaired(boolean hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = Optional.ofNullable(hearingImpaired); - return this; - } - - /** - * Indicates if the stream is for the hearing impaired. - */ - public Builder hearingImpaired(Optional hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = hearingImpaired; - return this; - } - - - /** - * Indicates if the stream is a dub. - */ - public Builder dub(boolean dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = Optional.ofNullable(dub); - return this; - } - - /** - * Indicates if the stream is a dub. - */ - public Builder dub(Optional dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = dub; - return this; - } - - - /** - * Optional title for the stream (e.g., language variant). - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - /** - * Optional title for the stream (e.g., language variant). - */ - public Builder title(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibrarySectionsAllStream build() { - - return new GetLibrarySectionsAllStream( - id, format, default_, - codec, index, bitrate, - language, languageTag, languageCode, - headerCompression, doviblCompatID, doviblPresent, - dovielPresent, doviLevel, doviPresent, - doviProfile, dovirpuPresent, doviVersion, - bitDepth, chromaLocation, chromaSubsampling, - codedHeight, codedWidth, closedCaptions, - colorPrimaries, colorRange, colorSpace, - colorTrc, frameRate, key, - height, level, original, - hasScalingMatrix, profile, scanType, - embeddedInVideo, refFrames, width, - displayTitle, extendedDisplayTitle, selected, - forced, channels, audioChannelLayout, - samplingRate, canAutoSync, hearingImpaired, - dub, title); - } - - - private static final LazySingletonValue _SINGLETON_VALUE_StreamType = - new LazySingletonValue<>( - "streamType", - "1", - new TypeReference() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllType.java deleted file mode 100644 index a5766a7a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllType.java +++ /dev/null @@ -1,372 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetLibrarySectionsAllType { - - @JsonProperty("key") - private String key; - - - @JsonProperty("type") - private String type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; - - - @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 GetLibrarySectionsAllType( - @JsonProperty("key") String key, - @JsonProperty("type") String type, - @JsonProperty("subtype") Optional subtype, - @JsonProperty("title") String title, - @JsonProperty("active") boolean active, - @JsonProperty("Filter") Optional> filter, - @JsonProperty("Sort") Optional> sort, - @JsonProperty("Field") Optional> field) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(active, "active"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(sort, "sort"); - Utils.checkNotNull(field, "field"); - this.key = key; - this.type = type; - this.subtype = subtype; - this.title = title; - this.active = active; - this.filter = filter; - this.sort = sort; - this.field = field; - } - - public GetLibrarySectionsAllType( - String key, - String type, - String title, - boolean active) { - this(key, type, Optional.empty(), - title, active, Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public Optional subtype() { - return subtype; - } - - @JsonIgnore - public String title() { - return title; - } - - @JsonIgnore - public boolean active() { - return active; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> filter() { - return (Optional>) filter; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> sort() { - return (Optional>) sort; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> field() { - return (Optional>) field; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllType withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetLibrarySectionsAllType withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetLibrarySectionsAllType withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - - public GetLibrarySectionsAllType withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - public GetLibrarySectionsAllType withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetLibrarySectionsAllType withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - public GetLibrarySectionsAllType withFilter(List filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - - public GetLibrarySectionsAllType withFilter(Optional> filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetLibrarySectionsAllType withSort(List sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - - public GetLibrarySectionsAllType withSort(Optional> sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - public GetLibrarySectionsAllType withField(List field) { - Utils.checkNotNull(field, "field"); - this.field = Optional.ofNullable(field); - return this; - } - - - public GetLibrarySectionsAllType 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; - } - GetLibrarySectionsAllType other = (GetLibrarySectionsAllType) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.subtype, other.subtype) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.sort, other.sort) && - Utils.enhancedDeepEquals(this.field, other.field); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, type, subtype, - title, active, filter, - sort, field); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllType.class, - "key", key, - "type", type, - "subtype", subtype, - "title", title, - "active", active, - "filter", filter, - "sort", sort, - "field", field); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String key; - - private String type; - - private Optional subtype = Optional.empty(); - - private String title; - - private Boolean active; - - private Optional> filter = Optional.empty(); - - private Optional> sort = Optional.empty(); - - private Optional> field = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 subtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - public Builder subtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - public Builder active(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - - public Builder filter(List filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - public Builder filter(Optional> filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - public Builder sort(List sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - public Builder sort(Optional> sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - - public Builder field(List field) { - Utils.checkNotNull(field, "field"); - this.field = Optional.ofNullable(field); - return this; - } - - public Builder field(Optional> field) { - Utils.checkNotNull(field, "field"); - this.field = field; - return this; - } - - public GetLibrarySectionsAllType build() { - - return new GetLibrarySectionsAllType( - key, type, subtype, - title, active, filter, - sort, field); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllUltraBlurColors.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllUltraBlurColors.java deleted file mode 100644 index 3894d2c0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllUltraBlurColors.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibrarySectionsAllUltraBlurColors { - - @JsonProperty("topLeft") - private String topLeft; - - - @JsonProperty("topRight") - private String topRight; - - - @JsonProperty("bottomRight") - private String bottomRight; - - - @JsonProperty("bottomLeft") - private String bottomLeft; - - @JsonCreator - public GetLibrarySectionsAllUltraBlurColors( - @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 static Builder builder() { - return new Builder(); - } - - - public GetLibrarySectionsAllUltraBlurColors withTopLeft(String topLeft) { - Utils.checkNotNull(topLeft, "topLeft"); - this.topLeft = topLeft; - return this; - } - - public GetLibrarySectionsAllUltraBlurColors withTopRight(String topRight) { - Utils.checkNotNull(topRight, "topRight"); - this.topRight = topRight; - return this; - } - - public GetLibrarySectionsAllUltraBlurColors withBottomRight(String bottomRight) { - Utils.checkNotNull(bottomRight, "bottomRight"); - this.bottomRight = bottomRight; - return this; - } - - public GetLibrarySectionsAllUltraBlurColors 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; - } - GetLibrarySectionsAllUltraBlurColors other = (GetLibrarySectionsAllUltraBlurColors) o; - return - Utils.enhancedDeepEquals(this.topLeft, other.topLeft) && - Utils.enhancedDeepEquals(this.topRight, other.topRight) && - Utils.enhancedDeepEquals(this.bottomRight, other.bottomRight) && - Utils.enhancedDeepEquals(this.bottomLeft, other.bottomLeft); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - topLeft, topRight, bottomRight, - bottomLeft); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllUltraBlurColors.class, - "topLeft", topLeft, - "topRight", topRight, - "bottomRight", bottomRight, - "bottomLeft", bottomLeft); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetLibrarySectionsAllUltraBlurColors build() { - - return new GetLibrarySectionsAllUltraBlurColors( - topLeft, topRight, bottomRight, - bottomLeft); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllWriter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllWriter.java deleted file mode 100644 index 32ca59cd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibrarySectionsAllWriter.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetLibrarySectionsAllWriter { - /** - * The role of Writer - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetLibrarySectionsAllWriter( - @JsonProperty("tag") String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - /** - * The role of Writer - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The role of Writer - */ - public GetLibrarySectionsAllWriter withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLibrarySectionsAllWriter other = (GetLibrarySectionsAllWriter) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllWriter.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The role of Writer - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetLibrarySectionsAllWriter build() { - - return new GetLibrarySectionsAllWriter( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsMediaContainer.java new file mode 100644 index 00000000..8763438b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetLineupChannelsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetLineupChannelsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Lineup") + private Optional> lineup; + + @JsonCreator + public GetLineupChannelsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Lineup") Optional> lineup) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(lineup, "lineup"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.lineup = lineup; + } + + public GetLineupChannelsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> lineup() { + return (Optional>) lineup; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetLineupChannelsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetLineupChannelsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetLineupChannelsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetLineupChannelsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetLineupChannelsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetLineupChannelsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetLineupChannelsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetLineupChannelsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetLineupChannelsMediaContainer withLineup(List lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + public GetLineupChannelsMediaContainer withLineup(Optional> lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLineupChannelsMediaContainer other = (GetLineupChannelsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.lineup, other.lineup); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, lineup); + } + + @Override + public String toString() { + return Utils.toString(GetLineupChannelsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "lineup", lineup); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> lineup = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder lineup(List lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + public Builder lineup(Optional> lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public GetLineupChannelsMediaContainer build() { + + return new GetLineupChannelsMediaContainer( + identifier, offset, size, + totalSize, lineup); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsRequest.java new file mode 100644 index 00000000..510c912d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.List; +import java.util.Optional; + + +public class GetLineupChannelsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The URIs describing the lineups + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=lineup") + private List lineup; + + @JsonCreator + public GetLineupChannelsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + List lineup) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(lineup, "lineup"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.lineup = lineup; + } + + public GetLineupChannelsRequest( + List lineup) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), lineup); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The URIs describing the lineups + */ + @JsonIgnore + public List lineup() { + return lineup; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetLineupChannelsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetLineupChannelsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetLineupChannelsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetLineupChannelsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetLineupChannelsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetLineupChannelsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetLineupChannelsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetLineupChannelsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetLineupChannelsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetLineupChannelsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetLineupChannelsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetLineupChannelsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetLineupChannelsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetLineupChannelsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetLineupChannelsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetLineupChannelsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetLineupChannelsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetLineupChannelsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetLineupChannelsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetLineupChannelsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetLineupChannelsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetLineupChannelsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The URIs describing the lineups + */ + public GetLineupChannelsRequest withLineup(List lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLineupChannelsRequest other = (GetLineupChannelsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.lineup, other.lineup); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, lineup); + } + + @Override + public String toString() { + return Utils.toString(GetLineupChannelsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "lineup", lineup); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private List lineup; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The URIs describing the lineups + */ + public Builder lineup(List lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public GetLineupChannelsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetLineupChannelsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, lineup); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsRequestBuilder.java new file mode 100644 index 00000000..a54f8240 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetLineupChannels; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetLineupChannelsRequestBuilder { + + private GetLineupChannelsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetLineupChannelsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetLineupChannelsRequestBuilder request(GetLineupChannelsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetLineupChannelsResponse call() throws Exception { + + RequestOperation operation + = new GetLineupChannels.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsResponse.java new file mode 100644 index 00000000..3d69e662 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetLineupChannelsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetLineupChannelsResponse( + 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 GetLineupChannelsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetLineupChannelsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLineupChannelsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLineupChannelsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetLineupChannelsResponse withObject(GetLineupChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetLineupChannelsResponse 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; + } + GetLineupChannelsResponse other = (GetLineupChannelsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetLineupChannelsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetLineupChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetLineupChannelsResponse build() { + + return new GetLineupChannelsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsResponseBody.java new file mode 100644 index 00000000..178ea5a2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupChannelsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetLineupChannelsResponseBody + * + *

OK + */ +public class GetLineupChannelsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetLineupChannelsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetLineupChannelsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetLineupChannelsResponseBody withMediaContainer(GetLineupChannelsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetLineupChannelsResponseBody 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; + } + GetLineupChannelsResponseBody other = (GetLineupChannelsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetLineupChannelsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetLineupChannelsMediaContainer 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 GetLineupChannelsResponseBody build() { + + return new GetLineupChannelsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLineupRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupRequest.java new file mode 100644 index 00000000..703357c9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupRequest.java @@ -0,0 +1,823 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetLineupRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The URI describing the device + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=device") + private String deviceQueryParameter; + + /** + * The URI describing the lineupGroup + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=lineupGroup") + private String lineupGroup; + + @JsonCreator + public GetLineupRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String deviceQueryParameter, + String lineupGroup) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + Utils.checkNotNull(lineupGroup, "lineupGroup"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceQueryParameter = deviceQueryParameter; + this.lineupGroup = lineupGroup; + } + + public GetLineupRequest( + String deviceQueryParameter, + String lineupGroup) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceQueryParameter, + lineupGroup); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The URI describing the device + */ + @JsonIgnore + public String deviceQueryParameter() { + return deviceQueryParameter; + } + + /** + * The URI describing the lineupGroup + */ + @JsonIgnore + public String lineupGroup() { + return lineupGroup; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetLineupRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetLineupRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetLineupRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetLineupRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetLineupRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetLineupRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetLineupRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetLineupRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetLineupRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetLineupRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetLineupRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetLineupRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetLineupRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetLineupRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetLineupRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetLineupRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetLineupRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetLineupRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetLineupRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetLineupRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetLineupRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetLineupRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The URI describing the device + */ + public GetLineupRequest withDeviceQueryParameter(String deviceQueryParameter) { + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + this.deviceQueryParameter = deviceQueryParameter; + return this; + } + + /** + * The URI describing the lineupGroup + */ + public GetLineupRequest withLineupGroup(String lineupGroup) { + Utils.checkNotNull(lineupGroup, "lineupGroup"); + this.lineupGroup = lineupGroup; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLineupRequest other = (GetLineupRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceQueryParameter, other.deviceQueryParameter) && + Utils.enhancedDeepEquals(this.lineupGroup, other.lineupGroup); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceQueryParameter, + lineupGroup); + } + + @Override + public String toString() { + return Utils.toString(GetLineupRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceQueryParameter", deviceQueryParameter, + "lineupGroup", lineupGroup); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String deviceQueryParameter; + + private String lineupGroup; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The URI describing the device + */ + public Builder deviceQueryParameter(String deviceQueryParameter) { + Utils.checkNotNull(deviceQueryParameter, "deviceQueryParameter"); + this.deviceQueryParameter = deviceQueryParameter; + return this; + } + + + /** + * The URI describing the lineupGroup + */ + public Builder lineupGroup(String lineupGroup) { + Utils.checkNotNull(lineupGroup, "lineupGroup"); + this.lineupGroup = lineupGroup; + return this; + } + + public GetLineupRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetLineupRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceQueryParameter, + lineupGroup); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLineupRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupRequestBuilder.java new file mode 100644 index 00000000..bf219ac1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetLineup; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetLineupRequestBuilder { + + private GetLineupRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetLineupRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetLineupRequestBuilder request(GetLineupRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetLineupResponse call() throws Exception { + + RequestOperation operation + = new GetLineup.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLineupResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupResponse.java new file mode 100644 index 00000000..f3997644 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLineupResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; + + +public class GetLineupResponse 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; + + + private Map> headers; + + @JsonCreator + public GetLineupResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.headers = headers; + } + + /** + * 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; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetLineupResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLineupResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLineupResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetLineupResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLineupResponse other = (GetLineupResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(GetLineupResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetLineupResponse build() { + + return new GetLineupResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionRequest.java new file mode 100644 index 00000000..3210096b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionRequest.java @@ -0,0 +1,779 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetLiveTVSessionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The session id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sessionId") + private String sessionId; + + @JsonCreator + public GetLiveTVSessionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String sessionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sessionId, "sessionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sessionId = sessionId; + } + + public GetLiveTVSessionRequest( + String sessionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sessionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The session id + */ + @JsonIgnore + public String sessionId() { + return sessionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetLiveTVSessionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetLiveTVSessionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetLiveTVSessionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetLiveTVSessionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetLiveTVSessionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetLiveTVSessionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetLiveTVSessionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetLiveTVSessionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetLiveTVSessionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetLiveTVSessionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetLiveTVSessionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetLiveTVSessionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetLiveTVSessionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetLiveTVSessionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetLiveTVSessionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetLiveTVSessionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetLiveTVSessionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetLiveTVSessionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetLiveTVSessionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetLiveTVSessionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetLiveTVSessionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetLiveTVSessionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The session id + */ + public GetLiveTVSessionRequest withSessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLiveTVSessionRequest other = (GetLiveTVSessionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sessionId, other.sessionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sessionId); + } + + @Override + public String toString() { + return Utils.toString(GetLiveTVSessionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sessionId", sessionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String sessionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The session id + */ + public Builder sessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + public GetLiveTVSessionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetLiveTVSessionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sessionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionRequestBuilder.java new file mode 100644 index 00000000..549f26dd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetLiveTVSession; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetLiveTVSessionRequestBuilder { + + private GetLiveTVSessionRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetLiveTVSessionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetLiveTVSessionRequestBuilder request(GetLiveTVSessionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetLiveTVSessionResponse call() throws Exception { + + RequestOperation operation + = new GetLiveTVSession.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionResponse.java new file mode 100644 index 00000000..2bc6d759 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLiveTVSessionResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetLiveTVSessionResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetLiveTVSessionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetLiveTVSessionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetLiveTVSessionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLiveTVSessionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLiveTVSessionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetLiveTVSessionResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetLiveTVSessionResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetLiveTVSessionResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLiveTVSessionResponse other = (GetLiveTVSessionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetLiveTVSessionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetLiveTVSessionResponse build() { + + return new GetLiveTVSessionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMediaContainer.java deleted file mode 100644 index 4d14ee63..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMediaContainer.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.List; - - -public class GetMediaArtsMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * The version number for media tags. - */ - @JsonProperty("mediaTagVersion") - private long mediaTagVersion; - - /** - * The prefix used for media tag resource paths. - */ - @JsonProperty("mediaTagPrefix") - private String mediaTagPrefix; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - - @JsonProperty("Metadata") - private List metadata; - - @JsonCreator - public GetMediaArtsMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("mediaTagVersion") long mediaTagVersion, - @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("identifier") String identifier, - @JsonProperty("Metadata") List metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.mediaTagVersion = mediaTagVersion; - this.mediaTagPrefix = mediaTagPrefix; - this.identifier = identifier; - this.metadata = metadata; - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * The version number for media tags. - */ - @JsonIgnore - public long mediaTagVersion() { - return mediaTagVersion; - } - - /** - * The prefix used for media tag resource paths. - */ - @JsonIgnore - public String mediaTagPrefix() { - return mediaTagPrefix; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - @JsonIgnore - public List metadata() { - return metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetMediaArtsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * The version number for media tags. - */ - public GetMediaArtsMediaContainer withMediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - /** - * The prefix used for media tag resource paths. - */ - public GetMediaArtsMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetMediaArtsMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public GetMediaArtsMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaArtsMediaContainer other = (GetMediaArtsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, mediaTagVersion, mediaTagPrefix, - identifier, metadata); - } - - @Override - public String toString() { - return Utils.toString(GetMediaArtsMediaContainer.class, - "size", size, - "mediaTagVersion", mediaTagVersion, - "mediaTagPrefix", mediaTagPrefix, - "identifier", identifier, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Long mediaTagVersion; - - private String mediaTagPrefix; - - private String identifier; - - private List metadata; - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * The version number for media tags. - */ - public Builder mediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - - /** - * The prefix used for media tag resource paths. - */ - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - public Builder metadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - public GetMediaArtsMediaContainer build() { - - return new GetMediaArtsMediaContainer( - size, mediaTagVersion, mediaTagPrefix, - identifier, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMetadata.java deleted file mode 100644 index 071d29fd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsMetadata.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaArtsMetadata { - /** - * The URL of the artwork. - */ - @JsonProperty("key") - private String key; - - /** - * The provider of the artwork. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("provider") - private Optional provider; - - /** - * The URL of the artwork. - */ - @JsonProperty("ratingKey") - private String ratingKey; - - /** - * Whether this is the selected artwork. - */ - @JsonProperty("selected") - private boolean selected; - - /** - * The URL of the artwork thumbnail. - */ - @JsonProperty("thumb") - private String thumb; - - @JsonCreator - public GetMediaArtsMetadata( - @JsonProperty("key") String key, - @JsonProperty("provider") Optional provider, - @JsonProperty("ratingKey") String ratingKey, - @JsonProperty("selected") boolean selected, - @JsonProperty("thumb") String thumb) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(provider, "provider"); - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(selected, "selected"); - Utils.checkNotNull(thumb, "thumb"); - this.key = key; - this.provider = provider; - this.ratingKey = ratingKey; - this.selected = selected; - this.thumb = thumb; - } - - public GetMediaArtsMetadata( - String key, - String ratingKey, - boolean selected, - String thumb) { - this(key, Optional.empty(), ratingKey, - selected, thumb); - } - - /** - * The URL of the artwork. - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The provider of the artwork. - */ - @JsonIgnore - public Optional provider() { - return provider; - } - - /** - * The URL of the artwork. - */ - @JsonIgnore - public String ratingKey() { - return ratingKey; - } - - /** - * Whether this is the selected artwork. - */ - @JsonIgnore - public boolean selected() { - return selected; - } - - /** - * The URL of the artwork thumbnail. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The URL of the artwork. - */ - public GetMediaArtsMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The provider of the artwork. - */ - public GetMediaArtsMetadata withProvider(String provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = Optional.ofNullable(provider); - return this; - } - - - /** - * The provider of the artwork. - */ - public GetMediaArtsMetadata withProvider(Optional provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = provider; - return this; - } - - /** - * The URL of the artwork. - */ - public GetMediaArtsMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * Whether this is the selected artwork. - */ - public GetMediaArtsMetadata withSelected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - /** - * The URL of the artwork thumbnail. - */ - public GetMediaArtsMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaArtsMetadata other = (GetMediaArtsMetadata) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.provider, other.provider) && - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.selected, other.selected) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, provider, ratingKey, - selected, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetMediaArtsMetadata.class, - "key", key, - "provider", provider, - "ratingKey", ratingKey, - "selected", selected, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String key; - - private Optional provider = Optional.empty(); - - private String ratingKey; - - private Boolean selected; - - private String thumb; - - private Builder() { - // force use of static builder() method - } - - - /** - * The URL of the artwork. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The provider of the artwork. - */ - public Builder provider(String provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = Optional.ofNullable(provider); - return this; - } - - /** - * The provider of the artwork. - */ - public Builder provider(Optional provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = provider; - return this; - } - - - /** - * The URL of the artwork. - */ - public Builder ratingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * Whether this is the selected artwork. - */ - public Builder selected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - - /** - * The URL of the artwork thumbnail. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetMediaArtsMetadata build() { - - return new GetMediaArtsMetadata( - key, provider, ratingKey, - selected, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequest.java deleted file mode 100644 index cd81ce38..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; - - -public class GetMediaArtsRequest { - /** - * the id of the library item to return the artwork of. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") - private long ratingKey; - - @JsonCreator - public GetMediaArtsRequest( - long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - } - - /** - * the id of the library item to return the artwork of. - */ - @JsonIgnore - public long ratingKey() { - return ratingKey; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the id of the library item to return the artwork of. - */ - public GetMediaArtsRequest withRatingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaArtsRequest other = (GetMediaArtsRequest) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey); - } - - @Override - public String toString() { - return Utils.toString(GetMediaArtsRequest.class, - "ratingKey", ratingKey); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long ratingKey; - - private Builder() { - // force use of static builder() method - } - - - /** - * the id of the library item to return the artwork of. - */ - public Builder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetMediaArtsRequest build() { - - return new GetMediaArtsRequest( - ratingKey); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequestBuilder.java deleted file mode 100644 index ac138ff2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetMediaArts; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; - -public class GetMediaArtsRequestBuilder { - - private Long ratingKey; - private final SDKConfiguration sdkConfiguration; - - public GetMediaArtsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMediaArtsRequestBuilder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - private GetMediaArtsRequest buildRequest() { - - GetMediaArtsRequest request = new GetMediaArtsRequest(ratingKey); - - return request; - } - - public GetMediaArtsResponse call() throws Exception { - - RequestOperation operation - = new GetMediaArts.Sync(sdkConfiguration); - GetMediaArtsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponse.java deleted file mode 100644 index 19f78d5d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetMediaArtsResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - /** - * The available background artwork for the library item. - */ - private Optional object; - - @JsonCreator - public GetMediaArtsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional object) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.object = object; - } - - public GetMediaArtsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, - Optional.empty()); - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - /** - * The available background artwork for the library item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMediaArtsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMediaArtsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaArtsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The available background artwork for the library item. - */ - public GetMediaArtsResponse withObject(GetMediaArtsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The available background artwork for the library item. - */ - public GetMediaArtsResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaArtsResponse other = (GetMediaArtsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMediaArtsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional object = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - - /** - * The available background artwork for the library item. - */ - public Builder object(GetMediaArtsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The available background artwork for the library item. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMediaArtsResponse build() { - - return new GetMediaArtsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponseBody.java deleted file mode 100644 index 55b449db..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaArtsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetMediaArtsResponseBody - * - *

The available background artwork for the library item. - */ -public class GetMediaArtsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetMediaArtsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetMediaArtsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaArtsResponseBody withMediaContainer(GetMediaArtsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetMediaArtsResponseBody withMediaContainer(Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaArtsResponseBody other = (GetMediaArtsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetMediaArtsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetMediaArtsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - public Builder mediaContainer(Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - return this; - } - - public GetMediaArtsResponseBody build() { - - return new GetMediaArtsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataAttributes.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataAttributes.java deleted file mode 100644 index 6c33e6e9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataAttributes.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - -/** - * GetMediaMetaDataAttributes - * - *

Attributes associated with the marker. - */ -public class GetMediaMetaDataAttributes { - /** - * The identifier for the attributes. - */ - @JsonProperty("id") - private long id; - - /** - * The version number of the marker attributes. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("version") - private Optional version; - - @JsonCreator - public GetMediaMetaDataAttributes( - @JsonProperty("id") long id, - @JsonProperty("version") Optional version) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(version, "version"); - this.id = id; - this.version = version; - } - - public GetMediaMetaDataAttributes( - long id) { - this(id, Optional.empty()); - } - - /** - * The identifier for the attributes. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * The version number of the marker attributes. - */ - @JsonIgnore - public Optional version() { - return version; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The identifier for the attributes. - */ - public GetMediaMetaDataAttributes withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The version number of the marker attributes. - */ - public GetMediaMetaDataAttributes withVersion(long version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - - /** - * The version number of the marker attributes. - */ - public GetMediaMetaDataAttributes withVersion(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataAttributes other = (GetMediaMetaDataAttributes) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.version, other.version); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, version); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataAttributes.class, - "id", id, - "version", version); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private Optional version = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The identifier for the attributes. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The version number of the marker attributes. - */ - public Builder version(long version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - /** - * The version number of the marker attributes. - */ - public Builder version(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - public GetMediaMetaDataAttributes build() { - - return new GetMediaMetaDataAttributes( - id, version); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataChapter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataChapter.java deleted file mode 100644 index 34644a12..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataChapter.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; - -/** - * GetMediaMetaDataChapter - * - *

The thumbnail for the chapter - */ -public class GetMediaMetaDataChapter { - - @JsonProperty("id") - private long id; - - - @JsonProperty("filter") - private String filter; - - - @JsonProperty("index") - private long index; - - - @JsonProperty("startTimeOffset") - private long startTimeOffset; - - - @JsonProperty("endTimeOffset") - private long endTimeOffset; - - - @JsonProperty("thumb") - private String thumb; - - @JsonCreator - public GetMediaMetaDataChapter( - @JsonProperty("id") long id, - @JsonProperty("filter") String filter, - @JsonProperty("index") long index, - @JsonProperty("startTimeOffset") long startTimeOffset, - @JsonProperty("endTimeOffset") long endTimeOffset, - @JsonProperty("thumb") String thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.filter = filter; - this.index = index; - this.startTimeOffset = startTimeOffset; - this.endTimeOffset = endTimeOffset; - this.thumb = thumb; - } - - @JsonIgnore - public long id() { - return id; - } - - @JsonIgnore - public String filter() { - return filter; - } - - @JsonIgnore - public long index() { - return index; - } - - @JsonIgnore - public long startTimeOffset() { - return startTimeOffset; - } - - @JsonIgnore - public long endTimeOffset() { - return endTimeOffset; - } - - @JsonIgnore - public String thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataChapter withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetMediaMetaDataChapter withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetMediaMetaDataChapter withIndex(long index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public GetMediaMetaDataChapter withStartTimeOffset(long startTimeOffset) { - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - this.startTimeOffset = startTimeOffset; - return this; - } - - public GetMediaMetaDataChapter withEndTimeOffset(long endTimeOffset) { - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - this.endTimeOffset = endTimeOffset; - return this; - } - - public GetMediaMetaDataChapter withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataChapter other = (GetMediaMetaDataChapter) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.startTimeOffset, other.startTimeOffset) && - Utils.enhancedDeepEquals(this.endTimeOffset, other.endTimeOffset) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, index, - startTimeOffset, endTimeOffset, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataChapter.class, - "id", id, - "filter", filter, - "index", index, - "startTimeOffset", startTimeOffset, - "endTimeOffset", endTimeOffset, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String filter; - - private Long index; - - private Long startTimeOffset; - - private Long endTimeOffset; - - private String thumb; - - private Builder() { - // force use of static builder() method - } - - - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - public Builder index(long index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - - public Builder startTimeOffset(long startTimeOffset) { - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - this.startTimeOffset = startTimeOffset; - return this; - } - - - public Builder endTimeOffset(long endTimeOffset) { - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - this.endTimeOffset = endTimeOffset; - return this; - } - - - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetMediaMetaDataChapter build() { - - return new GetMediaMetaDataChapter( - id, filter, index, - startTimeOffset, endTimeOffset, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataCountry.java deleted file mode 100644 index 6729fda0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataCountry.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - -/** - * GetMediaMetaDataCountry - * - *

The filter query string for country media items. - */ -public class GetMediaMetaDataCountry { - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - /** - * The country of origin of this media item - */ - @JsonProperty("tag") - private String tag; - - - @JsonProperty("filter") - private String filter; - - @JsonCreator - public GetMediaMetaDataCountry( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("filter") String filter) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(filter, "filter"); - this.id = id; - this.tag = tag; - this.filter = filter; - } - - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The country of origin of this media item - */ - @JsonIgnore - public String tag() { - return tag; - } - - @JsonIgnore - public String filter() { - return filter; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public GetMediaMetaDataCountry withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The country of origin of this media item - */ - public GetMediaMetaDataCountry withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetMediaMetaDataCountry withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataCountry other = (GetMediaMetaDataCountry) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.filter, other.filter); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, filter); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataCountry.class, - "id", id, - "tag", tag, - "filter", filter); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private String filter; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The country of origin of this media item - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetMediaMetaDataCountry build() { - - return new GetMediaMetaDataCountry( - id, tag, filter); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataDirector.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataDirector.java deleted file mode 100644 index 6e7b2dff..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataDirector.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaMetaDataDirector { - /** - * Unique identifier for the director. - */ - @JsonProperty("id") - private int id; - - /** - * The role of Director - */ - @JsonProperty("tag") - private String tag; - - /** - * The filter string used to query this director. - */ - @JsonProperty("filter") - private String filter; - - /** - * A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. - */ - @JsonProperty("tagKey") - private String tagKey; - - /** - * The absolute URL of the thumbnail image for the director. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetMediaMetaDataDirector( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("filter") String filter, - @JsonProperty("tagKey") String tagKey, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tagKey, "tagKey"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.tag = tag; - this.filter = filter; - this.tagKey = tagKey; - this.thumb = thumb; - } - - public GetMediaMetaDataDirector( - int id, - String tag, - String filter, - String tagKey) { - this(id, tag, filter, - tagKey, Optional.empty()); - } - - /** - * Unique identifier for the director. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The role of Director - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * The filter string used to query this director. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. - */ - @JsonIgnore - public String tagKey() { - return tagKey; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique identifier for the director. - */ - public GetMediaMetaDataDirector withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The role of Director - */ - public GetMediaMetaDataDirector withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * The filter string used to query this director. - */ - public GetMediaMetaDataDirector withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. - */ - public GetMediaMetaDataDirector withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - public GetMediaMetaDataDirector withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the director. - */ - public GetMediaMetaDataDirector withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataDirector other = (GetMediaMetaDataDirector) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, filter, - tagKey, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataDirector.class, - "id", id, - "tag", tag, - "filter", filter, - "tagKey", tagKey, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private String filter; - - private String tagKey; - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique identifier for the director. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The role of Director - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * The filter string used to query this director. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the director. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetMediaMetaDataDirector build() { - - return new GetMediaMetaDataDirector( - id, tag, filter, - tagKey, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataExtras.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataExtras.java deleted file mode 100644 index 505de32b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataExtras.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaMetaDataExtras { - /** - * The size of the extras. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - @JsonCreator - public GetMediaMetaDataExtras( - @JsonProperty("size") Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - } - - public GetMediaMetaDataExtras() { - this(Optional.empty()); - } - - /** - * The size of the extras. - */ - @JsonIgnore - public Optional size() { - return size; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The size of the extras. - */ - public GetMediaMetaDataExtras withSize(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - /** - * The size of the extras. - */ - public GetMediaMetaDataExtras withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataExtras other = (GetMediaMetaDataExtras) o; - return - Utils.enhancedDeepEquals(this.size, other.size); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataExtras.class, - "size", size); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The size of the extras. - */ - public Builder size(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - /** - * The size of the extras. - */ - public Builder size(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetMediaMetaDataExtras build() { - - return new GetMediaMetaDataExtras( - size); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGenre.java deleted file mode 100644 index ffac8a4e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGenre.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - -/** - * GetMediaMetaDataGenre - * - *

The filter query string for similar items. - */ -public class GetMediaMetaDataGenre { - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - /** - * The genre name of this media-item - */ - @JsonProperty("tag") - private String tag; - - - @JsonProperty("filter") - private String filter; - - @JsonCreator - public GetMediaMetaDataGenre( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("filter") String filter) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(filter, "filter"); - this.id = id; - this.tag = tag; - this.filter = filter; - } - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The genre name of this media-item - */ - @JsonIgnore - public String tag() { - return tag; - } - - @JsonIgnore - public String filter() { - return filter; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public GetMediaMetaDataGenre withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The genre name of this media-item - */ - public GetMediaMetaDataGenre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetMediaMetaDataGenre withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataGenre other = (GetMediaMetaDataGenre) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.filter, other.filter); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, filter); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataGenre.class, - "id", id, - "tag", tag, - "filter", filter); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private String filter; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The genre name of this media-item - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetMediaMetaDataGenre build() { - - return new GetMediaMetaDataGenre( - id, tag, filter); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGuids.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGuids.java deleted file mode 100644 index 5c31d639..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataGuids.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetMediaMetaDataGuids { - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - @JsonProperty("id") - private String id; - - @JsonCreator - public GetMediaMetaDataGuids( - @JsonProperty("id") String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - } - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - @JsonIgnore - public String id() { - return id; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - public GetMediaMetaDataGuids 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; - } - GetMediaMetaDataGuids other = (GetMediaMetaDataGuids) o; - return - Utils.enhancedDeepEquals(this.id, other.id); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataGuids.class, - "id", id); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String id; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetMediaMetaDataGuids build() { - - return new GetMediaMetaDataGuids( - id); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataHasThumbnail.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataHasThumbnail.java deleted file mode 100644 index 82059c9e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataHasThumbnail.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetMediaMetaDataHasThumbnail - * - *

Indicates if the part has a thumbnail. - */ -public enum GetMediaMetaDataHasThumbnail { - False("0"), - True("1"); - - @JsonValue - private final String value; - - GetMediaMetaDataHasThumbnail(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetMediaMetaDataHasThumbnail o: GetMediaMetaDataHasThumbnail.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataImage.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataImage.java deleted file mode 100644 index aa0bd223..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataImage.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetMediaMetaDataImage { - - @JsonProperty("alt") - private String alt; - - - @JsonProperty("type") - private GetMediaMetaDataLibraryType type; - - - @JsonProperty("url") - private String url; - - @JsonCreator - public GetMediaMetaDataImage( - @JsonProperty("alt") String alt, - @JsonProperty("type") GetMediaMetaDataLibraryType 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 GetMediaMetaDataLibraryType type() { - return type; - } - - @JsonIgnore - public String url() { - return url; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataImage withAlt(String alt) { - Utils.checkNotNull(alt, "alt"); - this.alt = alt; - return this; - } - - public GetMediaMetaDataImage withType(GetMediaMetaDataLibraryType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetMediaMetaDataImage 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; - } - GetMediaMetaDataImage other = (GetMediaMetaDataImage) o; - return - Utils.enhancedDeepEquals(this.alt, other.alt) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.url, other.url); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - alt, type, url); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataImage.class, - "alt", alt, - "type", type, - "url", url); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String alt; - - private GetMediaMetaDataLibraryType 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(GetMediaMetaDataLibraryType 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 GetMediaMetaDataImage build() { - - return new GetMediaMetaDataImage( - alt, type, url); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.java deleted file mode 100644 index 39e8092a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLibraryOptimizedForStreaming.java +++ /dev/null @@ -1,100 +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.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; - -/** - * GetMediaMetaDataLibraryOptimizedForStreaming - * - *

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

    - *
  • {@code dev.plexapi.sdk.models.operations.GetMediaMetaDataOptimizedForStreamingLibrary1}
  • - *
  • {@code boolean}
  • - *
- * - *

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

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

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

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

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -@JsonDeserialize(using = GetMediaMetaDataLibraryType._Deserializer.class) -@JsonSerialize(using = GetMediaMetaDataLibraryType._Serializer.class) -public class GetMediaMetaDataLibraryType { - - public static final GetMediaMetaDataLibraryType COVER_POSTER = new GetMediaMetaDataLibraryType("coverPoster"); - public static final GetMediaMetaDataLibraryType BACKGROUND = new GetMediaMetaDataLibraryType("background"); - public static final GetMediaMetaDataLibraryType SNAPSHOT = new GetMediaMetaDataLibraryType("snapshot"); - public static final GetMediaMetaDataLibraryType CLEAR_LOGO = new GetMediaMetaDataLibraryType("clearLogo"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetMediaMetaDataLibraryType(String value) { - this.value = value; - } - - /** - * Returns a GetMediaMetaDataLibraryType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetMediaMetaDataLibraryType - */ - public static GetMediaMetaDataLibraryType of(String value) { - synchronized (GetMediaMetaDataLibraryType.class) { - return values.computeIfAbsent(value, v -> new GetMediaMetaDataLibraryType(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetMediaMetaDataLibraryType other = (GetMediaMetaDataLibraryType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetMediaMetaDataLibraryType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetMediaMetaDataLibraryType[] values() { - synchronized (GetMediaMetaDataLibraryType.class) { - return values.values().toArray(new GetMediaMetaDataLibraryType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("coverPoster", COVER_POSTER); - map.put("background", BACKGROUND); - map.put("snapshot", SNAPSHOT); - map.put("clearLogo", CLEAR_LOGO); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("coverPoster", GetMediaMetaDataLibraryTypeEnum.COVER_POSTER); - map.put("background", GetMediaMetaDataLibraryTypeEnum.BACKGROUND); - map.put("snapshot", GetMediaMetaDataLibraryTypeEnum.SNAPSHOT); - map.put("clearLogo", GetMediaMetaDataLibraryTypeEnum.CLEAR_LOGO); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetMediaMetaDataLibraryType.class); - } - - @Override - public void serialize(GetMediaMetaDataLibraryType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetMediaMetaDataLibraryType.class); - } - - @Override - public GetMediaMetaDataLibraryType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetMediaMetaDataLibraryType.of(v); - } - } - - public enum GetMediaMetaDataLibraryTypeEnum { - - COVER_POSTER("coverPoster"), - BACKGROUND("background"), - SNAPSHOT("snapshot"), - CLEAR_LOGO("clearLogo"),; - - private final String value; - - private GetMediaMetaDataLibraryTypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLocation.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLocation.java deleted file mode 100644 index ab0b8521..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataLocation.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetMediaMetaDataLocation { - /** - * The file path for the location. - */ - @JsonProperty("path") - private String path; - - @JsonCreator - public GetMediaMetaDataLocation( - @JsonProperty("path") String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - } - - /** - * The file path for the location. - */ - @JsonIgnore - public String path() { - return path; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The file path for the location. - */ - public GetMediaMetaDataLocation withPath(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataLocation other = (GetMediaMetaDataLocation) o; - return - Utils.enhancedDeepEquals(this.path, other.path); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - path); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataLocation.class, - "path", path); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String path; - - private Builder() { - // force use of static builder() method - } - - - /** - * The file path for the location. - */ - public Builder path(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - return this; - } - - public GetMediaMetaDataLocation build() { - - return new GetMediaMetaDataLocation( - path); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMarker.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMarker.java deleted file mode 100644 index 017e2d88..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMarker.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetMediaMetaDataMarker - * - *

The final status of the marker - */ -public class GetMediaMetaDataMarker { - - @JsonProperty("id") - private long id; - - - @JsonProperty("type") - private String type; - - - @JsonProperty("startTimeOffset") - private long startTimeOffset; - - - @JsonProperty("endTimeOffset") - private long endTimeOffset; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("final") - private Optional final_; - - /** - * Attributes associated with the marker. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Attributes") - private Optional attributes; - - @JsonCreator - public GetMediaMetaDataMarker( - @JsonProperty("id") long id, - @JsonProperty("type") String type, - @JsonProperty("startTimeOffset") long startTimeOffset, - @JsonProperty("endTimeOffset") long endTimeOffset, - @JsonProperty("final") Optional final_, - @JsonProperty("Attributes") Optional attributes) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - Utils.checkNotNull(final_, "final_"); - Utils.checkNotNull(attributes, "attributes"); - this.id = id; - this.type = type; - this.startTimeOffset = startTimeOffset; - this.endTimeOffset = endTimeOffset; - this.final_ = final_; - this.attributes = attributes; - } - - public GetMediaMetaDataMarker( - long id, - String type, - long startTimeOffset, - long endTimeOffset) { - this(id, type, startTimeOffset, - endTimeOffset, Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public long id() { - return id; - } - - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public long startTimeOffset() { - return startTimeOffset; - } - - @JsonIgnore - public long endTimeOffset() { - return endTimeOffset; - } - - @JsonIgnore - public Optional final_() { - return final_; - } - - /** - * Attributes associated with the marker. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional attributes() { - return (Optional) attributes; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataMarker withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetMediaMetaDataMarker withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetMediaMetaDataMarker withStartTimeOffset(long startTimeOffset) { - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - this.startTimeOffset = startTimeOffset; - return this; - } - - public GetMediaMetaDataMarker withEndTimeOffset(long endTimeOffset) { - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - this.endTimeOffset = endTimeOffset; - return this; - } - - public GetMediaMetaDataMarker withFinal(boolean final_) { - Utils.checkNotNull(final_, "final_"); - this.final_ = Optional.ofNullable(final_); - return this; - } - - - public GetMediaMetaDataMarker withFinal(Optional final_) { - Utils.checkNotNull(final_, "final_"); - this.final_ = final_; - return this; - } - - /** - * Attributes associated with the marker. - */ - public GetMediaMetaDataMarker withAttributes(GetMediaMetaDataAttributes attributes) { - Utils.checkNotNull(attributes, "attributes"); - this.attributes = Optional.ofNullable(attributes); - return this; - } - - - /** - * Attributes associated with the marker. - */ - public GetMediaMetaDataMarker withAttributes(Optional attributes) { - Utils.checkNotNull(attributes, "attributes"); - this.attributes = attributes; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataMarker other = (GetMediaMetaDataMarker) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.startTimeOffset, other.startTimeOffset) && - Utils.enhancedDeepEquals(this.endTimeOffset, other.endTimeOffset) && - Utils.enhancedDeepEquals(this.final_, other.final_) && - Utils.enhancedDeepEquals(this.attributes, other.attributes); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, type, startTimeOffset, - endTimeOffset, final_, attributes); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataMarker.class, - "id", id, - "type", type, - "startTimeOffset", startTimeOffset, - "endTimeOffset", endTimeOffset, - "final_", final_, - "attributes", attributes); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String type; - - private Long startTimeOffset; - - private Long endTimeOffset; - - private Optional final_ = Optional.empty(); - - private Optional attributes = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - public Builder startTimeOffset(long startTimeOffset) { - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - this.startTimeOffset = startTimeOffset; - return this; - } - - - public Builder endTimeOffset(long endTimeOffset) { - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - this.endTimeOffset = endTimeOffset; - return this; - } - - - public Builder final_(boolean final_) { - Utils.checkNotNull(final_, "final_"); - this.final_ = Optional.ofNullable(final_); - return this; - } - - public Builder final_(Optional final_) { - Utils.checkNotNull(final_, "final_"); - this.final_ = final_; - return this; - } - - - /** - * Attributes associated with the marker. - */ - public Builder attributes(GetMediaMetaDataAttributes attributes) { - Utils.checkNotNull(attributes, "attributes"); - this.attributes = Optional.ofNullable(attributes); - return this; - } - - /** - * Attributes associated with the marker. - */ - public Builder attributes(Optional attributes) { - Utils.checkNotNull(attributes, "attributes"); - this.attributes = attributes; - return this; - } - - public GetMediaMetaDataMarker build() { - - return new GetMediaMetaDataMarker( - id, type, startTimeOffset, - endTimeOffset, final_, attributes); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMedia.java deleted file mode 100644 index d2d4f0c5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMedia.java +++ /dev/null @@ -1,1187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Float; -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.Optional; - - -public class GetMediaMetaDataMedia { - /** - * Unique media identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Duration of the media in milliseconds. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - /** - * Bitrate in bits per second. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - /** - * Video width in pixels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("width") - private Optional width; - - /** - * Video height in pixels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("height") - private Optional height; - - /** - * Aspect ratio of the video. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("aspectRatio") - private Optional aspectRatio; - - /** - * Number of audio channels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannels") - private Optional audioChannels; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("displayOffset") - private Optional displayOffset; - - /** - * Audio codec used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioCodec") - private Optional audioCodec; - - /** - * Video codec used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoCodec") - private Optional videoCodec; - - /** - * Video resolution (e.g., 4k). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoResolution") - private Optional videoResolution; - - /** - * Container format of the media. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoFrameRate") - private Optional videoFrameRate; - - /** - * Video profile (e.g., main 10). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - /** - * Indicates whether voice activity is detected. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasVoiceActivity") - private Optional hasVoiceActivity; - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Part") - private Optional> part; - - @JsonCreator - public GetMediaMetaDataMedia( - @JsonProperty("id") long id, - @JsonProperty("duration") Optional duration, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("width") Optional width, - @JsonProperty("height") Optional height, - @JsonProperty("aspectRatio") Optional aspectRatio, - @JsonProperty("audioChannels") Optional audioChannels, - @JsonProperty("displayOffset") Optional displayOffset, - @JsonProperty("audioCodec") Optional audioCodec, - @JsonProperty("videoCodec") Optional videoCodec, - @JsonProperty("videoResolution") Optional videoResolution, - @JsonProperty("container") Optional container, - @JsonProperty("videoFrameRate") Optional videoFrameRate, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("Part") 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(displayOffset, "displayOffset"); - 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(audioProfile, "audioProfile"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - 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.displayOffset = displayOffset; - this.audioCodec = audioCodec; - this.videoCodec = videoCodec; - this.videoResolution = videoResolution; - this.container = container; - this.videoFrameRate = videoFrameRate; - this.videoProfile = videoProfile; - this.hasVoiceActivity = hasVoiceActivity; - this.audioProfile = audioProfile; - this.optimizedForStreaming = optimizedForStreaming; - this.has64bitOffsets = has64bitOffsets; - this.part = part; - } - - public GetMediaMetaDataMedia( - long id) { - this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Unique media identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Duration of the media in milliseconds. - */ - @JsonIgnore - public Optional duration() { - return duration; - } - - /** - * Bitrate in bits per second. - */ - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - /** - * Video width in pixels. - */ - @JsonIgnore - public Optional width() { - return width; - } - - /** - * Video height in pixels. - */ - @JsonIgnore - public Optional height() { - return height; - } - - /** - * Aspect ratio of the video. - */ - @JsonIgnore - public Optional aspectRatio() { - return aspectRatio; - } - - /** - * Number of audio channels. - */ - @JsonIgnore - public Optional audioChannels() { - return audioChannels; - } - - @JsonIgnore - public Optional displayOffset() { - return displayOffset; - } - - /** - * Audio codec used. - */ - @JsonIgnore - public Optional audioCodec() { - return audioCodec; - } - - /** - * Video codec used. - */ - @JsonIgnore - public Optional videoCodec() { - return videoCodec; - } - - /** - * Video resolution (e.g., 4k). - */ - @JsonIgnore - public Optional videoResolution() { - return videoResolution; - } - - /** - * Container format of the media. - */ - @JsonIgnore - public Optional container() { - return container; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - @JsonIgnore - public Optional videoFrameRate() { - return videoFrameRate; - } - - /** - * Video profile (e.g., main 10). - */ - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - /** - * Indicates whether voice activity is detected. - */ - @JsonIgnore - public Optional hasVoiceActivity() { - return hasVoiceActivity; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional optimizedForStreaming() { - return (Optional) optimizedForStreaming; - } - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> part() { - return (Optional>) part; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique media identifier. - */ - public GetMediaMetaDataMedia withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Duration of the media in milliseconds. - */ - public GetMediaMetaDataMedia withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - /** - * Duration of the media in milliseconds. - */ - public GetMediaMetaDataMedia withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * Bitrate in bits per second. - */ - public GetMediaMetaDataMedia withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - /** - * Bitrate in bits per second. - */ - public GetMediaMetaDataMedia withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * Video width in pixels. - */ - public GetMediaMetaDataMedia withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - /** - * Video width in pixels. - */ - public GetMediaMetaDataMedia withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Video height in pixels. - */ - public GetMediaMetaDataMedia withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - /** - * Video height in pixels. - */ - public GetMediaMetaDataMedia withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * Aspect ratio of the video. - */ - public GetMediaMetaDataMedia withAspectRatio(float aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - - /** - * Aspect ratio of the video. - */ - public GetMediaMetaDataMedia withAspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - /** - * Number of audio channels. - */ - public GetMediaMetaDataMedia withAudioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - - /** - * Number of audio channels. - */ - public GetMediaMetaDataMedia withAudioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - public GetMediaMetaDataMedia withDisplayOffset(int displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = Optional.ofNullable(displayOffset); - return this; - } - - - public GetMediaMetaDataMedia withDisplayOffset(Optional displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = displayOffset; - return this; - } - - /** - * Audio codec used. - */ - public GetMediaMetaDataMedia withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - - /** - * Audio codec used. - */ - public GetMediaMetaDataMedia withAudioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - /** - * Video codec used. - */ - public GetMediaMetaDataMedia withVideoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - - /** - * Video codec used. - */ - public GetMediaMetaDataMedia withVideoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - /** - * Video resolution (e.g., 4k). - */ - public GetMediaMetaDataMedia withVideoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - - /** - * Video resolution (e.g., 4k). - */ - public GetMediaMetaDataMedia withVideoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - /** - * Container format of the media. - */ - public GetMediaMetaDataMedia withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - /** - * Container format of the media. - */ - public GetMediaMetaDataMedia withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public GetMediaMetaDataMedia withVideoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public GetMediaMetaDataMedia withVideoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - /** - * Video profile (e.g., main 10). - */ - public GetMediaMetaDataMedia withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - /** - * Video profile (e.g., main 10). - */ - public GetMediaMetaDataMedia withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - /** - * Indicates whether voice activity is detected. - */ - public GetMediaMetaDataMedia withHasVoiceActivity(boolean hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); - return this; - } - - - /** - * Indicates whether voice activity is detected. - */ - public GetMediaMetaDataMedia withHasVoiceActivity(Optional hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = hasVoiceActivity; - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetMediaMetaDataMedia withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetMediaMetaDataMedia withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetMediaMetaDataMedia withOptimizedForStreaming(GetMediaMetaDataOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetMediaMetaDataMedia withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public GetMediaMetaDataMedia withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public GetMediaMetaDataMedia withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - public GetMediaMetaDataMedia withPart(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - - public GetMediaMetaDataMedia 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; - } - GetMediaMetaDataMedia other = (GetMediaMetaDataMedia) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.displayOffset, other.displayOffset) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && - Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.part, other.part); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, displayOffset, audioCodec, - videoCodec, videoResolution, container, - videoFrameRate, videoProfile, hasVoiceActivity, - audioProfile, optimizedForStreaming, has64bitOffsets, - part); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataMedia.class, - "id", id, - "duration", duration, - "bitrate", bitrate, - "width", width, - "height", height, - "aspectRatio", aspectRatio, - "audioChannels", audioChannels, - "displayOffset", displayOffset, - "audioCodec", audioCodec, - "videoCodec", videoCodec, - "videoResolution", videoResolution, - "container", container, - "videoFrameRate", videoFrameRate, - "videoProfile", videoProfile, - "hasVoiceActivity", hasVoiceActivity, - "audioProfile", audioProfile, - "optimizedForStreaming", optimizedForStreaming, - "has64bitOffsets", has64bitOffsets, - "part", part); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - 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 displayOffset = 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 videoProfile = Optional.empty(); - - private Optional hasVoiceActivity = Optional.empty(); - - private Optional audioProfile = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional> part = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique media identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Duration of the media in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - /** - * Duration of the media in milliseconds. - */ - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * Bitrate in bits per second. - */ - public Builder bitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * Bitrate in bits per second. - */ - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - - /** - * Video width in pixels. - */ - public Builder width(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * Video width in pixels. - */ - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - /** - * Video height in pixels. - */ - public Builder height(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * Video height in pixels. - */ - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - /** - * Aspect ratio of the video. - */ - public Builder aspectRatio(float aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - /** - * Aspect ratio of the video. - */ - public Builder aspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - - /** - * Number of audio channels. - */ - public Builder audioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - /** - * Number of audio channels. - */ - public Builder audioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - - public Builder displayOffset(int displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = Optional.ofNullable(displayOffset); - return this; - } - - public Builder displayOffset(Optional displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = displayOffset; - return this; - } - - - /** - * Audio codec used. - */ - public Builder audioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - /** - * Audio codec used. - */ - public Builder audioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - - /** - * Video codec used. - */ - public Builder videoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - /** - * Video codec used. - */ - public Builder videoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - - /** - * Video resolution (e.g., 4k). - */ - public Builder videoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - /** - * Video resolution (e.g., 4k). - */ - public Builder videoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - - /** - * Container format of the media. - */ - public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - /** - * Container format of the media. - */ - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Builder videoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Builder videoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - - /** - * Video profile (e.g., main 10). - */ - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - /** - * Video profile (e.g., main 10). - */ - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - - /** - * Indicates whether voice activity is detected. - */ - public Builder hasVoiceActivity(boolean hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); - return this; - } - - /** - * Indicates whether voice activity is detected. - */ - public Builder hasVoiceActivity(Optional hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = hasVoiceActivity; - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(GetMediaMetaDataOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public Builder has64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public Builder has64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - 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 GetMediaMetaDataMedia build() { - - return new GetMediaMetaDataMedia( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, displayOffset, audioCodec, - videoCodec, videoResolution, container, - videoFrameRate, videoProfile, hasVoiceActivity, - audioProfile, optimizedForStreaming, has64bitOffsets, - part); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMediaContainer.java deleted file mode 100644 index 0e26c436..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMediaContainer.java +++ /dev/null @@ -1,504 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.List; -import java.util.Optional; - - -public class GetMediaMetaDataMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * Indicates whether syncing is allowed. - */ - @JsonProperty("allowSync") - private boolean allowSync; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - /** - * The unique identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - /** - * The title of the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - /** - * The universally unique identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionUUID") - private Optional librarySectionUUID; - - /** - * The prefix used for media tag resource paths. - */ - @JsonProperty("mediaTagPrefix") - private String mediaTagPrefix; - - /** - * The version number for media tags. - */ - @JsonProperty("mediaTagVersion") - private long mediaTagVersion; - - /** - * An array of metadata items. - */ - @JsonProperty("Metadata") - private List metadata; - - @JsonCreator - public GetMediaMetaDataMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("identifier") String identifier, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionUUID") Optional librarySectionUUID, - @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("mediaTagVersion") long mediaTagVersion, - @JsonProperty("Metadata") List metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.allowSync = allowSync; - this.identifier = identifier; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionUUID = librarySectionUUID; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.metadata = metadata; - } - - public GetMediaMetaDataMediaContainer( - int size, - boolean allowSync, - String identifier, - String mediaTagPrefix, - long mediaTagVersion, - List metadata) { - this(size, allowSync, identifier, - Optional.empty(), Optional.empty(), Optional.empty(), - mediaTagPrefix, mediaTagVersion, metadata); - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * Indicates whether syncing is allowed. - */ - @JsonIgnore - public boolean allowSync() { - return allowSync; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - /** - * The unique identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - /** - * The title of the library section. - */ - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - /** - * The universally unique identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionUUID() { - return librarySectionUUID; - } - - /** - * The prefix used for media tag resource paths. - */ - @JsonIgnore - public String mediaTagPrefix() { - return mediaTagPrefix; - } - - /** - * The version number for media tags. - */ - @JsonIgnore - public long mediaTagVersion() { - return mediaTagVersion; - } - - /** - * An array of metadata items. - */ - @JsonIgnore - public List metadata() { - return metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetMediaMetaDataMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * Indicates whether syncing is allowed. - */ - public GetMediaMetaDataMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetMediaMetaDataMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - /** - * The unique identifier for the library section. - */ - public GetMediaMetaDataMediaContainer withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - /** - * The unique identifier for the library section. - */ - public GetMediaMetaDataMediaContainer withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - /** - * The title of the library section. - */ - public GetMediaMetaDataMediaContainer withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - /** - * The title of the library section. - */ - public GetMediaMetaDataMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - /** - * The universally unique identifier for the library section. - */ - public GetMediaMetaDataMediaContainer withLibrarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - - /** - * The universally unique identifier for the library section. - */ - public GetMediaMetaDataMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - /** - * The prefix used for media tag resource paths. - */ - public GetMediaMetaDataMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - /** - * The version number for media tags. - */ - public GetMediaMetaDataMediaContainer withMediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - /** - * An array of metadata items. - */ - public GetMediaMetaDataMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataMediaContainer other = (GetMediaMetaDataMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionUUID, other.librarySectionUUID) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowSync, identifier, - librarySectionID, librarySectionTitle, librarySectionUUID, - mediaTagPrefix, mediaTagVersion, metadata); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataMediaContainer.class, - "size", size, - "allowSync", allowSync, - "identifier", identifier, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionUUID", librarySectionUUID, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Boolean allowSync; - - private String identifier; - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionUUID = Optional.empty(); - - private String mediaTagPrefix; - - private Long mediaTagVersion; - - private List metadata; - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * Indicates whether syncing is allowed. - */ - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - /** - * The unique identifier for the library section. - */ - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - /** - * The unique identifier for the library section. - */ - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - - /** - * The universally unique identifier for the library section. - */ - public Builder librarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - /** - * The universally unique identifier for the library section. - */ - public Builder librarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - - /** - * The prefix used for media tag resource paths. - */ - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - - /** - * The version number for media tags. - */ - public Builder mediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - - /** - * An array of metadata items. - */ - public Builder metadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - public GetMediaMetaDataMediaContainer build() { - - return new GetMediaMetaDataMediaContainer( - size, allowSync, identifier, - librarySectionID, librarySectionTitle, librarySectionUUID, - mediaTagPrefix, mediaTagVersion, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMetadata.java deleted file mode 100644 index 5091db53..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataMetadata.java +++ /dev/null @@ -1,3892 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Float; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.LocalDate; -import java.util.List; -import java.util.Optional; - -/** - * GetMediaMetaDataMetadata - * - *

Unknown - */ -public class GetMediaMetaDataMetadata { - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - @JsonProperty("ratingKey") - private String ratingKey; - - /** - * The unique key for the media item. - */ - @JsonProperty("key") - private String key; - - /** - * The globally unique identifier for the media item. - */ - @JsonProperty("guid") - private String guid; - - /** - * A URL‐friendly version of the media title. - */ - @JsonProperty("slug") - private String slug; - - /** - * The studio that produced the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("studio") - private Optional studio; - - - @JsonProperty("type") - private GetMediaMetaDataType type; - - /** - * The title of the media item. - */ - @JsonProperty("title") - private String title; - - /** - * The sort title used for ordering media items. - */ - @JsonProperty("titleSort") - private String titleSort; - - /** - * The content rating for the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("contentRating") - private Optional contentRating; - - /** - * A synopsis of the media item. - */ - @JsonProperty("summary") - private String summary; - - /** - * The critic rating for the media item. - */ - @JsonProperty("rating") - private float rating; - - /** - * The audience rating for the media item. - */ - @JsonProperty("audienceRating") - private double audienceRating; - - /** - * The release year of the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("year") - private Optional year; - - /** - * A brief tagline for the media item. - */ - @JsonProperty("tagline") - private String tagline; - - /** - * The thumbnail image URL for the media item. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The art image URL for the media item. - */ - @JsonProperty("art") - private String art; - - /** - * The theme URL for the media item. - */ - @JsonProperty("theme") - private String theme; - - /** - * The index position of the media item. - */ - @JsonProperty("index") - private int index; - - /** - * The number of leaf items (end nodes) under this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - /** - * The number of leaf items that have been viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewedLeafCount") - private Optional viewedLeafCount; - - /** - * The number of child items associated with this media item. - */ - @JsonProperty("childCount") - private int childCount; - - /** - * The total number of seasons (for TV shows). - */ - @JsonProperty("seasonCount") - private int seasonCount; - - /** - * The duration of the media item in milliseconds. - */ - @JsonProperty("duration") - private int duration; - - /** - * The original release date of the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originallyAvailableAt") - private Optional originallyAvailableAt; - - - @JsonProperty("addedAt") - private long addedAt; - - /** - * Unix epoch datetime in seconds - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - /** - * The URL for the audience rating image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audienceRatingImage") - private Optional audienceRatingImage; - - /** - * The source from which chapter data is derived. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chapterSource") - private Optional chapterSource; - - /** - * The primary extra key associated with this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("primaryExtraKey") - private Optional primaryExtraKey; - - /** - * The original title of the media item (if different). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originalTitle") - private Optional originalTitle; - - /** - * The rating key of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentRatingKey") - private Optional parentRatingKey; - - /** - * The rating key of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentRatingKey") - private Optional grandparentRatingKey; - - /** - * The GUID of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentGuid") - private Optional parentGuid; - - /** - * The GUID of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentGuid") - private Optional grandparentGuid; - - /** - * The slug for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentSlug") - private Optional grandparentSlug; - - /** - * The key of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentKey") - private Optional grandparentKey; - - /** - * The key of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - /** - * The title of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTitle") - private Optional grandparentTitle; - - /** - * The thumbnail URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentThumb") - private Optional grandparentThumb; - - /** - * The theme URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTheme") - private Optional grandparentTheme; - - /** - * The art URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentArt") - private Optional grandparentArt; - - /** - * The title of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - /** - * The index position of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - /** - * The thumbnail URL for the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - /** - * The URL for the rating image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingImage") - private Optional ratingImage; - - /** - * The number of times this media item has been viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - /** - * The current playback offset (in milliseconds). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewOffset") - private Optional viewOffset; - - /** - * The number of times this media item has been skipped. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipCount") - private Optional skipCount; - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; - - /** - * The Unix timestamp representing the last time the item was rated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastRatedAt") - private Optional lastRatedAt; - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAtAccuracy") - private Optional createdAtAccuracy; - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAtTZOffset") - private Optional createdAtTZOffset; - - /** - * Unix timestamp for when the media item was last viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("userRating") - private Optional userRating; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Image") - private Optional> image; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("UltraBlurColors") - private Optional ultraBlurColors; - - /** - * The identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - /** - * The title of the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - /** - * The key corresponding to the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionKey") - private Optional librarySectionKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Guid") - private Optional> guids; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Media") - private Optional> media; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Genre") - private Optional> genre; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Country") - private Optional> country; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Director") - private Optional> director; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Writer") - private Optional> writer; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Producer") - private Optional> producer; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Role") - private Optional> role; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Rating") - private Optional> ratings; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Similar") - private Optional> similar; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Location") - private Optional> location; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Chapter") - private Optional> chapter; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Marker") - private Optional> marker; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Extras") - private Optional extras; - - @JsonCreator - public GetMediaMetaDataMetadata( - @JsonProperty("ratingKey") String ratingKey, - @JsonProperty("key") String key, - @JsonProperty("guid") String guid, - @JsonProperty("slug") String slug, - @JsonProperty("studio") Optional studio, - @JsonProperty("type") GetMediaMetaDataType type, - @JsonProperty("title") String title, - @JsonProperty("titleSort") String titleSort, - @JsonProperty("contentRating") Optional contentRating, - @JsonProperty("summary") String summary, - @JsonProperty("rating") float rating, - @JsonProperty("audienceRating") double audienceRating, - @JsonProperty("year") Optional year, - @JsonProperty("tagline") String tagline, - @JsonProperty("thumb") String thumb, - @JsonProperty("art") String art, - @JsonProperty("theme") String theme, - @JsonProperty("index") int index, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("viewedLeafCount") Optional viewedLeafCount, - @JsonProperty("childCount") int childCount, - @JsonProperty("seasonCount") int seasonCount, - @JsonProperty("duration") int duration, - @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, - @JsonProperty("addedAt") long addedAt, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("audienceRatingImage") Optional audienceRatingImage, - @JsonProperty("chapterSource") Optional chapterSource, - @JsonProperty("primaryExtraKey") Optional primaryExtraKey, - @JsonProperty("originalTitle") Optional originalTitle, - @JsonProperty("parentRatingKey") Optional parentRatingKey, - @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, - @JsonProperty("parentGuid") Optional parentGuid, - @JsonProperty("grandparentGuid") Optional grandparentGuid, - @JsonProperty("grandparentSlug") Optional grandparentSlug, - @JsonProperty("grandparentKey") Optional grandparentKey, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("grandparentTitle") Optional grandparentTitle, - @JsonProperty("grandparentThumb") Optional grandparentThumb, - @JsonProperty("grandparentTheme") Optional grandparentTheme, - @JsonProperty("grandparentArt") Optional grandparentArt, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("ratingImage") Optional ratingImage, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("viewOffset") Optional viewOffset, - @JsonProperty("skipCount") Optional skipCount, - @JsonProperty("subtype") Optional subtype, - @JsonProperty("lastRatedAt") Optional lastRatedAt, - @JsonProperty("createdAtAccuracy") Optional createdAtAccuracy, - @JsonProperty("createdAtTZOffset") Optional createdAtTZOffset, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("userRating") Optional userRating, - @JsonProperty("Image") Optional> image, - @JsonProperty("UltraBlurColors") Optional ultraBlurColors, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionKey") Optional librarySectionKey, - @JsonProperty("Guid") Optional> guids, - @JsonProperty("Media") Optional> media, - @JsonProperty("Genre") Optional> genre, - @JsonProperty("Country") Optional> country, - @JsonProperty("Director") Optional> director, - @JsonProperty("Writer") Optional> writer, - @JsonProperty("Producer") Optional> producer, - @JsonProperty("Role") Optional> role, - @JsonProperty("Rating") Optional> ratings, - @JsonProperty("Similar") Optional> similar, - @JsonProperty("Location") Optional> location, - @JsonProperty("Chapter") Optional> chapter, - @JsonProperty("Marker") Optional> marker, - @JsonProperty("Extras") Optional extras) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(slug, "slug"); - Utils.checkNotNull(studio, "studio"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(titleSort, "titleSort"); - Utils.checkNotNull(contentRating, "contentRating"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(rating, "rating"); - Utils.checkNotNull(audienceRating, "audienceRating"); - Utils.checkNotNull(year, "year"); - Utils.checkNotNull(tagline, "tagline"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(theme, "theme"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - Utils.checkNotNull(childCount, "childCount"); - Utils.checkNotNull(seasonCount, "seasonCount"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - Utils.checkNotNull(chapterSource, "chapterSource"); - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - Utils.checkNotNull(originalTitle, "originalTitle"); - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - Utils.checkNotNull(parentGuid, "parentGuid"); - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - Utils.checkNotNull(grandparentKey, "grandparentKey"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - Utils.checkNotNull(grandparentArt, "grandparentArt"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(ratingImage, "ratingImage"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(viewOffset, "viewOffset"); - Utils.checkNotNull(skipCount, "skipCount"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(userRating, "userRating"); - Utils.checkNotNull(image, "image"); - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - Utils.checkNotNull(guids, "guids"); - Utils.checkNotNull(media, "media"); - Utils.checkNotNull(genre, "genre"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(director, "director"); - Utils.checkNotNull(writer, "writer"); - Utils.checkNotNull(producer, "producer"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(ratings, "ratings"); - Utils.checkNotNull(similar, "similar"); - Utils.checkNotNull(location, "location"); - Utils.checkNotNull(chapter, "chapter"); - Utils.checkNotNull(marker, "marker"); - Utils.checkNotNull(extras, "extras"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.slug = slug; - this.studio = studio; - this.type = type; - this.title = title; - this.titleSort = titleSort; - 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.theme = theme; - this.index = index; - this.leafCount = leafCount; - this.viewedLeafCount = viewedLeafCount; - this.childCount = childCount; - this.seasonCount = seasonCount; - this.duration = duration; - this.originallyAvailableAt = originallyAvailableAt; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - this.audienceRatingImage = audienceRatingImage; - this.chapterSource = chapterSource; - this.primaryExtraKey = primaryExtraKey; - this.originalTitle = originalTitle; - this.parentRatingKey = parentRatingKey; - this.grandparentRatingKey = grandparentRatingKey; - this.parentGuid = parentGuid; - this.grandparentGuid = grandparentGuid; - this.grandparentSlug = grandparentSlug; - this.grandparentKey = grandparentKey; - this.parentKey = parentKey; - this.grandparentTitle = grandparentTitle; - this.grandparentThumb = grandparentThumb; - this.grandparentTheme = grandparentTheme; - this.grandparentArt = grandparentArt; - this.parentTitle = parentTitle; - this.parentIndex = parentIndex; - this.parentThumb = parentThumb; - this.ratingImage = ratingImage; - this.viewCount = viewCount; - this.viewOffset = viewOffset; - this.skipCount = skipCount; - this.subtype = subtype; - this.lastRatedAt = lastRatedAt; - this.createdAtAccuracy = createdAtAccuracy; - this.createdAtTZOffset = createdAtTZOffset; - this.lastViewedAt = lastViewedAt; - this.userRating = userRating; - this.image = image; - this.ultraBlurColors = ultraBlurColors; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionKey = librarySectionKey; - this.guids = guids; - this.media = media; - this.genre = genre; - this.country = country; - this.director = director; - this.writer = writer; - this.producer = producer; - this.role = role; - this.ratings = ratings; - this.similar = similar; - this.location = location; - this.chapter = chapter; - this.marker = marker; - this.extras = extras; - } - - public GetMediaMetaDataMetadata( - String ratingKey, - String key, - String guid, - String slug, - GetMediaMetaDataType type, - String title, - String titleSort, - String summary, - float rating, - double audienceRating, - String tagline, - String thumb, - String art, - String theme, - int index, - int childCount, - int seasonCount, - int duration, - long addedAt) { - this(ratingKey, key, guid, - slug, Optional.empty(), type, - title, titleSort, Optional.empty(), - summary, rating, audienceRating, - Optional.empty(), tagline, thumb, - art, theme, index, - Optional.empty(), Optional.empty(), childCount, - seasonCount, duration, Optional.empty(), - addedAt, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - @JsonIgnore - public String ratingKey() { - return ratingKey; - } - - /** - * The unique key for the media item. - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The globally unique identifier for the media item. - */ - @JsonIgnore - public String guid() { - return guid; - } - - /** - * A URL‐friendly version of the media title. - */ - @JsonIgnore - public String slug() { - return slug; - } - - /** - * The studio that produced the media item. - */ - @JsonIgnore - public Optional studio() { - return studio; - } - - @JsonIgnore - public GetMediaMetaDataType type() { - return type; - } - - /** - * The title of the media item. - */ - @JsonIgnore - public String title() { - return title; - } - - /** - * The sort title used for ordering media items. - */ - @JsonIgnore - public String titleSort() { - return titleSort; - } - - /** - * The content rating for the media item. - */ - @JsonIgnore - public Optional contentRating() { - return contentRating; - } - - /** - * A synopsis of the media item. - */ - @JsonIgnore - public String summary() { - return summary; - } - - /** - * The critic rating for the media item. - */ - @JsonIgnore - public float rating() { - return rating; - } - - /** - * The audience rating for the media item. - */ - @JsonIgnore - public double audienceRating() { - return audienceRating; - } - - /** - * The release year of the media item. - */ - @JsonIgnore - public Optional year() { - return year; - } - - /** - * A brief tagline for the media item. - */ - @JsonIgnore - public String tagline() { - return tagline; - } - - /** - * The thumbnail image URL for the media item. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The art image URL for the media item. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * The theme URL for the media item. - */ - @JsonIgnore - public String theme() { - return theme; - } - - /** - * The index position of the media item. - */ - @JsonIgnore - public int index() { - return index; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - /** - * The number of leaf items that have been viewed. - */ - @JsonIgnore - public Optional viewedLeafCount() { - return viewedLeafCount; - } - - /** - * The number of child items associated with this media item. - */ - @JsonIgnore - public int childCount() { - return childCount; - } - - /** - * The total number of seasons (for TV shows). - */ - @JsonIgnore - public int seasonCount() { - return seasonCount; - } - - /** - * The duration of the media item in milliseconds. - */ - @JsonIgnore - public int duration() { - return duration; - } - - /** - * The original release date of the media item. - */ - @JsonIgnore - public Optional originallyAvailableAt() { - return originallyAvailableAt; - } - - @JsonIgnore - public long addedAt() { - return addedAt; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - /** - * The URL for the audience rating image. - */ - @JsonIgnore - public Optional audienceRatingImage() { - return audienceRatingImage; - } - - /** - * The source from which chapter data is derived. - */ - @JsonIgnore - public Optional chapterSource() { - return chapterSource; - } - - /** - * The primary extra key associated with this media item. - */ - @JsonIgnore - public Optional primaryExtraKey() { - return primaryExtraKey; - } - - /** - * The original title of the media item (if different). - */ - @JsonIgnore - public Optional originalTitle() { - return originalTitle; - } - - /** - * The rating key of the parent media item. - */ - @JsonIgnore - public Optional parentRatingKey() { - return parentRatingKey; - } - - /** - * The rating key of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentRatingKey() { - return grandparentRatingKey; - } - - /** - * The GUID of the parent media item. - */ - @JsonIgnore - public Optional parentGuid() { - return parentGuid; - } - - /** - * The GUID of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentGuid() { - return grandparentGuid; - } - - /** - * The slug for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentSlug() { - return grandparentSlug; - } - - /** - * The key of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentKey() { - return grandparentKey; - } - - /** - * The key of the parent media item. - */ - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - /** - * The title of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentTitle() { - return grandparentTitle; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentThumb() { - return grandparentThumb; - } - - /** - * The theme URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentTheme() { - return grandparentTheme; - } - - /** - * The art URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentArt() { - return grandparentArt; - } - - /** - * The title of the parent media item. - */ - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - /** - * The index position of the parent media item. - */ - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - /** - * The thumbnail URL for the parent media item. - */ - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - /** - * The URL for the rating image. - */ - @JsonIgnore - public Optional ratingImage() { - return ratingImage; - } - - /** - * The number of times this media item has been viewed. - */ - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - /** - * The current playback offset (in milliseconds). - */ - @JsonIgnore - public Optional viewOffset() { - return viewOffset; - } - - /** - * The number of times this media item has been skipped. - */ - @JsonIgnore - public Optional skipCount() { - return skipCount; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - @JsonIgnore - public Optional subtype() { - return subtype; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - @JsonIgnore - public Optional lastRatedAt() { - return lastRatedAt; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - @JsonIgnore - public Optional createdAtAccuracy() { - return createdAtAccuracy; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - @JsonIgnore - public Optional createdAtTZOffset() { - return createdAtTZOffset; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - @JsonIgnore - public Optional userRating() { - return userRating; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> image() { - return (Optional>) image; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional ultraBlurColors() { - return (Optional) ultraBlurColors; - } - - /** - * The identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - /** - * The title of the library section. - */ - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - /** - * The key corresponding to the library section. - */ - @JsonIgnore - public Optional librarySectionKey() { - return librarySectionKey; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> guids() { - return (Optional>) guids; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> media() { - return (Optional>) media; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> genre() { - return (Optional>) genre; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> country() { - return (Optional>) country; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> director() { - return (Optional>) director; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> writer() { - return (Optional>) writer; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> producer() { - return (Optional>) producer; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> role() { - return (Optional>) role; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> ratings() { - return (Optional>) ratings; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> similar() { - return (Optional>) similar; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> location() { - return (Optional>) location; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> chapter() { - return (Optional>) chapter; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> marker() { - return (Optional>) marker; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional extras() { - return (Optional) extras; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - public GetMediaMetaDataMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * The unique key for the media item. - */ - public GetMediaMetaDataMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The globally unique identifier for the media item. - */ - public GetMediaMetaDataMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - /** - * A URL‐friendly version of the media title. - */ - public GetMediaMetaDataMetadata withSlug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - /** - * The studio that produced the media item. - */ - public GetMediaMetaDataMetadata withStudio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - - /** - * The studio that produced the media item. - */ - public GetMediaMetaDataMetadata withStudio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - public GetMediaMetaDataMetadata withType(GetMediaMetaDataType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The title of the media item. - */ - public GetMediaMetaDataMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * The sort title used for ordering media items. - */ - public GetMediaMetaDataMetadata withTitleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - /** - * The content rating for the media item. - */ - public GetMediaMetaDataMetadata withContentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - - /** - * The content rating for the media item. - */ - public GetMediaMetaDataMetadata withContentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - /** - * A synopsis of the media item. - */ - public GetMediaMetaDataMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - /** - * The critic rating for the media item. - */ - public GetMediaMetaDataMetadata withRating(float rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - /** - * The audience rating for the media item. - */ - public GetMediaMetaDataMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - /** - * The release year of the media item. - */ - public GetMediaMetaDataMetadata withYear(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - - /** - * The release year of the media item. - */ - public GetMediaMetaDataMetadata withYear(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - /** - * A brief tagline for the media item. - */ - public GetMediaMetaDataMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - /** - * The thumbnail image URL for the media item. - */ - public GetMediaMetaDataMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The art image URL for the media item. - */ - public GetMediaMetaDataMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * The theme URL for the media item. - */ - public GetMediaMetaDataMetadata withTheme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - /** - * The index position of the media item. - */ - public GetMediaMetaDataMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - public GetMediaMetaDataMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - /** - * The number of leaf items (end nodes) under this media item. - */ - public GetMediaMetaDataMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - /** - * The number of leaf items that have been viewed. - */ - public GetMediaMetaDataMetadata withViewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - - /** - * The number of leaf items that have been viewed. - */ - public GetMediaMetaDataMetadata withViewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - /** - * The number of child items associated with this media item. - */ - public GetMediaMetaDataMetadata withChildCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - /** - * The total number of seasons (for TV shows). - */ - public GetMediaMetaDataMetadata withSeasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - - /** - * The duration of the media item in milliseconds. - */ - public GetMediaMetaDataMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * The original release date of the media item. - */ - public GetMediaMetaDataMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - - /** - * The original release date of the media item. - */ - public GetMediaMetaDataMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - public GetMediaMetaDataMetadata withAddedAt(long addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public GetMediaMetaDataMetadata withUpdatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public GetMediaMetaDataMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - /** - * The URL for the audience rating image. - */ - public GetMediaMetaDataMetadata withAudienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - - /** - * The URL for the audience rating image. - */ - public GetMediaMetaDataMetadata withAudienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - /** - * The source from which chapter data is derived. - */ - public GetMediaMetaDataMetadata withChapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - - /** - * The source from which chapter data is derived. - */ - public GetMediaMetaDataMetadata withChapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - /** - * The primary extra key associated with this media item. - */ - public GetMediaMetaDataMetadata withPrimaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - - /** - * The primary extra key associated with this media item. - */ - public GetMediaMetaDataMetadata withPrimaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - /** - * The original title of the media item (if different). - */ - public GetMediaMetaDataMetadata withOriginalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - - /** - * The original title of the media item (if different). - */ - public GetMediaMetaDataMetadata withOriginalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - /** - * The rating key of the parent media item. - */ - public GetMediaMetaDataMetadata withParentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - - /** - * The rating key of the parent media item. - */ - public GetMediaMetaDataMetadata withParentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - /** - * The rating key of the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - - /** - * The rating key of the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - /** - * The GUID of the parent media item. - */ - public GetMediaMetaDataMetadata withParentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - - /** - * The GUID of the parent media item. - */ - public GetMediaMetaDataMetadata withParentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - /** - * The GUID of the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - - /** - * The GUID of the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - /** - * The slug for the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentSlug(String grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = Optional.ofNullable(grandparentSlug); - return this; - } - - - /** - * The slug for the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentSlug(Optional grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = grandparentSlug; - return this; - } - - /** - * The key of the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - - /** - * The key of the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - /** - * The key of the parent media item. - */ - public GetMediaMetaDataMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - - /** - * The key of the parent media item. - */ - public GetMediaMetaDataMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - /** - * The title of the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - - /** - * The title of the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - - /** - * The thumbnail URL for the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - /** - * The theme URL for the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentTheme(String grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = Optional.ofNullable(grandparentTheme); - return this; - } - - - /** - * The theme URL for the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentTheme(Optional grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = grandparentTheme; - return this; - } - - /** - * The art URL for the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - - /** - * The art URL for the grandparent media item. - */ - public GetMediaMetaDataMetadata withGrandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - /** - * The title of the parent media item. - */ - public GetMediaMetaDataMetadata withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - - /** - * The title of the parent media item. - */ - public GetMediaMetaDataMetadata withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - /** - * The index position of the parent media item. - */ - public GetMediaMetaDataMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - - /** - * The index position of the parent media item. - */ - public GetMediaMetaDataMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - /** - * The thumbnail URL for the parent media item. - */ - public GetMediaMetaDataMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - - /** - * The thumbnail URL for the parent media item. - */ - public GetMediaMetaDataMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - /** - * The URL for the rating image. - */ - public GetMediaMetaDataMetadata withRatingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - - /** - * The URL for the rating image. - */ - public GetMediaMetaDataMetadata withRatingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - /** - * The number of times this media item has been viewed. - */ - public GetMediaMetaDataMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - - /** - * The number of times this media item has been viewed. - */ - public GetMediaMetaDataMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - /** - * The current playback offset (in milliseconds). - */ - public GetMediaMetaDataMetadata withViewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - - /** - * The current playback offset (in milliseconds). - */ - public GetMediaMetaDataMetadata withViewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - /** - * The number of times this media item has been skipped. - */ - public GetMediaMetaDataMetadata withSkipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - - /** - * The number of times this media item has been skipped. - */ - public GetMediaMetaDataMetadata withSkipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public GetMediaMetaDataMetadata withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public GetMediaMetaDataMetadata withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public GetMediaMetaDataMetadata withLastRatedAt(long lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public GetMediaMetaDataMetadata withLastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public GetMediaMetaDataMetadata withCreatedAtAccuracy(String createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); - return this; - } - - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public GetMediaMetaDataMetadata withCreatedAtAccuracy(Optional createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = createdAtAccuracy; - return this; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public GetMediaMetaDataMetadata withCreatedAtTZOffset(String createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); - return this; - } - - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public GetMediaMetaDataMetadata withCreatedAtTZOffset(Optional createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = createdAtTZOffset; - return this; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - public GetMediaMetaDataMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - - /** - * Unix timestamp for when the media item was last viewed. - */ - public GetMediaMetaDataMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public GetMediaMetaDataMetadata withUserRating(float userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public GetMediaMetaDataMetadata withUserRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - public GetMediaMetaDataMetadata withImage(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - - public GetMediaMetaDataMetadata withImage(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - public GetMediaMetaDataMetadata withUltraBlurColors(GetMediaMetaDataUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); - return this; - } - - - public GetMediaMetaDataMetadata withUltraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; - return this; - } - - /** - * The identifier for the library section. - */ - public GetMediaMetaDataMetadata withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - /** - * The identifier for the library section. - */ - public GetMediaMetaDataMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - /** - * The title of the library section. - */ - public GetMediaMetaDataMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - /** - * The title of the library section. - */ - public GetMediaMetaDataMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - /** - * The key corresponding to the library section. - */ - public GetMediaMetaDataMetadata withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - - /** - * The key corresponding to the library section. - */ - public GetMediaMetaDataMetadata withLibrarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - public GetMediaMetaDataMetadata withGuids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - - public GetMediaMetaDataMetadata withGuids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - public GetMediaMetaDataMetadata withMedia(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - - public GetMediaMetaDataMetadata withMedia(Optional> media) { - Utils.checkNotNull(media, "media"); - this.media = media; - return this; - } - - public GetMediaMetaDataMetadata withGenre(List genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = Optional.ofNullable(genre); - return this; - } - - - public GetMediaMetaDataMetadata withGenre(Optional> genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = genre; - return this; - } - - public GetMediaMetaDataMetadata withCountry(List country) { - Utils.checkNotNull(country, "country"); - this.country = Optional.ofNullable(country); - return this; - } - - - public GetMediaMetaDataMetadata withCountry(Optional> country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - public GetMediaMetaDataMetadata withDirector(List director) { - Utils.checkNotNull(director, "director"); - this.director = Optional.ofNullable(director); - return this; - } - - - public GetMediaMetaDataMetadata withDirector(Optional> director) { - Utils.checkNotNull(director, "director"); - this.director = director; - return this; - } - - public GetMediaMetaDataMetadata withWriter(List writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = Optional.ofNullable(writer); - return this; - } - - - public GetMediaMetaDataMetadata withWriter(Optional> writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = writer; - return this; - } - - public GetMediaMetaDataMetadata withProducer(List producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = Optional.ofNullable(producer); - return this; - } - - - public GetMediaMetaDataMetadata withProducer(Optional> producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = producer; - return this; - } - - public GetMediaMetaDataMetadata withRole(List role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - public GetMediaMetaDataMetadata withRole(Optional> role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - public GetMediaMetaDataMetadata withRatings(List ratings) { - Utils.checkNotNull(ratings, "ratings"); - this.ratings = Optional.ofNullable(ratings); - return this; - } - - - public GetMediaMetaDataMetadata withRatings(Optional> ratings) { - Utils.checkNotNull(ratings, "ratings"); - this.ratings = ratings; - return this; - } - - public GetMediaMetaDataMetadata withSimilar(List similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = Optional.ofNullable(similar); - return this; - } - - - public GetMediaMetaDataMetadata withSimilar(Optional> similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = similar; - return this; - } - - public GetMediaMetaDataMetadata withLocation(List location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - - public GetMediaMetaDataMetadata withLocation(Optional> location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - public GetMediaMetaDataMetadata withChapter(List chapter) { - Utils.checkNotNull(chapter, "chapter"); - this.chapter = Optional.ofNullable(chapter); - return this; - } - - - public GetMediaMetaDataMetadata withChapter(Optional> chapter) { - Utils.checkNotNull(chapter, "chapter"); - this.chapter = chapter; - return this; - } - - public GetMediaMetaDataMetadata withMarker(List marker) { - Utils.checkNotNull(marker, "marker"); - this.marker = Optional.ofNullable(marker); - return this; - } - - - public GetMediaMetaDataMetadata withMarker(Optional> marker) { - Utils.checkNotNull(marker, "marker"); - this.marker = marker; - return this; - } - - public GetMediaMetaDataMetadata withExtras(GetMediaMetaDataExtras extras) { - Utils.checkNotNull(extras, "extras"); - this.extras = Optional.ofNullable(extras); - return this; - } - - - public GetMediaMetaDataMetadata withExtras(Optional extras) { - Utils.checkNotNull(extras, "extras"); - this.extras = extras; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataMetadata other = (GetMediaMetaDataMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.slug, other.slug) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.rating, other.rating) && - Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.theme, other.theme) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && - Utils.enhancedDeepEquals(this.childCount, other.childCount) && - Utils.enhancedDeepEquals(this.seasonCount, other.seasonCount) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && - Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && - Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && - Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && - Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && - Utils.enhancedDeepEquals(this.parentGuid, other.parentGuid) && - Utils.enhancedDeepEquals(this.grandparentGuid, other.grandparentGuid) && - Utils.enhancedDeepEquals(this.grandparentSlug, other.grandparentSlug) && - Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && - Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && - Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && - Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && - Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && - Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && - Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && - Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && - Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && - Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && - Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && - Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && - Utils.enhancedDeepEquals(this.skipCount, other.skipCount) && - Utils.enhancedDeepEquals(this.subtype, other.subtype) && - Utils.enhancedDeepEquals(this.lastRatedAt, other.lastRatedAt) && - Utils.enhancedDeepEquals(this.createdAtAccuracy, other.createdAtAccuracy) && - Utils.enhancedDeepEquals(this.createdAtTZOffset, other.createdAtTZOffset) && - Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && - Utils.enhancedDeepEquals(this.userRating, other.userRating) && - Utils.enhancedDeepEquals(this.image, other.image) && - Utils.enhancedDeepEquals(this.ultraBlurColors, other.ultraBlurColors) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionKey, other.librarySectionKey) && - Utils.enhancedDeepEquals(this.guids, other.guids) && - Utils.enhancedDeepEquals(this.media, other.media) && - Utils.enhancedDeepEquals(this.genre, other.genre) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.director, other.director) && - Utils.enhancedDeepEquals(this.writer, other.writer) && - Utils.enhancedDeepEquals(this.producer, other.producer) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.ratings, other.ratings) && - Utils.enhancedDeepEquals(this.similar, other.similar) && - Utils.enhancedDeepEquals(this.location, other.location) && - Utils.enhancedDeepEquals(this.chapter, other.chapter) && - Utils.enhancedDeepEquals(this.marker, other.marker) && - Utils.enhancedDeepEquals(this.extras, other.extras); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - slug, studio, type, - title, titleSort, contentRating, - summary, rating, audienceRating, - year, tagline, thumb, - art, theme, index, - leafCount, viewedLeafCount, childCount, - seasonCount, duration, originallyAvailableAt, - addedAt, updatedAt, audienceRatingImage, - chapterSource, primaryExtraKey, originalTitle, - parentRatingKey, grandparentRatingKey, parentGuid, - grandparentGuid, grandparentSlug, grandparentKey, - parentKey, grandparentTitle, grandparentThumb, - grandparentTheme, grandparentArt, parentTitle, - parentIndex, parentThumb, ratingImage, - viewCount, viewOffset, skipCount, - subtype, lastRatedAt, createdAtAccuracy, - createdAtTZOffset, lastViewedAt, userRating, - image, ultraBlurColors, librarySectionID, - librarySectionTitle, librarySectionKey, guids, - media, genre, country, - director, writer, producer, - role, ratings, similar, - location, chapter, marker, - extras); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "slug", slug, - "studio", studio, - "type", type, - "title", title, - "titleSort", titleSort, - "contentRating", contentRating, - "summary", summary, - "rating", rating, - "audienceRating", audienceRating, - "year", year, - "tagline", tagline, - "thumb", thumb, - "art", art, - "theme", theme, - "index", index, - "leafCount", leafCount, - "viewedLeafCount", viewedLeafCount, - "childCount", childCount, - "seasonCount", seasonCount, - "duration", duration, - "originallyAvailableAt", originallyAvailableAt, - "addedAt", addedAt, - "updatedAt", updatedAt, - "audienceRatingImage", audienceRatingImage, - "chapterSource", chapterSource, - "primaryExtraKey", primaryExtraKey, - "originalTitle", originalTitle, - "parentRatingKey", parentRatingKey, - "grandparentRatingKey", grandparentRatingKey, - "parentGuid", parentGuid, - "grandparentGuid", grandparentGuid, - "grandparentSlug", grandparentSlug, - "grandparentKey", grandparentKey, - "parentKey", parentKey, - "grandparentTitle", grandparentTitle, - "grandparentThumb", grandparentThumb, - "grandparentTheme", grandparentTheme, - "grandparentArt", grandparentArt, - "parentTitle", parentTitle, - "parentIndex", parentIndex, - "parentThumb", parentThumb, - "ratingImage", ratingImage, - "viewCount", viewCount, - "viewOffset", viewOffset, - "skipCount", skipCount, - "subtype", subtype, - "lastRatedAt", lastRatedAt, - "createdAtAccuracy", createdAtAccuracy, - "createdAtTZOffset", createdAtTZOffset, - "lastViewedAt", lastViewedAt, - "userRating", userRating, - "image", image, - "ultraBlurColors", ultraBlurColors, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionKey", librarySectionKey, - "guids", guids, - "media", media, - "genre", genre, - "country", country, - "director", director, - "writer", writer, - "producer", producer, - "role", role, - "ratings", ratings, - "similar", similar, - "location", location, - "chapter", chapter, - "marker", marker, - "extras", extras); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String ratingKey; - - private String key; - - private String guid; - - private String slug; - - private Optional studio = Optional.empty(); - - private GetMediaMetaDataType type; - - private String title; - - private String titleSort; - - private Optional contentRating = Optional.empty(); - - private String summary; - - private Float rating; - - private Double audienceRating; - - private Optional year = Optional.empty(); - - private String tagline; - - private String thumb; - - private String art; - - private String theme; - - private Integer index; - - private Optional leafCount = Optional.empty(); - - private Optional viewedLeafCount = Optional.empty(); - - private Integer childCount; - - private Integer seasonCount; - - private Integer duration; - - private Optional originallyAvailableAt = Optional.empty(); - - private Long addedAt; - - private Optional updatedAt = Optional.empty(); - - private Optional audienceRatingImage = Optional.empty(); - - private Optional chapterSource = Optional.empty(); - - private Optional primaryExtraKey = Optional.empty(); - - private Optional originalTitle = Optional.empty(); - - private Optional parentRatingKey = Optional.empty(); - - private Optional grandparentRatingKey = Optional.empty(); - - private Optional parentGuid = Optional.empty(); - - private Optional grandparentGuid = Optional.empty(); - - private Optional grandparentSlug = Optional.empty(); - - private Optional grandparentKey = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional grandparentTitle = Optional.empty(); - - private Optional grandparentThumb = Optional.empty(); - - private Optional grandparentTheme = Optional.empty(); - - private Optional grandparentArt = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional parentThumb = Optional.empty(); - - private Optional ratingImage = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional viewOffset = Optional.empty(); - - private Optional skipCount = Optional.empty(); - - private Optional subtype = Optional.empty(); - - private Optional lastRatedAt = Optional.empty(); - - private Optional createdAtAccuracy = Optional.empty(); - - private Optional createdAtTZOffset = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional userRating = Optional.empty(); - - private Optional> image = Optional.empty(); - - private Optional ultraBlurColors = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionKey = Optional.empty(); - - private Optional> guids = 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> producer = Optional.empty(); - - private Optional> role = Optional.empty(); - - private Optional> ratings = Optional.empty(); - - private Optional> similar = Optional.empty(); - - private Optional> location = Optional.empty(); - - private Optional> chapter = Optional.empty(); - - private Optional> marker = Optional.empty(); - - private Optional extras = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - public Builder ratingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * The unique key for the media item. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The globally unique identifier for the media item. - */ - public Builder guid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - - /** - * A URL‐friendly version of the media title. - */ - public Builder slug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - - /** - * The studio that produced the media item. - */ - public Builder studio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - /** - * The studio that produced the media item. - */ - public Builder studio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - - public Builder type(GetMediaMetaDataType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The title of the media item. - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - /** - * The sort title used for ordering media items. - */ - public Builder titleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - - /** - * The content rating for the media item. - */ - public Builder contentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - /** - * The content rating for the media item. - */ - public Builder contentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - - /** - * A synopsis of the media item. - */ - public Builder summary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - - /** - * The critic rating for the media item. - */ - public Builder rating(float rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - - /** - * The audience rating for the media item. - */ - public Builder audienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - - /** - * The release year of the media item. - */ - public Builder year(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - /** - * The release year of the media item. - */ - public Builder year(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - - /** - * A brief tagline for the media item. - */ - public Builder tagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - - /** - * The thumbnail image URL for the media item. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The art image URL for the media item. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * The theme URL for the media item. - */ - public Builder theme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - - /** - * The index position of the media item. - */ - public Builder index(int index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - - /** - * The number of leaf items (end nodes) under this media item. - */ - public Builder leafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - public Builder leafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - - /** - * The number of leaf items that have been viewed. - */ - public Builder viewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - /** - * The number of leaf items that have been viewed. - */ - public Builder viewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - - /** - * The number of child items associated with this media item. - */ - public Builder childCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - - /** - * The total number of seasons (for TV shows). - */ - public Builder seasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - - - /** - * The duration of the media item in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * The original release date of the media item. - */ - public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - /** - * The original release date of the media item. - */ - public Builder originallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - - public Builder addedAt(long addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - - /** - * The URL for the audience rating image. - */ - public Builder audienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - /** - * The URL for the audience rating image. - */ - public Builder audienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - - /** - * The source from which chapter data is derived. - */ - public Builder chapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - /** - * The source from which chapter data is derived. - */ - public Builder chapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - - /** - * The primary extra key associated with this media item. - */ - public Builder primaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - /** - * The primary extra key associated with this media item. - */ - public Builder primaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - - /** - * The original title of the media item (if different). - */ - public Builder originalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - /** - * The original title of the media item (if different). - */ - public Builder originalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - - /** - * The rating key of the parent media item. - */ - public Builder parentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - /** - * The rating key of the parent media item. - */ - public Builder parentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - - /** - * The rating key of the grandparent media item. - */ - public Builder grandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - /** - * The rating key of the grandparent media item. - */ - public Builder grandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - - /** - * The GUID of the parent media item. - */ - public Builder parentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - /** - * The GUID of the parent media item. - */ - public Builder parentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - - /** - * The GUID of the grandparent media item. - */ - public Builder grandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - /** - * The GUID of the grandparent media item. - */ - public Builder grandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - - /** - * The slug for the grandparent media item. - */ - public Builder grandparentSlug(String grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = Optional.ofNullable(grandparentSlug); - return this; - } - - /** - * The slug for the grandparent media item. - */ - public Builder grandparentSlug(Optional grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = grandparentSlug; - return this; - } - - - /** - * The key of the grandparent media item. - */ - public Builder grandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - /** - * The key of the grandparent media item. - */ - public Builder grandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - - /** - * The key of the parent media item. - */ - public Builder parentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - /** - * The key of the parent media item. - */ - public Builder parentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - - /** - * The title of the grandparent media item. - */ - public Builder grandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - /** - * The title of the grandparent media item. - */ - public Builder grandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - - /** - * The thumbnail URL for the grandparent media item. - */ - public Builder grandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - public Builder grandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - - /** - * The theme URL for the grandparent media item. - */ - public Builder grandparentTheme(String grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = Optional.ofNullable(grandparentTheme); - return this; - } - - /** - * The theme URL for the grandparent media item. - */ - public Builder grandparentTheme(Optional grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = grandparentTheme; - return this; - } - - - /** - * The art URL for the grandparent media item. - */ - public Builder grandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - /** - * The art URL for the grandparent media item. - */ - public Builder grandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - - /** - * The title of the parent media item. - */ - public Builder parentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - /** - * The title of the parent media item. - */ - public Builder parentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - - /** - * The index position of the parent media item. - */ - public Builder parentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - /** - * The index position of the parent media item. - */ - public Builder parentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - - /** - * The thumbnail URL for the parent media item. - */ - public Builder parentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - /** - * The thumbnail URL for the parent media item. - */ - public Builder parentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - - /** - * The URL for the rating image. - */ - public Builder ratingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - /** - * The URL for the rating image. - */ - public Builder ratingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - - /** - * The number of times this media item has been viewed. - */ - public Builder viewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - /** - * The number of times this media item has been viewed. - */ - public Builder viewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - - /** - * The current playback offset (in milliseconds). - */ - public Builder viewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - /** - * The current playback offset (in milliseconds). - */ - public Builder viewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - - /** - * The number of times this media item has been skipped. - */ - public Builder skipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - /** - * The number of times this media item has been skipped. - */ - public Builder skipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public Builder subtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public Builder subtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public Builder lastRatedAt(long lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public Builder lastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public Builder createdAtAccuracy(String createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); - return this; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public Builder createdAtAccuracy(Optional createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = createdAtAccuracy; - return this; - } - - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public Builder createdAtTZOffset(String createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); - return this; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public Builder createdAtTZOffset(Optional createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = createdAtTZOffset; - return this; - } - - - /** - * Unix timestamp for when the media item was last viewed. - */ - public Builder lastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - public Builder lastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public Builder userRating(float userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public Builder userRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - - public Builder image(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - public Builder image(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - - public Builder ultraBlurColors(GetMediaMetaDataUltraBlurColors 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; - } - - - /** - * The identifier for the library section. - */ - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - /** - * The identifier for the library section. - */ - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - - /** - * The key corresponding to the library section. - */ - public Builder librarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - /** - * The key corresponding to the library section. - */ - public Builder librarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - - public Builder guids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - public Builder guids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - - 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 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); - 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 producer(List producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = Optional.ofNullable(producer); - return this; - } - - public Builder producer(Optional> producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = producer; - return this; - } - - - public Builder 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 Builder ratings(List ratings) { - Utils.checkNotNull(ratings, "ratings"); - this.ratings = Optional.ofNullable(ratings); - return this; - } - - public Builder ratings(Optional> ratings) { - Utils.checkNotNull(ratings, "ratings"); - this.ratings = ratings; - return this; - } - - - public Builder similar(List similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = Optional.ofNullable(similar); - return this; - } - - public Builder similar(Optional> similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = similar; - return this; - } - - - public Builder location(List location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - public Builder location(Optional> location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - - public Builder chapter(List chapter) { - Utils.checkNotNull(chapter, "chapter"); - this.chapter = Optional.ofNullable(chapter); - return this; - } - - public Builder chapter(Optional> chapter) { - Utils.checkNotNull(chapter, "chapter"); - this.chapter = chapter; - return this; - } - - - public Builder marker(List marker) { - Utils.checkNotNull(marker, "marker"); - this.marker = Optional.ofNullable(marker); - return this; - } - - public Builder marker(Optional> marker) { - Utils.checkNotNull(marker, "marker"); - this.marker = marker; - return this; - } - - - public Builder extras(GetMediaMetaDataExtras extras) { - Utils.checkNotNull(extras, "extras"); - this.extras = Optional.ofNullable(extras); - return this; - } - - public Builder extras(Optional extras) { - Utils.checkNotNull(extras, "extras"); - this.extras = extras; - return this; - } - - public GetMediaMetaDataMetadata build() { - - return new GetMediaMetaDataMetadata( - ratingKey, key, guid, - slug, studio, type, - title, titleSort, contentRating, - summary, rating, audienceRating, - year, tagline, thumb, - art, theme, index, - leafCount, viewedLeafCount, childCount, - seasonCount, duration, originallyAvailableAt, - addedAt, updatedAt, audienceRatingImage, - chapterSource, primaryExtraKey, originalTitle, - parentRatingKey, grandparentRatingKey, parentGuid, - grandparentGuid, grandparentSlug, grandparentKey, - parentKey, grandparentTitle, grandparentThumb, - grandparentTheme, grandparentArt, parentTitle, - parentIndex, parentThumb, ratingImage, - viewCount, viewOffset, skipCount, - subtype, lastRatedAt, createdAtAccuracy, - createdAtTZOffset, lastViewedAt, userRating, - image, ultraBlurColors, librarySectionID, - librarySectionTitle, librarySectionKey, guids, - media, genre, country, - director, writer, producer, - role, ratings, similar, - location, chapter, marker, - extras); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreaming.java deleted file mode 100644 index 07731c7b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreaming.java +++ /dev/null @@ -1,100 +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.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; - -/** - * GetMediaMetaDataOptimizedForStreaming - * - *

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

    - *
  • {@code dev.plexapi.sdk.models.operations.GetMediaMetaDataOptimizedForStreaming1}
  • - *
  • {@code boolean}
  • - *
- * - *

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

-     * if (obj.value() instanceof String) {
-     *     String answer = (String) obj.value();
-     *     System.out.println("answer=" + answer);
-     * }
-     * 
- * - * @return value of oneOf type - **/ - public java.lang.Object value() { - return value.value(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataOptimizedForStreaming other = (GetMediaMetaDataOptimizedForStreaming) o; - return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); - } - - @Override - public int hashCode() { - return Utils.enhancedHash(value.value()); - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends OneOfDeserializer { - - public _Deserializer() { - super(GetMediaMetaDataOptimizedForStreaming.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); - } - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataOptimizedForStreaming.class, - "value", value); - } - -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreaming1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreaming1.java deleted file mode 100644 index 587799a8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreaming1.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public enum GetMediaMetaDataOptimizedForStreaming1 { - ZERO(0), - ONE(1); - - @JsonValue - private final int value; - - GetMediaMetaDataOptimizedForStreaming1(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetMediaMetaDataOptimizedForStreaming1 o: GetMediaMetaDataOptimizedForStreaming1.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreamingLibrary1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreamingLibrary1.java deleted file mode 100644 index d6fcdf5c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataOptimizedForStreamingLibrary1.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public enum GetMediaMetaDataOptimizedForStreamingLibrary1 { - ZERO(0), - ONE(1); - - @JsonValue - private final int value; - - GetMediaMetaDataOptimizedForStreamingLibrary1(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetMediaMetaDataOptimizedForStreamingLibrary1 o: GetMediaMetaDataOptimizedForStreamingLibrary1.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataPart.java deleted file mode 100644 index af03ec39..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataPart.java +++ /dev/null @@ -1,958 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetMediaMetaDataPart { - /** - * Indicates if the part is accessible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("accessible") - private Optional accessible; - - /** - * Indicates if the part exists. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("exists") - private Optional exists; - - /** - * Unique part identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Key to access this part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("indexes") - private Optional indexes; - - /** - * Duration of the part in milliseconds. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - /** - * File path for the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("file") - private Optional file; - - /** - * File size in bytes. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("packetLength") - private Optional packetLength; - - /** - * Container format of the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - /** - * Video profile for the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasThumbnail") - private Optional hasThumbnail; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Stream") - private Optional> stream; - - @JsonCreator - public GetMediaMetaDataPart( - @JsonProperty("accessible") Optional accessible, - @JsonProperty("exists") Optional exists, - @JsonProperty("id") long id, - @JsonProperty("key") Optional key, - @JsonProperty("indexes") Optional indexes, - @JsonProperty("duration") Optional duration, - @JsonProperty("file") Optional file, - @JsonProperty("size") Optional size, - @JsonProperty("packetLength") Optional packetLength, - @JsonProperty("container") Optional container, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("hasThumbnail") Optional hasThumbnail, - @JsonProperty("Stream") Optional> stream) { - Utils.checkNotNull(accessible, "accessible"); - Utils.checkNotNull(exists, "exists"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(indexes, "indexes"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(file, "file"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(packetLength, "packetLength"); - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(videoProfile, "videoProfile"); - Utils.checkNotNull(audioProfile, "audioProfile"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - Utils.checkNotNull(stream, "stream"); - this.accessible = accessible; - this.exists = exists; - this.id = id; - this.key = key; - this.indexes = indexes; - this.duration = duration; - this.file = file; - this.size = size; - this.packetLength = packetLength; - this.container = container; - this.videoProfile = videoProfile; - this.audioProfile = audioProfile; - this.has64bitOffsets = has64bitOffsets; - this.optimizedForStreaming = optimizedForStreaming; - this.hasThumbnail = hasThumbnail; - this.stream = stream; - } - - public GetMediaMetaDataPart( - long id) { - this(Optional.empty(), Optional.empty(), id, - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Indicates if the part is accessible. - */ - @JsonIgnore - public Optional accessible() { - return accessible; - } - - /** - * Indicates if the part exists. - */ - @JsonIgnore - public Optional exists() { - return exists; - } - - /** - * Unique part identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Key to access this part. - */ - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional indexes() { - return indexes; - } - - /** - * Duration of the part in milliseconds. - */ - @JsonIgnore - public Optional duration() { - return duration; - } - - /** - * File path for the part. - */ - @JsonIgnore - public Optional file() { - return file; - } - - /** - * File size in bytes. - */ - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional packetLength() { - return packetLength; - } - - /** - * Container format of the part. - */ - @JsonIgnore - public Optional container() { - return container; - } - - /** - * Video profile for the part. - */ - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional optimizedForStreaming() { - return (Optional) optimizedForStreaming; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional hasThumbnail() { - return (Optional) hasThumbnail; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> stream() { - return (Optional>) stream; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Indicates if the part is accessible. - */ - public GetMediaMetaDataPart withAccessible(boolean accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = Optional.ofNullable(accessible); - return this; - } - - - /** - * Indicates if the part is accessible. - */ - public GetMediaMetaDataPart withAccessible(Optional accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = accessible; - return this; - } - - /** - * Indicates if the part exists. - */ - public GetMediaMetaDataPart withExists(boolean exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = Optional.ofNullable(exists); - return this; - } - - - /** - * Indicates if the part exists. - */ - public GetMediaMetaDataPart withExists(Optional exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = exists; - return this; - } - - /** - * Unique part identifier. - */ - public GetMediaMetaDataPart withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Key to access this part. - */ - public GetMediaMetaDataPart withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - /** - * Key to access this part. - */ - public GetMediaMetaDataPart withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetMediaMetaDataPart withIndexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - - public GetMediaMetaDataPart withIndexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - - /** - * Duration of the part in milliseconds. - */ - public GetMediaMetaDataPart withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - /** - * Duration of the part in milliseconds. - */ - public GetMediaMetaDataPart withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * File path for the part. - */ - public GetMediaMetaDataPart withFile(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - - /** - * File path for the part. - */ - public GetMediaMetaDataPart withFile(Optional file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - /** - * File size in bytes. - */ - public GetMediaMetaDataPart withSize(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - /** - * File size in bytes. - */ - public GetMediaMetaDataPart withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetMediaMetaDataPart withPacketLength(int packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = Optional.ofNullable(packetLength); - return this; - } - - - public GetMediaMetaDataPart withPacketLength(Optional packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = packetLength; - return this; - } - - /** - * Container format of the part. - */ - public GetMediaMetaDataPart withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - /** - * Container format of the part. - */ - public GetMediaMetaDataPart withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - /** - * Video profile for the part. - */ - public GetMediaMetaDataPart withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - /** - * Video profile for the part. - */ - public GetMediaMetaDataPart withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetMediaMetaDataPart withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetMediaMetaDataPart withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - public GetMediaMetaDataPart withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - public GetMediaMetaDataPart withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetMediaMetaDataPart withOptimizedForStreaming(GetMediaMetaDataLibraryOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetMediaMetaDataPart withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - public GetMediaMetaDataPart withHasThumbnail(GetMediaMetaDataHasThumbnail hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = Optional.ofNullable(hasThumbnail); - return this; - } - - - public GetMediaMetaDataPart withHasThumbnail(Optional hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = hasThumbnail; - return this; - } - - public GetMediaMetaDataPart withStream(List stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = Optional.ofNullable(stream); - return this; - } - - - public GetMediaMetaDataPart withStream(Optional> stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = stream; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataPart other = (GetMediaMetaDataPart) o; - return - Utils.enhancedDeepEquals(this.accessible, other.accessible) && - Utils.enhancedDeepEquals(this.exists, other.exists) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.indexes, other.indexes) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.file, other.file) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.packetLength, other.packetLength) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.hasThumbnail, other.hasThumbnail) && - Utils.enhancedDeepEquals(this.stream, other.stream); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - accessible, exists, id, - key, indexes, duration, - file, size, packetLength, - container, videoProfile, audioProfile, - has64bitOffsets, optimizedForStreaming, hasThumbnail, - stream); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataPart.class, - "accessible", accessible, - "exists", exists, - "id", id, - "key", key, - "indexes", indexes, - "duration", duration, - "file", file, - "size", size, - "packetLength", packetLength, - "container", container, - "videoProfile", videoProfile, - "audioProfile", audioProfile, - "has64bitOffsets", has64bitOffsets, - "optimizedForStreaming", optimizedForStreaming, - "hasThumbnail", hasThumbnail, - "stream", stream); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional accessible = Optional.empty(); - - private Optional exists = Optional.empty(); - - private Long id; - - private Optional key = Optional.empty(); - - private Optional indexes = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional file = Optional.empty(); - - private Optional size = Optional.empty(); - - private Optional packetLength = Optional.empty(); - - private Optional container = Optional.empty(); - - private Optional videoProfile = Optional.empty(); - - private Optional audioProfile = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional hasThumbnail; - - private Optional> stream = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Indicates if the part is accessible. - */ - public Builder accessible(boolean accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = Optional.ofNullable(accessible); - return this; - } - - /** - * Indicates if the part is accessible. - */ - public Builder accessible(Optional accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = accessible; - return this; - } - - - /** - * Indicates if the part exists. - */ - public Builder exists(boolean exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = Optional.ofNullable(exists); - return this; - } - - /** - * Indicates if the part exists. - */ - public Builder exists(Optional exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = exists; - return this; - } - - - /** - * Unique part identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Key to access this part. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - /** - * Key to access this part. - */ - public Builder key(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - public Builder indexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - public Builder indexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - - - /** - * Duration of the part in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - /** - * Duration of the part in milliseconds. - */ - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * File path for the part. - */ - public Builder file(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - /** - * File path for the part. - */ - public Builder file(Optional file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - - /** - * File size in bytes. - */ - public Builder size(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - /** - * File size in bytes. - */ - public Builder size(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - public Builder packetLength(int packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = Optional.ofNullable(packetLength); - return this; - } - - public Builder packetLength(Optional packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = packetLength; - return this; - } - - - /** - * Container format of the part. - */ - public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - /** - * Container format of the part. - */ - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - - /** - * Video profile for the part. - */ - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - /** - * Video profile for the part. - */ - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - 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; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(GetMediaMetaDataLibraryOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - - public Builder hasThumbnail(GetMediaMetaDataHasThumbnail 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 GetMediaMetaDataPart build() { - if (hasThumbnail == null) { - hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value(); - } - - return new GetMediaMetaDataPart( - accessible, exists, id, - key, indexes, duration, - file, size, packetLength, - container, videoProfile, audioProfile, - has64bitOffsets, optimizedForStreaming, 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/GetMediaMetaDataProducer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataProducer.java deleted file mode 100644 index 0fe99725..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataProducer.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaMetaDataProducer { - /** - * The unique role identifier. - */ - @JsonProperty("id") - private long id; - - /** - * The filter string for the role. - */ - @JsonProperty("filter") - private String filter; - - /** - * The actor's name. - */ - @JsonProperty("tag") - private String tag; - - /** - * A key associated with the actor tag. - */ - @JsonProperty("tagKey") - private String tagKey; - - /** - * The character name or role. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("role") - private Optional role; - - /** - * URL for the role thumbnail image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetMediaMetaDataProducer( - @JsonProperty("id") long id, - @JsonProperty("filter") String filter, - @JsonProperty("tag") String tag, - @JsonProperty("tagKey") String tagKey, - @JsonProperty("role") Optional role, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(tagKey, "tagKey"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.filter = filter; - this.tag = tag; - this.tagKey = tagKey; - this.role = role; - this.thumb = thumb; - } - - public GetMediaMetaDataProducer( - long id, - String filter, - String tag, - String tagKey) { - this(id, filter, tag, - tagKey, Optional.empty(), Optional.empty()); - } - - /** - * The unique role identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * The filter string for the role. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * The actor's name. - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * A key associated with the actor tag. - */ - @JsonIgnore - public String tagKey() { - return tagKey; - } - - /** - * The character name or role. - */ - @JsonIgnore - public Optional role() { - return role; - } - - /** - * URL for the role thumbnail image. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique role identifier. - */ - public GetMediaMetaDataProducer withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The filter string for the role. - */ - public GetMediaMetaDataProducer withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The actor's name. - */ - public GetMediaMetaDataProducer withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * A key associated with the actor tag. - */ - public GetMediaMetaDataProducer withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The character name or role. - */ - public GetMediaMetaDataProducer withRole(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - /** - * The character name or role. - */ - public GetMediaMetaDataProducer withRole(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - /** - * URL for the role thumbnail image. - */ - public GetMediaMetaDataProducer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * URL for the role thumbnail image. - */ - public GetMediaMetaDataProducer withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataProducer other = (GetMediaMetaDataProducer) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag, - tagKey, role, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataProducer.class, - "id", id, - "filter", filter, - "tag", tag, - "tagKey", tagKey, - "role", role, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String filter; - - private String tag; - - private String tagKey; - - private Optional role = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique role identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The filter string for the role. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * The actor's name. - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * A key associated with the actor tag. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - - /** - * The character name or role. - */ - public Builder role(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - /** - * The character name or role. - */ - public Builder role(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - - /** - * URL for the role thumbnail image. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * URL for the role thumbnail image. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetMediaMetaDataProducer build() { - - return new GetMediaMetaDataProducer( - id, filter, tag, - tagKey, role, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRatings.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRatings.java deleted file mode 100644 index b5f13e03..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRatings.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Float; -import java.lang.Override; -import java.lang.String; - - -public class GetMediaMetaDataRatings { - /** - * The image or reference for the rating. - */ - @JsonProperty("image") - private String image; - - /** - * The rating value. - */ - @JsonProperty("value") - private float value; - - /** - * The type of rating (e.g., audience, critic). - */ - @JsonProperty("type") - private String type; - - @JsonCreator - public GetMediaMetaDataRatings( - @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; - } - - /** - * The image or reference for the rating. - */ - @JsonIgnore - public String image() { - return image; - } - - /** - * The rating value. - */ - @JsonIgnore - public float value() { - return value; - } - - /** - * The type of rating (e.g., audience, critic). - */ - @JsonIgnore - public String type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The image or reference for the rating. - */ - public GetMediaMetaDataRatings withImage(String image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - /** - * The rating value. - */ - public GetMediaMetaDataRatings withValue(float value) { - Utils.checkNotNull(value, "value"); - this.value = value; - return this; - } - - /** - * The type of rating (e.g., audience, critic). - */ - public GetMediaMetaDataRatings 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; - } - GetMediaMetaDataRatings other = (GetMediaMetaDataRatings) o; - return - Utils.enhancedDeepEquals(this.image, other.image) && - Utils.enhancedDeepEquals(this.value, other.value) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - image, value, type); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataRatings.class, - "image", image, - "value", value, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String image; - - private Float value; - - private String type; - - private Builder() { - // force use of static builder() method - } - - - /** - * The image or reference for the rating. - */ - public Builder image(String image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - - /** - * The rating value. - */ - 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 GetMediaMetaDataRatings build() { - - return new GetMediaMetaDataRatings( - image, value, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRequest.java deleted file mode 100644 index ea608d52..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRequest.java +++ /dev/null @@ -1,887 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaMetaDataRequest { - /** - * The id(s) of the library item(s) to return metadata for. Can be a single ID or comma-separated list of IDs. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") - private String ratingKey; - - /** - * Include concerts data if set to true. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeConcerts") - private Optional includeConcerts; - - /** - * Include extra content (e.g. bonus features). - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeExtras") - private Optional includeExtras; - - /** - * Include on-deck items. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeOnDeck") - private Optional includeOnDeck; - - /** - * Include popular leaves (episodes/chapters). - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includePopularLeaves") - private Optional includePopularLeaves; - - /** - * Include preferences information. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includePreferences") - private Optional includePreferences; - - /** - * Include reviews for the content. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeReviews") - private Optional includeReviews; - - /** - * Include chapter details. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeChapters") - private Optional includeChapters; - - /** - * Include station data. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeStations") - private Optional includeStations; - - /** - * Include external media data. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeExternalMedia") - private Optional includeExternalMedia; - - /** - * Trigger asynchronous metadata augmentation. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=asyncAugmentMetadata") - private Optional asyncAugmentMetadata; - - /** - * Trigger asynchronous file checking. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=asyncCheckFiles") - private Optional asyncCheckFiles; - - /** - * Trigger asynchronous refresh of analysis. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=asyncRefreshAnalysis") - private Optional asyncRefreshAnalysis; - - /** - * Trigger asynchronous refresh of the local media agent. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=asyncRefreshLocalMediaAgent") - private Optional asyncRefreshLocalMediaAgent; - - @JsonCreator - public GetMediaMetaDataRequest( - String ratingKey, - Optional includeConcerts, - Optional includeExtras, - Optional includeOnDeck, - Optional includePopularLeaves, - Optional includePreferences, - Optional includeReviews, - Optional includeChapters, - Optional includeStations, - Optional includeExternalMedia, - Optional asyncAugmentMetadata, - Optional asyncCheckFiles, - Optional asyncRefreshAnalysis, - Optional asyncRefreshLocalMediaAgent) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(includeConcerts, "includeConcerts"); - Utils.checkNotNull(includeExtras, "includeExtras"); - Utils.checkNotNull(includeOnDeck, "includeOnDeck"); - Utils.checkNotNull(includePopularLeaves, "includePopularLeaves"); - Utils.checkNotNull(includePreferences, "includePreferences"); - Utils.checkNotNull(includeReviews, "includeReviews"); - Utils.checkNotNull(includeChapters, "includeChapters"); - Utils.checkNotNull(includeStations, "includeStations"); - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - Utils.checkNotNull(asyncAugmentMetadata, "asyncAugmentMetadata"); - Utils.checkNotNull(asyncCheckFiles, "asyncCheckFiles"); - Utils.checkNotNull(asyncRefreshAnalysis, "asyncRefreshAnalysis"); - Utils.checkNotNull(asyncRefreshLocalMediaAgent, "asyncRefreshLocalMediaAgent"); - this.ratingKey = ratingKey; - this.includeConcerts = includeConcerts; - this.includeExtras = includeExtras; - this.includeOnDeck = includeOnDeck; - this.includePopularLeaves = includePopularLeaves; - this.includePreferences = includePreferences; - this.includeReviews = includeReviews; - this.includeChapters = includeChapters; - this.includeStations = includeStations; - this.includeExternalMedia = includeExternalMedia; - this.asyncAugmentMetadata = asyncAugmentMetadata; - this.asyncCheckFiles = asyncCheckFiles; - this.asyncRefreshAnalysis = asyncRefreshAnalysis; - this.asyncRefreshLocalMediaAgent = asyncRefreshLocalMediaAgent; - } - - public GetMediaMetaDataRequest( - String ratingKey) { - this(ratingKey, Optional.empty(), 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 id(s) of the library item(s) to return metadata for. Can be a single ID or comma-separated list of IDs. - */ - @JsonIgnore - public String ratingKey() { - return ratingKey; - } - - /** - * Include concerts data if set to true. - */ - @JsonIgnore - public Optional includeConcerts() { - return includeConcerts; - } - - /** - * Include extra content (e.g. bonus features). - */ - @JsonIgnore - public Optional includeExtras() { - return includeExtras; - } - - /** - * Include on-deck items. - */ - @JsonIgnore - public Optional includeOnDeck() { - return includeOnDeck; - } - - /** - * Include popular leaves (episodes/chapters). - */ - @JsonIgnore - public Optional includePopularLeaves() { - return includePopularLeaves; - } - - /** - * Include preferences information. - */ - @JsonIgnore - public Optional includePreferences() { - return includePreferences; - } - - /** - * Include reviews for the content. - */ - @JsonIgnore - public Optional includeReviews() { - return includeReviews; - } - - /** - * Include chapter details. - */ - @JsonIgnore - public Optional includeChapters() { - return includeChapters; - } - - /** - * Include station data. - */ - @JsonIgnore - public Optional includeStations() { - return includeStations; - } - - /** - * Include external media data. - */ - @JsonIgnore - public Optional includeExternalMedia() { - return includeExternalMedia; - } - - /** - * Trigger asynchronous metadata augmentation. - */ - @JsonIgnore - public Optional asyncAugmentMetadata() { - return asyncAugmentMetadata; - } - - /** - * Trigger asynchronous file checking. - */ - @JsonIgnore - public Optional asyncCheckFiles() { - return asyncCheckFiles; - } - - /** - * Trigger asynchronous refresh of analysis. - */ - @JsonIgnore - public Optional asyncRefreshAnalysis() { - return asyncRefreshAnalysis; - } - - /** - * Trigger asynchronous refresh of the local media agent. - */ - @JsonIgnore - public Optional asyncRefreshLocalMediaAgent() { - return asyncRefreshLocalMediaAgent; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The id(s) of the library item(s) to return metadata for. Can be a single ID or comma-separated list of IDs. - */ - public GetMediaMetaDataRequest withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * Include concerts data if set to true. - */ - public GetMediaMetaDataRequest withIncludeConcerts(boolean includeConcerts) { - Utils.checkNotNull(includeConcerts, "includeConcerts"); - this.includeConcerts = Optional.ofNullable(includeConcerts); - return this; - } - - - /** - * Include concerts data if set to true. - */ - public GetMediaMetaDataRequest withIncludeConcerts(Optional includeConcerts) { - Utils.checkNotNull(includeConcerts, "includeConcerts"); - this.includeConcerts = includeConcerts; - return this; - } - - /** - * Include extra content (e.g. bonus features). - */ - public GetMediaMetaDataRequest withIncludeExtras(boolean includeExtras) { - Utils.checkNotNull(includeExtras, "includeExtras"); - this.includeExtras = Optional.ofNullable(includeExtras); - return this; - } - - - /** - * Include extra content (e.g. bonus features). - */ - public GetMediaMetaDataRequest withIncludeExtras(Optional includeExtras) { - Utils.checkNotNull(includeExtras, "includeExtras"); - this.includeExtras = includeExtras; - return this; - } - - /** - * Include on-deck items. - */ - public GetMediaMetaDataRequest withIncludeOnDeck(boolean includeOnDeck) { - Utils.checkNotNull(includeOnDeck, "includeOnDeck"); - this.includeOnDeck = Optional.ofNullable(includeOnDeck); - return this; - } - - - /** - * Include on-deck items. - */ - public GetMediaMetaDataRequest withIncludeOnDeck(Optional includeOnDeck) { - Utils.checkNotNull(includeOnDeck, "includeOnDeck"); - this.includeOnDeck = includeOnDeck; - return this; - } - - /** - * Include popular leaves (episodes/chapters). - */ - public GetMediaMetaDataRequest withIncludePopularLeaves(boolean includePopularLeaves) { - Utils.checkNotNull(includePopularLeaves, "includePopularLeaves"); - this.includePopularLeaves = Optional.ofNullable(includePopularLeaves); - return this; - } - - - /** - * Include popular leaves (episodes/chapters). - */ - public GetMediaMetaDataRequest withIncludePopularLeaves(Optional includePopularLeaves) { - Utils.checkNotNull(includePopularLeaves, "includePopularLeaves"); - this.includePopularLeaves = includePopularLeaves; - return this; - } - - /** - * Include preferences information. - */ - public GetMediaMetaDataRequest withIncludePreferences(boolean includePreferences) { - Utils.checkNotNull(includePreferences, "includePreferences"); - this.includePreferences = Optional.ofNullable(includePreferences); - return this; - } - - - /** - * Include preferences information. - */ - public GetMediaMetaDataRequest withIncludePreferences(Optional includePreferences) { - Utils.checkNotNull(includePreferences, "includePreferences"); - this.includePreferences = includePreferences; - return this; - } - - /** - * Include reviews for the content. - */ - public GetMediaMetaDataRequest withIncludeReviews(boolean includeReviews) { - Utils.checkNotNull(includeReviews, "includeReviews"); - this.includeReviews = Optional.ofNullable(includeReviews); - return this; - } - - - /** - * Include reviews for the content. - */ - public GetMediaMetaDataRequest withIncludeReviews(Optional includeReviews) { - Utils.checkNotNull(includeReviews, "includeReviews"); - this.includeReviews = includeReviews; - return this; - } - - /** - * Include chapter details. - */ - public GetMediaMetaDataRequest withIncludeChapters(boolean includeChapters) { - Utils.checkNotNull(includeChapters, "includeChapters"); - this.includeChapters = Optional.ofNullable(includeChapters); - return this; - } - - - /** - * Include chapter details. - */ - public GetMediaMetaDataRequest withIncludeChapters(Optional includeChapters) { - Utils.checkNotNull(includeChapters, "includeChapters"); - this.includeChapters = includeChapters; - return this; - } - - /** - * Include station data. - */ - public GetMediaMetaDataRequest withIncludeStations(boolean includeStations) { - Utils.checkNotNull(includeStations, "includeStations"); - this.includeStations = Optional.ofNullable(includeStations); - return this; - } - - - /** - * Include station data. - */ - public GetMediaMetaDataRequest withIncludeStations(Optional includeStations) { - Utils.checkNotNull(includeStations, "includeStations"); - this.includeStations = includeStations; - return this; - } - - /** - * Include external media data. - */ - public GetMediaMetaDataRequest withIncludeExternalMedia(boolean includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = Optional.ofNullable(includeExternalMedia); - return this; - } - - - /** - * Include external media data. - */ - public GetMediaMetaDataRequest withIncludeExternalMedia(Optional includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = includeExternalMedia; - return this; - } - - /** - * Trigger asynchronous metadata augmentation. - */ - public GetMediaMetaDataRequest withAsyncAugmentMetadata(boolean asyncAugmentMetadata) { - Utils.checkNotNull(asyncAugmentMetadata, "asyncAugmentMetadata"); - this.asyncAugmentMetadata = Optional.ofNullable(asyncAugmentMetadata); - return this; - } - - - /** - * Trigger asynchronous metadata augmentation. - */ - public GetMediaMetaDataRequest withAsyncAugmentMetadata(Optional asyncAugmentMetadata) { - Utils.checkNotNull(asyncAugmentMetadata, "asyncAugmentMetadata"); - this.asyncAugmentMetadata = asyncAugmentMetadata; - return this; - } - - /** - * Trigger asynchronous file checking. - */ - public GetMediaMetaDataRequest withAsyncCheckFiles(boolean asyncCheckFiles) { - Utils.checkNotNull(asyncCheckFiles, "asyncCheckFiles"); - this.asyncCheckFiles = Optional.ofNullable(asyncCheckFiles); - return this; - } - - - /** - * Trigger asynchronous file checking. - */ - public GetMediaMetaDataRequest withAsyncCheckFiles(Optional asyncCheckFiles) { - Utils.checkNotNull(asyncCheckFiles, "asyncCheckFiles"); - this.asyncCheckFiles = asyncCheckFiles; - return this; - } - - /** - * Trigger asynchronous refresh of analysis. - */ - public GetMediaMetaDataRequest withAsyncRefreshAnalysis(boolean asyncRefreshAnalysis) { - Utils.checkNotNull(asyncRefreshAnalysis, "asyncRefreshAnalysis"); - this.asyncRefreshAnalysis = Optional.ofNullable(asyncRefreshAnalysis); - return this; - } - - - /** - * Trigger asynchronous refresh of analysis. - */ - public GetMediaMetaDataRequest withAsyncRefreshAnalysis(Optional asyncRefreshAnalysis) { - Utils.checkNotNull(asyncRefreshAnalysis, "asyncRefreshAnalysis"); - this.asyncRefreshAnalysis = asyncRefreshAnalysis; - return this; - } - - /** - * Trigger asynchronous refresh of the local media agent. - */ - public GetMediaMetaDataRequest withAsyncRefreshLocalMediaAgent(boolean asyncRefreshLocalMediaAgent) { - Utils.checkNotNull(asyncRefreshLocalMediaAgent, "asyncRefreshLocalMediaAgent"); - this.asyncRefreshLocalMediaAgent = Optional.ofNullable(asyncRefreshLocalMediaAgent); - return this; - } - - - /** - * Trigger asynchronous refresh of the local media agent. - */ - public GetMediaMetaDataRequest withAsyncRefreshLocalMediaAgent(Optional asyncRefreshLocalMediaAgent) { - Utils.checkNotNull(asyncRefreshLocalMediaAgent, "asyncRefreshLocalMediaAgent"); - this.asyncRefreshLocalMediaAgent = asyncRefreshLocalMediaAgent; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataRequest other = (GetMediaMetaDataRequest) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.includeConcerts, other.includeConcerts) && - Utils.enhancedDeepEquals(this.includeExtras, other.includeExtras) && - Utils.enhancedDeepEquals(this.includeOnDeck, other.includeOnDeck) && - Utils.enhancedDeepEquals(this.includePopularLeaves, other.includePopularLeaves) && - Utils.enhancedDeepEquals(this.includePreferences, other.includePreferences) && - Utils.enhancedDeepEquals(this.includeReviews, other.includeReviews) && - Utils.enhancedDeepEquals(this.includeChapters, other.includeChapters) && - Utils.enhancedDeepEquals(this.includeStations, other.includeStations) && - Utils.enhancedDeepEquals(this.includeExternalMedia, other.includeExternalMedia) && - Utils.enhancedDeepEquals(this.asyncAugmentMetadata, other.asyncAugmentMetadata) && - Utils.enhancedDeepEquals(this.asyncCheckFiles, other.asyncCheckFiles) && - Utils.enhancedDeepEquals(this.asyncRefreshAnalysis, other.asyncRefreshAnalysis) && - Utils.enhancedDeepEquals(this.asyncRefreshLocalMediaAgent, other.asyncRefreshLocalMediaAgent); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, includeConcerts, includeExtras, - includeOnDeck, includePopularLeaves, includePreferences, - includeReviews, includeChapters, includeStations, - includeExternalMedia, asyncAugmentMetadata, asyncCheckFiles, - asyncRefreshAnalysis, asyncRefreshLocalMediaAgent); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataRequest.class, - "ratingKey", ratingKey, - "includeConcerts", includeConcerts, - "includeExtras", includeExtras, - "includeOnDeck", includeOnDeck, - "includePopularLeaves", includePopularLeaves, - "includePreferences", includePreferences, - "includeReviews", includeReviews, - "includeChapters", includeChapters, - "includeStations", includeStations, - "includeExternalMedia", includeExternalMedia, - "asyncAugmentMetadata", asyncAugmentMetadata, - "asyncCheckFiles", asyncCheckFiles, - "asyncRefreshAnalysis", asyncRefreshAnalysis, - "asyncRefreshLocalMediaAgent", asyncRefreshLocalMediaAgent); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String ratingKey; - - private Optional includeConcerts = Optional.empty(); - - private Optional includeExtras = Optional.empty(); - - private Optional includeOnDeck = Optional.empty(); - - private Optional includePopularLeaves = Optional.empty(); - - private Optional includePreferences = Optional.empty(); - - private Optional includeReviews = Optional.empty(); - - private Optional includeChapters = Optional.empty(); - - private Optional includeStations = Optional.empty(); - - private Optional includeExternalMedia = Optional.empty(); - - private Optional asyncAugmentMetadata = Optional.empty(); - - private Optional asyncCheckFiles = Optional.empty(); - - private Optional asyncRefreshAnalysis = Optional.empty(); - - private Optional asyncRefreshLocalMediaAgent = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The id(s) of the library item(s) to return metadata for. Can be a single ID or comma-separated list of IDs. - */ - public Builder ratingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * Include concerts data if set to true. - */ - public Builder includeConcerts(boolean includeConcerts) { - Utils.checkNotNull(includeConcerts, "includeConcerts"); - this.includeConcerts = Optional.ofNullable(includeConcerts); - return this; - } - - /** - * Include concerts data if set to true. - */ - public Builder includeConcerts(Optional includeConcerts) { - Utils.checkNotNull(includeConcerts, "includeConcerts"); - this.includeConcerts = includeConcerts; - return this; - } - - - /** - * Include extra content (e.g. bonus features). - */ - public Builder includeExtras(boolean includeExtras) { - Utils.checkNotNull(includeExtras, "includeExtras"); - this.includeExtras = Optional.ofNullable(includeExtras); - return this; - } - - /** - * Include extra content (e.g. bonus features). - */ - public Builder includeExtras(Optional includeExtras) { - Utils.checkNotNull(includeExtras, "includeExtras"); - this.includeExtras = includeExtras; - return this; - } - - - /** - * Include on-deck items. - */ - public Builder includeOnDeck(boolean includeOnDeck) { - Utils.checkNotNull(includeOnDeck, "includeOnDeck"); - this.includeOnDeck = Optional.ofNullable(includeOnDeck); - return this; - } - - /** - * Include on-deck items. - */ - public Builder includeOnDeck(Optional includeOnDeck) { - Utils.checkNotNull(includeOnDeck, "includeOnDeck"); - this.includeOnDeck = includeOnDeck; - return this; - } - - - /** - * Include popular leaves (episodes/chapters). - */ - public Builder includePopularLeaves(boolean includePopularLeaves) { - Utils.checkNotNull(includePopularLeaves, "includePopularLeaves"); - this.includePopularLeaves = Optional.ofNullable(includePopularLeaves); - return this; - } - - /** - * Include popular leaves (episodes/chapters). - */ - public Builder includePopularLeaves(Optional includePopularLeaves) { - Utils.checkNotNull(includePopularLeaves, "includePopularLeaves"); - this.includePopularLeaves = includePopularLeaves; - return this; - } - - - /** - * Include preferences information. - */ - public Builder includePreferences(boolean includePreferences) { - Utils.checkNotNull(includePreferences, "includePreferences"); - this.includePreferences = Optional.ofNullable(includePreferences); - return this; - } - - /** - * Include preferences information. - */ - public Builder includePreferences(Optional includePreferences) { - Utils.checkNotNull(includePreferences, "includePreferences"); - this.includePreferences = includePreferences; - return this; - } - - - /** - * Include reviews for the content. - */ - public Builder includeReviews(boolean includeReviews) { - Utils.checkNotNull(includeReviews, "includeReviews"); - this.includeReviews = Optional.ofNullable(includeReviews); - return this; - } - - /** - * Include reviews for the content. - */ - public Builder includeReviews(Optional includeReviews) { - Utils.checkNotNull(includeReviews, "includeReviews"); - this.includeReviews = includeReviews; - return this; - } - - - /** - * Include chapter details. - */ - public Builder includeChapters(boolean includeChapters) { - Utils.checkNotNull(includeChapters, "includeChapters"); - this.includeChapters = Optional.ofNullable(includeChapters); - return this; - } - - /** - * Include chapter details. - */ - public Builder includeChapters(Optional includeChapters) { - Utils.checkNotNull(includeChapters, "includeChapters"); - this.includeChapters = includeChapters; - return this; - } - - - /** - * Include station data. - */ - public Builder includeStations(boolean includeStations) { - Utils.checkNotNull(includeStations, "includeStations"); - this.includeStations = Optional.ofNullable(includeStations); - return this; - } - - /** - * Include station data. - */ - public Builder includeStations(Optional includeStations) { - Utils.checkNotNull(includeStations, "includeStations"); - this.includeStations = includeStations; - return this; - } - - - /** - * Include external media data. - */ - public Builder includeExternalMedia(boolean includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = Optional.ofNullable(includeExternalMedia); - return this; - } - - /** - * Include external media data. - */ - public Builder includeExternalMedia(Optional includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = includeExternalMedia; - return this; - } - - - /** - * Trigger asynchronous metadata augmentation. - */ - public Builder asyncAugmentMetadata(boolean asyncAugmentMetadata) { - Utils.checkNotNull(asyncAugmentMetadata, "asyncAugmentMetadata"); - this.asyncAugmentMetadata = Optional.ofNullable(asyncAugmentMetadata); - return this; - } - - /** - * Trigger asynchronous metadata augmentation. - */ - public Builder asyncAugmentMetadata(Optional asyncAugmentMetadata) { - Utils.checkNotNull(asyncAugmentMetadata, "asyncAugmentMetadata"); - this.asyncAugmentMetadata = asyncAugmentMetadata; - return this; - } - - - /** - * Trigger asynchronous file checking. - */ - public Builder asyncCheckFiles(boolean asyncCheckFiles) { - Utils.checkNotNull(asyncCheckFiles, "asyncCheckFiles"); - this.asyncCheckFiles = Optional.ofNullable(asyncCheckFiles); - return this; - } - - /** - * Trigger asynchronous file checking. - */ - public Builder asyncCheckFiles(Optional asyncCheckFiles) { - Utils.checkNotNull(asyncCheckFiles, "asyncCheckFiles"); - this.asyncCheckFiles = asyncCheckFiles; - return this; - } - - - /** - * Trigger asynchronous refresh of analysis. - */ - public Builder asyncRefreshAnalysis(boolean asyncRefreshAnalysis) { - Utils.checkNotNull(asyncRefreshAnalysis, "asyncRefreshAnalysis"); - this.asyncRefreshAnalysis = Optional.ofNullable(asyncRefreshAnalysis); - return this; - } - - /** - * Trigger asynchronous refresh of analysis. - */ - public Builder asyncRefreshAnalysis(Optional asyncRefreshAnalysis) { - Utils.checkNotNull(asyncRefreshAnalysis, "asyncRefreshAnalysis"); - this.asyncRefreshAnalysis = asyncRefreshAnalysis; - return this; - } - - - /** - * Trigger asynchronous refresh of the local media agent. - */ - public Builder asyncRefreshLocalMediaAgent(boolean asyncRefreshLocalMediaAgent) { - Utils.checkNotNull(asyncRefreshLocalMediaAgent, "asyncRefreshLocalMediaAgent"); - this.asyncRefreshLocalMediaAgent = Optional.ofNullable(asyncRefreshLocalMediaAgent); - return this; - } - - /** - * Trigger asynchronous refresh of the local media agent. - */ - public Builder asyncRefreshLocalMediaAgent(Optional asyncRefreshLocalMediaAgent) { - Utils.checkNotNull(asyncRefreshLocalMediaAgent, "asyncRefreshLocalMediaAgent"); - this.asyncRefreshLocalMediaAgent = asyncRefreshLocalMediaAgent; - return this; - } - - public GetMediaMetaDataRequest build() { - - return new GetMediaMetaDataRequest( - ratingKey, includeConcerts, includeExtras, - includeOnDeck, includePopularLeaves, includePreferences, - includeReviews, includeChapters, includeStations, - includeExternalMedia, asyncAugmentMetadata, asyncCheckFiles, - asyncRefreshAnalysis, asyncRefreshLocalMediaAgent); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRequestBuilder.java deleted file mode 100644 index 459c35be..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRequestBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetMediaMetaData; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; - -public class GetMediaMetaDataRequestBuilder { - - private GetMediaMetaDataRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetMediaMetaDataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMediaMetaDataRequestBuilder request(GetMediaMetaDataRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetMediaMetaDataResponse call() throws Exception { - - RequestOperation operation - = new GetMediaMetaData.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataResponse.java deleted file mode 100644 index fadd6e50..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetMediaMetaDataResponse 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 metadata of the library item. - */ - private Optional object; - - @JsonCreator - public GetMediaMetaDataResponse( - 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 GetMediaMetaDataResponse( - 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 metadata of the library item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMediaMetaDataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMediaMetaDataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaMetaDataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The metadata of the library item. - */ - public GetMediaMetaDataResponse withObject(GetMediaMetaDataResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The metadata of the library item. - */ - public GetMediaMetaDataResponse 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; - } - GetMediaMetaDataResponse other = (GetMediaMetaDataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 metadata of the library item. - */ - public Builder object(GetMediaMetaDataResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The metadata of the library item. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMediaMetaDataResponse build() { - - return new GetMediaMetaDataResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataResponseBody.java deleted file mode 100644 index 50feff01..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetMediaMetaDataResponseBody - * - *

The metadata of the library item. - */ -public class GetMediaMetaDataResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetMediaMetaDataResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetMediaMetaDataResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataResponseBody withMediaContainer(GetMediaMetaDataMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetMediaMetaDataResponseBody 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; - } - GetMediaMetaDataResponseBody other = (GetMediaMetaDataResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetMediaMetaDataMediaContainer 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 GetMediaMetaDataResponseBody build() { - - return new GetMediaMetaDataResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRole.java deleted file mode 100644 index c383a86c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataRole.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaMetaDataRole { - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - /** - * The display tag for the actor (typically the actor's name). - */ - @JsonProperty("tag") - private String tag; - - /** - * The role played by the actor in the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("role") - private Optional role; - - /** - * The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. - */ - @JsonProperty("filter") - private String filter; - - /** - * A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification. - * NOTE: This is globally unique across all Plex Servers. - */ - @JsonProperty("tagKey") - private String tagKey; - - /** - * The absolute URL of the thumbnail image for the actor. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetMediaMetaDataRole( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("role") Optional role, - @JsonProperty("filter") String filter, - @JsonProperty("tagKey") String tagKey, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tagKey, "tagKey"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.tag = tag; - this.role = role; - this.filter = filter; - this.tagKey = tagKey; - this.thumb = thumb; - } - - public GetMediaMetaDataRole( - int id, - String tag, - String filter, - String tagKey) { - this(id, tag, Optional.empty(), - filter, tagKey, Optional.empty()); - } - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The display tag for the actor (typically the actor's name). - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * The role played by the actor in the media item. - */ - @JsonIgnore - public Optional role() { - return role; - } - - /** - * The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification. - * NOTE: This is globally unique across all Plex Servers. - */ - @JsonIgnore - public String tagKey() { - return tagKey; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public GetMediaMetaDataRole withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The display tag for the actor (typically the actor's name). - */ - public GetMediaMetaDataRole withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * The role played by the actor in the media item. - */ - public GetMediaMetaDataRole withRole(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - /** - * The role played by the actor in the media item. - */ - public GetMediaMetaDataRole withRole(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - /** - * The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. - */ - public GetMediaMetaDataRole withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification. - * NOTE: This is globally unique across all Plex Servers. - */ - public GetMediaMetaDataRole withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public GetMediaMetaDataRole withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public GetMediaMetaDataRole withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataRole other = (GetMediaMetaDataRole) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, role, - filter, tagKey, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataRole.class, - "id", id, - "tag", tag, - "role", role, - "filter", filter, - "tagKey", tagKey, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Optional role = Optional.empty(); - - private String filter; - - private String tagKey; - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The display tag for the actor (typically the actor's name). - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * The role played by the actor in the media item. - */ - public Builder role(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - /** - * The role played by the actor in the media item. - */ - public Builder role(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - - /** - * The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification. - * NOTE: This is globally unique across all Plex Servers. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetMediaMetaDataRole build() { - - return new GetMediaMetaDataRole( - id, tag, role, - filter, tagKey, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataSimilar.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataSimilar.java deleted file mode 100644 index 807dee3e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataSimilar.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; - - -public class GetMediaMetaDataSimilar { - /** - * The unique similar item identifier. - */ - @JsonProperty("id") - private long id; - - /** - * The filter string for similar items. - */ - @JsonProperty("filter") - private String filter; - - /** - * The tag or title of the similar content. - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetMediaMetaDataSimilar( - @JsonProperty("id") long id, - @JsonProperty("filter") String filter, - @JsonProperty("tag") String tag) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - this.id = id; - this.filter = filter; - this.tag = tag; - } - - /** - * The unique similar item identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * The filter string for similar items. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * The tag or title of the similar content. - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique similar item identifier. - */ - public GetMediaMetaDataSimilar withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The filter string for similar items. - */ - public GetMediaMetaDataSimilar withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The tag or title of the similar content. - */ - public GetMediaMetaDataSimilar withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataSimilar other = (GetMediaMetaDataSimilar) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataSimilar.class, - "id", id, - "filter", filter, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String filter; - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique similar item identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The filter string for similar items. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * The tag or title of the similar content. - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetMediaMetaDataSimilar build() { - - return new GetMediaMetaDataSimilar( - id, filter, tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStream.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStream.java deleted file mode 100644 index 17ef15d4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataStream.java +++ /dev/null @@ -1,3047 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Float; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaMetaDataStream { - /** - * Unique stream identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Stream type: - * - VIDEO = 1 - * - AUDIO = 2 - * - SUBTITLE = 3 - */ - @JsonProperty("streamType") - private long streamType; - - /** - * Format of the stream (e.g., srt). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("format") - private Optional format; - - /** - * Indicates if this stream is default. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("default") - private Optional default_; - - /** - * Codec used by the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codec") - private Optional codec; - - /** - * Index of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - /** - * Bitrate of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - /** - * Language of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("language") - private Optional language; - - /** - * Language tag (e.g., en). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("languageTag") - private Optional languageTag; - - /** - * ISO language code. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("languageCode") - private Optional languageCode; - - /** - * Indicates whether header compression is enabled. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("headerCompression") - private Optional headerCompression; - - /** - * Dolby Vision BL compatibility ID. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIBLCompatID") - private Optional doviblCompatID; - - /** - * Indicates if Dolby Vision BL is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIBLPresent") - private Optional doviblPresent; - - /** - * Indicates if Dolby Vision EL is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIELPresent") - private Optional dovielPresent; - - /** - * Dolby Vision level. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVILevel") - private Optional doviLevel; - - /** - * Indicates if Dolby Vision is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIPresent") - private Optional doviPresent; - - /** - * Dolby Vision profile. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIProfile") - private Optional doviProfile; - - /** - * Indicates if Dolby Vision RPU is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIRPUPresent") - private Optional dovirpuPresent; - - /** - * Dolby Vision version. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIVersion") - private Optional doviVersion; - - /** - * Bit depth of the video stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitDepth") - private Optional bitDepth; - - /** - * Chroma sample location. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaLocation") - private Optional chromaLocation; - - /** - * Chroma subsampling format. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaSubsampling") - private Optional chromaSubsampling; - - /** - * Coded video height. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedHeight") - private Optional codedHeight; - - /** - * Coded video width. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedWidth") - private Optional codedWidth; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("closedCaptions") - private Optional closedCaptions; - - /** - * Color primaries used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorPrimaries") - private Optional colorPrimaries; - - /** - * Color range (e.g., tv). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorRange") - private Optional colorRange; - - /** - * Color space. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorSpace") - private Optional colorSpace; - - /** - * Color transfer characteristics. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorTrc") - private Optional colorTrc; - - /** - * Frame rate of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("frameRate") - private Optional frameRate; - - /** - * Key to access this stream part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - /** - * Height of the video stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("height") - private Optional height; - - /** - * Video level. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("level") - private Optional level; - - /** - * Indicates if this is the original stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("original") - private Optional original; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasScalingMatrix") - private Optional hasScalingMatrix; - - /** - * Video profile. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("profile") - private Optional profile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("scanType") - private Optional scanType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("embeddedInVideo") - private Optional embeddedInVideo; - - /** - * Number of reference frames. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("refFrames") - private Optional refFrames; - - /** - * Width of the video stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("width") - private Optional width; - - /** - * Display title for the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("displayTitle") - private Optional displayTitle; - - /** - * Extended display title for the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("extendedDisplayTitle") - private Optional extendedDisplayTitle; - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("selected") - private Optional selected; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("forced") - private Optional forced; - - /** - * Number of audio channels (for audio streams). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("channels") - private Optional channels; - - /** - * Audio channel layout. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannelLayout") - private Optional audioChannelLayout; - - /** - * Sampling rate for the audio stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("samplingRate") - private Optional samplingRate; - - /** - * Indicates if the stream can auto-sync. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canAutoSync") - private Optional canAutoSync; - - /** - * Indicates if the stream is for the hearing impaired. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hearingImpaired") - private Optional hearingImpaired; - - /** - * Indicates if the stream is a dub. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("dub") - private Optional dub; - - /** - * Optional title for the stream (e.g., language variant). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - @JsonCreator - public GetMediaMetaDataStream( - @JsonProperty("id") long id, - @JsonProperty("format") Optional format, - @JsonProperty("default") Optional default_, - @JsonProperty("codec") Optional codec, - @JsonProperty("index") Optional index, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("language") Optional language, - @JsonProperty("languageTag") Optional languageTag, - @JsonProperty("languageCode") Optional languageCode, - @JsonProperty("headerCompression") Optional headerCompression, - @JsonProperty("DOVIBLCompatID") Optional doviblCompatID, - @JsonProperty("DOVIBLPresent") Optional doviblPresent, - @JsonProperty("DOVIELPresent") Optional dovielPresent, - @JsonProperty("DOVILevel") Optional doviLevel, - @JsonProperty("DOVIPresent") Optional doviPresent, - @JsonProperty("DOVIProfile") Optional doviProfile, - @JsonProperty("DOVIRPUPresent") Optional dovirpuPresent, - @JsonProperty("DOVIVersion") Optional doviVersion, - @JsonProperty("bitDepth") Optional bitDepth, - @JsonProperty("chromaLocation") Optional chromaLocation, - @JsonProperty("chromaSubsampling") Optional chromaSubsampling, - @JsonProperty("codedHeight") Optional codedHeight, - @JsonProperty("codedWidth") Optional codedWidth, - @JsonProperty("closedCaptions") Optional closedCaptions, - @JsonProperty("colorPrimaries") Optional colorPrimaries, - @JsonProperty("colorRange") Optional colorRange, - @JsonProperty("colorSpace") Optional colorSpace, - @JsonProperty("colorTrc") Optional colorTrc, - @JsonProperty("frameRate") Optional frameRate, - @JsonProperty("key") Optional key, - @JsonProperty("height") Optional height, - @JsonProperty("level") Optional level, - @JsonProperty("original") Optional original, - @JsonProperty("hasScalingMatrix") Optional hasScalingMatrix, - @JsonProperty("profile") Optional profile, - @JsonProperty("scanType") Optional scanType, - @JsonProperty("embeddedInVideo") Optional embeddedInVideo, - @JsonProperty("refFrames") Optional refFrames, - @JsonProperty("width") Optional width, - @JsonProperty("displayTitle") Optional displayTitle, - @JsonProperty("extendedDisplayTitle") Optional extendedDisplayTitle, - @JsonProperty("selected") Optional selected, - @JsonProperty("forced") Optional forced, - @JsonProperty("channels") Optional channels, - @JsonProperty("audioChannelLayout") Optional audioChannelLayout, - @JsonProperty("samplingRate") Optional samplingRate, - @JsonProperty("canAutoSync") Optional canAutoSync, - @JsonProperty("hearingImpaired") Optional hearingImpaired, - @JsonProperty("dub") Optional dub, - @JsonProperty("title") Optional title) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(format, "format"); - Utils.checkNotNull(default_, "default_"); - Utils.checkNotNull(codec, "codec"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(bitrate, "bitrate"); - Utils.checkNotNull(language, "language"); - Utils.checkNotNull(languageTag, "languageTag"); - Utils.checkNotNull(languageCode, "languageCode"); - Utils.checkNotNull(headerCompression, "headerCompression"); - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - Utils.checkNotNull(doviblPresent, "doviblPresent"); - Utils.checkNotNull(dovielPresent, "dovielPresent"); - Utils.checkNotNull(doviLevel, "doviLevel"); - Utils.checkNotNull(doviPresent, "doviPresent"); - Utils.checkNotNull(doviProfile, "doviProfile"); - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - Utils.checkNotNull(doviVersion, "doviVersion"); - Utils.checkNotNull(bitDepth, "bitDepth"); - Utils.checkNotNull(chromaLocation, "chromaLocation"); - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - Utils.checkNotNull(codedHeight, "codedHeight"); - Utils.checkNotNull(codedWidth, "codedWidth"); - Utils.checkNotNull(closedCaptions, "closedCaptions"); - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - Utils.checkNotNull(colorRange, "colorRange"); - Utils.checkNotNull(colorSpace, "colorSpace"); - Utils.checkNotNull(colorTrc, "colorTrc"); - Utils.checkNotNull(frameRate, "frameRate"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(height, "height"); - Utils.checkNotNull(level, "level"); - Utils.checkNotNull(original, "original"); - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - Utils.checkNotNull(profile, "profile"); - Utils.checkNotNull(scanType, "scanType"); - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - Utils.checkNotNull(refFrames, "refFrames"); - Utils.checkNotNull(width, "width"); - Utils.checkNotNull(displayTitle, "displayTitle"); - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - Utils.checkNotNull(selected, "selected"); - Utils.checkNotNull(forced, "forced"); - Utils.checkNotNull(channels, "channels"); - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - Utils.checkNotNull(samplingRate, "samplingRate"); - Utils.checkNotNull(canAutoSync, "canAutoSync"); - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - Utils.checkNotNull(dub, "dub"); - Utils.checkNotNull(title, "title"); - this.id = id; - this.streamType = Builder._SINGLETON_VALUE_StreamType.value(); - this.format = format; - this.default_ = default_; - this.codec = codec; - this.index = index; - this.bitrate = bitrate; - this.language = language; - this.languageTag = languageTag; - this.languageCode = languageCode; - this.headerCompression = headerCompression; - this.doviblCompatID = doviblCompatID; - this.doviblPresent = doviblPresent; - this.dovielPresent = dovielPresent; - this.doviLevel = doviLevel; - this.doviPresent = doviPresent; - this.doviProfile = doviProfile; - this.dovirpuPresent = dovirpuPresent; - this.doviVersion = doviVersion; - this.bitDepth = bitDepth; - this.chromaLocation = chromaLocation; - this.chromaSubsampling = chromaSubsampling; - this.codedHeight = codedHeight; - this.codedWidth = codedWidth; - this.closedCaptions = closedCaptions; - this.colorPrimaries = colorPrimaries; - this.colorRange = colorRange; - this.colorSpace = colorSpace; - this.colorTrc = colorTrc; - this.frameRate = frameRate; - this.key = key; - this.height = height; - this.level = level; - this.original = original; - this.hasScalingMatrix = hasScalingMatrix; - this.profile = profile; - this.scanType = scanType; - this.embeddedInVideo = embeddedInVideo; - this.refFrames = refFrames; - this.width = width; - this.displayTitle = displayTitle; - this.extendedDisplayTitle = extendedDisplayTitle; - this.selected = selected; - this.forced = forced; - this.channels = channels; - this.audioChannelLayout = audioChannelLayout; - this.samplingRate = samplingRate; - this.canAutoSync = canAutoSync; - this.hearingImpaired = hearingImpaired; - this.dub = dub; - this.title = title; - } - - public GetMediaMetaDataStream( - long id) { - this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - /** - * Unique stream identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Stream type: - * - VIDEO = 1 - * - AUDIO = 2 - * - SUBTITLE = 3 - */ - @JsonIgnore - public long streamType() { - return streamType; - } - - /** - * Format of the stream (e.g., srt). - */ - @JsonIgnore - public Optional format() { - return format; - } - - /** - * Indicates if this stream is default. - */ - @JsonIgnore - public Optional default_() { - return default_; - } - - /** - * Codec used by the stream. - */ - @JsonIgnore - public Optional codec() { - return codec; - } - - /** - * Index of the stream. - */ - @JsonIgnore - public Optional index() { - return index; - } - - /** - * Bitrate of the stream. - */ - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - /** - * Language of the stream. - */ - @JsonIgnore - public Optional language() { - return language; - } - - /** - * Language tag (e.g., en). - */ - @JsonIgnore - public Optional languageTag() { - return languageTag; - } - - /** - * ISO language code. - */ - @JsonIgnore - public Optional languageCode() { - return languageCode; - } - - /** - * Indicates whether header compression is enabled. - */ - @JsonIgnore - public Optional headerCompression() { - return headerCompression; - } - - /** - * Dolby Vision BL compatibility ID. - */ - @JsonIgnore - public Optional doviblCompatID() { - return doviblCompatID; - } - - /** - * Indicates if Dolby Vision BL is present. - */ - @JsonIgnore - public Optional doviblPresent() { - return doviblPresent; - } - - /** - * Indicates if Dolby Vision EL is present. - */ - @JsonIgnore - public Optional dovielPresent() { - return dovielPresent; - } - - /** - * Dolby Vision level. - */ - @JsonIgnore - public Optional doviLevel() { - return doviLevel; - } - - /** - * Indicates if Dolby Vision is present. - */ - @JsonIgnore - public Optional doviPresent() { - return doviPresent; - } - - /** - * Dolby Vision profile. - */ - @JsonIgnore - public Optional doviProfile() { - return doviProfile; - } - - /** - * Indicates if Dolby Vision RPU is present. - */ - @JsonIgnore - public Optional dovirpuPresent() { - return dovirpuPresent; - } - - /** - * Dolby Vision version. - */ - @JsonIgnore - public Optional doviVersion() { - return doviVersion; - } - - /** - * Bit depth of the video stream. - */ - @JsonIgnore - public Optional bitDepth() { - return bitDepth; - } - - /** - * Chroma sample location. - */ - @JsonIgnore - public Optional chromaLocation() { - return chromaLocation; - } - - /** - * Chroma subsampling format. - */ - @JsonIgnore - public Optional chromaSubsampling() { - return chromaSubsampling; - } - - /** - * Coded video height. - */ - @JsonIgnore - public Optional codedHeight() { - return codedHeight; - } - - /** - * Coded video width. - */ - @JsonIgnore - public Optional codedWidth() { - return codedWidth; - } - - @JsonIgnore - public Optional closedCaptions() { - return closedCaptions; - } - - /** - * Color primaries used. - */ - @JsonIgnore - public Optional colorPrimaries() { - return colorPrimaries; - } - - /** - * Color range (e.g., tv). - */ - @JsonIgnore - public Optional colorRange() { - return colorRange; - } - - /** - * Color space. - */ - @JsonIgnore - public Optional colorSpace() { - return colorSpace; - } - - /** - * Color transfer characteristics. - */ - @JsonIgnore - public Optional colorTrc() { - return colorTrc; - } - - /** - * Frame rate of the stream. - */ - @JsonIgnore - public Optional frameRate() { - return frameRate; - } - - /** - * Key to access this stream part. - */ - @JsonIgnore - public Optional key() { - return key; - } - - /** - * Height of the video stream. - */ - @JsonIgnore - public Optional height() { - return height; - } - - /** - * Video level. - */ - @JsonIgnore - public Optional level() { - return level; - } - - /** - * Indicates if this is the original stream. - */ - @JsonIgnore - public Optional original() { - return original; - } - - @JsonIgnore - public Optional hasScalingMatrix() { - return hasScalingMatrix; - } - - /** - * Video profile. - */ - @JsonIgnore - public Optional profile() { - return profile; - } - - @JsonIgnore - public Optional scanType() { - return scanType; - } - - @JsonIgnore - public Optional embeddedInVideo() { - return embeddedInVideo; - } - - /** - * Number of reference frames. - */ - @JsonIgnore - public Optional refFrames() { - return refFrames; - } - - /** - * Width of the video stream. - */ - @JsonIgnore - public Optional width() { - return width; - } - - /** - * Display title for the stream. - */ - @JsonIgnore - public Optional displayTitle() { - return displayTitle; - } - - /** - * Extended display title for the stream. - */ - @JsonIgnore - public Optional extendedDisplayTitle() { - return extendedDisplayTitle; - } - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - @JsonIgnore - public Optional selected() { - return selected; - } - - @JsonIgnore - public Optional forced() { - return forced; - } - - /** - * Number of audio channels (for audio streams). - */ - @JsonIgnore - public Optional channels() { - return channels; - } - - /** - * Audio channel layout. - */ - @JsonIgnore - public Optional audioChannelLayout() { - return audioChannelLayout; - } - - /** - * Sampling rate for the audio stream. - */ - @JsonIgnore - public Optional samplingRate() { - return samplingRate; - } - - /** - * Indicates if the stream can auto-sync. - */ - @JsonIgnore - public Optional canAutoSync() { - return canAutoSync; - } - - /** - * Indicates if the stream is for the hearing impaired. - */ - @JsonIgnore - public Optional hearingImpaired() { - return hearingImpaired; - } - - /** - * Indicates if the stream is a dub. - */ - @JsonIgnore - public Optional dub() { - return dub; - } - - /** - * Optional title for the stream (e.g., language variant). - */ - @JsonIgnore - public Optional title() { - return title; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique stream identifier. - */ - public GetMediaMetaDataStream withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Format of the stream (e.g., srt). - */ - public GetMediaMetaDataStream withFormat(String format) { - Utils.checkNotNull(format, "format"); - this.format = Optional.ofNullable(format); - return this; - } - - - /** - * Format of the stream (e.g., srt). - */ - public GetMediaMetaDataStream withFormat(Optional format) { - Utils.checkNotNull(format, "format"); - this.format = format; - return this; - } - - /** - * Indicates if this stream is default. - */ - public GetMediaMetaDataStream withDefault(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - - /** - * Indicates if this stream is default. - */ - public GetMediaMetaDataStream withDefault(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - /** - * Codec used by the stream. - */ - public GetMediaMetaDataStream withCodec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = Optional.ofNullable(codec); - return this; - } - - - /** - * Codec used by the stream. - */ - public GetMediaMetaDataStream withCodec(Optional codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - /** - * Index of the stream. - */ - public GetMediaMetaDataStream withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - - /** - * Index of the stream. - */ - public GetMediaMetaDataStream withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * Bitrate of the stream. - */ - public GetMediaMetaDataStream withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - /** - * Bitrate of the stream. - */ - public GetMediaMetaDataStream withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * Language of the stream. - */ - public GetMediaMetaDataStream withLanguage(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - - /** - * Language of the stream. - */ - public GetMediaMetaDataStream withLanguage(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - /** - * Language tag (e.g., en). - */ - public GetMediaMetaDataStream withLanguageTag(String languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = Optional.ofNullable(languageTag); - return this; - } - - - /** - * Language tag (e.g., en). - */ - public GetMediaMetaDataStream withLanguageTag(Optional languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = languageTag; - return this; - } - - /** - * ISO language code. - */ - public GetMediaMetaDataStream withLanguageCode(String languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = Optional.ofNullable(languageCode); - return this; - } - - - /** - * ISO language code. - */ - public GetMediaMetaDataStream withLanguageCode(Optional languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = languageCode; - return this; - } - - /** - * Indicates whether header compression is enabled. - */ - public GetMediaMetaDataStream withHeaderCompression(boolean headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = Optional.ofNullable(headerCompression); - return this; - } - - - /** - * Indicates whether header compression is enabled. - */ - public GetMediaMetaDataStream withHeaderCompression(Optional headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = headerCompression; - return this; - } - - /** - * Dolby Vision BL compatibility ID. - */ - public GetMediaMetaDataStream withDOVIBLCompatID(int doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = Optional.ofNullable(doviblCompatID); - return this; - } - - - /** - * Dolby Vision BL compatibility ID. - */ - public GetMediaMetaDataStream withDOVIBLCompatID(Optional doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = doviblCompatID; - return this; - } - - /** - * Indicates if Dolby Vision BL is present. - */ - public GetMediaMetaDataStream withDOVIBLPresent(boolean doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = Optional.ofNullable(doviblPresent); - return this; - } - - - /** - * Indicates if Dolby Vision BL is present. - */ - public GetMediaMetaDataStream withDOVIBLPresent(Optional doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = doviblPresent; - return this; - } - - /** - * Indicates if Dolby Vision EL is present. - */ - public GetMediaMetaDataStream withDOVIELPresent(boolean dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = Optional.ofNullable(dovielPresent); - return this; - } - - - /** - * Indicates if Dolby Vision EL is present. - */ - public GetMediaMetaDataStream withDOVIELPresent(Optional dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = dovielPresent; - return this; - } - - /** - * Dolby Vision level. - */ - public GetMediaMetaDataStream withDOVILevel(int doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = Optional.ofNullable(doviLevel); - return this; - } - - - /** - * Dolby Vision level. - */ - public GetMediaMetaDataStream withDOVILevel(Optional doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = doviLevel; - return this; - } - - /** - * Indicates if Dolby Vision is present. - */ - public GetMediaMetaDataStream withDOVIPresent(boolean doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = Optional.ofNullable(doviPresent); - return this; - } - - - /** - * Indicates if Dolby Vision is present. - */ - public GetMediaMetaDataStream withDOVIPresent(Optional doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = doviPresent; - return this; - } - - /** - * Dolby Vision profile. - */ - public GetMediaMetaDataStream withDOVIProfile(int doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = Optional.ofNullable(doviProfile); - return this; - } - - - /** - * Dolby Vision profile. - */ - public GetMediaMetaDataStream withDOVIProfile(Optional doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = doviProfile; - return this; - } - - /** - * Indicates if Dolby Vision RPU is present. - */ - public GetMediaMetaDataStream withDOVIRPUPresent(boolean dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = Optional.ofNullable(dovirpuPresent); - return this; - } - - - /** - * Indicates if Dolby Vision RPU is present. - */ - public GetMediaMetaDataStream withDOVIRPUPresent(Optional dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = dovirpuPresent; - return this; - } - - /** - * Dolby Vision version. - */ - public GetMediaMetaDataStream withDOVIVersion(String doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = Optional.ofNullable(doviVersion); - return this; - } - - - /** - * Dolby Vision version. - */ - public GetMediaMetaDataStream withDOVIVersion(Optional doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = doviVersion; - return this; - } - - /** - * Bit depth of the video stream. - */ - public GetMediaMetaDataStream withBitDepth(int bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - - /** - * Bit depth of the video stream. - */ - public GetMediaMetaDataStream withBitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - /** - * Chroma sample location. - */ - public GetMediaMetaDataStream withChromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - - /** - * Chroma sample location. - */ - public GetMediaMetaDataStream withChromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - /** - * Chroma subsampling format. - */ - public GetMediaMetaDataStream withChromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - - /** - * Chroma subsampling format. - */ - public GetMediaMetaDataStream withChromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - /** - * Coded video height. - */ - public GetMediaMetaDataStream withCodedHeight(int codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - - /** - * Coded video height. - */ - public GetMediaMetaDataStream withCodedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - /** - * Coded video width. - */ - public GetMediaMetaDataStream withCodedWidth(int codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - - /** - * Coded video width. - */ - public GetMediaMetaDataStream withCodedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - return this; - } - - public GetMediaMetaDataStream withClosedCaptions(boolean closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = Optional.ofNullable(closedCaptions); - return this; - } - - - public GetMediaMetaDataStream withClosedCaptions(Optional closedCaptions) { - Utils.checkNotNull(closedCaptions, "closedCaptions"); - this.closedCaptions = closedCaptions; - return this; - } - - /** - * Color primaries used. - */ - public GetMediaMetaDataStream withColorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - - /** - * Color primaries used. - */ - public GetMediaMetaDataStream withColorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - /** - * Color range (e.g., tv). - */ - public GetMediaMetaDataStream withColorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - - /** - * Color range (e.g., tv). - */ - public GetMediaMetaDataStream withColorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - /** - * Color space. - */ - public GetMediaMetaDataStream withColorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - - /** - * Color space. - */ - public GetMediaMetaDataStream withColorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - /** - * Color transfer characteristics. - */ - public GetMediaMetaDataStream withColorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - - /** - * Color transfer characteristics. - */ - public GetMediaMetaDataStream withColorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - /** - * Frame rate of the stream. - */ - public GetMediaMetaDataStream withFrameRate(float frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - - /** - * Frame rate of the stream. - */ - public GetMediaMetaDataStream withFrameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - /** - * Key to access this stream part. - */ - public GetMediaMetaDataStream withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - /** - * Key to access this stream part. - */ - public GetMediaMetaDataStream withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * Height of the video stream. - */ - public GetMediaMetaDataStream withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - /** - * Height of the video stream. - */ - public GetMediaMetaDataStream withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * Video level. - */ - public GetMediaMetaDataStream withLevel(int level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - - /** - * Video level. - */ - public GetMediaMetaDataStream withLevel(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - /** - * Indicates if this is the original stream. - */ - public GetMediaMetaDataStream withOriginal(boolean original) { - Utils.checkNotNull(original, "original"); - this.original = Optional.ofNullable(original); - return this; - } - - - /** - * Indicates if this is the original stream. - */ - public GetMediaMetaDataStream withOriginal(Optional original) { - Utils.checkNotNull(original, "original"); - this.original = original; - return this; - } - - public GetMediaMetaDataStream withHasScalingMatrix(boolean hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); - return this; - } - - - public GetMediaMetaDataStream withHasScalingMatrix(Optional hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = hasScalingMatrix; - return this; - } - - /** - * Video profile. - */ - public GetMediaMetaDataStream withProfile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - - /** - * Video profile. - */ - public GetMediaMetaDataStream withProfile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - public GetMediaMetaDataStream withScanType(String scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = Optional.ofNullable(scanType); - return this; - } - - - public GetMediaMetaDataStream withScanType(Optional scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = scanType; - return this; - } - - public GetMediaMetaDataStream withEmbeddedInVideo(String embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = Optional.ofNullable(embeddedInVideo); - return this; - } - - - public GetMediaMetaDataStream withEmbeddedInVideo(Optional embeddedInVideo) { - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - this.embeddedInVideo = embeddedInVideo; - return this; - } - - /** - * Number of reference frames. - */ - public GetMediaMetaDataStream withRefFrames(int refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = Optional.ofNullable(refFrames); - return this; - } - - - /** - * Number of reference frames. - */ - public GetMediaMetaDataStream withRefFrames(Optional refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = refFrames; - return this; - } - - /** - * Width of the video stream. - */ - public GetMediaMetaDataStream withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - /** - * Width of the video stream. - */ - public GetMediaMetaDataStream withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Display title for the stream. - */ - public GetMediaMetaDataStream withDisplayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = Optional.ofNullable(displayTitle); - return this; - } - - - /** - * Display title for the stream. - */ - public GetMediaMetaDataStream withDisplayTitle(Optional displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - /** - * Extended display title for the stream. - */ - public GetMediaMetaDataStream withExtendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); - return this; - } - - - /** - * Extended display title for the stream. - */ - public GetMediaMetaDataStream withExtendedDisplayTitle(Optional extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public GetMediaMetaDataStream withSelected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public GetMediaMetaDataStream withSelected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - public GetMediaMetaDataStream withForced(boolean forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = Optional.ofNullable(forced); - return this; - } - - - public GetMediaMetaDataStream withForced(Optional forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = forced; - return this; - } - - /** - * Number of audio channels (for audio streams). - */ - public GetMediaMetaDataStream withChannels(int channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = Optional.ofNullable(channels); - return this; - } - - - /** - * Number of audio channels (for audio streams). - */ - public GetMediaMetaDataStream withChannels(Optional channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = channels; - return this; - } - - /** - * Audio channel layout. - */ - public GetMediaMetaDataStream withAudioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - - /** - * Audio channel layout. - */ - public GetMediaMetaDataStream withAudioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - /** - * Sampling rate for the audio stream. - */ - public GetMediaMetaDataStream withSamplingRate(int samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - - /** - * Sampling rate for the audio stream. - */ - public GetMediaMetaDataStream withSamplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - /** - * Indicates if the stream can auto-sync. - */ - public GetMediaMetaDataStream withCanAutoSync(boolean canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = Optional.ofNullable(canAutoSync); - return this; - } - - - /** - * Indicates if the stream can auto-sync. - */ - public GetMediaMetaDataStream withCanAutoSync(Optional canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = canAutoSync; - return this; - } - - /** - * Indicates if the stream is for the hearing impaired. - */ - public GetMediaMetaDataStream withHearingImpaired(boolean hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = Optional.ofNullable(hearingImpaired); - return this; - } - - - /** - * Indicates if the stream is for the hearing impaired. - */ - public GetMediaMetaDataStream withHearingImpaired(Optional hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = hearingImpaired; - return this; - } - - /** - * Indicates if the stream is a dub. - */ - public GetMediaMetaDataStream withDub(boolean dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = Optional.ofNullable(dub); - return this; - } - - - /** - * Indicates if the stream is a dub. - */ - public GetMediaMetaDataStream withDub(Optional dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = dub; - return this; - } - - /** - * Optional title for the stream (e.g., language variant). - */ - public GetMediaMetaDataStream withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - /** - * Optional title for the stream (e.g., language variant). - */ - public GetMediaMetaDataStream 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; - } - GetMediaMetaDataStream other = (GetMediaMetaDataStream) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.streamType, other.streamType) && - Utils.enhancedDeepEquals(this.format, other.format) && - Utils.enhancedDeepEquals(this.default_, other.default_) && - Utils.enhancedDeepEquals(this.codec, other.codec) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.language, other.language) && - Utils.enhancedDeepEquals(this.languageTag, other.languageTag) && - Utils.enhancedDeepEquals(this.languageCode, other.languageCode) && - Utils.enhancedDeepEquals(this.headerCompression, other.headerCompression) && - Utils.enhancedDeepEquals(this.doviblCompatID, other.doviblCompatID) && - Utils.enhancedDeepEquals(this.doviblPresent, other.doviblPresent) && - Utils.enhancedDeepEquals(this.dovielPresent, other.dovielPresent) && - Utils.enhancedDeepEquals(this.doviLevel, other.doviLevel) && - Utils.enhancedDeepEquals(this.doviPresent, other.doviPresent) && - Utils.enhancedDeepEquals(this.doviProfile, other.doviProfile) && - Utils.enhancedDeepEquals(this.dovirpuPresent, other.dovirpuPresent) && - Utils.enhancedDeepEquals(this.doviVersion, other.doviVersion) && - Utils.enhancedDeepEquals(this.bitDepth, other.bitDepth) && - Utils.enhancedDeepEquals(this.chromaLocation, other.chromaLocation) && - Utils.enhancedDeepEquals(this.chromaSubsampling, other.chromaSubsampling) && - Utils.enhancedDeepEquals(this.codedHeight, other.codedHeight) && - Utils.enhancedDeepEquals(this.codedWidth, other.codedWidth) && - Utils.enhancedDeepEquals(this.closedCaptions, other.closedCaptions) && - Utils.enhancedDeepEquals(this.colorPrimaries, other.colorPrimaries) && - Utils.enhancedDeepEquals(this.colorRange, other.colorRange) && - Utils.enhancedDeepEquals(this.colorSpace, other.colorSpace) && - Utils.enhancedDeepEquals(this.colorTrc, other.colorTrc) && - Utils.enhancedDeepEquals(this.frameRate, other.frameRate) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.level, other.level) && - Utils.enhancedDeepEquals(this.original, other.original) && - Utils.enhancedDeepEquals(this.hasScalingMatrix, other.hasScalingMatrix) && - Utils.enhancedDeepEquals(this.profile, other.profile) && - Utils.enhancedDeepEquals(this.scanType, other.scanType) && - Utils.enhancedDeepEquals(this.embeddedInVideo, other.embeddedInVideo) && - Utils.enhancedDeepEquals(this.refFrames, other.refFrames) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.displayTitle, other.displayTitle) && - Utils.enhancedDeepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) && - Utils.enhancedDeepEquals(this.selected, other.selected) && - Utils.enhancedDeepEquals(this.forced, other.forced) && - Utils.enhancedDeepEquals(this.channels, other.channels) && - Utils.enhancedDeepEquals(this.audioChannelLayout, other.audioChannelLayout) && - Utils.enhancedDeepEquals(this.samplingRate, other.samplingRate) && - Utils.enhancedDeepEquals(this.canAutoSync, other.canAutoSync) && - Utils.enhancedDeepEquals(this.hearingImpaired, other.hearingImpaired) && - Utils.enhancedDeepEquals(this.dub, other.dub) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, streamType, format, - default_, codec, index, - bitrate, language, languageTag, - languageCode, headerCompression, doviblCompatID, - doviblPresent, dovielPresent, doviLevel, - doviPresent, doviProfile, dovirpuPresent, - doviVersion, bitDepth, chromaLocation, - chromaSubsampling, codedHeight, codedWidth, - closedCaptions, colorPrimaries, colorRange, - colorSpace, colorTrc, frameRate, - key, height, level, - original, hasScalingMatrix, profile, - scanType, embeddedInVideo, refFrames, - width, displayTitle, extendedDisplayTitle, - selected, forced, channels, - audioChannelLayout, samplingRate, canAutoSync, - hearingImpaired, dub, title); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataStream.class, - "id", id, - "streamType", streamType, - "format", format, - "default_", default_, - "codec", codec, - "index", index, - "bitrate", bitrate, - "language", language, - "languageTag", languageTag, - "languageCode", languageCode, - "headerCompression", headerCompression, - "doviblCompatID", doviblCompatID, - "doviblPresent", doviblPresent, - "dovielPresent", dovielPresent, - "doviLevel", doviLevel, - "doviPresent", doviPresent, - "doviProfile", doviProfile, - "dovirpuPresent", dovirpuPresent, - "doviVersion", doviVersion, - "bitDepth", bitDepth, - "chromaLocation", chromaLocation, - "chromaSubsampling", chromaSubsampling, - "codedHeight", codedHeight, - "codedWidth", codedWidth, - "closedCaptions", closedCaptions, - "colorPrimaries", colorPrimaries, - "colorRange", colorRange, - "colorSpace", colorSpace, - "colorTrc", colorTrc, - "frameRate", frameRate, - "key", key, - "height", height, - "level", level, - "original", original, - "hasScalingMatrix", hasScalingMatrix, - "profile", profile, - "scanType", scanType, - "embeddedInVideo", embeddedInVideo, - "refFrames", refFrames, - "width", width, - "displayTitle", displayTitle, - "extendedDisplayTitle", extendedDisplayTitle, - "selected", selected, - "forced", forced, - "channels", channels, - "audioChannelLayout", audioChannelLayout, - "samplingRate", samplingRate, - "canAutoSync", canAutoSync, - "hearingImpaired", hearingImpaired, - "dub", dub, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private Optional format = Optional.empty(); - - private Optional default_ = Optional.empty(); - - private Optional codec = Optional.empty(); - - private Optional index = Optional.empty(); - - private Optional bitrate = Optional.empty(); - - private Optional language = Optional.empty(); - - private Optional languageTag = Optional.empty(); - - private Optional languageCode = Optional.empty(); - - private Optional headerCompression = Optional.empty(); - - private Optional doviblCompatID = Optional.empty(); - - private Optional doviblPresent = Optional.empty(); - - private Optional dovielPresent = Optional.empty(); - - private Optional doviLevel = Optional.empty(); - - private Optional doviPresent = Optional.empty(); - - private Optional doviProfile = Optional.empty(); - - private Optional dovirpuPresent = Optional.empty(); - - private Optional doviVersion = 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 closedCaptions = 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 key = Optional.empty(); - - private Optional height = Optional.empty(); - - private Optional level = Optional.empty(); - - private Optional original = Optional.empty(); - - private Optional hasScalingMatrix = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional scanType = Optional.empty(); - - private Optional embeddedInVideo = Optional.empty(); - - private Optional refFrames = Optional.empty(); - - private Optional width = Optional.empty(); - - private Optional displayTitle = Optional.empty(); - - private Optional extendedDisplayTitle = Optional.empty(); - - private Optional selected = Optional.empty(); - - private Optional forced = Optional.empty(); - - private Optional channels = Optional.empty(); - - private Optional audioChannelLayout = Optional.empty(); - - private Optional samplingRate = Optional.empty(); - - private Optional canAutoSync = Optional.empty(); - - private Optional hearingImpaired = Optional.empty(); - - private Optional dub = Optional.empty(); - - private Optional title = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique stream identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Format of the stream (e.g., srt). - */ - public Builder format(String format) { - Utils.checkNotNull(format, "format"); - this.format = Optional.ofNullable(format); - return this; - } - - /** - * Format of the stream (e.g., srt). - */ - public Builder format(Optional format) { - Utils.checkNotNull(format, "format"); - this.format = format; - return this; - } - - - /** - * Indicates if this stream is default. - */ - public Builder default_(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - /** - * Indicates if this stream is default. - */ - public Builder default_(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - - /** - * Codec used by the stream. - */ - public Builder codec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = Optional.ofNullable(codec); - return this; - } - - /** - * Codec used by the stream. - */ - public Builder codec(Optional codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - - /** - * Index of the stream. - */ - public Builder index(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - /** - * Index of the stream. - */ - public Builder index(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - - /** - * Bitrate of the stream. - */ - public Builder bitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * Bitrate of the stream. - */ - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - - /** - * Language of the stream. - */ - public Builder language(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - /** - * Language of the stream. - */ - public Builder language(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - - /** - * Language tag (e.g., en). - */ - public Builder languageTag(String languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = Optional.ofNullable(languageTag); - return this; - } - - /** - * Language tag (e.g., en). - */ - public Builder languageTag(Optional languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = languageTag; - return this; - } - - - /** - * ISO language code. - */ - public Builder languageCode(String languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = Optional.ofNullable(languageCode); - return this; - } - - /** - * ISO language code. - */ - public Builder languageCode(Optional languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = languageCode; - return this; - } - - - /** - * Indicates whether header compression is enabled. - */ - public Builder headerCompression(boolean headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = Optional.ofNullable(headerCompression); - return this; - } - - /** - * Indicates whether header compression is enabled. - */ - public Builder headerCompression(Optional headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = headerCompression; - return this; - } - - - /** - * Dolby Vision BL compatibility ID. - */ - public Builder doviblCompatID(int doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = Optional.ofNullable(doviblCompatID); - return this; - } - - /** - * Dolby Vision BL compatibility ID. - */ - public Builder doviblCompatID(Optional doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = doviblCompatID; - return this; - } - - - /** - * Indicates if Dolby Vision BL is present. - */ - public Builder doviblPresent(boolean doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = Optional.ofNullable(doviblPresent); - return this; - } - - /** - * Indicates if Dolby Vision BL is present. - */ - public Builder doviblPresent(Optional doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = doviblPresent; - return this; - } - - - /** - * Indicates if Dolby Vision EL is present. - */ - public Builder dovielPresent(boolean dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = Optional.ofNullable(dovielPresent); - return this; - } - - /** - * Indicates if Dolby Vision EL is present. - */ - public Builder dovielPresent(Optional dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = dovielPresent; - return this; - } - - - /** - * Dolby Vision level. - */ - public Builder doviLevel(int doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = Optional.ofNullable(doviLevel); - return this; - } - - /** - * Dolby Vision level. - */ - public Builder doviLevel(Optional doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = doviLevel; - return this; - } - - - /** - * Indicates if Dolby Vision is present. - */ - public Builder doviPresent(boolean doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = Optional.ofNullable(doviPresent); - return this; - } - - /** - * Indicates if Dolby Vision is present. - */ - public Builder doviPresent(Optional doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = doviPresent; - return this; - } - - - /** - * Dolby Vision profile. - */ - public Builder doviProfile(int doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = Optional.ofNullable(doviProfile); - return this; - } - - /** - * Dolby Vision profile. - */ - public Builder doviProfile(Optional doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = doviProfile; - return this; - } - - - /** - * Indicates if Dolby Vision RPU is present. - */ - public Builder dovirpuPresent(boolean dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = Optional.ofNullable(dovirpuPresent); - return this; - } - - /** - * Indicates if Dolby Vision RPU is present. - */ - public Builder dovirpuPresent(Optional dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = dovirpuPresent; - return this; - } - - - /** - * Dolby Vision version. - */ - public Builder doviVersion(String doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = Optional.ofNullable(doviVersion); - return this; - } - - /** - * Dolby Vision version. - */ - public Builder doviVersion(Optional doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = doviVersion; - return this; - } - - - /** - * Bit depth of the video stream. - */ - public Builder bitDepth(int bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - /** - * Bit depth of the video stream. - */ - public Builder bitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - - /** - * Chroma sample location. - */ - public Builder chromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - /** - * Chroma sample location. - */ - public Builder chromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - - /** - * Chroma subsampling format. - */ - public Builder chromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - /** - * Chroma subsampling format. - */ - public Builder chromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - - /** - * Coded video height. - */ - public Builder codedHeight(int codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - /** - * Coded video height. - */ - public Builder codedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - - /** - * Coded video width. - */ - public Builder codedWidth(int codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - /** - * Coded video width. - */ - public Builder codedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - 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; - } - - - /** - * Color primaries used. - */ - public Builder colorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - /** - * Color primaries used. - */ - public Builder colorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - - /** - * Color range (e.g., tv). - */ - public Builder colorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - /** - * Color range (e.g., tv). - */ - public Builder colorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - - /** - * Color space. - */ - public Builder colorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - /** - * Color space. - */ - public Builder colorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - - /** - * Color transfer characteristics. - */ - public Builder colorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - /** - * Color transfer characteristics. - */ - public Builder colorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - - /** - * Frame rate of the stream. - */ - public Builder frameRate(float frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - /** - * Frame rate of the stream. - */ - public Builder frameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - - /** - * Key to access this stream part. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - /** - * Key to access this stream part. - */ - public Builder key(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * Height of the video stream. - */ - public Builder height(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * Height of the video stream. - */ - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - /** - * Video level. - */ - public Builder level(int level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - /** - * Video level. - */ - public Builder level(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - - /** - * Indicates if this is the original stream. - */ - public Builder original(boolean original) { - Utils.checkNotNull(original, "original"); - this.original = Optional.ofNullable(original); - return this; - } - - /** - * Indicates if this is the original stream. - */ - public Builder original(Optional original) { - Utils.checkNotNull(original, "original"); - this.original = original; - 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; - } - - - /** - * Video profile. - */ - public Builder profile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - /** - * Video profile. - */ - public Builder profile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - 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 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; - } - - - /** - * Number of reference frames. - */ - public Builder refFrames(int 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; - } - - - /** - * Width of the video stream. - */ - public Builder width(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * Width of the video stream. - */ - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - /** - * Display title for the stream. - */ - public Builder displayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = Optional.ofNullable(displayTitle); - return this; - } - - /** - * Display title for the stream. - */ - public Builder displayTitle(Optional displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - - /** - * Extended display title for the stream. - */ - public Builder extendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); - return this; - } - - /** - * Extended display title for the stream. - */ - public Builder extendedDisplayTitle(Optional extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public Builder selected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public Builder selected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - - public Builder forced(boolean forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = Optional.ofNullable(forced); - return this; - } - - public Builder forced(Optional forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = forced; - return this; - } - - - /** - * Number of audio channels (for audio streams). - */ - public Builder channels(int 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; - } - - - /** - * Audio channel layout. - */ - public Builder audioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - /** - * Audio channel layout. - */ - public Builder audioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - - /** - * Sampling rate for the audio stream. - */ - public Builder samplingRate(int samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - /** - * Sampling rate for the audio stream. - */ - public Builder samplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - - /** - * Indicates if the stream can auto-sync. - */ - public Builder canAutoSync(boolean canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = Optional.ofNullable(canAutoSync); - return this; - } - - /** - * Indicates if the stream can auto-sync. - */ - public Builder canAutoSync(Optional canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = canAutoSync; - return this; - } - - - /** - * Indicates if the stream is for the hearing impaired. - */ - public Builder hearingImpaired(boolean hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = Optional.ofNullable(hearingImpaired); - return this; - } - - /** - * Indicates if the stream is for the hearing impaired. - */ - public Builder hearingImpaired(Optional hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = hearingImpaired; - return this; - } - - - /** - * Indicates if the stream is a dub. - */ - public Builder dub(boolean dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = Optional.ofNullable(dub); - return this; - } - - /** - * Indicates if the stream is a dub. - */ - public Builder dub(Optional dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = dub; - return this; - } - - - /** - * Optional title for the stream (e.g., language variant). - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - /** - * Optional title for the stream (e.g., language variant). - */ - public Builder title(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetMediaMetaDataStream build() { - - return new GetMediaMetaDataStream( - id, format, default_, - codec, index, bitrate, - language, languageTag, languageCode, - headerCompression, doviblCompatID, doviblPresent, - dovielPresent, doviLevel, doviPresent, - doviProfile, dovirpuPresent, doviVersion, - bitDepth, chromaLocation, chromaSubsampling, - codedHeight, codedWidth, closedCaptions, - colorPrimaries, colorRange, colorSpace, - colorTrc, frameRate, key, - height, level, original, - hasScalingMatrix, profile, scanType, - embeddedInVideo, refFrames, width, - displayTitle, extendedDisplayTitle, selected, - forced, channels, audioChannelLayout, - samplingRate, canAutoSync, hearingImpaired, - dub, title); - } - - - private static final LazySingletonValue _SINGLETON_VALUE_StreamType = - new LazySingletonValue<>( - "streamType", - "1", - new TypeReference() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataType.java deleted file mode 100644 index 123af9ea..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataType.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The type of media content in the Plex library. This can represent videos, music, or photos. - */ -@JsonDeserialize(using = GetMediaMetaDataType._Deserializer.class) -@JsonSerialize(using = GetMediaMetaDataType._Serializer.class) -public class GetMediaMetaDataType { - - public static final GetMediaMetaDataType Movie = new GetMediaMetaDataType("movie"); - public static final GetMediaMetaDataType TvShow = new GetMediaMetaDataType("show"); - public static final GetMediaMetaDataType Season = new GetMediaMetaDataType("season"); - public static final GetMediaMetaDataType Episode = new GetMediaMetaDataType("episode"); - public static final GetMediaMetaDataType Artist = new GetMediaMetaDataType("artist"); - public static final GetMediaMetaDataType Album = new GetMediaMetaDataType("album"); - public static final GetMediaMetaDataType Track = new GetMediaMetaDataType("track"); - public static final GetMediaMetaDataType PhotoAlbum = new GetMediaMetaDataType("photoalbum"); - public static final GetMediaMetaDataType Photo = new GetMediaMetaDataType("photo"); - public static final GetMediaMetaDataType Collection = new GetMediaMetaDataType("collection"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetMediaMetaDataType(String value) { - this.value = value; - } - - /** - * Returns a GetMediaMetaDataType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetMediaMetaDataType - */ - public static GetMediaMetaDataType of(String value) { - synchronized (GetMediaMetaDataType.class) { - return values.computeIfAbsent(value, v -> new GetMediaMetaDataType(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetMediaMetaDataType other = (GetMediaMetaDataType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetMediaMetaDataType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetMediaMetaDataType[] values() { - synchronized (GetMediaMetaDataType.class) { - return values.values().toArray(new GetMediaMetaDataType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("movie", Movie); - map.put("show", TvShow); - map.put("season", Season); - map.put("episode", Episode); - map.put("artist", Artist); - map.put("album", Album); - map.put("track", Track); - map.put("photoalbum", PhotoAlbum); - map.put("photo", Photo); - map.put("collection", Collection); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("movie", GetMediaMetaDataTypeEnum.Movie); - map.put("show", GetMediaMetaDataTypeEnum.TvShow); - map.put("season", GetMediaMetaDataTypeEnum.Season); - map.put("episode", GetMediaMetaDataTypeEnum.Episode); - map.put("artist", GetMediaMetaDataTypeEnum.Artist); - map.put("album", GetMediaMetaDataTypeEnum.Album); - map.put("track", GetMediaMetaDataTypeEnum.Track); - map.put("photoalbum", GetMediaMetaDataTypeEnum.PhotoAlbum); - map.put("photo", GetMediaMetaDataTypeEnum.Photo); - map.put("collection", GetMediaMetaDataTypeEnum.Collection); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetMediaMetaDataType.class); - } - - @Override - public void serialize(GetMediaMetaDataType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetMediaMetaDataType.class); - } - - @Override - public GetMediaMetaDataType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetMediaMetaDataType.of(v); - } - } - - public enum GetMediaMetaDataTypeEnum { - - Movie("movie"), - TvShow("show"), - Season("season"), - Episode("episode"), - Artist("artist"), - Album("album"), - Track("track"), - PhotoAlbum("photoalbum"), - Photo("photo"), - Collection("collection"),; - - private final String value; - - private GetMediaMetaDataTypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataUltraBlurColors.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataUltraBlurColors.java deleted file mode 100644 index 7753ad63..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataUltraBlurColors.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetMediaMetaDataUltraBlurColors { - - @JsonProperty("topLeft") - private String topLeft; - - - @JsonProperty("topRight") - private String topRight; - - - @JsonProperty("bottomRight") - private String bottomRight; - - - @JsonProperty("bottomLeft") - private String bottomLeft; - - @JsonCreator - public GetMediaMetaDataUltraBlurColors( - @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 static Builder builder() { - return new Builder(); - } - - - public GetMediaMetaDataUltraBlurColors withTopLeft(String topLeft) { - Utils.checkNotNull(topLeft, "topLeft"); - this.topLeft = topLeft; - return this; - } - - public GetMediaMetaDataUltraBlurColors withTopRight(String topRight) { - Utils.checkNotNull(topRight, "topRight"); - this.topRight = topRight; - return this; - } - - public GetMediaMetaDataUltraBlurColors withBottomRight(String bottomRight) { - Utils.checkNotNull(bottomRight, "bottomRight"); - this.bottomRight = bottomRight; - return this; - } - - public GetMediaMetaDataUltraBlurColors 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; - } - GetMediaMetaDataUltraBlurColors other = (GetMediaMetaDataUltraBlurColors) o; - return - Utils.enhancedDeepEquals(this.topLeft, other.topLeft) && - Utils.enhancedDeepEquals(this.topRight, other.topRight) && - Utils.enhancedDeepEquals(this.bottomRight, other.bottomRight) && - Utils.enhancedDeepEquals(this.bottomLeft, other.bottomLeft); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - topLeft, topRight, bottomRight, - bottomLeft); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataUltraBlurColors.class, - "topLeft", topLeft, - "topRight", topRight, - "bottomRight", bottomRight, - "bottomLeft", bottomLeft); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetMediaMetaDataUltraBlurColors build() { - - return new GetMediaMetaDataUltraBlurColors( - topLeft, topRight, bottomRight, - bottomLeft); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataWriter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataWriter.java deleted file mode 100644 index 8a60a18c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaMetaDataWriter.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaMetaDataWriter { - /** - * Unique identifier for the writer. - */ - @JsonProperty("id") - private int id; - - /** - * The role of Writer - */ - @JsonProperty("tag") - private String tag; - - /** - * The filter string used to query this writer. - */ - @JsonProperty("filter") - private String filter; - - /** - * The absolute URL of the thumbnail image for the writer. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tagKey") - private Optional tagKey; - - @JsonCreator - public GetMediaMetaDataWriter( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("filter") String filter, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("tagKey") Optional tagKey) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(tagKey, "tagKey"); - this.id = id; - this.tag = tag; - this.filter = filter; - this.thumb = thumb; - this.tagKey = tagKey; - } - - public GetMediaMetaDataWriter( - int id, - String tag, - String filter) { - this(id, tag, filter, - Optional.empty(), Optional.empty()); - } - - /** - * Unique identifier for the writer. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The role of Writer - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * The filter string used to query this writer. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - @JsonIgnore - public Optional tagKey() { - return tagKey; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique identifier for the writer. - */ - public GetMediaMetaDataWriter withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The role of Writer - */ - public GetMediaMetaDataWriter withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * The filter string used to query this writer. - */ - public GetMediaMetaDataWriter withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public GetMediaMetaDataWriter withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public GetMediaMetaDataWriter withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - public GetMediaMetaDataWriter withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - public GetMediaMetaDataWriter withTagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaMetaDataWriter other = (GetMediaMetaDataWriter) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, filter, - thumb, tagKey); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataWriter.class, - "id", id, - "tag", tag, - "filter", filter, - "thumb", thumb, - "tagKey", tagKey); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private String filter; - - private Optional thumb = Optional.empty(); - - private Optional tagKey = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique identifier for the writer. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The role of Writer - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * The filter string used to query this writer. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - public Builder tagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - public GetMediaMetaDataWriter build() { - - return new GetMediaMetaDataWriter( - id, tag, filter, - thumb, tagKey); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartRequest.java new file mode 100644 index 00000000..176bf9dd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartRequest.java @@ -0,0 +1,926 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetMediaPartRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The part id who's index is to be fetched + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=partId") + private long partId; + + /** + * The changestamp of the part; used for busting potential caches. Provided in the `key` for the part + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=changestamp") + private long changestamp; + + /** + * A generic filename used for a client media stack which relies on the extension in the request. Provided in the `key` for the part + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=filename") + private String filename; + + /** + * Whether this is a file download + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=download") + private Optional download; + + @JsonCreator + public GetMediaPartRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long partId, + long changestamp, + String filename, + Optional download) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(partId, "partId"); + Utils.checkNotNull(changestamp, "changestamp"); + Utils.checkNotNull(filename, "filename"); + Utils.checkNotNull(download, "download"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.partId = partId; + this.changestamp = changestamp; + this.filename = filename; + this.download = download; + } + + public GetMediaPartRequest( + long partId, + long changestamp, + String filename) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), partId, + changestamp, filename, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The part id who's index is to be fetched + */ + @JsonIgnore + public long partId() { + return partId; + } + + /** + * The changestamp of the part; used for busting potential caches. Provided in the `key` for the part + */ + @JsonIgnore + public long changestamp() { + return changestamp; + } + + /** + * A generic filename used for a client media stack which relies on the extension in the request. Provided in the `key` for the part + */ + @JsonIgnore + public String filename() { + return filename; + } + + /** + * Whether this is a file download + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional download() { + return (Optional) download; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetMediaPartRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetMediaPartRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetMediaPartRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetMediaPartRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetMediaPartRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetMediaPartRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetMediaPartRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetMediaPartRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetMediaPartRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetMediaPartRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetMediaPartRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetMediaPartRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetMediaPartRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetMediaPartRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetMediaPartRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetMediaPartRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetMediaPartRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetMediaPartRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetMediaPartRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetMediaPartRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetMediaPartRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetMediaPartRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The part id who's index is to be fetched + */ + public GetMediaPartRequest withPartId(long partId) { + Utils.checkNotNull(partId, "partId"); + this.partId = partId; + return this; + } + + /** + * The changestamp of the part; used for busting potential caches. Provided in the `key` for the part + */ + public GetMediaPartRequest withChangestamp(long changestamp) { + Utils.checkNotNull(changestamp, "changestamp"); + this.changestamp = changestamp; + return this; + } + + /** + * A generic filename used for a client media stack which relies on the extension in the request. Provided in the `key` for the part + */ + public GetMediaPartRequest withFilename(String filename) { + Utils.checkNotNull(filename, "filename"); + this.filename = filename; + return this; + } + + /** + * Whether this is a file download + */ + public GetMediaPartRequest withDownload(BoolInt download) { + Utils.checkNotNull(download, "download"); + this.download = Optional.ofNullable(download); + return this; + } + + + /** + * Whether this is a file download + */ + public GetMediaPartRequest withDownload(Optional download) { + Utils.checkNotNull(download, "download"); + this.download = download; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaPartRequest other = (GetMediaPartRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.partId, other.partId) && + Utils.enhancedDeepEquals(this.changestamp, other.changestamp) && + Utils.enhancedDeepEquals(this.filename, other.filename) && + Utils.enhancedDeepEquals(this.download, other.download); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, partId, + changestamp, filename, download); + } + + @Override + public String toString() { + return Utils.toString(GetMediaPartRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "partId", partId, + "changestamp", changestamp, + "filename", filename, + "download", download); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long partId; + + private Long changestamp; + + private String filename; + + private Optional download = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The part id who's index is to be fetched + */ + public Builder partId(long partId) { + Utils.checkNotNull(partId, "partId"); + this.partId = partId; + return this; + } + + + /** + * The changestamp of the part; used for busting potential caches. Provided in the `key` for the part + */ + public Builder changestamp(long changestamp) { + Utils.checkNotNull(changestamp, "changestamp"); + this.changestamp = changestamp; + return this; + } + + + /** + * A generic filename used for a client media stack which relies on the extension in the request. Provided in the `key` for the part + */ + public Builder filename(String filename) { + Utils.checkNotNull(filename, "filename"); + this.filename = filename; + return this; + } + + + /** + * Whether this is a file download + */ + public Builder download(BoolInt download) { + Utils.checkNotNull(download, "download"); + this.download = Optional.ofNullable(download); + return this; + } + + /** + * Whether this is a file download + */ + public Builder download(Optional download) { + Utils.checkNotNull(download, "download"); + this.download = download; + return this; + } + + public GetMediaPartRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetMediaPartRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, partId, + changestamp, filename, download); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartRequestBuilder.java new file mode 100644 index 00000000..1ba8bf0e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetMediaPart; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetMediaPartRequestBuilder { + + private GetMediaPartRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetMediaPartRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetMediaPartRequestBuilder request(GetMediaPartRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetMediaPartResponse call() throws Exception { + + RequestOperation operation + = new GetMediaPart.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartResponse.java new file mode 100644 index 00000000..d90fd850 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPartResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; + + +public class GetMediaPartResponse 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; + + + private Map> headers; + + @JsonCreator + public GetMediaPartResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.headers = headers; + } + + /** + * 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; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetMediaPartResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMediaPartResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMediaPartResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetMediaPartResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaPartResponse other = (GetMediaPartResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(GetMediaPartResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetMediaPartResponse build() { + + return new GetMediaPartResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMediaContainer.java deleted file mode 100644 index 9f93c4c8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMediaContainer.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.List; - - -public class GetMediaPostersMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * The version number for media tags. - */ - @JsonProperty("mediaTagVersion") - private long mediaTagVersion; - - /** - * The prefix used for media tag resource paths. - */ - @JsonProperty("mediaTagPrefix") - private String mediaTagPrefix; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - - @JsonProperty("Metadata") - private List metadata; - - @JsonCreator - public GetMediaPostersMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("mediaTagVersion") long mediaTagVersion, - @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("identifier") String identifier, - @JsonProperty("Metadata") List metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.mediaTagVersion = mediaTagVersion; - this.mediaTagPrefix = mediaTagPrefix; - this.identifier = identifier; - this.metadata = metadata; - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * The version number for media tags. - */ - @JsonIgnore - public long mediaTagVersion() { - return mediaTagVersion; - } - - /** - * The prefix used for media tag resource paths. - */ - @JsonIgnore - public String mediaTagPrefix() { - return mediaTagPrefix; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - @JsonIgnore - public List metadata() { - return metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetMediaPostersMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * The version number for media tags. - */ - public GetMediaPostersMediaContainer withMediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - /** - * The prefix used for media tag resource paths. - */ - public GetMediaPostersMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetMediaPostersMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public GetMediaPostersMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaPostersMediaContainer other = (GetMediaPostersMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, mediaTagVersion, mediaTagPrefix, - identifier, metadata); - } - - @Override - public String toString() { - return Utils.toString(GetMediaPostersMediaContainer.class, - "size", size, - "mediaTagVersion", mediaTagVersion, - "mediaTagPrefix", mediaTagPrefix, - "identifier", identifier, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Long mediaTagVersion; - - private String mediaTagPrefix; - - private String identifier; - - private List metadata; - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * The version number for media tags. - */ - public Builder mediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - - /** - * The prefix used for media tag resource paths. - */ - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - public Builder metadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - public GetMediaPostersMediaContainer build() { - - return new GetMediaPostersMediaContainer( - size, mediaTagVersion, mediaTagPrefix, - identifier, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMetadata.java deleted file mode 100644 index b2dff398..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersMetadata.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMediaPostersMetadata { - /** - * The URL of the poster. - */ - @JsonProperty("key") - private String key; - - /** - * The provider of the poster. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("provider") - private Optional provider; - - /** - * The URL of the poster. - */ - @JsonProperty("ratingKey") - private String ratingKey; - - /** - * Whether this is the selected poster. - */ - @JsonProperty("selected") - private boolean selected; - - /** - * The URL of the poster thumbnail. - */ - @JsonProperty("thumb") - private String thumb; - - @JsonCreator - public GetMediaPostersMetadata( - @JsonProperty("key") String key, - @JsonProperty("provider") Optional provider, - @JsonProperty("ratingKey") String ratingKey, - @JsonProperty("selected") boolean selected, - @JsonProperty("thumb") String thumb) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(provider, "provider"); - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(selected, "selected"); - Utils.checkNotNull(thumb, "thumb"); - this.key = key; - this.provider = provider; - this.ratingKey = ratingKey; - this.selected = selected; - this.thumb = thumb; - } - - public GetMediaPostersMetadata( - String key, - String ratingKey, - boolean selected, - String thumb) { - this(key, Optional.empty(), ratingKey, - selected, thumb); - } - - /** - * The URL of the poster. - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The provider of the poster. - */ - @JsonIgnore - public Optional provider() { - return provider; - } - - /** - * The URL of the poster. - */ - @JsonIgnore - public String ratingKey() { - return ratingKey; - } - - /** - * Whether this is the selected poster. - */ - @JsonIgnore - public boolean selected() { - return selected; - } - - /** - * The URL of the poster thumbnail. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The URL of the poster. - */ - public GetMediaPostersMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The provider of the poster. - */ - public GetMediaPostersMetadata withProvider(String provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = Optional.ofNullable(provider); - return this; - } - - - /** - * The provider of the poster. - */ - public GetMediaPostersMetadata withProvider(Optional provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = provider; - return this; - } - - /** - * The URL of the poster. - */ - public GetMediaPostersMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * Whether this is the selected poster. - */ - public GetMediaPostersMetadata withSelected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - /** - * The URL of the poster thumbnail. - */ - public GetMediaPostersMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaPostersMetadata other = (GetMediaPostersMetadata) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.provider, other.provider) && - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.selected, other.selected) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, provider, ratingKey, - selected, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetMediaPostersMetadata.class, - "key", key, - "provider", provider, - "ratingKey", ratingKey, - "selected", selected, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String key; - - private Optional provider = Optional.empty(); - - private String ratingKey; - - private Boolean selected; - - private String thumb; - - private Builder() { - // force use of static builder() method - } - - - /** - * The URL of the poster. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The provider of the poster. - */ - public Builder provider(String provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = Optional.ofNullable(provider); - return this; - } - - /** - * The provider of the poster. - */ - public Builder provider(Optional provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = provider; - return this; - } - - - /** - * The URL of the poster. - */ - public Builder ratingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * Whether this is the selected poster. - */ - public Builder selected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - - /** - * The URL of the poster thumbnail. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetMediaPostersMetadata build() { - - return new GetMediaPostersMetadata( - key, provider, ratingKey, - selected, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequest.java deleted file mode 100644 index 8ca9add9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; - - -public class GetMediaPostersRequest { - /** - * the id of the library item to return the posters of. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") - private long ratingKey; - - @JsonCreator - public GetMediaPostersRequest( - long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - } - - /** - * the id of the library item to return the posters of. - */ - @JsonIgnore - public long ratingKey() { - return ratingKey; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the id of the library item to return the posters of. - */ - public GetMediaPostersRequest withRatingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaPostersRequest other = (GetMediaPostersRequest) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey); - } - - @Override - public String toString() { - return Utils.toString(GetMediaPostersRequest.class, - "ratingKey", ratingKey); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long ratingKey; - - private Builder() { - // force use of static builder() method - } - - - /** - * the id of the library item to return the posters of. - */ - public Builder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetMediaPostersRequest build() { - - return new GetMediaPostersRequest( - ratingKey); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequestBuilder.java deleted file mode 100644 index b4388597..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetMediaPosters; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; - -public class GetMediaPostersRequestBuilder { - - private Long ratingKey; - private final SDKConfiguration sdkConfiguration; - - public GetMediaPostersRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMediaPostersRequestBuilder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - private GetMediaPostersRequest buildRequest() { - - GetMediaPostersRequest request = new GetMediaPostersRequest(ratingKey); - - return request; - } - - public GetMediaPostersResponse call() throws Exception { - - RequestOperation operation - = new GetMediaPosters.Sync(sdkConfiguration); - GetMediaPostersRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponse.java deleted file mode 100644 index 0a67bb57..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetMediaPostersResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - /** - * The available posters for the library item. - */ - private Optional object; - - @JsonCreator - public GetMediaPostersResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional object) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.object = object; - } - - public GetMediaPostersResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, - Optional.empty()); - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - /** - * The available posters for the library item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMediaPostersResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMediaPostersResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaPostersResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The available posters for the library item. - */ - public GetMediaPostersResponse withObject(GetMediaPostersResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The available posters for the library item. - */ - public GetMediaPostersResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaPostersResponse other = (GetMediaPostersResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMediaPostersResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional object = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - - /** - * The available posters for the library item. - */ - public Builder object(GetMediaPostersResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The available posters for the library item. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMediaPostersResponse build() { - - return new GetMediaPostersResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponseBody.java deleted file mode 100644 index 3de1dbee..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaPostersResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetMediaPostersResponseBody - * - *

The available posters for the library item. - */ -public class GetMediaPostersResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetMediaPostersResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetMediaPostersResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaPostersResponseBody withMediaContainer(GetMediaPostersMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetMediaPostersResponseBody withMediaContainer(Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaPostersResponseBody other = (GetMediaPostersResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetMediaPostersResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetMediaPostersMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - public Builder mediaContainer(Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - return this; - } - - public GetMediaPostersResponseBody build() { - - return new GetMediaPostersResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersDirectory.java deleted file mode 100644 index 992ce4d3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersDirectory.java +++ /dev/null @@ -1,687 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetMediaProvidersDirectory { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hubKey") - private Optional hubKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("agent") - private Optional agent; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("language") - private Optional language; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("refreshing") - private Optional refreshing; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("scanner") - private Optional scanner; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("uuid") - private Optional uuid; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("scannedAt") - private Optional scannedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Pivot") - private Optional> pivot; - - @JsonCreator - public GetMediaProvidersDirectory( - @JsonProperty("hubKey") Optional hubKey, - @JsonProperty("title") Optional title, - @JsonProperty("agent") Optional agent, - @JsonProperty("language") Optional language, - @JsonProperty("refreshing") Optional refreshing, - @JsonProperty("scanner") Optional scanner, - @JsonProperty("uuid") Optional uuid, - @JsonProperty("id") Optional id, - @JsonProperty("key") Optional key, - @JsonProperty("type") Optional type, - @JsonProperty("subtype") Optional subtype, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("scannedAt") Optional scannedAt, - @JsonProperty("Pivot") Optional> pivot) { - Utils.checkNotNull(hubKey, "hubKey"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(agent, "agent"); - Utils.checkNotNull(language, "language"); - Utils.checkNotNull(refreshing, "refreshing"); - Utils.checkNotNull(scanner, "scanner"); - Utils.checkNotNull(uuid, "uuid"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(scannedAt, "scannedAt"); - Utils.checkNotNull(pivot, "pivot"); - this.hubKey = hubKey; - this.title = title; - this.agent = agent; - this.language = language; - this.refreshing = refreshing; - this.scanner = scanner; - this.uuid = uuid; - this.id = id; - this.key = key; - this.type = type; - this.subtype = subtype; - this.updatedAt = updatedAt; - this.scannedAt = scannedAt; - this.pivot = pivot; - } - - public GetMediaProvidersDirectory() { - 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()); - } - - @JsonIgnore - public Optional hubKey() { - return hubKey; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional agent() { - return agent; - } - - @JsonIgnore - public Optional language() { - return language; - } - - @JsonIgnore - public Optional refreshing() { - return refreshing; - } - - @JsonIgnore - public Optional scanner() { - return scanner; - } - - @JsonIgnore - public Optional uuid() { - return uuid; - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional subtype() { - return subtype; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - @JsonIgnore - public Optional scannedAt() { - return scannedAt; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> pivot() { - return (Optional>) pivot; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaProvidersDirectory withHubKey(String hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = Optional.ofNullable(hubKey); - return this; - } - - - public GetMediaProvidersDirectory withHubKey(Optional hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = hubKey; - return this; - } - - public GetMediaProvidersDirectory withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetMediaProvidersDirectory withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetMediaProvidersDirectory withAgent(String agent) { - Utils.checkNotNull(agent, "agent"); - this.agent = Optional.ofNullable(agent); - return this; - } - - - public GetMediaProvidersDirectory withAgent(Optional agent) { - Utils.checkNotNull(agent, "agent"); - this.agent = agent; - return this; - } - - public GetMediaProvidersDirectory withLanguage(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - - public GetMediaProvidersDirectory withLanguage(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - public GetMediaProvidersDirectory withRefreshing(boolean refreshing) { - Utils.checkNotNull(refreshing, "refreshing"); - this.refreshing = Optional.ofNullable(refreshing); - return this; - } - - - public GetMediaProvidersDirectory withRefreshing(Optional refreshing) { - Utils.checkNotNull(refreshing, "refreshing"); - this.refreshing = refreshing; - return this; - } - - public GetMediaProvidersDirectory withScanner(String scanner) { - Utils.checkNotNull(scanner, "scanner"); - this.scanner = Optional.ofNullable(scanner); - return this; - } - - - public GetMediaProvidersDirectory withScanner(Optional scanner) { - Utils.checkNotNull(scanner, "scanner"); - this.scanner = scanner; - return this; - } - - public GetMediaProvidersDirectory withUuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = Optional.ofNullable(uuid); - return this; - } - - - public GetMediaProvidersDirectory withUuid(Optional uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - public GetMediaProvidersDirectory withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetMediaProvidersDirectory withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetMediaProvidersDirectory withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetMediaProvidersDirectory withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetMediaProvidersDirectory withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetMediaProvidersDirectory withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetMediaProvidersDirectory withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - - public GetMediaProvidersDirectory withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - public GetMediaProvidersDirectory withUpdatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetMediaProvidersDirectory withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - public GetMediaProvidersDirectory withScannedAt(long scannedAt) { - Utils.checkNotNull(scannedAt, "scannedAt"); - this.scannedAt = Optional.ofNullable(scannedAt); - return this; - } - - - public GetMediaProvidersDirectory withScannedAt(Optional scannedAt) { - Utils.checkNotNull(scannedAt, "scannedAt"); - this.scannedAt = scannedAt; - return this; - } - - public GetMediaProvidersDirectory withPivot(List pivot) { - Utils.checkNotNull(pivot, "pivot"); - this.pivot = Optional.ofNullable(pivot); - return this; - } - - - public GetMediaProvidersDirectory withPivot(Optional> pivot) { - Utils.checkNotNull(pivot, "pivot"); - this.pivot = pivot; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaProvidersDirectory other = (GetMediaProvidersDirectory) o; - return - Utils.enhancedDeepEquals(this.hubKey, other.hubKey) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.agent, other.agent) && - Utils.enhancedDeepEquals(this.language, other.language) && - Utils.enhancedDeepEquals(this.refreshing, other.refreshing) && - Utils.enhancedDeepEquals(this.scanner, other.scanner) && - Utils.enhancedDeepEquals(this.uuid, other.uuid) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.subtype, other.subtype) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.scannedAt, other.scannedAt) && - Utils.enhancedDeepEquals(this.pivot, other.pivot); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - hubKey, title, agent, - language, refreshing, scanner, - uuid, id, key, - type, subtype, updatedAt, - scannedAt, pivot); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersDirectory.class, - "hubKey", hubKey, - "title", title, - "agent", agent, - "language", language, - "refreshing", refreshing, - "scanner", scanner, - "uuid", uuid, - "id", id, - "key", key, - "type", type, - "subtype", subtype, - "updatedAt", updatedAt, - "scannedAt", scannedAt, - "pivot", pivot); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional hubKey = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional agent = Optional.empty(); - - private Optional language = Optional.empty(); - - private Optional refreshing = Optional.empty(); - - private Optional scanner = Optional.empty(); - - private Optional uuid = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional subtype = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional scannedAt = Optional.empty(); - - private Optional> pivot = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder hubKey(String hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = Optional.ofNullable(hubKey); - return this; - } - - public Builder hubKey(Optional hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = hubKey; - 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 agent(String agent) { - Utils.checkNotNull(agent, "agent"); - this.agent = Optional.ofNullable(agent); - return this; - } - - public Builder agent(Optional agent) { - Utils.checkNotNull(agent, "agent"); - this.agent = agent; - 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 refreshing(boolean refreshing) { - Utils.checkNotNull(refreshing, "refreshing"); - this.refreshing = Optional.ofNullable(refreshing); - return this; - } - - public Builder refreshing(Optional refreshing) { - Utils.checkNotNull(refreshing, "refreshing"); - this.refreshing = refreshing; - return this; - } - - - public Builder scanner(String scanner) { - Utils.checkNotNull(scanner, "scanner"); - this.scanner = Optional.ofNullable(scanner); - return this; - } - - public Builder scanner(Optional scanner) { - Utils.checkNotNull(scanner, "scanner"); - this.scanner = scanner; - return this; - } - - - public Builder uuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = Optional.ofNullable(uuid); - return this; - } - - public Builder uuid(Optional uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - - public Builder id(String 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 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 Builder updatedAt(long 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 scannedAt(long scannedAt) { - Utils.checkNotNull(scannedAt, "scannedAt"); - this.scannedAt = Optional.ofNullable(scannedAt); - return this; - } - - public Builder scannedAt(Optional scannedAt) { - Utils.checkNotNull(scannedAt, "scannedAt"); - this.scannedAt = scannedAt; - return this; - } - - - public Builder pivot(List pivot) { - Utils.checkNotNull(pivot, "pivot"); - this.pivot = Optional.ofNullable(pivot); - return this; - } - - public Builder pivot(Optional> pivot) { - Utils.checkNotNull(pivot, "pivot"); - this.pivot = pivot; - return this; - } - - public GetMediaProvidersDirectory build() { - - return new GetMediaProvidersDirectory( - hubKey, title, agent, - language, refreshing, scanner, - uuid, id, key, - type, subtype, updatedAt, - scannedAt, pivot); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersMediaContainer.java deleted file mode 100644 index 97542cdb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersMediaContainer.java +++ /dev/null @@ -1,2007 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetMediaProvidersMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("allowCameraUpload") - private Optional allowCameraUpload; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("allowChannelAccess") - private Optional allowChannelAccess; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("allowSharing") - private Optional allowSharing; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("allowSync") - private Optional allowSync; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("allowTuners") - private Optional allowTuners; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("backgroundProcessing") - private Optional backgroundProcessing; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("certificate") - private Optional certificate; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("companionProxy") - private Optional companionProxy; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("countryCode") - private Optional countryCode; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("diagnostics") - private Optional diagnostics; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("eventStream") - private Optional eventStream; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("friendlyName") - private Optional friendlyName; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("livetv") - private Optional livetv; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("machineIdentifier") - private Optional machineIdentifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("musicAnalysis") - private Optional musicAnalysis; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("myPlex") - private Optional myPlex; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("myPlexMappingState") - private Optional myPlexMappingState; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("myPlexSigninState") - private Optional myPlexSigninState; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("myPlexSubscription") - private Optional myPlexSubscription; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("myPlexUsername") - private Optional myPlexUsername; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("offlineTranscode") - private Optional offlineTranscode; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ownerFeatures") - private Optional ownerFeatures; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("platform") - private Optional platform; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("platformVersion") - private Optional platformVersion; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("pluginHost") - private Optional pluginHost; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("pushNotifications") - private Optional pushNotifications; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("readOnlyLibraries") - private Optional readOnlyLibraries; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("streamingBrainABRVersion") - private Optional streamingBrainABRVersion; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("streamingBrainVersion") - private Optional streamingBrainVersion; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("sync") - private Optional sync; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("transcoderActiveVideoSessions") - private Optional transcoderActiveVideoSessions; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("transcoderAudio") - private Optional transcoderAudio; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("transcoderLyrics") - private Optional transcoderLyrics; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("transcoderSubtitles") - private Optional transcoderSubtitles; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("transcoderVideo") - private Optional transcoderVideo; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("transcoderVideoBitrates") - private Optional transcoderVideoBitrates; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("transcoderVideoQualities") - private Optional transcoderVideoQualities; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("transcoderVideoResolutions") - private Optional transcoderVideoResolutions; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updater") - private Optional updater; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("version") - private Optional version; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("voiceSearch") - private Optional voiceSearch; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaProvider") - private Optional> mediaProvider; - - @JsonCreator - public GetMediaProvidersMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("allowCameraUpload") Optional allowCameraUpload, - @JsonProperty("allowChannelAccess") Optional allowChannelAccess, - @JsonProperty("allowSharing") Optional allowSharing, - @JsonProperty("allowSync") Optional allowSync, - @JsonProperty("allowTuners") Optional allowTuners, - @JsonProperty("backgroundProcessing") Optional backgroundProcessing, - @JsonProperty("certificate") Optional certificate, - @JsonProperty("companionProxy") Optional companionProxy, - @JsonProperty("countryCode") Optional countryCode, - @JsonProperty("diagnostics") Optional diagnostics, - @JsonProperty("eventStream") Optional eventStream, - @JsonProperty("friendlyName") Optional friendlyName, - @JsonProperty("livetv") Optional livetv, - @JsonProperty("machineIdentifier") Optional machineIdentifier, - @JsonProperty("musicAnalysis") Optional musicAnalysis, - @JsonProperty("myPlex") Optional myPlex, - @JsonProperty("myPlexMappingState") Optional myPlexMappingState, - @JsonProperty("myPlexSigninState") Optional myPlexSigninState, - @JsonProperty("myPlexSubscription") Optional myPlexSubscription, - @JsonProperty("myPlexUsername") Optional myPlexUsername, - @JsonProperty("offlineTranscode") Optional offlineTranscode, - @JsonProperty("ownerFeatures") Optional ownerFeatures, - @JsonProperty("platform") Optional platform, - @JsonProperty("platformVersion") Optional platformVersion, - @JsonProperty("pluginHost") Optional pluginHost, - @JsonProperty("pushNotifications") Optional pushNotifications, - @JsonProperty("readOnlyLibraries") Optional readOnlyLibraries, - @JsonProperty("streamingBrainABRVersion") Optional streamingBrainABRVersion, - @JsonProperty("streamingBrainVersion") Optional streamingBrainVersion, - @JsonProperty("sync") Optional sync, - @JsonProperty("transcoderActiveVideoSessions") Optional transcoderActiveVideoSessions, - @JsonProperty("transcoderAudio") Optional transcoderAudio, - @JsonProperty("transcoderLyrics") Optional transcoderLyrics, - @JsonProperty("transcoderSubtitles") Optional transcoderSubtitles, - @JsonProperty("transcoderVideo") Optional transcoderVideo, - @JsonProperty("transcoderVideoBitrates") Optional transcoderVideoBitrates, - @JsonProperty("transcoderVideoQualities") Optional transcoderVideoQualities, - @JsonProperty("transcoderVideoResolutions") Optional transcoderVideoResolutions, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("updater") Optional updater, - @JsonProperty("version") Optional version, - @JsonProperty("voiceSearch") Optional voiceSearch, - @JsonProperty("MediaProvider") Optional> mediaProvider) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); - Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); - Utils.checkNotNull(allowSharing, "allowSharing"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(allowTuners, "allowTuners"); - Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); - Utils.checkNotNull(certificate, "certificate"); - Utils.checkNotNull(companionProxy, "companionProxy"); - Utils.checkNotNull(countryCode, "countryCode"); - Utils.checkNotNull(diagnostics, "diagnostics"); - Utils.checkNotNull(eventStream, "eventStream"); - Utils.checkNotNull(friendlyName, "friendlyName"); - Utils.checkNotNull(livetv, "livetv"); - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - Utils.checkNotNull(musicAnalysis, "musicAnalysis"); - Utils.checkNotNull(myPlex, "myPlex"); - Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); - Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); - Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); - Utils.checkNotNull(myPlexUsername, "myPlexUsername"); - Utils.checkNotNull(offlineTranscode, "offlineTranscode"); - Utils.checkNotNull(ownerFeatures, "ownerFeatures"); - Utils.checkNotNull(platform, "platform"); - Utils.checkNotNull(platformVersion, "platformVersion"); - Utils.checkNotNull(pluginHost, "pluginHost"); - Utils.checkNotNull(pushNotifications, "pushNotifications"); - Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); - Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); - Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); - Utils.checkNotNull(sync, "sync"); - Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); - Utils.checkNotNull(transcoderAudio, "transcoderAudio"); - Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); - Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); - Utils.checkNotNull(transcoderVideo, "transcoderVideo"); - Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); - Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); - Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(updater, "updater"); - Utils.checkNotNull(version, "version"); - Utils.checkNotNull(voiceSearch, "voiceSearch"); - Utils.checkNotNull(mediaProvider, "mediaProvider"); - this.size = size; - this.allowCameraUpload = allowCameraUpload; - this.allowChannelAccess = allowChannelAccess; - this.allowSharing = allowSharing; - this.allowSync = allowSync; - this.allowTuners = allowTuners; - this.backgroundProcessing = backgroundProcessing; - this.certificate = certificate; - this.companionProxy = companionProxy; - this.countryCode = countryCode; - this.diagnostics = diagnostics; - this.eventStream = eventStream; - this.friendlyName = friendlyName; - this.livetv = livetv; - this.machineIdentifier = machineIdentifier; - this.musicAnalysis = musicAnalysis; - this.myPlex = myPlex; - this.myPlexMappingState = myPlexMappingState; - this.myPlexSigninState = myPlexSigninState; - this.myPlexSubscription = myPlexSubscription; - this.myPlexUsername = myPlexUsername; - this.offlineTranscode = offlineTranscode; - this.ownerFeatures = ownerFeatures; - this.platform = platform; - this.platformVersion = platformVersion; - this.pluginHost = pluginHost; - this.pushNotifications = pushNotifications; - this.readOnlyLibraries = readOnlyLibraries; - this.streamingBrainABRVersion = streamingBrainABRVersion; - this.streamingBrainVersion = streamingBrainVersion; - this.sync = sync; - this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; - this.transcoderAudio = transcoderAudio; - this.transcoderLyrics = transcoderLyrics; - this.transcoderSubtitles = transcoderSubtitles; - this.transcoderVideo = transcoderVideo; - this.transcoderVideoBitrates = transcoderVideoBitrates; - this.transcoderVideoQualities = transcoderVideoQualities; - this.transcoderVideoResolutions = transcoderVideoResolutions; - this.updatedAt = updatedAt; - this.updater = updater; - this.version = version; - this.voiceSearch = voiceSearch; - this.mediaProvider = mediaProvider; - } - - public GetMediaProvidersMediaContainer() { - 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(), 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 size() { - return size; - } - - @JsonIgnore - public Optional allowCameraUpload() { - return allowCameraUpload; - } - - @JsonIgnore - public Optional allowChannelAccess() { - return allowChannelAccess; - } - - @JsonIgnore - public Optional allowSharing() { - return allowSharing; - } - - @JsonIgnore - public Optional allowSync() { - return allowSync; - } - - @JsonIgnore - public Optional allowTuners() { - return allowTuners; - } - - @JsonIgnore - public Optional backgroundProcessing() { - return backgroundProcessing; - } - - @JsonIgnore - public Optional certificate() { - return certificate; - } - - @JsonIgnore - public Optional companionProxy() { - return companionProxy; - } - - @JsonIgnore - public Optional countryCode() { - return countryCode; - } - - @JsonIgnore - public Optional diagnostics() { - return diagnostics; - } - - @JsonIgnore - public Optional eventStream() { - return eventStream; - } - - @JsonIgnore - public Optional friendlyName() { - return friendlyName; - } - - @JsonIgnore - public Optional livetv() { - return livetv; - } - - @JsonIgnore - public Optional machineIdentifier() { - return machineIdentifier; - } - - @JsonIgnore - public Optional musicAnalysis() { - return musicAnalysis; - } - - @JsonIgnore - public Optional myPlex() { - return myPlex; - } - - @JsonIgnore - public Optional myPlexMappingState() { - return myPlexMappingState; - } - - @JsonIgnore - public Optional myPlexSigninState() { - return myPlexSigninState; - } - - @JsonIgnore - public Optional myPlexSubscription() { - return myPlexSubscription; - } - - @JsonIgnore - public Optional myPlexUsername() { - return myPlexUsername; - } - - @JsonIgnore - public Optional offlineTranscode() { - return offlineTranscode; - } - - @JsonIgnore - public Optional ownerFeatures() { - return ownerFeatures; - } - - @JsonIgnore - public Optional platform() { - return platform; - } - - @JsonIgnore - public Optional platformVersion() { - return platformVersion; - } - - @JsonIgnore - public Optional pluginHost() { - return pluginHost; - } - - @JsonIgnore - public Optional pushNotifications() { - return pushNotifications; - } - - @JsonIgnore - public Optional readOnlyLibraries() { - return readOnlyLibraries; - } - - @JsonIgnore - public Optional streamingBrainABRVersion() { - return streamingBrainABRVersion; - } - - @JsonIgnore - public Optional streamingBrainVersion() { - return streamingBrainVersion; - } - - @JsonIgnore - public Optional sync() { - return sync; - } - - @JsonIgnore - public Optional transcoderActiveVideoSessions() { - return transcoderActiveVideoSessions; - } - - @JsonIgnore - public Optional transcoderAudio() { - return transcoderAudio; - } - - @JsonIgnore - public Optional transcoderLyrics() { - return transcoderLyrics; - } - - @JsonIgnore - public Optional transcoderSubtitles() { - return transcoderSubtitles; - } - - @JsonIgnore - public Optional transcoderVideo() { - return transcoderVideo; - } - - @JsonIgnore - public Optional transcoderVideoBitrates() { - return transcoderVideoBitrates; - } - - @JsonIgnore - public Optional transcoderVideoQualities() { - return transcoderVideoQualities; - } - - @JsonIgnore - public Optional transcoderVideoResolutions() { - return transcoderVideoResolutions; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - @JsonIgnore - public Optional updater() { - return updater; - } - - @JsonIgnore - public Optional version() { - return version; - } - - @JsonIgnore - public Optional voiceSearch() { - return voiceSearch; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> mediaProvider() { - return (Optional>) mediaProvider; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaProvidersMediaContainer withSize(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetMediaProvidersMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetMediaProvidersMediaContainer withAllowCameraUpload(boolean allowCameraUpload) { - Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); - this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); - return this; - } - - - public GetMediaProvidersMediaContainer withAllowCameraUpload(Optional allowCameraUpload) { - Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); - this.allowCameraUpload = allowCameraUpload; - return this; - } - - public GetMediaProvidersMediaContainer withAllowChannelAccess(boolean allowChannelAccess) { - Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); - this.allowChannelAccess = Optional.ofNullable(allowChannelAccess); - return this; - } - - - public GetMediaProvidersMediaContainer withAllowChannelAccess(Optional allowChannelAccess) { - Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); - this.allowChannelAccess = allowChannelAccess; - return this; - } - - public GetMediaProvidersMediaContainer withAllowSharing(boolean allowSharing) { - Utils.checkNotNull(allowSharing, "allowSharing"); - this.allowSharing = Optional.ofNullable(allowSharing); - return this; - } - - - public GetMediaProvidersMediaContainer withAllowSharing(Optional allowSharing) { - Utils.checkNotNull(allowSharing, "allowSharing"); - this.allowSharing = allowSharing; - return this; - } - - public GetMediaProvidersMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); - return this; - } - - - public GetMediaProvidersMediaContainer withAllowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - public GetMediaProvidersMediaContainer withAllowTuners(boolean allowTuners) { - Utils.checkNotNull(allowTuners, "allowTuners"); - this.allowTuners = Optional.ofNullable(allowTuners); - return this; - } - - - public GetMediaProvidersMediaContainer withAllowTuners(Optional allowTuners) { - Utils.checkNotNull(allowTuners, "allowTuners"); - this.allowTuners = allowTuners; - return this; - } - - public GetMediaProvidersMediaContainer withBackgroundProcessing(boolean backgroundProcessing) { - Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); - this.backgroundProcessing = Optional.ofNullable(backgroundProcessing); - return this; - } - - - public GetMediaProvidersMediaContainer withBackgroundProcessing(Optional backgroundProcessing) { - Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); - this.backgroundProcessing = backgroundProcessing; - return this; - } - - public GetMediaProvidersMediaContainer withCertificate(boolean certificate) { - Utils.checkNotNull(certificate, "certificate"); - this.certificate = Optional.ofNullable(certificate); - return this; - } - - - public GetMediaProvidersMediaContainer withCertificate(Optional certificate) { - Utils.checkNotNull(certificate, "certificate"); - this.certificate = certificate; - return this; - } - - public GetMediaProvidersMediaContainer withCompanionProxy(boolean companionProxy) { - Utils.checkNotNull(companionProxy, "companionProxy"); - this.companionProxy = Optional.ofNullable(companionProxy); - return this; - } - - - public GetMediaProvidersMediaContainer withCompanionProxy(Optional companionProxy) { - Utils.checkNotNull(companionProxy, "companionProxy"); - this.companionProxy = companionProxy; - return this; - } - - public GetMediaProvidersMediaContainer withCountryCode(String countryCode) { - Utils.checkNotNull(countryCode, "countryCode"); - this.countryCode = Optional.ofNullable(countryCode); - return this; - } - - - public GetMediaProvidersMediaContainer withCountryCode(Optional countryCode) { - Utils.checkNotNull(countryCode, "countryCode"); - this.countryCode = countryCode; - return this; - } - - public GetMediaProvidersMediaContainer withDiagnostics(String diagnostics) { - Utils.checkNotNull(diagnostics, "diagnostics"); - this.diagnostics = Optional.ofNullable(diagnostics); - return this; - } - - - public GetMediaProvidersMediaContainer withDiagnostics(Optional diagnostics) { - Utils.checkNotNull(diagnostics, "diagnostics"); - this.diagnostics = diagnostics; - return this; - } - - public GetMediaProvidersMediaContainer withEventStream(boolean eventStream) { - Utils.checkNotNull(eventStream, "eventStream"); - this.eventStream = Optional.ofNullable(eventStream); - return this; - } - - - public GetMediaProvidersMediaContainer withEventStream(Optional eventStream) { - Utils.checkNotNull(eventStream, "eventStream"); - this.eventStream = eventStream; - return this; - } - - public GetMediaProvidersMediaContainer withFriendlyName(String friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = Optional.ofNullable(friendlyName); - return this; - } - - - public GetMediaProvidersMediaContainer withFriendlyName(Optional friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = friendlyName; - return this; - } - - public GetMediaProvidersMediaContainer withLivetv(long livetv) { - Utils.checkNotNull(livetv, "livetv"); - this.livetv = Optional.ofNullable(livetv); - return this; - } - - - public GetMediaProvidersMediaContainer withLivetv(Optional livetv) { - Utils.checkNotNull(livetv, "livetv"); - this.livetv = livetv; - return this; - } - - public GetMediaProvidersMediaContainer withMachineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = Optional.ofNullable(machineIdentifier); - return this; - } - - - public GetMediaProvidersMediaContainer withMachineIdentifier(Optional machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - public GetMediaProvidersMediaContainer withMusicAnalysis(long musicAnalysis) { - Utils.checkNotNull(musicAnalysis, "musicAnalysis"); - this.musicAnalysis = Optional.ofNullable(musicAnalysis); - return this; - } - - - public GetMediaProvidersMediaContainer withMusicAnalysis(Optional musicAnalysis) { - Utils.checkNotNull(musicAnalysis, "musicAnalysis"); - this.musicAnalysis = musicAnalysis; - return this; - } - - public GetMediaProvidersMediaContainer withMyPlex(boolean myPlex) { - Utils.checkNotNull(myPlex, "myPlex"); - this.myPlex = Optional.ofNullable(myPlex); - return this; - } - - - public GetMediaProvidersMediaContainer withMyPlex(Optional myPlex) { - Utils.checkNotNull(myPlex, "myPlex"); - this.myPlex = myPlex; - return this; - } - - public GetMediaProvidersMediaContainer withMyPlexMappingState(String myPlexMappingState) { - Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); - this.myPlexMappingState = Optional.ofNullable(myPlexMappingState); - return this; - } - - - public GetMediaProvidersMediaContainer withMyPlexMappingState(Optional myPlexMappingState) { - Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); - this.myPlexMappingState = myPlexMappingState; - return this; - } - - public GetMediaProvidersMediaContainer withMyPlexSigninState(String myPlexSigninState) { - Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); - this.myPlexSigninState = Optional.ofNullable(myPlexSigninState); - return this; - } - - - public GetMediaProvidersMediaContainer withMyPlexSigninState(Optional myPlexSigninState) { - Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); - this.myPlexSigninState = myPlexSigninState; - return this; - } - - public GetMediaProvidersMediaContainer withMyPlexSubscription(boolean myPlexSubscription) { - Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); - this.myPlexSubscription = Optional.ofNullable(myPlexSubscription); - return this; - } - - - public GetMediaProvidersMediaContainer withMyPlexSubscription(Optional myPlexSubscription) { - Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); - this.myPlexSubscription = myPlexSubscription; - return this; - } - - public GetMediaProvidersMediaContainer withMyPlexUsername(String myPlexUsername) { - Utils.checkNotNull(myPlexUsername, "myPlexUsername"); - this.myPlexUsername = Optional.ofNullable(myPlexUsername); - return this; - } - - - public GetMediaProvidersMediaContainer withMyPlexUsername(Optional myPlexUsername) { - Utils.checkNotNull(myPlexUsername, "myPlexUsername"); - this.myPlexUsername = myPlexUsername; - return this; - } - - public GetMediaProvidersMediaContainer withOfflineTranscode(long offlineTranscode) { - Utils.checkNotNull(offlineTranscode, "offlineTranscode"); - this.offlineTranscode = Optional.ofNullable(offlineTranscode); - return this; - } - - - public GetMediaProvidersMediaContainer withOfflineTranscode(Optional offlineTranscode) { - Utils.checkNotNull(offlineTranscode, "offlineTranscode"); - this.offlineTranscode = offlineTranscode; - return this; - } - - public GetMediaProvidersMediaContainer withOwnerFeatures(String ownerFeatures) { - Utils.checkNotNull(ownerFeatures, "ownerFeatures"); - this.ownerFeatures = Optional.ofNullable(ownerFeatures); - return this; - } - - - public GetMediaProvidersMediaContainer withOwnerFeatures(Optional ownerFeatures) { - Utils.checkNotNull(ownerFeatures, "ownerFeatures"); - this.ownerFeatures = ownerFeatures; - return this; - } - - public GetMediaProvidersMediaContainer withPlatform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - - public GetMediaProvidersMediaContainer withPlatform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - public GetMediaProvidersMediaContainer withPlatformVersion(String platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = Optional.ofNullable(platformVersion); - return this; - } - - - public GetMediaProvidersMediaContainer withPlatformVersion(Optional platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = platformVersion; - return this; - } - - public GetMediaProvidersMediaContainer withPluginHost(boolean pluginHost) { - Utils.checkNotNull(pluginHost, "pluginHost"); - this.pluginHost = Optional.ofNullable(pluginHost); - return this; - } - - - public GetMediaProvidersMediaContainer withPluginHost(Optional pluginHost) { - Utils.checkNotNull(pluginHost, "pluginHost"); - this.pluginHost = pluginHost; - return this; - } - - public GetMediaProvidersMediaContainer withPushNotifications(boolean pushNotifications) { - Utils.checkNotNull(pushNotifications, "pushNotifications"); - this.pushNotifications = Optional.ofNullable(pushNotifications); - return this; - } - - - public GetMediaProvidersMediaContainer withPushNotifications(Optional pushNotifications) { - Utils.checkNotNull(pushNotifications, "pushNotifications"); - this.pushNotifications = pushNotifications; - return this; - } - - public GetMediaProvidersMediaContainer withReadOnlyLibraries(boolean readOnlyLibraries) { - Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); - this.readOnlyLibraries = Optional.ofNullable(readOnlyLibraries); - return this; - } - - - public GetMediaProvidersMediaContainer withReadOnlyLibraries(Optional readOnlyLibraries) { - Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); - this.readOnlyLibraries = readOnlyLibraries; - return this; - } - - public GetMediaProvidersMediaContainer withStreamingBrainABRVersion(long streamingBrainABRVersion) { - Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); - this.streamingBrainABRVersion = Optional.ofNullable(streamingBrainABRVersion); - return this; - } - - - public GetMediaProvidersMediaContainer withStreamingBrainABRVersion(Optional streamingBrainABRVersion) { - Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); - this.streamingBrainABRVersion = streamingBrainABRVersion; - return this; - } - - public GetMediaProvidersMediaContainer withStreamingBrainVersion(long streamingBrainVersion) { - Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); - this.streamingBrainVersion = Optional.ofNullable(streamingBrainVersion); - return this; - } - - - public GetMediaProvidersMediaContainer withStreamingBrainVersion(Optional streamingBrainVersion) { - Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); - this.streamingBrainVersion = streamingBrainVersion; - return this; - } - - public GetMediaProvidersMediaContainer withSync(boolean sync) { - Utils.checkNotNull(sync, "sync"); - this.sync = Optional.ofNullable(sync); - return this; - } - - - public GetMediaProvidersMediaContainer withSync(Optional sync) { - Utils.checkNotNull(sync, "sync"); - this.sync = sync; - return this; - } - - public GetMediaProvidersMediaContainer withTranscoderActiveVideoSessions(long transcoderActiveVideoSessions) { - Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); - this.transcoderActiveVideoSessions = Optional.ofNullable(transcoderActiveVideoSessions); - return this; - } - - - public GetMediaProvidersMediaContainer withTranscoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { - Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); - this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; - return this; - } - - public GetMediaProvidersMediaContainer withTranscoderAudio(boolean transcoderAudio) { - Utils.checkNotNull(transcoderAudio, "transcoderAudio"); - this.transcoderAudio = Optional.ofNullable(transcoderAudio); - return this; - } - - - public GetMediaProvidersMediaContainer withTranscoderAudio(Optional transcoderAudio) { - Utils.checkNotNull(transcoderAudio, "transcoderAudio"); - this.transcoderAudio = transcoderAudio; - return this; - } - - public GetMediaProvidersMediaContainer withTranscoderLyrics(boolean transcoderLyrics) { - Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); - this.transcoderLyrics = Optional.ofNullable(transcoderLyrics); - return this; - } - - - public GetMediaProvidersMediaContainer withTranscoderLyrics(Optional transcoderLyrics) { - Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); - this.transcoderLyrics = transcoderLyrics; - return this; - } - - public GetMediaProvidersMediaContainer withTranscoderSubtitles(boolean transcoderSubtitles) { - Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); - this.transcoderSubtitles = Optional.ofNullable(transcoderSubtitles); - return this; - } - - - public GetMediaProvidersMediaContainer withTranscoderSubtitles(Optional transcoderSubtitles) { - Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); - this.transcoderSubtitles = transcoderSubtitles; - return this; - } - - public GetMediaProvidersMediaContainer withTranscoderVideo(boolean transcoderVideo) { - Utils.checkNotNull(transcoderVideo, "transcoderVideo"); - this.transcoderVideo = Optional.ofNullable(transcoderVideo); - return this; - } - - - public GetMediaProvidersMediaContainer withTranscoderVideo(Optional transcoderVideo) { - Utils.checkNotNull(transcoderVideo, "transcoderVideo"); - this.transcoderVideo = transcoderVideo; - return this; - } - - public GetMediaProvidersMediaContainer withTranscoderVideoBitrates(String transcoderVideoBitrates) { - Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); - this.transcoderVideoBitrates = Optional.ofNullable(transcoderVideoBitrates); - return this; - } - - - public GetMediaProvidersMediaContainer withTranscoderVideoBitrates(Optional transcoderVideoBitrates) { - Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); - this.transcoderVideoBitrates = transcoderVideoBitrates; - return this; - } - - public GetMediaProvidersMediaContainer withTranscoderVideoQualities(String transcoderVideoQualities) { - Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); - this.transcoderVideoQualities = Optional.ofNullable(transcoderVideoQualities); - return this; - } - - - public GetMediaProvidersMediaContainer withTranscoderVideoQualities(Optional transcoderVideoQualities) { - Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); - this.transcoderVideoQualities = transcoderVideoQualities; - return this; - } - - public GetMediaProvidersMediaContainer withTranscoderVideoResolutions(String transcoderVideoResolutions) { - Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); - this.transcoderVideoResolutions = Optional.ofNullable(transcoderVideoResolutions); - return this; - } - - - public GetMediaProvidersMediaContainer withTranscoderVideoResolutions(Optional transcoderVideoResolutions) { - Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); - this.transcoderVideoResolutions = transcoderVideoResolutions; - return this; - } - - public GetMediaProvidersMediaContainer withUpdatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetMediaProvidersMediaContainer withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - public GetMediaProvidersMediaContainer withUpdater(boolean updater) { - Utils.checkNotNull(updater, "updater"); - this.updater = Optional.ofNullable(updater); - return this; - } - - - public GetMediaProvidersMediaContainer withUpdater(Optional updater) { - Utils.checkNotNull(updater, "updater"); - this.updater = updater; - return this; - } - - public GetMediaProvidersMediaContainer withVersion(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - - public GetMediaProvidersMediaContainer withVersion(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - public GetMediaProvidersMediaContainer withVoiceSearch(boolean voiceSearch) { - Utils.checkNotNull(voiceSearch, "voiceSearch"); - this.voiceSearch = Optional.ofNullable(voiceSearch); - return this; - } - - - public GetMediaProvidersMediaContainer withVoiceSearch(Optional voiceSearch) { - Utils.checkNotNull(voiceSearch, "voiceSearch"); - this.voiceSearch = voiceSearch; - return this; - } - - public GetMediaProvidersMediaContainer withMediaProvider(List mediaProvider) { - Utils.checkNotNull(mediaProvider, "mediaProvider"); - this.mediaProvider = Optional.ofNullable(mediaProvider); - return this; - } - - - public GetMediaProvidersMediaContainer withMediaProvider(Optional> mediaProvider) { - Utils.checkNotNull(mediaProvider, "mediaProvider"); - this.mediaProvider = mediaProvider; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaProvidersMediaContainer other = (GetMediaProvidersMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowCameraUpload, other.allowCameraUpload) && - Utils.enhancedDeepEquals(this.allowChannelAccess, other.allowChannelAccess) && - Utils.enhancedDeepEquals(this.allowSharing, other.allowSharing) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.allowTuners, other.allowTuners) && - Utils.enhancedDeepEquals(this.backgroundProcessing, other.backgroundProcessing) && - Utils.enhancedDeepEquals(this.certificate, other.certificate) && - Utils.enhancedDeepEquals(this.companionProxy, other.companionProxy) && - Utils.enhancedDeepEquals(this.countryCode, other.countryCode) && - Utils.enhancedDeepEquals(this.diagnostics, other.diagnostics) && - Utils.enhancedDeepEquals(this.eventStream, other.eventStream) && - Utils.enhancedDeepEquals(this.friendlyName, other.friendlyName) && - Utils.enhancedDeepEquals(this.livetv, other.livetv) && - Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && - Utils.enhancedDeepEquals(this.musicAnalysis, other.musicAnalysis) && - Utils.enhancedDeepEquals(this.myPlex, other.myPlex) && - Utils.enhancedDeepEquals(this.myPlexMappingState, other.myPlexMappingState) && - Utils.enhancedDeepEquals(this.myPlexSigninState, other.myPlexSigninState) && - Utils.enhancedDeepEquals(this.myPlexSubscription, other.myPlexSubscription) && - Utils.enhancedDeepEquals(this.myPlexUsername, other.myPlexUsername) && - Utils.enhancedDeepEquals(this.offlineTranscode, other.offlineTranscode) && - Utils.enhancedDeepEquals(this.ownerFeatures, other.ownerFeatures) && - Utils.enhancedDeepEquals(this.platform, other.platform) && - Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && - Utils.enhancedDeepEquals(this.pluginHost, other.pluginHost) && - Utils.enhancedDeepEquals(this.pushNotifications, other.pushNotifications) && - Utils.enhancedDeepEquals(this.readOnlyLibraries, other.readOnlyLibraries) && - Utils.enhancedDeepEquals(this.streamingBrainABRVersion, other.streamingBrainABRVersion) && - Utils.enhancedDeepEquals(this.streamingBrainVersion, other.streamingBrainVersion) && - Utils.enhancedDeepEquals(this.sync, other.sync) && - Utils.enhancedDeepEquals(this.transcoderActiveVideoSessions, other.transcoderActiveVideoSessions) && - Utils.enhancedDeepEquals(this.transcoderAudio, other.transcoderAudio) && - Utils.enhancedDeepEquals(this.transcoderLyrics, other.transcoderLyrics) && - Utils.enhancedDeepEquals(this.transcoderSubtitles, other.transcoderSubtitles) && - Utils.enhancedDeepEquals(this.transcoderVideo, other.transcoderVideo) && - Utils.enhancedDeepEquals(this.transcoderVideoBitrates, other.transcoderVideoBitrates) && - Utils.enhancedDeepEquals(this.transcoderVideoQualities, other.transcoderVideoQualities) && - Utils.enhancedDeepEquals(this.transcoderVideoResolutions, other.transcoderVideoResolutions) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.updater, other.updater) && - Utils.enhancedDeepEquals(this.version, other.version) && - Utils.enhancedDeepEquals(this.voiceSearch, other.voiceSearch) && - Utils.enhancedDeepEquals(this.mediaProvider, other.mediaProvider); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowCameraUpload, allowChannelAccess, - allowSharing, allowSync, allowTuners, - backgroundProcessing, certificate, companionProxy, - countryCode, diagnostics, eventStream, - friendlyName, livetv, machineIdentifier, - musicAnalysis, myPlex, myPlexMappingState, - myPlexSigninState, myPlexSubscription, myPlexUsername, - offlineTranscode, ownerFeatures, platform, - platformVersion, pluginHost, pushNotifications, - readOnlyLibraries, streamingBrainABRVersion, streamingBrainVersion, - sync, transcoderActiveVideoSessions, transcoderAudio, - transcoderLyrics, transcoderSubtitles, transcoderVideo, - transcoderVideoBitrates, transcoderVideoQualities, transcoderVideoResolutions, - updatedAt, updater, version, - voiceSearch, mediaProvider); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersMediaContainer.class, - "size", size, - "allowCameraUpload", allowCameraUpload, - "allowChannelAccess", allowChannelAccess, - "allowSharing", allowSharing, - "allowSync", allowSync, - "allowTuners", allowTuners, - "backgroundProcessing", backgroundProcessing, - "certificate", certificate, - "companionProxy", companionProxy, - "countryCode", countryCode, - "diagnostics", diagnostics, - "eventStream", eventStream, - "friendlyName", friendlyName, - "livetv", livetv, - "machineIdentifier", machineIdentifier, - "musicAnalysis", musicAnalysis, - "myPlex", myPlex, - "myPlexMappingState", myPlexMappingState, - "myPlexSigninState", myPlexSigninState, - "myPlexSubscription", myPlexSubscription, - "myPlexUsername", myPlexUsername, - "offlineTranscode", offlineTranscode, - "ownerFeatures", ownerFeatures, - "platform", platform, - "platformVersion", platformVersion, - "pluginHost", pluginHost, - "pushNotifications", pushNotifications, - "readOnlyLibraries", readOnlyLibraries, - "streamingBrainABRVersion", streamingBrainABRVersion, - "streamingBrainVersion", streamingBrainVersion, - "sync", sync, - "transcoderActiveVideoSessions", transcoderActiveVideoSessions, - "transcoderAudio", transcoderAudio, - "transcoderLyrics", transcoderLyrics, - "transcoderSubtitles", transcoderSubtitles, - "transcoderVideo", transcoderVideo, - "transcoderVideoBitrates", transcoderVideoBitrates, - "transcoderVideoQualities", transcoderVideoQualities, - "transcoderVideoResolutions", transcoderVideoResolutions, - "updatedAt", updatedAt, - "updater", updater, - "version", version, - "voiceSearch", voiceSearch, - "mediaProvider", mediaProvider); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional allowCameraUpload = Optional.empty(); - - private Optional allowChannelAccess = Optional.empty(); - - private Optional allowSharing = Optional.empty(); - - private Optional allowSync = Optional.empty(); - - private Optional allowTuners = Optional.empty(); - - private Optional backgroundProcessing = Optional.empty(); - - private Optional certificate = Optional.empty(); - - private Optional companionProxy = Optional.empty(); - - private Optional countryCode = Optional.empty(); - - private Optional diagnostics = Optional.empty(); - - private Optional eventStream = Optional.empty(); - - private Optional friendlyName = Optional.empty(); - - private Optional livetv = Optional.empty(); - - private Optional machineIdentifier = Optional.empty(); - - private Optional musicAnalysis = Optional.empty(); - - private Optional myPlex = Optional.empty(); - - private Optional myPlexMappingState = Optional.empty(); - - private Optional myPlexSigninState = Optional.empty(); - - private Optional myPlexSubscription = Optional.empty(); - - private Optional myPlexUsername = Optional.empty(); - - private Optional offlineTranscode = Optional.empty(); - - private Optional ownerFeatures = Optional.empty(); - - private Optional platform = Optional.empty(); - - private Optional platformVersion = Optional.empty(); - - private Optional pluginHost = Optional.empty(); - - private Optional pushNotifications = Optional.empty(); - - private Optional readOnlyLibraries = Optional.empty(); - - private Optional streamingBrainABRVersion = Optional.empty(); - - private Optional streamingBrainVersion = Optional.empty(); - - private Optional sync = Optional.empty(); - - private Optional transcoderActiveVideoSessions = Optional.empty(); - - private Optional transcoderAudio = Optional.empty(); - - private Optional transcoderLyrics = Optional.empty(); - - private Optional transcoderSubtitles = Optional.empty(); - - private Optional transcoderVideo = Optional.empty(); - - private Optional transcoderVideoBitrates = Optional.empty(); - - private Optional transcoderVideoQualities = Optional.empty(); - - private Optional transcoderVideoResolutions = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional updater = Optional.empty(); - - private Optional version = Optional.empty(); - - private Optional voiceSearch = Optional.empty(); - - private Optional> mediaProvider = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(long 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 allowCameraUpload(boolean allowCameraUpload) { - Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); - this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); - return this; - } - - public Builder allowCameraUpload(Optional allowCameraUpload) { - Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); - this.allowCameraUpload = allowCameraUpload; - return this; - } - - - public Builder allowChannelAccess(boolean allowChannelAccess) { - Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); - this.allowChannelAccess = Optional.ofNullable(allowChannelAccess); - return this; - } - - public Builder allowChannelAccess(Optional allowChannelAccess) { - Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); - this.allowChannelAccess = allowChannelAccess; - return this; - } - - - public Builder allowSharing(boolean allowSharing) { - Utils.checkNotNull(allowSharing, "allowSharing"); - this.allowSharing = Optional.ofNullable(allowSharing); - return this; - } - - public Builder allowSharing(Optional allowSharing) { - Utils.checkNotNull(allowSharing, "allowSharing"); - this.allowSharing = allowSharing; - 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 allowTuners(boolean allowTuners) { - Utils.checkNotNull(allowTuners, "allowTuners"); - this.allowTuners = Optional.ofNullable(allowTuners); - return this; - } - - public Builder allowTuners(Optional allowTuners) { - Utils.checkNotNull(allowTuners, "allowTuners"); - this.allowTuners = allowTuners; - return this; - } - - - public Builder backgroundProcessing(boolean backgroundProcessing) { - Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); - this.backgroundProcessing = Optional.ofNullable(backgroundProcessing); - return this; - } - - public Builder backgroundProcessing(Optional backgroundProcessing) { - Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); - this.backgroundProcessing = backgroundProcessing; - return this; - } - - - public Builder certificate(boolean certificate) { - Utils.checkNotNull(certificate, "certificate"); - this.certificate = Optional.ofNullable(certificate); - return this; - } - - public Builder certificate(Optional certificate) { - Utils.checkNotNull(certificate, "certificate"); - this.certificate = certificate; - return this; - } - - - public Builder companionProxy(boolean companionProxy) { - Utils.checkNotNull(companionProxy, "companionProxy"); - this.companionProxy = Optional.ofNullable(companionProxy); - return this; - } - - public Builder companionProxy(Optional companionProxy) { - Utils.checkNotNull(companionProxy, "companionProxy"); - this.companionProxy = companionProxy; - return this; - } - - - public Builder countryCode(String countryCode) { - Utils.checkNotNull(countryCode, "countryCode"); - this.countryCode = Optional.ofNullable(countryCode); - return this; - } - - public Builder countryCode(Optional countryCode) { - Utils.checkNotNull(countryCode, "countryCode"); - this.countryCode = countryCode; - return this; - } - - - public Builder diagnostics(String diagnostics) { - Utils.checkNotNull(diagnostics, "diagnostics"); - this.diagnostics = Optional.ofNullable(diagnostics); - return this; - } - - public Builder diagnostics(Optional diagnostics) { - Utils.checkNotNull(diagnostics, "diagnostics"); - this.diagnostics = diagnostics; - return this; - } - - - public Builder eventStream(boolean eventStream) { - Utils.checkNotNull(eventStream, "eventStream"); - this.eventStream = Optional.ofNullable(eventStream); - return this; - } - - public Builder eventStream(Optional eventStream) { - Utils.checkNotNull(eventStream, "eventStream"); - this.eventStream = eventStream; - return this; - } - - - public Builder friendlyName(String friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = Optional.ofNullable(friendlyName); - return this; - } - - public Builder friendlyName(Optional friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = friendlyName; - return this; - } - - - public Builder livetv(long livetv) { - Utils.checkNotNull(livetv, "livetv"); - this.livetv = Optional.ofNullable(livetv); - return this; - } - - public Builder livetv(Optional livetv) { - Utils.checkNotNull(livetv, "livetv"); - this.livetv = livetv; - return this; - } - - - public Builder machineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = Optional.ofNullable(machineIdentifier); - return this; - } - - public Builder machineIdentifier(Optional machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - - public Builder musicAnalysis(long musicAnalysis) { - Utils.checkNotNull(musicAnalysis, "musicAnalysis"); - this.musicAnalysis = Optional.ofNullable(musicAnalysis); - return this; - } - - public Builder musicAnalysis(Optional musicAnalysis) { - Utils.checkNotNull(musicAnalysis, "musicAnalysis"); - this.musicAnalysis = musicAnalysis; - return this; - } - - - public Builder myPlex(boolean myPlex) { - Utils.checkNotNull(myPlex, "myPlex"); - this.myPlex = Optional.ofNullable(myPlex); - return this; - } - - public Builder myPlex(Optional myPlex) { - Utils.checkNotNull(myPlex, "myPlex"); - this.myPlex = myPlex; - return this; - } - - - public Builder myPlexMappingState(String myPlexMappingState) { - Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); - this.myPlexMappingState = Optional.ofNullable(myPlexMappingState); - return this; - } - - public Builder myPlexMappingState(Optional myPlexMappingState) { - Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); - this.myPlexMappingState = myPlexMappingState; - return this; - } - - - public Builder myPlexSigninState(String myPlexSigninState) { - Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); - this.myPlexSigninState = Optional.ofNullable(myPlexSigninState); - return this; - } - - public Builder myPlexSigninState(Optional myPlexSigninState) { - Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); - this.myPlexSigninState = myPlexSigninState; - return this; - } - - - public Builder myPlexSubscription(boolean myPlexSubscription) { - Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); - this.myPlexSubscription = Optional.ofNullable(myPlexSubscription); - return this; - } - - public Builder myPlexSubscription(Optional myPlexSubscription) { - Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); - this.myPlexSubscription = myPlexSubscription; - return this; - } - - - public Builder myPlexUsername(String myPlexUsername) { - Utils.checkNotNull(myPlexUsername, "myPlexUsername"); - this.myPlexUsername = Optional.ofNullable(myPlexUsername); - return this; - } - - public Builder myPlexUsername(Optional myPlexUsername) { - Utils.checkNotNull(myPlexUsername, "myPlexUsername"); - this.myPlexUsername = myPlexUsername; - return this; - } - - - public Builder offlineTranscode(long offlineTranscode) { - Utils.checkNotNull(offlineTranscode, "offlineTranscode"); - this.offlineTranscode = Optional.ofNullable(offlineTranscode); - return this; - } - - public Builder offlineTranscode(Optional offlineTranscode) { - Utils.checkNotNull(offlineTranscode, "offlineTranscode"); - this.offlineTranscode = offlineTranscode; - return this; - } - - - public Builder ownerFeatures(String ownerFeatures) { - Utils.checkNotNull(ownerFeatures, "ownerFeatures"); - this.ownerFeatures = Optional.ofNullable(ownerFeatures); - return this; - } - - public Builder ownerFeatures(Optional ownerFeatures) { - Utils.checkNotNull(ownerFeatures, "ownerFeatures"); - this.ownerFeatures = ownerFeatures; - return this; - } - - - public Builder platform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - public Builder platform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - - public Builder platformVersion(String platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = Optional.ofNullable(platformVersion); - return this; - } - - public Builder platformVersion(Optional platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = platformVersion; - return this; - } - - - public Builder pluginHost(boolean pluginHost) { - Utils.checkNotNull(pluginHost, "pluginHost"); - this.pluginHost = Optional.ofNullable(pluginHost); - return this; - } - - public Builder pluginHost(Optional pluginHost) { - Utils.checkNotNull(pluginHost, "pluginHost"); - this.pluginHost = pluginHost; - return this; - } - - - public Builder pushNotifications(boolean pushNotifications) { - Utils.checkNotNull(pushNotifications, "pushNotifications"); - this.pushNotifications = Optional.ofNullable(pushNotifications); - return this; - } - - public Builder pushNotifications(Optional pushNotifications) { - Utils.checkNotNull(pushNotifications, "pushNotifications"); - this.pushNotifications = pushNotifications; - return this; - } - - - public Builder readOnlyLibraries(boolean readOnlyLibraries) { - Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); - this.readOnlyLibraries = Optional.ofNullable(readOnlyLibraries); - return this; - } - - public Builder readOnlyLibraries(Optional readOnlyLibraries) { - Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); - this.readOnlyLibraries = readOnlyLibraries; - return this; - } - - - public Builder streamingBrainABRVersion(long streamingBrainABRVersion) { - Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); - this.streamingBrainABRVersion = Optional.ofNullable(streamingBrainABRVersion); - return this; - } - - public Builder streamingBrainABRVersion(Optional streamingBrainABRVersion) { - Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); - this.streamingBrainABRVersion = streamingBrainABRVersion; - return this; - } - - - public Builder streamingBrainVersion(long streamingBrainVersion) { - Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); - this.streamingBrainVersion = Optional.ofNullable(streamingBrainVersion); - return this; - } - - public Builder streamingBrainVersion(Optional streamingBrainVersion) { - Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); - this.streamingBrainVersion = streamingBrainVersion; - return this; - } - - - public Builder sync(boolean sync) { - Utils.checkNotNull(sync, "sync"); - this.sync = Optional.ofNullable(sync); - return this; - } - - public Builder sync(Optional sync) { - Utils.checkNotNull(sync, "sync"); - this.sync = sync; - return this; - } - - - public Builder transcoderActiveVideoSessions(long transcoderActiveVideoSessions) { - Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); - this.transcoderActiveVideoSessions = Optional.ofNullable(transcoderActiveVideoSessions); - return this; - } - - public Builder transcoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { - Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); - this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; - return this; - } - - - public Builder transcoderAudio(boolean transcoderAudio) { - Utils.checkNotNull(transcoderAudio, "transcoderAudio"); - this.transcoderAudio = Optional.ofNullable(transcoderAudio); - return this; - } - - public Builder transcoderAudio(Optional transcoderAudio) { - Utils.checkNotNull(transcoderAudio, "transcoderAudio"); - this.transcoderAudio = transcoderAudio; - return this; - } - - - public Builder transcoderLyrics(boolean transcoderLyrics) { - Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); - this.transcoderLyrics = Optional.ofNullable(transcoderLyrics); - return this; - } - - public Builder transcoderLyrics(Optional transcoderLyrics) { - Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); - this.transcoderLyrics = transcoderLyrics; - return this; - } - - - public Builder transcoderSubtitles(boolean transcoderSubtitles) { - Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); - this.transcoderSubtitles = Optional.ofNullable(transcoderSubtitles); - return this; - } - - public Builder transcoderSubtitles(Optional transcoderSubtitles) { - Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); - this.transcoderSubtitles = transcoderSubtitles; - return this; - } - - - public Builder transcoderVideo(boolean transcoderVideo) { - Utils.checkNotNull(transcoderVideo, "transcoderVideo"); - this.transcoderVideo = Optional.ofNullable(transcoderVideo); - return this; - } - - public Builder transcoderVideo(Optional transcoderVideo) { - Utils.checkNotNull(transcoderVideo, "transcoderVideo"); - this.transcoderVideo = transcoderVideo; - return this; - } - - - public Builder transcoderVideoBitrates(String transcoderVideoBitrates) { - Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); - this.transcoderVideoBitrates = Optional.ofNullable(transcoderVideoBitrates); - return this; - } - - public Builder transcoderVideoBitrates(Optional transcoderVideoBitrates) { - Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); - this.transcoderVideoBitrates = transcoderVideoBitrates; - return this; - } - - - public Builder transcoderVideoQualities(String transcoderVideoQualities) { - Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); - this.transcoderVideoQualities = Optional.ofNullable(transcoderVideoQualities); - return this; - } - - public Builder transcoderVideoQualities(Optional transcoderVideoQualities) { - Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); - this.transcoderVideoQualities = transcoderVideoQualities; - return this; - } - - - public Builder transcoderVideoResolutions(String transcoderVideoResolutions) { - Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); - this.transcoderVideoResolutions = Optional.ofNullable(transcoderVideoResolutions); - return this; - } - - public Builder transcoderVideoResolutions(Optional transcoderVideoResolutions) { - Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); - this.transcoderVideoResolutions = transcoderVideoResolutions; - return this; - } - - - public Builder updatedAt(long 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 updater(boolean updater) { - Utils.checkNotNull(updater, "updater"); - this.updater = Optional.ofNullable(updater); - return this; - } - - public Builder updater(Optional updater) { - Utils.checkNotNull(updater, "updater"); - this.updater = updater; - return this; - } - - - public Builder version(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - public Builder version(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - - public Builder voiceSearch(boolean voiceSearch) { - Utils.checkNotNull(voiceSearch, "voiceSearch"); - this.voiceSearch = Optional.ofNullable(voiceSearch); - return this; - } - - public Builder voiceSearch(Optional voiceSearch) { - Utils.checkNotNull(voiceSearch, "voiceSearch"); - this.voiceSearch = voiceSearch; - return this; - } - - - public Builder mediaProvider(List mediaProvider) { - Utils.checkNotNull(mediaProvider, "mediaProvider"); - this.mediaProvider = Optional.ofNullable(mediaProvider); - return this; - } - - public Builder mediaProvider(Optional> mediaProvider) { - Utils.checkNotNull(mediaProvider, "mediaProvider"); - this.mediaProvider = mediaProvider; - return this; - } - - public GetMediaProvidersMediaContainer build() { - - return new GetMediaProvidersMediaContainer( - size, allowCameraUpload, allowChannelAccess, - allowSharing, allowSync, allowTuners, - backgroundProcessing, certificate, companionProxy, - countryCode, diagnostics, eventStream, - friendlyName, livetv, machineIdentifier, - musicAnalysis, myPlex, myPlexMappingState, - myPlexSigninState, myPlexSubscription, myPlexUsername, - offlineTranscode, ownerFeatures, platform, - platformVersion, pluginHost, pushNotifications, - readOnlyLibraries, streamingBrainABRVersion, streamingBrainVersion, - sync, transcoderActiveVideoSessions, transcoderAudio, - transcoderLyrics, transcoderSubtitles, transcoderVideo, - transcoderVideoBitrates, transcoderVideoQualities, transcoderVideoResolutions, - updatedAt, updater, version, - voiceSearch, mediaProvider); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersRequest.java deleted file mode 100644 index 8d522b78..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersRequest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetMediaProvidersRequest { - /** - * An authentication token, obtained from plex.tv - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Token") - private String xPlexToken; - - @JsonCreator - public GetMediaProvidersRequest( - String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - } - - /** - * An authentication token, obtained from plex.tv - */ - @JsonIgnore - public String xPlexToken() { - return xPlexToken; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * An authentication token, obtained from plex.tv - */ - public GetMediaProvidersRequest withXPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaProvidersRequest other = (GetMediaProvidersRequest) o; - return - Utils.enhancedDeepEquals(this.xPlexToken, other.xPlexToken); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - xPlexToken); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersRequest.class, - "xPlexToken", xPlexToken); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String xPlexToken; - - private Builder() { - // force use of static builder() method - } - - - /** - * An authentication token, obtained from plex.tv - */ - public Builder xPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - public GetMediaProvidersRequest build() { - - return new GetMediaProvidersRequest( - xPlexToken); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersRequestBuilder.java deleted file mode 100644 index 8a67c19c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetMediaProviders; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; - -public class GetMediaProvidersRequestBuilder { - - private String xPlexToken; - private final SDKConfiguration sdkConfiguration; - - public GetMediaProvidersRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMediaProvidersRequestBuilder xPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - - private GetMediaProvidersRequest buildRequest() { - - GetMediaProvidersRequest request = new GetMediaProvidersRequest(xPlexToken); - - return request; - } - - public GetMediaProvidersResponse call() throws Exception { - - RequestOperation operation - = new GetMediaProviders.Sync(sdkConfiguration); - GetMediaProvidersRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersResponse.java deleted file mode 100644 index 8c63c210..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetMediaProvidersResponse 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; - - /** - * Media providers and their features - */ - private Optional object; - - @JsonCreator - public GetMediaProvidersResponse( - 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 GetMediaProvidersResponse( - 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; - } - - /** - * Media providers and their features - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMediaProvidersResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMediaProvidersResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaProvidersResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Media providers and their features - */ - public GetMediaProvidersResponse withObject(GetMediaProvidersResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Media providers and their features - */ - public GetMediaProvidersResponse 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; - } - GetMediaProvidersResponse other = (GetMediaProvidersResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Media providers and their features - */ - public Builder object(GetMediaProvidersResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Media providers and their features - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMediaProvidersResponse build() { - - return new GetMediaProvidersResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersResponseBody.java deleted file mode 100644 index 75c0a4d4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetMediaProvidersResponseBody - * - *

Media providers and their features - */ -public class GetMediaProvidersResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetMediaProvidersResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetMediaProvidersResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMediaProvidersResponseBody withMediaContainer(GetMediaProvidersMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetMediaProvidersResponseBody 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; - } - GetMediaProvidersResponseBody other = (GetMediaProvidersResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetMediaProvidersMediaContainer 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 GetMediaProvidersResponseBody build() { - - return new GetMediaProvidersResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenDirectory.java deleted file mode 100644 index 5e9ef6aa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenDirectory.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMetadataChildrenDirectory { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewedLeafCount") - private Optional viewedLeafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - @JsonCreator - public GetMetadataChildrenDirectory( - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("viewedLeafCount") Optional viewedLeafCount, - @JsonProperty("key") Optional key, - @JsonProperty("title") Optional title) { - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - this.leafCount = leafCount; - this.thumb = thumb; - this.viewedLeafCount = viewedLeafCount; - this.key = key; - this.title = title; - } - - public GetMetadataChildrenDirectory() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - @JsonIgnore - public Optional viewedLeafCount() { - return viewedLeafCount; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional title() { - return title; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMetadataChildrenDirectory withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - public GetMetadataChildrenDirectory withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public GetMetadataChildrenDirectory withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetMetadataChildrenDirectory withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetMetadataChildrenDirectory withViewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - - public GetMetadataChildrenDirectory withViewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - public GetMetadataChildrenDirectory withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetMetadataChildrenDirectory withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetMetadataChildrenDirectory withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetMetadataChildrenDirectory 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; - } - GetMetadataChildrenDirectory other = (GetMetadataChildrenDirectory) o; - return - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - leafCount, thumb, viewedLeafCount, - key, title); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenDirectory.class, - "leafCount", leafCount, - "thumb", thumb, - "viewedLeafCount", viewedLeafCount, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional leafCount = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional viewedLeafCount = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional title = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 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 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 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 GetMetadataChildrenDirectory build() { - - return new GetMetadataChildrenDirectory( - leafCount, thumb, viewedLeafCount, - key, title); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenMediaContainer.java deleted file mode 100644 index a456fc80..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenMediaContainer.java +++ /dev/null @@ -1,1084 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetMetadataChildrenMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("allowSync") - private Optional allowSync; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("art") - private Optional art; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("identifier") - private Optional identifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @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("mediaTagPrefix") - private Optional mediaTagPrefix; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mediaTagVersion") - private Optional mediaTagVersion; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("nocache") - private Optional nocache; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentYear") - private Optional parentYear; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("summary") - private Optional summary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("theme") - private Optional theme; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title1") - private Optional title1; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title2") - private Optional title2; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewGroup") - private Optional viewGroup; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewMode") - private Optional viewMode; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Directory") - private Optional> directory; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetMetadataChildrenMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("allowSync") Optional allowSync, - @JsonProperty("art") Optional art, - @JsonProperty("identifier") Optional identifier, - @JsonProperty("key") Optional key, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionUUID") Optional librarySectionUUID, - @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, - @JsonProperty("mediaTagVersion") Optional mediaTagVersion, - @JsonProperty("nocache") Optional nocache, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("parentYear") Optional parentYear, - @JsonProperty("summary") Optional summary, - @JsonProperty("theme") Optional theme, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("title1") Optional title1, - @JsonProperty("title2") Optional title2, - @JsonProperty("viewGroup") Optional viewGroup, - @JsonProperty("viewMode") Optional viewMode, - @JsonProperty("Directory") Optional> directory, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(nocache, "nocache"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(parentYear, "parentYear"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(theme, "theme"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title1, "title1"); - Utils.checkNotNull(title2, "title2"); - Utils.checkNotNull(viewGroup, "viewGroup"); - Utils.checkNotNull(viewMode, "viewMode"); - Utils.checkNotNull(directory, "directory"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.allowSync = allowSync; - this.art = art; - this.identifier = identifier; - this.key = key; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionUUID = librarySectionUUID; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.nocache = nocache; - this.parentIndex = parentIndex; - this.parentTitle = parentTitle; - this.parentYear = parentYear; - this.summary = summary; - this.theme = theme; - this.thumb = thumb; - this.title1 = title1; - this.title2 = title2; - this.viewGroup = viewGroup; - this.viewMode = viewMode; - this.directory = directory; - this.metadata = metadata; - } - - public GetMetadataChildrenMediaContainer() { - 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()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional allowSync() { - return allowSync; - } - - @JsonIgnore - public Optional art() { - return art; - } - - @JsonIgnore - public Optional identifier() { - return identifier; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional librarySectionUUID() { - return librarySectionUUID; - } - - @JsonIgnore - public Optional mediaTagPrefix() { - return mediaTagPrefix; - } - - @JsonIgnore - public Optional mediaTagVersion() { - return mediaTagVersion; - } - - @JsonIgnore - public Optional nocache() { - return nocache; - } - - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - @JsonIgnore - public Optional parentYear() { - return parentYear; - } - - @JsonIgnore - public Optional summary() { - return summary; - } - - @JsonIgnore - public Optional theme() { - return theme; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - @JsonIgnore - public Optional title1() { - return title1; - } - - @JsonIgnore - public Optional title2() { - return title2; - } - - @JsonIgnore - public Optional viewGroup() { - return viewGroup; - } - - @JsonIgnore - public Optional viewMode() { - return viewMode; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> directory() { - return (Optional>) directory; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMetadataChildrenMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetMetadataChildrenMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetMetadataChildrenMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); - return this; - } - - - public GetMetadataChildrenMediaContainer withAllowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - public GetMetadataChildrenMediaContainer withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - - public GetMetadataChildrenMediaContainer withArt(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - public GetMetadataChildrenMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = Optional.ofNullable(identifier); - return this; - } - - - public GetMetadataChildrenMediaContainer withIdentifier(Optional identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public GetMetadataChildrenMediaContainer withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetMetadataChildrenMediaContainer withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetMetadataChildrenMediaContainer withLibrarySectionID(int librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - public GetMetadataChildrenMediaContainer withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetMetadataChildrenMediaContainer withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - public GetMetadataChildrenMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetMetadataChildrenMediaContainer withLibrarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - - public GetMetadataChildrenMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - public GetMetadataChildrenMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); - return this; - } - - - public GetMetadataChildrenMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - public GetMetadataChildrenMediaContainer withMediaTagVersion(int mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); - return this; - } - - - public GetMetadataChildrenMediaContainer withMediaTagVersion(Optional mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - public GetMetadataChildrenMediaContainer withNocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = Optional.ofNullable(nocache); - return this; - } - - - public GetMetadataChildrenMediaContainer withNocache(Optional nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - public GetMetadataChildrenMediaContainer withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - - public GetMetadataChildrenMediaContainer withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - public GetMetadataChildrenMediaContainer withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - - public GetMetadataChildrenMediaContainer withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - public GetMetadataChildrenMediaContainer withParentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - - public GetMetadataChildrenMediaContainer withParentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - public GetMetadataChildrenMediaContainer withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public GetMetadataChildrenMediaContainer withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public GetMetadataChildrenMediaContainer withTheme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = Optional.ofNullable(theme); - return this; - } - - - public GetMetadataChildrenMediaContainer withTheme(Optional theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - public GetMetadataChildrenMediaContainer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetMetadataChildrenMediaContainer withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetMetadataChildrenMediaContainer withTitle1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = Optional.ofNullable(title1); - return this; - } - - - public GetMetadataChildrenMediaContainer withTitle1(Optional title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - public GetMetadataChildrenMediaContainer withTitle2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = Optional.ofNullable(title2); - return this; - } - - - public GetMetadataChildrenMediaContainer withTitle2(Optional title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - public GetMetadataChildrenMediaContainer withViewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = Optional.ofNullable(viewGroup); - return this; - } - - - public GetMetadataChildrenMediaContainer withViewGroup(Optional viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - public GetMetadataChildrenMediaContainer withViewMode(int viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = Optional.ofNullable(viewMode); - return this; - } - - - public GetMetadataChildrenMediaContainer withViewMode(Optional viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = viewMode; - return this; - } - - public GetMetadataChildrenMediaContainer withDirectory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - - public GetMetadataChildrenMediaContainer withDirectory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - public GetMetadataChildrenMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetMetadataChildrenMediaContainer 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; - } - GetMetadataChildrenMediaContainer other = (GetMetadataChildrenMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionUUID, other.librarySectionUUID) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.nocache, other.nocache) && - Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && - Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && - Utils.enhancedDeepEquals(this.parentYear, other.parentYear) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.theme, other.theme) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title1, other.title1) && - Utils.enhancedDeepEquals(this.title2, other.title2) && - Utils.enhancedDeepEquals(this.viewGroup, other.viewGroup) && - Utils.enhancedDeepEquals(this.viewMode, other.viewMode) && - Utils.enhancedDeepEquals(this.directory, other.directory) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowSync, art, - identifier, key, librarySectionID, - librarySectionTitle, librarySectionUUID, mediaTagPrefix, - mediaTagVersion, nocache, parentIndex, - parentTitle, parentYear, summary, - theme, thumb, title1, - title2, viewGroup, viewMode, - directory, metadata); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenMediaContainer.class, - "size", size, - "allowSync", allowSync, - "art", art, - "identifier", identifier, - "key", key, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionUUID", librarySectionUUID, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "nocache", nocache, - "parentIndex", parentIndex, - "parentTitle", parentTitle, - "parentYear", parentYear, - "summary", summary, - "theme", theme, - "thumb", thumb, - "title1", title1, - "title2", title2, - "viewGroup", viewGroup, - "viewMode", viewMode, - "directory", directory, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional allowSync = Optional.empty(); - - private Optional art = Optional.empty(); - - private Optional identifier = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionUUID = Optional.empty(); - - private Optional mediaTagPrefix = Optional.empty(); - - private Optional mediaTagVersion = Optional.empty(); - - private Optional nocache = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional parentYear = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional theme = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional title1 = Optional.empty(); - - private Optional title2 = Optional.empty(); - - private Optional viewGroup = Optional.empty(); - - private Optional viewMode = Optional.empty(); - - private Optional> directory = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 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 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 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 librarySectionID(int 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 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(int 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 nocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = Optional.ofNullable(nocache); - return this; - } - - public Builder nocache(Optional nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - - 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 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 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 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 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 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 title1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = Optional.ofNullable(title1); - return this; - } - - public Builder title1(Optional title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - - public Builder title2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = Optional.ofNullable(title2); - return this; - } - - public Builder title2(Optional title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - - public Builder viewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = Optional.ofNullable(viewGroup); - return this; - } - - public Builder viewGroup(Optional viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - - public Builder viewMode(int viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = Optional.ofNullable(viewMode); - return this; - } - - public Builder viewMode(Optional viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = viewMode; - return this; - } - - - public Builder directory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - public Builder directory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - - public Builder metadata(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 GetMetadataChildrenMediaContainer build() { - - return new GetMetadataChildrenMediaContainer( - size, allowSync, art, - identifier, key, librarySectionID, - librarySectionTitle, librarySectionUUID, mediaTagPrefix, - mediaTagVersion, nocache, parentIndex, - parentTitle, parentYear, summary, - theme, thumb, title1, - title2, viewGroup, viewMode, - directory, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenMetadata.java deleted file mode 100644 index 733cf049..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenMetadata.java +++ /dev/null @@ -1,1254 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMetadataChildrenMetadata { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingKey") - private Optional ratingKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentRatingKey") - private Optional parentRatingKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("guid") - private Optional guid; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentGuid") - private Optional parentGuid; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentStudio") - private Optional parentStudio; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("summary") - private Optional summary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentYear") - private Optional parentYear; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("art") - private Optional art; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTheme") - private Optional parentTheme; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewedLeafCount") - private Optional viewedLeafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("addedAt") - private Optional addedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("userRating") - private Optional userRating; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipCount") - private Optional skipCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastRatedAt") - private Optional lastRatedAt; - - @JsonCreator - public GetMetadataChildrenMetadata( - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("key") Optional key, - @JsonProperty("parentRatingKey") Optional parentRatingKey, - @JsonProperty("guid") Optional guid, - @JsonProperty("parentGuid") Optional parentGuid, - @JsonProperty("parentStudio") Optional parentStudio, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("summary") Optional summary, - @JsonProperty("index") Optional index, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("parentYear") Optional parentYear, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("art") Optional art, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("parentTheme") Optional parentTheme, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("viewedLeafCount") Optional viewedLeafCount, - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("userRating") Optional userRating, - @JsonProperty("skipCount") Optional skipCount, - @JsonProperty("lastRatedAt") Optional lastRatedAt) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(parentGuid, "parentGuid"); - Utils.checkNotNull(parentStudio, "parentStudio"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(parentYear, "parentYear"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(parentTheme, "parentTheme"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(userRating, "userRating"); - Utils.checkNotNull(skipCount, "skipCount"); - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.ratingKey = ratingKey; - this.key = key; - this.parentRatingKey = parentRatingKey; - this.guid = guid; - this.parentGuid = parentGuid; - this.parentStudio = parentStudio; - this.type = type; - this.title = title; - this.parentKey = parentKey; - this.parentTitle = parentTitle; - this.summary = summary; - this.index = index; - this.parentIndex = parentIndex; - this.viewCount = viewCount; - this.lastViewedAt = lastViewedAt; - this.parentYear = parentYear; - this.thumb = thumb; - this.art = art; - this.parentThumb = parentThumb; - this.parentTheme = parentTheme; - this.leafCount = leafCount; - this.viewedLeafCount = viewedLeafCount; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - this.userRating = userRating; - this.skipCount = skipCount; - this.lastRatedAt = lastRatedAt; - } - - public GetMetadataChildrenMetadata() { - 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()); - } - - @JsonIgnore - public Optional ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional parentRatingKey() { - return parentRatingKey; - } - - @JsonIgnore - public Optional guid() { - return guid; - } - - @JsonIgnore - public Optional parentGuid() { - return parentGuid; - } - - @JsonIgnore - public Optional parentStudio() { - return parentStudio; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - @JsonIgnore - public Optional summary() { - return summary; - } - - @JsonIgnore - public Optional index() { - return index; - } - - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - @JsonIgnore - public Optional parentYear() { - return parentYear; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - @JsonIgnore - public Optional art() { - return art; - } - - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - @JsonIgnore - public Optional parentTheme() { - return parentTheme; - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional viewedLeafCount() { - return viewedLeafCount; - } - - @JsonIgnore - public Optional addedAt() { - return addedAt; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - @JsonIgnore - public Optional userRating() { - return userRating; - } - - @JsonIgnore - public Optional skipCount() { - return skipCount; - } - - @JsonIgnore - public Optional lastRatedAt() { - return lastRatedAt; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMetadataChildrenMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetMetadataChildrenMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetMetadataChildrenMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetMetadataChildrenMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetMetadataChildrenMetadata withParentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - - public GetMetadataChildrenMetadata withParentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - public GetMetadataChildrenMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public GetMetadataChildrenMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public GetMetadataChildrenMetadata withParentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - - public GetMetadataChildrenMetadata withParentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - public GetMetadataChildrenMetadata withParentStudio(String parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = Optional.ofNullable(parentStudio); - return this; - } - - - public GetMetadataChildrenMetadata withParentStudio(Optional parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = parentStudio; - return this; - } - - public GetMetadataChildrenMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetMetadataChildrenMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetMetadataChildrenMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetMetadataChildrenMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetMetadataChildrenMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - - public GetMetadataChildrenMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - public GetMetadataChildrenMetadata withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - - public GetMetadataChildrenMetadata withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - public GetMetadataChildrenMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public GetMetadataChildrenMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public GetMetadataChildrenMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - - public GetMetadataChildrenMetadata withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public GetMetadataChildrenMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - - public GetMetadataChildrenMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - public GetMetadataChildrenMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - - public GetMetadataChildrenMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - public GetMetadataChildrenMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - - public GetMetadataChildrenMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - public GetMetadataChildrenMetadata withParentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - - public GetMetadataChildrenMetadata withParentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - public GetMetadataChildrenMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetMetadataChildrenMetadata withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetMetadataChildrenMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - - public GetMetadataChildrenMetadata withArt(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - public GetMetadataChildrenMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - - public GetMetadataChildrenMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - public GetMetadataChildrenMetadata withParentTheme(String parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = Optional.ofNullable(parentTheme); - return this; - } - - - public GetMetadataChildrenMetadata withParentTheme(Optional parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = parentTheme; - return this; - } - - public GetMetadataChildrenMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - public GetMetadataChildrenMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public GetMetadataChildrenMetadata withViewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - - public GetMetadataChildrenMetadata withViewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - public GetMetadataChildrenMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public GetMetadataChildrenMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public GetMetadataChildrenMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetMetadataChildrenMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - public GetMetadataChildrenMetadata withUserRating(int userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - - public GetMetadataChildrenMetadata withUserRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - public GetMetadataChildrenMetadata withSkipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - - public GetMetadataChildrenMetadata withSkipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - public GetMetadataChildrenMetadata withLastRatedAt(int lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - - public GetMetadataChildrenMetadata withLastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMetadataChildrenMetadata other = (GetMetadataChildrenMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.parentGuid, other.parentGuid) && - Utils.enhancedDeepEquals(this.parentStudio, other.parentStudio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && - Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && - Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && - Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && - Utils.enhancedDeepEquals(this.parentYear, other.parentYear) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && - Utils.enhancedDeepEquals(this.parentTheme, other.parentTheme) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.userRating, other.userRating) && - Utils.enhancedDeepEquals(this.skipCount, other.skipCount) && - Utils.enhancedDeepEquals(this.lastRatedAt, other.lastRatedAt); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, parentRatingKey, - guid, parentGuid, parentStudio, - type, title, parentKey, - parentTitle, summary, index, - parentIndex, viewCount, lastViewedAt, - parentYear, thumb, art, - parentThumb, parentTheme, leafCount, - viewedLeafCount, addedAt, updatedAt, - userRating, skipCount, lastRatedAt); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenMetadata.class, - "ratingKey", ratingKey, - "key", key, - "parentRatingKey", parentRatingKey, - "guid", guid, - "parentGuid", parentGuid, - "parentStudio", parentStudio, - "type", type, - "title", title, - "parentKey", parentKey, - "parentTitle", parentTitle, - "summary", summary, - "index", index, - "parentIndex", parentIndex, - "viewCount", viewCount, - "lastViewedAt", lastViewedAt, - "parentYear", parentYear, - "thumb", thumb, - "art", art, - "parentThumb", parentThumb, - "parentTheme", parentTheme, - "leafCount", leafCount, - "viewedLeafCount", viewedLeafCount, - "addedAt", addedAt, - "updatedAt", updatedAt, - "userRating", userRating, - "skipCount", skipCount, - "lastRatedAt", lastRatedAt); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional ratingKey = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional parentRatingKey = Optional.empty(); - - private Optional guid = Optional.empty(); - - private Optional parentGuid = Optional.empty(); - - private Optional parentStudio = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional index = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional parentYear = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional art = Optional.empty(); - - private Optional parentThumb = Optional.empty(); - - private Optional parentTheme = Optional.empty(); - - private Optional leafCount = Optional.empty(); - - private Optional viewedLeafCount = Optional.empty(); - - private Optional addedAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional userRating = Optional.empty(); - - private Optional skipCount = Optional.empty(); - - private Optional lastRatedAt = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder ratingKey(String 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 parentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - public Builder parentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - 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 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 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 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 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 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 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 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 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 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 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 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 addedAt(int 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(int 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 userRating(int userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - public Builder userRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - 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 lastRatedAt(int lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - public Builder lastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - public GetMetadataChildrenMetadata build() { - - return new GetMetadataChildrenMetadata( - ratingKey, key, parentRatingKey, - guid, parentGuid, parentStudio, - type, title, parentKey, - parentTitle, summary, index, - parentIndex, viewCount, lastViewedAt, - parentYear, thumb, art, - parentThumb, parentTheme, leafCount, - viewedLeafCount, addedAt, updatedAt, - userRating, skipCount, lastRatedAt); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenRequest.java deleted file mode 100644 index 14dd3b84..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenRequest.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetMetadataChildrenRequest { - /** - * the id of the library item to return the children of. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") - private double ratingKey; - - /** - * Adds additional elements to the response. Supported types are (Stream) - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeElements") - private Optional includeElements; - - @JsonCreator - public GetMetadataChildrenRequest( - double ratingKey, - Optional includeElements) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(includeElements, "includeElements"); - this.ratingKey = ratingKey; - this.includeElements = includeElements; - } - - public GetMetadataChildrenRequest( - double ratingKey) { - this(ratingKey, Optional.empty()); - } - - /** - * the id of the library item to return the children of. - */ - @JsonIgnore - public double ratingKey() { - return ratingKey; - } - - /** - * Adds additional elements to the response. Supported types are (Stream) - */ - @JsonIgnore - public Optional includeElements() { - return includeElements; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the id of the library item to return the children of. - */ - public GetMetadataChildrenRequest withRatingKey(double ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * Adds additional elements to the response. Supported types are (Stream) - */ - public GetMetadataChildrenRequest withIncludeElements(String includeElements) { - Utils.checkNotNull(includeElements, "includeElements"); - this.includeElements = Optional.ofNullable(includeElements); - return this; - } - - - /** - * Adds additional elements to the response. Supported types are (Stream) - */ - public GetMetadataChildrenRequest withIncludeElements(Optional includeElements) { - Utils.checkNotNull(includeElements, "includeElements"); - this.includeElements = includeElements; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMetadataChildrenRequest other = (GetMetadataChildrenRequest) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.includeElements, other.includeElements); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, includeElements); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenRequest.class, - "ratingKey", ratingKey, - "includeElements", includeElements); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Double ratingKey; - - private Optional includeElements = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * the id of the library item to return the children of. - */ - public Builder ratingKey(double ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * Adds additional elements to the response. Supported types are (Stream) - */ - public Builder includeElements(String includeElements) { - Utils.checkNotNull(includeElements, "includeElements"); - this.includeElements = Optional.ofNullable(includeElements); - return this; - } - - /** - * Adds additional elements to the response. Supported types are (Stream) - */ - public Builder includeElements(Optional includeElements) { - Utils.checkNotNull(includeElements, "includeElements"); - this.includeElements = includeElements; - return this; - } - - public GetMetadataChildrenRequest build() { - - return new GetMetadataChildrenRequest( - ratingKey, includeElements); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenRequestBuilder.java deleted file mode 100644 index 5cefe9ad..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenRequestBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetMetadataChildren; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetMetadataChildrenRequestBuilder { - - private Double ratingKey; - private Optional includeElements = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetMetadataChildrenRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMetadataChildrenRequestBuilder ratingKey(double ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetMetadataChildrenRequestBuilder includeElements(String includeElements) { - Utils.checkNotNull(includeElements, "includeElements"); - this.includeElements = Optional.of(includeElements); - return this; - } - - public GetMetadataChildrenRequestBuilder includeElements(Optional includeElements) { - Utils.checkNotNull(includeElements, "includeElements"); - this.includeElements = includeElements; - return this; - } - - - private GetMetadataChildrenRequest buildRequest() { - - GetMetadataChildrenRequest request = new GetMetadataChildrenRequest(ratingKey, - includeElements); - - return request; - } - - public GetMetadataChildrenResponse call() throws Exception { - - RequestOperation operation - = new GetMetadataChildren.Sync(sdkConfiguration); - GetMetadataChildrenRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenResponse.java deleted file mode 100644 index 8a9420ff..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetMetadataChildrenResponse 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 children of the library item. - */ - private Optional object; - - @JsonCreator - public GetMetadataChildrenResponse( - 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 GetMetadataChildrenResponse( - 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 children of the library item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMetadataChildrenResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMetadataChildrenResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMetadataChildrenResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The children of the library item. - */ - public GetMetadataChildrenResponse withObject(GetMetadataChildrenResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The children of the library item. - */ - public GetMetadataChildrenResponse 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; - } - GetMetadataChildrenResponse other = (GetMetadataChildrenResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 children of the library item. - */ - public Builder object(GetMetadataChildrenResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The children of the library item. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMetadataChildrenResponse build() { - - return new GetMetadataChildrenResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenResponseBody.java deleted file mode 100644 index 210d48ec..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetMetadataChildrenResponseBody - * - *

The children of the library item. - */ -public class GetMetadataChildrenResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetMetadataChildrenResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetMetadataChildrenResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMetadataChildrenResponseBody withMediaContainer(GetMetadataChildrenMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetMetadataChildrenResponseBody 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; - } - GetMetadataChildrenResponseBody other = (GetMetadataChildrenResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetMetadataChildrenMediaContainer 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 GetMetadataChildrenResponseBody build() { - - return new GetMetadataChildrenResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsRequest.java new file mode 100644 index 00000000..864e934a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsRequest.java @@ -0,0 +1,903 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetMetadataHubsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The metadata ID for the hubs to fetch + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=metadataId") + private long metadataId; + + /** + * Limit results to count items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=onlyTransient") + private Optional onlyTransient; + + @JsonCreator + public GetMetadataHubsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long metadataId, + Optional count, + Optional onlyTransient) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(metadataId, "metadataId"); + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.metadataId = metadataId; + this.count = count; + this.onlyTransient = onlyTransient; + } + + public GetMetadataHubsRequest( + long metadataId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), metadataId, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The metadata ID for the hubs to fetch + */ + @JsonIgnore + public long metadataId() { + return metadataId; + } + + /** + * Limit results to count items + */ + @JsonIgnore + public Optional count() { + return count; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional onlyTransient() { + return (Optional) onlyTransient; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetMetadataHubsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetMetadataHubsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetMetadataHubsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetMetadataHubsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetMetadataHubsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetMetadataHubsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetMetadataHubsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetMetadataHubsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetMetadataHubsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetMetadataHubsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetMetadataHubsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetMetadataHubsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetMetadataHubsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetMetadataHubsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetMetadataHubsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetMetadataHubsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetMetadataHubsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetMetadataHubsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetMetadataHubsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetMetadataHubsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetMetadataHubsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetMetadataHubsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The metadata ID for the hubs to fetch + */ + public GetMetadataHubsRequest withMetadataId(long metadataId) { + Utils.checkNotNull(metadataId, "metadataId"); + this.metadataId = metadataId; + return this; + } + + /** + * Limit results to count items + */ + public GetMetadataHubsRequest withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + /** + * Limit results to count items + */ + public GetMetadataHubsRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public GetMetadataHubsRequest withOnlyTransient(BoolInt onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public GetMetadataHubsRequest withOnlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataHubsRequest other = (GetMetadataHubsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.metadataId, other.metadataId) && + Utils.enhancedDeepEquals(this.count, other.count) && + Utils.enhancedDeepEquals(this.onlyTransient, other.onlyTransient); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, metadataId, + count, onlyTransient); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataHubsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "metadataId", metadataId, + "count", count, + "onlyTransient", onlyTransient); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long metadataId; + + private Optional count = Optional.empty(); + + private Optional onlyTransient = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The metadata ID for the hubs to fetch + */ + public Builder metadataId(long metadataId) { + Utils.checkNotNull(metadataId, "metadataId"); + this.metadataId = metadataId; + return this; + } + + + /** + * Limit results to count items + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * Limit results to count items + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public Builder onlyTransient(BoolInt onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public Builder onlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + public GetMetadataHubsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetMetadataHubsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, metadataId, + count, onlyTransient); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsRequestBuilder.java new file mode 100644 index 00000000..67cbe2e7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetMetadataHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetMetadataHubsRequestBuilder { + + private GetMetadataHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetMetadataHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetMetadataHubsRequestBuilder request(GetMetadataHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetMetadataHubsResponse call() throws Exception { + + RequestOperation operation + = new GetMetadataHubs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsResponse.java new file mode 100644 index 00000000..d2fcac27 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataHubsResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithHubs; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetMetadataHubsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithHubs; + + + private Map> headers; + + @JsonCreator + public GetMetadataHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithHubs, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithHubs = mediaContainerWithHubs; + this.headers = headers; + } + + public GetMetadataHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithHubs() { + return (Optional) mediaContainerWithHubs; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetMetadataHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMetadataHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMetadataHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetMetadataHubsResponse withMediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + + /** + * OK + */ + public GetMetadataHubsResponse withMediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + public GetMetadataHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataHubsResponse other = (GetMetadataHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithHubs, other.mediaContainerWithHubs) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithHubs", mediaContainerWithHubs, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithHubs = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetMetadataHubsResponse build() { + + return new GetMetadataHubsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemRequest.java new file mode 100644 index 00000000..8d93e661 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemRequest.java @@ -0,0 +1,1259 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.List; +import java.util.Optional; + + +public class GetMetadataItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private List ids; + + /** + * Determines if file check should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=asyncCheckFiles") + private Optional asyncCheckFiles; + + /** + * Determines if local media agent refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=asyncRefreshLocalMediaAgent") + private Optional asyncRefreshLocalMediaAgent; + + /** + * Determines if analysis refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=asyncRefreshAnalysis") + private Optional asyncRefreshAnalysis; + + /** + * Determines if file check should be performed synchronously. Specifying `asyncCheckFiles` will cause this option to be ignored. Default is false. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=checkFiles") + private Optional checkFiles; + + /** + * Determines if synchronous local media agent and analysis refresh should be skipped. Specifying async versions will cause synchronous versions to be skipped. Default is false. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=skipRefresh") + private Optional skipRefresh; + + /** + * Determines if file existence check should be performed synchronously. Specifying `checkFiles` will imply this option. Default is false. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=checkFileAvailability") + private Optional checkFileAvailability; + + /** + * Add metadata augmentations. An activity is created to indicate progress. Option will be ignored if specified by non-admin or if multiple metadata items are requested. Default is false. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=asyncAugmentMetadata") + private Optional asyncAugmentMetadata; + + /** + * Number of augmentations to add. Requires `asyncAugmentMetadata` to be specified. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=augmentCount") + private Optional augmentCount; + + @JsonCreator + public GetMetadataItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + List ids, + Optional asyncCheckFiles, + Optional asyncRefreshLocalMediaAgent, + Optional asyncRefreshAnalysis, + Optional checkFiles, + Optional skipRefresh, + Optional checkFileAvailability, + Optional asyncAugmentMetadata, + Optional augmentCount) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(asyncCheckFiles, "asyncCheckFiles"); + Utils.checkNotNull(asyncRefreshLocalMediaAgent, "asyncRefreshLocalMediaAgent"); + Utils.checkNotNull(asyncRefreshAnalysis, "asyncRefreshAnalysis"); + Utils.checkNotNull(checkFiles, "checkFiles"); + Utils.checkNotNull(skipRefresh, "skipRefresh"); + Utils.checkNotNull(checkFileAvailability, "checkFileAvailability"); + Utils.checkNotNull(asyncAugmentMetadata, "asyncAugmentMetadata"); + Utils.checkNotNull(augmentCount, "augmentCount"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.asyncCheckFiles = asyncCheckFiles; + this.asyncRefreshLocalMediaAgent = asyncRefreshLocalMediaAgent; + this.asyncRefreshAnalysis = asyncRefreshAnalysis; + this.checkFiles = checkFiles; + this.skipRefresh = skipRefresh; + this.checkFileAvailability = checkFileAvailability; + this.asyncAugmentMetadata = asyncAugmentMetadata; + this.augmentCount = augmentCount; + } + + public GetMetadataItemRequest( + List ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public List ids() { + return ids; + } + + /** + * Determines if file check should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional asyncCheckFiles() { + return (Optional) asyncCheckFiles; + } + + /** + * Determines if local media agent refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional asyncRefreshLocalMediaAgent() { + return (Optional) asyncRefreshLocalMediaAgent; + } + + /** + * Determines if analysis refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional asyncRefreshAnalysis() { + return (Optional) asyncRefreshAnalysis; + } + + /** + * Determines if file check should be performed synchronously. Specifying `asyncCheckFiles` will cause this option to be ignored. Default is false. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional checkFiles() { + return (Optional) checkFiles; + } + + /** + * Determines if synchronous local media agent and analysis refresh should be skipped. Specifying async versions will cause synchronous versions to be skipped. Default is false. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional skipRefresh() { + return (Optional) skipRefresh; + } + + /** + * Determines if file existence check should be performed synchronously. Specifying `checkFiles` will imply this option. Default is false. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional checkFileAvailability() { + return (Optional) checkFileAvailability; + } + + /** + * Add metadata augmentations. An activity is created to indicate progress. Option will be ignored if specified by non-admin or if multiple metadata items are requested. Default is false. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional asyncAugmentMetadata() { + return (Optional) asyncAugmentMetadata; + } + + /** + * Number of augmentations to add. Requires `asyncAugmentMetadata` to be specified. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional augmentCount() { + return (Optional) augmentCount; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetMetadataItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetMetadataItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetMetadataItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetMetadataItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetMetadataItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetMetadataItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetMetadataItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetMetadataItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetMetadataItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetMetadataItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetMetadataItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetMetadataItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetMetadataItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetMetadataItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetMetadataItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetMetadataItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetMetadataItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetMetadataItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetMetadataItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetMetadataItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetMetadataItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetMetadataItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public GetMetadataItemRequest withIds(List ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * Determines if file check should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public GetMetadataItemRequest withAsyncCheckFiles(BoolInt asyncCheckFiles) { + Utils.checkNotNull(asyncCheckFiles, "asyncCheckFiles"); + this.asyncCheckFiles = Optional.ofNullable(asyncCheckFiles); + return this; + } + + + /** + * Determines if file check should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public GetMetadataItemRequest withAsyncCheckFiles(Optional asyncCheckFiles) { + Utils.checkNotNull(asyncCheckFiles, "asyncCheckFiles"); + this.asyncCheckFiles = asyncCheckFiles; + return this; + } + + /** + * Determines if local media agent refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public GetMetadataItemRequest withAsyncRefreshLocalMediaAgent(BoolInt asyncRefreshLocalMediaAgent) { + Utils.checkNotNull(asyncRefreshLocalMediaAgent, "asyncRefreshLocalMediaAgent"); + this.asyncRefreshLocalMediaAgent = Optional.ofNullable(asyncRefreshLocalMediaAgent); + return this; + } + + + /** + * Determines if local media agent refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public GetMetadataItemRequest withAsyncRefreshLocalMediaAgent(Optional asyncRefreshLocalMediaAgent) { + Utils.checkNotNull(asyncRefreshLocalMediaAgent, "asyncRefreshLocalMediaAgent"); + this.asyncRefreshLocalMediaAgent = asyncRefreshLocalMediaAgent; + return this; + } + + /** + * Determines if analysis refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public GetMetadataItemRequest withAsyncRefreshAnalysis(BoolInt asyncRefreshAnalysis) { + Utils.checkNotNull(asyncRefreshAnalysis, "asyncRefreshAnalysis"); + this.asyncRefreshAnalysis = Optional.ofNullable(asyncRefreshAnalysis); + return this; + } + + + /** + * Determines if analysis refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public GetMetadataItemRequest withAsyncRefreshAnalysis(Optional asyncRefreshAnalysis) { + Utils.checkNotNull(asyncRefreshAnalysis, "asyncRefreshAnalysis"); + this.asyncRefreshAnalysis = asyncRefreshAnalysis; + return this; + } + + /** + * Determines if file check should be performed synchronously. Specifying `asyncCheckFiles` will cause this option to be ignored. Default is false. + */ + public GetMetadataItemRequest withCheckFiles(BoolInt checkFiles) { + Utils.checkNotNull(checkFiles, "checkFiles"); + this.checkFiles = Optional.ofNullable(checkFiles); + return this; + } + + + /** + * Determines if file check should be performed synchronously. Specifying `asyncCheckFiles` will cause this option to be ignored. Default is false. + */ + public GetMetadataItemRequest withCheckFiles(Optional checkFiles) { + Utils.checkNotNull(checkFiles, "checkFiles"); + this.checkFiles = checkFiles; + return this; + } + + /** + * Determines if synchronous local media agent and analysis refresh should be skipped. Specifying async versions will cause synchronous versions to be skipped. Default is false. + */ + public GetMetadataItemRequest withSkipRefresh(BoolInt skipRefresh) { + Utils.checkNotNull(skipRefresh, "skipRefresh"); + this.skipRefresh = Optional.ofNullable(skipRefresh); + return this; + } + + + /** + * Determines if synchronous local media agent and analysis refresh should be skipped. Specifying async versions will cause synchronous versions to be skipped. Default is false. + */ + public GetMetadataItemRequest withSkipRefresh(Optional skipRefresh) { + Utils.checkNotNull(skipRefresh, "skipRefresh"); + this.skipRefresh = skipRefresh; + return this; + } + + /** + * Determines if file existence check should be performed synchronously. Specifying `checkFiles` will imply this option. Default is false. + */ + public GetMetadataItemRequest withCheckFileAvailability(BoolInt checkFileAvailability) { + Utils.checkNotNull(checkFileAvailability, "checkFileAvailability"); + this.checkFileAvailability = Optional.ofNullable(checkFileAvailability); + return this; + } + + + /** + * Determines if file existence check should be performed synchronously. Specifying `checkFiles` will imply this option. Default is false. + */ + public GetMetadataItemRequest withCheckFileAvailability(Optional checkFileAvailability) { + Utils.checkNotNull(checkFileAvailability, "checkFileAvailability"); + this.checkFileAvailability = checkFileAvailability; + return this; + } + + /** + * Add metadata augmentations. An activity is created to indicate progress. Option will be ignored if specified by non-admin or if multiple metadata items are requested. Default is false. + */ + public GetMetadataItemRequest withAsyncAugmentMetadata(BoolInt asyncAugmentMetadata) { + Utils.checkNotNull(asyncAugmentMetadata, "asyncAugmentMetadata"); + this.asyncAugmentMetadata = Optional.ofNullable(asyncAugmentMetadata); + return this; + } + + + /** + * Add metadata augmentations. An activity is created to indicate progress. Option will be ignored if specified by non-admin or if multiple metadata items are requested. Default is false. + */ + public GetMetadataItemRequest withAsyncAugmentMetadata(Optional asyncAugmentMetadata) { + Utils.checkNotNull(asyncAugmentMetadata, "asyncAugmentMetadata"); + this.asyncAugmentMetadata = asyncAugmentMetadata; + return this; + } + + /** + * Number of augmentations to add. Requires `asyncAugmentMetadata` to be specified. + */ + public GetMetadataItemRequest withAugmentCount(BoolInt augmentCount) { + Utils.checkNotNull(augmentCount, "augmentCount"); + this.augmentCount = Optional.ofNullable(augmentCount); + return this; + } + + + /** + * Number of augmentations to add. Requires `asyncAugmentMetadata` to be specified. + */ + public GetMetadataItemRequest withAugmentCount(Optional augmentCount) { + Utils.checkNotNull(augmentCount, "augmentCount"); + this.augmentCount = augmentCount; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataItemRequest other = (GetMetadataItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.asyncCheckFiles, other.asyncCheckFiles) && + Utils.enhancedDeepEquals(this.asyncRefreshLocalMediaAgent, other.asyncRefreshLocalMediaAgent) && + Utils.enhancedDeepEquals(this.asyncRefreshAnalysis, other.asyncRefreshAnalysis) && + Utils.enhancedDeepEquals(this.checkFiles, other.checkFiles) && + Utils.enhancedDeepEquals(this.skipRefresh, other.skipRefresh) && + Utils.enhancedDeepEquals(this.checkFileAvailability, other.checkFileAvailability) && + Utils.enhancedDeepEquals(this.asyncAugmentMetadata, other.asyncAugmentMetadata) && + Utils.enhancedDeepEquals(this.augmentCount, other.augmentCount); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + asyncCheckFiles, asyncRefreshLocalMediaAgent, asyncRefreshAnalysis, + checkFiles, skipRefresh, checkFileAvailability, + asyncAugmentMetadata, augmentCount); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "asyncCheckFiles", asyncCheckFiles, + "asyncRefreshLocalMediaAgent", asyncRefreshLocalMediaAgent, + "asyncRefreshAnalysis", asyncRefreshAnalysis, + "checkFiles", checkFiles, + "skipRefresh", skipRefresh, + "checkFileAvailability", checkFileAvailability, + "asyncAugmentMetadata", asyncAugmentMetadata, + "augmentCount", augmentCount); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private List ids; + + private Optional asyncCheckFiles = Optional.empty(); + + private Optional asyncRefreshLocalMediaAgent = Optional.empty(); + + private Optional asyncRefreshAnalysis = Optional.empty(); + + private Optional checkFiles = Optional.empty(); + + private Optional skipRefresh = Optional.empty(); + + private Optional checkFileAvailability = Optional.empty(); + + private Optional asyncAugmentMetadata = Optional.empty(); + + private Optional augmentCount = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(List ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * Determines if file check should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public Builder asyncCheckFiles(BoolInt asyncCheckFiles) { + Utils.checkNotNull(asyncCheckFiles, "asyncCheckFiles"); + this.asyncCheckFiles = Optional.ofNullable(asyncCheckFiles); + return this; + } + + /** + * Determines if file check should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public Builder asyncCheckFiles(Optional asyncCheckFiles) { + Utils.checkNotNull(asyncCheckFiles, "asyncCheckFiles"); + this.asyncCheckFiles = asyncCheckFiles; + return this; + } + + + /** + * Determines if local media agent refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public Builder asyncRefreshLocalMediaAgent(BoolInt asyncRefreshLocalMediaAgent) { + Utils.checkNotNull(asyncRefreshLocalMediaAgent, "asyncRefreshLocalMediaAgent"); + this.asyncRefreshLocalMediaAgent = Optional.ofNullable(asyncRefreshLocalMediaAgent); + return this; + } + + /** + * Determines if local media agent refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public Builder asyncRefreshLocalMediaAgent(Optional asyncRefreshLocalMediaAgent) { + Utils.checkNotNull(asyncRefreshLocalMediaAgent, "asyncRefreshLocalMediaAgent"); + this.asyncRefreshLocalMediaAgent = asyncRefreshLocalMediaAgent; + return this; + } + + + /** + * Determines if analysis refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public Builder asyncRefreshAnalysis(BoolInt asyncRefreshAnalysis) { + Utils.checkNotNull(asyncRefreshAnalysis, "asyncRefreshAnalysis"); + this.asyncRefreshAnalysis = Optional.ofNullable(asyncRefreshAnalysis); + return this; + } + + /** + * Determines if analysis refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. + */ + public Builder asyncRefreshAnalysis(Optional asyncRefreshAnalysis) { + Utils.checkNotNull(asyncRefreshAnalysis, "asyncRefreshAnalysis"); + this.asyncRefreshAnalysis = asyncRefreshAnalysis; + return this; + } + + + /** + * Determines if file check should be performed synchronously. Specifying `asyncCheckFiles` will cause this option to be ignored. Default is false. + */ + public Builder checkFiles(BoolInt checkFiles) { + Utils.checkNotNull(checkFiles, "checkFiles"); + this.checkFiles = Optional.ofNullable(checkFiles); + return this; + } + + /** + * Determines if file check should be performed synchronously. Specifying `asyncCheckFiles` will cause this option to be ignored. Default is false. + */ + public Builder checkFiles(Optional checkFiles) { + Utils.checkNotNull(checkFiles, "checkFiles"); + this.checkFiles = checkFiles; + return this; + } + + + /** + * Determines if synchronous local media agent and analysis refresh should be skipped. Specifying async versions will cause synchronous versions to be skipped. Default is false. + */ + public Builder skipRefresh(BoolInt skipRefresh) { + Utils.checkNotNull(skipRefresh, "skipRefresh"); + this.skipRefresh = Optional.ofNullable(skipRefresh); + return this; + } + + /** + * Determines if synchronous local media agent and analysis refresh should be skipped. Specifying async versions will cause synchronous versions to be skipped. Default is false. + */ + public Builder skipRefresh(Optional skipRefresh) { + Utils.checkNotNull(skipRefresh, "skipRefresh"); + this.skipRefresh = skipRefresh; + return this; + } + + + /** + * Determines if file existence check should be performed synchronously. Specifying `checkFiles` will imply this option. Default is false. + */ + public Builder checkFileAvailability(BoolInt checkFileAvailability) { + Utils.checkNotNull(checkFileAvailability, "checkFileAvailability"); + this.checkFileAvailability = Optional.ofNullable(checkFileAvailability); + return this; + } + + /** + * Determines if file existence check should be performed synchronously. Specifying `checkFiles` will imply this option. Default is false. + */ + public Builder checkFileAvailability(Optional checkFileAvailability) { + Utils.checkNotNull(checkFileAvailability, "checkFileAvailability"); + this.checkFileAvailability = checkFileAvailability; + return this; + } + + + /** + * Add metadata augmentations. An activity is created to indicate progress. Option will be ignored if specified by non-admin or if multiple metadata items are requested. Default is false. + */ + public Builder asyncAugmentMetadata(BoolInt asyncAugmentMetadata) { + Utils.checkNotNull(asyncAugmentMetadata, "asyncAugmentMetadata"); + this.asyncAugmentMetadata = Optional.ofNullable(asyncAugmentMetadata); + return this; + } + + /** + * Add metadata augmentations. An activity is created to indicate progress. Option will be ignored if specified by non-admin or if multiple metadata items are requested. Default is false. + */ + public Builder asyncAugmentMetadata(Optional asyncAugmentMetadata) { + Utils.checkNotNull(asyncAugmentMetadata, "asyncAugmentMetadata"); + this.asyncAugmentMetadata = asyncAugmentMetadata; + return this; + } + + + /** + * Number of augmentations to add. Requires `asyncAugmentMetadata` to be specified. + */ + public Builder augmentCount(BoolInt augmentCount) { + Utils.checkNotNull(augmentCount, "augmentCount"); + this.augmentCount = Optional.ofNullable(augmentCount); + return this; + } + + /** + * Number of augmentations to add. Requires `asyncAugmentMetadata` to be specified. + */ + public Builder augmentCount(Optional augmentCount) { + Utils.checkNotNull(augmentCount, "augmentCount"); + this.augmentCount = augmentCount; + return this; + } + + public GetMetadataItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetMetadataItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + asyncCheckFiles, asyncRefreshLocalMediaAgent, asyncRefreshAnalysis, + checkFiles, skipRefresh, checkFileAvailability, + asyncAugmentMetadata, augmentCount); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemRequestBuilder.java new file mode 100644 index 00000000..2eed18ad --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetMetadataItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetMetadataItemRequestBuilder { + + private GetMetadataItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetMetadataItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetMetadataItemRequestBuilder request(GetMetadataItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetMetadataItemResponse call() throws Exception { + + RequestOperation operation + = new GetMetadataItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemResponse.java new file mode 100644 index 00000000..c4b84c8f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMetadataItemResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetMetadataItemResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetMetadataItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetMetadataItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetMetadataItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMetadataItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMetadataItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetMetadataItemResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetMetadataItemResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetMetadataItemResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataItemResponse other = (GetMetadataItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetMetadataItemResponse build() { + + return new GetMetadataItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountRequestBuilder.java deleted file mode 100644 index a1b1ae3e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetMyPlexAccount; -import java.lang.Exception; - -public class GetMyPlexAccountRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetMyPlexAccountRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMyPlexAccountResponse call() throws Exception { - - RequestlessOperation operation - = new GetMyPlexAccount.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountResponse.java deleted file mode 100644 index 2963f49d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetMyPlexAccountResponse 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; - - /** - * MyPlex Account - */ - private Optional object; - - @JsonCreator - public GetMyPlexAccountResponse( - 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 GetMyPlexAccountResponse( - 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; - } - - /** - * MyPlex Account - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMyPlexAccountResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMyPlexAccountResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMyPlexAccountResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * MyPlex Account - */ - public GetMyPlexAccountResponse withObject(GetMyPlexAccountResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * MyPlex Account - */ - public GetMyPlexAccountResponse 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; - } - GetMyPlexAccountResponse other = (GetMyPlexAccountResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMyPlexAccountResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * MyPlex Account - */ - public Builder object(GetMyPlexAccountResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * MyPlex Account - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMyPlexAccountResponse build() { - - return new GetMyPlexAccountResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountResponseBody.java deleted file mode 100644 index 98c9591c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMyPlexAccountResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetMyPlexAccountResponseBody - * - *

MyPlex Account - */ -public class GetMyPlexAccountResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MyPlex") - private Optional myPlex; - - @JsonCreator - public GetMyPlexAccountResponseBody( - @JsonProperty("MyPlex") Optional myPlex) { - Utils.checkNotNull(myPlex, "myPlex"); - this.myPlex = myPlex; - } - - public GetMyPlexAccountResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional myPlex() { - return (Optional) myPlex; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetMyPlexAccountResponseBody withMyPlex(MyPlex myPlex) { - Utils.checkNotNull(myPlex, "myPlex"); - this.myPlex = Optional.ofNullable(myPlex); - return this; - } - - - public GetMyPlexAccountResponseBody withMyPlex(Optional myPlex) { - Utils.checkNotNull(myPlex, "myPlex"); - this.myPlex = myPlex; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMyPlexAccountResponseBody other = (GetMyPlexAccountResponseBody) o; - return - Utils.enhancedDeepEquals(this.myPlex, other.myPlex); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - myPlex); - } - - @Override - public String toString() { - return Utils.toString(GetMyPlexAccountResponseBody.class, - "myPlex", myPlex); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional myPlex = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder myPlex(MyPlex myPlex) { - Utils.checkNotNull(myPlex, "myPlex"); - this.myPlex = Optional.ofNullable(myPlex); - return this; - } - - public Builder myPlex(Optional myPlex) { - Utils.checkNotNull(myPlex, "myPlex"); - this.myPlex = myPlex; - return this; - } - - public GetMyPlexAccountResponseBody build() { - - return new GetMyPlexAccountResponseBody( - myPlex); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsRequest.java new file mode 100644 index 00000000..450f6896 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsRequest.java @@ -0,0 +1,829 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.List; +import java.util.Optional; + + +public class GetNotificationsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=filter") + private Optional> filter; + + @JsonCreator + public GetNotificationsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional> filter) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(filter, "filter"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.filter = filter; + } + + public GetNotificationsRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> filter() { + return (Optional>) filter; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetNotificationsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetNotificationsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetNotificationsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetNotificationsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetNotificationsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetNotificationsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetNotificationsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetNotificationsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetNotificationsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetNotificationsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetNotificationsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetNotificationsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetNotificationsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetNotificationsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetNotificationsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetNotificationsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetNotificationsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetNotificationsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetNotificationsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetNotificationsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetNotificationsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetNotificationsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + public GetNotificationsRequest withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + public GetNotificationsRequest withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNotificationsRequest other = (GetNotificationsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.filter, other.filter); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, filter); + } + + @Override + public String toString() { + return Utils.toString(GetNotificationsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "filter", filter); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional> filter = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + public Builder filter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + *

- `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetNotificationsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetNotificationsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, filter); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsRequestBuilder.java new file mode 100644 index 00000000..435a02ee --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetNotifications; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetNotificationsRequestBuilder { + + private GetNotificationsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetNotificationsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetNotificationsRequestBuilder request(GetNotificationsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetNotificationsResponse call() throws Exception { + + RequestOperation operation + = new GetNotifications.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsResponse.java new file mode 100644 index 00000000..34d90594 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetNotificationsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetNotificationsResponse 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetNotificationsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetNotificationsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetNotificationsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetNotificationsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetNotificationsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetNotificationsResponse withResponseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetNotificationsResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNotificationsResponse other = (GetNotificationsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetNotificationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetNotificationsResponse build() { + + return new GetNotificationsResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexRequest.java new file mode 100644 index 00000000..bdc39392 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexRequest.java @@ -0,0 +1,883 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetPartIndexRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The part id who's index is to be fetched + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=partId") + private long partId; + + /** + * The type of index to grab. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=index") + private Index index; + + /** + * The interval between images to return in ms. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=interval") + private Optional interval; + + @JsonCreator + public GetPartIndexRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long partId, + Index index, + Optional interval) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(partId, "partId"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(interval, "interval"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.partId = partId; + this.index = index; + this.interval = interval; + } + + public GetPartIndexRequest( + long partId, + Index index) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), partId, + index, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The part id who's index is to be fetched + */ + @JsonIgnore + public long partId() { + return partId; + } + + /** + * The type of index to grab. + */ + @JsonIgnore + public Index index() { + return index; + } + + /** + * The interval between images to return in ms. + */ + @JsonIgnore + public Optional interval() { + return interval; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPartIndexRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPartIndexRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPartIndexRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPartIndexRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPartIndexRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPartIndexRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPartIndexRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPartIndexRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPartIndexRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPartIndexRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPartIndexRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPartIndexRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPartIndexRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPartIndexRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPartIndexRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPartIndexRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPartIndexRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPartIndexRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPartIndexRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPartIndexRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPartIndexRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPartIndexRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The part id who's index is to be fetched + */ + public GetPartIndexRequest withPartId(long partId) { + Utils.checkNotNull(partId, "partId"); + this.partId = partId; + return this; + } + + /** + * The type of index to grab. + */ + public GetPartIndexRequest withIndex(Index index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * The interval between images to return in ms. + */ + public GetPartIndexRequest withInterval(long interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = Optional.ofNullable(interval); + return this; + } + + + /** + * The interval between images to return in ms. + */ + public GetPartIndexRequest withInterval(Optional interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = interval; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPartIndexRequest other = (GetPartIndexRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.partId, other.partId) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.interval, other.interval); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, partId, + index, interval); + } + + @Override + public String toString() { + return Utils.toString(GetPartIndexRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "partId", partId, + "index", index, + "interval", interval); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long partId; + + private Index index; + + private Optional interval = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The part id who's index is to be fetched + */ + public Builder partId(long partId) { + Utils.checkNotNull(partId, "partId"); + this.partId = partId; + return this; + } + + + /** + * The type of index to grab. + */ + public Builder index(Index index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * The interval between images to return in ms. + */ + public Builder interval(long interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = Optional.ofNullable(interval); + return this; + } + + /** + * The interval between images to return in ms. + */ + public Builder interval(Optional interval) { + Utils.checkNotNull(interval, "interval"); + this.interval = interval; + return this; + } + + public GetPartIndexRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetPartIndexRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, partId, + index, interval); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexRequestBuilder.java new file mode 100644 index 00000000..8eea5885 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetPartIndex; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetPartIndexRequestBuilder { + + private GetPartIndexRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPartIndexRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPartIndexRequestBuilder request(GetPartIndexRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPartIndexResponse call() throws Exception { + + RequestOperation operation + = new GetPartIndex.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexResponse.java new file mode 100644 index 00000000..8fc1d7d1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPartIndexResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetPartIndexResponse 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetPartIndexResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetPartIndexResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPartIndexResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPartIndexResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPartIndexResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPartIndexResponse withResponseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetPartIndexResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPartIndexResponse other = (GetPartIndexResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetPartIndexResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetPartIndexResponse build() { + + return new GetPartIndexResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPersonMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPersonMediaContainer.java new file mode 100644 index 00000000..db7efbde --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPersonMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Tag; +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.List; +import java.util.Optional; + +/** + * GetPersonMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetPersonMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonCreator + public GetPersonMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Directory") Optional> directory) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(directory, "directory"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.directory = directory; + } + + public GetPersonMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPersonMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetPersonMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetPersonMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetPersonMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetPersonMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetPersonMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetPersonMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetPersonMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetPersonMediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public GetPersonMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPersonMediaContainer other = (GetPersonMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.directory, other.directory); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, directory); + } + + @Override + public String toString() { + return Utils.toString(GetPersonMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "directory", directory); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public GetPersonMediaContainer build() { + + return new GetPersonMediaContainer( + identifier, offset, size, + totalSize, directory); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPersonRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPersonRequest.java new file mode 100644 index 00000000..b277aa93 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPersonRequest.java @@ -0,0 +1,779 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetPersonRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=personId") + private String personId; + + @JsonCreator + public GetPersonRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String personId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(personId, "personId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.personId = personId; + } + + public GetPersonRequest( + String personId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), personId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor + */ + @JsonIgnore + public String personId() { + return personId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPersonRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPersonRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPersonRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPersonRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPersonRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPersonRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPersonRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPersonRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPersonRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPersonRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPersonRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPersonRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPersonRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPersonRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPersonRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPersonRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPersonRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPersonRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPersonRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPersonRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPersonRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPersonRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor + */ + public GetPersonRequest withPersonId(String personId) { + Utils.checkNotNull(personId, "personId"); + this.personId = personId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPersonRequest other = (GetPersonRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.personId, other.personId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, personId); + } + + @Override + public String toString() { + return Utils.toString(GetPersonRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "personId", personId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String personId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor + */ + public Builder personId(String personId) { + Utils.checkNotNull(personId, "personId"); + this.personId = personId; + return this; + } + + public GetPersonRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetPersonRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, personId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPersonRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPersonRequestBuilder.java new file mode 100644 index 00000000..c2879e5b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPersonRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetPerson; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetPersonRequestBuilder { + + private GetPersonRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPersonRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPersonRequestBuilder request(GetPersonRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPersonResponse call() throws Exception { + + RequestOperation operation + = new GetPerson.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPersonResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPersonResponse.java new file mode 100644 index 00000000..422c337c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPersonResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetPersonResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetPersonResponse( + 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 GetPersonResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPersonResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPersonResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPersonResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPersonResponse withObject(GetPersonResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetPersonResponse 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; + } + GetPersonResponse other = (GetPersonResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetPersonResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetPersonResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetPersonResponse build() { + + return new GetPersonResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPersonResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPersonResponseBody.java new file mode 100644 index 00000000..d733d465 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPersonResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetPersonResponseBody + * + *

OK + */ +public class GetPersonResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetPersonResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetPersonResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPersonResponseBody withMediaContainer(GetPersonMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetPersonResponseBody 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; + } + GetPersonResponseBody other = (GetPersonResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetPersonResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetPersonMediaContainer 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 GetPersonResponseBody build() { + + return new GetPersonResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPinAuthPinContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPinAuthPinContainer.java deleted file mode 100644 index 25fb5d7c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPinAuthPinContainer.java +++ /dev/null @@ -1,557 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.Object; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * GetPinAuthPinContainer - * - *

Requests a new pin id used in the authentication flow - */ -public class GetPinAuthPinContainer { - - @JsonProperty("id") - private long id; - - - @JsonProperty("code") - private String code; - - - @JsonProperty("product") - private String product; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("trusted") - private Optional trusted; - - - @JsonProperty("qr") - private String qr; - - /** - * The X-Client-Identifier used in the request - */ - @JsonProperty("clientIdentifier") - private String clientIdentifier; - - /** - * Geo location data - */ - @JsonProperty("location") - private GeoData location; - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("expiresIn") - private Optional expiresIn; - - - @JsonProperty("createdAt") - private OffsetDateTime createdAt; - - - @JsonProperty("expiresAt") - private OffsetDateTime expiresAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("authToken") - private JsonNullable authToken; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("newRegistration") - private JsonNullable newRegistration; - - @JsonCreator - public GetPinAuthPinContainer( - @JsonProperty("id") long id, - @JsonProperty("code") String code, - @JsonProperty("product") String product, - @JsonProperty("trusted") Optional trusted, - @JsonProperty("qr") String qr, - @JsonProperty("clientIdentifier") String clientIdentifier, - @JsonProperty("location") GeoData location, - @JsonProperty("expiresIn") Optional expiresIn, - @JsonProperty("createdAt") OffsetDateTime createdAt, - @JsonProperty("expiresAt") OffsetDateTime expiresAt, - @JsonProperty("authToken") JsonNullable authToken, - @JsonProperty("newRegistration") JsonNullable newRegistration) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(product, "product"); - Utils.checkNotNull(trusted, "trusted"); - Utils.checkNotNull(qr, "qr"); - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - Utils.checkNotNull(location, "location"); - Utils.checkNotNull(expiresIn, "expiresIn"); - Utils.checkNotNull(createdAt, "createdAt"); - Utils.checkNotNull(expiresAt, "expiresAt"); - Utils.checkNotNull(authToken, "authToken"); - Utils.checkNotNull(newRegistration, "newRegistration"); - this.id = id; - this.code = code; - this.product = product; - this.trusted = trusted; - this.qr = qr; - this.clientIdentifier = clientIdentifier; - this.location = location; - this.expiresIn = expiresIn; - this.createdAt = createdAt; - this.expiresAt = expiresAt; - this.authToken = authToken; - this.newRegistration = newRegistration; - } - - public GetPinAuthPinContainer( - long id, - String code, - String product, - String qr, - String clientIdentifier, - GeoData location, - OffsetDateTime createdAt, - OffsetDateTime expiresAt) { - this(id, code, product, - Optional.empty(), qr, clientIdentifier, - location, Optional.empty(), createdAt, - expiresAt, JsonNullable.undefined(), JsonNullable.undefined()); - } - - @JsonIgnore - public long id() { - return id; - } - - @JsonIgnore - public String code() { - return code; - } - - @JsonIgnore - public String product() { - return product; - } - - @JsonIgnore - public Optional trusted() { - return trusted; - } - - @JsonIgnore - public String qr() { - return qr; - } - - /** - * The X-Client-Identifier used in the request - */ - @JsonIgnore - public String clientIdentifier() { - return clientIdentifier; - } - - /** - * Geo location data - */ - @JsonIgnore - public GeoData location() { - return location; - } - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - @JsonIgnore - public Optional expiresIn() { - return expiresIn; - } - - @JsonIgnore - public OffsetDateTime createdAt() { - return createdAt; - } - - @JsonIgnore - public OffsetDateTime expiresAt() { - return expiresAt; - } - - @JsonIgnore - public JsonNullable authToken() { - return authToken; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable newRegistration() { - return (JsonNullable) newRegistration; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPinAuthPinContainer withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetPinAuthPinContainer withCode(String code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetPinAuthPinContainer withProduct(String product) { - Utils.checkNotNull(product, "product"); - this.product = product; - return this; - } - - public GetPinAuthPinContainer withTrusted(boolean trusted) { - Utils.checkNotNull(trusted, "trusted"); - this.trusted = Optional.ofNullable(trusted); - return this; - } - - - public GetPinAuthPinContainer withTrusted(Optional trusted) { - Utils.checkNotNull(trusted, "trusted"); - this.trusted = trusted; - return this; - } - - public GetPinAuthPinContainer withQr(String qr) { - Utils.checkNotNull(qr, "qr"); - this.qr = qr; - return this; - } - - /** - * The X-Client-Identifier used in the request - */ - public GetPinAuthPinContainer withClientIdentifier(String clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = clientIdentifier; - return this; - } - - /** - * Geo location data - */ - public GetPinAuthPinContainer withLocation(GeoData location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - public GetPinAuthPinContainer withExpiresIn(long expiresIn) { - Utils.checkNotNull(expiresIn, "expiresIn"); - this.expiresIn = Optional.ofNullable(expiresIn); - return this; - } - - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - public GetPinAuthPinContainer withExpiresIn(Optional expiresIn) { - Utils.checkNotNull(expiresIn, "expiresIn"); - this.expiresIn = expiresIn; - return this; - } - - public GetPinAuthPinContainer withCreatedAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - public GetPinAuthPinContainer withExpiresAt(OffsetDateTime expiresAt) { - Utils.checkNotNull(expiresAt, "expiresAt"); - this.expiresAt = expiresAt; - return this; - } - - public GetPinAuthPinContainer withAuthToken(String authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = JsonNullable.of(authToken); - return this; - } - - public GetPinAuthPinContainer withAuthToken(JsonNullable authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = authToken; - return this; - } - - public GetPinAuthPinContainer withNewRegistration(Object newRegistration) { - Utils.checkNotNull(newRegistration, "newRegistration"); - this.newRegistration = JsonNullable.of(newRegistration); - return this; - } - - public GetPinAuthPinContainer withNewRegistration(JsonNullable newRegistration) { - Utils.checkNotNull(newRegistration, "newRegistration"); - this.newRegistration = newRegistration; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPinAuthPinContainer other = (GetPinAuthPinContainer) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.product, other.product) && - Utils.enhancedDeepEquals(this.trusted, other.trusted) && - Utils.enhancedDeepEquals(this.qr, other.qr) && - Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && - Utils.enhancedDeepEquals(this.location, other.location) && - Utils.enhancedDeepEquals(this.expiresIn, other.expiresIn) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && - Utils.enhancedDeepEquals(this.expiresAt, other.expiresAt) && - Utils.enhancedDeepEquals(this.authToken, other.authToken) && - Utils.enhancedDeepEquals(this.newRegistration, other.newRegistration); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, code, product, - trusted, qr, clientIdentifier, - location, expiresIn, createdAt, - expiresAt, authToken, newRegistration); - } - - @Override - public String toString() { - return Utils.toString(GetPinAuthPinContainer.class, - "id", id, - "code", code, - "product", product, - "trusted", trusted, - "qr", qr, - "clientIdentifier", clientIdentifier, - "location", location, - "expiresIn", expiresIn, - "createdAt", createdAt, - "expiresAt", expiresAt, - "authToken", authToken, - "newRegistration", newRegistration); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String code; - - private String product; - - private Optional trusted; - - private String qr; - - private String clientIdentifier; - - private GeoData location; - - private Optional expiresIn; - - private OffsetDateTime createdAt; - - private OffsetDateTime expiresAt; - - private JsonNullable authToken = JsonNullable.undefined(); - - private JsonNullable newRegistration = JsonNullable.undefined(); - - private Builder() { - // force use of static builder() method - } - - - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - public Builder code(String code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder product(String product) { - Utils.checkNotNull(product, "product"); - this.product = product; - return this; - } - - - public Builder trusted(boolean trusted) { - Utils.checkNotNull(trusted, "trusted"); - this.trusted = Optional.ofNullable(trusted); - return this; - } - - public Builder trusted(Optional trusted) { - Utils.checkNotNull(trusted, "trusted"); - this.trusted = trusted; - return this; - } - - - public Builder qr(String qr) { - Utils.checkNotNull(qr, "qr"); - this.qr = qr; - return this; - } - - - /** - * The X-Client-Identifier used in the request - */ - public Builder clientIdentifier(String clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = clientIdentifier; - return this; - } - - - /** - * Geo location data - */ - public Builder location(GeoData location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - public Builder expiresIn(long expiresIn) { - Utils.checkNotNull(expiresIn, "expiresIn"); - this.expiresIn = Optional.ofNullable(expiresIn); - return this; - } - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - public Builder expiresIn(Optional expiresIn) { - Utils.checkNotNull(expiresIn, "expiresIn"); - this.expiresIn = expiresIn; - return this; - } - - - public Builder createdAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - - public Builder expiresAt(OffsetDateTime expiresAt) { - Utils.checkNotNull(expiresAt, "expiresAt"); - this.expiresAt = expiresAt; - return this; - } - - - public Builder authToken(String authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = JsonNullable.of(authToken); - return this; - } - - public Builder authToken(JsonNullable authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = authToken; - return this; - } - - - public Builder newRegistration(Object newRegistration) { - Utils.checkNotNull(newRegistration, "newRegistration"); - this.newRegistration = JsonNullable.of(newRegistration); - return this; - } - - public Builder newRegistration(JsonNullable newRegistration) { - Utils.checkNotNull(newRegistration, "newRegistration"); - this.newRegistration = newRegistration; - return this; - } - - public GetPinAuthPinContainer build() { - if (trusted == null) { - trusted = _SINGLETON_VALUE_Trusted.value(); - } - if (expiresIn == null) { - expiresIn = _SINGLETON_VALUE_ExpiresIn.value(); - } - - return new GetPinAuthPinContainer( - id, code, product, - trusted, qr, clientIdentifier, - location, expiresIn, createdAt, - expiresAt, authToken, newRegistration); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_Trusted = - new LazySingletonValue<>( - "trusted", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_ExpiresIn = - new LazySingletonValue<>( - "expiresIn", - "900", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java deleted file mode 100644 index a6b8777f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java +++ /dev/null @@ -1,429 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPinRequest { - /** - * 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` - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=strong") - private Optional strong; - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") - private String clientID; - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") - private Optional clientName; - - /** - * A relatively friendly name for the client device - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") - private Optional deviceNickname; - - /** - * The version of the client application. - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") - private Optional clientVersion; - - /** - * The platform of the client application. - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") - private Optional platform; - - @JsonCreator - public GetPinRequest( - Optional strong, - String clientID, - Optional clientName, - Optional deviceNickname, - Optional clientVersion, - Optional platform) { - Utils.checkNotNull(strong, "strong"); - Utils.checkNotNull(clientID, "clientID"); - Utils.checkNotNull(clientName, "clientName"); - Utils.checkNotNull(deviceNickname, "deviceNickname"); - Utils.checkNotNull(clientVersion, "clientVersion"); - Utils.checkNotNull(platform, "platform"); - this.strong = strong; - this.clientID = clientID; - this.clientName = clientName; - this.deviceNickname = deviceNickname; - this.clientVersion = clientVersion; - this.platform = platform; - } - - public GetPinRequest( - String clientID) { - this(Optional.empty(), clientID, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - /** - * 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` - */ - @JsonIgnore - public Optional strong() { - return strong; - } - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @JsonIgnore - public String clientID() { - return clientID; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - @JsonIgnore - public Optional clientName() { - return clientName; - } - - /** - * A relatively friendly name for the client device - */ - @JsonIgnore - public Optional deviceNickname() { - return deviceNickname; - } - - /** - * The version of the client application. - */ - @JsonIgnore - public Optional clientVersion() { - return clientVersion; - } - - /** - * The platform of the client application. - */ - @JsonIgnore - public Optional platform() { - return platform; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Determines the kind of code returned by the API call - * Strong codes are used for Pin authentication flows - * Non-Strong codes are used for `Plex.tv/link` - */ - public GetPinRequest withStrong(boolean strong) { - Utils.checkNotNull(strong, "strong"); - this.strong = Optional.ofNullable(strong); - return this; - } - - - /** - * Determines the kind of code returned by the API call - * Strong codes are used for Pin authentication flows - * Non-Strong codes are used for `Plex.tv/link` - */ - public GetPinRequest withStrong(Optional strong) { - Utils.checkNotNull(strong, "strong"); - this.strong = strong; - return this; - } - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public GetPinRequest withClientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public GetPinRequest withClientName(String clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = Optional.ofNullable(clientName); - return this; - } - - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public GetPinRequest withClientName(Optional clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = clientName; - return this; - } - - /** - * A relatively friendly name for the client device - */ - public GetPinRequest withDeviceNickname(String deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = Optional.ofNullable(deviceNickname); - return this; - } - - - /** - * A relatively friendly name for the client device - */ - public GetPinRequest withDeviceNickname(Optional deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = deviceNickname; - return this; - } - - /** - * The version of the client application. - */ - public GetPinRequest withClientVersion(String clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = Optional.ofNullable(clientVersion); - return this; - } - - - /** - * The version of the client application. - */ - public GetPinRequest withClientVersion(Optional clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = clientVersion; - return this; - } - - /** - * The platform of the client application. - */ - public GetPinRequest withPlatform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - - /** - * The platform of the client application. - */ - public GetPinRequest withPlatform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPinRequest other = (GetPinRequest) o; - return - Utils.enhancedDeepEquals(this.strong, other.strong) && - Utils.enhancedDeepEquals(this.clientID, other.clientID) && - Utils.enhancedDeepEquals(this.clientName, other.clientName) && - Utils.enhancedDeepEquals(this.deviceNickname, other.deviceNickname) && - Utils.enhancedDeepEquals(this.clientVersion, other.clientVersion) && - Utils.enhancedDeepEquals(this.platform, other.platform); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - strong, clientID, clientName, - deviceNickname, clientVersion, platform); - } - - @Override - public String toString() { - return Utils.toString(GetPinRequest.class, - "strong", strong, - "clientID", clientID, - "clientName", clientName, - "deviceNickname", deviceNickname, - "clientVersion", clientVersion, - "platform", platform); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional strong; - - private String clientID; - - private Optional clientName = Optional.empty(); - - private Optional deviceNickname = Optional.empty(); - - private Optional clientVersion = Optional.empty(); - - private Optional platform = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Determines the kind of code returned by the API call - * Strong codes are used for Pin authentication flows - * Non-Strong codes are used for `Plex.tv/link` - */ - public Builder strong(boolean strong) { - Utils.checkNotNull(strong, "strong"); - this.strong = Optional.ofNullable(strong); - return this; - } - - /** - * Determines the kind of code returned by the API call - * Strong codes are used for Pin authentication flows - * Non-Strong codes are used for `Plex.tv/link` - */ - public Builder strong(Optional strong) { - Utils.checkNotNull(strong, "strong"); - this.strong = strong; - return this; - } - - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public Builder clientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public Builder clientName(String clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = Optional.ofNullable(clientName); - return this; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public Builder clientName(Optional clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = clientName; - return this; - } - - - /** - * A relatively friendly name for the client device - */ - public Builder deviceNickname(String deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = Optional.ofNullable(deviceNickname); - return this; - } - - /** - * A relatively friendly name for the client device - */ - public Builder deviceNickname(Optional deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = deviceNickname; - return this; - } - - - /** - * The version of the client application. - */ - public Builder clientVersion(String clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = Optional.ofNullable(clientVersion); - return this; - } - - /** - * The version of the client application. - */ - public Builder clientVersion(Optional clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = clientVersion; - return this; - } - - - /** - * The platform of the client application. - */ - public Builder platform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - /** - * The platform of the client application. - */ - public Builder platform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - public GetPinRequest build() { - if (strong == null) { - strong = _SINGLETON_VALUE_Strong.value(); - } - - return new GetPinRequest( - strong, clientID, clientName, - deviceNickname, clientVersion, platform); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_Strong = - new LazySingletonValue<>( - "strong", - "false", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequestBuilder.java deleted file mode 100644 index 7fdc0573..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequestBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetPin; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetPinRequestBuilder { - - private GetPinRequest request; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetPinRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetPinRequestBuilder request(GetPinRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetPinRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetPinRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public GetPinResponse call() throws Exception { - - RequestOperation operation - = new GetPin.Sync(sdkConfiguration, serverURL); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPinResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPinResponse.java deleted file mode 100644 index 3dde0a90..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPinResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetPinResponse 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; - - /** - * Requests a new pin id used in the authentication flow - */ - private Optional authPinContainer; - - @JsonCreator - public GetPinResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional authPinContainer) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.authPinContainer = authPinContainer; - } - - public GetPinResponse( - 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; - } - - /** - * Requests a new pin id used in the authentication flow - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional authPinContainer() { - return (Optional) authPinContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetPinResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetPinResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPinResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Requests a new pin id used in the authentication flow - */ - public GetPinResponse withAuthPinContainer(GetPinAuthPinContainer authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = Optional.ofNullable(authPinContainer); - return this; - } - - - /** - * Requests a new pin id used in the authentication flow - */ - public GetPinResponse withAuthPinContainer(Optional authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = authPinContainer; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPinResponse other = (GetPinResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.authPinContainer, other.authPinContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - authPinContainer); - } - - @Override - public String toString() { - return Utils.toString(GetPinResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "authPinContainer", authPinContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional authPinContainer = 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; - } - - - /** - * Requests a new pin id used in the authentication flow - */ - public Builder authPinContainer(GetPinAuthPinContainer authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = Optional.ofNullable(authPinContainer); - return this; - } - - /** - * Requests a new pin id used in the authentication flow - */ - public Builder authPinContainer(Optional authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = authPinContainer; - return this; - } - - public GetPinResponse build() { - - return new GetPinResponse( - contentType, statusCode, rawResponse, - authPinContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueRequest.java new file mode 100644 index 00000000..482587b5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueRequest.java @@ -0,0 +1,1085 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetPlayQueueRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the play queue. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playQueueId") + private long playQueueId; + + /** + * If the server should transfer ownership to the requesting client (used in remote control scenarios). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=own") + private Optional own; + + /** + * The play queue item ID for the center of the window - this doesn't change the current selected item. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=center") + private Optional center; + + /** + * How many items on each side of the center of the window + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=window") + private Optional window; + + /** + * Whether to include the items before the center (if 0, center is not included either), defaults to 1. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeBefore") + private Optional includeBefore; + + /** + * Whether to include the items after the center (if 0, center is not included either), defaults to 1. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeAfter") + private Optional includeAfter; + + @JsonCreator + public GetPlayQueueRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playQueueId, + Optional own, + Optional center, + Optional window, + Optional includeBefore, + Optional includeAfter) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playQueueId, "playQueueId"); + Utils.checkNotNull(own, "own"); + Utils.checkNotNull(center, "center"); + Utils.checkNotNull(window, "window"); + Utils.checkNotNull(includeBefore, "includeBefore"); + Utils.checkNotNull(includeAfter, "includeAfter"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playQueueId = playQueueId; + this.own = own; + this.center = center; + this.window = window; + this.includeBefore = includeBefore; + this.includeAfter = includeAfter; + } + + public GetPlayQueueRequest( + long playQueueId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playQueueId, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the play queue. + */ + @JsonIgnore + public long playQueueId() { + return playQueueId; + } + + /** + * If the server should transfer ownership to the requesting client (used in remote control scenarios). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional own() { + return (Optional) own; + } + + /** + * The play queue item ID for the center of the window - this doesn't change the current selected item. + */ + @JsonIgnore + public Optional center() { + return center; + } + + /** + * How many items on each side of the center of the window + */ + @JsonIgnore + public Optional window() { + return window; + } + + /** + * Whether to include the items before the center (if 0, center is not included either), defaults to 1. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeBefore() { + return (Optional) includeBefore; + } + + /** + * Whether to include the items after the center (if 0, center is not included either), defaults to 1. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeAfter() { + return (Optional) includeAfter; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlayQueueRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlayQueueRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPlayQueueRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPlayQueueRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPlayQueueRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPlayQueueRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPlayQueueRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPlayQueueRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPlayQueueRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPlayQueueRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPlayQueueRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPlayQueueRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPlayQueueRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPlayQueueRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlayQueueRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlayQueueRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPlayQueueRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPlayQueueRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPlayQueueRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPlayQueueRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPlayQueueRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPlayQueueRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the play queue. + */ + public GetPlayQueueRequest withPlayQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + /** + * If the server should transfer ownership to the requesting client (used in remote control scenarios). + */ + public GetPlayQueueRequest withOwn(BoolInt own) { + Utils.checkNotNull(own, "own"); + this.own = Optional.ofNullable(own); + return this; + } + + + /** + * If the server should transfer ownership to the requesting client (used in remote control scenarios). + */ + public GetPlayQueueRequest withOwn(Optional own) { + Utils.checkNotNull(own, "own"); + this.own = own; + return this; + } + + /** + * The play queue item ID for the center of the window - this doesn't change the current selected item. + */ + public GetPlayQueueRequest withCenter(String center) { + Utils.checkNotNull(center, "center"); + this.center = Optional.ofNullable(center); + return this; + } + + + /** + * The play queue item ID for the center of the window - this doesn't change the current selected item. + */ + public GetPlayQueueRequest withCenter(Optional center) { + Utils.checkNotNull(center, "center"); + this.center = center; + return this; + } + + /** + * How many items on each side of the center of the window + */ + public GetPlayQueueRequest withWindow(long window) { + Utils.checkNotNull(window, "window"); + this.window = Optional.ofNullable(window); + return this; + } + + + /** + * How many items on each side of the center of the window + */ + public GetPlayQueueRequest withWindow(Optional window) { + Utils.checkNotNull(window, "window"); + this.window = window; + return this; + } + + /** + * Whether to include the items before the center (if 0, center is not included either), defaults to 1. + */ + public GetPlayQueueRequest withIncludeBefore(BoolInt includeBefore) { + Utils.checkNotNull(includeBefore, "includeBefore"); + this.includeBefore = Optional.ofNullable(includeBefore); + return this; + } + + + /** + * Whether to include the items before the center (if 0, center is not included either), defaults to 1. + */ + public GetPlayQueueRequest withIncludeBefore(Optional includeBefore) { + Utils.checkNotNull(includeBefore, "includeBefore"); + this.includeBefore = includeBefore; + return this; + } + + /** + * Whether to include the items after the center (if 0, center is not included either), defaults to 1. + */ + public GetPlayQueueRequest withIncludeAfter(BoolInt includeAfter) { + Utils.checkNotNull(includeAfter, "includeAfter"); + this.includeAfter = Optional.ofNullable(includeAfter); + return this; + } + + + /** + * Whether to include the items after the center (if 0, center is not included either), defaults to 1. + */ + public GetPlayQueueRequest withIncludeAfter(Optional includeAfter) { + Utils.checkNotNull(includeAfter, "includeAfter"); + this.includeAfter = includeAfter; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlayQueueRequest other = (GetPlayQueueRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playQueueId, other.playQueueId) && + Utils.enhancedDeepEquals(this.own, other.own) && + Utils.enhancedDeepEquals(this.center, other.center) && + Utils.enhancedDeepEquals(this.window, other.window) && + Utils.enhancedDeepEquals(this.includeBefore, other.includeBefore) && + Utils.enhancedDeepEquals(this.includeAfter, other.includeAfter); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId, + own, center, window, + includeBefore, includeAfter); + } + + @Override + public String toString() { + return Utils.toString(GetPlayQueueRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playQueueId", playQueueId, + "own", own, + "center", center, + "window", window, + "includeBefore", includeBefore, + "includeAfter", includeAfter); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playQueueId; + + private Optional own = Optional.empty(); + + private Optional center = Optional.empty(); + + private Optional window = Optional.empty(); + + private Optional includeBefore = Optional.empty(); + + private Optional includeAfter = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the play queue. + */ + public Builder playQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + + /** + * If the server should transfer ownership to the requesting client (used in remote control scenarios). + */ + public Builder own(BoolInt own) { + Utils.checkNotNull(own, "own"); + this.own = Optional.ofNullable(own); + return this; + } + + /** + * If the server should transfer ownership to the requesting client (used in remote control scenarios). + */ + public Builder own(Optional own) { + Utils.checkNotNull(own, "own"); + this.own = own; + return this; + } + + + /** + * The play queue item ID for the center of the window - this doesn't change the current selected item. + */ + public Builder center(String center) { + Utils.checkNotNull(center, "center"); + this.center = Optional.ofNullable(center); + return this; + } + + /** + * The play queue item ID for the center of the window - this doesn't change the current selected item. + */ + public Builder center(Optional center) { + Utils.checkNotNull(center, "center"); + this.center = center; + return this; + } + + + /** + * How many items on each side of the center of the window + */ + public Builder window(long window) { + Utils.checkNotNull(window, "window"); + this.window = Optional.ofNullable(window); + return this; + } + + /** + * How many items on each side of the center of the window + */ + public Builder window(Optional window) { + Utils.checkNotNull(window, "window"); + this.window = window; + return this; + } + + + /** + * Whether to include the items before the center (if 0, center is not included either), defaults to 1. + */ + public Builder includeBefore(BoolInt includeBefore) { + Utils.checkNotNull(includeBefore, "includeBefore"); + this.includeBefore = Optional.ofNullable(includeBefore); + return this; + } + + /** + * Whether to include the items before the center (if 0, center is not included either), defaults to 1. + */ + public Builder includeBefore(Optional includeBefore) { + Utils.checkNotNull(includeBefore, "includeBefore"); + this.includeBefore = includeBefore; + return this; + } + + + /** + * Whether to include the items after the center (if 0, center is not included either), defaults to 1. + */ + public Builder includeAfter(BoolInt includeAfter) { + Utils.checkNotNull(includeAfter, "includeAfter"); + this.includeAfter = Optional.ofNullable(includeAfter); + return this; + } + + /** + * Whether to include the items after the center (if 0, center is not included either), defaults to 1. + */ + public Builder includeAfter(Optional includeAfter) { + Utils.checkNotNull(includeAfter, "includeAfter"); + this.includeAfter = includeAfter; + return this; + } + + public GetPlayQueueRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetPlayQueueRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId, + own, center, window, + includeBefore, includeAfter); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueRequestBuilder.java new file mode 100644 index 00000000..8ac9b585 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetPlayQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetPlayQueueRequestBuilder { + + private GetPlayQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPlayQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPlayQueueRequestBuilder request(GetPlayQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPlayQueueResponse call() throws Exception { + + RequestOperation operation + = new GetPlayQueue.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueResponse.java new file mode 100644 index 00000000..2a4bf19d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlayQueueResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class GetPlayQueueResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public GetPlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public GetPlayQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPlayQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlayQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlayQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPlayQueueResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public GetPlayQueueResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlayQueueResponse other = (GetPlayQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetPlayQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public GetPlayQueueResponse build() { + + return new GetPlayQueueResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsCountry.java deleted file mode 100644 index 4e9ce96b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsCountry.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistContentsCountry { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetPlaylistContentsCountry( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetPlaylistContentsCountry() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsCountry withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetPlaylistContentsCountry 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; - } - GetPlaylistContentsCountry other = (GetPlaylistContentsCountry) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsCountry.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetPlaylistContentsCountry build() { - - return new GetPlaylistContentsCountry( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsDirector.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsDirector.java deleted file mode 100644 index 7fbe8f0f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsDirector.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistContentsDirector { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetPlaylistContentsDirector( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetPlaylistContentsDirector() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsDirector withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetPlaylistContentsDirector 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; - } - GetPlaylistContentsDirector other = (GetPlaylistContentsDirector) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsDirector.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetPlaylistContentsDirector build() { - - return new GetPlaylistContentsDirector( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsGenre.java deleted file mode 100644 index 293c7aad..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsGenre.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistContentsGenre { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetPlaylistContentsGenre( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetPlaylistContentsGenre() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsGenre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetPlaylistContentsGenre 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; - } - GetPlaylistContentsGenre other = (GetPlaylistContentsGenre) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsGenre.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetPlaylistContentsGenre build() { - - return new GetPlaylistContentsGenre( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMedia.java deleted file mode 100644 index fc0c445c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMedia.java +++ /dev/null @@ -1,820 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetPlaylistContentsMedia { - - @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("audioProfile") - private Optional audioProfile; - - - @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 GetPlaylistContentsMedia( - @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("audioProfile") Optional audioProfile, - @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(audioProfile, "audioProfile"); - 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.audioProfile = audioProfile; - this.has64bitOffsets = has64bitOffsets; - this.videoProfile = videoProfile; - this.part = part; - } - - public GetPlaylistContentsMedia() { - 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()); - } - - @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 audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> part() { - return (Optional>) part; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsMedia withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetPlaylistContentsMedia withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetPlaylistContentsMedia withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetPlaylistContentsMedia withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetPlaylistContentsMedia withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - public GetPlaylistContentsMedia withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - public GetPlaylistContentsMedia withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - public GetPlaylistContentsMedia withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - public GetPlaylistContentsMedia withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - public GetPlaylistContentsMedia withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - public GetPlaylistContentsMedia withAspectRatio(double aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - - public GetPlaylistContentsMedia withAspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - public GetPlaylistContentsMedia withAudioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - - public GetPlaylistContentsMedia withAudioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - public GetPlaylistContentsMedia withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - - public GetPlaylistContentsMedia withAudioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - public GetPlaylistContentsMedia withVideoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - - public GetPlaylistContentsMedia withVideoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - public GetPlaylistContentsMedia withVideoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - - public GetPlaylistContentsMedia withVideoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - public GetPlaylistContentsMedia withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - public GetPlaylistContentsMedia withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - public GetPlaylistContentsMedia withVideoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - - public GetPlaylistContentsMedia withVideoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - public GetPlaylistContentsMedia withOptimizedForStreaming(int optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - public GetPlaylistContentsMedia withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - public GetPlaylistContentsMedia withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - public GetPlaylistContentsMedia withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - public GetPlaylistContentsMedia withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - public GetPlaylistContentsMedia withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - public GetPlaylistContentsMedia withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - public GetPlaylistContentsMedia withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - public GetPlaylistContentsMedia withPart(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - - public GetPlaylistContentsMedia 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; - } - GetPlaylistContentsMedia other = (GetPlaylistContentsMedia) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && - Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.part, other.part); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, audioCodec, videoCodec, - videoResolution, container, videoFrameRate, - optimizedForStreaming, audioProfile, has64bitOffsets, - videoProfile, part); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsMedia.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, - "audioProfile", audioProfile, - "has64bitOffsets", has64bitOffsets, - "videoProfile", videoProfile, - "part", part); - } - - @SuppressWarnings("UnusedReturnValue") - 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 audioProfile = 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(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 duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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 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 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 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(int 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(String 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(int 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 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; - } - - - 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 GetPlaylistContentsMedia build() { - - return new GetPlaylistContentsMedia( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, audioCodec, videoCodec, - videoResolution, container, videoFrameRate, - optimizedForStreaming, audioProfile, has64bitOffsets, - videoProfile, part); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMediaContainer.java deleted file mode 100644 index 1863f1bd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMediaContainer.java +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetPlaylistContentsMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("composite") - private Optional composite; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("playlistType") - private Optional playlistType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingKey") - private Optional ratingKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("smart") - private Optional smart; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetPlaylistContentsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("composite") Optional composite, - @JsonProperty("duration") Optional duration, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("playlistType") Optional playlistType, - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("smart") Optional smart, - @JsonProperty("title") Optional title, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(composite, "composite"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(playlistType, "playlistType"); - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(smart, "smart"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.composite = composite; - this.duration = duration; - this.leafCount = leafCount; - this.playlistType = playlistType; - this.ratingKey = ratingKey; - this.smart = smart; - this.title = title; - this.metadata = metadata; - } - - public GetPlaylistContentsMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional composite() { - return composite; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional playlistType() { - return playlistType; - } - - @JsonIgnore - public Optional ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional smart() { - return smart; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetPlaylistContentsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetPlaylistContentsMediaContainer withComposite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - - public GetPlaylistContentsMediaContainer withComposite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - public GetPlaylistContentsMediaContainer withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetPlaylistContentsMediaContainer withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetPlaylistContentsMediaContainer withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - public GetPlaylistContentsMediaContainer withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public GetPlaylistContentsMediaContainer withPlaylistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - - public GetPlaylistContentsMediaContainer withPlaylistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - public GetPlaylistContentsMediaContainer withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetPlaylistContentsMediaContainer withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetPlaylistContentsMediaContainer withSmart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - - public GetPlaylistContentsMediaContainer withSmart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - public GetPlaylistContentsMediaContainer withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetPlaylistContentsMediaContainer withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetPlaylistContentsMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetPlaylistContentsMediaContainer 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; - } - GetPlaylistContentsMediaContainer other = (GetPlaylistContentsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.composite, other.composite) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.playlistType, other.playlistType) && - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.smart, other.smart) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, composite, duration, - leafCount, playlistType, ratingKey, - smart, title, metadata); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsMediaContainer.class, - "size", size, - "composite", composite, - "duration", duration, - "leafCount", leafCount, - "playlistType", playlistType, - "ratingKey", ratingKey, - "smart", smart, - "title", title, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional composite = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional leafCount = Optional.empty(); - - private Optional playlistType = Optional.empty(); - - private Optional ratingKey = Optional.empty(); - - private Optional smart = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 composite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - public Builder composite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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 playlistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - public Builder playlistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - - public Builder ratingKey(String 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 smart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - public Builder smart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - 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 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 GetPlaylistContentsMediaContainer build() { - - return new GetPlaylistContentsMediaContainer( - size, composite, duration, - leafCount, playlistType, ratingKey, - smart, title, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMetadata.java deleted file mode 100644 index df4b4fa9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsMetadata.java +++ /dev/null @@ -1,1485 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.LocalDate; -import java.util.List; -import java.util.Optional; - - -public class GetPlaylistContentsMetadata { - - @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("titleSort") - private Optional titleSort; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionKey") - private Optional librarySectionKey; - - - @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("hasPremiumExtras") - private Optional hasPremiumExtras; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasPremiumPrimaryExtra") - private Optional hasPremiumPrimaryExtra; - - - @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("Country") - private Optional> country; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Director") - private Optional> director; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Writer") - private Optional> writer; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Role") - private Optional> role; - - @JsonCreator - public GetPlaylistContentsMetadata( - @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("titleSort") Optional titleSort, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionKey") Optional librarySectionKey, - @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("hasPremiumExtras") Optional hasPremiumExtras, - @JsonProperty("hasPremiumPrimaryExtra") Optional hasPremiumPrimaryExtra, - @JsonProperty("ratingImage") Optional ratingImage, - @JsonProperty("Media") Optional> media, - @JsonProperty("Genre") Optional> genre, - @JsonProperty("Country") Optional> country, - @JsonProperty("Director") Optional> director, - @JsonProperty("Writer") Optional> writer, - @JsonProperty("Role") Optional> role) { - 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(titleSort, "titleSort"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - 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(hasPremiumExtras, "hasPremiumExtras"); - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - Utils.checkNotNull(ratingImage, "ratingImage"); - Utils.checkNotNull(media, "media"); - Utils.checkNotNull(genre, "genre"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(director, "director"); - Utils.checkNotNull(writer, "writer"); - Utils.checkNotNull(role, "role"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.studio = studio; - this.type = type; - this.title = title; - this.titleSort = titleSort; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionID = librarySectionID; - this.librarySectionKey = librarySectionKey; - 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.hasPremiumExtras = hasPremiumExtras; - this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; - this.ratingImage = ratingImage; - this.media = media; - this.genre = genre; - this.country = country; - this.director = director; - this.writer = writer; - this.role = role; - } - - public GetPlaylistContentsMetadata() { - 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 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 titleSort() { - return titleSort; - } - - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional librarySectionKey() { - return librarySectionKey; - } - - @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 hasPremiumExtras() { - return hasPremiumExtras; - } - - @JsonIgnore - public Optional hasPremiumPrimaryExtra() { - return hasPremiumPrimaryExtra; - } - - @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> country() { - return (Optional>) country; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> director() { - return (Optional>) director; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> writer() { - return (Optional>) writer; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> role() { - return (Optional>) role; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetPlaylistContentsMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetPlaylistContentsMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetPlaylistContentsMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetPlaylistContentsMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public GetPlaylistContentsMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public GetPlaylistContentsMetadata withStudio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - - public GetPlaylistContentsMetadata withStudio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - public GetPlaylistContentsMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetPlaylistContentsMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetPlaylistContentsMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetPlaylistContentsMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetPlaylistContentsMetadata withTitleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = Optional.ofNullable(titleSort); - return this; - } - - - public GetPlaylistContentsMetadata withTitleSort(Optional titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - public GetPlaylistContentsMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - public GetPlaylistContentsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetPlaylistContentsMetadata withLibrarySectionID(int librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - public GetPlaylistContentsMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetPlaylistContentsMetadata withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - - public GetPlaylistContentsMetadata withLibrarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - public GetPlaylistContentsMetadata withContentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - - public GetPlaylistContentsMetadata withContentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - public GetPlaylistContentsMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public GetPlaylistContentsMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public GetPlaylistContentsMetadata withRating(double rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = Optional.ofNullable(rating); - return this; - } - - - public GetPlaylistContentsMetadata withRating(Optional rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - public GetPlaylistContentsMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = Optional.ofNullable(audienceRating); - return this; - } - - - public GetPlaylistContentsMetadata withAudienceRating(Optional audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - public GetPlaylistContentsMetadata withYear(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - - public GetPlaylistContentsMetadata withYear(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - public GetPlaylistContentsMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = Optional.ofNullable(tagline); - return this; - } - - - public GetPlaylistContentsMetadata withTagline(Optional tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - public GetPlaylistContentsMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetPlaylistContentsMetadata withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetPlaylistContentsMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - - public GetPlaylistContentsMetadata withArt(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - public GetPlaylistContentsMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetPlaylistContentsMetadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetPlaylistContentsMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - - public GetPlaylistContentsMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - public GetPlaylistContentsMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public GetPlaylistContentsMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public GetPlaylistContentsMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetPlaylistContentsMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - public GetPlaylistContentsMetadata withAudienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - - public GetPlaylistContentsMetadata withAudienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - public GetPlaylistContentsMetadata withHasPremiumExtras(String hasPremiumExtras) { - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras); - return this; - } - - - public GetPlaylistContentsMetadata withHasPremiumExtras(Optional hasPremiumExtras) { - Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); - this.hasPremiumExtras = hasPremiumExtras; - return this; - } - - public GetPlaylistContentsMetadata withHasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); - return this; - } - - - public GetPlaylistContentsMetadata withHasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { - Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); - this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; - return this; - } - - public GetPlaylistContentsMetadata withRatingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - - public GetPlaylistContentsMetadata withRatingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - public GetPlaylistContentsMetadata withMedia(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - - public GetPlaylistContentsMetadata withMedia(Optional> media) { - Utils.checkNotNull(media, "media"); - this.media = media; - return this; - } - - public GetPlaylistContentsMetadata withGenre(List genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = Optional.ofNullable(genre); - return this; - } - - - public GetPlaylistContentsMetadata withGenre(Optional> genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = genre; - return this; - } - - public GetPlaylistContentsMetadata withCountry(List country) { - Utils.checkNotNull(country, "country"); - this.country = Optional.ofNullable(country); - return this; - } - - - public GetPlaylistContentsMetadata withCountry(Optional> country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - public GetPlaylistContentsMetadata withDirector(List director) { - Utils.checkNotNull(director, "director"); - this.director = Optional.ofNullable(director); - return this; - } - - - public GetPlaylistContentsMetadata withDirector(Optional> director) { - Utils.checkNotNull(director, "director"); - this.director = director; - return this; - } - - public GetPlaylistContentsMetadata withWriter(List writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = Optional.ofNullable(writer); - return this; - } - - - public GetPlaylistContentsMetadata withWriter(Optional> writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = writer; - return this; - } - - public GetPlaylistContentsMetadata withRole(List role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - public GetPlaylistContentsMetadata 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; - } - GetPlaylistContentsMetadata other = (GetPlaylistContentsMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionKey, other.librarySectionKey) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.rating, other.rating) && - Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.hasPremiumExtras, other.hasPremiumExtras) && - Utils.enhancedDeepEquals(this.hasPremiumPrimaryExtra, other.hasPremiumPrimaryExtra) && - Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && - Utils.enhancedDeepEquals(this.media, other.media) && - Utils.enhancedDeepEquals(this.genre, other.genre) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.director, other.director) && - Utils.enhancedDeepEquals(this.writer, other.writer) && - Utils.enhancedDeepEquals(this.role, other.role); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - studio, type, title, - titleSort, librarySectionTitle, librarySectionID, - librarySectionKey, contentRating, summary, - rating, audienceRating, year, - tagline, thumb, art, - duration, originallyAvailableAt, addedAt, - updatedAt, audienceRatingImage, hasPremiumExtras, - hasPremiumPrimaryExtra, ratingImage, media, - genre, country, director, - writer, role); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "studio", studio, - "type", type, - "title", title, - "titleSort", titleSort, - "librarySectionTitle", librarySectionTitle, - "librarySectionID", librarySectionID, - "librarySectionKey", librarySectionKey, - "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, - "hasPremiumExtras", hasPremiumExtras, - "hasPremiumPrimaryExtra", hasPremiumPrimaryExtra, - "ratingImage", ratingImage, - "media", media, - "genre", genre, - "country", country, - "director", director, - "writer", writer, - "role", role); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - 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 titleSort = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionKey = 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 hasPremiumExtras = Optional.empty(); - - private Optional hasPremiumPrimaryExtra = Optional.empty(); - - private Optional ratingImage = 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> role = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder ratingKey(String 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 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 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 librarySectionID(int 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 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; - } - - - 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(int 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(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - public Builder originallyAvailableAt(LocalDate 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(int 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(int 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 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; - } - - - 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 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); - 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 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 GetPlaylistContentsMetadata build() { - - return new GetPlaylistContentsMetadata( - ratingKey, key, guid, - studio, type, title, - titleSort, librarySectionTitle, librarySectionID, - librarySectionKey, contentRating, summary, - rating, audienceRating, year, - tagline, thumb, art, - duration, originallyAvailableAt, addedAt, - updatedAt, audienceRatingImage, hasPremiumExtras, - hasPremiumPrimaryExtra, ratingImage, media, - genre, country, director, - writer, role); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsPart.java deleted file mode 100644 index 0317155b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsPart.java +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistContentsPart { - - @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("audioProfile") - private Optional audioProfile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - @JsonCreator - public GetPlaylistContentsPart( - @JsonProperty("id") Optional id, - @JsonProperty("key") Optional key, - @JsonProperty("duration") Optional duration, - @JsonProperty("file") Optional file, - @JsonProperty("size") Optional size, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("container") Optional container, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @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(audioProfile, "audioProfile"); - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(videoProfile, "videoProfile"); - this.id = id; - this.key = key; - this.duration = duration; - this.file = file; - this.size = size; - this.audioProfile = audioProfile; - this.container = container; - this.has64bitOffsets = has64bitOffsets; - this.optimizedForStreaming = optimizedForStreaming; - this.videoProfile = videoProfile; - } - - public GetPlaylistContentsPart() { - 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 audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional container() { - return container; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - @JsonIgnore - public Optional optimizedForStreaming() { - return optimizedForStreaming; - } - - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsPart withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetPlaylistContentsPart withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetPlaylistContentsPart withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetPlaylistContentsPart withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetPlaylistContentsPart withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetPlaylistContentsPart withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetPlaylistContentsPart withFile(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - - public GetPlaylistContentsPart withFile(Optional file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - public GetPlaylistContentsPart withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetPlaylistContentsPart withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetPlaylistContentsPart withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - public GetPlaylistContentsPart withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - public GetPlaylistContentsPart withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - public GetPlaylistContentsPart withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - public GetPlaylistContentsPart withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - public GetPlaylistContentsPart withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - public GetPlaylistContentsPart withOptimizedForStreaming(boolean optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - public GetPlaylistContentsPart withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - public GetPlaylistContentsPart withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - public GetPlaylistContentsPart 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; - } - GetPlaylistContentsPart other = (GetPlaylistContentsPart) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.file, other.file) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, key, duration, - file, size, audioProfile, - container, has64bitOffsets, optimizedForStreaming, - videoProfile); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsPart.class, - "id", id, - "key", key, - "duration", duration, - "file", file, - "size", size, - "audioProfile", audioProfile, - "container", container, - "has64bitOffsets", has64bitOffsets, - "optimizedForStreaming", optimizedForStreaming, - "videoProfile", videoProfile); - } - - @SuppressWarnings("UnusedReturnValue") - 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 audioProfile = Optional.empty(); - - private Optional container = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional videoProfile = 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 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(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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(int 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 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; - } - - - 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 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 GetPlaylistContentsPart build() { - - return new GetPlaylistContentsPart( - id, key, duration, - file, size, audioProfile, - container, has64bitOffsets, optimizedForStreaming, - videoProfile); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsQueryParamType.java deleted file mode 100644 index f0a63707..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsQueryParamType.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ -@JsonDeserialize(using = GetPlaylistContentsQueryParamType._Deserializer.class) -@JsonSerialize(using = GetPlaylistContentsQueryParamType._Serializer.class) -public class GetPlaylistContentsQueryParamType { - - public static final GetPlaylistContentsQueryParamType Movie = new GetPlaylistContentsQueryParamType(1L); - public static final GetPlaylistContentsQueryParamType TvShow = new GetPlaylistContentsQueryParamType(2L); - public static final GetPlaylistContentsQueryParamType Season = new GetPlaylistContentsQueryParamType(3L); - public static final GetPlaylistContentsQueryParamType Episode = new GetPlaylistContentsQueryParamType(4L); - public static final GetPlaylistContentsQueryParamType Artist = new GetPlaylistContentsQueryParamType(5L); - public static final GetPlaylistContentsQueryParamType Album = new GetPlaylistContentsQueryParamType(6L); - public static final GetPlaylistContentsQueryParamType Track = new GetPlaylistContentsQueryParamType(7L); - public static final GetPlaylistContentsQueryParamType PhotoAlbum = new GetPlaylistContentsQueryParamType(8L); - public static final GetPlaylistContentsQueryParamType Photo = new GetPlaylistContentsQueryParamType(9L); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final long value; - - private GetPlaylistContentsQueryParamType(long value) { - this.value = value; - } - - /** - * Returns a GetPlaylistContentsQueryParamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetPlaylistContentsQueryParamType - */ - public static GetPlaylistContentsQueryParamType of(long value) { - synchronized (GetPlaylistContentsQueryParamType.class) { - return values.computeIfAbsent(value, v -> new GetPlaylistContentsQueryParamType(v)); - } - } - - public long value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetPlaylistContentsQueryParamType other = (GetPlaylistContentsQueryParamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetPlaylistContentsQueryParamType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetPlaylistContentsQueryParamType[] values() { - synchronized (GetPlaylistContentsQueryParamType.class) { - return values.values().toArray(new GetPlaylistContentsQueryParamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1L, Movie); - map.put(2L, TvShow); - map.put(3L, Season); - map.put(4L, Episode); - map.put(5L, Artist); - map.put(6L, Album); - map.put(7L, Track); - map.put(8L, PhotoAlbum); - map.put(9L, Photo); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1L, GetPlaylistContentsQueryParamTypeEnum.Movie); - map.put(2L, GetPlaylistContentsQueryParamTypeEnum.TvShow); - map.put(3L, GetPlaylistContentsQueryParamTypeEnum.Season); - map.put(4L, GetPlaylistContentsQueryParamTypeEnum.Episode); - map.put(5L, GetPlaylistContentsQueryParamTypeEnum.Artist); - map.put(6L, GetPlaylistContentsQueryParamTypeEnum.Album); - map.put(7L, GetPlaylistContentsQueryParamTypeEnum.Track); - map.put(8L, GetPlaylistContentsQueryParamTypeEnum.PhotoAlbum); - map.put(9L, GetPlaylistContentsQueryParamTypeEnum.Photo); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetPlaylistContentsQueryParamType.class); - } - - @Override - public void serialize(GetPlaylistContentsQueryParamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetPlaylistContentsQueryParamType.class); - } - - @Override - public GetPlaylistContentsQueryParamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - long v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetPlaylistContentsQueryParamType.of(v); - } - } - - public enum GetPlaylistContentsQueryParamTypeEnum { - - Movie(1L), - TvShow(2L), - Season(3L), - Episode(4L), - Artist(5L), - Album(6L), - Track(7L), - PhotoAlbum(8L), - Photo(9L),; - - private final long value; - - private GetPlaylistContentsQueryParamTypeEnum(long value) { - this.value = value; - } - - public long value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRequest.java deleted file mode 100644 index afdd7016..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRequest.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; - - -public class GetPlaylistContentsRequest { - /** - * the ID of the playlist - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") - private double playlistID; - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private GetPlaylistContentsQueryParamType type; - - @JsonCreator - public GetPlaylistContentsRequest( - double playlistID, - GetPlaylistContentsQueryParamType type) { - Utils.checkNotNull(playlistID, "playlistID"); - Utils.checkNotNull(type, "type"); - this.playlistID = playlistID; - this.type = type; - } - - /** - * the ID of the playlist - */ - @JsonIgnore - public double playlistID() { - return playlistID; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @JsonIgnore - public GetPlaylistContentsQueryParamType type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the ID of the playlist - */ - public GetPlaylistContentsRequest withPlaylistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public GetPlaylistContentsRequest withType(GetPlaylistContentsQueryParamType 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; - } - GetPlaylistContentsRequest other = (GetPlaylistContentsRequest) o; - return - Utils.enhancedDeepEquals(this.playlistID, other.playlistID) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - playlistID, type); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsRequest.class, - "playlistID", playlistID, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Double playlistID; - - private GetPlaylistContentsQueryParamType type; - - private Builder() { - // force use of static builder() method - } - - - /** - * the ID of the playlist - */ - public Builder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public Builder type(GetPlaylistContentsQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetPlaylistContentsRequest build() { - - return new GetPlaylistContentsRequest( - playlistID, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRequestBuilder.java deleted file mode 100644 index 798b27e7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRequestBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetPlaylistContents; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; - -public class GetPlaylistContentsRequestBuilder { - - private Double playlistID; - private GetPlaylistContentsQueryParamType type; - private final SDKConfiguration sdkConfiguration; - - public GetPlaylistContentsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetPlaylistContentsRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - public GetPlaylistContentsRequestBuilder type(GetPlaylistContentsQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetPlaylistContentsRequest buildRequest() { - - GetPlaylistContentsRequest request = new GetPlaylistContentsRequest(playlistID, - type); - - return request; - } - - public GetPlaylistContentsResponse call() throws Exception { - - RequestOperation operation - = new GetPlaylistContents.Sync(sdkConfiguration); - GetPlaylistContentsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsResponse.java deleted file mode 100644 index 3c36fea0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetPlaylistContentsResponse 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 playlist contents - */ - private Optional object; - - @JsonCreator - public GetPlaylistContentsResponse( - 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 GetPlaylistContentsResponse( - 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 playlist contents - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetPlaylistContentsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetPlaylistContentsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistContentsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The playlist contents - */ - public GetPlaylistContentsResponse withObject(GetPlaylistContentsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The playlist contents - */ - public GetPlaylistContentsResponse 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; - } - GetPlaylistContentsResponse other = (GetPlaylistContentsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 playlist contents - */ - public Builder object(GetPlaylistContentsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The playlist contents - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetPlaylistContentsResponse build() { - - return new GetPlaylistContentsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsResponseBody.java deleted file mode 100644 index 8479ced3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetPlaylistContentsResponseBody - * - *

The playlist contents - */ -public class GetPlaylistContentsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetPlaylistContentsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetPlaylistContentsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsResponseBody withMediaContainer(GetPlaylistContentsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetPlaylistContentsResponseBody 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; - } - GetPlaylistContentsResponseBody other = (GetPlaylistContentsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetPlaylistContentsMediaContainer 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 GetPlaylistContentsResponseBody build() { - - return new GetPlaylistContentsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRole.java deleted file mode 100644 index 36095cd0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsRole.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistContentsRole { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetPlaylistContentsRole( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetPlaylistContentsRole() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsRole withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetPlaylistContentsRole 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; - } - GetPlaylistContentsRole other = (GetPlaylistContentsRole) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsRole.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetPlaylistContentsRole build() { - - return new GetPlaylistContentsRole( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsWriter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsWriter.java deleted file mode 100644 index 5d5ca0e8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistContentsWriter.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistContentsWriter { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetPlaylistContentsWriter( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetPlaylistContentsWriter() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistContentsWriter withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetPlaylistContentsWriter 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; - } - GetPlaylistContentsWriter other = (GetPlaylistContentsWriter) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsWriter.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetPlaylistContentsWriter build() { - - return new GetPlaylistContentsWriter( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorDevice.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorDevice.java new file mode 100644 index 00000000..ceaf13c1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorDevice.java @@ -0,0 +1,111 @@ +/* + * 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.Optional; + + +public class GetPlaylistGeneratorDevice { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("profile") + private Optional profile; + + @JsonCreator + public GetPlaylistGeneratorDevice( + @JsonProperty("profile") Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + } + + public GetPlaylistGeneratorDevice() { + this(Optional.empty()); + } + + @JsonIgnore + public Optional profile() { + return profile; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPlaylistGeneratorDevice withProfile(String profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + + public GetPlaylistGeneratorDevice withProfile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistGeneratorDevice other = (GetPlaylistGeneratorDevice) o; + return + Utils.enhancedDeepEquals(this.profile, other.profile); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + profile); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorDevice.class, + "profile", profile); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional profile = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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 GetPlaylistGeneratorDevice build() { + + return new GetPlaylistGeneratorDevice( + profile); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsMediaContainer.java new file mode 100644 index 00000000..7492dfa3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsMediaContainer.java @@ -0,0 +1,329 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +/** + * GetPlaylistGeneratorItemsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetPlaylistGeneratorItemsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional metadata; + + @JsonCreator + public GetPlaylistGeneratorItemsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Metadata") Optional metadata) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(metadata, "metadata"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.metadata = metadata; + } + + public GetPlaylistGeneratorItemsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional metadata() { + return (Optional) metadata; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPlaylistGeneratorItemsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetPlaylistGeneratorItemsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetPlaylistGeneratorItemsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetPlaylistGeneratorItemsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetPlaylistGeneratorItemsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetPlaylistGeneratorItemsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetPlaylistGeneratorItemsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetPlaylistGeneratorItemsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetPlaylistGeneratorItemsMediaContainer withMetadata(GetPlaylistGeneratorItemsMetadata metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + + public GetPlaylistGeneratorItemsMediaContainer 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; + } + GetPlaylistGeneratorItemsMediaContainer other = (GetPlaylistGeneratorItemsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, metadata); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorItemsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "metadata", metadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder metadata(GetPlaylistGeneratorItemsMetadata 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 GetPlaylistGeneratorItemsMediaContainer build() { + + return new GetPlaylistGeneratorItemsMediaContainer( + identifier, offset, size, + totalSize, metadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsMetadata.java new file mode 100644 index 00000000..746329df --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsMetadata.java @@ -0,0 +1,4208 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.models.shared.Filter; +import dev.plexapi.sdk.models.shared.Image; +import dev.plexapi.sdk.models.shared.Media; +import dev.plexapi.sdk.models.shared.Sort; +import dev.plexapi.sdk.models.shared.Tag; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * GetPlaylistGeneratorItemsMetadata + * + *

Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ +public class GetPlaylistGeneratorItemsMetadata { + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("absoluteIndex") + private Optional absoluteIndex; + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + /** + * When present, the URL for the background artwork for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Autotag") + private Optional> autotag; + + /** + * When present, the URL for a banner graphic for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("banner") + private Optional banner; + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Filter") + private Optional> filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + /** + * The `art` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + /** + * The `hero` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentHero") + private Optional grandparentHero; + + /** + * The `key` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + /** + * The `ratingKey` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + /** + * The `theme` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTheme") + private Optional grandparentTheme; + + /** + * The `thumb` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + /** + * The `title` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guid; + + /** + * When present, the URL for a hero image for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hero") + private Optional hero; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Image") + private Optional> image; + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originalTitle") + private Optional originalTitle; + + /** + * The `hero` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentHero") + private Optional parentHero; + + /** + * The `index` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + /** + * The `key` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + /** + * The `ratingKey` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + /** + * The `thumb` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + /** + * The `title` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("prompt") + private Optional prompt; + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Rating") + private Optional> ratingArray; + + /** + * Number of ratings under this metadata + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingCount") + private Optional ratingCount; + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + /** + * Indicates this is a search directory + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("search") + private Optional search; + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secondary") + private Optional secondary; + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipChildren") + private Optional skipChildren; + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipParent") + private Optional skipParent; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Sort") + private Optional> sort; + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtype") + private Optional subtype; + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("theme") + private Optional theme; + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userRating") + private Optional userRating; + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + /** + * The state of processing if this generator is part of an optimizer playlist + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("processingState") + private Optional processingState; + + /** + * The error which could have occurred (or `good`) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("processingStateContext") + private Optional processingStateContext; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public GetPlaylistGeneratorItemsMetadata( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("absoluteIndex") Optional absoluteIndex, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("art") Optional art, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("Autotag") Optional> autotag, + @JsonProperty("banner") Optional banner, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("composite") Optional composite, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("Country") Optional> country, + @JsonProperty("Director") Optional> director, + @JsonProperty("duration") Optional duration, + @JsonProperty("Filter") Optional> filter, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("grandparentHero") Optional grandparentHero, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("Guid") Optional> guid, + @JsonProperty("hero") Optional hero, + @JsonProperty("Image") Optional> image, + @JsonProperty("index") Optional index, + @JsonProperty("key") Optional key, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("Media") Optional> media, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("parentHero") Optional parentHero, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("prompt") Optional prompt, + @JsonProperty("rating") Optional rating, + @JsonProperty("Rating") Optional> ratingArray, + @JsonProperty("ratingCount") Optional ratingCount, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("Role") Optional> role, + @JsonProperty("search") Optional search, + @JsonProperty("secondary") Optional secondary, + @JsonProperty("skipChildren") Optional skipChildren, + @JsonProperty("skipParent") Optional skipParent, + @JsonProperty("Sort") Optional> sort, + @JsonProperty("studio") Optional studio, + @JsonProperty("subtype") Optional subtype, + @JsonProperty("summary") Optional summary, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("theme") Optional theme, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("userRating") Optional userRating, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("year") Optional year, + @JsonProperty("processingState") Optional processingState, + @JsonProperty("processingStateContext") Optional processingStateContext) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(autotag, "autotag"); + Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(grandparentHero, "grandparentHero"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(hero, "hero"); + Utils.checkNotNull(image, "image"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(parentHero, "parentHero"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(prompt, "prompt"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(ratingArray, "ratingArray"); + Utils.checkNotNull(ratingCount, "ratingCount"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(search, "search"); + Utils.checkNotNull(secondary, "secondary"); + Utils.checkNotNull(skipChildren, "skipChildren"); + Utils.checkNotNull(skipParent, "skipParent"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(subtype, "subtype"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(userRating, "userRating"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(processingState, "processingState"); + Utils.checkNotNull(processingStateContext, "processingStateContext"); + this.title = title; + this.type = type; + this.absoluteIndex = absoluteIndex; + this.addedAt = addedAt; + this.art = art; + this.audienceRating = audienceRating; + this.audienceRatingImage = audienceRatingImage; + this.autotag = autotag; + this.banner = banner; + this.chapterSource = chapterSource; + this.composite = composite; + this.contentRating = contentRating; + this.country = country; + this.director = director; + this.duration = duration; + this.filter = filter; + this.genre = genre; + this.grandparentArt = grandparentArt; + this.grandparentHero = grandparentHero; + this.grandparentKey = grandparentKey; + this.grandparentRatingKey = grandparentRatingKey; + this.grandparentTheme = grandparentTheme; + this.grandparentThumb = grandparentThumb; + this.grandparentTitle = grandparentTitle; + this.guid = guid; + this.hero = hero; + this.image = image; + this.index = index; + this.key = key; + this.lastViewedAt = lastViewedAt; + this.leafCount = leafCount; + this.media = media; + this.originallyAvailableAt = originallyAvailableAt; + this.originalTitle = originalTitle; + this.parentHero = parentHero; + this.parentIndex = parentIndex; + this.parentKey = parentKey; + this.parentRatingKey = parentRatingKey; + this.parentThumb = parentThumb; + this.parentTitle = parentTitle; + this.primaryExtraKey = primaryExtraKey; + this.prompt = prompt; + this.rating = rating; + this.ratingArray = ratingArray; + this.ratingCount = ratingCount; + this.ratingImage = ratingImage; + this.ratingKey = ratingKey; + this.role = role; + this.search = search; + this.secondary = secondary; + this.skipChildren = skipChildren; + this.skipParent = skipParent; + this.sort = sort; + this.studio = studio; + this.subtype = subtype; + this.summary = summary; + this.tagline = tagline; + this.theme = theme; + this.thumb = thumb; + this.titleSort = titleSort; + this.updatedAt = updatedAt; + this.userRating = userRating; + this.viewCount = viewCount; + this.viewedLeafCount = viewedLeafCount; + this.viewOffset = viewOffset; + this.writer = writer; + this.year = year; + this.processingState = processingState; + this.processingStateContext = processingStateContext; + this.additionalProperties = new HashMap<>(); + } + + public GetPlaylistGeneratorItemsMetadata() { + 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(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + 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 title of the item (e.g. “300” or “The Simpsons”) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional title() { + return (Optional) title; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonIgnore + public Optional absoluteIndex() { + return absoluteIndex; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonIgnore + public Optional addedAt() { + return addedAt; + } + + /** + * When present, the URL for the background artwork for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional art() { + return (Optional) art; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonIgnore + public Optional audienceRating() { + return audienceRating; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audienceRatingImage() { + return (Optional) audienceRatingImage; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> autotag() { + return (Optional>) autotag; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional banner() { + return (Optional) banner; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chapterSource() { + return (Optional) chapterSource; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional composite() { + return (Optional) composite; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional contentRating() { + return (Optional) contentRating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> director() { + return (Optional>) director; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonIgnore + public Optional duration() { + return duration; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> filter() { + return (Optional>) filter; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> genre() { + return (Optional>) genre; + } + + /** + * The `art` of the grandparent + */ + @JsonIgnore + public Optional grandparentArt() { + return grandparentArt; + } + + /** + * The `hero` of the grandparent + */ + @JsonIgnore + public Optional grandparentHero() { + return grandparentHero; + } + + /** + * The `key` of the grandparent + */ + @JsonIgnore + public Optional grandparentKey() { + return grandparentKey; + } + + /** + * The `ratingKey` of the grandparent + */ + @JsonIgnore + public Optional grandparentRatingKey() { + return grandparentRatingKey; + } + + /** + * The `theme` of the grandparent + */ + @JsonIgnore + public Optional grandparentTheme() { + return grandparentTheme; + } + + /** + * The `thumb` of the grandparent + */ + @JsonIgnore + public Optional grandparentThumb() { + return grandparentThumb; + } + + /** + * The `title` of the grandparent + */ + @JsonIgnore + public Optional grandparentTitle() { + return grandparentTitle; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> guid() { + return (Optional>) guid; + } + + /** + * When present, the URL for a hero image for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hero() { + return (Optional) hero; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> image() { + return (Optional>) image; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonIgnore + public Optional index() { + return index; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonIgnore + public Optional lastViewedAt() { + return lastViewedAt; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonIgnore + public Optional leafCount() { + return leafCount; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> media() { + return (Optional>) media; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originallyAvailableAt() { + return (Optional) originallyAvailableAt; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originalTitle() { + return (Optional) originalTitle; + } + + /** + * The `hero` of the parent + */ + @JsonIgnore + public Optional parentHero() { + return parentHero; + } + + /** + * The `index` of the parent + */ + @JsonIgnore + public Optional parentIndex() { + return parentIndex; + } + + /** + * The `key` of the parent + */ + @JsonIgnore + public Optional parentKey() { + return parentKey; + } + + /** + * The `ratingKey` of the parent + */ + @JsonIgnore + public Optional parentRatingKey() { + return parentRatingKey; + } + + /** + * The `thumb` of the parent + */ + @JsonIgnore + public Optional parentThumb() { + return parentThumb; + } + + /** + * The `title` of the parent + */ + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional primaryExtraKey() { + return (Optional) primaryExtraKey; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonIgnore + public Optional prompt() { + return prompt; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonIgnore + public Optional rating() { + return rating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> ratingArray() { + return (Optional>) ratingArray; + } + + /** + * Number of ratings under this metadata + */ + @JsonIgnore + public Optional ratingCount() { + return ratingCount; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingImage() { + return (Optional) ratingImage; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingKey() { + return (Optional) ratingKey; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> role() { + return (Optional>) role; + } + + /** + * Indicates this is a search directory + */ + @JsonIgnore + public Optional search() { + return search; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonIgnore + public Optional secondary() { + return secondary; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonIgnore + public Optional skipChildren() { + return skipChildren; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonIgnore + public Optional skipParent() { + return skipParent; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> sort() { + return (Optional>) sort; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional studio() { + return (Optional) studio; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtype() { + return (Optional) subtype; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional summary() { + return (Optional) summary; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional tagline() { + return (Optional) tagline; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional theme() { + return (Optional) theme; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional thumb() { + return (Optional) thumb; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional titleSort() { + return (Optional) titleSort; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonIgnore + public Optional userRating() { + return userRating; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonIgnore + public Optional viewCount() { + return viewCount; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonIgnore + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonIgnore + public Optional viewOffset() { + return viewOffset; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> writer() { + return (Optional>) writer; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonIgnore + public Optional year() { + return year; + } + + /** + * The state of processing if this generator is part of an optimizer playlist + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional processingState() { + return (Optional) processingState; + } + + /** + * The error which could have occurred (or `good`) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional processingStateContext() { + return (Optional) processingStateContext; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public GetPlaylistGeneratorItemsMetadata withTitle(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public GetPlaylistGeneratorItemsMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public GetPlaylistGeneratorItemsMetadata withType(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public GetPlaylistGeneratorItemsMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public GetPlaylistGeneratorItemsMetadata withAbsoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public GetPlaylistGeneratorItemsMetadata withAbsoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public GetPlaylistGeneratorItemsMetadata withAddedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public GetPlaylistGeneratorItemsMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public GetPlaylistGeneratorItemsMetadata withArt(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public GetPlaylistGeneratorItemsMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public GetPlaylistGeneratorItemsMetadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public GetPlaylistGeneratorItemsMetadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public GetPlaylistGeneratorItemsMetadata withAudienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public GetPlaylistGeneratorItemsMetadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public GetPlaylistGeneratorItemsMetadata withAutotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + + public GetPlaylistGeneratorItemsMetadata withAutotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public GetPlaylistGeneratorItemsMetadata withBanner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public GetPlaylistGeneratorItemsMetadata withBanner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public GetPlaylistGeneratorItemsMetadata withChapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public GetPlaylistGeneratorItemsMetadata withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public GetPlaylistGeneratorItemsMetadata withComposite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public GetPlaylistGeneratorItemsMetadata withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public GetPlaylistGeneratorItemsMetadata withContentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public GetPlaylistGeneratorItemsMetadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public GetPlaylistGeneratorItemsMetadata withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + + public GetPlaylistGeneratorItemsMetadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public GetPlaylistGeneratorItemsMetadata withDirector(List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + + public GetPlaylistGeneratorItemsMetadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public GetPlaylistGeneratorItemsMetadata withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public GetPlaylistGeneratorItemsMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public GetPlaylistGeneratorItemsMetadata withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public GetPlaylistGeneratorItemsMetadata withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetPlaylistGeneratorItemsMetadata withGenre(List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + + public GetPlaylistGeneratorItemsMetadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + /** + * The `art` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + + /** + * The `art` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The `hero` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + + /** + * The `hero` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + /** + * The `key` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + + /** + * The `key` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + /** + * The `theme` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + + /** + * The `theme` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + /** + * The `thumb` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The `title` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + + /** + * The `title` of the grandparent + */ + public GetPlaylistGeneratorItemsMetadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public GetPlaylistGeneratorItemsMetadata withGuid(List guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + + public GetPlaylistGeneratorItemsMetadata withGuid(Optional> guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public GetPlaylistGeneratorItemsMetadata withHero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public GetPlaylistGeneratorItemsMetadata withHero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + return this; + } + + public GetPlaylistGeneratorItemsMetadata withImage(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + + public GetPlaylistGeneratorItemsMetadata withImage(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public GetPlaylistGeneratorItemsMetadata withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public GetPlaylistGeneratorItemsMetadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public GetPlaylistGeneratorItemsMetadata withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public GetPlaylistGeneratorItemsMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public GetPlaylistGeneratorItemsMetadata withLastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public GetPlaylistGeneratorItemsMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public GetPlaylistGeneratorItemsMetadata withLeafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public GetPlaylistGeneratorItemsMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public GetPlaylistGeneratorItemsMetadata withMedia(List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + + public GetPlaylistGeneratorItemsMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public GetPlaylistGeneratorItemsMetadata withOriginallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public GetPlaylistGeneratorItemsMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public GetPlaylistGeneratorItemsMetadata withOriginalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public GetPlaylistGeneratorItemsMetadata withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + /** + * The `hero` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + + /** + * The `hero` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + /** + * The `index` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + + /** + * The `index` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The `key` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + + /** + * The `key` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The `ratingKey` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The `thumb` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + + /** + * The `thumb` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The `title` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + + /** + * The `title` of the parent + */ + public GetPlaylistGeneratorItemsMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public GetPlaylistGeneratorItemsMetadata withPrimaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public GetPlaylistGeneratorItemsMetadata withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public GetPlaylistGeneratorItemsMetadata withPrompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public GetPlaylistGeneratorItemsMetadata withPrompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public GetPlaylistGeneratorItemsMetadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public GetPlaylistGeneratorItemsMetadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public GetPlaylistGeneratorItemsMetadata withRatingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + + public GetPlaylistGeneratorItemsMetadata withRatingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + /** + * Number of ratings under this metadata + */ + public GetPlaylistGeneratorItemsMetadata withRatingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + + /** + * Number of ratings under this metadata + */ + public GetPlaylistGeneratorItemsMetadata withRatingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public GetPlaylistGeneratorItemsMetadata withRatingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public GetPlaylistGeneratorItemsMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public GetPlaylistGeneratorItemsMetadata withRatingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public GetPlaylistGeneratorItemsMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetPlaylistGeneratorItemsMetadata withRole(List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + + public GetPlaylistGeneratorItemsMetadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * Indicates this is a search directory + */ + public GetPlaylistGeneratorItemsMetadata withSearch(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + + /** + * Indicates this is a search directory + */ + public GetPlaylistGeneratorItemsMetadata withSearch(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public GetPlaylistGeneratorItemsMetadata withSecondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public GetPlaylistGeneratorItemsMetadata withSecondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public GetPlaylistGeneratorItemsMetadata withSkipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public GetPlaylistGeneratorItemsMetadata withSkipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public GetPlaylistGeneratorItemsMetadata withSkipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public GetPlaylistGeneratorItemsMetadata withSkipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public GetPlaylistGeneratorItemsMetadata withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public GetPlaylistGeneratorItemsMetadata withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public GetPlaylistGeneratorItemsMetadata withStudio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public GetPlaylistGeneratorItemsMetadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public GetPlaylistGeneratorItemsMetadata withSubtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public GetPlaylistGeneratorItemsMetadata withSubtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public GetPlaylistGeneratorItemsMetadata withSummary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public GetPlaylistGeneratorItemsMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public GetPlaylistGeneratorItemsMetadata withTagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public GetPlaylistGeneratorItemsMetadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public GetPlaylistGeneratorItemsMetadata withTheme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public GetPlaylistGeneratorItemsMetadata withTheme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public GetPlaylistGeneratorItemsMetadata withThumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public GetPlaylistGeneratorItemsMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public GetPlaylistGeneratorItemsMetadata withTitleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public GetPlaylistGeneratorItemsMetadata withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public GetPlaylistGeneratorItemsMetadata withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public GetPlaylistGeneratorItemsMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public GetPlaylistGeneratorItemsMetadata withUserRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public GetPlaylistGeneratorItemsMetadata withUserRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public GetPlaylistGeneratorItemsMetadata withViewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public GetPlaylistGeneratorItemsMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public GetPlaylistGeneratorItemsMetadata withViewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public GetPlaylistGeneratorItemsMetadata withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public GetPlaylistGeneratorItemsMetadata withViewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public GetPlaylistGeneratorItemsMetadata withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public GetPlaylistGeneratorItemsMetadata withWriter(List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + + public GetPlaylistGeneratorItemsMetadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public GetPlaylistGeneratorItemsMetadata withYear(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public GetPlaylistGeneratorItemsMetadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + /** + * The state of processing if this generator is part of an optimizer playlist + */ + public GetPlaylistGeneratorItemsMetadata withProcessingState(ProcessingState processingState) { + Utils.checkNotNull(processingState, "processingState"); + this.processingState = Optional.ofNullable(processingState); + return this; + } + + + /** + * The state of processing if this generator is part of an optimizer playlist + */ + public GetPlaylistGeneratorItemsMetadata withProcessingState(Optional processingState) { + Utils.checkNotNull(processingState, "processingState"); + this.processingState = processingState; + return this; + } + + /** + * The error which could have occurred (or `good`) + */ + public GetPlaylistGeneratorItemsMetadata withProcessingStateContext(ProcessingStateContext processingStateContext) { + Utils.checkNotNull(processingStateContext, "processingStateContext"); + this.processingStateContext = Optional.ofNullable(processingStateContext); + return this; + } + + + /** + * The error which could have occurred (or `good`) + */ + public GetPlaylistGeneratorItemsMetadata withProcessingStateContext(Optional processingStateContext) { + Utils.checkNotNull(processingStateContext, "processingStateContext"); + this.processingStateContext = processingStateContext; + return this; + } + + @JsonAnySetter + public GetPlaylistGeneratorItemsMetadata withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public GetPlaylistGeneratorItemsMetadata withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistGeneratorItemsMetadata other = (GetPlaylistGeneratorItemsMetadata) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.absoluteIndex, other.absoluteIndex) && + Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && + Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && + Utils.enhancedDeepEquals(this.autotag, other.autotag) && + Utils.enhancedDeepEquals(this.banner, other.banner) && + Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && + Utils.enhancedDeepEquals(this.composite, other.composite) && + Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && + Utils.enhancedDeepEquals(this.country, other.country) && + Utils.enhancedDeepEquals(this.director, other.director) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.genre, other.genre) && + Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && + Utils.enhancedDeepEquals(this.grandparentHero, other.grandparentHero) && + Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && + Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && + Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && + Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && + Utils.enhancedDeepEquals(this.guid, other.guid) && + Utils.enhancedDeepEquals(this.hero, other.hero) && + Utils.enhancedDeepEquals(this.image, other.image) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && + Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && + Utils.enhancedDeepEquals(this.media, other.media) && + Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && + Utils.enhancedDeepEquals(this.parentHero, other.parentHero) && + Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && + Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && + Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && + Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && + Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && + Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && + Utils.enhancedDeepEquals(this.prompt, other.prompt) && + Utils.enhancedDeepEquals(this.rating, other.rating) && + Utils.enhancedDeepEquals(this.ratingArray, other.ratingArray) && + Utils.enhancedDeepEquals(this.ratingCount, other.ratingCount) && + Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.role, other.role) && + Utils.enhancedDeepEquals(this.search, other.search) && + Utils.enhancedDeepEquals(this.secondary, other.secondary) && + Utils.enhancedDeepEquals(this.skipChildren, other.skipChildren) && + Utils.enhancedDeepEquals(this.skipParent, other.skipParent) && + Utils.enhancedDeepEquals(this.sort, other.sort) && + Utils.enhancedDeepEquals(this.studio, other.studio) && + Utils.enhancedDeepEquals(this.subtype, other.subtype) && + Utils.enhancedDeepEquals(this.summary, other.summary) && + Utils.enhancedDeepEquals(this.tagline, other.tagline) && + Utils.enhancedDeepEquals(this.theme, other.theme) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.userRating, other.userRating) && + Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && + Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && + Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && + Utils.enhancedDeepEquals(this.writer, other.writer) && + Utils.enhancedDeepEquals(this.year, other.year) && + Utils.enhancedDeepEquals(this.processingState, other.processingState) && + Utils.enhancedDeepEquals(this.processingStateContext, other.processingStateContext) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year, processingState, processingStateContext, + additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorItemsMetadata.class, + "title", title, + "type", type, + "absoluteIndex", absoluteIndex, + "addedAt", addedAt, + "art", art, + "audienceRating", audienceRating, + "audienceRatingImage", audienceRatingImage, + "autotag", autotag, + "banner", banner, + "chapterSource", chapterSource, + "composite", composite, + "contentRating", contentRating, + "country", country, + "director", director, + "duration", duration, + "filter", filter, + "genre", genre, + "grandparentArt", grandparentArt, + "grandparentHero", grandparentHero, + "grandparentKey", grandparentKey, + "grandparentRatingKey", grandparentRatingKey, + "grandparentTheme", grandparentTheme, + "grandparentThumb", grandparentThumb, + "grandparentTitle", grandparentTitle, + "guid", guid, + "hero", hero, + "image", image, + "index", index, + "key", key, + "lastViewedAt", lastViewedAt, + "leafCount", leafCount, + "media", media, + "originallyAvailableAt", originallyAvailableAt, + "originalTitle", originalTitle, + "parentHero", parentHero, + "parentIndex", parentIndex, + "parentKey", parentKey, + "parentRatingKey", parentRatingKey, + "parentThumb", parentThumb, + "parentTitle", parentTitle, + "primaryExtraKey", primaryExtraKey, + "prompt", prompt, + "rating", rating, + "ratingArray", ratingArray, + "ratingCount", ratingCount, + "ratingImage", ratingImage, + "ratingKey", ratingKey, + "role", role, + "search", search, + "secondary", secondary, + "skipChildren", skipChildren, + "skipParent", skipParent, + "sort", sort, + "studio", studio, + "subtype", subtype, + "summary", summary, + "tagline", tagline, + "theme", theme, + "thumb", thumb, + "titleSort", titleSort, + "updatedAt", updatedAt, + "userRating", userRating, + "viewCount", viewCount, + "viewedLeafCount", viewedLeafCount, + "viewOffset", viewOffset, + "writer", writer, + "year", year, + "processingState", processingState, + "processingStateContext", processingStateContext, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional absoluteIndex = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional> autotag = Optional.empty(); + + private Optional banner = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional> filter = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentHero = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional grandparentRatingKey = Optional.empty(); + + private Optional grandparentTheme = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional> guid = Optional.empty(); + + private Optional hero = Optional.empty(); + + private Optional> image = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional originalTitle = Optional.empty(); + + private Optional parentHero = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional prompt = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional> ratingArray = Optional.empty(); + + private Optional ratingCount = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Optional search = Optional.empty(); + + private Optional secondary = Optional.empty(); + + private Optional skipChildren = Optional.empty(); + + private Optional skipParent = Optional.empty(); + + private Optional> sort = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional subtype = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional theme = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional userRating = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional viewedLeafCount = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional processingState = Optional.empty(); + + private Optional processingStateContext = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + + public Builder autotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + public Builder autotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + 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); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + 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; + } + + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + + public Builder guid(List 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; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + 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; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + 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; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + + /** + * The `hero` of the parent + */ + public Builder parentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + /** + * The `hero` of the parent + */ + public Builder parentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + + /** + * The `index` of the parent + */ + public Builder parentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The `index` of the parent + */ + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + + /** + * The `key` of the parent + */ + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The `key` of the parent + */ + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + + /** + * The `title` of the parent + */ + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The `title` of the parent + */ + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + + public Builder ratingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + public Builder ratingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + 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; + } + + + /** + * Indicates this is a search directory + */ + public Builder search(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + /** + * Indicates this is a search directory + */ + public Builder search(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + 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; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + + /** + * The state of processing if this generator is part of an optimizer playlist + */ + public Builder processingState(ProcessingState processingState) { + Utils.checkNotNull(processingState, "processingState"); + this.processingState = Optional.ofNullable(processingState); + return this; + } + + /** + * The state of processing if this generator is part of an optimizer playlist + */ + public Builder processingState(Optional processingState) { + Utils.checkNotNull(processingState, "processingState"); + this.processingState = processingState; + return this; + } + + + /** + * The error which could have occurred (or `good`) + */ + public Builder processingStateContext(ProcessingStateContext processingStateContext) { + Utils.checkNotNull(processingStateContext, "processingStateContext"); + this.processingStateContext = Optional.ofNullable(processingStateContext); + return this; + } + + /** + * The error which could have occurred (or `good`) + */ + public Builder processingStateContext(Optional processingStateContext) { + Utils.checkNotNull(processingStateContext, "processingStateContext"); + this.processingStateContext = processingStateContext; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public GetPlaylistGeneratorItemsMetadata build() { + + return new GetPlaylistGeneratorItemsMetadata( + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year, processingState, processingStateContext) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsRequest.java new file mode 100644 index 00000000..a5f2f2ed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetPlaylistGeneratorItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; + + /** + * The generator item ID to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=generatorId") + private long generatorId; + + @JsonCreator + public GetPlaylistGeneratorItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId, + long generatorId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + Utils.checkNotNull(generatorId, "generatorId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + this.generatorId = generatorId; + } + + public GetPlaylistGeneratorItemsRequest( + long playlistId, + long generatorId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId, + generatorId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; + } + + /** + * The generator item ID to delete. + */ + @JsonIgnore + public long generatorId() { + return generatorId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlaylistGeneratorItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlaylistGeneratorItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPlaylistGeneratorItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPlaylistGeneratorItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPlaylistGeneratorItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPlaylistGeneratorItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPlaylistGeneratorItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPlaylistGeneratorItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPlaylistGeneratorItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPlaylistGeneratorItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPlaylistGeneratorItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPlaylistGeneratorItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPlaylistGeneratorItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPlaylistGeneratorItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlaylistGeneratorItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlaylistGeneratorItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPlaylistGeneratorItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPlaylistGeneratorItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPlaylistGeneratorItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPlaylistGeneratorItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPlaylistGeneratorItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPlaylistGeneratorItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public GetPlaylistGeneratorItemsRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + /** + * The generator item ID to delete. + */ + public GetPlaylistGeneratorItemsRequest withGeneratorId(long generatorId) { + Utils.checkNotNull(generatorId, "generatorId"); + this.generatorId = generatorId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistGeneratorItemsRequest other = (GetPlaylistGeneratorItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId) && + Utils.enhancedDeepEquals(this.generatorId, other.generatorId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + generatorId); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId, + "generatorId", generatorId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; + + private Long generatorId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + + /** + * The generator item ID to delete. + */ + public Builder generatorId(long generatorId) { + Utils.checkNotNull(generatorId, "generatorId"); + this.generatorId = generatorId; + return this; + } + + public GetPlaylistGeneratorItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetPlaylistGeneratorItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + generatorId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsRequestBuilder.java new file mode 100644 index 00000000..86f24944 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetPlaylistGeneratorItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetPlaylistGeneratorItemsRequestBuilder { + + private GetPlaylistGeneratorItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPlaylistGeneratorItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPlaylistGeneratorItemsRequestBuilder request(GetPlaylistGeneratorItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPlaylistGeneratorItemsResponse call() throws Exception { + + RequestOperation operation + = new GetPlaylistGeneratorItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsResponse.java new file mode 100644 index 00000000..06d30c2a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetPlaylistGeneratorItemsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetPlaylistGeneratorItemsResponse( + 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 GetPlaylistGeneratorItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPlaylistGeneratorItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistGeneratorItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistGeneratorItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPlaylistGeneratorItemsResponse withObject(GetPlaylistGeneratorItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetPlaylistGeneratorItemsResponse 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; + } + GetPlaylistGeneratorItemsResponse other = (GetPlaylistGeneratorItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetPlaylistGeneratorItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetPlaylistGeneratorItemsResponse build() { + + return new GetPlaylistGeneratorItemsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsResponseBody.java new file mode 100644 index 00000000..fd54a8f2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorItemsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetPlaylistGeneratorItemsResponseBody + * + *

OK + */ +public class GetPlaylistGeneratorItemsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetPlaylistGeneratorItemsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetPlaylistGeneratorItemsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPlaylistGeneratorItemsResponseBody withMediaContainer(GetPlaylistGeneratorItemsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetPlaylistGeneratorItemsResponseBody 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; + } + GetPlaylistGeneratorItemsResponseBody other = (GetPlaylistGeneratorItemsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorItemsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetPlaylistGeneratorItemsMediaContainer 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 GetPlaylistGeneratorItemsResponseBody build() { + + return new GetPlaylistGeneratorItemsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorLocation.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorLocation.java new file mode 100644 index 00000000..f2bcc014 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorLocation.java @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GetPlaylistGeneratorLocation { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uri") + private Optional uri; + + @JsonCreator + public GetPlaylistGeneratorLocation( + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("uri") Optional uri) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(uri, "uri"); + this.librarySectionID = librarySectionID; + this.uri = uri; + } + + public GetPlaylistGeneratorLocation() { + this(Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional librarySectionID() { + return librarySectionID; + } + + @JsonIgnore + public Optional uri() { + return uri; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPlaylistGeneratorLocation withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + + public GetPlaylistGeneratorLocation withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetPlaylistGeneratorLocation withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + public GetPlaylistGeneratorLocation withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistGeneratorLocation other = (GetPlaylistGeneratorLocation) o; + return + Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && + Utils.enhancedDeepEquals(this.uri, other.uri); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + librarySectionID, uri); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorLocation.class, + "librarySectionID", librarySectionID, + "uri", uri); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional librarySectionID = Optional.empty(); + + private Optional uri = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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 uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + public GetPlaylistGeneratorLocation build() { + + return new GetPlaylistGeneratorLocation( + librarySectionID, uri); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorMediaContainer.java new file mode 100644 index 00000000..7984cc57 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetPlaylistGeneratorMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetPlaylistGeneratorMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Item") + private Optional> item; + + @JsonCreator + public GetPlaylistGeneratorMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Item") Optional> item) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(item, "item"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.item = item; + } + + public GetPlaylistGeneratorMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> item() { + return (Optional>) item; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPlaylistGeneratorMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetPlaylistGeneratorMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetPlaylistGeneratorMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetPlaylistGeneratorMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetPlaylistGeneratorMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetPlaylistGeneratorMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetPlaylistGeneratorMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetPlaylistGeneratorMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetPlaylistGeneratorMediaContainer withItem(List item) { + Utils.checkNotNull(item, "item"); + this.item = Optional.ofNullable(item); + return this; + } + + + public GetPlaylistGeneratorMediaContainer withItem(Optional> item) { + Utils.checkNotNull(item, "item"); + this.item = item; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistGeneratorMediaContainer other = (GetPlaylistGeneratorMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.item, other.item); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, item); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "item", item); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> item = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder item(List item) { + Utils.checkNotNull(item, "item"); + this.item = Optional.ofNullable(item); + return this; + } + + public Builder item(Optional> item) { + Utils.checkNotNull(item, "item"); + this.item = item; + return this; + } + + public GetPlaylistGeneratorMediaContainer build() { + + return new GetPlaylistGeneratorMediaContainer( + identifier, offset, size, + totalSize, item); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorRequest.java new file mode 100644 index 00000000..48be8dc8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetPlaylistGeneratorRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; + + /** + * The generator item ID to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=generatorId") + private long generatorId; + + @JsonCreator + public GetPlaylistGeneratorRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId, + long generatorId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + Utils.checkNotNull(generatorId, "generatorId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + this.generatorId = generatorId; + } + + public GetPlaylistGeneratorRequest( + long playlistId, + long generatorId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId, + generatorId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; + } + + /** + * The generator item ID to delete. + */ + @JsonIgnore + public long generatorId() { + return generatorId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlaylistGeneratorRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlaylistGeneratorRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPlaylistGeneratorRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPlaylistGeneratorRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPlaylistGeneratorRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPlaylistGeneratorRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPlaylistGeneratorRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPlaylistGeneratorRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPlaylistGeneratorRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPlaylistGeneratorRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPlaylistGeneratorRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPlaylistGeneratorRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPlaylistGeneratorRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPlaylistGeneratorRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlaylistGeneratorRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlaylistGeneratorRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPlaylistGeneratorRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPlaylistGeneratorRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPlaylistGeneratorRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPlaylistGeneratorRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPlaylistGeneratorRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPlaylistGeneratorRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public GetPlaylistGeneratorRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + /** + * The generator item ID to delete. + */ + public GetPlaylistGeneratorRequest withGeneratorId(long generatorId) { + Utils.checkNotNull(generatorId, "generatorId"); + this.generatorId = generatorId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistGeneratorRequest other = (GetPlaylistGeneratorRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId) && + Utils.enhancedDeepEquals(this.generatorId, other.generatorId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + generatorId); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId, + "generatorId", generatorId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; + + private Long generatorId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + + /** + * The generator item ID to delete. + */ + public Builder generatorId(long generatorId) { + Utils.checkNotNull(generatorId, "generatorId"); + this.generatorId = generatorId; + return this; + } + + public GetPlaylistGeneratorRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetPlaylistGeneratorRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + generatorId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorRequestBuilder.java new file mode 100644 index 00000000..b4dbda5f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetPlaylistGenerator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetPlaylistGeneratorRequestBuilder { + + private GetPlaylistGeneratorRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPlaylistGeneratorRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPlaylistGeneratorRequestBuilder request(GetPlaylistGeneratorRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPlaylistGeneratorResponse call() throws Exception { + + RequestOperation operation + = new GetPlaylistGenerator.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorResponse.java new file mode 100644 index 00000000..65ad0339 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetPlaylistGeneratorResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetPlaylistGeneratorResponse( + 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 GetPlaylistGeneratorResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPlaylistGeneratorResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistGeneratorResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistGeneratorResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPlaylistGeneratorResponse withObject(GetPlaylistGeneratorResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetPlaylistGeneratorResponse 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; + } + GetPlaylistGeneratorResponse other = (GetPlaylistGeneratorResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetPlaylistGeneratorResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetPlaylistGeneratorResponse build() { + + return new GetPlaylistGeneratorResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorResponseBody.java new file mode 100644 index 00000000..8033e6f2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetPlaylistGeneratorResponseBody + * + *

OK + */ +public class GetPlaylistGeneratorResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetPlaylistGeneratorResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetPlaylistGeneratorResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPlaylistGeneratorResponseBody withMediaContainer(GetPlaylistGeneratorMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetPlaylistGeneratorResponseBody 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; + } + GetPlaylistGeneratorResponseBody other = (GetPlaylistGeneratorResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetPlaylistGeneratorMediaContainer 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 GetPlaylistGeneratorResponseBody build() { + + return new GetPlaylistGeneratorResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorScope.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorScope.java new file mode 100644 index 00000000..8cdf323d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorScope.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum GetPlaylistGeneratorScope { + ALL("all"), + COUNT("count"); + + @JsonValue + private final String value; + + GetPlaylistGeneratorScope(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (GetPlaylistGeneratorScope o: GetPlaylistGeneratorScope.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorState.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorState.java new file mode 100644 index 00000000..4d8cfb6d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorState.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; +import java.util.Objects; +import java.util.Optional; + +public enum GetPlaylistGeneratorState { + PENDING("pending"), + COMPLETE("complete"), + FAILED("failed"); + + @JsonValue + private final String value; + + GetPlaylistGeneratorState(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (GetPlaylistGeneratorState o: GetPlaylistGeneratorState.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorStatus.java new file mode 100644 index 00000000..306dfe61 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorStatus.java @@ -0,0 +1,289 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetPlaylistGeneratorStatus { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("itemsCompleteCount") + private Optional itemsCompleteCount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("itemsCount") + private Optional itemsCount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("itemsSuccessfulCount") + private Optional itemsSuccessfulCount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("state") + private Optional state; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + @JsonCreator + public GetPlaylistGeneratorStatus( + @JsonProperty("itemsCompleteCount") Optional itemsCompleteCount, + @JsonProperty("itemsCount") Optional itemsCount, + @JsonProperty("itemsSuccessfulCount") Optional itemsSuccessfulCount, + @JsonProperty("state") Optional state, + @JsonProperty("totalSize") Optional totalSize) { + Utils.checkNotNull(itemsCompleteCount, "itemsCompleteCount"); + Utils.checkNotNull(itemsCount, "itemsCount"); + Utils.checkNotNull(itemsSuccessfulCount, "itemsSuccessfulCount"); + Utils.checkNotNull(state, "state"); + Utils.checkNotNull(totalSize, "totalSize"); + this.itemsCompleteCount = itemsCompleteCount; + this.itemsCount = itemsCount; + this.itemsSuccessfulCount = itemsSuccessfulCount; + this.state = state; + this.totalSize = totalSize; + } + + public GetPlaylistGeneratorStatus() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional itemsCompleteCount() { + return itemsCompleteCount; + } + + @JsonIgnore + public Optional itemsCount() { + return itemsCount; + } + + @JsonIgnore + public Optional itemsSuccessfulCount() { + return itemsSuccessfulCount; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional state() { + return (Optional) state; + } + + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPlaylistGeneratorStatus withItemsCompleteCount(long itemsCompleteCount) { + Utils.checkNotNull(itemsCompleteCount, "itemsCompleteCount"); + this.itemsCompleteCount = Optional.ofNullable(itemsCompleteCount); + return this; + } + + + public GetPlaylistGeneratorStatus withItemsCompleteCount(Optional itemsCompleteCount) { + Utils.checkNotNull(itemsCompleteCount, "itemsCompleteCount"); + this.itemsCompleteCount = itemsCompleteCount; + return this; + } + + public GetPlaylistGeneratorStatus withItemsCount(long itemsCount) { + Utils.checkNotNull(itemsCount, "itemsCount"); + this.itemsCount = Optional.ofNullable(itemsCount); + return this; + } + + + public GetPlaylistGeneratorStatus withItemsCount(Optional itemsCount) { + Utils.checkNotNull(itemsCount, "itemsCount"); + this.itemsCount = itemsCount; + return this; + } + + public GetPlaylistGeneratorStatus withItemsSuccessfulCount(long itemsSuccessfulCount) { + Utils.checkNotNull(itemsSuccessfulCount, "itemsSuccessfulCount"); + this.itemsSuccessfulCount = Optional.ofNullable(itemsSuccessfulCount); + return this; + } + + + public GetPlaylistGeneratorStatus withItemsSuccessfulCount(Optional itemsSuccessfulCount) { + Utils.checkNotNull(itemsSuccessfulCount, "itemsSuccessfulCount"); + this.itemsSuccessfulCount = itemsSuccessfulCount; + return this; + } + + public GetPlaylistGeneratorStatus withState(GetPlaylistGeneratorState state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + + public GetPlaylistGeneratorStatus withState(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + public GetPlaylistGeneratorStatus withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + public GetPlaylistGeneratorStatus withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistGeneratorStatus other = (GetPlaylistGeneratorStatus) o; + return + Utils.enhancedDeepEquals(this.itemsCompleteCount, other.itemsCompleteCount) && + Utils.enhancedDeepEquals(this.itemsCount, other.itemsCount) && + Utils.enhancedDeepEquals(this.itemsSuccessfulCount, other.itemsSuccessfulCount) && + Utils.enhancedDeepEquals(this.state, other.state) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + itemsCompleteCount, itemsCount, itemsSuccessfulCount, + state, totalSize); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorStatus.class, + "itemsCompleteCount", itemsCompleteCount, + "itemsCount", itemsCount, + "itemsSuccessfulCount", itemsSuccessfulCount, + "state", state, + "totalSize", totalSize); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional itemsCompleteCount = Optional.empty(); + + private Optional itemsCount = Optional.empty(); + + private Optional itemsSuccessfulCount = Optional.empty(); + + private Optional state = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder itemsCompleteCount(long itemsCompleteCount) { + Utils.checkNotNull(itemsCompleteCount, "itemsCompleteCount"); + this.itemsCompleteCount = Optional.ofNullable(itemsCompleteCount); + return this; + } + + public Builder itemsCompleteCount(Optional itemsCompleteCount) { + Utils.checkNotNull(itemsCompleteCount, "itemsCompleteCount"); + this.itemsCompleteCount = itemsCompleteCount; + return this; + } + + + public Builder itemsCount(long itemsCount) { + Utils.checkNotNull(itemsCount, "itemsCount"); + this.itemsCount = Optional.ofNullable(itemsCount); + return this; + } + + public Builder itemsCount(Optional itemsCount) { + Utils.checkNotNull(itemsCount, "itemsCount"); + this.itemsCount = itemsCount; + return this; + } + + + public Builder itemsSuccessfulCount(long itemsSuccessfulCount) { + Utils.checkNotNull(itemsSuccessfulCount, "itemsSuccessfulCount"); + this.itemsSuccessfulCount = Optional.ofNullable(itemsSuccessfulCount); + return this; + } + + public Builder itemsSuccessfulCount(Optional itemsSuccessfulCount) { + Utils.checkNotNull(itemsSuccessfulCount, "itemsSuccessfulCount"); + this.itemsSuccessfulCount = itemsSuccessfulCount; + return this; + } + + + public Builder state(GetPlaylistGeneratorState state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + public Builder state(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + + public Builder totalSize(long 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; + } + + public GetPlaylistGeneratorStatus build() { + + return new GetPlaylistGeneratorStatus( + itemsCompleteCount, itemsCount, itemsSuccessfulCount, + state, totalSize); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorSubtitles.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorSubtitles.java new file mode 100644 index 00000000..8b358be8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorSubtitles.java @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum GetPlaylistGeneratorSubtitles { + AUTO("auto"), + BURN("burn"), + NONE("none"), + SIDECAR("sidecar"), + EMBEDDED("embedded"), + SEGMENTED("segmented"); + + @JsonValue + private final String value; + + GetPlaylistGeneratorSubtitles(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (GetPlaylistGeneratorSubtitles o: GetPlaylistGeneratorSubtitles.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorType.java new file mode 100644 index 00000000..5fd66bdb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorType.java @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +/** + * GetPlaylistGeneratorType + * + *

The type of this generator + */ +public enum GetPlaylistGeneratorType { + MINUS1(-1L), + FORTY_TWO(42L); + + @JsonValue + private final long value; + + GetPlaylistGeneratorType(long value) { + this.value = value; + } + + public long value() { + return value; + } + + public static Optional fromValue(long value) { + for (GetPlaylistGeneratorType o: GetPlaylistGeneratorType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsMediaContainer.java new file mode 100644 index 00000000..053fa6a7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetPlaylistGeneratorsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetPlaylistGeneratorsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("PlayQueueGenerator") + private Optional> playQueueGenerator; + + @JsonCreator + public GetPlaylistGeneratorsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("PlayQueueGenerator") Optional> playQueueGenerator) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(playQueueGenerator, "playQueueGenerator"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.playQueueGenerator = playQueueGenerator; + } + + public GetPlaylistGeneratorsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> playQueueGenerator() { + return (Optional>) playQueueGenerator; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPlaylistGeneratorsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetPlaylistGeneratorsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetPlaylistGeneratorsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetPlaylistGeneratorsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetPlaylistGeneratorsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetPlaylistGeneratorsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetPlaylistGeneratorsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetPlaylistGeneratorsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetPlaylistGeneratorsMediaContainer withPlayQueueGenerator(List playQueueGenerator) { + Utils.checkNotNull(playQueueGenerator, "playQueueGenerator"); + this.playQueueGenerator = Optional.ofNullable(playQueueGenerator); + return this; + } + + + public GetPlaylistGeneratorsMediaContainer withPlayQueueGenerator(Optional> playQueueGenerator) { + Utils.checkNotNull(playQueueGenerator, "playQueueGenerator"); + this.playQueueGenerator = playQueueGenerator; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistGeneratorsMediaContainer other = (GetPlaylistGeneratorsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.playQueueGenerator, other.playQueueGenerator); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, playQueueGenerator); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "playQueueGenerator", playQueueGenerator); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> playQueueGenerator = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder playQueueGenerator(List playQueueGenerator) { + Utils.checkNotNull(playQueueGenerator, "playQueueGenerator"); + this.playQueueGenerator = Optional.ofNullable(playQueueGenerator); + return this; + } + + public Builder playQueueGenerator(Optional> playQueueGenerator) { + Utils.checkNotNull(playQueueGenerator, "playQueueGenerator"); + this.playQueueGenerator = playQueueGenerator; + return this; + } + + public GetPlaylistGeneratorsMediaContainer build() { + + return new GetPlaylistGeneratorsMediaContainer( + identifier, offset, size, + totalSize, playQueueGenerator); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsRequest.java new file mode 100644 index 00000000..5b39bd20 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetPlaylistGeneratorsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; + + @JsonCreator + public GetPlaylistGeneratorsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + } + + public GetPlaylistGeneratorsRequest( + long playlistId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlaylistGeneratorsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlaylistGeneratorsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPlaylistGeneratorsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPlaylistGeneratorsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPlaylistGeneratorsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPlaylistGeneratorsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPlaylistGeneratorsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPlaylistGeneratorsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPlaylistGeneratorsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPlaylistGeneratorsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPlaylistGeneratorsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPlaylistGeneratorsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPlaylistGeneratorsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPlaylistGeneratorsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlaylistGeneratorsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlaylistGeneratorsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPlaylistGeneratorsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPlaylistGeneratorsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPlaylistGeneratorsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPlaylistGeneratorsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPlaylistGeneratorsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPlaylistGeneratorsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public GetPlaylistGeneratorsRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistGeneratorsRequest other = (GetPlaylistGeneratorsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + public GetPlaylistGeneratorsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetPlaylistGeneratorsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsRequestBuilder.java new file mode 100644 index 00000000..1618336c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetPlaylistGenerators; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetPlaylistGeneratorsRequestBuilder { + + private GetPlaylistGeneratorsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPlaylistGeneratorsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPlaylistGeneratorsRequestBuilder request(GetPlaylistGeneratorsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPlaylistGeneratorsResponse call() throws Exception { + + RequestOperation operation + = new GetPlaylistGenerators.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsResponse.java new file mode 100644 index 00000000..06064a82 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetPlaylistGeneratorsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetPlaylistGeneratorsResponse( + 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 GetPlaylistGeneratorsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPlaylistGeneratorsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistGeneratorsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistGeneratorsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPlaylistGeneratorsResponse withObject(GetPlaylistGeneratorsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetPlaylistGeneratorsResponse 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; + } + GetPlaylistGeneratorsResponse other = (GetPlaylistGeneratorsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetPlaylistGeneratorsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetPlaylistGeneratorsResponse build() { + + return new GetPlaylistGeneratorsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsResponseBody.java new file mode 100644 index 00000000..1d530c6e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetPlaylistGeneratorsResponseBody + * + *

OK + */ +public class GetPlaylistGeneratorsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetPlaylistGeneratorsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetPlaylistGeneratorsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPlaylistGeneratorsResponseBody withMediaContainer(GetPlaylistGeneratorsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetPlaylistGeneratorsResponseBody 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; + } + GetPlaylistGeneratorsResponseBody other = (GetPlaylistGeneratorsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetPlaylistGeneratorsMediaContainer 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 GetPlaylistGeneratorsResponseBody build() { + + return new GetPlaylistGeneratorsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsType.java new file mode 100644 index 00000000..af4f45da --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistGeneratorsType.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +/** + * GetPlaylistGeneratorsType + * + *

The type of playlist generator. + * + *

- -1: A smart playlist generator + * - 42: A optimized version generator + */ +public enum GetPlaylistGeneratorsType { + MINUS1(-1L), + FORTY_TWO(42L); + + @JsonValue + private final long value; + + GetPlaylistGeneratorsType(long value) { + this.value = value; + } + + public long value() { + return value; + } + + public static Optional fromValue(long value) { + for (GetPlaylistGeneratorsType o: GetPlaylistGeneratorsType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsRequest.java new file mode 100644 index 00000000..e776a579 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsRequest.java @@ -0,0 +1,844 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class GetPlaylistItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; + + /** + * The metadata types of the item to return. Values past the first are only used in fetching items from the background processing playlist. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=false,name=type") + private Optional> type; + + @JsonCreator + public GetPlaylistItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId, + Optional> type) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + Utils.checkNotNull(type, "type"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + this.type = type; + } + + public GetPlaylistItemsRequest( + long playlistId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; + } + + /** + * The metadata types of the item to return. Values past the first are only used in fetching items from the background processing playlist. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> type() { + return (Optional>) type; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlaylistItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlaylistItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPlaylistItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPlaylistItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPlaylistItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPlaylistItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPlaylistItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPlaylistItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPlaylistItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPlaylistItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPlaylistItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPlaylistItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPlaylistItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPlaylistItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlaylistItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlaylistItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPlaylistItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPlaylistItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPlaylistItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPlaylistItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPlaylistItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPlaylistItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public GetPlaylistItemsRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + /** + * The metadata types of the item to return. Values past the first are only used in fetching items from the background processing playlist. + */ + public GetPlaylistItemsRequest withType(List type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The metadata types of the item to return. Values past the first are only used in fetching items from the background processing playlist. + */ + public GetPlaylistItemsRequest withType(Optional> 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; + } + GetPlaylistItemsRequest other = (GetPlaylistItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId) && + Utils.enhancedDeepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + type); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId, + "type", type); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; + + private Optional> type = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + + /** + * The metadata types of the item to return. Values past the first are only used in fetching items from the background processing playlist. + */ + public Builder type(List type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The metadata types of the item to return. Values past the first are only used in fetching items from the background processing playlist. + */ + public Builder type(Optional> type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetPlaylistItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetPlaylistItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + type); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsRequestBuilder.java new file mode 100644 index 00000000..c0e47058 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetPlaylistItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetPlaylistItemsRequestBuilder { + + private GetPlaylistItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPlaylistItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPlaylistItemsRequestBuilder request(GetPlaylistItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPlaylistItemsResponse call() throws Exception { + + RequestOperation operation + = new GetPlaylistItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsResponse.java new file mode 100644 index 00000000..4a1cf78d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistItemsResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetPlaylistItemsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetPlaylistItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetPlaylistItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPlaylistItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPlaylistItemsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetPlaylistItemsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetPlaylistItemsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistItemsResponse other = (GetPlaylistItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetPlaylistItemsResponse build() { + + return new GetPlaylistItemsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistMediaContainer.java deleted file mode 100644 index 0a569775..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetPlaylistMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetPlaylistMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.metadata = metadata; - } - - public GetPlaylistMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetPlaylistMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetPlaylistMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetPlaylistMediaContainer 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; - } - GetPlaylistMediaContainer other = (GetPlaylistMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, metadata); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistMediaContainer.class, - "size", size, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 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 GetPlaylistMediaContainer build() { - - return new GetPlaylistMediaContainer( - size, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistMetadata.java deleted file mode 100644 index a8b66cd8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistMetadata.java +++ /dev/null @@ -1,727 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistMetadata { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("content") - private Optional content; - - - @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("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("summary") - private Optional summary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("smart") - private Optional smart; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("playlistType") - private Optional playlistType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("composite") - private Optional composite; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("icon") - private Optional icon; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("addedAt") - private Optional addedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - @JsonCreator - public GetPlaylistMetadata( - @JsonProperty("content") Optional content, - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("key") Optional key, - @JsonProperty("guid") Optional guid, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, - @JsonProperty("summary") Optional summary, - @JsonProperty("smart") Optional smart, - @JsonProperty("playlistType") Optional playlistType, - @JsonProperty("composite") Optional composite, - @JsonProperty("icon") Optional icon, - @JsonProperty("duration") Optional duration, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("updatedAt") Optional updatedAt) { - Utils.checkNotNull(content, "content"); - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(smart, "smart"); - Utils.checkNotNull(playlistType, "playlistType"); - Utils.checkNotNull(composite, "composite"); - Utils.checkNotNull(icon, "icon"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - this.content = content; - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.type = type; - this.title = title; - this.summary = summary; - this.smart = smart; - this.playlistType = playlistType; - this.composite = composite; - this.icon = icon; - this.duration = duration; - this.leafCount = leafCount; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - } - - public GetPlaylistMetadata() { - 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()); - } - - @JsonIgnore - public Optional content() { - return content; - } - - @JsonIgnore - public Optional ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional guid() { - return guid; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional summary() { - return summary; - } - - @JsonIgnore - public Optional smart() { - return smart; - } - - @JsonIgnore - public Optional playlistType() { - return playlistType; - } - - @JsonIgnore - public Optional composite() { - return composite; - } - - @JsonIgnore - public Optional icon() { - return icon; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional addedAt() { - return addedAt; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistMetadata withContent(String content) { - Utils.checkNotNull(content, "content"); - this.content = Optional.ofNullable(content); - return this; - } - - - public GetPlaylistMetadata withContent(Optional content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - public GetPlaylistMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetPlaylistMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetPlaylistMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetPlaylistMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetPlaylistMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public GetPlaylistMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public GetPlaylistMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetPlaylistMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetPlaylistMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetPlaylistMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetPlaylistMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public GetPlaylistMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public GetPlaylistMetadata withSmart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - - public GetPlaylistMetadata withSmart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - public GetPlaylistMetadata withPlaylistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - - public GetPlaylistMetadata withPlaylistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - public GetPlaylistMetadata withComposite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - - public GetPlaylistMetadata withComposite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - public GetPlaylistMetadata withIcon(String icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = Optional.ofNullable(icon); - return this; - } - - - public GetPlaylistMetadata withIcon(Optional icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = icon; - return this; - } - - public GetPlaylistMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetPlaylistMetadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetPlaylistMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - public GetPlaylistMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public GetPlaylistMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public GetPlaylistMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public GetPlaylistMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetPlaylistMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistMetadata other = (GetPlaylistMetadata) o; - return - Utils.enhancedDeepEquals(this.content, other.content) && - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.smart, other.smart) && - Utils.enhancedDeepEquals(this.playlistType, other.playlistType) && - Utils.enhancedDeepEquals(this.composite, other.composite) && - Utils.enhancedDeepEquals(this.icon, other.icon) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - content, ratingKey, key, - guid, type, title, - summary, smart, playlistType, - composite, icon, duration, - leafCount, addedAt, updatedAt); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistMetadata.class, - "content", content, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "type", type, - "title", title, - "summary", summary, - "smart", smart, - "playlistType", playlistType, - "composite", composite, - "icon", icon, - "duration", duration, - "leafCount", leafCount, - "addedAt", addedAt, - "updatedAt", updatedAt); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional content = Optional.empty(); - - private Optional ratingKey = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional guid = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional smart = Optional.empty(); - - private Optional playlistType = Optional.empty(); - - private Optional composite = Optional.empty(); - - private Optional icon = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional leafCount = Optional.empty(); - - private Optional addedAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder content(String content) { - Utils.checkNotNull(content, "content"); - this.content = Optional.ofNullable(content); - return this; - } - - public Builder content(Optional content) { - Utils.checkNotNull(content, "content"); - this.content = content; - return this; - } - - - public Builder ratingKey(String 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 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 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 smart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - public Builder smart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - - public Builder playlistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - public Builder playlistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - - public Builder composite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - public Builder composite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - - public Builder icon(String icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = Optional.ofNullable(icon); - return this; - } - - public Builder icon(Optional icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = icon; - return this; - } - - - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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 addedAt(int 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(int 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 GetPlaylistMetadata build() { - - return new GetPlaylistMetadata( - content, ratingKey, key, - guid, type, title, - summary, smart, playlistType, - composite, icon, duration, - leafCount, addedAt, updatedAt); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistRequest.java index cd491acf..7d7efa35 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistRequest.java @@ -5,33 +5,234 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.SpeakeasyMetadata; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; public class GetPlaylistRequest { /** - * the ID of the playlist + * Indicates the client accepts the indicated media types */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") - private double playlistID; + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; @JsonCreator public GetPlaylistRequest( - double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + } + + public GetPlaylistRequest( + long playlistId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId); } /** - * the ID of the playlist + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client */ @JsonIgnore - public double playlistID() { - return playlistID; + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; } public static Builder builder() { @@ -40,11 +241,220 @@ public class GetPlaylistRequest { /** - * the ID of the playlist + * Indicates the client accepts the indicated media types */ - public GetPlaylistRequest withPlaylistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public GetPlaylistRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPlaylistRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPlaylistRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPlaylistRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPlaylistRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPlaylistRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPlaylistRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPlaylistRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPlaylistRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPlaylistRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPlaylistRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPlaylistRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPlaylistRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPlaylistRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlaylistRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPlaylistRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPlaylistRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPlaylistRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPlaylistRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPlaylistRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPlaylistRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPlaylistRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public GetPlaylistRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; return this; } @@ -58,25 +468,72 @@ public class GetPlaylistRequest { } GetPlaylistRequest other = (GetPlaylistRequest) o; return - Utils.enhancedDeepEquals(this.playlistID, other.playlistID); + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId); } @Override public int hashCode() { return Utils.enhancedHash( - playlistID); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId); } @Override public String toString() { return Utils.toString(GetPlaylistRequest.class, - "playlistID", playlistID); + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Double playlistID; + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; private Builder() { // force use of static builder() method @@ -84,19 +541,240 @@ public class GetPlaylistRequest { /** - * the ID of the playlist + * Indicates the client accepts the indicated media types */ - public Builder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; return this; } public GetPlaylistRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } return new GetPlaylistRequest( - playlistID); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistRequestBuilder.java index f99a1382..89e75db5 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistRequestBuilder.java @@ -8,37 +8,27 @@ import static dev.plexapi.sdk.operations.Operations.RequestOperation; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.operations.GetPlaylist; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; import java.lang.Exception; public class GetPlaylistRequestBuilder { - private Double playlistID; + private GetPlaylistRequest request; private final SDKConfiguration sdkConfiguration; public GetPlaylistRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public GetPlaylistRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public GetPlaylistRequestBuilder request(GetPlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private GetPlaylistRequest buildRequest() { - - GetPlaylistRequest request = new GetPlaylistRequest(playlistID); - - return request; - } - public GetPlaylistResponse call() throws Exception { RequestOperation operation = new GetPlaylist.Sync(sdkConfiguration); - GetPlaylistRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistResponse.java index 530fa6dd..d9e44c22 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistResponse.java @@ -5,6 +5,7 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; import dev.plexapi.sdk.utils.Response; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; @@ -33,24 +34,24 @@ public class GetPlaylistResponse implements Response { private HttpResponse rawResponse; /** - * The playlist + * OK */ - private Optional object; + private Optional mediaContainerWithPlaylistMetadata; @JsonCreator public GetPlaylistResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional object) { + Optional mediaContainerWithPlaylistMetadata) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.object = object; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; } public GetPlaylistResponse( @@ -86,12 +87,12 @@ public class GetPlaylistResponse implements Response { } /** - * The playlist + * OK */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional object() { - return (Optional) object; + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; } public static Builder builder() { @@ -127,21 +128,21 @@ public class GetPlaylistResponse implements Response { } /** - * The playlist + * OK */ - public GetPlaylistResponse withObject(GetPlaylistResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public GetPlaylistResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); return this; } /** - * The playlist + * OK */ - public GetPlaylistResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public GetPlaylistResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; return this; } @@ -158,14 +159,14 @@ public class GetPlaylistResponse implements Response { Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); } @Override public int hashCode() { return Utils.enhancedHash( contentType, statusCode, rawResponse, - object); + mediaContainerWithPlaylistMetadata); } @Override @@ -174,7 +175,7 @@ public class GetPlaylistResponse implements Response { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "object", object); + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); } @SuppressWarnings("UnusedReturnValue") @@ -186,7 +187,7 @@ public class GetPlaylistResponse implements Response { private HttpResponse rawResponse; - private Optional object = Optional.empty(); + private Optional mediaContainerWithPlaylistMetadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -224,20 +225,20 @@ public class GetPlaylistResponse implements Response { /** - * The playlist + * OK */ - public Builder object(GetPlaylistResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); return this; } /** - * The playlist + * OK */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; return this; } @@ -245,7 +246,7 @@ public class GetPlaylistResponse implements Response { return new GetPlaylistResponse( contentType, statusCode, rawResponse, - object); + mediaContainerWithPlaylistMetadata); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistResponseBody.java deleted file mode 100644 index 6f312c2b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetPlaylistResponseBody - * - *

The playlist - */ -public class GetPlaylistResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetPlaylistResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetPlaylistResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistResponseBody withMediaContainer(GetPlaylistMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetPlaylistResponseBody 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; - } - GetPlaylistResponseBody other = (GetPlaylistResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetPlaylistMediaContainer 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 GetPlaylistResponseBody build() { - - return new GetPlaylistResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsMediaContainer.java deleted file mode 100644 index 19781a91..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetPlaylistsMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetPlaylistsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.metadata = metadata; - } - - public GetPlaylistsMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetPlaylistsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetPlaylistsMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetPlaylistsMediaContainer 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; - } - GetPlaylistsMediaContainer other = (GetPlaylistsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, metadata); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsMediaContainer.class, - "size", size, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 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 GetPlaylistsMediaContainer build() { - - return new GetPlaylistsMediaContainer( - size, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsMetadata.java deleted file mode 100644 index d3aab9c2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsMetadata.java +++ /dev/null @@ -1,773 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetPlaylistsMetadata { - - @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("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("summary") - private Optional summary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("smart") - private Optional smart; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("playlistType") - private Optional playlistType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("composite") - private Optional composite; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("icon") - private Optional icon; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("addedAt") - private Optional addedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - @JsonCreator - public GetPlaylistsMetadata( - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("key") Optional key, - @JsonProperty("guid") Optional guid, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, - @JsonProperty("summary") Optional summary, - @JsonProperty("smart") Optional smart, - @JsonProperty("playlistType") Optional playlistType, - @JsonProperty("composite") Optional composite, - @JsonProperty("icon") Optional icon, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("duration") Optional duration, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("updatedAt") Optional updatedAt) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(smart, "smart"); - Utils.checkNotNull(playlistType, "playlistType"); - Utils.checkNotNull(composite, "composite"); - Utils.checkNotNull(icon, "icon"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.type = type; - this.title = title; - this.summary = summary; - this.smart = smart; - this.playlistType = playlistType; - this.composite = composite; - this.icon = icon; - this.viewCount = viewCount; - this.lastViewedAt = lastViewedAt; - this.duration = duration; - this.leafCount = leafCount; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - } - - public GetPlaylistsMetadata() { - 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 ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional guid() { - return guid; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional summary() { - return summary; - } - - @JsonIgnore - public Optional smart() { - return smart; - } - - @JsonIgnore - public Optional playlistType() { - return playlistType; - } - - @JsonIgnore - public Optional composite() { - return composite; - } - - @JsonIgnore - public Optional icon() { - return icon; - } - - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional addedAt() { - return addedAt; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistsMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetPlaylistsMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetPlaylistsMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetPlaylistsMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetPlaylistsMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public GetPlaylistsMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public GetPlaylistsMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetPlaylistsMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetPlaylistsMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetPlaylistsMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetPlaylistsMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public GetPlaylistsMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public GetPlaylistsMetadata withSmart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - - public GetPlaylistsMetadata withSmart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - public GetPlaylistsMetadata withPlaylistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - - public GetPlaylistsMetadata withPlaylistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - public GetPlaylistsMetadata withComposite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - - public GetPlaylistsMetadata withComposite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - public GetPlaylistsMetadata withIcon(String icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = Optional.ofNullable(icon); - return this; - } - - - public GetPlaylistsMetadata withIcon(Optional icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = icon; - return this; - } - - public GetPlaylistsMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - - public GetPlaylistsMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - public GetPlaylistsMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - - public GetPlaylistsMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - public GetPlaylistsMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetPlaylistsMetadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetPlaylistsMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - public GetPlaylistsMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public GetPlaylistsMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public GetPlaylistsMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public GetPlaylistsMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetPlaylistsMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistsMetadata other = (GetPlaylistsMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.smart, other.smart) && - Utils.enhancedDeepEquals(this.playlistType, other.playlistType) && - Utils.enhancedDeepEquals(this.composite, other.composite) && - Utils.enhancedDeepEquals(this.icon, other.icon) && - Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && - Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - type, title, summary, - smart, playlistType, composite, - icon, viewCount, lastViewedAt, - duration, leafCount, addedAt, - updatedAt); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "type", type, - "title", title, - "summary", summary, - "smart", smart, - "playlistType", playlistType, - "composite", composite, - "icon", icon, - "viewCount", viewCount, - "lastViewedAt", lastViewedAt, - "duration", duration, - "leafCount", leafCount, - "addedAt", addedAt, - "updatedAt", updatedAt); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional ratingKey = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional guid = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional smart = Optional.empty(); - - private Optional playlistType = Optional.empty(); - - private Optional composite = Optional.empty(); - - private Optional icon = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional leafCount = Optional.empty(); - - private Optional addedAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder ratingKey(String 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 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 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 smart(boolean smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - public Builder smart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - - public Builder playlistType(String playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - public Builder playlistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - - public Builder composite(String composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = Optional.ofNullable(composite); - return this; - } - - public Builder composite(Optional composite) { - Utils.checkNotNull(composite, "composite"); - this.composite = composite; - return this; - } - - - public Builder icon(String icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = Optional.ofNullable(icon); - return this; - } - - public Builder icon(Optional icon) { - Utils.checkNotNull(icon, "icon"); - this.icon = icon; - 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 duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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 addedAt(int 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(int 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 GetPlaylistsMetadata build() { - - return new GetPlaylistsMetadata( - ratingKey, key, guid, - type, title, summary, - smart, playlistType, composite, - icon, viewCount, lastViewedAt, - duration, leafCount, addedAt, - updatedAt); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsRequest.java deleted file mode 100644 index fa1de942..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsRequest.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.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.Optional; - - -public class GetPlaylistsRequest { - /** - * limit to a type of playlist. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playlistType") - private Optional playlistType; - - /** - * type of playlists to return (default is all). - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=smart") - private Optional smart; - - @JsonCreator - public GetPlaylistsRequest( - Optional playlistType, - Optional smart) { - Utils.checkNotNull(playlistType, "playlistType"); - Utils.checkNotNull(smart, "smart"); - this.playlistType = playlistType; - this.smart = smart; - } - - public GetPlaylistsRequest() { - this(Optional.empty(), Optional.empty()); - } - - /** - * limit to a type of playlist. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional playlistType() { - return (Optional) playlistType; - } - - /** - * type of playlists to return (default is all). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional smart() { - return (Optional) smart; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * limit to a type of playlist. - */ - public GetPlaylistsRequest withPlaylistType(PlaylistType playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - - /** - * limit to a type of playlist. - */ - public GetPlaylistsRequest withPlaylistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - /** - * type of playlists to return (default is all). - */ - public GetPlaylistsRequest withSmart(QueryParamSmart smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - - /** - * type of playlists to return (default is all). - */ - public GetPlaylistsRequest withSmart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPlaylistsRequest other = (GetPlaylistsRequest) o; - return - Utils.enhancedDeepEquals(this.playlistType, other.playlistType) && - Utils.enhancedDeepEquals(this.smart, other.smart); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - playlistType, smart); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsRequest.class, - "playlistType", playlistType, - "smart", smart); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional playlistType = Optional.empty(); - - private Optional smart = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * limit to a type of playlist. - */ - public Builder playlistType(PlaylistType playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.ofNullable(playlistType); - return this; - } - - /** - * limit to a type of playlist. - */ - public Builder playlistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - - /** - * type of playlists to return (default is all). - */ - public Builder smart(QueryParamSmart smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.ofNullable(smart); - return this; - } - - /** - * type of playlists to return (default is all). - */ - public Builder smart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - public GetPlaylistsRequest build() { - - return new GetPlaylistsRequest( - playlistType, smart); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsRequestBuilder.java deleted file mode 100644 index 7468df3a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsRequestBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetPlaylists; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.Optional; - -public class GetPlaylistsRequestBuilder { - - private Optional playlistType = Optional.empty(); - private Optional smart = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetPlaylistsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetPlaylistsRequestBuilder playlistType(PlaylistType playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.of(playlistType); - return this; - } - - public GetPlaylistsRequestBuilder playlistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - public GetPlaylistsRequestBuilder smart(QueryParamSmart smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.of(smart); - return this; - } - - public GetPlaylistsRequestBuilder smart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - - private GetPlaylistsRequest buildRequest() { - - GetPlaylistsRequest request = new GetPlaylistsRequest(playlistType, - smart); - - return request; - } - - public GetPlaylistsResponse call() throws Exception { - - RequestOperation operation - = new GetPlaylists.Sync(sdkConfiguration); - GetPlaylistsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsResponse.java deleted file mode 100644 index 32dbe392..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetPlaylistsResponse 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; - - /** - * returns all playlists - */ - private Optional object; - - @JsonCreator - public GetPlaylistsResponse( - 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 GetPlaylistsResponse( - 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; - } - - /** - * returns all playlists - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetPlaylistsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetPlaylistsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * returns all playlists - */ - public GetPlaylistsResponse withObject(GetPlaylistsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * returns all playlists - */ - public GetPlaylistsResponse 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; - } - GetPlaylistsResponse other = (GetPlaylistsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * returns all playlists - */ - public Builder object(GetPlaylistsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * returns all playlists - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetPlaylistsResponse build() { - - return new GetPlaylistsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsResponseBody.java deleted file mode 100644 index e5855396..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetPlaylistsResponseBody - * - *

returns all playlists - */ -public class GetPlaylistsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetPlaylistsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetPlaylistsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetPlaylistsResponseBody withMediaContainer(GetPlaylistsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetPlaylistsResponseBody 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; - } - GetPlaylistsResponseBody other = (GetPlaylistsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetPlaylistsMediaContainer 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 GetPlaylistsResponseBody build() { - - return new GetPlaylistsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsRequest.java new file mode 100644 index 00000000..805ef48f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsRequest.java @@ -0,0 +1,903 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetPostplayHubsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The metadata ID for the hubs to fetch + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=metadataId") + private long metadataId; + + /** + * Limit results to count items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=onlyTransient") + private Optional onlyTransient; + + @JsonCreator + public GetPostplayHubsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long metadataId, + Optional count, + Optional onlyTransient) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(metadataId, "metadataId"); + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.metadataId = metadataId; + this.count = count; + this.onlyTransient = onlyTransient; + } + + public GetPostplayHubsRequest( + long metadataId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), metadataId, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The metadata ID for the hubs to fetch + */ + @JsonIgnore + public long metadataId() { + return metadataId; + } + + /** + * Limit results to count items + */ + @JsonIgnore + public Optional count() { + return count; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional onlyTransient() { + return (Optional) onlyTransient; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPostplayHubsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPostplayHubsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPostplayHubsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPostplayHubsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPostplayHubsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPostplayHubsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPostplayHubsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPostplayHubsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPostplayHubsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPostplayHubsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPostplayHubsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPostplayHubsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPostplayHubsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPostplayHubsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPostplayHubsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPostplayHubsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPostplayHubsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPostplayHubsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPostplayHubsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPostplayHubsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPostplayHubsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPostplayHubsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The metadata ID for the hubs to fetch + */ + public GetPostplayHubsRequest withMetadataId(long metadataId) { + Utils.checkNotNull(metadataId, "metadataId"); + this.metadataId = metadataId; + return this; + } + + /** + * Limit results to count items + */ + public GetPostplayHubsRequest withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + /** + * Limit results to count items + */ + public GetPostplayHubsRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public GetPostplayHubsRequest withOnlyTransient(BoolInt onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public GetPostplayHubsRequest withOnlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPostplayHubsRequest other = (GetPostplayHubsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.metadataId, other.metadataId) && + Utils.enhancedDeepEquals(this.count, other.count) && + Utils.enhancedDeepEquals(this.onlyTransient, other.onlyTransient); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, metadataId, + count, onlyTransient); + } + + @Override + public String toString() { + return Utils.toString(GetPostplayHubsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "metadataId", metadataId, + "count", count, + "onlyTransient", onlyTransient); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long metadataId; + + private Optional count = Optional.empty(); + + private Optional onlyTransient = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The metadata ID for the hubs to fetch + */ + public Builder metadataId(long metadataId) { + Utils.checkNotNull(metadataId, "metadataId"); + this.metadataId = metadataId; + return this; + } + + + /** + * Limit results to count items + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * Limit results to count items + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public Builder onlyTransient(BoolInt onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public Builder onlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + public GetPostplayHubsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetPostplayHubsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, metadataId, + count, onlyTransient); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsRequestBuilder.java new file mode 100644 index 00000000..eeb8a6ba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetPostplayHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetPostplayHubsRequestBuilder { + + private GetPostplayHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPostplayHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPostplayHubsRequestBuilder request(GetPostplayHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPostplayHubsResponse call() throws Exception { + + RequestOperation operation + = new GetPostplayHubs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsResponse.java new file mode 100644 index 00000000..a9277e38 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPostplayHubsResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithHubs; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetPostplayHubsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithHubs; + + + private Map> headers; + + @JsonCreator + public GetPostplayHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithHubs, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithHubs = mediaContainerWithHubs; + this.headers = headers; + } + + public GetPostplayHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithHubs() { + return (Optional) mediaContainerWithHubs; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPostplayHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPostplayHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPostplayHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPostplayHubsResponse withMediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + + /** + * OK + */ + public GetPostplayHubsResponse withMediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + public GetPostplayHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPostplayHubsResponse other = (GetPostplayHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithHubs, other.mediaContainerWithHubs) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + @Override + public String toString() { + return Utils.toString(GetPostplayHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithHubs", mediaContainerWithHubs, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithHubs = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetPostplayHubsResponse build() { + + return new GetPostplayHubsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceRequest.java new file mode 100644 index 00000000..f25cb158 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceRequest.java @@ -0,0 +1,797 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetPreferenceRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The preference to fetch + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=id") + private Optional id; + + @JsonCreator + public GetPreferenceRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional id) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(id, "id"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.id = id; + } + + public GetPreferenceRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The preference to fetch + */ + @JsonIgnore + public Optional id() { + return id; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPreferenceRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPreferenceRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPreferenceRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPreferenceRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPreferenceRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPreferenceRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPreferenceRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPreferenceRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPreferenceRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPreferenceRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPreferenceRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPreferenceRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPreferenceRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPreferenceRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPreferenceRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPreferenceRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPreferenceRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPreferenceRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPreferenceRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPreferenceRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPreferenceRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPreferenceRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The preference to fetch + */ + public GetPreferenceRequest withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * The preference to fetch + */ + public GetPreferenceRequest withId(Optional 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; + } + GetPreferenceRequest other = (GetPreferenceRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.id, other.id); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, id); + } + + @Override + public String toString() { + return Utils.toString(GetPreferenceRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "id", id); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional id = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The preference to fetch + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * The preference to fetch + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetPreferenceRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetPreferenceRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, id); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceRequestBuilder.java new file mode 100644 index 00000000..e0e5e50a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetPreference; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetPreferenceRequestBuilder { + + private GetPreferenceRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPreferenceRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPreferenceRequestBuilder request(GetPreferenceRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPreferenceResponse call() throws Exception { + + RequestOperation operation + = new GetPreference.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceResponse.java new file mode 100644 index 00000000..ff36d79d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPreferenceResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSettings; +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.Optional; + + +public class GetPreferenceResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithSettings; + + @JsonCreator + public GetPreferenceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSettings) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSettings = mediaContainerWithSettings; + } + + public GetPreferenceResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSettings() { + return (Optional) mediaContainerWithSettings; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPreferenceResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPreferenceResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPreferenceResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPreferenceResponse withMediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + + /** + * OK + */ + public GetPreferenceResponse withMediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPreferenceResponse other = (GetPreferenceResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSettings, other.mediaContainerWithSettings); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + @Override + public String toString() { + return Utils.toString(GetPreferenceResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSettings", mediaContainerWithSettings); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSettings = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + public GetPreferenceResponse build() { + + return new GetPreferenceResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsMediaContainer.java new file mode 100644 index 00000000..c454dab2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Hub; +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.List; +import java.util.Optional; + +/** + * GetPromotedHubsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetPromotedHubsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + @JsonCreator + public GetPromotedHubsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(hub, "hub"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.hub = hub; + } + + public GetPromotedHubsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hub() { + return (Optional>) hub; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPromotedHubsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetPromotedHubsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetPromotedHubsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetPromotedHubsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetPromotedHubsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetPromotedHubsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetPromotedHubsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetPromotedHubsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetPromotedHubsMediaContainer withHub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + + public GetPromotedHubsMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPromotedHubsMediaContainer other = (GetPromotedHubsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, hub); + } + + @Override + public String toString() { + return Utils.toString(GetPromotedHubsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "hub", hub); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder hub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public GetPromotedHubsMediaContainer build() { + + return new GetPromotedHubsMediaContainer( + identifier, offset, size, + totalSize, hub); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsRequest.java new file mode 100644 index 00000000..cb4f7094 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsRequest.java @@ -0,0 +1,798 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetPromotedHubsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Limit results to count items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + @JsonCreator + public GetPromotedHubsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional count) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(count, "count"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.count = count; + } + + public GetPromotedHubsRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Limit results to count items + */ + @JsonIgnore + public Optional count() { + return count; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPromotedHubsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetPromotedHubsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetPromotedHubsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetPromotedHubsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetPromotedHubsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetPromotedHubsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetPromotedHubsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetPromotedHubsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetPromotedHubsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetPromotedHubsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetPromotedHubsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetPromotedHubsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetPromotedHubsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetPromotedHubsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetPromotedHubsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetPromotedHubsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetPromotedHubsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetPromotedHubsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetPromotedHubsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetPromotedHubsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetPromotedHubsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetPromotedHubsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Limit results to count items + */ + public GetPromotedHubsRequest withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + /** + * Limit results to count items + */ + public GetPromotedHubsRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPromotedHubsRequest other = (GetPromotedHubsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.count, other.count); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, count); + } + + @Override + public String toString() { + return Utils.toString(GetPromotedHubsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "count", count); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional count = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Limit results to count items + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * Limit results to count items + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + public GetPromotedHubsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetPromotedHubsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, count); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsRequestBuilder.java new file mode 100644 index 00000000..e2791e77 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetPromotedHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetPromotedHubsRequestBuilder { + + private GetPromotedHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPromotedHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPromotedHubsRequestBuilder request(GetPromotedHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPromotedHubsResponse call() throws Exception { + + RequestOperation operation + = new GetPromotedHubs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsResponse.java new file mode 100644 index 00000000..bdd059ba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetPromotedHubsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetPromotedHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetPromotedHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPromotedHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPromotedHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPromotedHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPromotedHubsResponse withObject(GetPromotedHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetPromotedHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetPromotedHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPromotedHubsResponse other = (GetPromotedHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetPromotedHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetPromotedHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetPromotedHubsResponse build() { + + return new GetPromotedHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsResponseBody.java new file mode 100644 index 00000000..411bac7d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPromotedHubsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetPromotedHubsResponseBody + * + *

OK + */ +public class GetPromotedHubsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetPromotedHubsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetPromotedHubsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetPromotedHubsResponseBody withMediaContainer(GetPromotedHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetPromotedHubsResponseBody 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; + } + GetPromotedHubsResponseBody other = (GetPromotedHubsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetPromotedHubsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetPromotedHubsMediaContainer 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 GetPromotedHubsResponseBody build() { + + return new GetPromotedHubsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkRequest.java new file mode 100644 index 00000000..60d2c68e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkRequest.java @@ -0,0 +1,800 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class GetRandomArtworkRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The sections for which to fetch artwork. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=false,name=sections") + private Optional> sections; + + @JsonCreator + public GetRandomArtworkRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional> sections) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sections, "sections"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sections = sections; + } + + public GetRandomArtworkRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The sections for which to fetch artwork. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> sections() { + return (Optional>) sections; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetRandomArtworkRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetRandomArtworkRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetRandomArtworkRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetRandomArtworkRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetRandomArtworkRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetRandomArtworkRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetRandomArtworkRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetRandomArtworkRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetRandomArtworkRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetRandomArtworkRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetRandomArtworkRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetRandomArtworkRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetRandomArtworkRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetRandomArtworkRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetRandomArtworkRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetRandomArtworkRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetRandomArtworkRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetRandomArtworkRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetRandomArtworkRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetRandomArtworkRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetRandomArtworkRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetRandomArtworkRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The sections for which to fetch artwork. + */ + public GetRandomArtworkRequest withSections(List sections) { + Utils.checkNotNull(sections, "sections"); + this.sections = Optional.ofNullable(sections); + return this; + } + + + /** + * The sections for which to fetch artwork. + */ + public GetRandomArtworkRequest withSections(Optional> sections) { + Utils.checkNotNull(sections, "sections"); + this.sections = sections; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRandomArtworkRequest other = (GetRandomArtworkRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sections, other.sections); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sections); + } + + @Override + public String toString() { + return Utils.toString(GetRandomArtworkRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sections", sections); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional> sections = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The sections for which to fetch artwork. + */ + public Builder sections(List sections) { + Utils.checkNotNull(sections, "sections"); + this.sections = Optional.ofNullable(sections); + return this; + } + + /** + * The sections for which to fetch artwork. + */ + public Builder sections(Optional> sections) { + Utils.checkNotNull(sections, "sections"); + this.sections = sections; + return this; + } + + public GetRandomArtworkRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetRandomArtworkRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sections); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkRequestBuilder.java new file mode 100644 index 00000000..283de6b9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetRandomArtwork; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetRandomArtworkRequestBuilder { + + private GetRandomArtworkRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetRandomArtworkRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetRandomArtworkRequestBuilder request(GetRandomArtworkRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetRandomArtworkResponse call() throws Exception { + + RequestOperation operation + = new GetRandomArtwork.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkResponse.java new file mode 100644 index 00000000..3bf42025 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRandomArtworkResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +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.Optional; + + +public class GetRandomArtworkResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithArtwork; + + @JsonCreator + public GetRandomArtworkResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithArtwork) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + } + + public GetRandomArtworkResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithArtwork() { + return (Optional) mediaContainerWithArtwork; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetRandomArtworkResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetRandomArtworkResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRandomArtworkResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetRandomArtworkResponse withMediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + + /** + * OK + */ + public GetRandomArtworkResponse withMediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRandomArtworkResponse other = (GetRandomArtworkResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithArtwork, other.mediaContainerWithArtwork); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + @Override + public String toString() { + return Utils.toString(GetRandomArtworkResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithArtwork", mediaContainerWithArtwork); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithArtwork = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + public GetRandomArtworkResponse build() { + + return new GetRandomArtworkResponse( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedActiveDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedActiveDirection.java deleted file mode 100644 index 7c6d4b53..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedActiveDirection.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetRecentlyAddedActiveDirection - * - *

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

The direction of the sort. Can be either `asc` or `desc`. - */ -public enum GetRecentlyAddedDefaultDirection { - Ascending("asc"), - Descending("desc"); - - @JsonValue - private final String value; - - GetRecentlyAddedDefaultDirection(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetRecentlyAddedDefaultDirection o: GetRecentlyAddedDefaultDirection.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedField.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedField.java deleted file mode 100644 index e700f146..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedField.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.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 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 - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.subType, other.subType); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title, type, - subType); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedField.class, - "key", key, - "title", title, - "type", type, - "subType", subType); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index cda02f01..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedFieldType.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.List; - - -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 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 - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.operator, other.operator); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - type, operator); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedFieldType.class, - "type", type, - "operator", operator); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index e7f47ad1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedFilter.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -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; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("advanced") - private Optional advanced; - - @JsonCreator - public GetRecentlyAddedFilter( - @JsonProperty("filter") String filter, - @JsonProperty("filterType") String filterType, - @JsonProperty("key") String key, - @JsonProperty("title") String title, - @JsonProperty("type") String type, - @JsonProperty("advanced") Optional advanced) { - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(filterType, "filterType"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(advanced, "advanced"); - this.filter = filter; - this.filterType = filterType; - this.key = key; - this.title = title; - this.type = type; - this.advanced = advanced; - } - - public GetRecentlyAddedFilter( - String filter, - String filterType, - String key, - String title, - String type) { - this(filter, filterType, key, - title, type, Optional.empty()); - } - - @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; - } - - @JsonIgnore - public Optional advanced() { - return advanced; - } - - public 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; - } - - public GetRecentlyAddedFilter withAdvanced(boolean advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = Optional.ofNullable(advanced); - return this; - } - - - public GetRecentlyAddedFilter withAdvanced(Optional advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = advanced; - 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 - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.filterType, other.filterType) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.advanced, other.advanced); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - filter, filterType, key, - title, type, advanced); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedFilter.class, - "filter", filter, - "filterType", filterType, - "key", key, - "title", title, - "type", type, - "advanced", advanced); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String filter; - - private String filterType; - - private String key; - - private String title; - - private String type; - - private Optional advanced = Optional.empty(); - - 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 Builder advanced(boolean advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = Optional.ofNullable(advanced); - return this; - } - - public Builder advanced(Optional advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = advanced; - return this; - } - - public GetRecentlyAddedFilter build() { - - return new GetRecentlyAddedFilter( - filter, filterType, key, - title, type, advanced); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsResponseType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsResponseType.java deleted file mode 100644 index 2798b5ba..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsResponseType.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

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

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

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

The type of media content in the Plex library. This can represent videos, music, or photos. - */ -@JsonDeserialize(using = GetRecentlyAddedHubsType._Deserializer.class) -@JsonSerialize(using = GetRecentlyAddedHubsType._Serializer.class) -public class GetRecentlyAddedHubsType { - - public static final GetRecentlyAddedHubsType Movie = new GetRecentlyAddedHubsType("movie"); - public static final GetRecentlyAddedHubsType TvShow = new GetRecentlyAddedHubsType("show"); - public static final GetRecentlyAddedHubsType Season = new GetRecentlyAddedHubsType("season"); - public static final GetRecentlyAddedHubsType Episode = new GetRecentlyAddedHubsType("episode"); - public static final GetRecentlyAddedHubsType Artist = new GetRecentlyAddedHubsType("artist"); - public static final GetRecentlyAddedHubsType Album = new GetRecentlyAddedHubsType("album"); - public static final GetRecentlyAddedHubsType Track = new GetRecentlyAddedHubsType("track"); - public static final GetRecentlyAddedHubsType PhotoAlbum = new GetRecentlyAddedHubsType("photoalbum"); - public static final GetRecentlyAddedHubsType Photo = new GetRecentlyAddedHubsType("photo"); - public static final GetRecentlyAddedHubsType Collection = new GetRecentlyAddedHubsType("collection"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetRecentlyAddedHubsType(String value) { - this.value = value; - } - - /** - * Returns a GetRecentlyAddedHubsType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetRecentlyAddedHubsType - */ - public static GetRecentlyAddedHubsType of(String value) { - synchronized (GetRecentlyAddedHubsType.class) { - return values.computeIfAbsent(value, v -> new GetRecentlyAddedHubsType(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetRecentlyAddedHubsType other = (GetRecentlyAddedHubsType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetRecentlyAddedHubsType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetRecentlyAddedHubsType[] values() { - synchronized (GetRecentlyAddedHubsType.class) { - return values.values().toArray(new GetRecentlyAddedHubsType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("movie", Movie); - map.put("show", TvShow); - map.put("season", Season); - map.put("episode", Episode); - map.put("artist", Artist); - map.put("album", Album); - map.put("track", Track); - map.put("photoalbum", PhotoAlbum); - map.put("photo", Photo); - map.put("collection", Collection); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("movie", GetRecentlyAddedHubsTypeEnum.Movie); - map.put("show", GetRecentlyAddedHubsTypeEnum.TvShow); - map.put("season", GetRecentlyAddedHubsTypeEnum.Season); - map.put("episode", GetRecentlyAddedHubsTypeEnum.Episode); - map.put("artist", GetRecentlyAddedHubsTypeEnum.Artist); - map.put("album", GetRecentlyAddedHubsTypeEnum.Album); - map.put("track", GetRecentlyAddedHubsTypeEnum.Track); - map.put("photoalbum", GetRecentlyAddedHubsTypeEnum.PhotoAlbum); - map.put("photo", GetRecentlyAddedHubsTypeEnum.Photo); - map.put("collection", GetRecentlyAddedHubsTypeEnum.Collection); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetRecentlyAddedHubsType.class); - } - - @Override - public void serialize(GetRecentlyAddedHubsType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetRecentlyAddedHubsType.class); - } - - @Override - public GetRecentlyAddedHubsType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetRecentlyAddedHubsType.of(v); - } - } - - public enum GetRecentlyAddedHubsTypeEnum { - - Movie("movie"), - TvShow("show"), - Season("season"), - Episode("episode"), - Artist("artist"), - Album("album"), - Track("track"), - PhotoAlbum("photoalbum"), - Photo("photo"), - Collection("collection"),; - - private final String value; - - private GetRecentlyAddedHubsTypeEnum(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 deleted file mode 100644 index 3d29e59e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedImage.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -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 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 - Utils.enhancedDeepEquals(this.alt, other.alt) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.url, other.url); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - alt, type, url); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedImage.class, - "alt", alt, - "type", type, - "url", url); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index 96d74990..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryCountry.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.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 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 - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryCountry.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index 4961f0de..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryDirector.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.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 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 - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryDirector.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index dd2f3f41..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryFilter.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -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; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("advanced") - private Optional advanced; - - @JsonCreator - public GetRecentlyAddedLibraryFilter( - @JsonProperty("filter") String filter, - @JsonProperty("filterType") String filterType, - @JsonProperty("key") String key, - @JsonProperty("title") String title, - @JsonProperty("type") String type, - @JsonProperty("advanced") Optional advanced) { - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(filterType, "filterType"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(advanced, "advanced"); - this.filter = filter; - this.filterType = filterType; - this.key = key; - this.title = title; - this.type = type; - this.advanced = advanced; - } - - public GetRecentlyAddedLibraryFilter( - String filter, - String filterType, - String key, - String title, - String type) { - this(filter, filterType, key, - title, type, Optional.empty()); - } - - @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; - } - - @JsonIgnore - public Optional advanced() { - return advanced; - } - - public 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; - } - - public GetRecentlyAddedLibraryFilter withAdvanced(boolean advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = Optional.ofNullable(advanced); - return this; - } - - - public GetRecentlyAddedLibraryFilter withAdvanced(Optional advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = advanced; - 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 - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.filterType, other.filterType) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.advanced, other.advanced); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - filter, filterType, key, - title, type, advanced); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryFilter.class, - "filter", filter, - "filterType", filterType, - "key", key, - "title", title, - "type", type, - "advanced", advanced); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String filter; - - private String filterType; - - private String key; - - private String title; - - private String type; - - private Optional advanced = Optional.empty(); - - 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 Builder advanced(boolean advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = Optional.ofNullable(advanced); - return this; - } - - public Builder advanced(Optional advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = advanced; - return this; - } - - public GetRecentlyAddedLibraryFilter build() { - - return new GetRecentlyAddedLibraryFilter( - filter, filterType, key, - title, type, advanced); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryGenre.java deleted file mode 100644 index 3384a554..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryGenre.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.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 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 - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryGenre.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index ba1afdb1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMedia.java +++ /dev/null @@ -1,776 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -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 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 - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && - Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.part, other.part); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - 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); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index d3f2b899..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMediaContainer.java +++ /dev/null @@ -1,472 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -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 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 - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.fieldType, other.fieldType) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.mixedParents, other.mixedParents) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - 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); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index a929c501..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMetadata.java +++ /dev/null @@ -1,1485 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; -import java.util.List; -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 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 - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionUUID, other.librarySectionUUID) && - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.rating, other.rating) && - Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && - Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && - Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && - Utils.enhancedDeepEquals(this.media, other.media) && - Utils.enhancedDeepEquals(this.genre, other.genre) && - Utils.enhancedDeepEquals(this.director, other.director) && - Utils.enhancedDeepEquals(this.writer, other.writer) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.role, other.role); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - 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); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index 0e8082b4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryPart.java +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -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 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 - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.file, other.file) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.hasThumbnail, other.hasThumbnail) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - 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); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index d862f065..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRequest.java +++ /dev/null @@ -1,512 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.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.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 or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @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 or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @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 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 or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public 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 - Utils.enhancedDeepEquals(this.contentDirectoryID, other.contentDirectoryID) && - Utils.enhancedDeepEquals(this.pinnedContentDirectoryID, other.pinnedContentDirectoryID) && - Utils.enhancedDeepEquals(this.sectionID, other.sectionID) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.includeMeta, other.includeMeta) && - Utils.enhancedDeepEquals(this.xPlexContainerStart, other.xPlexContainerStart) && - Utils.enhancedDeepEquals(this.xPlexContainerSize, other.xPlexContainerSize); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - 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); - } - - @SuppressWarnings("UnusedReturnValue") - 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 or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public 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 deleted file mode 100644 index 28bc60c8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRequestBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetRecentlyAddedLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; - -public class GetRecentlyAddedLibraryRequestBuilder { - - private GetRecentlyAddedLibraryRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetRecentlyAddedLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetRecentlyAddedLibraryRequestBuilder request(GetRecentlyAddedLibraryRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetRecentlyAddedLibraryResponse call() throws Exception { - - RequestOperation operation - = new GetRecentlyAddedLibrary.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(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 deleted file mode 100644 index 1e0f9ab7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.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 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 - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index 4b7c83bb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -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 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 - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index 973bc516..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRole.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.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 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 - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryRole.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index 5a2ff0f9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryType.java +++ /dev/null @@ -1,372 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetRecentlyAddedLibraryType { - - @JsonProperty("key") - private String key; - - - @JsonProperty("type") - private String type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; - - - @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("subtype") Optional subtype, - @JsonProperty("title") String title, - @JsonProperty("active") boolean active, - @JsonProperty("Filter") Optional> filter, - @JsonProperty("Sort") Optional> sort, - @JsonProperty("Field") Optional> field) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(active, "active"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(sort, "sort"); - Utils.checkNotNull(field, "field"); - this.key = key; - this.type = type; - this.subtype = subtype; - this.title = title; - this.active = active; - this.filter = filter; - this.sort = sort; - this.field = field; - } - - public GetRecentlyAddedLibraryType( - String key, - String type, - String title, - boolean active) { - this(key, type, Optional.empty(), - title, active, Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public Optional subtype() { - return subtype; - } - - @JsonIgnore - public String title() { - return title; - } - - @JsonIgnore - public boolean active() { - return active; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> filter() { - return (Optional>) filter; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> sort() { - return (Optional>) sort; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> field() { - return (Optional>) field; - } - - public 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 withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - - public GetRecentlyAddedLibraryType withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - 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 - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.subtype, other.subtype) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.sort, other.sort) && - Utils.enhancedDeepEquals(this.field, other.field); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, type, subtype, - title, active, filter, - sort, field); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryType.class, - "key", key, - "type", type, - "subtype", subtype, - "title", title, - "active", active, - "filter", filter, - "sort", sort, - "field", field); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String key; - - private String type; - - private Optional subtype = Optional.empty(); - - private String title; - - private Boolean active; - - private Optional> filter = Optional.empty(); - - private Optional> sort = Optional.empty(); - - private Optional> field = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 subtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - public Builder subtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - public Builder active(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - - public Builder filter(List filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - public Builder filter(Optional> filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - public Builder sort(List sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - public Builder sort(Optional> sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - - public Builder field(List field) { - Utils.checkNotNull(field, "field"); - this.field = Optional.ofNullable(field); - return this; - } - - public Builder field(Optional> field) { - Utils.checkNotNull(field, "field"); - this.field = field; - return this; - } - - public GetRecentlyAddedLibraryType build() { - - return new GetRecentlyAddedLibraryType( - key, type, subtype, - 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 deleted file mode 100644 index 186e8d26..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryWriter.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.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 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 - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryWriter.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index 95a2d0d7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMediaContainer.java +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetRecentlyAddedMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * Total number of media items in the library. - */ - @JsonProperty("totalSize") - private int totalSize; - - /** - * Offset value for pagination. - */ - @JsonProperty("offset") - private long offset; - - /** - * Indicates whether syncing is allowed. - */ - @JsonProperty("allowSync") - private boolean allowSync; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Meta") - private Optional meta; - - /** - * An array of metadata items. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetRecentlyAddedMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("totalSize") int totalSize, - @JsonProperty("offset") long offset, - @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("identifier") String identifier, - @JsonProperty("Meta") Optional meta, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(totalSize, "totalSize"); - Utils.checkNotNull(offset, "offset"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(meta, "meta"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.totalSize = totalSize; - this.offset = offset; - this.allowSync = allowSync; - this.identifier = identifier; - this.meta = meta; - this.metadata = metadata; - } - - public GetRecentlyAddedMediaContainer( - int size, - int totalSize, - long offset, - boolean allowSync, - String identifier) { - this(size, totalSize, offset, - allowSync, identifier, Optional.empty(), - Optional.empty()); - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * Total number of media items in the library. - */ - @JsonIgnore - public int totalSize() { - return totalSize; - } - - /** - * Offset value for pagination. - */ - @JsonIgnore - public long offset() { - return offset; - } - - /** - * Indicates whether syncing is allowed. - */ - @JsonIgnore - public boolean allowSync() { - return allowSync; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - /** - * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional meta() { - return (Optional) meta; - } - - /** - * An array of metadata items. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetRecentlyAddedMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * Total number of media items in the library. - */ - public GetRecentlyAddedMediaContainer withTotalSize(int totalSize) { - Utils.checkNotNull(totalSize, "totalSize"); - this.totalSize = totalSize; - return this; - } - - /** - * Offset value for pagination. - */ - public GetRecentlyAddedMediaContainer withOffset(long offset) { - Utils.checkNotNull(offset, "offset"); - this.offset = offset; - return this; - } - - /** - * Indicates whether syncing is allowed. - */ - public GetRecentlyAddedMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetRecentlyAddedMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - /** - * 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; - } - - - /** - * 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; - } - - /** - * An array of metadata items. - */ - public GetRecentlyAddedMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - /** - * An array of metadata items. - */ - public GetRecentlyAddedMediaContainer 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; - } - GetRecentlyAddedMediaContainer other = (GetRecentlyAddedMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && - Utils.enhancedDeepEquals(this.offset, other.offset) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.meta, other.meta) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, totalSize, offset, - allowSync, identifier, meta, - metadata); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedMediaContainer.class, - "size", size, - "totalSize", totalSize, - "offset", offset, - "allowSync", allowSync, - "identifier", identifier, - "meta", meta, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Integer totalSize; - - private Long offset; - - private Boolean allowSync; - - private String identifier; - - private Optional meta = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * Total number of media items in the library. - */ - public Builder totalSize(int totalSize) { - Utils.checkNotNull(totalSize, "totalSize"); - this.totalSize = totalSize; - return this; - } - - - /** - * Offset value for pagination. - */ - public Builder offset(long offset) { - Utils.checkNotNull(offset, "offset"); - this.offset = offset; - return this; - } - - - /** - * Indicates whether syncing is allowed. - */ - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - /** - * The 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; - } - - /** - * 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; - } - - - /** - * An array of metadata items. - */ - public Builder metadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - /** - * An array of metadata items. - */ - public Builder metadata(Optional> metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - public GetRecentlyAddedMediaContainer build() { - - return new GetRecentlyAddedMediaContainer( - size, totalSize, offset, - allowSync, identifier, 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 deleted file mode 100644 index dc67c4b4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMetadata.java +++ /dev/null @@ -1,4006 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Float; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.LocalDate; -import java.util.List; -import java.util.Optional; - -/** - * GetRecentlyAddedMetadata - * - *

Unknown - */ -public class GetRecentlyAddedMetadata { - - @JsonProperty("addedAt") - private long addedAt; - - /** - * The art image URL for the media item. - */ - @JsonProperty("art") - private String art; - - /** - * The URL for the audience rating image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audienceRatingImage") - private Optional audienceRatingImage; - - /** - * The audience rating for the media item. - */ - @JsonProperty("audienceRating") - private double audienceRating; - - /** - * The source from which chapter data is derived. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chapterSource") - private Optional chapterSource; - - /** - * The number of child items associated with this media item. - */ - @JsonProperty("childCount") - private int childCount; - - /** - * The content rating for the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("contentRating") - private Optional contentRating; - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAtAccuracy") - private Optional createdAtAccuracy; - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAtTZOffset") - private Optional createdAtTZOffset; - - /** - * The duration of the media item in milliseconds. - */ - @JsonProperty("duration") - private int duration; - - /** - * The art URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentArt") - private Optional grandparentArt; - - /** - * The GUID of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentGuid") - private Optional grandparentGuid; - - /** - * The key of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentKey") - private Optional grandparentKey; - - /** - * The rating key of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentRatingKey") - private Optional grandparentRatingKey; - - /** - * The slug for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentSlug") - private Optional grandparentSlug; - - /** - * The theme URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTheme") - private Optional grandparentTheme; - - /** - * The thumbnail URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentThumb") - private Optional grandparentThumb; - - /** - * The title of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTitle") - private Optional grandparentTitle; - - /** - * The globally unique identifier for the media item. - */ - @JsonProperty("guid") - private String guid; - - /** - * The index position of the media item. - */ - @JsonProperty("index") - private int index; - - /** - * The unique key for the media item. - */ - @JsonProperty("key") - private String key; - - /** - * The Unix timestamp representing the last time the item was rated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastRatedAt") - private Optional lastRatedAt; - - /** - * Unix timestamp for when the media item was last viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - /** - * The number of leaf items (end nodes) under this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - /** - * The identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - /** - * The key corresponding to the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionKey") - private Optional librarySectionKey; - - /** - * The title of the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - /** - * The original title of the media item (if different). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originalTitle") - private Optional originalTitle; - - /** - * The original release date of the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originallyAvailableAt") - private Optional originallyAvailableAt; - - /** - * The GUID of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentGuid") - private Optional parentGuid; - - /** - * The index position of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - /** - * The key of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - /** - * The rating key of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentRatingKey") - private Optional parentRatingKey; - - /** - * The slug for the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentSlug") - private Optional parentSlug; - - /** - * The studio of the parent media item. - */ - @JsonProperty("parentStudio") - private String parentStudio; - - /** - * The theme URL for the parent media item. - */ - @JsonProperty("parentTheme") - private String parentTheme; - - /** - * The thumbnail URL for the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - /** - * The title of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - /** - * The release year of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentYear") - private Optional parentYear; - - /** - * The primary extra key associated with this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("primaryExtraKey") - private Optional primaryExtraKey; - - /** - * The URL for the rating image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingImage") - private Optional ratingImage; - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - @JsonProperty("ratingKey") - private String ratingKey; - - /** - * The critic rating for the media item. - */ - @JsonProperty("rating") - private float rating; - - /** - * The total number of seasons (for TV shows). - */ - @JsonProperty("seasonCount") - private int seasonCount; - - /** - * The number of times this media item has been skipped. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipCount") - private Optional skipCount; - - /** - * A URL‐friendly version of the media title. - */ - @JsonProperty("slug") - private String slug; - - /** - * The studio that produced the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("studio") - private Optional studio; - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; - - /** - * A synopsis of the media item. - */ - @JsonProperty("summary") - private String summary; - - /** - * A brief tagline for the media item. - */ - @JsonProperty("tagline") - private String tagline; - - /** - * The theme URL for the media item. - */ - @JsonProperty("theme") - private String theme; - - /** - * The thumbnail image URL for the media item. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The sort title used for ordering media items. - */ - @JsonProperty("titleSort") - private String titleSort; - - /** - * The title of the media item. - */ - @JsonProperty("title") - private String title; - - - @JsonProperty("type") - private GetRecentlyAddedHubsType type; - - /** - * Unix epoch datetime in seconds - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("userRating") - private Optional userRating; - - /** - * The number of times this media item has been viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - /** - * The current playback offset (in milliseconds). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewOffset") - private Optional viewOffset; - - /** - * The number of leaf items that have been viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewedLeafCount") - private Optional viewedLeafCount; - - /** - * The release year of the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("year") - private Optional year; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Image") - private Optional> image; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("UltraBlurColors") - private Optional ultraBlurColors; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Guid") - private Optional> guids; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Media") - private Optional> media; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Genre") - private Optional> genre; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Country") - private Optional> country; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Director") - private Optional> director; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Writer") - private Optional> writer; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Role") - private Optional> role; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Producer") - private Optional> producer; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Rating") - private Optional> rating1; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Similar") - private Optional> similar; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Location") - private Optional> location; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Collection") - private Optional> collection; - - @JsonCreator - public GetRecentlyAddedMetadata( - @JsonProperty("addedAt") long addedAt, - @JsonProperty("art") String art, - @JsonProperty("audienceRatingImage") Optional audienceRatingImage, - @JsonProperty("audienceRating") double audienceRating, - @JsonProperty("chapterSource") Optional chapterSource, - @JsonProperty("childCount") int childCount, - @JsonProperty("contentRating") Optional contentRating, - @JsonProperty("createdAtAccuracy") Optional createdAtAccuracy, - @JsonProperty("createdAtTZOffset") Optional createdAtTZOffset, - @JsonProperty("duration") int duration, - @JsonProperty("grandparentArt") Optional grandparentArt, - @JsonProperty("grandparentGuid") Optional grandparentGuid, - @JsonProperty("grandparentKey") Optional grandparentKey, - @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, - @JsonProperty("grandparentSlug") Optional grandparentSlug, - @JsonProperty("grandparentTheme") Optional grandparentTheme, - @JsonProperty("grandparentThumb") Optional grandparentThumb, - @JsonProperty("grandparentTitle") Optional grandparentTitle, - @JsonProperty("guid") String guid, - @JsonProperty("index") int index, - @JsonProperty("key") String key, - @JsonProperty("lastRatedAt") Optional lastRatedAt, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionKey") Optional librarySectionKey, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("originalTitle") Optional originalTitle, - @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, - @JsonProperty("parentGuid") Optional parentGuid, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("parentRatingKey") Optional parentRatingKey, - @JsonProperty("parentSlug") Optional parentSlug, - @JsonProperty("parentStudio") String parentStudio, - @JsonProperty("parentTheme") String parentTheme, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("parentYear") Optional parentYear, - @JsonProperty("primaryExtraKey") Optional primaryExtraKey, - @JsonProperty("ratingImage") Optional ratingImage, - @JsonProperty("ratingKey") String ratingKey, - @JsonProperty("rating") float rating, - @JsonProperty("seasonCount") int seasonCount, - @JsonProperty("skipCount") Optional skipCount, - @JsonProperty("slug") String slug, - @JsonProperty("studio") Optional studio, - @JsonProperty("subtype") Optional subtype, - @JsonProperty("summary") String summary, - @JsonProperty("tagline") String tagline, - @JsonProperty("theme") String theme, - @JsonProperty("thumb") String thumb, - @JsonProperty("titleSort") String titleSort, - @JsonProperty("title") String title, - @JsonProperty("type") GetRecentlyAddedHubsType type, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("userRating") Optional userRating, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("viewOffset") Optional viewOffset, - @JsonProperty("viewedLeafCount") Optional viewedLeafCount, - @JsonProperty("year") Optional year, - @JsonProperty("Image") Optional> image, - @JsonProperty("UltraBlurColors") Optional ultraBlurColors, - @JsonProperty("Guid") Optional> guids, - @JsonProperty("Media") Optional> media, - @JsonProperty("Genre") Optional> genre, - @JsonProperty("Country") Optional> country, - @JsonProperty("Director") Optional> director, - @JsonProperty("Writer") Optional> writer, - @JsonProperty("Role") Optional> role, - @JsonProperty("Producer") Optional> producer, - @JsonProperty("Rating") Optional> rating1, - @JsonProperty("Similar") Optional> similar, - @JsonProperty("Location") Optional> location, - @JsonProperty("Collection") Optional> collection) { - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - Utils.checkNotNull(audienceRating, "audienceRating"); - Utils.checkNotNull(chapterSource, "chapterSource"); - Utils.checkNotNull(childCount, "childCount"); - Utils.checkNotNull(contentRating, "contentRating"); - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(grandparentArt, "grandparentArt"); - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - Utils.checkNotNull(grandparentKey, "grandparentKey"); - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(originalTitle, "originalTitle"); - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - Utils.checkNotNull(parentGuid, "parentGuid"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - Utils.checkNotNull(parentSlug, "parentSlug"); - Utils.checkNotNull(parentStudio, "parentStudio"); - Utils.checkNotNull(parentTheme, "parentTheme"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(parentYear, "parentYear"); - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - Utils.checkNotNull(ratingImage, "ratingImage"); - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(rating, "rating"); - Utils.checkNotNull(seasonCount, "seasonCount"); - Utils.checkNotNull(skipCount, "skipCount"); - Utils.checkNotNull(slug, "slug"); - Utils.checkNotNull(studio, "studio"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(tagline, "tagline"); - Utils.checkNotNull(theme, "theme"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(titleSort, "titleSort"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(userRating, "userRating"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(viewOffset, "viewOffset"); - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - Utils.checkNotNull(year, "year"); - Utils.checkNotNull(image, "image"); - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - Utils.checkNotNull(guids, "guids"); - Utils.checkNotNull(media, "media"); - Utils.checkNotNull(genre, "genre"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(director, "director"); - Utils.checkNotNull(writer, "writer"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(producer, "producer"); - Utils.checkNotNull(rating1, "rating1"); - Utils.checkNotNull(similar, "similar"); - Utils.checkNotNull(location, "location"); - Utils.checkNotNull(collection, "collection"); - this.addedAt = addedAt; - this.art = art; - this.audienceRatingImage = audienceRatingImage; - this.audienceRating = audienceRating; - this.chapterSource = chapterSource; - this.childCount = childCount; - this.contentRating = contentRating; - this.createdAtAccuracy = createdAtAccuracy; - this.createdAtTZOffset = createdAtTZOffset; - this.duration = duration; - this.grandparentArt = grandparentArt; - this.grandparentGuid = grandparentGuid; - this.grandparentKey = grandparentKey; - this.grandparentRatingKey = grandparentRatingKey; - this.grandparentSlug = grandparentSlug; - this.grandparentTheme = grandparentTheme; - this.grandparentThumb = grandparentThumb; - this.grandparentTitle = grandparentTitle; - this.guid = guid; - this.index = index; - this.key = key; - this.lastRatedAt = lastRatedAt; - this.lastViewedAt = lastViewedAt; - this.leafCount = leafCount; - this.librarySectionID = librarySectionID; - this.librarySectionKey = librarySectionKey; - this.librarySectionTitle = librarySectionTitle; - this.originalTitle = originalTitle; - this.originallyAvailableAt = originallyAvailableAt; - this.parentGuid = parentGuid; - this.parentIndex = parentIndex; - this.parentKey = parentKey; - this.parentRatingKey = parentRatingKey; - this.parentSlug = parentSlug; - this.parentStudio = parentStudio; - this.parentTheme = parentTheme; - this.parentThumb = parentThumb; - this.parentTitle = parentTitle; - this.parentYear = parentYear; - this.primaryExtraKey = primaryExtraKey; - this.ratingImage = ratingImage; - this.ratingKey = ratingKey; - this.rating = rating; - this.seasonCount = seasonCount; - this.skipCount = skipCount; - this.slug = slug; - this.studio = studio; - this.subtype = subtype; - this.summary = summary; - this.tagline = tagline; - this.theme = theme; - this.thumb = thumb; - this.titleSort = titleSort; - this.title = title; - this.type = type; - this.updatedAt = updatedAt; - this.userRating = userRating; - this.viewCount = viewCount; - this.viewOffset = viewOffset; - this.viewedLeafCount = viewedLeafCount; - this.year = year; - this.image = image; - this.ultraBlurColors = ultraBlurColors; - this.guids = guids; - this.media = media; - this.genre = genre; - this.country = country; - this.director = director; - this.writer = writer; - this.role = role; - this.producer = producer; - this.rating1 = rating1; - this.similar = similar; - this.location = location; - this.collection = collection; - } - - public GetRecentlyAddedMetadata( - long addedAt, - String art, - double audienceRating, - int childCount, - int duration, - String guid, - int index, - String key, - String parentStudio, - String parentTheme, - String ratingKey, - float rating, - int seasonCount, - String slug, - String summary, - String tagline, - String theme, - String thumb, - String titleSort, - String title, - GetRecentlyAddedHubsType type) { - this(addedAt, art, Optional.empty(), - audienceRating, Optional.empty(), childCount, - Optional.empty(), Optional.empty(), Optional.empty(), - duration, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - guid, index, key, - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), parentStudio, parentTheme, - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), ratingKey, - rating, seasonCount, Optional.empty(), - slug, Optional.empty(), Optional.empty(), - summary, tagline, theme, - thumb, titleSort, title, - type, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public long addedAt() { - return addedAt; - } - - /** - * The art image URL for the media item. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * The URL for the audience rating image. - */ - @JsonIgnore - public Optional audienceRatingImage() { - return audienceRatingImage; - } - - /** - * The audience rating for the media item. - */ - @JsonIgnore - public double audienceRating() { - return audienceRating; - } - - /** - * The source from which chapter data is derived. - */ - @JsonIgnore - public Optional chapterSource() { - return chapterSource; - } - - /** - * The number of child items associated with this media item. - */ - @JsonIgnore - public int childCount() { - return childCount; - } - - /** - * The content rating for the media item. - */ - @JsonIgnore - public Optional contentRating() { - return contentRating; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - @JsonIgnore - public Optional createdAtAccuracy() { - return createdAtAccuracy; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - @JsonIgnore - public Optional createdAtTZOffset() { - return createdAtTZOffset; - } - - /** - * The duration of the media item in milliseconds. - */ - @JsonIgnore - public int duration() { - return duration; - } - - /** - * The art URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentArt() { - return grandparentArt; - } - - /** - * The GUID of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentGuid() { - return grandparentGuid; - } - - /** - * The key of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentKey() { - return grandparentKey; - } - - /** - * The rating key of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentRatingKey() { - return grandparentRatingKey; - } - - /** - * The slug for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentSlug() { - return grandparentSlug; - } - - /** - * The theme URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentTheme() { - return grandparentTheme; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentThumb() { - return grandparentThumb; - } - - /** - * The title of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentTitle() { - return grandparentTitle; - } - - /** - * The globally unique identifier for the media item. - */ - @JsonIgnore - public String guid() { - return guid; - } - - /** - * The index position of the media item. - */ - @JsonIgnore - public int index() { - return index; - } - - /** - * The unique key for the media item. - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - @JsonIgnore - public Optional lastRatedAt() { - return lastRatedAt; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - /** - * The identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - /** - * The key corresponding to the library section. - */ - @JsonIgnore - public Optional librarySectionKey() { - return librarySectionKey; - } - - /** - * The title of the library section. - */ - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - /** - * The original title of the media item (if different). - */ - @JsonIgnore - public Optional originalTitle() { - return originalTitle; - } - - /** - * The original release date of the media item. - */ - @JsonIgnore - public Optional originallyAvailableAt() { - return originallyAvailableAt; - } - - /** - * The GUID of the parent media item. - */ - @JsonIgnore - public Optional parentGuid() { - return parentGuid; - } - - /** - * The index position of the parent media item. - */ - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - /** - * The key of the parent media item. - */ - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - /** - * The rating key of the parent media item. - */ - @JsonIgnore - public Optional parentRatingKey() { - return parentRatingKey; - } - - /** - * The slug for the parent media item. - */ - @JsonIgnore - public Optional parentSlug() { - return parentSlug; - } - - /** - * The studio of the parent media item. - */ - @JsonIgnore - public String parentStudio() { - return parentStudio; - } - - /** - * The theme URL for the parent media item. - */ - @JsonIgnore - public String parentTheme() { - return parentTheme; - } - - /** - * The thumbnail URL for the parent media item. - */ - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - /** - * The title of the parent media item. - */ - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - /** - * The release year of the parent media item. - */ - @JsonIgnore - public Optional parentYear() { - return parentYear; - } - - /** - * The primary extra key associated with this media item. - */ - @JsonIgnore - public Optional primaryExtraKey() { - return primaryExtraKey; - } - - /** - * The URL for the rating image. - */ - @JsonIgnore - public Optional ratingImage() { - return ratingImage; - } - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - @JsonIgnore - public String ratingKey() { - return ratingKey; - } - - /** - * The critic rating for the media item. - */ - @JsonIgnore - public float rating() { - return rating; - } - - /** - * The total number of seasons (for TV shows). - */ - @JsonIgnore - public int seasonCount() { - return seasonCount; - } - - /** - * The number of times this media item has been skipped. - */ - @JsonIgnore - public Optional skipCount() { - return skipCount; - } - - /** - * A URL‐friendly version of the media title. - */ - @JsonIgnore - public String slug() { - return slug; - } - - /** - * The studio that produced the media item. - */ - @JsonIgnore - public Optional studio() { - return studio; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - @JsonIgnore - public Optional subtype() { - return subtype; - } - - /** - * A synopsis of the media item. - */ - @JsonIgnore - public String summary() { - return summary; - } - - /** - * A brief tagline for the media item. - */ - @JsonIgnore - public String tagline() { - return tagline; - } - - /** - * The theme URL for the media item. - */ - @JsonIgnore - public String theme() { - return theme; - } - - /** - * The thumbnail image URL for the media item. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The sort title used for ordering media items. - */ - @JsonIgnore - public String titleSort() { - return titleSort; - } - - /** - * The title of the media item. - */ - @JsonIgnore - public String title() { - return title; - } - - @JsonIgnore - public GetRecentlyAddedHubsType type() { - return type; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - @JsonIgnore - public Optional userRating() { - return userRating; - } - - /** - * The number of times this media item has been viewed. - */ - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - /** - * The current playback offset (in milliseconds). - */ - @JsonIgnore - public Optional viewOffset() { - return viewOffset; - } - - /** - * The number of leaf items that have been viewed. - */ - @JsonIgnore - public Optional viewedLeafCount() { - return viewedLeafCount; - } - - /** - * The release year of the media item. - */ - @JsonIgnore - public Optional year() { - return year; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> image() { - return (Optional>) image; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional ultraBlurColors() { - return (Optional) ultraBlurColors; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> guids() { - return (Optional>) guids; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> media() { - return (Optional>) media; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> genre() { - return (Optional>) genre; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> country() { - return (Optional>) country; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> director() { - return (Optional>) director; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> writer() { - return (Optional>) writer; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> role() { - return (Optional>) role; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> producer() { - return (Optional>) producer; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> rating1() { - return (Optional>) rating1; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> similar() { - return (Optional>) similar; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> location() { - return (Optional>) location; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> collection() { - return (Optional>) collection; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRecentlyAddedMetadata withAddedAt(long addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - /** - * The art image URL for the media item. - */ - public GetRecentlyAddedMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * The URL for the audience rating image. - */ - public GetRecentlyAddedMetadata withAudienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - - /** - * The URL for the audience rating image. - */ - public GetRecentlyAddedMetadata withAudienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - /** - * The audience rating for the media item. - */ - public GetRecentlyAddedMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - /** - * The source from which chapter data is derived. - */ - public GetRecentlyAddedMetadata withChapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - - /** - * The source from which chapter data is derived. - */ - public GetRecentlyAddedMetadata withChapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - /** - * The number of child items associated with this media item. - */ - public GetRecentlyAddedMetadata withChildCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - /** - * The content rating for the media item. - */ - public GetRecentlyAddedMetadata withContentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - - /** - * The content rating for the media item. - */ - public GetRecentlyAddedMetadata withContentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public GetRecentlyAddedMetadata withCreatedAtAccuracy(String createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); - return this; - } - - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public GetRecentlyAddedMetadata withCreatedAtAccuracy(Optional createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = createdAtAccuracy; - return this; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public GetRecentlyAddedMetadata withCreatedAtTZOffset(String createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); - return this; - } - - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public GetRecentlyAddedMetadata withCreatedAtTZOffset(Optional createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = createdAtTZOffset; - return this; - } - - /** - * The duration of the media item in milliseconds. - */ - public GetRecentlyAddedMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * The art URL for the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - - /** - * The art URL for the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - /** - * The GUID of the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - - /** - * The GUID of the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - /** - * The key of the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - - /** - * The key of the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - /** - * The rating key of the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - - /** - * The rating key of the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - /** - * The slug for the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentSlug(String grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = Optional.ofNullable(grandparentSlug); - return this; - } - - - /** - * The slug for the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentSlug(Optional grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = grandparentSlug; - return this; - } - - /** - * The theme URL for the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentTheme(String grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = Optional.ofNullable(grandparentTheme); - return this; - } - - - /** - * The theme URL for the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentTheme(Optional grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = grandparentTheme; - return this; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - - /** - * The thumbnail URL for the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - /** - * The title of the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - - /** - * The title of the grandparent media item. - */ - public GetRecentlyAddedMetadata withGrandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - /** - * The globally unique identifier for the media item. - */ - public GetRecentlyAddedMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - /** - * The index position of the media item. - */ - public GetRecentlyAddedMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * The unique key for the media item. - */ - public GetRecentlyAddedMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public GetRecentlyAddedMetadata withLastRatedAt(long lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public GetRecentlyAddedMetadata withLastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - public GetRecentlyAddedMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - - /** - * Unix timestamp for when the media item was last viewed. - */ - public GetRecentlyAddedMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - public GetRecentlyAddedMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - /** - * The number of leaf items (end nodes) under this media item. - */ - public GetRecentlyAddedMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - /** - * The identifier for the library section. - */ - public GetRecentlyAddedMetadata withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - /** - * The identifier for the library section. - */ - public GetRecentlyAddedMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - /** - * The key corresponding to the library section. - */ - public GetRecentlyAddedMetadata withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - - /** - * The key corresponding to the library section. - */ - public GetRecentlyAddedMetadata withLibrarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - /** - * The title of the library section. - */ - public GetRecentlyAddedMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - /** - * The title of the library section. - */ - public GetRecentlyAddedMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - /** - * The original title of the media item (if different). - */ - public GetRecentlyAddedMetadata withOriginalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - - /** - * The original title of the media item (if different). - */ - public GetRecentlyAddedMetadata withOriginalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - /** - * The original release date of the media item. - */ - public GetRecentlyAddedMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - - /** - * The original release date of the media item. - */ - public GetRecentlyAddedMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - /** - * The GUID of the parent media item. - */ - public GetRecentlyAddedMetadata withParentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - - /** - * The GUID of the parent media item. - */ - public GetRecentlyAddedMetadata withParentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - /** - * The index position of the parent media item. - */ - public GetRecentlyAddedMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - - /** - * The index position of the parent media item. - */ - public GetRecentlyAddedMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - /** - * The key of the parent media item. - */ - public GetRecentlyAddedMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - - /** - * The key of the parent media item. - */ - public GetRecentlyAddedMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - /** - * The rating key of the parent media item. - */ - public GetRecentlyAddedMetadata withParentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - - /** - * The rating key of the parent media item. - */ - public GetRecentlyAddedMetadata withParentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - /** - * The slug for the parent media item. - */ - public GetRecentlyAddedMetadata withParentSlug(String parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = Optional.ofNullable(parentSlug); - return this; - } - - - /** - * The slug for the parent media item. - */ - public GetRecentlyAddedMetadata withParentSlug(Optional parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = parentSlug; - return this; - } - - /** - * The studio of the parent media item. - */ - public GetRecentlyAddedMetadata withParentStudio(String parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = parentStudio; - return this; - } - - /** - * The theme URL for the parent media item. - */ - public GetRecentlyAddedMetadata withParentTheme(String parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = parentTheme; - return this; - } - - /** - * The thumbnail URL for the parent media item. - */ - public GetRecentlyAddedMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - - /** - * The thumbnail URL for the parent media item. - */ - public GetRecentlyAddedMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - /** - * The title of the parent media item. - */ - public GetRecentlyAddedMetadata withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - - /** - * The title of the parent media item. - */ - public GetRecentlyAddedMetadata withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - /** - * The release year of the parent media item. - */ - public GetRecentlyAddedMetadata withParentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - - /** - * The release year of the parent media item. - */ - public GetRecentlyAddedMetadata withParentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - /** - * The primary extra key associated with this media item. - */ - public GetRecentlyAddedMetadata withPrimaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - - /** - * The primary extra key associated with this media item. - */ - public GetRecentlyAddedMetadata withPrimaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - /** - * The URL for the rating image. - */ - public GetRecentlyAddedMetadata withRatingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - - /** - * The URL for the rating image. - */ - public GetRecentlyAddedMetadata withRatingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - public GetRecentlyAddedMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * The critic rating for the media item. - */ - public GetRecentlyAddedMetadata withRating(float rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - /** - * The total number of seasons (for TV shows). - */ - public GetRecentlyAddedMetadata withSeasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - - /** - * The number of times this media item has been skipped. - */ - public GetRecentlyAddedMetadata withSkipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - - /** - * The number of times this media item has been skipped. - */ - public GetRecentlyAddedMetadata withSkipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - /** - * A URL‐friendly version of the media title. - */ - public GetRecentlyAddedMetadata withSlug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - /** - * The studio that produced the media item. - */ - public GetRecentlyAddedMetadata withStudio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - - /** - * The studio that produced the media item. - */ - public GetRecentlyAddedMetadata withStudio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public GetRecentlyAddedMetadata withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public GetRecentlyAddedMetadata withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - /** - * A synopsis of the media item. - */ - public GetRecentlyAddedMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - /** - * A brief tagline for the media item. - */ - public GetRecentlyAddedMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - /** - * The theme URL for the media item. - */ - public GetRecentlyAddedMetadata withTheme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - /** - * The thumbnail image URL for the media item. - */ - public GetRecentlyAddedMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The sort title used for ordering media items. - */ - public GetRecentlyAddedMetadata withTitleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - /** - * The title of the media item. - */ - public GetRecentlyAddedMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetRecentlyAddedMetadata withType(GetRecentlyAddedHubsType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public GetRecentlyAddedMetadata withUpdatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public GetRecentlyAddedMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public GetRecentlyAddedMetadata withUserRating(float userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public GetRecentlyAddedMetadata withUserRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - /** - * The number of times this media item has been viewed. - */ - public GetRecentlyAddedMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - - /** - * The number of times this media item has been viewed. - */ - public GetRecentlyAddedMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - /** - * The current playback offset (in milliseconds). - */ - public GetRecentlyAddedMetadata withViewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - - /** - * The current playback offset (in milliseconds). - */ - public GetRecentlyAddedMetadata withViewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - /** - * The number of leaf items that have been viewed. - */ - public GetRecentlyAddedMetadata withViewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - - /** - * The number of leaf items that have been viewed. - */ - public GetRecentlyAddedMetadata withViewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - /** - * The release year of the media item. - */ - public GetRecentlyAddedMetadata withYear(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - - /** - * The release year of the media item. - */ - public GetRecentlyAddedMetadata withYear(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - 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 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 withGuids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - - public GetRecentlyAddedMetadata withGuids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - public GetRecentlyAddedMetadata withMedia(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - - public GetRecentlyAddedMetadata withMedia(Optional> media) { - Utils.checkNotNull(media, "media"); - this.media = media; - return this; - } - - public GetRecentlyAddedMetadata withGenre(List genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = Optional.ofNullable(genre); - return this; - } - - - public GetRecentlyAddedMetadata withGenre(Optional> genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = genre; - 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); - return this; - } - - - public GetRecentlyAddedMetadata withDirector(Optional> director) { - Utils.checkNotNull(director, "director"); - this.director = director; - return this; - } - - public GetRecentlyAddedMetadata withWriter(List writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = Optional.ofNullable(writer); - return this; - } - - - public GetRecentlyAddedMetadata withWriter(Optional> writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = writer; - return this; - } - - public GetRecentlyAddedMetadata withRole(List role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - public GetRecentlyAddedMetadata withRole(Optional> role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - public GetRecentlyAddedMetadata withProducer(List producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = Optional.ofNullable(producer); - return this; - } - - - public GetRecentlyAddedMetadata withProducer(Optional> producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = producer; - return this; - } - - public GetRecentlyAddedMetadata withRating1(List rating1) { - Utils.checkNotNull(rating1, "rating1"); - this.rating1 = Optional.ofNullable(rating1); - return this; - } - - - public GetRecentlyAddedMetadata withRating1(Optional> rating1) { - Utils.checkNotNull(rating1, "rating1"); - this.rating1 = rating1; - return this; - } - - public GetRecentlyAddedMetadata withSimilar(List similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = Optional.ofNullable(similar); - return this; - } - - - public GetRecentlyAddedMetadata withSimilar(Optional> similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = similar; - return this; - } - - public GetRecentlyAddedMetadata withLocation(List location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - - public GetRecentlyAddedMetadata withLocation(Optional> location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - public GetRecentlyAddedMetadata withCollection(List collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = Optional.ofNullable(collection); - return this; - } - - - public GetRecentlyAddedMetadata withCollection(Optional> collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = collection; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecentlyAddedMetadata other = (GetRecentlyAddedMetadata) o; - return - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && - Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && - Utils.enhancedDeepEquals(this.childCount, other.childCount) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.createdAtAccuracy, other.createdAtAccuracy) && - Utils.enhancedDeepEquals(this.createdAtTZOffset, other.createdAtTZOffset) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && - Utils.enhancedDeepEquals(this.grandparentGuid, other.grandparentGuid) && - Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && - Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && - Utils.enhancedDeepEquals(this.grandparentSlug, other.grandparentSlug) && - Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && - Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && - Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.lastRatedAt, other.lastRatedAt) && - Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionKey, other.librarySectionKey) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.parentGuid, other.parentGuid) && - Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && - Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && - Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && - Utils.enhancedDeepEquals(this.parentSlug, other.parentSlug) && - Utils.enhancedDeepEquals(this.parentStudio, other.parentStudio) && - Utils.enhancedDeepEquals(this.parentTheme, other.parentTheme) && - Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && - Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && - Utils.enhancedDeepEquals(this.parentYear, other.parentYear) && - Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && - Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.rating, other.rating) && - Utils.enhancedDeepEquals(this.seasonCount, other.seasonCount) && - Utils.enhancedDeepEquals(this.skipCount, other.skipCount) && - Utils.enhancedDeepEquals(this.slug, other.slug) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.subtype, other.subtype) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.theme, other.theme) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.userRating, other.userRating) && - Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && - Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && - Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.image, other.image) && - Utils.enhancedDeepEquals(this.ultraBlurColors, other.ultraBlurColors) && - Utils.enhancedDeepEquals(this.guids, other.guids) && - Utils.enhancedDeepEquals(this.media, other.media) && - Utils.enhancedDeepEquals(this.genre, other.genre) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.director, other.director) && - Utils.enhancedDeepEquals(this.writer, other.writer) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.producer, other.producer) && - Utils.enhancedDeepEquals(this.rating1, other.rating1) && - Utils.enhancedDeepEquals(this.similar, other.similar) && - Utils.enhancedDeepEquals(this.location, other.location) && - Utils.enhancedDeepEquals(this.collection, other.collection); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - addedAt, art, audienceRatingImage, - audienceRating, chapterSource, childCount, - contentRating, createdAtAccuracy, createdAtTZOffset, - duration, grandparentArt, grandparentGuid, - grandparentKey, grandparentRatingKey, grandparentSlug, - grandparentTheme, grandparentThumb, grandparentTitle, - guid, index, key, - lastRatedAt, lastViewedAt, leafCount, - librarySectionID, librarySectionKey, librarySectionTitle, - originalTitle, originallyAvailableAt, parentGuid, - parentIndex, parentKey, parentRatingKey, - parentSlug, parentStudio, parentTheme, - parentThumb, parentTitle, parentYear, - primaryExtraKey, ratingImage, ratingKey, - rating, seasonCount, skipCount, - slug, studio, subtype, - summary, tagline, theme, - thumb, titleSort, title, - type, updatedAt, userRating, - viewCount, viewOffset, viewedLeafCount, - year, image, ultraBlurColors, - guids, media, genre, - country, director, writer, - role, producer, rating1, - similar, location, collection); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedMetadata.class, - "addedAt", addedAt, - "art", art, - "audienceRatingImage", audienceRatingImage, - "audienceRating", audienceRating, - "chapterSource", chapterSource, - "childCount", childCount, - "contentRating", contentRating, - "createdAtAccuracy", createdAtAccuracy, - "createdAtTZOffset", createdAtTZOffset, - "duration", duration, - "grandparentArt", grandparentArt, - "grandparentGuid", grandparentGuid, - "grandparentKey", grandparentKey, - "grandparentRatingKey", grandparentRatingKey, - "grandparentSlug", grandparentSlug, - "grandparentTheme", grandparentTheme, - "grandparentThumb", grandparentThumb, - "grandparentTitle", grandparentTitle, - "guid", guid, - "index", index, - "key", key, - "lastRatedAt", lastRatedAt, - "lastViewedAt", lastViewedAt, - "leafCount", leafCount, - "librarySectionID", librarySectionID, - "librarySectionKey", librarySectionKey, - "librarySectionTitle", librarySectionTitle, - "originalTitle", originalTitle, - "originallyAvailableAt", originallyAvailableAt, - "parentGuid", parentGuid, - "parentIndex", parentIndex, - "parentKey", parentKey, - "parentRatingKey", parentRatingKey, - "parentSlug", parentSlug, - "parentStudio", parentStudio, - "parentTheme", parentTheme, - "parentThumb", parentThumb, - "parentTitle", parentTitle, - "parentYear", parentYear, - "primaryExtraKey", primaryExtraKey, - "ratingImage", ratingImage, - "ratingKey", ratingKey, - "rating", rating, - "seasonCount", seasonCount, - "skipCount", skipCount, - "slug", slug, - "studio", studio, - "subtype", subtype, - "summary", summary, - "tagline", tagline, - "theme", theme, - "thumb", thumb, - "titleSort", titleSort, - "title", title, - "type", type, - "updatedAt", updatedAt, - "userRating", userRating, - "viewCount", viewCount, - "viewOffset", viewOffset, - "viewedLeafCount", viewedLeafCount, - "year", year, - "image", image, - "ultraBlurColors", ultraBlurColors, - "guids", guids, - "media", media, - "genre", genre, - "country", country, - "director", director, - "writer", writer, - "role", role, - "producer", producer, - "rating1", rating1, - "similar", similar, - "location", location, - "collection", collection); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long addedAt; - - private String art; - - private Optional audienceRatingImage = Optional.empty(); - - private Double audienceRating; - - private Optional chapterSource = Optional.empty(); - - private Integer childCount; - - private Optional contentRating = Optional.empty(); - - private Optional createdAtAccuracy = Optional.empty(); - - private Optional createdAtTZOffset = Optional.empty(); - - private Integer duration; - - private Optional grandparentArt = Optional.empty(); - - private Optional grandparentGuid = Optional.empty(); - - private Optional grandparentKey = Optional.empty(); - - private Optional grandparentRatingKey = Optional.empty(); - - private Optional grandparentSlug = Optional.empty(); - - private Optional grandparentTheme = Optional.empty(); - - private Optional grandparentThumb = Optional.empty(); - - private Optional grandparentTitle = Optional.empty(); - - private String guid; - - private Integer index; - - private String key; - - private Optional lastRatedAt = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional leafCount = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionKey = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional originalTitle = Optional.empty(); - - private Optional originallyAvailableAt = Optional.empty(); - - private Optional parentGuid = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional parentRatingKey = Optional.empty(); - - private Optional parentSlug = Optional.empty(); - - private String parentStudio; - - private String parentTheme; - - private Optional parentThumb = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional parentYear = Optional.empty(); - - private Optional primaryExtraKey = Optional.empty(); - - private Optional ratingImage = Optional.empty(); - - private String ratingKey; - - private Float rating; - - private Integer seasonCount; - - private Optional skipCount = Optional.empty(); - - private String slug; - - private Optional studio = Optional.empty(); - - private Optional subtype = Optional.empty(); - - private String summary; - - private String tagline; - - private String theme; - - private String thumb; - - private String titleSort; - - private String title; - - private GetRecentlyAddedHubsType type; - - private Optional updatedAt = Optional.empty(); - - private Optional userRating = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional viewOffset = Optional.empty(); - - private Optional viewedLeafCount = Optional.empty(); - - private Optional year = Optional.empty(); - - private Optional> image = Optional.empty(); - - private Optional ultraBlurColors = Optional.empty(); - - private Optional> guids = 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> role = Optional.empty(); - - private Optional> producer = Optional.empty(); - - private Optional> rating1 = Optional.empty(); - - private Optional> similar = Optional.empty(); - - private Optional> location = Optional.empty(); - - private Optional> collection = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder addedAt(long addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - - /** - * The art image URL for the media item. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * The URL for the audience rating image. - */ - public Builder audienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - /** - * The URL for the audience rating image. - */ - public Builder audienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - - /** - * The audience rating for the media item. - */ - public Builder audienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - - /** - * The source from which chapter data is derived. - */ - public Builder chapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - /** - * The source from which chapter data is derived. - */ - public Builder chapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - - /** - * The number of child items associated with this media item. - */ - public Builder childCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - - /** - * The content rating for the media item. - */ - public Builder contentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - /** - * The content rating for the media item. - */ - public Builder contentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public Builder createdAtAccuracy(String createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); - return this; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public Builder createdAtAccuracy(Optional createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = createdAtAccuracy; - return this; - } - - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public Builder createdAtTZOffset(String createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); - return this; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public Builder createdAtTZOffset(Optional createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = createdAtTZOffset; - return this; - } - - - /** - * The duration of the media item in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * The art URL for the grandparent media item. - */ - public Builder grandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - /** - * The art URL for the grandparent media item. - */ - public Builder grandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - - /** - * The GUID of the grandparent media item. - */ - public Builder grandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - /** - * The GUID of the grandparent media item. - */ - public Builder grandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - - /** - * The key of the grandparent media item. - */ - public Builder grandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - /** - * The key of the grandparent media item. - */ - public Builder grandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - - /** - * The rating key of the grandparent media item. - */ - public Builder grandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - /** - * The rating key of the grandparent media item. - */ - public Builder grandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - - /** - * The slug for the grandparent media item. - */ - public Builder grandparentSlug(String grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = Optional.ofNullable(grandparentSlug); - return this; - } - - /** - * The slug for the grandparent media item. - */ - public Builder grandparentSlug(Optional grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = grandparentSlug; - return this; - } - - - /** - * The theme URL for the grandparent media item. - */ - public Builder grandparentTheme(String grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = Optional.ofNullable(grandparentTheme); - return this; - } - - /** - * The theme URL for the grandparent media item. - */ - public Builder grandparentTheme(Optional grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = grandparentTheme; - return this; - } - - - /** - * The thumbnail URL for the grandparent media item. - */ - public Builder grandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - public Builder grandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - - /** - * The title of the grandparent media item. - */ - public Builder grandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - /** - * The title of the grandparent media item. - */ - public Builder grandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - - /** - * The globally unique identifier for the media item. - */ - public Builder guid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - - /** - * The index position of the media item. - */ - public Builder index(int index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - - /** - * The unique key for the media item. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public Builder lastRatedAt(long lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public Builder lastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - - /** - * Unix timestamp for when the media item was last viewed. - */ - public Builder lastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - public Builder lastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - - /** - * The number of leaf items (end nodes) under this media item. - */ - public Builder leafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - public Builder leafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - - /** - * The identifier for the library section. - */ - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - /** - * The identifier for the library section. - */ - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - /** - * The key corresponding to the library section. - */ - public Builder librarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - /** - * The key corresponding to the library section. - */ - public Builder librarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - - /** - * The original title of the media item (if different). - */ - public Builder originalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - /** - * The original title of the media item (if different). - */ - public Builder originalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - - /** - * The original release date of the media item. - */ - public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - /** - * The original release date of the media item. - */ - public Builder originallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - - /** - * The GUID of the parent media item. - */ - public Builder parentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - /** - * The GUID of the parent media item. - */ - public Builder parentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - - /** - * The index position of the parent media item. - */ - public Builder parentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - /** - * The index position of the parent media item. - */ - public Builder parentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - - /** - * The key of the parent media item. - */ - public Builder parentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - /** - * The key of the parent media item. - */ - public Builder parentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - - /** - * The rating key of the parent media item. - */ - public Builder parentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - /** - * The rating key of the parent media item. - */ - public Builder parentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - - /** - * The slug for the parent media item. - */ - public Builder parentSlug(String parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = Optional.ofNullable(parentSlug); - return this; - } - - /** - * The slug for the parent media item. - */ - public Builder parentSlug(Optional parentSlug) { - Utils.checkNotNull(parentSlug, "parentSlug"); - this.parentSlug = parentSlug; - return this; - } - - - /** - * The studio of the parent media item. - */ - public Builder parentStudio(String parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = parentStudio; - return this; - } - - - /** - * The theme URL for the parent media item. - */ - public Builder parentTheme(String parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = parentTheme; - return this; - } - - - /** - * The thumbnail URL for the parent media item. - */ - public Builder parentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - /** - * The thumbnail URL for the parent media item. - */ - public Builder parentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - - /** - * The title of the parent media item. - */ - public Builder parentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - /** - * The title of the parent media item. - */ - public Builder parentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - - /** - * The release year of the parent media item. - */ - public Builder parentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - /** - * The release year of the parent media item. - */ - public Builder parentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - - /** - * The primary extra key associated with this media item. - */ - public Builder primaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - /** - * The primary extra key associated with this media item. - */ - public Builder primaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - - /** - * The URL for the rating image. - */ - public Builder ratingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - /** - * The URL for the rating image. - */ - public Builder ratingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - public Builder ratingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * The critic rating for the media item. - */ - public Builder rating(float rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - - /** - * The total number of seasons (for TV shows). - */ - public Builder seasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - - - /** - * The number of times this media item has been skipped. - */ - public Builder skipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - /** - * The number of times this media item has been skipped. - */ - public Builder skipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - - /** - * A URL‐friendly version of the media title. - */ - public Builder slug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - - /** - * The studio that produced the media item. - */ - public Builder studio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - /** - * The studio that produced the media item. - */ - public Builder studio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public Builder subtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public Builder subtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - - /** - * A synopsis of the media item. - */ - public Builder summary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - - /** - * A brief tagline for the media item. - */ - public Builder tagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - - /** - * The theme URL for the media item. - */ - public Builder theme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - - /** - * The thumbnail image URL for the media item. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The sort title used for ordering media items. - */ - public Builder titleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - - /** - * The title of the media item. - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - public Builder type(GetRecentlyAddedHubsType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public Builder userRating(float userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public Builder userRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - - /** - * The number of times this media item has been viewed. - */ - public Builder viewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - /** - * The number of times this media item has been viewed. - */ - public Builder viewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - - /** - * The current playback offset (in milliseconds). - */ - public Builder viewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - /** - * The current playback offset (in milliseconds). - */ - public Builder viewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - - /** - * The number of leaf items that have been viewed. - */ - public Builder viewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - /** - * The number of leaf items that have been viewed. - */ - public Builder viewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - - /** - * The release year of the media item. - */ - public Builder year(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - /** - * The release year of the media item. - */ - public Builder year(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - - public Builder image(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - public Builder image(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - - public Builder ultraBlurColors(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 guids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - public Builder guids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - - 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 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); - 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 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 Builder producer(List producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = Optional.ofNullable(producer); - return this; - } - - public Builder producer(Optional> producer) { - Utils.checkNotNull(producer, "producer"); - this.producer = producer; - return this; - } - - - public Builder rating1(List rating1) { - Utils.checkNotNull(rating1, "rating1"); - this.rating1 = Optional.ofNullable(rating1); - return this; - } - - public Builder rating1(Optional> rating1) { - Utils.checkNotNull(rating1, "rating1"); - this.rating1 = rating1; - return this; - } - - - public Builder similar(List similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = Optional.ofNullable(similar); - return this; - } - - public Builder similar(Optional> similar) { - Utils.checkNotNull(similar, "similar"); - this.similar = similar; - return this; - } - - - public Builder location(List location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - public Builder location(Optional> location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - - public Builder collection(List collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = Optional.ofNullable(collection); - return this; - } - - public Builder collection(Optional> collection) { - Utils.checkNotNull(collection, "collection"); - this.collection = collection; - return this; - } - - public GetRecentlyAddedMetadata build() { - - return new GetRecentlyAddedMetadata( - addedAt, art, audienceRatingImage, - audienceRating, chapterSource, childCount, - contentRating, createdAtAccuracy, createdAtTZOffset, - duration, grandparentArt, grandparentGuid, - grandparentKey, grandparentRatingKey, grandparentSlug, - grandparentTheme, grandparentThumb, grandparentTitle, - guid, index, key, - lastRatedAt, lastViewedAt, leafCount, - librarySectionID, librarySectionKey, librarySectionTitle, - originalTitle, originallyAvailableAt, parentGuid, - parentIndex, parentKey, parentRatingKey, - parentSlug, parentStudio, parentTheme, - parentThumb, parentTitle, parentYear, - primaryExtraKey, ratingImage, ratingKey, - rating, seasonCount, skipCount, - slug, studio, subtype, - summary, tagline, theme, - thumb, titleSort, title, - type, updatedAt, userRating, - viewCount, viewOffset, viewedLeafCount, - year, image, ultraBlurColors, - guids, media, genre, - country, director, writer, - role, producer, rating1, - similar, location, collection); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOperator.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOperator.java deleted file mode 100644 index b4a868b1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOperator.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -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 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 - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedOperator.class, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - 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/GetRecentlyAddedOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOptimizedForStreaming.java deleted file mode 100644 index 8c633f07..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOptimizedForStreaming.java +++ /dev/null @@ -1,100 +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.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; - -/** - * GetRecentlyAddedOptimizedForStreaming - * - *

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

    - *
  • {@code dev.plexapi.sdk.models.operations.GetRecentlyAddedOptimizedForStreaming1}
  • - *
  • {@code boolean}
  • - *
- * - *

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

-     * if (obj.value() instanceof String) {
-     *     String answer = (String) obj.value();
-     *     System.out.println("answer=" + answer);
-     * }
-     * 
- * - * @return value of oneOf type - **/ - public java.lang.Object value() { - return value.value(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecentlyAddedOptimizedForStreaming other = (GetRecentlyAddedOptimizedForStreaming) o; - return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); - } - - @Override - public int hashCode() { - return Utils.enhancedHash(value.value()); - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends OneOfDeserializer { - - public _Deserializer() { - super(GetRecentlyAddedOptimizedForStreaming.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); - } - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedOptimizedForStreaming.class, - "value", value); - } - -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOptimizedForStreaming1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOptimizedForStreaming1.java deleted file mode 100644 index a517ce5d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOptimizedForStreaming1.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public enum GetRecentlyAddedOptimizedForStreaming1 { - ZERO(0), - ONE(1); - - @JsonValue - private final int value; - - GetRecentlyAddedOptimizedForStreaming1(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetRecentlyAddedOptimizedForStreaming1 o: GetRecentlyAddedOptimizedForStreaming1.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequest.java deleted file mode 100644 index b1c3137c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequest.java +++ /dev/null @@ -1,526 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.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.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 or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @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. - * 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 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( - 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 or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @JsonIgnore - public Type 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 static Builder builder() { - 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 or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public 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. - * By default this is 0 - */ - public GetRecentlyAddedRequest 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 GetRecentlyAddedRequest 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 GetRecentlyAddedRequest 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 GetRecentlyAddedRequest 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; - } - GetRecentlyAddedRequest other = (GetRecentlyAddedRequest) o; - return - Utils.enhancedDeepEquals(this.contentDirectoryID, other.contentDirectoryID) && - Utils.enhancedDeepEquals(this.pinnedContentDirectoryID, other.pinnedContentDirectoryID) && - Utils.enhancedDeepEquals(this.sectionID, other.sectionID) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.includeMeta, other.includeMeta) && - Utils.enhancedDeepEquals(this.xPlexContainerStart, other.xPlexContainerStart) && - Utils.enhancedDeepEquals(this.xPlexContainerSize, other.xPlexContainerSize); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentDirectoryID, pinnedContentDirectoryID, sectionID, - type, includeMeta, xPlexContainerStart, - xPlexContainerSize); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedRequest.class, - "contentDirectoryID", contentDirectoryID, - "pinnedContentDirectoryID", pinnedContentDirectoryID, - "sectionID", sectionID, - "type", type, - "includeMeta", includeMeta, - "xPlexContainerStart", xPlexContainerStart, - "xPlexContainerSize", xPlexContainerSize); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - - private Builder() { - // 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 or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public 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. - * 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 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", - "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/GetRecentlyAddedRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequestBuilder.java deleted file mode 100644 index f5683442..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequestBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetRecentlyAdded; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; - -public class GetRecentlyAddedRequestBuilder { - - private GetRecentlyAddedRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetRecentlyAddedRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetRecentlyAddedRequestBuilder request(GetRecentlyAddedRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetRecentlyAddedResponse call() throws Exception { - - RequestOperation operation - = new GetRecentlyAdded.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponse.java deleted file mode 100644 index 9102cdd8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetRecentlyAddedResponse 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; - - /** - * A successful response with recently added content. - */ - private Optional object; - - @JsonCreator - public GetRecentlyAddedResponse( - 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 GetRecentlyAddedResponse( - 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; - } - - /** - * A successful response with recently added content. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetRecentlyAddedResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetRecentlyAddedResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRecentlyAddedResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * A successful response with recently added content. - */ - public GetRecentlyAddedResponse withObject(GetRecentlyAddedResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * A successful response with recently added content. - */ - public GetRecentlyAddedResponse 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; - } - GetRecentlyAddedResponse other = (GetRecentlyAddedResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * A successful response with recently added content. - */ - public Builder object(GetRecentlyAddedResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * A successful response with recently added content. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetRecentlyAddedResponse build() { - - return new GetRecentlyAddedResponse( - contentType, statusCode, rawResponse, - 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 deleted file mode 100644 index d263fe87..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetRecentlyAddedResponseBody - * - *

A successful response with recently added content. - */ -public class GetRecentlyAddedResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetRecentlyAddedResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetRecentlyAddedResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetRecentlyAddedResponseBody withMediaContainer(GetRecentlyAddedMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetRecentlyAddedResponseBody 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; - } - GetRecentlyAddedResponseBody other = (GetRecentlyAddedResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetRecentlyAddedMediaContainer 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 GetRecentlyAddedResponseBody build() { - - return new GetRecentlyAddedResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedSort.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedSort.java deleted file mode 100644 index a35f8511..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedSort.java +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.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 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 - Utils.enhancedDeepEquals(this.default_, other.default_) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.activeDirection, other.activeDirection) && - Utils.enhancedDeepEquals(this.defaultDirection, other.defaultDirection) && - Utils.enhancedDeepEquals(this.descKey, other.descKey) && - Utils.enhancedDeepEquals(this.firstCharacterKey, other.firstCharacterKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - 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); - } - - @SuppressWarnings("UnusedReturnValue") - 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 deleted file mode 100644 index 90a0a4f1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedType.java +++ /dev/null @@ -1,372 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetRecentlyAddedType { - - @JsonProperty("key") - private String key; - - - @JsonProperty("type") - private String type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; - - - @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("subtype") Optional subtype, - @JsonProperty("title") String title, - @JsonProperty("active") boolean active, - @JsonProperty("Filter") Optional> filter, - @JsonProperty("Sort") Optional> sort, - @JsonProperty("Field") Optional> field) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(active, "active"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(sort, "sort"); - Utils.checkNotNull(field, "field"); - this.key = key; - this.type = type; - this.subtype = subtype; - this.title = title; - this.active = active; - this.filter = filter; - this.sort = sort; - this.field = field; - } - - public GetRecentlyAddedType( - String key, - String type, - String title, - boolean active) { - this(key, type, Optional.empty(), - title, active, Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public Optional subtype() { - return subtype; - } - - @JsonIgnore - public String title() { - return title; - } - - @JsonIgnore - public boolean active() { - return active; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> filter() { - return (Optional>) filter; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> sort() { - return (Optional>) sort; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> field() { - return (Optional>) field; - } - - public 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 withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - - public GetRecentlyAddedType withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - 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 - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.subtype, other.subtype) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.sort, other.sort) && - Utils.enhancedDeepEquals(this.field, other.field); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, type, subtype, - title, active, filter, - sort, field); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedType.class, - "key", key, - "type", type, - "subtype", subtype, - "title", title, - "active", active, - "filter", filter, - "sort", sort, - "field", field); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String key; - - private String type; - - private Optional subtype = Optional.empty(); - - private String title; - - private Boolean active; - - private Optional> filter = Optional.empty(); - - private Optional> sort = Optional.empty(); - - private Optional> field = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 subtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - public Builder subtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - public Builder active(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - - public Builder filter(List filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - public Builder filter(Optional> filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - public Builder sort(List sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - public Builder sort(Optional> sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - - public Builder field(List field) { - Utils.checkNotNull(field, "field"); - this.field = Optional.ofNullable(field); - return this; - } - - public Builder field(Optional> field) { - Utils.checkNotNull(field, "field"); - this.field = field; - return this; - } - - public GetRecentlyAddedType build() { - - return new GetRecentlyAddedType( - key, type, subtype, - title, active, filter, - sort, field); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataRequest.java deleted file mode 100644 index f60869af..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataRequest.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetRefreshLibraryMetadataRequest { - /** - * Force the refresh even if the library is already being refreshed. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=force") - private Optional force; - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey") - private int sectionKey; - - @JsonCreator - public GetRefreshLibraryMetadataRequest( - Optional force, - int sectionKey) { - Utils.checkNotNull(force, "force"); - Utils.checkNotNull(sectionKey, "sectionKey"); - this.force = force; - this.sectionKey = sectionKey; - } - - public GetRefreshLibraryMetadataRequest( - int sectionKey) { - this(Optional.empty(), sectionKey); - } - - /** - * Force the refresh even if the library is already being refreshed. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional force() { - return (Optional) force; - } - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @JsonIgnore - public int sectionKey() { - return sectionKey; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Force the refresh even if the library is already being refreshed. - */ - public GetRefreshLibraryMetadataRequest withForce(Force force) { - Utils.checkNotNull(force, "force"); - this.force = Optional.ofNullable(force); - return this; - } - - - /** - * Force the refresh even if the library is already being refreshed. - */ - public GetRefreshLibraryMetadataRequest withForce(Optional force) { - Utils.checkNotNull(force, "force"); - this.force = force; - return this; - } - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public GetRefreshLibraryMetadataRequest withSectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRefreshLibraryMetadataRequest other = (GetRefreshLibraryMetadataRequest) o; - return - Utils.enhancedDeepEquals(this.force, other.force) && - Utils.enhancedDeepEquals(this.sectionKey, other.sectionKey); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - force, sectionKey); - } - - @Override - public String toString() { - return Utils.toString(GetRefreshLibraryMetadataRequest.class, - "force", force, - "sectionKey", sectionKey); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional force = Optional.empty(); - - private Integer sectionKey; - - private Builder() { - // force use of static builder() method - } - - - /** - * Force the refresh even if the library is already being refreshed. - */ - public Builder force(Force force) { - Utils.checkNotNull(force, "force"); - this.force = Optional.ofNullable(force); - return this; - } - - /** - * Force the refresh even if the library is already being refreshed. - */ - public Builder force(Optional force) { - Utils.checkNotNull(force, "force"); - this.force = force; - return this; - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public Builder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - public GetRefreshLibraryMetadataRequest build() { - - return new GetRefreshLibraryMetadataRequest( - force, sectionKey); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataRequestBuilder.java deleted file mode 100644 index 7de9ae8d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataRequestBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetRefreshLibraryMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; -import java.util.Optional; - -public class GetRefreshLibraryMetadataRequestBuilder { - - private Optional force = Optional.empty(); - private Integer sectionKey; - private final SDKConfiguration sdkConfiguration; - - public GetRefreshLibraryMetadataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetRefreshLibraryMetadataRequestBuilder force(Force force) { - Utils.checkNotNull(force, "force"); - this.force = Optional.of(force); - return this; - } - - public GetRefreshLibraryMetadataRequestBuilder force(Optional force) { - Utils.checkNotNull(force, "force"); - this.force = force; - return this; - } - - public GetRefreshLibraryMetadataRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - private GetRefreshLibraryMetadataRequest buildRequest() { - - GetRefreshLibraryMetadataRequest request = new GetRefreshLibraryMetadataRequest(force, - sectionKey); - - return request; - } - - public GetRefreshLibraryMetadataResponse call() throws Exception { - - RequestOperation operation - = new GetRefreshLibraryMetadata.Sync(sdkConfiguration); - GetRefreshLibraryMetadataRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataResponse.java deleted file mode 100644 index 311c1467..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class GetRefreshLibraryMetadataResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public GetRefreshLibraryMetadataResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetRefreshLibraryMetadataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetRefreshLibraryMetadataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRefreshLibraryMetadataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRefreshLibraryMetadataResponse other = (GetRefreshLibraryMetadataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetRefreshLibraryMetadataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetRefreshLibraryMetadataResponse build() { - - return new GetRefreshLibraryMetadataResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsRequest.java new file mode 100644 index 00000000..8b8f5b9c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsRequest.java @@ -0,0 +1,903 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetRelatedHubsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The metadata ID for the hubs to fetch + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=metadataId") + private long metadataId; + + /** + * Limit results to count items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=onlyTransient") + private Optional onlyTransient; + + @JsonCreator + public GetRelatedHubsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long metadataId, + Optional count, + Optional onlyTransient) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(metadataId, "metadataId"); + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.metadataId = metadataId; + this.count = count; + this.onlyTransient = onlyTransient; + } + + public GetRelatedHubsRequest( + long metadataId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), metadataId, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The metadata ID for the hubs to fetch + */ + @JsonIgnore + public long metadataId() { + return metadataId; + } + + /** + * Limit results to count items + */ + @JsonIgnore + public Optional count() { + return count; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional onlyTransient() { + return (Optional) onlyTransient; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetRelatedHubsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetRelatedHubsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetRelatedHubsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetRelatedHubsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetRelatedHubsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetRelatedHubsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetRelatedHubsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetRelatedHubsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetRelatedHubsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetRelatedHubsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetRelatedHubsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetRelatedHubsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetRelatedHubsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetRelatedHubsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetRelatedHubsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetRelatedHubsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetRelatedHubsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetRelatedHubsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetRelatedHubsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetRelatedHubsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetRelatedHubsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetRelatedHubsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The metadata ID for the hubs to fetch + */ + public GetRelatedHubsRequest withMetadataId(long metadataId) { + Utils.checkNotNull(metadataId, "metadataId"); + this.metadataId = metadataId; + return this; + } + + /** + * Limit results to count items + */ + public GetRelatedHubsRequest withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + /** + * Limit results to count items + */ + public GetRelatedHubsRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public GetRelatedHubsRequest withOnlyTransient(BoolInt onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public GetRelatedHubsRequest withOnlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRelatedHubsRequest other = (GetRelatedHubsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.metadataId, other.metadataId) && + Utils.enhancedDeepEquals(this.count, other.count) && + Utils.enhancedDeepEquals(this.onlyTransient, other.onlyTransient); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, metadataId, + count, onlyTransient); + } + + @Override + public String toString() { + return Utils.toString(GetRelatedHubsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "metadataId", metadataId, + "count", count, + "onlyTransient", onlyTransient); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long metadataId; + + private Optional count = Optional.empty(); + + private Optional onlyTransient = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The metadata ID for the hubs to fetch + */ + public Builder metadataId(long metadataId) { + Utils.checkNotNull(metadataId, "metadataId"); + this.metadataId = metadataId; + return this; + } + + + /** + * Limit results to count items + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * Limit results to count items + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public Builder onlyTransient(BoolInt onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public Builder onlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + public GetRelatedHubsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetRelatedHubsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, metadataId, + count, onlyTransient); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsRequestBuilder.java new file mode 100644 index 00000000..244b739e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetRelatedHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetRelatedHubsRequestBuilder { + + private GetRelatedHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetRelatedHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetRelatedHubsRequestBuilder request(GetRelatedHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetRelatedHubsResponse call() throws Exception { + + RequestOperation operation + = new GetRelatedHubs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsResponse.java new file mode 100644 index 00000000..aa21172e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedHubsResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithHubs; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetRelatedHubsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithHubs; + + + private Map> headers; + + @JsonCreator + public GetRelatedHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithHubs, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithHubs = mediaContainerWithHubs; + this.headers = headers; + } + + public GetRelatedHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithHubs() { + return (Optional) mediaContainerWithHubs; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetRelatedHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetRelatedHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRelatedHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetRelatedHubsResponse withMediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + + /** + * OK + */ + public GetRelatedHubsResponse withMediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + public GetRelatedHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRelatedHubsResponse other = (GetRelatedHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithHubs, other.mediaContainerWithHubs) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + @Override + public String toString() { + return Utils.toString(GetRelatedHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithHubs", mediaContainerWithHubs, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithHubs = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetRelatedHubsResponse build() { + + return new GetRelatedHubsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsMediaContainer.java new file mode 100644 index 00000000..6092cad9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Hub; +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.List; +import java.util.Optional; + +/** + * GetRelatedItemsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetRelatedItemsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + @JsonCreator + public GetRelatedItemsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(hub, "hub"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.hub = hub; + } + + public GetRelatedItemsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hub() { + return (Optional>) hub; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetRelatedItemsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetRelatedItemsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetRelatedItemsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetRelatedItemsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetRelatedItemsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetRelatedItemsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetRelatedItemsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetRelatedItemsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetRelatedItemsMediaContainer withHub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + + public GetRelatedItemsMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRelatedItemsMediaContainer other = (GetRelatedItemsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, hub); + } + + @Override + public String toString() { + return Utils.toString(GetRelatedItemsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "hub", hub); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder hub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public GetRelatedItemsMediaContainer build() { + + return new GetRelatedItemsMediaContainer( + identifier, offset, size, + totalSize, hub); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsRequest.java new file mode 100644 index 00000000..594ae32e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsRequest.java @@ -0,0 +1,768 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetRelatedItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + @JsonCreator + public GetRelatedItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + } + + public GetRelatedItemsRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetRelatedItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetRelatedItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetRelatedItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetRelatedItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetRelatedItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetRelatedItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetRelatedItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetRelatedItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetRelatedItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetRelatedItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetRelatedItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetRelatedItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetRelatedItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetRelatedItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetRelatedItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetRelatedItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetRelatedItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetRelatedItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetRelatedItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetRelatedItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetRelatedItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetRelatedItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public GetRelatedItemsRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRelatedItemsRequest other = (GetRelatedItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + @Override + public String toString() { + return Utils.toString(GetRelatedItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public GetRelatedItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetRelatedItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsRequestBuilder.java new file mode 100644 index 00000000..f4ea9be1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetRelatedItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetRelatedItemsRequestBuilder { + + private GetRelatedItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetRelatedItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetRelatedItemsRequestBuilder request(GetRelatedItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetRelatedItemsResponse call() throws Exception { + + RequestOperation operation + = new GetRelatedItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsResponse.java new file mode 100644 index 00000000..b3742606 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetRelatedItemsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetRelatedItemsResponse( + 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 GetRelatedItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetRelatedItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetRelatedItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRelatedItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetRelatedItemsResponse withObject(GetRelatedItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetRelatedItemsResponse 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; + } + GetRelatedItemsResponse other = (GetRelatedItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetRelatedItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetRelatedItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetRelatedItemsResponse build() { + + return new GetRelatedItemsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsResponseBody.java new file mode 100644 index 00000000..74e3bdb6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRelatedItemsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetRelatedItemsResponseBody + * + *

OK + */ +public class GetRelatedItemsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetRelatedItemsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetRelatedItemsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetRelatedItemsResponseBody withMediaContainer(GetRelatedItemsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetRelatedItemsResponseBody 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; + } + GetRelatedItemsResponseBody other = (GetRelatedItemsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetRelatedItemsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetRelatedItemsMediaContainer 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 GetRelatedItemsResponseBody build() { + + return new GetRelatedItemsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoRequest.java deleted file mode 100644 index ac428947..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoRequest.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; - - -public class GetResizedPhotoRequest { - /** - * The width for the resized photo - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=width") - private double width; - - /** - * The height for the resized photo - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=height") - private double height; - - /** - * The opacity for the resized photo - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=opacity") - private long opacity; - - /** - * The width for the resized photo - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=blur") - private double blur; - - /** - * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize") - private MinSize minSize; - - /** - * allow images to be resized beyond native dimensions. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale") - private Upscale upscale; - - /** - * path to image within Plex - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") - private String url; - - @JsonCreator - public GetResizedPhotoRequest( - double width, - double height, - long opacity, - double blur, - MinSize minSize, - Upscale upscale, - String url) { - Utils.checkNotNull(width, "width"); - Utils.checkNotNull(height, "height"); - Utils.checkNotNull(opacity, "opacity"); - Utils.checkNotNull(blur, "blur"); - Utils.checkNotNull(minSize, "minSize"); - Utils.checkNotNull(upscale, "upscale"); - Utils.checkNotNull(url, "url"); - this.width = width; - this.height = height; - this.opacity = opacity; - this.blur = blur; - this.minSize = minSize; - this.upscale = upscale; - this.url = url; - } - - /** - * The width for the resized photo - */ - @JsonIgnore - public double width() { - return width; - } - - /** - * The height for the resized photo - */ - @JsonIgnore - public double height() { - return height; - } - - /** - * The opacity for the resized photo - */ - @JsonIgnore - public long opacity() { - return opacity; - } - - /** - * The width for the resized photo - */ - @JsonIgnore - public double blur() { - return blur; - } - - /** - * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. - */ - @JsonIgnore - public MinSize minSize() { - return minSize; - } - - /** - * allow images to be resized beyond native dimensions. - */ - @JsonIgnore - public Upscale upscale() { - return upscale; - } - - /** - * path to image within Plex - */ - @JsonIgnore - public String url() { - return url; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The width for the resized photo - */ - public GetResizedPhotoRequest withWidth(double width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * The height for the resized photo - */ - public GetResizedPhotoRequest withHeight(double height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * The opacity for the resized photo - */ - public GetResizedPhotoRequest withOpacity(long opacity) { - Utils.checkNotNull(opacity, "opacity"); - this.opacity = opacity; - return this; - } - - /** - * The width for the resized photo - */ - public GetResizedPhotoRequest withBlur(double blur) { - Utils.checkNotNull(blur, "blur"); - this.blur = blur; - return this; - } - - /** - * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. - */ - public GetResizedPhotoRequest withMinSize(MinSize minSize) { - Utils.checkNotNull(minSize, "minSize"); - this.minSize = minSize; - return this; - } - - /** - * allow images to be resized beyond native dimensions. - */ - public GetResizedPhotoRequest withUpscale(Upscale upscale) { - Utils.checkNotNull(upscale, "upscale"); - this.upscale = upscale; - return this; - } - - /** - * path to image within Plex - */ - public GetResizedPhotoRequest 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; - } - GetResizedPhotoRequest other = (GetResizedPhotoRequest) o; - return - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.opacity, other.opacity) && - Utils.enhancedDeepEquals(this.blur, other.blur) && - Utils.enhancedDeepEquals(this.minSize, other.minSize) && - Utils.enhancedDeepEquals(this.upscale, other.upscale) && - Utils.enhancedDeepEquals(this.url, other.url); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - width, height, opacity, - blur, minSize, upscale, - url); - } - - @Override - public String toString() { - return Utils.toString(GetResizedPhotoRequest.class, - "width", width, - "height", height, - "opacity", opacity, - "blur", blur, - "minSize", minSize, - "upscale", upscale, - "url", url); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Double width; - - private Double height; - - private Long opacity; - - private Double blur; - - private MinSize minSize; - - private Upscale upscale; - - private String url; - - private Builder() { - // force use of static builder() method - } - - - /** - * The width for the resized photo - */ - public Builder width(double width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - /** - * The height for the resized photo - */ - public Builder height(double height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - /** - * The opacity for the resized photo - */ - public Builder opacity(long opacity) { - Utils.checkNotNull(opacity, "opacity"); - this.opacity = opacity; - return this; - } - - - /** - * The width for the resized photo - */ - public Builder blur(double blur) { - Utils.checkNotNull(blur, "blur"); - this.blur = blur; - return this; - } - - - /** - * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. - */ - public Builder minSize(MinSize minSize) { - Utils.checkNotNull(minSize, "minSize"); - this.minSize = minSize; - return this; - } - - - /** - * allow images to be resized beyond native dimensions. - */ - public Builder upscale(Upscale upscale) { - Utils.checkNotNull(upscale, "upscale"); - this.upscale = upscale; - return this; - } - - - /** - * path to image within Plex - */ - public Builder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - public GetResizedPhotoRequest build() { - if (opacity == null) { - opacity = _SINGLETON_VALUE_Opacity.value(); - } - - return new GetResizedPhotoRequest( - width, height, opacity, - blur, minSize, upscale, - url); - } - - - private static final LazySingletonValue _SINGLETON_VALUE_Opacity = - new LazySingletonValue<>( - "opacity", - "100", - new TypeReference() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoRequestBuilder.java deleted file mode 100644 index 3fd430da..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoRequestBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetResizedPhoto; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; - -public class GetResizedPhotoRequestBuilder { - - private GetResizedPhotoRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetResizedPhotoRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetResizedPhotoRequestBuilder request(GetResizedPhotoRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetResizedPhotoResponse call() throws Exception { - - RequestOperation operation - = new GetResizedPhoto.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoResponse.java deleted file mode 100644 index 62e2e41a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetResizedPhotoResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class GetResizedPhotoResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public GetResizedPhotoResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetResizedPhotoResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetResizedPhotoResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResizedPhotoResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResizedPhotoResponse other = (GetResizedPhotoResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetResizedPhotoResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetResizedPhotoResponse build() { - - return new GetResizedPhotoResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsMediaContainer.java deleted file mode 100644 index fc7a59a8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetResourcesStatisticsMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("StatisticsResources") - private Optional> statisticsResources; - - @JsonCreator - public GetResourcesStatisticsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("StatisticsResources") Optional> statisticsResources) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(statisticsResources, "statisticsResources"); - this.size = size; - this.statisticsResources = statisticsResources; - } - - public GetResourcesStatisticsMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> statisticsResources() { - return (Optional>) statisticsResources; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResourcesStatisticsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetResourcesStatisticsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetResourcesStatisticsMediaContainer withStatisticsResources(List statisticsResources) { - Utils.checkNotNull(statisticsResources, "statisticsResources"); - this.statisticsResources = Optional.ofNullable(statisticsResources); - return this; - } - - - public GetResourcesStatisticsMediaContainer withStatisticsResources(Optional> statisticsResources) { - Utils.checkNotNull(statisticsResources, "statisticsResources"); - this.statisticsResources = statisticsResources; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResourcesStatisticsMediaContainer other = (GetResourcesStatisticsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.statisticsResources, other.statisticsResources); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, statisticsResources); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsMediaContainer.class, - "size", size, - "statisticsResources", statisticsResources); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> statisticsResources = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 statisticsResources(List statisticsResources) { - Utils.checkNotNull(statisticsResources, "statisticsResources"); - this.statisticsResources = Optional.ofNullable(statisticsResources); - return this; - } - - public Builder statisticsResources(Optional> statisticsResources) { - Utils.checkNotNull(statisticsResources, "statisticsResources"); - this.statisticsResources = statisticsResources; - return this; - } - - public GetResourcesStatisticsMediaContainer build() { - - return new GetResourcesStatisticsMediaContainer( - size, statisticsResources); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsRequest.java deleted file mode 100644 index dcf43106..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsRequest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetResourcesStatisticsRequest { - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timespan") - private Optional timespan; - - @JsonCreator - public GetResourcesStatisticsRequest( - Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - } - - public GetResourcesStatisticsRequest() { - this(Optional.empty()); - } - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - @JsonIgnore - public Optional timespan() { - return timespan; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public GetResourcesStatisticsRequest withTimespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public GetResourcesStatisticsRequest withTimespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResourcesStatisticsRequest other = (GetResourcesStatisticsRequest) o; - return - Utils.enhancedDeepEquals(this.timespan, other.timespan); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - timespan); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsRequest.class, - "timespan", timespan); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional timespan = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public Builder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public Builder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - public GetResourcesStatisticsRequest build() { - - return new GetResourcesStatisticsRequest( - timespan); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsRequestBuilder.java deleted file mode 100644 index 2c842975..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsRequestBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetResourcesStatistics; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.util.Optional; - -public class GetResourcesStatisticsRequestBuilder { - - private Optional timespan = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetResourcesStatisticsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetResourcesStatisticsRequestBuilder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.of(timespan); - return this; - } - - public GetResourcesStatisticsRequestBuilder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - - private GetResourcesStatisticsRequest buildRequest() { - - GetResourcesStatisticsRequest request = new GetResourcesStatisticsRequest(timespan); - - return request; - } - - public GetResourcesStatisticsResponse call() throws Exception { - - RequestOperation operation - = new GetResourcesStatistics.Sync(sdkConfiguration); - GetResourcesStatisticsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponse.java deleted file mode 100644 index ec8b33e4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetResourcesStatisticsResponse 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; - - /** - * Resource Statistics - */ - private Optional object; - - @JsonCreator - public GetResourcesStatisticsResponse( - 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 GetResourcesStatisticsResponse( - 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; - } - - /** - * Resource Statistics - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetResourcesStatisticsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetResourcesStatisticsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResourcesStatisticsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Resource Statistics - */ - public GetResourcesStatisticsResponse withObject(GetResourcesStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Resource Statistics - */ - public GetResourcesStatisticsResponse 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; - } - GetResourcesStatisticsResponse other = (GetResourcesStatisticsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Resource Statistics - */ - public Builder object(GetResourcesStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Resource Statistics - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetResourcesStatisticsResponse build() { - - return new GetResourcesStatisticsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponseBody.java deleted file mode 100644 index 0d257b5c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetResourcesStatisticsResponseBody - * - *

Resource Statistics - */ -public class GetResourcesStatisticsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetResourcesStatisticsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetResourcesStatisticsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetResourcesStatisticsResponseBody withMediaContainer(GetResourcesStatisticsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetResourcesStatisticsResponseBody 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; - } - GetResourcesStatisticsResponseBody other = (GetResourcesStatisticsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetResourcesStatisticsMediaContainer 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 GetResourcesStatisticsResponseBody build() { - - return new GetResourcesStatisticsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsMediaContainer.java new file mode 100644 index 00000000..d8b6cfb4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.MediaGrabOperation; +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.List; +import java.util.Optional; + +/** + * GetScheduledRecordingsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetScheduledRecordingsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaGrabOperation") + private Optional> mediaGrabOperation; + + @JsonCreator + public GetScheduledRecordingsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("MediaGrabOperation") Optional> mediaGrabOperation) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.mediaGrabOperation = mediaGrabOperation; + } + + public GetScheduledRecordingsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> mediaGrabOperation() { + return (Optional>) mediaGrabOperation; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetScheduledRecordingsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetScheduledRecordingsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetScheduledRecordingsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetScheduledRecordingsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetScheduledRecordingsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetScheduledRecordingsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetScheduledRecordingsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetScheduledRecordingsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetScheduledRecordingsMediaContainer withMediaGrabOperation(List mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = Optional.ofNullable(mediaGrabOperation); + return this; + } + + + public GetScheduledRecordingsMediaContainer withMediaGrabOperation(Optional> mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = mediaGrabOperation; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetScheduledRecordingsMediaContainer other = (GetScheduledRecordingsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.mediaGrabOperation, other.mediaGrabOperation); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, mediaGrabOperation); + } + + @Override + public String toString() { + return Utils.toString(GetScheduledRecordingsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "mediaGrabOperation", mediaGrabOperation); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> mediaGrabOperation = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder mediaGrabOperation(List mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = Optional.ofNullable(mediaGrabOperation); + return this; + } + + public Builder mediaGrabOperation(Optional> mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = mediaGrabOperation; + return this; + } + + public GetScheduledRecordingsMediaContainer build() { + + return new GetScheduledRecordingsMediaContainer( + identifier, offset, size, + totalSize, mediaGrabOperation); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsRequestBuilder.java new file mode 100644 index 00000000..bba921e9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetScheduledRecordings; +import java.lang.Exception; + +public class GetScheduledRecordingsRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetScheduledRecordingsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetScheduledRecordingsResponse call() throws Exception { + + RequestlessOperation operation + = new GetScheduledRecordings.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsResponse.java new file mode 100644 index 00000000..4913ce0d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetScheduledRecordingsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetScheduledRecordingsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetScheduledRecordingsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetScheduledRecordingsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetScheduledRecordingsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetScheduledRecordingsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetScheduledRecordingsResponse withObject(GetScheduledRecordingsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetScheduledRecordingsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetScheduledRecordingsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetScheduledRecordingsResponse other = (GetScheduledRecordingsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetScheduledRecordingsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetScheduledRecordingsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetScheduledRecordingsResponse build() { + + return new GetScheduledRecordingsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsResponseBody.java new file mode 100644 index 00000000..624ea4e0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetScheduledRecordingsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetScheduledRecordingsResponseBody + * + *

OK + */ +public class GetScheduledRecordingsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetScheduledRecordingsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetScheduledRecordingsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetScheduledRecordingsResponseBody withMediaContainer(GetScheduledRecordingsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetScheduledRecordingsResponseBody 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; + } + GetScheduledRecordingsResponseBody other = (GetScheduledRecordingsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetScheduledRecordingsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetScheduledRecordingsMediaContainer 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 GetScheduledRecordingsResponseBody build() { + + return new GetScheduledRecordingsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCountry.java deleted file mode 100644 index 967772cf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesCountry.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - - -public class GetSearchAllLibrariesCountry { - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - /** - * The country of origin of this media item - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetSearchAllLibrariesCountry( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - this.id = id; - this.tag = tag; - } - - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The country of origin of this media item - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public GetSearchAllLibrariesCountry withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The country of origin of this media item - */ - public GetSearchAllLibrariesCountry withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesCountry other = (GetSearchAllLibrariesCountry) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesCountry.class, - "id", id, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the country. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The country of origin of this media item - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetSearchAllLibrariesCountry build() { - - return new GetSearchAllLibrariesCountry( - id, tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirector.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirector.java deleted file mode 100644 index 73689cd1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirector.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchAllLibrariesDirector { - /** - * Unique identifier for the director. - */ - @JsonProperty("id") - private int id; - - /** - * The role of Director - */ - @JsonProperty("tag") - private String tag; - - /** - * The absolute URL of the thumbnail image for the director. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetSearchAllLibrariesDirector( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.tag = tag; - this.thumb = thumb; - } - - public GetSearchAllLibrariesDirector( - int id, - String tag) { - this(id, tag, Optional.empty()); - } - - /** - * Unique identifier for the director. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The role of Director - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique identifier for the director. - */ - public GetSearchAllLibrariesDirector withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The role of Director - */ - public GetSearchAllLibrariesDirector withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - public GetSearchAllLibrariesDirector withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the director. - */ - public GetSearchAllLibrariesDirector withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesDirector other = (GetSearchAllLibrariesDirector) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesDirector.class, - "id", id, - "tag", tag, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique identifier for the director. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The role of Director - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the director. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the director. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetSearchAllLibrariesDirector build() { - - return new GetSearchAllLibrariesDirector( - id, tag, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirectory.java deleted file mode 100644 index 4af310a5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesDirectory.java +++ /dev/null @@ -1,629 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchAllLibrariesDirectory { - /** - * The unique identifier path for the search result item. - */ - @JsonProperty("key") - private String key; - - /** - * The identifier for the library section. - */ - @JsonProperty("librarySectionID") - private long librarySectionID; - - /** - * The key corresponding to the library section. - */ - @JsonProperty("librarySectionKey") - private String librarySectionKey; - - /** - * The title of the library section. - */ - @JsonProperty("librarySectionTitle") - private String librarySectionTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionType") - private Optional librarySectionType; - - /** - * The type of the directory. - */ - @JsonProperty("type") - private String type; - - - @JsonProperty("id") - private long id; - - /** - * The filter string used to query this specific item in the library. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("filter") - private Optional filter; - - - @JsonProperty("tag") - private String tag; - - /** - * The type of tag associated with this search result (e.g., Director, Actor). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tagType") - private Optional tagType; - - /** - * The unique identifier for the tag associated with this search result. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tagKey") - private Optional tagKey; - - /** - * The URL to the thumbnail image associated with this search result. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - /** - * The number of items associated with this search result. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("count") - private Optional count; - - @JsonCreator - public GetSearchAllLibrariesDirectory( - @JsonProperty("key") String key, - @JsonProperty("librarySectionID") long librarySectionID, - @JsonProperty("librarySectionKey") String librarySectionKey, - @JsonProperty("librarySectionTitle") String librarySectionTitle, - @JsonProperty("type") String type, - @JsonProperty("id") long id, - @JsonProperty("filter") Optional filter, - @JsonProperty("tag") String tag, - @JsonProperty("tagKey") Optional tagKey, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("count") Optional count) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(tagKey, "tagKey"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(count, "count"); - this.key = key; - this.librarySectionID = librarySectionID; - this.librarySectionKey = librarySectionKey; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionType = Builder._SINGLETON_VALUE_LibrarySectionType.value(); - this.type = type; - this.id = id; - this.filter = filter; - this.tag = tag; - this.tagType = Builder._SINGLETON_VALUE_TagType.value(); - this.tagKey = tagKey; - this.thumb = thumb; - this.count = count; - } - - public GetSearchAllLibrariesDirectory( - String key, - long librarySectionID, - String librarySectionKey, - String librarySectionTitle, - String type, - long id, - String tag) { - this(key, librarySectionID, librarySectionKey, - librarySectionTitle, type, id, - Optional.empty(), tag, Optional.empty(), - Optional.empty(), Optional.empty()); - } - - /** - * The unique identifier path for the search result item. - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The identifier for the library section. - */ - @JsonIgnore - public long librarySectionID() { - return librarySectionID; - } - - /** - * The key corresponding to the library section. - */ - @JsonIgnore - public String librarySectionKey() { - return librarySectionKey; - } - - /** - * The title of the library section. - */ - @JsonIgnore - public String librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional librarySectionType() { - return librarySectionType; - } - - /** - * The type of the directory. - */ - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public long id() { - return id; - } - - /** - * The filter string used to query this specific item in the library. - */ - @JsonIgnore - public Optional filter() { - return filter; - } - - @JsonIgnore - public String tag() { - return tag; - } - - /** - * The type of tag associated with this search result (e.g., Director, Actor). - */ - @JsonIgnore - public Optional tagType() { - return tagType; - } - - /** - * The unique identifier for the tag associated with this search result. - */ - @JsonIgnore - public Optional tagKey() { - return tagKey; - } - - /** - * The URL to the thumbnail image associated with this search result. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - /** - * The number of items associated with this search result. - */ - @JsonIgnore - public Optional count() { - return count; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier path for the search result item. - */ - public GetSearchAllLibrariesDirectory withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The identifier for the library section. - */ - public GetSearchAllLibrariesDirectory withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - /** - * The key corresponding to the library section. - */ - public GetSearchAllLibrariesDirectory withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - /** - * The title of the library section. - */ - public GetSearchAllLibrariesDirectory withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - /** - * The type of the directory. - */ - public GetSearchAllLibrariesDirectory withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetSearchAllLibrariesDirectory withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The filter string used to query this specific item in the library. - */ - public GetSearchAllLibrariesDirectory withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - - /** - * The filter string used to query this specific item in the library. - */ - public GetSearchAllLibrariesDirectory withFilter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetSearchAllLibrariesDirectory withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * The unique identifier for the tag associated with this search result. - */ - public GetSearchAllLibrariesDirectory withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - - /** - * The unique identifier for the tag associated with this search result. - */ - public GetSearchAllLibrariesDirectory withTagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The URL to the thumbnail image associated with this search result. - */ - public GetSearchAllLibrariesDirectory withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The URL to the thumbnail image associated with this search result. - */ - public GetSearchAllLibrariesDirectory withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The number of items associated with this search result. - */ - public GetSearchAllLibrariesDirectory withCount(long count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.ofNullable(count); - return this; - } - - - /** - * The number of items associated with this search result. - */ - public GetSearchAllLibrariesDirectory withCount(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesDirectory other = (GetSearchAllLibrariesDirectory) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionKey, other.librarySectionKey) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionType, other.librarySectionType) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.tagType, other.tagType) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.count, other.count); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, librarySectionID, librarySectionKey, - librarySectionTitle, librarySectionType, type, - id, filter, tag, - tagType, tagKey, thumb, - count); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesDirectory.class, - "key", key, - "librarySectionID", librarySectionID, - "librarySectionKey", librarySectionKey, - "librarySectionTitle", librarySectionTitle, - "librarySectionType", librarySectionType, - "type", type, - "id", id, - "filter", filter, - "tag", tag, - "tagType", tagType, - "tagKey", tagKey, - "thumb", thumb, - "count", count); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String key; - - private Long librarySectionID; - - private String librarySectionKey; - - private String librarySectionTitle; - - private String type; - - private Long id; - - private Optional filter = Optional.empty(); - - private String tag; - - private Optional tagKey = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional count = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier path for the search result item. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The identifier for the library section. - */ - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - /** - * The key corresponding to the library section. - */ - public Builder librarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - - /** - * The type of the directory. - */ - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The filter string used to query this specific item in the library. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - /** - * The filter string used to query this specific item in the library. - */ - public Builder filter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * The unique identifier for the tag associated with this search result. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - /** - * The unique identifier for the tag associated with this search result. - */ - public Builder tagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - - /** - * The URL to the thumbnail image associated with this search result. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The URL to the thumbnail image associated with this search result. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The number of items associated with this search result. - */ - public Builder count(long count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.ofNullable(count); - return this; - } - - /** - * The number of items associated with this search result. - */ - public Builder count(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - public GetSearchAllLibrariesDirectory build() { - - return new GetSearchAllLibrariesDirectory( - key, librarySectionID, librarySectionKey, - librarySectionTitle, type, id, - filter, tag, tagKey, - thumb, count); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_LibrarySectionType = - new LazySingletonValue<>( - "librarySectionType", - "1", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_TagType = - new LazySingletonValue<>( - "tagType", - "4", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesFlattenSeasons.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesFlattenSeasons.java deleted file mode 100644 index d3752616..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesFlattenSeasons.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ -@JsonDeserialize(using = GetSearchAllLibrariesFlattenSeasons._Deserializer.class) -@JsonSerialize(using = GetSearchAllLibrariesFlattenSeasons._Serializer.class) -public class GetSearchAllLibrariesFlattenSeasons { - - public static final GetSearchAllLibrariesFlattenSeasons LibraryDefault = new GetSearchAllLibrariesFlattenSeasons("-1"); - public static final GetSearchAllLibrariesFlattenSeasons Hide = new GetSearchAllLibrariesFlattenSeasons("0"); - public static final GetSearchAllLibrariesFlattenSeasons Show = new GetSearchAllLibrariesFlattenSeasons("1"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetSearchAllLibrariesFlattenSeasons(String value) { - this.value = value; - } - - /** - * Returns a GetSearchAllLibrariesFlattenSeasons with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetSearchAllLibrariesFlattenSeasons - */ - public static GetSearchAllLibrariesFlattenSeasons of(String value) { - synchronized (GetSearchAllLibrariesFlattenSeasons.class) { - return values.computeIfAbsent(value, v -> new GetSearchAllLibrariesFlattenSeasons(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetSearchAllLibrariesFlattenSeasons other = (GetSearchAllLibrariesFlattenSeasons) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetSearchAllLibrariesFlattenSeasons [value=" + value + "]"; - } - - // return an array just like an enum - public static GetSearchAllLibrariesFlattenSeasons[] values() { - synchronized (GetSearchAllLibrariesFlattenSeasons.class) { - return values.values().toArray(new GetSearchAllLibrariesFlattenSeasons[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("-1", LibraryDefault); - map.put("0", Hide); - map.put("1", Show); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("-1", GetSearchAllLibrariesFlattenSeasonsEnum.LibraryDefault); - map.put("0", GetSearchAllLibrariesFlattenSeasonsEnum.Hide); - map.put("1", GetSearchAllLibrariesFlattenSeasonsEnum.Show); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetSearchAllLibrariesFlattenSeasons.class); - } - - @Override - public void serialize(GetSearchAllLibrariesFlattenSeasons value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetSearchAllLibrariesFlattenSeasons.class); - } - - @Override - public GetSearchAllLibrariesFlattenSeasons deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetSearchAllLibrariesFlattenSeasons.of(v); - } - } - - public enum GetSearchAllLibrariesFlattenSeasonsEnum { - - LibraryDefault("-1"), - Hide("0"), - Show("1"),; - - private final String value; - - private GetSearchAllLibrariesFlattenSeasonsEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGenre.java deleted file mode 100644 index 8c0b97b4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGenre.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - - -public class GetSearchAllLibrariesGenre { - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - /** - * The genre name of this media-item - */ - @JsonProperty("tag") - private String tag; - - @JsonCreator - public GetSearchAllLibrariesGenre( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - this.id = id; - this.tag = tag; - } - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The genre name of this media-item - */ - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public GetSearchAllLibrariesGenre withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The genre name of this media-item - */ - public GetSearchAllLibrariesGenre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesGenre other = (GetSearchAllLibrariesGenre) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesGenre.class, - "id", id, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the genre. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The genre name of this media-item - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetSearchAllLibrariesGenre build() { - - return new GetSearchAllLibrariesGenre( - id, tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGuids.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGuids.java deleted file mode 100644 index acd65bd2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesGuids.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetSearchAllLibrariesGuids { - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - @JsonProperty("id") - private String id; - - @JsonCreator - public GetSearchAllLibrariesGuids( - @JsonProperty("id") String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - } - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - @JsonIgnore - public String id() { - return id; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - public GetSearchAllLibrariesGuids 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; - } - GetSearchAllLibrariesGuids other = (GetSearchAllLibrariesGuids) o; - return - Utils.enhancedDeepEquals(this.id, other.id); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesGuids.class, - "id", id); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String id; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetSearchAllLibrariesGuids build() { - - return new GetSearchAllLibrariesGuids( - id); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesHasThumbnail.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesHasThumbnail.java deleted file mode 100644 index d98a7c8e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesHasThumbnail.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetSearchAllLibrariesHasThumbnail - * - *

Indicates if the part has a thumbnail. - */ -public enum GetSearchAllLibrariesHasThumbnail { - False("0"), - True("1"); - - @JsonValue - private final String value; - - GetSearchAllLibrariesHasThumbnail(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetSearchAllLibrariesHasThumbnail o: GetSearchAllLibrariesHasThumbnail.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesImage.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesImage.java deleted file mode 100644 index 5fd0a814..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesImage.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetSearchAllLibrariesImage { - - @JsonProperty("alt") - private String alt; - - - @JsonProperty("type") - private GetSearchAllLibrariesLibraryType type; - - - @JsonProperty("url") - private String url; - - @JsonCreator - public GetSearchAllLibrariesImage( - @JsonProperty("alt") String alt, - @JsonProperty("type") GetSearchAllLibrariesLibraryType 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 GetSearchAllLibrariesLibraryType type() { - return type; - } - - @JsonIgnore - public String url() { - return url; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchAllLibrariesImage withAlt(String alt) { - Utils.checkNotNull(alt, "alt"); - this.alt = alt; - return this; - } - - public GetSearchAllLibrariesImage withType(GetSearchAllLibrariesLibraryType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetSearchAllLibrariesImage 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; - } - GetSearchAllLibrariesImage other = (GetSearchAllLibrariesImage) o; - return - Utils.enhancedDeepEquals(this.alt, other.alt) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.url, other.url); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - alt, type, url); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesImage.class, - "alt", alt, - "type", type, - "url", url); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String alt; - - private GetSearchAllLibrariesLibraryType 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(GetSearchAllLibrariesLibraryType 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 GetSearchAllLibrariesImage build() { - - return new GetSearchAllLibrariesImage( - alt, type, url); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.java deleted file mode 100644 index c8221eb4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesLibraryOptimizedForStreaming.java +++ /dev/null @@ -1,100 +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.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; - -/** - * GetSearchAllLibrariesLibraryOptimizedForStreaming - * - *

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

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

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

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

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

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

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

The folder path for the media item. - */ -public class GetSearchAllLibrariesLocation { - - @JsonProperty("path") - private String path; - - @JsonCreator - public GetSearchAllLibrariesLocation( - @JsonProperty("path") String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - } - - @JsonIgnore - public String path() { - return path; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchAllLibrariesLocation withPath(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesLocation other = (GetSearchAllLibrariesLocation) o; - return - Utils.enhancedDeepEquals(this.path, other.path); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - path); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesLocation.class, - "path", path); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String path; - - private Builder() { - // force use of static builder() method - } - - - public Builder path(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - return this; - } - - public GetSearchAllLibrariesLocation build() { - - return new GetSearchAllLibrariesLocation( - path); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMedia.java deleted file mode 100644 index 17e9645e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMedia.java +++ /dev/null @@ -1,1187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Float; -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.Optional; - - -public class GetSearchAllLibrariesMedia { - /** - * Unique media identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Duration of the media in milliseconds. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - /** - * Bitrate in bits per second. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - /** - * Video width in pixels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("width") - private Optional width; - - /** - * Video height in pixels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("height") - private Optional height; - - /** - * Aspect ratio of the video. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("aspectRatio") - private Optional aspectRatio; - - /** - * Number of audio channels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannels") - private Optional audioChannels; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("displayOffset") - private Optional displayOffset; - - /** - * Audio codec used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioCodec") - private Optional audioCodec; - - /** - * Video codec used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoCodec") - private Optional videoCodec; - - /** - * Video resolution (e.g., 4k). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoResolution") - private Optional videoResolution; - - /** - * Container format of the media. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoFrameRate") - private Optional videoFrameRate; - - /** - * Video profile (e.g., main 10). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - /** - * Indicates whether voice activity is detected. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasVoiceActivity") - private Optional hasVoiceActivity; - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Part") - private Optional> part; - - @JsonCreator - public GetSearchAllLibrariesMedia( - @JsonProperty("id") long id, - @JsonProperty("duration") Optional duration, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("width") Optional width, - @JsonProperty("height") Optional height, - @JsonProperty("aspectRatio") Optional aspectRatio, - @JsonProperty("audioChannels") Optional audioChannels, - @JsonProperty("displayOffset") Optional displayOffset, - @JsonProperty("audioCodec") Optional audioCodec, - @JsonProperty("videoCodec") Optional videoCodec, - @JsonProperty("videoResolution") Optional videoResolution, - @JsonProperty("container") Optional container, - @JsonProperty("videoFrameRate") Optional videoFrameRate, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("Part") 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(displayOffset, "displayOffset"); - 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(audioProfile, "audioProfile"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - 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.displayOffset = displayOffset; - this.audioCodec = audioCodec; - this.videoCodec = videoCodec; - this.videoResolution = videoResolution; - this.container = container; - this.videoFrameRate = videoFrameRate; - this.videoProfile = videoProfile; - this.hasVoiceActivity = hasVoiceActivity; - this.audioProfile = audioProfile; - this.optimizedForStreaming = optimizedForStreaming; - this.has64bitOffsets = has64bitOffsets; - this.part = part; - } - - public GetSearchAllLibrariesMedia( - long id) { - this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Unique media identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Duration of the media in milliseconds. - */ - @JsonIgnore - public Optional duration() { - return duration; - } - - /** - * Bitrate in bits per second. - */ - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - /** - * Video width in pixels. - */ - @JsonIgnore - public Optional width() { - return width; - } - - /** - * Video height in pixels. - */ - @JsonIgnore - public Optional height() { - return height; - } - - /** - * Aspect ratio of the video. - */ - @JsonIgnore - public Optional aspectRatio() { - return aspectRatio; - } - - /** - * Number of audio channels. - */ - @JsonIgnore - public Optional audioChannels() { - return audioChannels; - } - - @JsonIgnore - public Optional displayOffset() { - return displayOffset; - } - - /** - * Audio codec used. - */ - @JsonIgnore - public Optional audioCodec() { - return audioCodec; - } - - /** - * Video codec used. - */ - @JsonIgnore - public Optional videoCodec() { - return videoCodec; - } - - /** - * Video resolution (e.g., 4k). - */ - @JsonIgnore - public Optional videoResolution() { - return videoResolution; - } - - /** - * Container format of the media. - */ - @JsonIgnore - public Optional container() { - return container; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - @JsonIgnore - public Optional videoFrameRate() { - return videoFrameRate; - } - - /** - * Video profile (e.g., main 10). - */ - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - /** - * Indicates whether voice activity is detected. - */ - @JsonIgnore - public Optional hasVoiceActivity() { - return hasVoiceActivity; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional optimizedForStreaming() { - return (Optional) optimizedForStreaming; - } - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> part() { - return (Optional>) part; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique media identifier. - */ - public GetSearchAllLibrariesMedia withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Duration of the media in milliseconds. - */ - public GetSearchAllLibrariesMedia withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - /** - * Duration of the media in milliseconds. - */ - public GetSearchAllLibrariesMedia withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * Bitrate in bits per second. - */ - public GetSearchAllLibrariesMedia withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - /** - * Bitrate in bits per second. - */ - public GetSearchAllLibrariesMedia withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * Video width in pixels. - */ - public GetSearchAllLibrariesMedia withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - /** - * Video width in pixels. - */ - public GetSearchAllLibrariesMedia withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Video height in pixels. - */ - public GetSearchAllLibrariesMedia withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - /** - * Video height in pixels. - */ - public GetSearchAllLibrariesMedia withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * Aspect ratio of the video. - */ - public GetSearchAllLibrariesMedia withAspectRatio(float aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - - /** - * Aspect ratio of the video. - */ - public GetSearchAllLibrariesMedia withAspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - /** - * Number of audio channels. - */ - public GetSearchAllLibrariesMedia withAudioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - - /** - * Number of audio channels. - */ - public GetSearchAllLibrariesMedia withAudioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - public GetSearchAllLibrariesMedia withDisplayOffset(int displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = Optional.ofNullable(displayOffset); - return this; - } - - - public GetSearchAllLibrariesMedia withDisplayOffset(Optional displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = displayOffset; - return this; - } - - /** - * Audio codec used. - */ - public GetSearchAllLibrariesMedia withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - - /** - * Audio codec used. - */ - public GetSearchAllLibrariesMedia withAudioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - /** - * Video codec used. - */ - public GetSearchAllLibrariesMedia withVideoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - - /** - * Video codec used. - */ - public GetSearchAllLibrariesMedia withVideoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - /** - * Video resolution (e.g., 4k). - */ - public GetSearchAllLibrariesMedia withVideoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - - /** - * Video resolution (e.g., 4k). - */ - public GetSearchAllLibrariesMedia withVideoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - /** - * Container format of the media. - */ - public GetSearchAllLibrariesMedia withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - /** - * Container format of the media. - */ - public GetSearchAllLibrariesMedia withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public GetSearchAllLibrariesMedia withVideoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public GetSearchAllLibrariesMedia withVideoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - /** - * Video profile (e.g., main 10). - */ - public GetSearchAllLibrariesMedia withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - /** - * Video profile (e.g., main 10). - */ - public GetSearchAllLibrariesMedia withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - /** - * Indicates whether voice activity is detected. - */ - public GetSearchAllLibrariesMedia withHasVoiceActivity(boolean hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); - return this; - } - - - /** - * Indicates whether voice activity is detected. - */ - public GetSearchAllLibrariesMedia withHasVoiceActivity(Optional hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = hasVoiceActivity; - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetSearchAllLibrariesMedia withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetSearchAllLibrariesMedia withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetSearchAllLibrariesMedia withOptimizedForStreaming(GetSearchAllLibrariesOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetSearchAllLibrariesMedia withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public GetSearchAllLibrariesMedia withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public GetSearchAllLibrariesMedia withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - public GetSearchAllLibrariesMedia withPart(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - - public GetSearchAllLibrariesMedia withPart(Optional> part) { - Utils.checkNotNull(part, "part"); - this.part = part; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesMedia other = (GetSearchAllLibrariesMedia) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.displayOffset, other.displayOffset) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && - Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.part, other.part); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, displayOffset, audioCodec, - videoCodec, videoResolution, container, - videoFrameRate, videoProfile, hasVoiceActivity, - audioProfile, optimizedForStreaming, has64bitOffsets, - part); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesMedia.class, - "id", id, - "duration", duration, - "bitrate", bitrate, - "width", width, - "height", height, - "aspectRatio", aspectRatio, - "audioChannels", audioChannels, - "displayOffset", displayOffset, - "audioCodec", audioCodec, - "videoCodec", videoCodec, - "videoResolution", videoResolution, - "container", container, - "videoFrameRate", videoFrameRate, - "videoProfile", videoProfile, - "hasVoiceActivity", hasVoiceActivity, - "audioProfile", audioProfile, - "optimizedForStreaming", optimizedForStreaming, - "has64bitOffsets", has64bitOffsets, - "part", part); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - 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 displayOffset = 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 videoProfile = Optional.empty(); - - private Optional hasVoiceActivity = Optional.empty(); - - private Optional audioProfile = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional> part = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique media identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Duration of the media in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - /** - * Duration of the media in milliseconds. - */ - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * Bitrate in bits per second. - */ - public Builder bitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * Bitrate in bits per second. - */ - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - - /** - * Video width in pixels. - */ - public Builder width(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * Video width in pixels. - */ - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - /** - * Video height in pixels. - */ - public Builder height(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * Video height in pixels. - */ - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - /** - * Aspect ratio of the video. - */ - public Builder aspectRatio(float aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - /** - * Aspect ratio of the video. - */ - public Builder aspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - - /** - * Number of audio channels. - */ - public Builder audioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - /** - * Number of audio channels. - */ - public Builder audioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - - public Builder displayOffset(int displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = Optional.ofNullable(displayOffset); - return this; - } - - public Builder displayOffset(Optional displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = displayOffset; - return this; - } - - - /** - * Audio codec used. - */ - public Builder audioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - /** - * Audio codec used. - */ - public Builder audioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - - /** - * Video codec used. - */ - public Builder videoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - /** - * Video codec used. - */ - public Builder videoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - - /** - * Video resolution (e.g., 4k). - */ - public Builder videoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - /** - * Video resolution (e.g., 4k). - */ - public Builder videoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - - /** - * Container format of the media. - */ - public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - /** - * Container format of the media. - */ - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Builder videoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Builder videoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - - /** - * Video profile (e.g., main 10). - */ - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - /** - * Video profile (e.g., main 10). - */ - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - - /** - * Indicates whether voice activity is detected. - */ - public Builder hasVoiceActivity(boolean hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); - return this; - } - - /** - * Indicates whether voice activity is detected. - */ - public Builder hasVoiceActivity(Optional hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = hasVoiceActivity; - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(GetSearchAllLibrariesOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public Builder has64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - /** - * Indicates whether the media has 64-bit offsets. - * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. - */ - public Builder has64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - 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 GetSearchAllLibrariesMedia build() { - - return new GetSearchAllLibrariesMedia( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, displayOffset, audioCodec, - videoCodec, videoResolution, container, - videoFrameRate, videoProfile, hasVoiceActivity, - audioProfile, optimizedForStreaming, has64bitOffsets, - part); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaContainer.java deleted file mode 100644 index d5938b4a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMediaContainer.java +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.List; -import java.util.Optional; - - -public class GetSearchAllLibrariesMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * Indicates whether syncing is allowed. - */ - @JsonProperty("allowSync") - private boolean allowSync; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - /** - * The unique identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - /** - * The title of the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - /** - * The universally unique identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionUUID") - private Optional librarySectionUUID; - - /** - * The prefix used for media tag resource paths. - */ - @JsonProperty("mediaTagPrefix") - private String mediaTagPrefix; - - /** - * The version number for media tags. - */ - @JsonProperty("mediaTagVersion") - private long mediaTagVersion; - - - @JsonProperty("SearchResult") - private List searchResult; - - @JsonCreator - public GetSearchAllLibrariesMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("identifier") String identifier, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionUUID") Optional librarySectionUUID, - @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("mediaTagVersion") long mediaTagVersion, - @JsonProperty("SearchResult") List searchResult) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(searchResult, "searchResult"); - this.size = size; - this.allowSync = allowSync; - this.identifier = identifier; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionUUID = librarySectionUUID; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.searchResult = searchResult; - } - - public GetSearchAllLibrariesMediaContainer( - int size, - boolean allowSync, - String identifier, - String mediaTagPrefix, - long mediaTagVersion, - List searchResult) { - this(size, allowSync, identifier, - Optional.empty(), Optional.empty(), Optional.empty(), - mediaTagPrefix, mediaTagVersion, searchResult); - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * Indicates whether syncing is allowed. - */ - @JsonIgnore - public boolean allowSync() { - return allowSync; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - /** - * The unique identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - /** - * The title of the library section. - */ - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - /** - * The universally unique identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionUUID() { - return librarySectionUUID; - } - - /** - * The prefix used for media tag resource paths. - */ - @JsonIgnore - public String mediaTagPrefix() { - return mediaTagPrefix; - } - - /** - * The version number for media tags. - */ - @JsonIgnore - public long mediaTagVersion() { - return mediaTagVersion; - } - - @JsonIgnore - public List searchResult() { - return searchResult; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetSearchAllLibrariesMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * Indicates whether syncing is allowed. - */ - public GetSearchAllLibrariesMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetSearchAllLibrariesMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - /** - * The unique identifier for the library section. - */ - public GetSearchAllLibrariesMediaContainer withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - /** - * The unique identifier for the library section. - */ - public GetSearchAllLibrariesMediaContainer withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - /** - * The title of the library section. - */ - public GetSearchAllLibrariesMediaContainer withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - /** - * The title of the library section. - */ - public GetSearchAllLibrariesMediaContainer withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - /** - * The universally unique identifier for the library section. - */ - public GetSearchAllLibrariesMediaContainer withLibrarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - - /** - * The universally unique identifier for the library section. - */ - public GetSearchAllLibrariesMediaContainer withLibrarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - /** - * The prefix used for media tag resource paths. - */ - public GetSearchAllLibrariesMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - /** - * The version number for media tags. - */ - public GetSearchAllLibrariesMediaContainer withMediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - public GetSearchAllLibrariesMediaContainer withSearchResult(List searchResult) { - Utils.checkNotNull(searchResult, "searchResult"); - this.searchResult = searchResult; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesMediaContainer other = (GetSearchAllLibrariesMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionUUID, other.librarySectionUUID) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.searchResult, other.searchResult); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowSync, identifier, - librarySectionID, librarySectionTitle, librarySectionUUID, - mediaTagPrefix, mediaTagVersion, searchResult); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesMediaContainer.class, - "size", size, - "allowSync", allowSync, - "identifier", identifier, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionUUID", librarySectionUUID, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "searchResult", searchResult); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Boolean allowSync; - - private String identifier; - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionUUID = Optional.empty(); - - private String mediaTagPrefix; - - private Long mediaTagVersion; - - private List searchResult; - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * Indicates whether syncing is allowed. - */ - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - /** - * The unique identifier for the library section. - */ - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - /** - * The unique identifier for the library section. - */ - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - - /** - * The universally unique identifier for the library section. - */ - public Builder librarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - /** - * The universally unique identifier for the library section. - */ - public Builder librarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - - /** - * The prefix used for media tag resource paths. - */ - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - - /** - * The version number for media tags. - */ - public Builder mediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - - public Builder searchResult(List searchResult) { - Utils.checkNotNull(searchResult, "searchResult"); - this.searchResult = searchResult; - return this; - } - - public GetSearchAllLibrariesMediaContainer build() { - - return new GetSearchAllLibrariesMediaContainer( - size, allowSync, identifier, - librarySectionID, librarySectionTitle, librarySectionUUID, - mediaTagPrefix, mediaTagVersion, searchResult); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetadata.java deleted file mode 100644 index 61d4a1d0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesMetadata.java +++ /dev/null @@ -1,3945 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Float; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.LocalDate; -import java.util.List; -import java.util.Optional; - -/** - * GetSearchAllLibrariesMetadata - * - *

Unknown - */ -public class GetSearchAllLibrariesMetadata { - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - @JsonProperty("ratingKey") - private String ratingKey; - - /** - * The unique key for the media item. - */ - @JsonProperty("key") - private String key; - - /** - * The globally unique identifier for the media item. - */ - @JsonProperty("guid") - private String guid; - - /** - * A URL‐friendly version of the media title. - */ - @JsonProperty("slug") - private String slug; - - /** - * The studio that produced the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("studio") - private Optional studio; - - - @JsonProperty("type") - private GetSearchAllLibrariesType type; - - /** - * The title of the media item. - */ - @JsonProperty("title") - private String title; - - /** - * The banner image URL for the media item. - */ - @JsonProperty("banner") - private String banner; - - /** - * The sort title used for ordering media items. - */ - @JsonProperty("titleSort") - private String titleSort; - - /** - * The content rating for the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("contentRating") - private Optional contentRating; - - /** - * A synopsis of the media item. - */ - @JsonProperty("summary") - private String summary; - - /** - * The critic rating for the media item. - */ - @JsonProperty("rating") - private float rating; - - /** - * The audience rating for the media item. - */ - @JsonProperty("audienceRating") - private double audienceRating; - - /** - * The release year of the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("year") - private Optional year; - - /** - * A brief tagline for the media item. - */ - @JsonProperty("tagline") - private String tagline; - - /** - * The thumbnail image URL for the media item. - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The art image URL for the media item. - */ - @JsonProperty("art") - private String art; - - /** - * The theme URL for the media item. - */ - @JsonProperty("theme") - private String theme; - - /** - * The index position of the media item. - */ - @JsonProperty("index") - private int index; - - /** - * The number of leaf items (end nodes) under this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - /** - * The number of leaf items that have been viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewedLeafCount") - private Optional viewedLeafCount; - - /** - * The number of child items associated with this media item. - */ - @JsonProperty("childCount") - private int childCount; - - /** - * The total number of seasons (for TV shows). - */ - @JsonProperty("seasonCount") - private int seasonCount; - - /** - * The duration of the media item in milliseconds. - */ - @JsonProperty("duration") - private int duration; - - /** - * The original release date of the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originallyAvailableAt") - private Optional originallyAvailableAt; - - - @JsonProperty("addedAt") - private long addedAt; - - /** - * Unix epoch datetime in seconds - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - /** - * The release year of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentYear") - private Optional parentYear; - - /** - * The URL for the audience rating image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audienceRatingImage") - private Optional audienceRatingImage; - - /** - * The source from which chapter data is derived. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chapterSource") - private Optional chapterSource; - - /** - * The primary extra key associated with this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("primaryExtraKey") - private Optional primaryExtraKey; - - /** - * The original title of the media item (if different). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originalTitle") - private Optional originalTitle; - - /** - * The rating key of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentRatingKey") - private Optional parentRatingKey; - - /** - * The rating key of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentRatingKey") - private Optional grandparentRatingKey; - - /** - * The GUID of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentGuid") - private Optional parentGuid; - - /** - * The GUID of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentGuid") - private Optional grandparentGuid; - - /** - * The slug for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentSlug") - private Optional grandparentSlug; - - /** - * The key of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentKey") - private Optional grandparentKey; - - /** - * The key of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - /** - * The title of the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTitle") - private Optional grandparentTitle; - - /** - * The thumbnail URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentThumb") - private Optional grandparentThumb; - - /** - * The theme URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTheme") - private Optional grandparentTheme; - - /** - * The art URL for the grandparent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentArt") - private Optional grandparentArt; - - /** - * The title of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - /** - * The index position of the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - /** - * The thumbnail URL for the parent media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - /** - * The URL for the rating image. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingImage") - private Optional ratingImage; - - /** - * The number of times this media item has been viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewCount") - private Optional viewCount; - - /** - * The current playback offset (in milliseconds). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewOffset") - private Optional viewOffset; - - /** - * The number of times this media item has been skipped. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipCount") - private Optional skipCount; - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; - - /** - * The Unix timestamp representing the last time the item was rated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastRatedAt") - private Optional lastRatedAt; - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAtAccuracy") - private Optional createdAtAccuracy; - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAtTZOffset") - private Optional createdAtTZOffset; - - /** - * Unix timestamp for when the media item was last viewed. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lastViewedAt") - private Optional lastViewedAt; - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("userRating") - private Optional userRating; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Image") - private Optional> image; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("UltraBlurColors") - private Optional ultraBlurColors; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Guid") - private Optional> guids; - - /** - * The identifier for the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - /** - * The title of the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - /** - * The key corresponding to the library section. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionKey") - private Optional librarySectionKey; - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("showOrdering") - private Optional showOrdering; - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("flattenSeasons") - private Optional flattenSeasons; - - /** - * Indicates whether child items should be skipped. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("skipChildren") - private Optional skipChildren; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Media") - private Optional> media; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Genre") - private Optional> genre; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Country") - private Optional> country; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Director") - private Optional> director; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Writer") - private Optional> writer; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Role") - private Optional> role; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Location") - private Optional> location; - - @JsonCreator - public GetSearchAllLibrariesMetadata( - @JsonProperty("ratingKey") String ratingKey, - @JsonProperty("key") String key, - @JsonProperty("guid") String guid, - @JsonProperty("slug") String slug, - @JsonProperty("studio") Optional studio, - @JsonProperty("type") GetSearchAllLibrariesType type, - @JsonProperty("title") String title, - @JsonProperty("banner") String banner, - @JsonProperty("titleSort") String titleSort, - @JsonProperty("contentRating") Optional contentRating, - @JsonProperty("summary") String summary, - @JsonProperty("rating") float rating, - @JsonProperty("audienceRating") double audienceRating, - @JsonProperty("year") Optional year, - @JsonProperty("tagline") String tagline, - @JsonProperty("thumb") String thumb, - @JsonProperty("art") String art, - @JsonProperty("theme") String theme, - @JsonProperty("index") int index, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("viewedLeafCount") Optional viewedLeafCount, - @JsonProperty("childCount") int childCount, - @JsonProperty("seasonCount") int seasonCount, - @JsonProperty("duration") int duration, - @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, - @JsonProperty("addedAt") long addedAt, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("parentYear") Optional parentYear, - @JsonProperty("audienceRatingImage") Optional audienceRatingImage, - @JsonProperty("chapterSource") Optional chapterSource, - @JsonProperty("primaryExtraKey") Optional primaryExtraKey, - @JsonProperty("originalTitle") Optional originalTitle, - @JsonProperty("parentRatingKey") Optional parentRatingKey, - @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, - @JsonProperty("parentGuid") Optional parentGuid, - @JsonProperty("grandparentGuid") Optional grandparentGuid, - @JsonProperty("grandparentSlug") Optional grandparentSlug, - @JsonProperty("grandparentKey") Optional grandparentKey, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("grandparentTitle") Optional grandparentTitle, - @JsonProperty("grandparentThumb") Optional grandparentThumb, - @JsonProperty("grandparentTheme") Optional grandparentTheme, - @JsonProperty("grandparentArt") Optional grandparentArt, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("ratingImage") Optional ratingImage, - @JsonProperty("viewCount") Optional viewCount, - @JsonProperty("viewOffset") Optional viewOffset, - @JsonProperty("skipCount") Optional skipCount, - @JsonProperty("subtype") Optional subtype, - @JsonProperty("lastRatedAt") Optional lastRatedAt, - @JsonProperty("createdAtAccuracy") Optional createdAtAccuracy, - @JsonProperty("createdAtTZOffset") Optional createdAtTZOffset, - @JsonProperty("lastViewedAt") Optional lastViewedAt, - @JsonProperty("userRating") Optional userRating, - @JsonProperty("Image") Optional> image, - @JsonProperty("UltraBlurColors") Optional ultraBlurColors, - @JsonProperty("Guid") Optional> guids, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionKey") Optional librarySectionKey, - @JsonProperty("showOrdering") Optional showOrdering, - @JsonProperty("flattenSeasons") Optional flattenSeasons, - @JsonProperty("skipChildren") Optional skipChildren, - @JsonProperty("Media") Optional> media, - @JsonProperty("Genre") Optional> genre, - @JsonProperty("Country") Optional> country, - @JsonProperty("Director") Optional> director, - @JsonProperty("Writer") Optional> writer, - @JsonProperty("Role") Optional> role, - @JsonProperty("Location") Optional> location) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(slug, "slug"); - Utils.checkNotNull(studio, "studio"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(banner, "banner"); - Utils.checkNotNull(titleSort, "titleSort"); - Utils.checkNotNull(contentRating, "contentRating"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(rating, "rating"); - Utils.checkNotNull(audienceRating, "audienceRating"); - Utils.checkNotNull(year, "year"); - Utils.checkNotNull(tagline, "tagline"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(theme, "theme"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - Utils.checkNotNull(childCount, "childCount"); - Utils.checkNotNull(seasonCount, "seasonCount"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(parentYear, "parentYear"); - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - Utils.checkNotNull(chapterSource, "chapterSource"); - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - Utils.checkNotNull(originalTitle, "originalTitle"); - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - Utils.checkNotNull(parentGuid, "parentGuid"); - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - Utils.checkNotNull(grandparentKey, "grandparentKey"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - Utils.checkNotNull(grandparentArt, "grandparentArt"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(ratingImage, "ratingImage"); - Utils.checkNotNull(viewCount, "viewCount"); - Utils.checkNotNull(viewOffset, "viewOffset"); - Utils.checkNotNull(skipCount, "skipCount"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - Utils.checkNotNull(userRating, "userRating"); - Utils.checkNotNull(image, "image"); - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - Utils.checkNotNull(guids, "guids"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - Utils.checkNotNull(showOrdering, "showOrdering"); - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - Utils.checkNotNull(skipChildren, "skipChildren"); - Utils.checkNotNull(media, "media"); - Utils.checkNotNull(genre, "genre"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(director, "director"); - Utils.checkNotNull(writer, "writer"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(location, "location"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.slug = slug; - this.studio = studio; - this.type = type; - this.title = title; - this.banner = banner; - this.titleSort = titleSort; - 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.theme = theme; - this.index = index; - this.leafCount = leafCount; - this.viewedLeafCount = viewedLeafCount; - this.childCount = childCount; - this.seasonCount = seasonCount; - this.duration = duration; - this.originallyAvailableAt = originallyAvailableAt; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - this.parentYear = parentYear; - this.audienceRatingImage = audienceRatingImage; - this.chapterSource = chapterSource; - this.primaryExtraKey = primaryExtraKey; - this.originalTitle = originalTitle; - this.parentRatingKey = parentRatingKey; - this.grandparentRatingKey = grandparentRatingKey; - this.parentGuid = parentGuid; - this.grandparentGuid = grandparentGuid; - this.grandparentSlug = grandparentSlug; - this.grandparentKey = grandparentKey; - this.parentKey = parentKey; - this.grandparentTitle = grandparentTitle; - this.grandparentThumb = grandparentThumb; - this.grandparentTheme = grandparentTheme; - this.grandparentArt = grandparentArt; - this.parentTitle = parentTitle; - this.parentIndex = parentIndex; - this.parentThumb = parentThumb; - this.ratingImage = ratingImage; - this.viewCount = viewCount; - this.viewOffset = viewOffset; - this.skipCount = skipCount; - this.subtype = subtype; - this.lastRatedAt = lastRatedAt; - this.createdAtAccuracy = createdAtAccuracy; - this.createdAtTZOffset = createdAtTZOffset; - this.lastViewedAt = lastViewedAt; - this.userRating = userRating; - this.image = image; - this.ultraBlurColors = ultraBlurColors; - this.guids = guids; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionKey = librarySectionKey; - this.showOrdering = showOrdering; - this.flattenSeasons = flattenSeasons; - this.skipChildren = skipChildren; - this.media = media; - this.genre = genre; - this.country = country; - this.director = director; - this.writer = writer; - this.role = role; - this.location = location; - } - - public GetSearchAllLibrariesMetadata( - String ratingKey, - String key, - String guid, - String slug, - GetSearchAllLibrariesType type, - String title, - String banner, - String titleSort, - String summary, - float rating, - double audienceRating, - String tagline, - String thumb, - String art, - String theme, - int index, - int childCount, - int seasonCount, - int duration, - long addedAt) { - this(ratingKey, key, guid, - slug, Optional.empty(), type, - title, banner, titleSort, - Optional.empty(), summary, rating, - audienceRating, Optional.empty(), tagline, - thumb, art, theme, - index, Optional.empty(), Optional.empty(), - childCount, seasonCount, duration, - Optional.empty(), addedAt, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - @JsonIgnore - public String ratingKey() { - return ratingKey; - } - - /** - * The unique key for the media item. - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The globally unique identifier for the media item. - */ - @JsonIgnore - public String guid() { - return guid; - } - - /** - * A URL‐friendly version of the media title. - */ - @JsonIgnore - public String slug() { - return slug; - } - - /** - * The studio that produced the media item. - */ - @JsonIgnore - public Optional studio() { - return studio; - } - - @JsonIgnore - public GetSearchAllLibrariesType type() { - return type; - } - - /** - * The title of the media item. - */ - @JsonIgnore - public String title() { - return title; - } - - /** - * The banner image URL for the media item. - */ - @JsonIgnore - public String banner() { - return banner; - } - - /** - * The sort title used for ordering media items. - */ - @JsonIgnore - public String titleSort() { - return titleSort; - } - - /** - * The content rating for the media item. - */ - @JsonIgnore - public Optional contentRating() { - return contentRating; - } - - /** - * A synopsis of the media item. - */ - @JsonIgnore - public String summary() { - return summary; - } - - /** - * The critic rating for the media item. - */ - @JsonIgnore - public float rating() { - return rating; - } - - /** - * The audience rating for the media item. - */ - @JsonIgnore - public double audienceRating() { - return audienceRating; - } - - /** - * The release year of the media item. - */ - @JsonIgnore - public Optional year() { - return year; - } - - /** - * A brief tagline for the media item. - */ - @JsonIgnore - public String tagline() { - return tagline; - } - - /** - * The thumbnail image URL for the media item. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The art image URL for the media item. - */ - @JsonIgnore - public String art() { - return art; - } - - /** - * The theme URL for the media item. - */ - @JsonIgnore - public String theme() { - return theme; - } - - /** - * The index position of the media item. - */ - @JsonIgnore - public int index() { - return index; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - /** - * The number of leaf items that have been viewed. - */ - @JsonIgnore - public Optional viewedLeafCount() { - return viewedLeafCount; - } - - /** - * The number of child items associated with this media item. - */ - @JsonIgnore - public int childCount() { - return childCount; - } - - /** - * The total number of seasons (for TV shows). - */ - @JsonIgnore - public int seasonCount() { - return seasonCount; - } - - /** - * The duration of the media item in milliseconds. - */ - @JsonIgnore - public int duration() { - return duration; - } - - /** - * The original release date of the media item. - */ - @JsonIgnore - public Optional originallyAvailableAt() { - return originallyAvailableAt; - } - - @JsonIgnore - public long addedAt() { - return addedAt; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - /** - * The release year of the parent media item. - */ - @JsonIgnore - public Optional parentYear() { - return parentYear; - } - - /** - * The URL for the audience rating image. - */ - @JsonIgnore - public Optional audienceRatingImage() { - return audienceRatingImage; - } - - /** - * The source from which chapter data is derived. - */ - @JsonIgnore - public Optional chapterSource() { - return chapterSource; - } - - /** - * The primary extra key associated with this media item. - */ - @JsonIgnore - public Optional primaryExtraKey() { - return primaryExtraKey; - } - - /** - * The original title of the media item (if different). - */ - @JsonIgnore - public Optional originalTitle() { - return originalTitle; - } - - /** - * The rating key of the parent media item. - */ - @JsonIgnore - public Optional parentRatingKey() { - return parentRatingKey; - } - - /** - * The rating key of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentRatingKey() { - return grandparentRatingKey; - } - - /** - * The GUID of the parent media item. - */ - @JsonIgnore - public Optional parentGuid() { - return parentGuid; - } - - /** - * The GUID of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentGuid() { - return grandparentGuid; - } - - /** - * The slug for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentSlug() { - return grandparentSlug; - } - - /** - * The key of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentKey() { - return grandparentKey; - } - - /** - * The key of the parent media item. - */ - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - /** - * The title of the grandparent media item. - */ - @JsonIgnore - public Optional grandparentTitle() { - return grandparentTitle; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentThumb() { - return grandparentThumb; - } - - /** - * The theme URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentTheme() { - return grandparentTheme; - } - - /** - * The art URL for the grandparent media item. - */ - @JsonIgnore - public Optional grandparentArt() { - return grandparentArt; - } - - /** - * The title of the parent media item. - */ - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - /** - * The index position of the parent media item. - */ - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - /** - * The thumbnail URL for the parent media item. - */ - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - /** - * The URL for the rating image. - */ - @JsonIgnore - public Optional ratingImage() { - return ratingImage; - } - - /** - * The number of times this media item has been viewed. - */ - @JsonIgnore - public Optional viewCount() { - return viewCount; - } - - /** - * The current playback offset (in milliseconds). - */ - @JsonIgnore - public Optional viewOffset() { - return viewOffset; - } - - /** - * The number of times this media item has been skipped. - */ - @JsonIgnore - public Optional skipCount() { - return skipCount; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - @JsonIgnore - public Optional subtype() { - return subtype; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - @JsonIgnore - public Optional lastRatedAt() { - return lastRatedAt; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - @JsonIgnore - public Optional createdAtAccuracy() { - return createdAtAccuracy; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - @JsonIgnore - public Optional createdAtTZOffset() { - return createdAtTZOffset; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - @JsonIgnore - public Optional lastViewedAt() { - return lastViewedAt; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - @JsonIgnore - public Optional userRating() { - return userRating; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> image() { - return (Optional>) image; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional ultraBlurColors() { - return (Optional) ultraBlurColors; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> guids() { - return (Optional>) guids; - } - - /** - * The identifier for the library section. - */ - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - /** - * The title of the library section. - */ - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - /** - * The key corresponding to the library section. - */ - @JsonIgnore - public Optional librarySectionKey() { - return librarySectionKey; - } - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional showOrdering() { - return (Optional) showOrdering; - } - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional flattenSeasons() { - return (Optional) flattenSeasons; - } - - /** - * Indicates whether child items should be skipped. - */ - @JsonIgnore - public Optional skipChildren() { - return skipChildren; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> media() { - return (Optional>) media; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> genre() { - return (Optional>) genre; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> country() { - return (Optional>) country; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> director() { - return (Optional>) director; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> writer() { - return (Optional>) writer; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> role() { - return (Optional>) role; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> location() { - return (Optional>) location; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - public GetSearchAllLibrariesMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * The unique key for the media item. - */ - public GetSearchAllLibrariesMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The globally unique identifier for the media item. - */ - public GetSearchAllLibrariesMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - /** - * A URL‐friendly version of the media title. - */ - public GetSearchAllLibrariesMetadata withSlug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - /** - * The studio that produced the media item. - */ - public GetSearchAllLibrariesMetadata withStudio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - - /** - * The studio that produced the media item. - */ - public GetSearchAllLibrariesMetadata withStudio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - public GetSearchAllLibrariesMetadata withType(GetSearchAllLibrariesType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The title of the media item. - */ - public GetSearchAllLibrariesMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * The banner image URL for the media item. - */ - public GetSearchAllLibrariesMetadata withBanner(String banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = banner; - return this; - } - - /** - * The sort title used for ordering media items. - */ - public GetSearchAllLibrariesMetadata withTitleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - /** - * The content rating for the media item. - */ - public GetSearchAllLibrariesMetadata withContentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - - /** - * The content rating for the media item. - */ - public GetSearchAllLibrariesMetadata withContentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - /** - * A synopsis of the media item. - */ - public GetSearchAllLibrariesMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - /** - * The critic rating for the media item. - */ - public GetSearchAllLibrariesMetadata withRating(float rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - /** - * The audience rating for the media item. - */ - public GetSearchAllLibrariesMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - /** - * The release year of the media item. - */ - public GetSearchAllLibrariesMetadata withYear(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - - /** - * The release year of the media item. - */ - public GetSearchAllLibrariesMetadata withYear(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - /** - * A brief tagline for the media item. - */ - public GetSearchAllLibrariesMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - /** - * The thumbnail image URL for the media item. - */ - public GetSearchAllLibrariesMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The art image URL for the media item. - */ - public GetSearchAllLibrariesMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - /** - * The theme URL for the media item. - */ - public GetSearchAllLibrariesMetadata withTheme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - /** - * The index position of the media item. - */ - public GetSearchAllLibrariesMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - public GetSearchAllLibrariesMetadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - /** - * The number of leaf items (end nodes) under this media item. - */ - public GetSearchAllLibrariesMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - /** - * The number of leaf items that have been viewed. - */ - public GetSearchAllLibrariesMetadata withViewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - - /** - * The number of leaf items that have been viewed. - */ - public GetSearchAllLibrariesMetadata withViewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - /** - * The number of child items associated with this media item. - */ - public GetSearchAllLibrariesMetadata withChildCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - /** - * The total number of seasons (for TV shows). - */ - public GetSearchAllLibrariesMetadata withSeasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - - /** - * The duration of the media item in milliseconds. - */ - public GetSearchAllLibrariesMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * The original release date of the media item. - */ - public GetSearchAllLibrariesMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - - /** - * The original release date of the media item. - */ - public GetSearchAllLibrariesMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - public GetSearchAllLibrariesMetadata withAddedAt(long addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public GetSearchAllLibrariesMetadata withUpdatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public GetSearchAllLibrariesMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - /** - * The release year of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - - /** - * The release year of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - /** - * The URL for the audience rating image. - */ - public GetSearchAllLibrariesMetadata withAudienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - - /** - * The URL for the audience rating image. - */ - public GetSearchAllLibrariesMetadata withAudienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - /** - * The source from which chapter data is derived. - */ - public GetSearchAllLibrariesMetadata withChapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - - /** - * The source from which chapter data is derived. - */ - public GetSearchAllLibrariesMetadata withChapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - /** - * The primary extra key associated with this media item. - */ - public GetSearchAllLibrariesMetadata withPrimaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - - /** - * The primary extra key associated with this media item. - */ - public GetSearchAllLibrariesMetadata withPrimaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - /** - * The original title of the media item (if different). - */ - public GetSearchAllLibrariesMetadata withOriginalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - - /** - * The original title of the media item (if different). - */ - public GetSearchAllLibrariesMetadata withOriginalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - /** - * The rating key of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - - /** - * The rating key of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - /** - * The rating key of the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - - /** - * The rating key of the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - /** - * The GUID of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - - /** - * The GUID of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - /** - * The GUID of the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - - /** - * The GUID of the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - /** - * The slug for the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentSlug(String grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = Optional.ofNullable(grandparentSlug); - return this; - } - - - /** - * The slug for the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentSlug(Optional grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = grandparentSlug; - return this; - } - - /** - * The key of the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - - /** - * The key of the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - /** - * The key of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - - /** - * The key of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - /** - * The title of the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - - /** - * The title of the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - - /** - * The thumbnail URL for the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - /** - * The theme URL for the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentTheme(String grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = Optional.ofNullable(grandparentTheme); - return this; - } - - - /** - * The theme URL for the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentTheme(Optional grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = grandparentTheme; - return this; - } - - /** - * The art URL for the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - - /** - * The art URL for the grandparent media item. - */ - public GetSearchAllLibrariesMetadata withGrandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - /** - * The title of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - - /** - * The title of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - /** - * The index position of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - - /** - * The index position of the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - /** - * The thumbnail URL for the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - - /** - * The thumbnail URL for the parent media item. - */ - public GetSearchAllLibrariesMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - /** - * The URL for the rating image. - */ - public GetSearchAllLibrariesMetadata withRatingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - - /** - * The URL for the rating image. - */ - public GetSearchAllLibrariesMetadata withRatingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - /** - * The number of times this media item has been viewed. - */ - public GetSearchAllLibrariesMetadata withViewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - - /** - * The number of times this media item has been viewed. - */ - public GetSearchAllLibrariesMetadata withViewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - /** - * The current playback offset (in milliseconds). - */ - public GetSearchAllLibrariesMetadata withViewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - - /** - * The current playback offset (in milliseconds). - */ - public GetSearchAllLibrariesMetadata withViewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - /** - * The number of times this media item has been skipped. - */ - public GetSearchAllLibrariesMetadata withSkipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - - /** - * The number of times this media item has been skipped. - */ - public GetSearchAllLibrariesMetadata withSkipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public GetSearchAllLibrariesMetadata withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public GetSearchAllLibrariesMetadata withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public GetSearchAllLibrariesMetadata withLastRatedAt(long lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public GetSearchAllLibrariesMetadata withLastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public GetSearchAllLibrariesMetadata withCreatedAtAccuracy(String createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); - return this; - } - - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public GetSearchAllLibrariesMetadata withCreatedAtAccuracy(Optional createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = createdAtAccuracy; - return this; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public GetSearchAllLibrariesMetadata withCreatedAtTZOffset(String createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); - return this; - } - - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public GetSearchAllLibrariesMetadata withCreatedAtTZOffset(Optional createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = createdAtTZOffset; - return this; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - public GetSearchAllLibrariesMetadata withLastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - - /** - * Unix timestamp for when the media item was last viewed. - */ - public GetSearchAllLibrariesMetadata withLastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public GetSearchAllLibrariesMetadata withUserRating(float userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public GetSearchAllLibrariesMetadata withUserRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - public GetSearchAllLibrariesMetadata withImage(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - - public GetSearchAllLibrariesMetadata withImage(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - public GetSearchAllLibrariesMetadata withUltraBlurColors(GetSearchAllLibrariesUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); - return this; - } - - - public GetSearchAllLibrariesMetadata withUltraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; - return this; - } - - public GetSearchAllLibrariesMetadata withGuids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - - public GetSearchAllLibrariesMetadata withGuids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - /** - * The identifier for the library section. - */ - public GetSearchAllLibrariesMetadata withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - /** - * The identifier for the library section. - */ - public GetSearchAllLibrariesMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - /** - * The title of the library section. - */ - public GetSearchAllLibrariesMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - /** - * The title of the library section. - */ - public GetSearchAllLibrariesMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - /** - * The key corresponding to the library section. - */ - public GetSearchAllLibrariesMetadata withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - - /** - * The key corresponding to the library section. - */ - public GetSearchAllLibrariesMetadata withLibrarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - public GetSearchAllLibrariesMetadata withShowOrdering(GetSearchAllLibrariesShowOrdering showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = Optional.ofNullable(showOrdering); - return this; - } - - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - public GetSearchAllLibrariesMetadata withShowOrdering(Optional showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = showOrdering; - return this; - } - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public GetSearchAllLibrariesMetadata withFlattenSeasons(GetSearchAllLibrariesFlattenSeasons flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = Optional.ofNullable(flattenSeasons); - return this; - } - - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public GetSearchAllLibrariesMetadata withFlattenSeasons(Optional flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = flattenSeasons; - return this; - } - - /** - * Indicates whether child items should be skipped. - */ - public GetSearchAllLibrariesMetadata withSkipChildren(boolean skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = Optional.ofNullable(skipChildren); - return this; - } - - - /** - * Indicates whether child items should be skipped. - */ - public GetSearchAllLibrariesMetadata withSkipChildren(Optional skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = skipChildren; - return this; - } - - public GetSearchAllLibrariesMetadata withMedia(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - - public GetSearchAllLibrariesMetadata withMedia(Optional> media) { - Utils.checkNotNull(media, "media"); - this.media = media; - return this; - } - - public GetSearchAllLibrariesMetadata withGenre(List genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = Optional.ofNullable(genre); - return this; - } - - - public GetSearchAllLibrariesMetadata withGenre(Optional> genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = genre; - return this; - } - - public GetSearchAllLibrariesMetadata withCountry(List country) { - Utils.checkNotNull(country, "country"); - this.country = Optional.ofNullable(country); - return this; - } - - - public GetSearchAllLibrariesMetadata withCountry(Optional> country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - public GetSearchAllLibrariesMetadata withDirector(List director) { - Utils.checkNotNull(director, "director"); - this.director = Optional.ofNullable(director); - return this; - } - - - public GetSearchAllLibrariesMetadata withDirector(Optional> director) { - Utils.checkNotNull(director, "director"); - this.director = director; - return this; - } - - public GetSearchAllLibrariesMetadata withWriter(List writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = Optional.ofNullable(writer); - return this; - } - - - public GetSearchAllLibrariesMetadata withWriter(Optional> writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = writer; - return this; - } - - public GetSearchAllLibrariesMetadata withRole(List role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - public GetSearchAllLibrariesMetadata withRole(Optional> role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - public GetSearchAllLibrariesMetadata withLocation(List location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - - public GetSearchAllLibrariesMetadata withLocation(Optional> location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesMetadata other = (GetSearchAllLibrariesMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.slug, other.slug) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.banner, other.banner) && - Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.rating, other.rating) && - Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.theme, other.theme) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && - Utils.enhancedDeepEquals(this.childCount, other.childCount) && - Utils.enhancedDeepEquals(this.seasonCount, other.seasonCount) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.parentYear, other.parentYear) && - Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && - Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && - Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && - Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && - Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && - Utils.enhancedDeepEquals(this.parentGuid, other.parentGuid) && - Utils.enhancedDeepEquals(this.grandparentGuid, other.grandparentGuid) && - Utils.enhancedDeepEquals(this.grandparentSlug, other.grandparentSlug) && - Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && - Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && - Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && - Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && - Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && - Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && - Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && - Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && - Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && - Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && - Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && - Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && - Utils.enhancedDeepEquals(this.skipCount, other.skipCount) && - Utils.enhancedDeepEquals(this.subtype, other.subtype) && - Utils.enhancedDeepEquals(this.lastRatedAt, other.lastRatedAt) && - Utils.enhancedDeepEquals(this.createdAtAccuracy, other.createdAtAccuracy) && - Utils.enhancedDeepEquals(this.createdAtTZOffset, other.createdAtTZOffset) && - Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && - Utils.enhancedDeepEquals(this.userRating, other.userRating) && - Utils.enhancedDeepEquals(this.image, other.image) && - Utils.enhancedDeepEquals(this.ultraBlurColors, other.ultraBlurColors) && - Utils.enhancedDeepEquals(this.guids, other.guids) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionKey, other.librarySectionKey) && - Utils.enhancedDeepEquals(this.showOrdering, other.showOrdering) && - Utils.enhancedDeepEquals(this.flattenSeasons, other.flattenSeasons) && - Utils.enhancedDeepEquals(this.skipChildren, other.skipChildren) && - Utils.enhancedDeepEquals(this.media, other.media) && - Utils.enhancedDeepEquals(this.genre, other.genre) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.director, other.director) && - Utils.enhancedDeepEquals(this.writer, other.writer) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.location, other.location); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - slug, studio, type, - title, banner, titleSort, - contentRating, summary, rating, - audienceRating, year, tagline, - thumb, art, theme, - index, leafCount, viewedLeafCount, - childCount, seasonCount, duration, - originallyAvailableAt, addedAt, updatedAt, - parentYear, audienceRatingImage, chapterSource, - primaryExtraKey, originalTitle, parentRatingKey, - grandparentRatingKey, parentGuid, grandparentGuid, - grandparentSlug, grandparentKey, parentKey, - grandparentTitle, grandparentThumb, grandparentTheme, - grandparentArt, parentTitle, parentIndex, - parentThumb, ratingImage, viewCount, - viewOffset, skipCount, subtype, - lastRatedAt, createdAtAccuracy, createdAtTZOffset, - lastViewedAt, userRating, image, - ultraBlurColors, guids, librarySectionID, - librarySectionTitle, librarySectionKey, showOrdering, - flattenSeasons, skipChildren, media, - genre, country, director, - writer, role, location); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "slug", slug, - "studio", studio, - "type", type, - "title", title, - "banner", banner, - "titleSort", titleSort, - "contentRating", contentRating, - "summary", summary, - "rating", rating, - "audienceRating", audienceRating, - "year", year, - "tagline", tagline, - "thumb", thumb, - "art", art, - "theme", theme, - "index", index, - "leafCount", leafCount, - "viewedLeafCount", viewedLeafCount, - "childCount", childCount, - "seasonCount", seasonCount, - "duration", duration, - "originallyAvailableAt", originallyAvailableAt, - "addedAt", addedAt, - "updatedAt", updatedAt, - "parentYear", parentYear, - "audienceRatingImage", audienceRatingImage, - "chapterSource", chapterSource, - "primaryExtraKey", primaryExtraKey, - "originalTitle", originalTitle, - "parentRatingKey", parentRatingKey, - "grandparentRatingKey", grandparentRatingKey, - "parentGuid", parentGuid, - "grandparentGuid", grandparentGuid, - "grandparentSlug", grandparentSlug, - "grandparentKey", grandparentKey, - "parentKey", parentKey, - "grandparentTitle", grandparentTitle, - "grandparentThumb", grandparentThumb, - "grandparentTheme", grandparentTheme, - "grandparentArt", grandparentArt, - "parentTitle", parentTitle, - "parentIndex", parentIndex, - "parentThumb", parentThumb, - "ratingImage", ratingImage, - "viewCount", viewCount, - "viewOffset", viewOffset, - "skipCount", skipCount, - "subtype", subtype, - "lastRatedAt", lastRatedAt, - "createdAtAccuracy", createdAtAccuracy, - "createdAtTZOffset", createdAtTZOffset, - "lastViewedAt", lastViewedAt, - "userRating", userRating, - "image", image, - "ultraBlurColors", ultraBlurColors, - "guids", guids, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionKey", librarySectionKey, - "showOrdering", showOrdering, - "flattenSeasons", flattenSeasons, - "skipChildren", skipChildren, - "media", media, - "genre", genre, - "country", country, - "director", director, - "writer", writer, - "role", role, - "location", location); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String ratingKey; - - private String key; - - private String guid; - - private String slug; - - private Optional studio = Optional.empty(); - - private GetSearchAllLibrariesType type; - - private String title; - - private String banner; - - private String titleSort; - - private Optional contentRating = Optional.empty(); - - private String summary; - - private Float rating; - - private Double audienceRating; - - private Optional year = Optional.empty(); - - private String tagline; - - private String thumb; - - private String art; - - private String theme; - - private Integer index; - - private Optional leafCount = Optional.empty(); - - private Optional viewedLeafCount = Optional.empty(); - - private Integer childCount; - - private Integer seasonCount; - - private Integer duration; - - private Optional originallyAvailableAt = Optional.empty(); - - private Long addedAt; - - private Optional updatedAt = Optional.empty(); - - private Optional parentYear = Optional.empty(); - - private Optional audienceRatingImage = Optional.empty(); - - private Optional chapterSource = Optional.empty(); - - private Optional primaryExtraKey = Optional.empty(); - - private Optional originalTitle = Optional.empty(); - - private Optional parentRatingKey = Optional.empty(); - - private Optional grandparentRatingKey = Optional.empty(); - - private Optional parentGuid = Optional.empty(); - - private Optional grandparentGuid = Optional.empty(); - - private Optional grandparentSlug = Optional.empty(); - - private Optional grandparentKey = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional grandparentTitle = Optional.empty(); - - private Optional grandparentThumb = Optional.empty(); - - private Optional grandparentTheme = Optional.empty(); - - private Optional grandparentArt = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional parentThumb = Optional.empty(); - - private Optional ratingImage = Optional.empty(); - - private Optional viewCount = Optional.empty(); - - private Optional viewOffset = Optional.empty(); - - private Optional skipCount = Optional.empty(); - - private Optional subtype = Optional.empty(); - - private Optional lastRatedAt = Optional.empty(); - - private Optional createdAtAccuracy = Optional.empty(); - - private Optional createdAtTZOffset = Optional.empty(); - - private Optional lastViewedAt = Optional.empty(); - - private Optional userRating = Optional.empty(); - - private Optional> image = Optional.empty(); - - private Optional ultraBlurColors = Optional.empty(); - - private Optional> guids = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionKey = Optional.empty(); - - private Optional showOrdering = Optional.empty(); - - private Optional flattenSeasons = Optional.empty(); - - private Optional skipChildren = Optional.empty(); - - private Optional> media = Optional.empty(); - - private Optional> genre = Optional.empty(); - - private Optional> country = Optional.empty(); - - private Optional> director = Optional.empty(); - - private Optional> writer = Optional.empty(); - - private Optional> role = Optional.empty(); - - private Optional> location = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. - */ - public Builder ratingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * The unique key for the media item. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The globally unique identifier for the media item. - */ - public Builder guid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - - /** - * A URL‐friendly version of the media title. - */ - public Builder slug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - - /** - * The studio that produced the media item. - */ - public Builder studio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - /** - * The studio that produced the media item. - */ - public Builder studio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - - public Builder type(GetSearchAllLibrariesType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The title of the media item. - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - /** - * The banner image URL for the media item. - */ - public Builder banner(String banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = banner; - return this; - } - - - /** - * The sort title used for ordering media items. - */ - public Builder titleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - - /** - * The content rating for the media item. - */ - public Builder contentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - /** - * The content rating for the media item. - */ - public Builder contentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - - /** - * A synopsis of the media item. - */ - public Builder summary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - - /** - * The critic rating for the media item. - */ - public Builder rating(float rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - - /** - * The audience rating for the media item. - */ - public Builder audienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - - /** - * The release year of the media item. - */ - public Builder year(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - /** - * The release year of the media item. - */ - public Builder year(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - - /** - * A brief tagline for the media item. - */ - public Builder tagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - - /** - * The thumbnail image URL for the media item. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The art image URL for the media item. - */ - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - - /** - * The theme URL for the media item. - */ - public Builder theme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; - return this; - } - - - /** - * The index position of the media item. - */ - public Builder index(int index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - - /** - * The number of leaf items (end nodes) under this media item. - */ - public Builder leafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - /** - * The number of leaf items (end nodes) under this media item. - */ - public Builder leafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - - /** - * The number of leaf items that have been viewed. - */ - public Builder viewedLeafCount(int viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - /** - * The number of leaf items that have been viewed. - */ - public Builder viewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - - /** - * The number of child items associated with this media item. - */ - public Builder childCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - - /** - * The total number of seasons (for TV shows). - */ - public Builder seasonCount(int seasonCount) { - Utils.checkNotNull(seasonCount, "seasonCount"); - this.seasonCount = seasonCount; - return this; - } - - - /** - * The duration of the media item in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * The original release date of the media item. - */ - public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - /** - * The original release date of the media item. - */ - public Builder originallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - - public Builder addedAt(long addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(long updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public Builder updatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - - /** - * The release year of the parent media item. - */ - public Builder parentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - /** - * The release year of the parent media item. - */ - public Builder parentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - - /** - * The URL for the audience rating image. - */ - public Builder audienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - /** - * The URL for the audience rating image. - */ - public Builder audienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - - /** - * The source from which chapter data is derived. - */ - public Builder chapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - /** - * The source from which chapter data is derived. - */ - public Builder chapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - - /** - * The primary extra key associated with this media item. - */ - public Builder primaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - /** - * The primary extra key associated with this media item. - */ - public Builder primaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - - /** - * The original title of the media item (if different). - */ - public Builder originalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - /** - * The original title of the media item (if different). - */ - public Builder originalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - - /** - * The rating key of the parent media item. - */ - public Builder parentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - /** - * The rating key of the parent media item. - */ - public Builder parentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - - /** - * The rating key of the grandparent media item. - */ - public Builder grandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - /** - * The rating key of the grandparent media item. - */ - public Builder grandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - - /** - * The GUID of the parent media item. - */ - public Builder parentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - /** - * The GUID of the parent media item. - */ - public Builder parentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - - /** - * The GUID of the grandparent media item. - */ - public Builder grandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - /** - * The GUID of the grandparent media item. - */ - public Builder grandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - - /** - * The slug for the grandparent media item. - */ - public Builder grandparentSlug(String grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = Optional.ofNullable(grandparentSlug); - return this; - } - - /** - * The slug for the grandparent media item. - */ - public Builder grandparentSlug(Optional grandparentSlug) { - Utils.checkNotNull(grandparentSlug, "grandparentSlug"); - this.grandparentSlug = grandparentSlug; - return this; - } - - - /** - * The key of the grandparent media item. - */ - public Builder grandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - /** - * The key of the grandparent media item. - */ - public Builder grandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - - /** - * The key of the parent media item. - */ - public Builder parentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - /** - * The key of the parent media item. - */ - public Builder parentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - - /** - * The title of the grandparent media item. - */ - public Builder grandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - /** - * The title of the grandparent media item. - */ - public Builder grandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - - /** - * The thumbnail URL for the grandparent media item. - */ - public Builder grandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - /** - * The thumbnail URL for the grandparent media item. - */ - public Builder grandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - - /** - * The theme URL for the grandparent media item. - */ - public Builder grandparentTheme(String grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = Optional.ofNullable(grandparentTheme); - return this; - } - - /** - * The theme URL for the grandparent media item. - */ - public Builder grandparentTheme(Optional grandparentTheme) { - Utils.checkNotNull(grandparentTheme, "grandparentTheme"); - this.grandparentTheme = grandparentTheme; - return this; - } - - - /** - * The art URL for the grandparent media item. - */ - public Builder grandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - /** - * The art URL for the grandparent media item. - */ - public Builder grandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - - /** - * The title of the parent media item. - */ - public Builder parentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - /** - * The title of the parent media item. - */ - public Builder parentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - - /** - * The index position of the parent media item. - */ - public Builder parentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - /** - * The index position of the parent media item. - */ - public Builder parentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - - /** - * The thumbnail URL for the parent media item. - */ - public Builder parentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - /** - * The thumbnail URL for the parent media item. - */ - public Builder parentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - - /** - * The URL for the rating image. - */ - public Builder ratingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - /** - * The URL for the rating image. - */ - public Builder ratingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - - /** - * The number of times this media item has been viewed. - */ - public Builder viewCount(int viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = Optional.ofNullable(viewCount); - return this; - } - - /** - * The number of times this media item has been viewed. - */ - public Builder viewCount(Optional viewCount) { - Utils.checkNotNull(viewCount, "viewCount"); - this.viewCount = viewCount; - return this; - } - - - /** - * The current playback offset (in milliseconds). - */ - public Builder viewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - /** - * The current playback offset (in milliseconds). - */ - public Builder viewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - - /** - * The number of times this media item has been skipped. - */ - public Builder skipCount(int skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = Optional.ofNullable(skipCount); - return this; - } - - /** - * The number of times this media item has been skipped. - */ - public Builder skipCount(Optional skipCount) { - Utils.checkNotNull(skipCount, "skipCount"); - this.skipCount = skipCount; - return this; - } - - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public Builder subtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); - return this; - } - - /** - * A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. - */ - public Builder subtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; - return this; - } - - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public Builder lastRatedAt(long lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = Optional.ofNullable(lastRatedAt); - return this; - } - - /** - * The Unix timestamp representing the last time the item was rated. - */ - public Builder lastRatedAt(Optional lastRatedAt) { - Utils.checkNotNull(lastRatedAt, "lastRatedAt"); - this.lastRatedAt = lastRatedAt; - return this; - } - - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public Builder createdAtAccuracy(String createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = Optional.ofNullable(createdAtAccuracy); - return this; - } - - /** - * The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). - */ - public Builder createdAtAccuracy(Optional createdAtAccuracy) { - Utils.checkNotNull(createdAtAccuracy, "createdAtAccuracy"); - this.createdAtAccuracy = createdAtAccuracy; - return this; - } - - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public Builder createdAtTZOffset(String createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = Optional.ofNullable(createdAtTZOffset); - return this; - } - - /** - * The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. - */ - public Builder createdAtTZOffset(Optional createdAtTZOffset) { - Utils.checkNotNull(createdAtTZOffset, "createdAtTZOffset"); - this.createdAtTZOffset = createdAtTZOffset; - return this; - } - - - /** - * Unix timestamp for when the media item was last viewed. - */ - public Builder lastViewedAt(int lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = Optional.ofNullable(lastViewedAt); - return this; - } - - /** - * Unix timestamp for when the media item was last viewed. - */ - public Builder lastViewedAt(Optional lastViewedAt) { - Utils.checkNotNull(lastViewedAt, "lastViewedAt"); - this.lastViewedAt = lastViewedAt; - return this; - } - - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public Builder userRating(float userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = Optional.ofNullable(userRating); - return this; - } - - /** - * The rating provided by a user for the item. This value is expressed as a decimal number. - */ - public Builder userRating(Optional userRating) { - Utils.checkNotNull(userRating, "userRating"); - this.userRating = userRating; - return this; - } - - - public Builder image(List image) { - Utils.checkNotNull(image, "image"); - this.image = Optional.ofNullable(image); - return this; - } - - public Builder image(Optional> image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - - public Builder ultraBlurColors(GetSearchAllLibrariesUltraBlurColors ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); - return this; - } - - public Builder ultraBlurColors(Optional ultraBlurColors) { - Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); - this.ultraBlurColors = ultraBlurColors; - return this; - } - - - public Builder guids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - public Builder guids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - - /** - * The identifier for the library section. - */ - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - /** - * The identifier for the library section. - */ - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - /** - * The title of the library section. - */ - public Builder librarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - - /** - * The key corresponding to the library section. - */ - public Builder librarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - /** - * The key corresponding to the library section. - */ - public Builder librarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - public Builder showOrdering(GetSearchAllLibrariesShowOrdering showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = Optional.ofNullable(showOrdering); - return this; - } - - /** - * Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ - public Builder showOrdering(Optional showOrdering) { - Utils.checkNotNull(showOrdering, "showOrdering"); - this.showOrdering = showOrdering; - return this; - } - - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public Builder flattenSeasons(GetSearchAllLibrariesFlattenSeasons flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = Optional.ofNullable(flattenSeasons); - return this; - } - - /** - * Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - */ - public Builder flattenSeasons(Optional flattenSeasons) { - Utils.checkNotNull(flattenSeasons, "flattenSeasons"); - this.flattenSeasons = flattenSeasons; - return this; - } - - - /** - * Indicates whether child items should be skipped. - */ - public Builder skipChildren(boolean skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = Optional.ofNullable(skipChildren); - return this; - } - - /** - * Indicates whether child items should be skipped. - */ - public Builder skipChildren(Optional skipChildren) { - Utils.checkNotNull(skipChildren, "skipChildren"); - this.skipChildren = skipChildren; - return this; - } - - - public Builder media(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - 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 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); - 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 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 Builder location(List location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - public Builder location(Optional> location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - public GetSearchAllLibrariesMetadata build() { - - return new GetSearchAllLibrariesMetadata( - ratingKey, key, guid, - slug, studio, type, - title, banner, titleSort, - contentRating, summary, rating, - audienceRating, year, tagline, - thumb, art, theme, - index, leafCount, viewedLeafCount, - childCount, seasonCount, duration, - originallyAvailableAt, addedAt, updatedAt, - parentYear, audienceRatingImage, chapterSource, - primaryExtraKey, originalTitle, parentRatingKey, - grandparentRatingKey, parentGuid, grandparentGuid, - grandparentSlug, grandparentKey, parentKey, - grandparentTitle, grandparentThumb, grandparentTheme, - grandparentArt, parentTitle, parentIndex, - parentThumb, ratingImage, viewCount, - viewOffset, skipCount, subtype, - lastRatedAt, createdAtAccuracy, createdAtTZOffset, - lastViewedAt, userRating, image, - ultraBlurColors, guids, librarySectionID, - librarySectionTitle, librarySectionKey, showOrdering, - flattenSeasons, skipChildren, media, - genre, country, director, - writer, role, location); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming.java deleted file mode 100644 index deb5e292..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming.java +++ /dev/null @@ -1,100 +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.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; - -/** - * GetSearchAllLibrariesOptimizedForStreaming - * - *

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

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

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

-     * if (obj.value() instanceof String) {
-     *     String answer = (String) obj.value();
-     *     System.out.println("answer=" + answer);
-     * }
-     * 
- * - * @return value of oneOf type - **/ - public java.lang.Object value() { - return value.value(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesOptimizedForStreaming other = (GetSearchAllLibrariesOptimizedForStreaming) o; - return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); - } - - @Override - public int hashCode() { - return Utils.enhancedHash(value.value()); - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends OneOfDeserializer { - - public _Deserializer() { - super(GetSearchAllLibrariesOptimizedForStreaming.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); - } - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesOptimizedForStreaming.class, - "value", value); - } - -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.java deleted file mode 100644 index ac7abd85..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreaming1.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public enum GetSearchAllLibrariesOptimizedForStreaming1 { - ZERO(0), - ONE(1); - - @JsonValue - private final int value; - - GetSearchAllLibrariesOptimizedForStreaming1(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetSearchAllLibrariesOptimizedForStreaming1 o: GetSearchAllLibrariesOptimizedForStreaming1.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.java deleted file mode 100644 index 0226e04f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesOptimizedForStreamingLibrary1.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public enum GetSearchAllLibrariesOptimizedForStreamingLibrary1 { - ZERO(0), - ONE(1); - - @JsonValue - private final int value; - - GetSearchAllLibrariesOptimizedForStreamingLibrary1(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetSearchAllLibrariesOptimizedForStreamingLibrary1 o: GetSearchAllLibrariesOptimizedForStreamingLibrary1.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesPart.java deleted file mode 100644 index 209dd182..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesPart.java +++ /dev/null @@ -1,910 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetSearchAllLibrariesPart { - /** - * Indicates if the part is accessible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("accessible") - private Optional accessible; - - /** - * Indicates if the part exists. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("exists") - private Optional exists; - - /** - * Unique part identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Key to access this part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("indexes") - private Optional indexes; - - /** - * Duration of the part in milliseconds. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - /** - * File path for the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("file") - private Optional file; - - /** - * File size in bytes. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("packetLength") - private Optional packetLength; - - /** - * Container format of the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - /** - * Video profile for the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasThumbnail") - private Optional hasThumbnail; - - @JsonCreator - public GetSearchAllLibrariesPart( - @JsonProperty("accessible") Optional accessible, - @JsonProperty("exists") Optional exists, - @JsonProperty("id") long id, - @JsonProperty("key") Optional key, - @JsonProperty("indexes") Optional indexes, - @JsonProperty("duration") Optional duration, - @JsonProperty("file") Optional file, - @JsonProperty("size") Optional size, - @JsonProperty("packetLength") Optional packetLength, - @JsonProperty("container") Optional container, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("hasThumbnail") Optional hasThumbnail) { - Utils.checkNotNull(accessible, "accessible"); - Utils.checkNotNull(exists, "exists"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(indexes, "indexes"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(file, "file"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(packetLength, "packetLength"); - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(videoProfile, "videoProfile"); - Utils.checkNotNull(audioProfile, "audioProfile"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.accessible = accessible; - this.exists = exists; - this.id = id; - this.key = key; - this.indexes = indexes; - this.duration = duration; - this.file = file; - this.size = size; - this.packetLength = packetLength; - this.container = container; - this.videoProfile = videoProfile; - this.audioProfile = audioProfile; - this.has64bitOffsets = has64bitOffsets; - this.optimizedForStreaming = optimizedForStreaming; - this.hasThumbnail = hasThumbnail; - } - - public GetSearchAllLibrariesPart( - long id) { - this(Optional.empty(), Optional.empty(), id, - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - /** - * Indicates if the part is accessible. - */ - @JsonIgnore - public Optional accessible() { - return accessible; - } - - /** - * Indicates if the part exists. - */ - @JsonIgnore - public Optional exists() { - return exists; - } - - /** - * Unique part identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Key to access this part. - */ - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional indexes() { - return indexes; - } - - /** - * Duration of the part in milliseconds. - */ - @JsonIgnore - public Optional duration() { - return duration; - } - - /** - * File path for the part. - */ - @JsonIgnore - public Optional file() { - return file; - } - - /** - * File size in bytes. - */ - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional packetLength() { - return packetLength; - } - - /** - * Container format of the part. - */ - @JsonIgnore - public Optional container() { - return container; - } - - /** - * Video profile for the part. - */ - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional optimizedForStreaming() { - return (Optional) optimizedForStreaming; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional hasThumbnail() { - return (Optional) hasThumbnail; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Indicates if the part is accessible. - */ - public GetSearchAllLibrariesPart withAccessible(boolean accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = Optional.ofNullable(accessible); - return this; - } - - - /** - * Indicates if the part is accessible. - */ - public GetSearchAllLibrariesPart withAccessible(Optional accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = accessible; - return this; - } - - /** - * Indicates if the part exists. - */ - public GetSearchAllLibrariesPart withExists(boolean exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = Optional.ofNullable(exists); - return this; - } - - - /** - * Indicates if the part exists. - */ - public GetSearchAllLibrariesPart withExists(Optional exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = exists; - return this; - } - - /** - * Unique part identifier. - */ - public GetSearchAllLibrariesPart withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Key to access this part. - */ - public GetSearchAllLibrariesPart withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - /** - * Key to access this part. - */ - public GetSearchAllLibrariesPart withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetSearchAllLibrariesPart withIndexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - - public GetSearchAllLibrariesPart withIndexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - - /** - * Duration of the part in milliseconds. - */ - public GetSearchAllLibrariesPart withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - /** - * Duration of the part in milliseconds. - */ - public GetSearchAllLibrariesPart withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * File path for the part. - */ - public GetSearchAllLibrariesPart withFile(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - - /** - * File path for the part. - */ - public GetSearchAllLibrariesPart withFile(Optional file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - /** - * File size in bytes. - */ - public GetSearchAllLibrariesPart withSize(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - /** - * File size in bytes. - */ - public GetSearchAllLibrariesPart withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetSearchAllLibrariesPart withPacketLength(int packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = Optional.ofNullable(packetLength); - return this; - } - - - public GetSearchAllLibrariesPart withPacketLength(Optional packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = packetLength; - return this; - } - - /** - * Container format of the part. - */ - public GetSearchAllLibrariesPart withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - /** - * Container format of the part. - */ - public GetSearchAllLibrariesPart withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - /** - * Video profile for the part. - */ - public GetSearchAllLibrariesPart withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - /** - * Video profile for the part. - */ - public GetSearchAllLibrariesPart withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetSearchAllLibrariesPart withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public GetSearchAllLibrariesPart withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - public GetSearchAllLibrariesPart withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - public GetSearchAllLibrariesPart withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetSearchAllLibrariesPart withOptimizedForStreaming(GetSearchAllLibrariesLibraryOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public GetSearchAllLibrariesPart withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - public GetSearchAllLibrariesPart withHasThumbnail(GetSearchAllLibrariesHasThumbnail hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = Optional.ofNullable(hasThumbnail); - return this; - } - - - public GetSearchAllLibrariesPart withHasThumbnail(Optional hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = hasThumbnail; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesPart other = (GetSearchAllLibrariesPart) o; - return - Utils.enhancedDeepEquals(this.accessible, other.accessible) && - Utils.enhancedDeepEquals(this.exists, other.exists) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.indexes, other.indexes) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.file, other.file) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.packetLength, other.packetLength) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.hasThumbnail, other.hasThumbnail); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - accessible, exists, id, - key, indexes, duration, - file, size, packetLength, - container, videoProfile, audioProfile, - has64bitOffsets, optimizedForStreaming, hasThumbnail); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesPart.class, - "accessible", accessible, - "exists", exists, - "id", id, - "key", key, - "indexes", indexes, - "duration", duration, - "file", file, - "size", size, - "packetLength", packetLength, - "container", container, - "videoProfile", videoProfile, - "audioProfile", audioProfile, - "has64bitOffsets", has64bitOffsets, - "optimizedForStreaming", optimizedForStreaming, - "hasThumbnail", hasThumbnail); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional accessible = Optional.empty(); - - private Optional exists = Optional.empty(); - - private Long id; - - private Optional key = Optional.empty(); - - private Optional indexes = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional file = Optional.empty(); - - private Optional size = Optional.empty(); - - private Optional packetLength = Optional.empty(); - - private Optional container = Optional.empty(); - - private Optional videoProfile = Optional.empty(); - - private Optional audioProfile = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional hasThumbnail; - - private Builder() { - // force use of static builder() method - } - - - /** - * Indicates if the part is accessible. - */ - public Builder accessible(boolean accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = Optional.ofNullable(accessible); - return this; - } - - /** - * Indicates if the part is accessible. - */ - public Builder accessible(Optional accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = accessible; - return this; - } - - - /** - * Indicates if the part exists. - */ - public Builder exists(boolean exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = Optional.ofNullable(exists); - return this; - } - - /** - * Indicates if the part exists. - */ - public Builder exists(Optional exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = exists; - return this; - } - - - /** - * Unique part identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Key to access this part. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - /** - * Key to access this part. - */ - public Builder key(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - public Builder indexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - public Builder indexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - - - /** - * Duration of the part in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - /** - * Duration of the part in milliseconds. - */ - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * File path for the part. - */ - public Builder file(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - /** - * File path for the part. - */ - public Builder file(Optional file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - - /** - * File size in bytes. - */ - public Builder size(long size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - /** - * File size in bytes. - */ - public Builder size(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - public Builder packetLength(int packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = Optional.ofNullable(packetLength); - return this; - } - - public Builder packetLength(Optional packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = packetLength; - return this; - } - - - /** - * Container format of the part. - */ - public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - /** - * Container format of the part. - */ - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - - /** - * Video profile for the part. - */ - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - /** - * Video profile for the part. - */ - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - 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; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(GetSearchAllLibrariesLibraryOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - - public Builder hasThumbnail(GetSearchAllLibrariesHasThumbnail 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 GetSearchAllLibrariesPart build() { - if (hasThumbnail == null) { - hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value(); - } - - return new GetSearchAllLibrariesPart( - accessible, exists, id, - key, indexes, duration, - file, size, packetLength, - container, videoProfile, audioProfile, - has64bitOffsets, optimizedForStreaming, hasThumbnail); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_HasThumbnail = - new LazySingletonValue<>( - "hasThumbnail", - "\"0\"", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.java deleted file mode 100644 index bbe88c25..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesQueryParamIncludeCollections.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * GetSearchAllLibrariesQueryParamIncludeCollections - * - *

Whether to include collections in the search results. - */ -public enum GetSearchAllLibrariesQueryParamIncludeCollections { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - GetSearchAllLibrariesQueryParamIncludeCollections(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetSearchAllLibrariesQueryParamIncludeCollections o: GetSearchAllLibrariesQueryParamIncludeCollections.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.java deleted file mode 100644 index 62af4299..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesQueryParamIncludeExternalMedia.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * GetSearchAllLibrariesQueryParamIncludeExternalMedia - * - *

Whether to include external media in the search results. - */ -public enum GetSearchAllLibrariesQueryParamIncludeExternalMedia { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - GetSearchAllLibrariesQueryParamIncludeExternalMedia(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetSearchAllLibrariesQueryParamIncludeExternalMedia o: GetSearchAllLibrariesQueryParamIncludeExternalMedia.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRequest.java deleted file mode 100644 index ca8ab364..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRequest.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetSearchAllLibrariesRequest { - /** - * The search query term. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") - private String query; - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") - private String clientID; - - /** - * Limit the number of results returned. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") - private Optional limit; - - /** - * A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=false,name=searchTypes") - private Optional> searchTypes; - - /** - * Whether to include collections in the search results. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeCollections") - private Optional includeCollections; - - /** - * Whether to include external media in the search results. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeExternalMedia") - private Optional includeExternalMedia; - - @JsonCreator - public GetSearchAllLibrariesRequest( - String query, - String clientID, - Optional limit, - Optional> searchTypes, - Optional includeCollections, - Optional includeExternalMedia) { - Utils.checkNotNull(query, "query"); - Utils.checkNotNull(clientID, "clientID"); - Utils.checkNotNull(limit, "limit"); - Utils.checkNotNull(searchTypes, "searchTypes"); - Utils.checkNotNull(includeCollections, "includeCollections"); - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.query = query; - this.clientID = clientID; - this.limit = limit; - this.searchTypes = searchTypes; - this.includeCollections = includeCollections; - this.includeExternalMedia = includeExternalMedia; - } - - public GetSearchAllLibrariesRequest( - String query, - String clientID) { - this(query, clientID, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - /** - * The search query term. - */ - @JsonIgnore - public String query() { - return query; - } - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @JsonIgnore - public String clientID() { - return clientID; - } - - /** - * Limit the number of results returned. - */ - @JsonIgnore - public Optional limit() { - return limit; - } - - /** - * A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> searchTypes() { - return (Optional>) searchTypes; - } - - /** - * Whether to include collections in the search results. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeCollections() { - return (Optional) includeCollections; - } - - /** - * Whether to include external media in the search results. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeExternalMedia() { - return (Optional) includeExternalMedia; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The search query term. - */ - public GetSearchAllLibrariesRequest withQuery(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public GetSearchAllLibrariesRequest withClientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - /** - * Limit the number of results returned. - */ - public GetSearchAllLibrariesRequest withLimit(long limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.ofNullable(limit); - return this; - } - - - /** - * Limit the number of results returned. - */ - public GetSearchAllLibrariesRequest withLimit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - /** - * A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv. - */ - public GetSearchAllLibrariesRequest withSearchTypes(List searchTypes) { - Utils.checkNotNull(searchTypes, "searchTypes"); - this.searchTypes = Optional.ofNullable(searchTypes); - return this; - } - - - /** - * A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv. - */ - public GetSearchAllLibrariesRequest withSearchTypes(Optional> searchTypes) { - Utils.checkNotNull(searchTypes, "searchTypes"); - this.searchTypes = searchTypes; - return this; - } - - /** - * Whether to include collections in the search results. - */ - public GetSearchAllLibrariesRequest withIncludeCollections(GetSearchAllLibrariesQueryParamIncludeCollections includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = Optional.ofNullable(includeCollections); - return this; - } - - - /** - * Whether to include collections in the search results. - */ - public GetSearchAllLibrariesRequest withIncludeCollections(Optional includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = includeCollections; - return this; - } - - /** - * Whether to include external media in the search results. - */ - public GetSearchAllLibrariesRequest withIncludeExternalMedia(GetSearchAllLibrariesQueryParamIncludeExternalMedia includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = Optional.ofNullable(includeExternalMedia); - return this; - } - - - /** - * Whether to include external media in the search results. - */ - public GetSearchAllLibrariesRequest withIncludeExternalMedia(Optional includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = includeExternalMedia; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesRequest other = (GetSearchAllLibrariesRequest) o; - return - Utils.enhancedDeepEquals(this.query, other.query) && - Utils.enhancedDeepEquals(this.clientID, other.clientID) && - Utils.enhancedDeepEquals(this.limit, other.limit) && - Utils.enhancedDeepEquals(this.searchTypes, other.searchTypes) && - Utils.enhancedDeepEquals(this.includeCollections, other.includeCollections) && - Utils.enhancedDeepEquals(this.includeExternalMedia, other.includeExternalMedia); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - query, clientID, limit, - searchTypes, includeCollections, includeExternalMedia); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesRequest.class, - "query", query, - "clientID", clientID, - "limit", limit, - "searchTypes", searchTypes, - "includeCollections", includeCollections, - "includeExternalMedia", includeExternalMedia); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String query; - - private String clientID; - - private Optional limit = Optional.empty(); - - private Optional> searchTypes = Optional.empty(); - - private Optional includeCollections; - - private Optional includeExternalMedia; - - private Builder() { - // force use of static builder() method - } - - - /** - * The search query term. - */ - public Builder query(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public Builder clientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - - /** - * Limit the number of results returned. - */ - public Builder limit(long limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.ofNullable(limit); - return this; - } - - /** - * Limit the number of results returned. - */ - public Builder limit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - - /** - * A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv. - */ - public Builder searchTypes(List searchTypes) { - Utils.checkNotNull(searchTypes, "searchTypes"); - this.searchTypes = Optional.ofNullable(searchTypes); - return this; - } - - /** - * A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv. - */ - public Builder searchTypes(Optional> searchTypes) { - Utils.checkNotNull(searchTypes, "searchTypes"); - this.searchTypes = searchTypes; - return this; - } - - - /** - * Whether to include collections in the search results. - */ - public Builder includeCollections(GetSearchAllLibrariesQueryParamIncludeCollections includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = Optional.ofNullable(includeCollections); - return this; - } - - /** - * Whether to include collections in the search results. - */ - public Builder includeCollections(Optional includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = includeCollections; - return this; - } - - - /** - * Whether to include external media in the search results. - */ - public Builder includeExternalMedia(GetSearchAllLibrariesQueryParamIncludeExternalMedia includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = Optional.ofNullable(includeExternalMedia); - return this; - } - - /** - * Whether to include external media in the search results. - */ - public Builder includeExternalMedia(Optional includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = includeExternalMedia; - return this; - } - - public GetSearchAllLibrariesRequest build() { - if (includeCollections == null) { - includeCollections = _SINGLETON_VALUE_IncludeCollections.value(); - } - if (includeExternalMedia == null) { - includeExternalMedia = _SINGLETON_VALUE_IncludeExternalMedia.value(); - } - - return new GetSearchAllLibrariesRequest( - query, clientID, limit, - searchTypes, includeCollections, includeExternalMedia); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeCollections = - new LazySingletonValue<>( - "includeCollections", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeExternalMedia = - new LazySingletonValue<>( - "includeExternalMedia", - "0", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRequestBuilder.java deleted file mode 100644 index 94b685e6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRequestBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetSearchAllLibraries; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; - -public class GetSearchAllLibrariesRequestBuilder { - - private GetSearchAllLibrariesRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetSearchAllLibrariesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetSearchAllLibrariesRequestBuilder request(GetSearchAllLibrariesRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetSearchAllLibrariesResponse call() throws Exception { - - RequestOperation operation - = new GetSearchAllLibraries.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesResponse.java deleted file mode 100644 index 2d21346a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetSearchAllLibrariesResponse 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 libraries available on the Server - */ - private Optional object; - - @JsonCreator - public GetSearchAllLibrariesResponse( - 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 GetSearchAllLibrariesResponse( - 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 libraries available on the Server - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetSearchAllLibrariesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetSearchAllLibrariesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchAllLibrariesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The libraries available on the Server - */ - public GetSearchAllLibrariesResponse withObject(GetSearchAllLibrariesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The libraries available on the Server - */ - public GetSearchAllLibrariesResponse 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; - } - GetSearchAllLibrariesResponse other = (GetSearchAllLibrariesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 libraries available on the Server - */ - public Builder object(GetSearchAllLibrariesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The libraries available on the Server - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetSearchAllLibrariesResponse build() { - - return new GetSearchAllLibrariesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesResponseBody.java deleted file mode 100644 index c6817f07..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesResponseBody.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - -/** - * GetSearchAllLibrariesResponseBody - * - *

The libraries available on the Server - */ -public class GetSearchAllLibrariesResponseBody { - - @JsonProperty("MediaContainer") - private GetSearchAllLibrariesMediaContainer mediaContainer; - - @JsonCreator - public GetSearchAllLibrariesResponseBody( - @JsonProperty("MediaContainer") GetSearchAllLibrariesMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - @JsonIgnore - public GetSearchAllLibrariesMediaContainer mediaContainer() { - return mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchAllLibrariesResponseBody withMediaContainer(GetSearchAllLibrariesMediaContainer 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; - } - GetSearchAllLibrariesResponseBody other = (GetSearchAllLibrariesResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private GetSearchAllLibrariesMediaContainer mediaContainer; - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetSearchAllLibrariesMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - return this; - } - - public GetSearchAllLibrariesResponseBody build() { - - return new GetSearchAllLibrariesResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRole.java deleted file mode 100644 index 4e432501..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesRole.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchAllLibrariesRole { - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - /** - * The display tag for the actor (typically the actor's name). - */ - @JsonProperty("tag") - private String tag; - - /** - * The role played by the actor in the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("role") - private Optional role; - - /** - * The absolute URL of the thumbnail image for the actor. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetSearchAllLibrariesRole( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("role") Optional role, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.tag = tag; - this.role = role; - this.thumb = thumb; - } - - public GetSearchAllLibrariesRole( - int id, - String tag) { - this(id, tag, Optional.empty(), - Optional.empty()); - } - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The display tag for the actor (typically the actor's name). - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * The role played by the actor in the media item. - */ - @JsonIgnore - public Optional role() { - return role; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public GetSearchAllLibrariesRole withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The display tag for the actor (typically the actor's name). - */ - public GetSearchAllLibrariesRole withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * The role played by the actor in the media item. - */ - public GetSearchAllLibrariesRole withRole(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - /** - * The role played by the actor in the media item. - */ - public GetSearchAllLibrariesRole withRole(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public GetSearchAllLibrariesRole withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public GetSearchAllLibrariesRole withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesRole other = (GetSearchAllLibrariesRole) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, role, - thumb); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesRole.class, - "id", id, - "tag", tag, - "role", role, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Optional role = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The display tag for the actor (typically the actor's name). - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * The role played by the actor in the media item. - */ - public Builder role(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - /** - * The role played by the actor in the media item. - */ - public Builder role(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetSearchAllLibrariesRole build() { - - return new GetSearchAllLibrariesRole( - id, tag, role, - thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesShowOrdering.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesShowOrdering.java deleted file mode 100644 index faa19908..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesShowOrdering.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

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

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

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

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

The type of media content in the Plex library. This can represent videos, music, or photos. - */ -@JsonDeserialize(using = GetSearchAllLibrariesType._Deserializer.class) -@JsonSerialize(using = GetSearchAllLibrariesType._Serializer.class) -public class GetSearchAllLibrariesType { - - public static final GetSearchAllLibrariesType Movie = new GetSearchAllLibrariesType("movie"); - public static final GetSearchAllLibrariesType TvShow = new GetSearchAllLibrariesType("show"); - public static final GetSearchAllLibrariesType Season = new GetSearchAllLibrariesType("season"); - public static final GetSearchAllLibrariesType Episode = new GetSearchAllLibrariesType("episode"); - public static final GetSearchAllLibrariesType Artist = new GetSearchAllLibrariesType("artist"); - public static final GetSearchAllLibrariesType Album = new GetSearchAllLibrariesType("album"); - public static final GetSearchAllLibrariesType Track = new GetSearchAllLibrariesType("track"); - public static final GetSearchAllLibrariesType PhotoAlbum = new GetSearchAllLibrariesType("photoalbum"); - public static final GetSearchAllLibrariesType Photo = new GetSearchAllLibrariesType("photo"); - public static final GetSearchAllLibrariesType Collection = new GetSearchAllLibrariesType("collection"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetSearchAllLibrariesType(String value) { - this.value = value; - } - - /** - * Returns a GetSearchAllLibrariesType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetSearchAllLibrariesType - */ - public static GetSearchAllLibrariesType of(String value) { - synchronized (GetSearchAllLibrariesType.class) { - return values.computeIfAbsent(value, v -> new GetSearchAllLibrariesType(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetSearchAllLibrariesType other = (GetSearchAllLibrariesType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetSearchAllLibrariesType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetSearchAllLibrariesType[] values() { - synchronized (GetSearchAllLibrariesType.class) { - return values.values().toArray(new GetSearchAllLibrariesType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("movie", Movie); - map.put("show", TvShow); - map.put("season", Season); - map.put("episode", Episode); - map.put("artist", Artist); - map.put("album", Album); - map.put("track", Track); - map.put("photoalbum", PhotoAlbum); - map.put("photo", Photo); - map.put("collection", Collection); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("movie", GetSearchAllLibrariesTypeEnum.Movie); - map.put("show", GetSearchAllLibrariesTypeEnum.TvShow); - map.put("season", GetSearchAllLibrariesTypeEnum.Season); - map.put("episode", GetSearchAllLibrariesTypeEnum.Episode); - map.put("artist", GetSearchAllLibrariesTypeEnum.Artist); - map.put("album", GetSearchAllLibrariesTypeEnum.Album); - map.put("track", GetSearchAllLibrariesTypeEnum.Track); - map.put("photoalbum", GetSearchAllLibrariesTypeEnum.PhotoAlbum); - map.put("photo", GetSearchAllLibrariesTypeEnum.Photo); - map.put("collection", GetSearchAllLibrariesTypeEnum.Collection); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetSearchAllLibrariesType.class); - } - - @Override - public void serialize(GetSearchAllLibrariesType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetSearchAllLibrariesType.class); - } - - @Override - public GetSearchAllLibrariesType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetSearchAllLibrariesType.of(v); - } - } - - public enum GetSearchAllLibrariesTypeEnum { - - Movie("movie"), - TvShow("show"), - Season("season"), - Episode("episode"), - Artist("artist"), - Album("album"), - Track("track"), - PhotoAlbum("photoalbum"), - Photo("photo"), - Collection("collection"),; - - private final String value; - - private GetSearchAllLibrariesTypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesUltraBlurColors.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesUltraBlurColors.java deleted file mode 100644 index 9973ff82..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesUltraBlurColors.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetSearchAllLibrariesUltraBlurColors { - - @JsonProperty("topLeft") - private String topLeft; - - - @JsonProperty("topRight") - private String topRight; - - - @JsonProperty("bottomRight") - private String bottomRight; - - - @JsonProperty("bottomLeft") - private String bottomLeft; - - @JsonCreator - public GetSearchAllLibrariesUltraBlurColors( - @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 static Builder builder() { - return new Builder(); - } - - - public GetSearchAllLibrariesUltraBlurColors withTopLeft(String topLeft) { - Utils.checkNotNull(topLeft, "topLeft"); - this.topLeft = topLeft; - return this; - } - - public GetSearchAllLibrariesUltraBlurColors withTopRight(String topRight) { - Utils.checkNotNull(topRight, "topRight"); - this.topRight = topRight; - return this; - } - - public GetSearchAllLibrariesUltraBlurColors withBottomRight(String bottomRight) { - Utils.checkNotNull(bottomRight, "bottomRight"); - this.bottomRight = bottomRight; - return this; - } - - public GetSearchAllLibrariesUltraBlurColors 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; - } - GetSearchAllLibrariesUltraBlurColors other = (GetSearchAllLibrariesUltraBlurColors) o; - return - Utils.enhancedDeepEquals(this.topLeft, other.topLeft) && - Utils.enhancedDeepEquals(this.topRight, other.topRight) && - Utils.enhancedDeepEquals(this.bottomRight, other.bottomRight) && - Utils.enhancedDeepEquals(this.bottomLeft, other.bottomLeft); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - topLeft, topRight, bottomRight, - bottomLeft); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesUltraBlurColors.class, - "topLeft", topLeft, - "topRight", topRight, - "bottomRight", bottomRight, - "bottomLeft", bottomLeft); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetSearchAllLibrariesUltraBlurColors build() { - - return new GetSearchAllLibrariesUltraBlurColors( - topLeft, topRight, bottomRight, - bottomLeft); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesWriter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesWriter.java deleted file mode 100644 index cd35c34c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchAllLibrariesWriter.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchAllLibrariesWriter { - /** - * Unique identifier for the writer. - */ - @JsonProperty("id") - private int id; - - /** - * The role of Writer - */ - @JsonProperty("tag") - private String tag; - - /** - * The absolute URL of the thumbnail image for the writer. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetSearchAllLibrariesWriter( - @JsonProperty("id") int id, - @JsonProperty("tag") String tag, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.tag = tag; - this.thumb = thumb; - } - - public GetSearchAllLibrariesWriter( - int id, - String tag) { - this(id, tag, Optional.empty()); - } - - /** - * Unique identifier for the writer. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The role of Writer - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique identifier for the writer. - */ - public GetSearchAllLibrariesWriter withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The role of Writer - */ - public GetSearchAllLibrariesWriter withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public GetSearchAllLibrariesWriter withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public GetSearchAllLibrariesWriter withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchAllLibrariesWriter other = (GetSearchAllLibrariesWriter) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, tag, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesWriter.class, - "id", id, - "tag", tag, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String tag; - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique identifier for the writer. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The role of Writer - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetSearchAllLibrariesWriter build() { - - return new GetSearchAllLibrariesWriter( - id, tag, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryMediaContainer.java deleted file mode 100644 index 2a1ea34f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryMediaContainer.java +++ /dev/null @@ -1,644 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetSearchLibraryMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("allowSync") - private Optional allowSync; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("art") - private Optional art; - - - @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("nocache") - private Optional nocache; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title1") - private Optional title1; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title2") - private Optional title2; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewGroup") - private Optional viewGroup; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewMode") - private Optional viewMode; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetSearchLibraryMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("allowSync") Optional allowSync, - @JsonProperty("art") Optional art, - @JsonProperty("identifier") Optional identifier, - @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, - @JsonProperty("mediaTagVersion") Optional mediaTagVersion, - @JsonProperty("nocache") Optional nocache, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("title1") Optional title1, - @JsonProperty("title2") Optional title2, - @JsonProperty("viewGroup") Optional viewGroup, - @JsonProperty("viewMode") Optional viewMode, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(nocache, "nocache"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title1, "title1"); - Utils.checkNotNull(title2, "title2"); - Utils.checkNotNull(viewGroup, "viewGroup"); - Utils.checkNotNull(viewMode, "viewMode"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.allowSync = allowSync; - this.art = art; - this.identifier = identifier; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.nocache = nocache; - this.thumb = thumb; - this.title1 = title1; - this.title2 = title2; - this.viewGroup = viewGroup; - this.viewMode = viewMode; - this.metadata = metadata; - } - - public GetSearchLibraryMediaContainer() { - 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()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional allowSync() { - return allowSync; - } - - @JsonIgnore - public Optional art() { - return art; - } - - @JsonIgnore - public Optional identifier() { - return identifier; - } - - @JsonIgnore - public Optional mediaTagPrefix() { - return mediaTagPrefix; - } - - @JsonIgnore - public Optional mediaTagVersion() { - return mediaTagVersion; - } - - @JsonIgnore - public Optional nocache() { - return nocache; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - @JsonIgnore - public Optional title1() { - return title1; - } - - @JsonIgnore - public Optional title2() { - return title2; - } - - @JsonIgnore - public Optional viewGroup() { - return viewGroup; - } - - @JsonIgnore - public Optional viewMode() { - return viewMode; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchLibraryMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetSearchLibraryMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetSearchLibraryMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); - return this; - } - - - public GetSearchLibraryMediaContainer withAllowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - public GetSearchLibraryMediaContainer withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - - public GetSearchLibraryMediaContainer withArt(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - public GetSearchLibraryMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = Optional.ofNullable(identifier); - return this; - } - - - public GetSearchLibraryMediaContainer withIdentifier(Optional identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public GetSearchLibraryMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); - return this; - } - - - public GetSearchLibraryMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - public GetSearchLibraryMediaContainer withMediaTagVersion(int mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); - return this; - } - - - public GetSearchLibraryMediaContainer withMediaTagVersion(Optional mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - public GetSearchLibraryMediaContainer withNocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = Optional.ofNullable(nocache); - return this; - } - - - public GetSearchLibraryMediaContainer withNocache(Optional nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - public GetSearchLibraryMediaContainer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetSearchLibraryMediaContainer withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetSearchLibraryMediaContainer withTitle1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = Optional.ofNullable(title1); - return this; - } - - - public GetSearchLibraryMediaContainer withTitle1(Optional title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - public GetSearchLibraryMediaContainer withTitle2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = Optional.ofNullable(title2); - return this; - } - - - public GetSearchLibraryMediaContainer withTitle2(Optional title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - public GetSearchLibraryMediaContainer withViewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = Optional.ofNullable(viewGroup); - return this; - } - - - public GetSearchLibraryMediaContainer withViewGroup(Optional viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - public GetSearchLibraryMediaContainer withViewMode(int viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = Optional.ofNullable(viewMode); - return this; - } - - - public GetSearchLibraryMediaContainer withViewMode(Optional viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = viewMode; - return this; - } - - public GetSearchLibraryMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetSearchLibraryMediaContainer 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; - } - GetSearchLibraryMediaContainer other = (GetSearchLibraryMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.nocache, other.nocache) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title1, other.title1) && - Utils.enhancedDeepEquals(this.title2, other.title2) && - Utils.enhancedDeepEquals(this.viewGroup, other.viewGroup) && - Utils.enhancedDeepEquals(this.viewMode, other.viewMode) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowSync, art, - identifier, mediaTagPrefix, mediaTagVersion, - nocache, thumb, title1, - title2, viewGroup, viewMode, - metadata); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryMediaContainer.class, - "size", size, - "allowSync", allowSync, - "art", art, - "identifier", identifier, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "nocache", nocache, - "thumb", thumb, - "title1", title1, - "title2", title2, - "viewGroup", viewGroup, - "viewMode", viewMode, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional allowSync = Optional.empty(); - - private Optional art = Optional.empty(); - - private Optional identifier = Optional.empty(); - - private Optional mediaTagPrefix = Optional.empty(); - - private Optional mediaTagVersion = Optional.empty(); - - private Optional nocache = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional title1 = Optional.empty(); - - private Optional title2 = Optional.empty(); - - private Optional viewGroup = Optional.empty(); - - private Optional viewMode = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 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 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(int 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 nocache(boolean nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = Optional.ofNullable(nocache); - return this; - } - - public Builder nocache(Optional nocache) { - Utils.checkNotNull(nocache, "nocache"); - this.nocache = nocache; - return this; - } - - - 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 title1(String title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = Optional.ofNullable(title1); - return this; - } - - public Builder title1(Optional title1) { - Utils.checkNotNull(title1, "title1"); - this.title1 = title1; - return this; - } - - - public Builder title2(String title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = Optional.ofNullable(title2); - return this; - } - - public Builder title2(Optional title2) { - Utils.checkNotNull(title2, "title2"); - this.title2 = title2; - return this; - } - - - public Builder viewGroup(String viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = Optional.ofNullable(viewGroup); - return this; - } - - public Builder viewGroup(Optional viewGroup) { - Utils.checkNotNull(viewGroup, "viewGroup"); - this.viewGroup = viewGroup; - return this; - } - - - public Builder viewMode(int viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = Optional.ofNullable(viewMode); - return this; - } - - public Builder viewMode(Optional viewMode) { - Utils.checkNotNull(viewMode, "viewMode"); - this.viewMode = viewMode; - 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 GetSearchLibraryMediaContainer build() { - - return new GetSearchLibraryMediaContainer( - size, allowSync, art, - identifier, mediaTagPrefix, mediaTagVersion, - nocache, thumb, title1, - title2, viewGroup, viewMode, - metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryMetadata.java deleted file mode 100644 index 357dc19a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryMetadata.java +++ /dev/null @@ -1,947 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchLibraryMetadata { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingKey") - private Optional ratingKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentRatingKey") - private Optional parentRatingKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("guid") - private Optional guid; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentGuid") - private Optional parentGuid; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentStudio") - private Optional parentStudio; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("summary") - private Optional summary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentYear") - private Optional parentYear; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("art") - private Optional art; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTheme") - private Optional parentTheme; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("addedAt") - private Optional addedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - @JsonCreator - public GetSearchLibraryMetadata( - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("key") Optional key, - @JsonProperty("parentRatingKey") Optional parentRatingKey, - @JsonProperty("guid") Optional guid, - @JsonProperty("parentGuid") Optional parentGuid, - @JsonProperty("parentStudio") Optional parentStudio, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("summary") Optional summary, - @JsonProperty("index") Optional index, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("parentYear") Optional parentYear, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("art") Optional art, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("parentTheme") Optional parentTheme, - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("updatedAt") Optional updatedAt) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(parentGuid, "parentGuid"); - Utils.checkNotNull(parentStudio, "parentStudio"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(parentYear, "parentYear"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(parentTheme, "parentTheme"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - this.ratingKey = ratingKey; - this.key = key; - this.parentRatingKey = parentRatingKey; - this.guid = guid; - this.parentGuid = parentGuid; - this.parentStudio = parentStudio; - this.type = type; - this.title = title; - this.parentKey = parentKey; - this.parentTitle = parentTitle; - this.summary = summary; - this.index = index; - this.parentIndex = parentIndex; - this.parentYear = parentYear; - this.thumb = thumb; - this.art = art; - this.parentThumb = parentThumb; - this.parentTheme = parentTheme; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - } - - public GetSearchLibraryMetadata() { - 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()); - } - - @JsonIgnore - public Optional ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional parentRatingKey() { - return parentRatingKey; - } - - @JsonIgnore - public Optional guid() { - return guid; - } - - @JsonIgnore - public Optional parentGuid() { - return parentGuid; - } - - @JsonIgnore - public Optional parentStudio() { - return parentStudio; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - @JsonIgnore - public Optional summary() { - return summary; - } - - @JsonIgnore - public Optional index() { - return index; - } - - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - @JsonIgnore - public Optional parentYear() { - return parentYear; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - @JsonIgnore - public Optional art() { - return art; - } - - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - @JsonIgnore - public Optional parentTheme() { - return parentTheme; - } - - @JsonIgnore - public Optional addedAt() { - return addedAt; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchLibraryMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetSearchLibraryMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetSearchLibraryMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetSearchLibraryMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetSearchLibraryMetadata withParentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - - public GetSearchLibraryMetadata withParentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - public GetSearchLibraryMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public GetSearchLibraryMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public GetSearchLibraryMetadata withParentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - - public GetSearchLibraryMetadata withParentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - public GetSearchLibraryMetadata withParentStudio(String parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = Optional.ofNullable(parentStudio); - return this; - } - - - public GetSearchLibraryMetadata withParentStudio(Optional parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = parentStudio; - return this; - } - - public GetSearchLibraryMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetSearchLibraryMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetSearchLibraryMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetSearchLibraryMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetSearchLibraryMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - - public GetSearchLibraryMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - public GetSearchLibraryMetadata withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - - public GetSearchLibraryMetadata withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - public GetSearchLibraryMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public GetSearchLibraryMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public GetSearchLibraryMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - - public GetSearchLibraryMetadata withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public GetSearchLibraryMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - - public GetSearchLibraryMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - public GetSearchLibraryMetadata withParentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - - public GetSearchLibraryMetadata withParentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - public GetSearchLibraryMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetSearchLibraryMetadata withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetSearchLibraryMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - - public GetSearchLibraryMetadata withArt(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - public GetSearchLibraryMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - - public GetSearchLibraryMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - public GetSearchLibraryMetadata withParentTheme(String parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = Optional.ofNullable(parentTheme); - return this; - } - - - public GetSearchLibraryMetadata withParentTheme(Optional parentTheme) { - Utils.checkNotNull(parentTheme, "parentTheme"); - this.parentTheme = parentTheme; - return this; - } - - public GetSearchLibraryMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public GetSearchLibraryMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public GetSearchLibraryMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetSearchLibraryMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchLibraryMetadata other = (GetSearchLibraryMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.parentGuid, other.parentGuid) && - Utils.enhancedDeepEquals(this.parentStudio, other.parentStudio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && - Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && - Utils.enhancedDeepEquals(this.parentYear, other.parentYear) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && - Utils.enhancedDeepEquals(this.parentTheme, other.parentTheme) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, parentRatingKey, - guid, parentGuid, parentStudio, - type, title, parentKey, - parentTitle, summary, index, - parentIndex, parentYear, thumb, - art, parentThumb, parentTheme, - addedAt, updatedAt); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryMetadata.class, - "ratingKey", ratingKey, - "key", key, - "parentRatingKey", parentRatingKey, - "guid", guid, - "parentGuid", parentGuid, - "parentStudio", parentStudio, - "type", type, - "title", title, - "parentKey", parentKey, - "parentTitle", parentTitle, - "summary", summary, - "index", index, - "parentIndex", parentIndex, - "parentYear", parentYear, - "thumb", thumb, - "art", art, - "parentThumb", parentThumb, - "parentTheme", parentTheme, - "addedAt", addedAt, - "updatedAt", updatedAt); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional ratingKey = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional parentRatingKey = Optional.empty(); - - private Optional guid = Optional.empty(); - - private Optional parentGuid = Optional.empty(); - - private Optional parentStudio = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional index = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional parentYear = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional art = Optional.empty(); - - private Optional parentThumb = Optional.empty(); - - private Optional parentTheme = Optional.empty(); - - private Optional addedAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder ratingKey(String 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 parentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - public Builder parentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - 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 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 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 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 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 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 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 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 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 Builder addedAt(int 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(int 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 GetSearchLibraryMetadata build() { - - return new GetSearchLibraryMetadata( - ratingKey, key, parentRatingKey, - guid, parentGuid, parentStudio, - type, title, parentKey, - parentTitle, summary, index, - parentIndex, parentYear, thumb, - art, parentThumb, parentTheme, - addedAt, updatedAt); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryQueryParamType.java deleted file mode 100644 index 38b93e79..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryQueryParamType.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ -@JsonDeserialize(using = GetSearchLibraryQueryParamType._Deserializer.class) -@JsonSerialize(using = GetSearchLibraryQueryParamType._Serializer.class) -public class GetSearchLibraryQueryParamType { - - public static final GetSearchLibraryQueryParamType Movie = new GetSearchLibraryQueryParamType(1L); - public static final GetSearchLibraryQueryParamType TvShow = new GetSearchLibraryQueryParamType(2L); - public static final GetSearchLibraryQueryParamType Season = new GetSearchLibraryQueryParamType(3L); - public static final GetSearchLibraryQueryParamType Episode = new GetSearchLibraryQueryParamType(4L); - public static final GetSearchLibraryQueryParamType Artist = new GetSearchLibraryQueryParamType(5L); - public static final GetSearchLibraryQueryParamType Album = new GetSearchLibraryQueryParamType(6L); - public static final GetSearchLibraryQueryParamType Track = new GetSearchLibraryQueryParamType(7L); - public static final GetSearchLibraryQueryParamType PhotoAlbum = new GetSearchLibraryQueryParamType(8L); - public static final GetSearchLibraryQueryParamType Photo = new GetSearchLibraryQueryParamType(9L); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final long value; - - private GetSearchLibraryQueryParamType(long value) { - this.value = value; - } - - /** - * Returns a GetSearchLibraryQueryParamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetSearchLibraryQueryParamType - */ - public static GetSearchLibraryQueryParamType of(long value) { - synchronized (GetSearchLibraryQueryParamType.class) { - return values.computeIfAbsent(value, v -> new GetSearchLibraryQueryParamType(v)); - } - } - - public long value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetSearchLibraryQueryParamType other = (GetSearchLibraryQueryParamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetSearchLibraryQueryParamType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetSearchLibraryQueryParamType[] values() { - synchronized (GetSearchLibraryQueryParamType.class) { - return values.values().toArray(new GetSearchLibraryQueryParamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1L, Movie); - map.put(2L, TvShow); - map.put(3L, Season); - map.put(4L, Episode); - map.put(5L, Artist); - map.put(6L, Album); - map.put(7L, Track); - map.put(8L, PhotoAlbum); - map.put(9L, Photo); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1L, GetSearchLibraryQueryParamTypeEnum.Movie); - map.put(2L, GetSearchLibraryQueryParamTypeEnum.TvShow); - map.put(3L, GetSearchLibraryQueryParamTypeEnum.Season); - map.put(4L, GetSearchLibraryQueryParamTypeEnum.Episode); - map.put(5L, GetSearchLibraryQueryParamTypeEnum.Artist); - map.put(6L, GetSearchLibraryQueryParamTypeEnum.Album); - map.put(7L, GetSearchLibraryQueryParamTypeEnum.Track); - map.put(8L, GetSearchLibraryQueryParamTypeEnum.PhotoAlbum); - map.put(9L, GetSearchLibraryQueryParamTypeEnum.Photo); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetSearchLibraryQueryParamType.class); - } - - @Override - public void serialize(GetSearchLibraryQueryParamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetSearchLibraryQueryParamType.class); - } - - @Override - public GetSearchLibraryQueryParamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - long v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetSearchLibraryQueryParamType.of(v); - } - } - - public enum GetSearchLibraryQueryParamTypeEnum { - - Movie(1L), - TvShow(2L), - Season(3L), - Episode(4L), - Artist(5L), - Album(6L), - Track(7L), - PhotoAlbum(8L), - Photo(9L),; - - private final long value; - - private GetSearchLibraryQueryParamTypeEnum(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 deleted file mode 100644 index 0673a74d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - - -public class GetSearchLibraryRequest { - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey") - private int sectionKey; - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private GetSearchLibraryQueryParamType type; - - @JsonCreator - public GetSearchLibraryRequest( - int sectionKey, - GetSearchLibraryQueryParamType type) { - Utils.checkNotNull(sectionKey, "sectionKey"); - Utils.checkNotNull(type, "type"); - this.sectionKey = sectionKey; - this.type = type; - } - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - @JsonIgnore - public int sectionKey() { - return sectionKey; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @JsonIgnore - public GetSearchLibraryQueryParamType type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public GetSearchLibraryRequest withSectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public GetSearchLibraryRequest withType(GetSearchLibraryQueryParamType 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; - } - GetSearchLibraryRequest other = (GetSearchLibraryRequest) o; - return - Utils.enhancedDeepEquals(this.sectionKey, other.sectionKey) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - sectionKey, type); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryRequest.class, - "sectionKey", sectionKey, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer sectionKey; - - private GetSearchLibraryQueryParamType type; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique key of the Plex library. - * Note: This is unique in the context of the Plex server. - */ - public Builder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public Builder type(GetSearchLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetSearchLibraryRequest build() { - - return new GetSearchLibraryRequest( - sectionKey, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequestBuilder.java deleted file mode 100644 index d8019a50..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequestBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetSearchLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; - -public class GetSearchLibraryRequestBuilder { - - private Integer sectionKey; - private GetSearchLibraryQueryParamType type; - private final SDKConfiguration sdkConfiguration; - - public GetSearchLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetSearchLibraryRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - public GetSearchLibraryRequestBuilder type(GetSearchLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetSearchLibraryRequest buildRequest() { - - GetSearchLibraryRequest request = new GetSearchLibraryRequest(sectionKey, - type); - - return request; - } - - public GetSearchLibraryResponse call() throws Exception { - - RequestOperation operation - = new GetSearchLibrary.Sync(sdkConfiguration); - GetSearchLibraryRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryResponse.java deleted file mode 100644 index 658b2ef6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetSearchLibraryResponse 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 contents of the library by section and type - */ - private Optional object; - - @JsonCreator - public GetSearchLibraryResponse( - 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 GetSearchLibraryResponse( - 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 contents of the library by section and type - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetSearchLibraryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetSearchLibraryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchLibraryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The contents of the library by section and type - */ - public GetSearchLibraryResponse withObject(GetSearchLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The contents of the library by section and type - */ - public GetSearchLibraryResponse 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; - } - GetSearchLibraryResponse other = (GetSearchLibraryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 contents of the library by section and type - */ - public Builder object(GetSearchLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The contents of the library by section and type - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetSearchLibraryResponse build() { - - return new GetSearchLibraryResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryResponseBody.java deleted file mode 100644 index 5b120674..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetSearchLibraryResponseBody - * - *

The contents of the library by section and type - */ -public class GetSearchLibraryResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetSearchLibraryResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetSearchLibraryResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchLibraryResponseBody withMediaContainer(GetSearchLibraryMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetSearchLibraryResponseBody 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; - } - GetSearchLibraryResponseBody other = (GetSearchLibraryResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetSearchLibraryMediaContainer 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 GetSearchLibraryResponseBody build() { - - return new GetSearchLibraryResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsCountry.java deleted file mode 100644 index d9a3114f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsCountry.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchResultsCountry { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetSearchResultsCountry( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetSearchResultsCountry() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsCountry withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetSearchResultsCountry 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; - } - GetSearchResultsCountry other = (GetSearchResultsCountry) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsCountry.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetSearchResultsCountry build() { - - return new GetSearchResultsCountry( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsDirector.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsDirector.java deleted file mode 100644 index 97bde20f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsDirector.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchResultsDirector { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetSearchResultsDirector( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetSearchResultsDirector() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsDirector withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetSearchResultsDirector 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; - } - GetSearchResultsDirector other = (GetSearchResultsDirector) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsDirector.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetSearchResultsDirector build() { - - return new GetSearchResultsDirector( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsGenre.java deleted file mode 100644 index af140856..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsGenre.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchResultsGenre { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetSearchResultsGenre( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetSearchResultsGenre() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsGenre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetSearchResultsGenre 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; - } - GetSearchResultsGenre other = (GetSearchResultsGenre) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsGenre.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetSearchResultsGenre build() { - - return new GetSearchResultsGenre( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMedia.java deleted file mode 100644 index d4bffe92..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMedia.java +++ /dev/null @@ -1,729 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetSearchResultsMedia { - - @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("audioProfile") - private Optional audioProfile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Part") - private Optional> part; - - @JsonCreator - public GetSearchResultsMedia( - @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("audioProfile") Optional audioProfile, - @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(audioProfile, "audioProfile"); - 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.audioProfile = audioProfile; - this.videoProfile = videoProfile; - this.part = part; - } - - public GetSearchResultsMedia() { - 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()); - } - - @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 audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> part() { - return (Optional>) part; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsMedia withId(double id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetSearchResultsMedia withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetSearchResultsMedia withDuration(double duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetSearchResultsMedia withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetSearchResultsMedia withBitrate(double bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - public GetSearchResultsMedia withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - public GetSearchResultsMedia withWidth(double width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - public GetSearchResultsMedia withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - public GetSearchResultsMedia withHeight(double height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - public GetSearchResultsMedia withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - public GetSearchResultsMedia withAspectRatio(double aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - - public GetSearchResultsMedia withAspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - public GetSearchResultsMedia withAudioChannels(double audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - - public GetSearchResultsMedia withAudioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - public GetSearchResultsMedia withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - - public GetSearchResultsMedia withAudioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - public GetSearchResultsMedia withVideoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - - public GetSearchResultsMedia withVideoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - public GetSearchResultsMedia withVideoResolution(double videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - - public GetSearchResultsMedia withVideoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - public GetSearchResultsMedia withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - public GetSearchResultsMedia withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - public GetSearchResultsMedia withVideoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - - public GetSearchResultsMedia withVideoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - public GetSearchResultsMedia withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - public GetSearchResultsMedia withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - public GetSearchResultsMedia withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - public GetSearchResultsMedia withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - public GetSearchResultsMedia withPart(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - - public GetSearchResultsMedia 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; - } - GetSearchResultsMedia other = (GetSearchResultsMedia) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && - Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.part, other.part); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, audioCodec, videoCodec, - videoResolution, container, videoFrameRate, - audioProfile, videoProfile, part); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsMedia.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, - "audioProfile", audioProfile, - "videoProfile", videoProfile, - "part", part); - } - - @SuppressWarnings("UnusedReturnValue") - 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 audioProfile = 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 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; - } - - - 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 GetSearchResultsMedia build() { - - return new GetSearchResultsMedia( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, audioCodec, videoCodec, - videoResolution, container, videoFrameRate, - audioProfile, videoProfile, part); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMediaContainer.java deleted file mode 100644 index bdb3eef8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMediaContainer.java +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetSearchResultsMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @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("Metadata") - private Optional> metadata; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Provider") - private Optional> provider; - - @JsonCreator - public GetSearchResultsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("identifier") Optional identifier, - @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, - @JsonProperty("mediaTagVersion") Optional mediaTagVersion, - @JsonProperty("Metadata") Optional> metadata, - @JsonProperty("Provider") Optional> provider) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(metadata, "metadata"); - Utils.checkNotNull(provider, "provider"); - this.size = size; - this.identifier = identifier; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.metadata = metadata; - this.provider = provider; - } - - public GetSearchResultsMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional identifier() { - return identifier; - } - - @JsonIgnore - public Optional mediaTagPrefix() { - return mediaTagPrefix; - } - - @JsonIgnore - public Optional mediaTagVersion() { - return mediaTagVersion; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> provider() { - return (Optional>) provider; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsMediaContainer withSize(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetSearchResultsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetSearchResultsMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = Optional.ofNullable(identifier); - return this; - } - - - public GetSearchResultsMediaContainer withIdentifier(Optional identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public GetSearchResultsMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); - return this; - } - - - public GetSearchResultsMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - public GetSearchResultsMediaContainer withMediaTagVersion(double mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); - return this; - } - - - public GetSearchResultsMediaContainer withMediaTagVersion(Optional mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - public GetSearchResultsMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetSearchResultsMediaContainer withMetadata(Optional> metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - public GetSearchResultsMediaContainer withProvider(List provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = Optional.ofNullable(provider); - return this; - } - - - public GetSearchResultsMediaContainer withProvider(Optional> provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = provider; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchResultsMediaContainer other = (GetSearchResultsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.metadata, other.metadata) && - Utils.enhancedDeepEquals(this.provider, other.provider); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, identifier, mediaTagPrefix, - mediaTagVersion, metadata, provider); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsMediaContainer.class, - "size", size, - "identifier", identifier, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "metadata", metadata, - "provider", provider); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional identifier = Optional.empty(); - - private Optional mediaTagPrefix = Optional.empty(); - - private Optional mediaTagVersion = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Optional> provider = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 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 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 Builder provider(List provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = Optional.ofNullable(provider); - return this; - } - - public Builder provider(Optional> provider) { - Utils.checkNotNull(provider, "provider"); - this.provider = provider; - return this; - } - - public GetSearchResultsMediaContainer build() { - - return new GetSearchResultsMediaContainer( - size, identifier, mediaTagPrefix, - mediaTagVersion, metadata, provider); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMetadata.java deleted file mode 100644 index 1a1f7561..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsMetadata.java +++ /dev/null @@ -1,1574 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Optional; - - -public class GetSearchResultsMetadata { - - @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("personal") - private Optional personal; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("sourceTitle") - private Optional sourceTitle; - - - @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 GetSearchResultsMetadata( - @JsonProperty("allowSync") Optional allowSync, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionUUID") Optional librarySectionUUID, - @JsonProperty("personal") Optional personal, - @JsonProperty("sourceTitle") Optional sourceTitle, - @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(personal, "personal"); - Utils.checkNotNull(sourceTitle, "sourceTitle"); - 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.personal = personal; - this.sourceTitle = sourceTitle; - 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 GetSearchResultsMetadata() { - 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(), 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 personal() { - return personal; - } - - @JsonIgnore - public Optional sourceTitle() { - return sourceTitle; - } - - @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 static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsMetadata withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); - return this; - } - - - public GetSearchResultsMetadata withAllowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - public GetSearchResultsMetadata withLibrarySectionID(double librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - public GetSearchResultsMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetSearchResultsMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - public GetSearchResultsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetSearchResultsMetadata withLibrarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - - public GetSearchResultsMetadata withLibrarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - public GetSearchResultsMetadata withPersonal(boolean personal) { - Utils.checkNotNull(personal, "personal"); - this.personal = Optional.ofNullable(personal); - return this; - } - - - public GetSearchResultsMetadata withPersonal(Optional personal) { - Utils.checkNotNull(personal, "personal"); - this.personal = personal; - return this; - } - - public GetSearchResultsMetadata withSourceTitle(String sourceTitle) { - Utils.checkNotNull(sourceTitle, "sourceTitle"); - this.sourceTitle = Optional.ofNullable(sourceTitle); - return this; - } - - - public GetSearchResultsMetadata withSourceTitle(Optional sourceTitle) { - Utils.checkNotNull(sourceTitle, "sourceTitle"); - this.sourceTitle = sourceTitle; - return this; - } - - public GetSearchResultsMetadata withRatingKey(double ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetSearchResultsMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetSearchResultsMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetSearchResultsMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetSearchResultsMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public GetSearchResultsMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public GetSearchResultsMetadata withStudio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - - public GetSearchResultsMetadata withStudio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - public GetSearchResultsMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetSearchResultsMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetSearchResultsMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetSearchResultsMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetSearchResultsMetadata withContentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - - public GetSearchResultsMetadata withContentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - public GetSearchResultsMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public GetSearchResultsMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public GetSearchResultsMetadata withRating(double rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = Optional.ofNullable(rating); - return this; - } - - - public GetSearchResultsMetadata withRating(Optional rating) { - Utils.checkNotNull(rating, "rating"); - this.rating = rating; - return this; - } - - public GetSearchResultsMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = Optional.ofNullable(audienceRating); - return this; - } - - - public GetSearchResultsMetadata withAudienceRating(Optional audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - public GetSearchResultsMetadata withYear(double year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - - public GetSearchResultsMetadata withYear(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - public GetSearchResultsMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = Optional.ofNullable(tagline); - return this; - } - - - public GetSearchResultsMetadata withTagline(Optional tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - public GetSearchResultsMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetSearchResultsMetadata withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetSearchResultsMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - - public GetSearchResultsMetadata withArt(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - public GetSearchResultsMetadata withDuration(double duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetSearchResultsMetadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetSearchResultsMetadata withOriginallyAvailableAt(OffsetDateTime originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - - public GetSearchResultsMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - public GetSearchResultsMetadata withAddedAt(double addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public GetSearchResultsMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public GetSearchResultsMetadata withUpdatedAt(double updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetSearchResultsMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - public GetSearchResultsMetadata withAudienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - - public GetSearchResultsMetadata withAudienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - public GetSearchResultsMetadata withChapterSource(String chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = Optional.ofNullable(chapterSource); - return this; - } - - - public GetSearchResultsMetadata withChapterSource(Optional chapterSource) { - Utils.checkNotNull(chapterSource, "chapterSource"); - this.chapterSource = chapterSource; - return this; - } - - public GetSearchResultsMetadata withPrimaryExtraKey(String primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); - return this; - } - - - public GetSearchResultsMetadata withPrimaryExtraKey(Optional primaryExtraKey) { - Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); - this.primaryExtraKey = primaryExtraKey; - return this; - } - - public GetSearchResultsMetadata withRatingImage(String ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = Optional.ofNullable(ratingImage); - return this; - } - - - public GetSearchResultsMetadata withRatingImage(Optional ratingImage) { - Utils.checkNotNull(ratingImage, "ratingImage"); - this.ratingImage = ratingImage; - return this; - } - - public GetSearchResultsMetadata withMedia(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - - public GetSearchResultsMetadata withMedia(Optional> media) { - Utils.checkNotNull(media, "media"); - this.media = media; - return this; - } - - public GetSearchResultsMetadata withGenre(List genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = Optional.ofNullable(genre); - return this; - } - - - public GetSearchResultsMetadata withGenre(Optional> genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = genre; - return this; - } - - public GetSearchResultsMetadata withDirector(List director) { - Utils.checkNotNull(director, "director"); - this.director = Optional.ofNullable(director); - return this; - } - - - public GetSearchResultsMetadata withDirector(Optional> director) { - Utils.checkNotNull(director, "director"); - this.director = director; - return this; - } - - public GetSearchResultsMetadata withWriter(List writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = Optional.ofNullable(writer); - return this; - } - - - public GetSearchResultsMetadata withWriter(Optional> writer) { - Utils.checkNotNull(writer, "writer"); - this.writer = writer; - return this; - } - - public GetSearchResultsMetadata withCountry(List country) { - Utils.checkNotNull(country, "country"); - this.country = Optional.ofNullable(country); - return this; - } - - - public GetSearchResultsMetadata withCountry(Optional> country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - public GetSearchResultsMetadata withRole(List role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - public GetSearchResultsMetadata 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; - } - GetSearchResultsMetadata other = (GetSearchResultsMetadata) o; - return - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionUUID, other.librarySectionUUID) && - Utils.enhancedDeepEquals(this.personal, other.personal) && - Utils.enhancedDeepEquals(this.sourceTitle, other.sourceTitle) && - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.rating, other.rating) && - Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && - Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && - Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && - Utils.enhancedDeepEquals(this.media, other.media) && - Utils.enhancedDeepEquals(this.genre, other.genre) && - Utils.enhancedDeepEquals(this.director, other.director) && - Utils.enhancedDeepEquals(this.writer, other.writer) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.role, other.role); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - allowSync, librarySectionID, librarySectionTitle, - librarySectionUUID, personal, sourceTitle, - 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(GetSearchResultsMetadata.class, - "allowSync", allowSync, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionUUID", librarySectionUUID, - "personal", personal, - "sourceTitle", sourceTitle, - "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); - } - - @SuppressWarnings("UnusedReturnValue") - 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 personal = Optional.empty(); - - private Optional sourceTitle = 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 personal(boolean personal) { - Utils.checkNotNull(personal, "personal"); - this.personal = Optional.ofNullable(personal); - return this; - } - - public Builder personal(Optional personal) { - Utils.checkNotNull(personal, "personal"); - this.personal = personal; - return this; - } - - - public Builder sourceTitle(String sourceTitle) { - Utils.checkNotNull(sourceTitle, "sourceTitle"); - this.sourceTitle = Optional.ofNullable(sourceTitle); - return this; - } - - public Builder sourceTitle(Optional sourceTitle) { - Utils.checkNotNull(sourceTitle, "sourceTitle"); - this.sourceTitle = sourceTitle; - 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 GetSearchResultsMetadata build() { - - return new GetSearchResultsMetadata( - allowSync, librarySectionID, librarySectionTitle, - librarySectionUUID, personal, sourceTitle, - 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/GetSearchResultsPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsPart.java deleted file mode 100644 index 5ed96e07..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsPart.java +++ /dev/null @@ -1,419 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchResultsPart { - - @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("audioProfile") - private Optional audioProfile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - @JsonCreator - public GetSearchResultsPart( - @JsonProperty("id") Optional id, - @JsonProperty("key") Optional key, - @JsonProperty("duration") Optional duration, - @JsonProperty("file") Optional file, - @JsonProperty("size") Optional size, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("container") Optional container, - @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(audioProfile, "audioProfile"); - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(videoProfile, "videoProfile"); - this.id = id; - this.key = key; - this.duration = duration; - this.file = file; - this.size = size; - this.audioProfile = audioProfile; - this.container = container; - this.videoProfile = videoProfile; - } - - public GetSearchResultsPart() { - this(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 audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional container() { - return container; - } - - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsPart withId(double id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetSearchResultsPart withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetSearchResultsPart withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetSearchResultsPart withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetSearchResultsPart withDuration(double duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetSearchResultsPart withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetSearchResultsPart withFile(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - - public GetSearchResultsPart withFile(Optional file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - public GetSearchResultsPart withSize(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetSearchResultsPart withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetSearchResultsPart withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - public GetSearchResultsPart withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - public GetSearchResultsPart withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - public GetSearchResultsPart withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - public GetSearchResultsPart withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - public GetSearchResultsPart 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; - } - GetSearchResultsPart other = (GetSearchResultsPart) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.file, other.file) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, key, duration, - file, size, audioProfile, - container, videoProfile); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsPart.class, - "id", id, - "key", key, - "duration", duration, - "file", file, - "size", size, - "audioProfile", audioProfile, - "container", container, - "videoProfile", videoProfile); - } - - @SuppressWarnings("UnusedReturnValue") - 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 audioProfile = Optional.empty(); - - private Optional container = 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 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; - } - - - 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 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 GetSearchResultsPart build() { - - return new GetSearchResultsPart( - id, key, duration, - file, size, audioProfile, - container, videoProfile); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRequest.java deleted file mode 100644 index 5e8c499a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRequest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class GetSearchResultsRequest { - /** - * The search query string to use - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") - private String query; - - @JsonCreator - public GetSearchResultsRequest( - String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - } - - /** - * The search query string to use - */ - @JsonIgnore - public String query() { - return query; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The search query string to use - */ - public GetSearchResultsRequest withQuery(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchResultsRequest other = (GetSearchResultsRequest) o; - return - Utils.enhancedDeepEquals(this.query, other.query); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - query); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsRequest.class, - "query", query); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String query; - - private Builder() { - // force use of static builder() method - } - - - /** - * The search query string to use - */ - public Builder query(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - public GetSearchResultsRequest build() { - - return new GetSearchResultsRequest( - query); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRequestBuilder.java deleted file mode 100644 index 1c1ea66c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetSearchResults; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; - -public class GetSearchResultsRequestBuilder { - - private String query; - private final SDKConfiguration sdkConfiguration; - - public GetSearchResultsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetSearchResultsRequestBuilder query(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - - private GetSearchResultsRequest buildRequest() { - - GetSearchResultsRequest request = new GetSearchResultsRequest(query); - - return request; - } - - public GetSearchResultsResponse call() throws Exception { - - RequestOperation operation - = new GetSearchResults.Sync(sdkConfiguration); - GetSearchResultsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsResponse.java deleted file mode 100644 index 4aba0e90..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetSearchResultsResponse 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; - - /** - * Search Results - */ - private Optional object; - - @JsonCreator - public GetSearchResultsResponse( - 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 GetSearchResultsResponse( - 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; - } - - /** - * Search Results - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetSearchResultsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetSearchResultsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchResultsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Search Results - */ - public GetSearchResultsResponse withObject(GetSearchResultsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Search Results - */ - public GetSearchResultsResponse 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; - } - GetSearchResultsResponse other = (GetSearchResultsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Search Results - */ - public Builder object(GetSearchResultsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Search Results - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetSearchResultsResponse build() { - - return new GetSearchResultsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsResponseBody.java deleted file mode 100644 index 8d65a896..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetSearchResultsResponseBody - * - *

Search Results - */ -public class GetSearchResultsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetSearchResultsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetSearchResultsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsResponseBody withMediaContainer(GetSearchResultsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetSearchResultsResponseBody 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; - } - GetSearchResultsResponseBody other = (GetSearchResultsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetSearchResultsMediaContainer 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 GetSearchResultsResponseBody build() { - - return new GetSearchResultsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRole.java deleted file mode 100644 index 4b751719..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsRole.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchResultsRole { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetSearchResultsRole( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetSearchResultsRole() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsRole withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetSearchResultsRole 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; - } - GetSearchResultsRole other = (GetSearchResultsRole) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsRole.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetSearchResultsRole build() { - - return new GetSearchResultsRole( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsWriter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsWriter.java deleted file mode 100644 index 753f6175..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchResultsWriter.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSearchResultsWriter { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetSearchResultsWriter( - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - } - - public GetSearchResultsWriter() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSearchResultsWriter withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetSearchResultsWriter 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; - } - GetSearchResultsWriter other = (GetSearchResultsWriter) o; - return - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - tag); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsWriter.class, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - 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 GetSearchResultsWriter build() { - - return new GetSearchResultsWriter( - tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersMediaContainer.java new file mode 100644 index 00000000..fa405df2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Directory; +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.List; +import java.util.Optional; + +/** + * GetSectionFiltersMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetSectionFiltersMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonCreator + public GetSectionFiltersMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Directory") Optional> directory) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(directory, "directory"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.directory = directory; + } + + public GetSectionFiltersMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetSectionFiltersMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetSectionFiltersMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetSectionFiltersMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetSectionFiltersMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetSectionFiltersMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetSectionFiltersMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetSectionFiltersMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetSectionFiltersMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetSectionFiltersMediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public GetSectionFiltersMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionFiltersMediaContainer other = (GetSectionFiltersMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.directory, other.directory); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, directory); + } + + @Override + public String toString() { + return Utils.toString(GetSectionFiltersMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "directory", directory); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public GetSectionFiltersMediaContainer build() { + + return new GetSectionFiltersMediaContainer( + identifier, offset, size, + totalSize, directory); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersRequest.java new file mode 100644 index 00000000..1d40a344 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetSectionFiltersRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public GetSectionFiltersRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public GetSectionFiltersRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSectionFiltersRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSectionFiltersRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSectionFiltersRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSectionFiltersRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSectionFiltersRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSectionFiltersRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSectionFiltersRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSectionFiltersRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSectionFiltersRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSectionFiltersRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSectionFiltersRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSectionFiltersRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSectionFiltersRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSectionFiltersRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSectionFiltersRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSectionFiltersRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSectionFiltersRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSectionFiltersRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSectionFiltersRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSectionFiltersRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSectionFiltersRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSectionFiltersRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetSectionFiltersRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionFiltersRequest other = (GetSectionFiltersRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(GetSectionFiltersRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetSectionFiltersRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSectionFiltersRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersRequestBuilder.java new file mode 100644 index 00000000..5925f590 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSectionFilters; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetSectionFiltersRequestBuilder { + + private GetSectionFiltersRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSectionFiltersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionFiltersRequestBuilder request(GetSectionFiltersRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSectionFiltersResponse call() throws Exception { + + RequestOperation operation + = new GetSectionFilters.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersResponse.java new file mode 100644 index 00000000..d2712493 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetSectionFiltersResponse 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 filters on the section + */ + private Optional object; + + @JsonCreator + public GetSectionFiltersResponse( + 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 GetSectionFiltersResponse( + 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 filters on the section + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionFiltersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionFiltersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionFiltersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The filters on the section + */ + public GetSectionFiltersResponse withObject(GetSectionFiltersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * The filters on the section + */ + public GetSectionFiltersResponse 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; + } + GetSectionFiltersResponse other = (GetSectionFiltersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetSectionFiltersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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 filters on the section + */ + public Builder object(GetSectionFiltersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The filters on the section + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetSectionFiltersResponse build() { + + return new GetSectionFiltersResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersResponseBody.java new file mode 100644 index 00000000..1cb241fb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionFiltersResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetSectionFiltersResponseBody + * + *

The filters on the section + */ +public class GetSectionFiltersResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetSectionFiltersResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetSectionFiltersResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetSectionFiltersResponseBody withMediaContainer(GetSectionFiltersMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetSectionFiltersResponseBody 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; + } + GetSectionFiltersResponseBody other = (GetSectionFiltersResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetSectionFiltersResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetSectionFiltersMediaContainer 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 GetSectionFiltersResponseBody build() { + + return new GetSectionFiltersResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsMediaContainer.java new file mode 100644 index 00000000..c496b6e0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Hub; +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.List; +import java.util.Optional; + +/** + * GetSectionHubsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetSectionHubsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + @JsonCreator + public GetSectionHubsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(hub, "hub"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.hub = hub; + } + + public GetSectionHubsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hub() { + return (Optional>) hub; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetSectionHubsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetSectionHubsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetSectionHubsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetSectionHubsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetSectionHubsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetSectionHubsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetSectionHubsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetSectionHubsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetSectionHubsMediaContainer withHub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + + public GetSectionHubsMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionHubsMediaContainer other = (GetSectionHubsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, hub); + } + + @Override + public String toString() { + return Utils.toString(GetSectionHubsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "hub", hub); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder hub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public GetSectionHubsMediaContainer build() { + + return new GetSectionHubsMediaContainer( + identifier, offset, size, + totalSize, hub); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsRequest.java new file mode 100644 index 00000000..4ac32c69 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsRequest.java @@ -0,0 +1,903 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetSectionHubsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section ID for the hubs to fetch + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * Limit results to count items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=onlyTransient") + private Optional onlyTransient; + + @JsonCreator + public GetSectionHubsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + Optional count, + Optional onlyTransient) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.count = count; + this.onlyTransient = onlyTransient; + } + + public GetSectionHubsRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section ID for the hubs to fetch + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * Limit results to count items + */ + @JsonIgnore + public Optional count() { + return count; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional onlyTransient() { + return (Optional) onlyTransient; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSectionHubsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSectionHubsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSectionHubsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSectionHubsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSectionHubsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSectionHubsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSectionHubsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSectionHubsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSectionHubsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSectionHubsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSectionHubsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSectionHubsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSectionHubsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSectionHubsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSectionHubsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSectionHubsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSectionHubsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSectionHubsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSectionHubsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSectionHubsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSectionHubsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSectionHubsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section ID for the hubs to fetch + */ + public GetSectionHubsRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Limit results to count items + */ + public GetSectionHubsRequest withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + /** + * Limit results to count items + */ + public GetSectionHubsRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public GetSectionHubsRequest withOnlyTransient(BoolInt onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public GetSectionHubsRequest withOnlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionHubsRequest other = (GetSectionHubsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.count, other.count) && + Utils.enhancedDeepEquals(this.onlyTransient, other.onlyTransient); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + count, onlyTransient); + } + + @Override + public String toString() { + return Utils.toString(GetSectionHubsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "count", count, + "onlyTransient", onlyTransient); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Optional count = Optional.empty(); + + private Optional onlyTransient = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section ID for the hubs to fetch + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * Limit results to count items + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * Limit results to count items + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public Builder onlyTransient(BoolInt onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = Optional.ofNullable(onlyTransient); + return this; + } + + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) + */ + public Builder onlyTransient(Optional onlyTransient) { + Utils.checkNotNull(onlyTransient, "onlyTransient"); + this.onlyTransient = onlyTransient; + return this; + } + + public GetSectionHubsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSectionHubsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + count, onlyTransient); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsRequestBuilder.java new file mode 100644 index 00000000..1ffd088d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSectionHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetSectionHubsRequestBuilder { + + private GetSectionHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSectionHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionHubsRequestBuilder request(GetSectionHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSectionHubsResponse call() throws Exception { + + RequestOperation operation + = new GetSectionHubs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsResponse.java new file mode 100644 index 00000000..eccd038e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetSectionHubsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetSectionHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetSectionHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSectionHubsResponse withObject(GetSectionHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetSectionHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetSectionHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionHubsResponse other = (GetSectionHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetSectionHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetSectionHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetSectionHubsResponse build() { + + return new GetSectionHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsResponseBody.java new file mode 100644 index 00000000..9a699933 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionHubsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetSectionHubsResponseBody + * + *

OK + */ +public class GetSectionHubsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetSectionHubsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetSectionHubsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetSectionHubsResponseBody withMediaContainer(GetSectionHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetSectionHubsResponseBody 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; + } + GetSectionHubsResponseBody other = (GetSectionHubsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetSectionHubsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetSectionHubsMediaContainer 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 GetSectionHubsResponseBody build() { + + return new GetSectionHubsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageRequest.java new file mode 100644 index 00000000..319e9562 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageRequest.java @@ -0,0 +1,929 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.Composite; +import dev.plexapi.sdk.models.shared.MediaQuery; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetSectionImageRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * The update time of the image. Used for busting cache. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=updatedAt") + private long updatedAt; + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaQuery") + private Optional mediaQuery; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=composite") + private Optional composite; + + @JsonCreator + public GetSectionImageRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + long updatedAt, + Optional mediaQuery, + Optional composite) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(mediaQuery, "mediaQuery"); + Utils.checkNotNull(composite, "composite"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.updatedAt = updatedAt; + this.mediaQuery = mediaQuery; + this.composite = composite; + } + + public GetSectionImageRequest( + long sectionId, + long updatedAt) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + updatedAt, Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * The update time of the image. Used for busting cache. + */ + @JsonIgnore + public long updatedAt() { + return updatedAt; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaQuery() { + return (Optional) mediaQuery; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional composite() { + return (Optional) composite; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSectionImageRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSectionImageRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSectionImageRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSectionImageRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSectionImageRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSectionImageRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSectionImageRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSectionImageRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSectionImageRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSectionImageRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSectionImageRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSectionImageRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSectionImageRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSectionImageRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSectionImageRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSectionImageRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSectionImageRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSectionImageRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSectionImageRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSectionImageRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSectionImageRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSectionImageRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetSectionImageRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The update time of the image. Used for busting cache. + */ + public GetSectionImageRequest withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public GetSectionImageRequest withMediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public GetSectionImageRequest withMediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + public GetSectionImageRequest withComposite(Composite composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + public GetSectionImageRequest withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionImageRequest other = (GetSectionImageRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.mediaQuery, other.mediaQuery) && + Utils.enhancedDeepEquals(this.composite, other.composite); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + updatedAt, mediaQuery, composite); + } + + @Override + public String toString() { + return Utils.toString(GetSectionImageRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "updatedAt", updatedAt, + "mediaQuery", mediaQuery, + "composite", composite); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Long updatedAt; + + private Optional mediaQuery = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The update time of the image. Used for busting cache. + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + + public Builder composite(Composite composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public GetSectionImageRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSectionImageRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + updatedAt, mediaQuery, composite); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageRequestBuilder.java new file mode 100644 index 00000000..e76f63f0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSectionImage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetSectionImageRequestBuilder { + + private GetSectionImageRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSectionImageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionImageRequestBuilder request(GetSectionImageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSectionImageResponse call() throws Exception { + + RequestOperation operation + = new GetSectionImage.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageResponse.java new file mode 100644 index 00000000..b395ef84 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionImageResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetSectionImageResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetSectionImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionImageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionImageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionImageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionImageResponse other = (GetSectionImageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSectionImageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetSectionImageResponse build() { + + return new GetSectionImageResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesRequest.java new file mode 100644 index 00000000..60c4d7c3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesRequest.java @@ -0,0 +1,825 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetSectionPreferencesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=agent") + private Optional agent; + + @JsonCreator + public GetSectionPreferencesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + Optional agent) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(agent, "agent"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.agent = agent; + } + + public GetSectionPreferencesRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + @JsonIgnore + public Optional agent() { + return agent; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSectionPreferencesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSectionPreferencesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSectionPreferencesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSectionPreferencesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSectionPreferencesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSectionPreferencesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSectionPreferencesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSectionPreferencesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSectionPreferencesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSectionPreferencesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSectionPreferencesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSectionPreferencesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSectionPreferencesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSectionPreferencesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSectionPreferencesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSectionPreferencesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSectionPreferencesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSectionPreferencesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSectionPreferencesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSectionPreferencesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSectionPreferencesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSectionPreferencesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetSectionPreferencesRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public GetSectionPreferencesRequest withAgent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + + public GetSectionPreferencesRequest withAgent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionPreferencesRequest other = (GetSectionPreferencesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.agent, other.agent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + agent); + } + + @Override + public String toString() { + return Utils.toString(GetSectionPreferencesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "agent", agent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Optional agent = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + public Builder agent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + public Builder agent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + public GetSectionPreferencesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSectionPreferencesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + agent); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesRequestBuilder.java new file mode 100644 index 00000000..1fb69e0d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSectionPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetSectionPreferencesRequestBuilder { + + private GetSectionPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSectionPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionPreferencesRequestBuilder request(GetSectionPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSectionPreferencesResponse call() throws Exception { + + RequestOperation operation + = new GetSectionPreferences.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesResponse.java new file mode 100644 index 00000000..35796cae --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionPreferencesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSettings; +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.Optional; + + +public class GetSectionPreferencesResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithSettings; + + @JsonCreator + public GetSectionPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSettings) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSettings = mediaContainerWithSettings; + } + + public GetSectionPreferencesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSettings() { + return (Optional) mediaContainerWithSettings; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSectionPreferencesResponse withMediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + + /** + * OK + */ + public GetSectionPreferencesResponse withMediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionPreferencesResponse other = (GetSectionPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSettings, other.mediaContainerWithSettings); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + @Override + public String toString() { + return Utils.toString(GetSectionPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSettings", mediaContainerWithSettings); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSettings = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + public GetSectionPreferencesResponse build() { + + return new GetSectionPreferencesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsMediaContainer.java new file mode 100644 index 00000000..cfe38af9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsMediaContainer.java @@ -0,0 +1,438 @@ +/* + * 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.models.shared.LibrarySection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetSectionsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetSectionsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + /** + * Typically just "Plex Library" + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title1") + private Optional title1; + + @JsonCreator + public GetSectionsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("Directory") Optional> directory, + @JsonProperty("title1") Optional title1) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(directory, "directory"); + Utils.checkNotNull(title1, "title1"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.allowSync = allowSync; + this.directory = directory; + this.title1 = title1; + } + + public GetSectionsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @JsonIgnore + public Optional allowSync() { + return allowSync; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + /** + * Typically just "Plex Library" + */ + @JsonIgnore + public Optional title1() { + return title1; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetSectionsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetSectionsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetSectionsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetSectionsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetSectionsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetSectionsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetSectionsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetSectionsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetSectionsMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + + public GetSectionsMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetSectionsMediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public GetSectionsMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + /** + * Typically just "Plex Library" + */ + public GetSectionsMediaContainer withTitle1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + + /** + * Typically just "Plex Library" + */ + public GetSectionsMediaContainer withTitle1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionsMediaContainer other = (GetSectionsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && + Utils.enhancedDeepEquals(this.directory, other.directory) && + Utils.enhancedDeepEquals(this.title1, other.title1); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, allowSync, directory, + title1); + } + + @Override + public String toString() { + return Utils.toString(GetSectionsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "allowSync", allowSync, + "directory", directory, + "title1", title1); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Optional title1 = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + 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 directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + + /** + * Typically just "Plex Library" + */ + public Builder title1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + /** + * Typically just "Plex Library" + */ + public Builder title1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public GetSectionsMediaContainer build() { + + return new GetSectionsMediaContainer( + identifier, offset, size, + totalSize, allowSync, directory, + title1); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsRequest.java new file mode 100644 index 00000000..3fa21e12 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsRequest.java @@ -0,0 +1,842 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetSectionsPrefsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The metadata type + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private long type; + + /** + * The metadata agent in use + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=agent") + private Optional agent; + + @JsonCreator + public GetSectionsPrefsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long type, + Optional agent) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(agent, "agent"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.type = type; + this.agent = agent; + } + + public GetSectionsPrefsRequest( + long type) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), type, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The metadata type + */ + @JsonIgnore + public long type() { + return type; + } + + /** + * The metadata agent in use + */ + @JsonIgnore + public Optional agent() { + return agent; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSectionsPrefsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSectionsPrefsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSectionsPrefsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSectionsPrefsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSectionsPrefsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSectionsPrefsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSectionsPrefsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSectionsPrefsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSectionsPrefsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSectionsPrefsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSectionsPrefsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSectionsPrefsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSectionsPrefsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSectionsPrefsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSectionsPrefsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSectionsPrefsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSectionsPrefsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSectionsPrefsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSectionsPrefsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSectionsPrefsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSectionsPrefsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSectionsPrefsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The metadata type + */ + public GetSectionsPrefsRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The metadata agent in use + */ + public GetSectionsPrefsRequest withAgent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + + /** + * The metadata agent in use + */ + public GetSectionsPrefsRequest withAgent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionsPrefsRequest other = (GetSectionsPrefsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.agent, other.agent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, type, + agent); + } + + @Override + public String toString() { + return Utils.toString(GetSectionsPrefsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "type", type, + "agent", agent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long type; + + private Optional agent = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The metadata type + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The metadata agent in use + */ + public Builder agent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + /** + * The metadata agent in use + */ + public Builder agent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + public GetSectionsPrefsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSectionsPrefsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, type, + agent); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsRequestBuilder.java new file mode 100644 index 00000000..8034216f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSectionsPrefs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetSectionsPrefsRequestBuilder { + + private GetSectionsPrefsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSectionsPrefsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionsPrefsRequestBuilder request(GetSectionsPrefsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSectionsPrefsResponse call() throws Exception { + + RequestOperation operation + = new GetSectionsPrefs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsResponse.java new file mode 100644 index 00000000..62674d72 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsPrefsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.RequestHandlerSlashGetResponses200; +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.Optional; + + +public class GetSectionsPrefsResponse 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; + + /** + * OK + */ + private Optional requestHandlerSlashGetResponses200; + + @JsonCreator + public GetSectionsPrefsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + } + + public GetSectionsPrefsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional requestHandlerSlashGetResponses200() { + return (Optional) requestHandlerSlashGetResponses200; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionsPrefsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionsPrefsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionsPrefsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSectionsPrefsResponse withRequestHandlerSlashGetResponses200(RequestHandlerSlashGetResponses200 requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = Optional.ofNullable(requestHandlerSlashGetResponses200); + return this; + } + + + /** + * OK + */ + public GetSectionsPrefsResponse withRequestHandlerSlashGetResponses200(Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionsPrefsResponse other = (GetSectionsPrefsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.requestHandlerSlashGetResponses200, other.requestHandlerSlashGetResponses200); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + requestHandlerSlashGetResponses200); + } + + @Override + public String toString() { + return Utils.toString(GetSectionsPrefsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "requestHandlerSlashGetResponses200", requestHandlerSlashGetResponses200); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional requestHandlerSlashGetResponses200 = 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; + } + + + /** + * OK + */ + public Builder requestHandlerSlashGetResponses200(RequestHandlerSlashGetResponses200 requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = Optional.ofNullable(requestHandlerSlashGetResponses200); + return this; + } + + /** + * OK + */ + public Builder requestHandlerSlashGetResponses200(Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + return this; + } + + public GetSectionsPrefsResponse build() { + + return new GetSectionsPrefsResponse( + contentType, statusCode, rawResponse, + requestHandlerSlashGetResponses200); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsRequestBuilder.java new file mode 100644 index 00000000..932d733e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSections; +import java.lang.Exception; + +public class GetSectionsRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetSectionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionsResponse call() throws Exception { + + RequestlessOperation operation + = new GetSections.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsResponse.java new file mode 100644 index 00000000..bacfc2e8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetSectionsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetSectionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetSectionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSectionsResponse withObject(GetSectionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetSectionsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetSectionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionsResponse other = (GetSectionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetSectionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetSectionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetSectionsResponse build() { + + return new GetSectionsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsResponseBody.java new file mode 100644 index 00000000..57e59566 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSectionsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetSectionsResponseBody + * + *

OK + */ +public class GetSectionsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetSectionsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetSectionsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetSectionsResponseBody withMediaContainer(GetSectionsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetSectionsResponseBody 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; + } + GetSectionsResponseBody other = (GetSectionsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetSectionsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetSectionsMediaContainer 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 GetSectionsResponseBody build() { + + return new GetSectionsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesMediaContainer.java deleted file mode 100644 index 9add6926..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetServerActivitiesMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Activity") - private Optional> activity; - - @JsonCreator - public GetServerActivitiesMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Activity") Optional> activity) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(activity, "activity"); - this.size = size; - this.activity = activity; - } - - public GetServerActivitiesMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> activity() { - return (Optional>) activity; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerActivitiesMediaContainer withSize(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetServerActivitiesMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetServerActivitiesMediaContainer withActivity(List activity) { - Utils.checkNotNull(activity, "activity"); - this.activity = Optional.ofNullable(activity); - return this; - } - - - public GetServerActivitiesMediaContainer withActivity(Optional> activity) { - Utils.checkNotNull(activity, "activity"); - this.activity = activity; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerActivitiesMediaContainer other = (GetServerActivitiesMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.activity, other.activity); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, activity); - } - - @Override - public String toString() { - return Utils.toString(GetServerActivitiesMediaContainer.class, - "size", size, - "activity", activity); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> activity = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 activity(List activity) { - Utils.checkNotNull(activity, "activity"); - this.activity = Optional.ofNullable(activity); - return this; - } - - public Builder activity(Optional> activity) { - Utils.checkNotNull(activity, "activity"); - this.activity = activity; - return this; - } - - public GetServerActivitiesMediaContainer build() { - - return new GetServerActivitiesMediaContainer( - size, activity); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesRequestBuilder.java deleted file mode 100644 index 3c625e11..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerActivities; -import java.lang.Exception; - -public class GetServerActivitiesRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetServerActivitiesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetServerActivitiesResponse call() throws Exception { - - RequestlessOperation operation - = new GetServerActivities.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesResponse.java deleted file mode 100644 index aca33bfa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetServerActivitiesResponse 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 Server Activities - */ - private Optional object; - - @JsonCreator - public GetServerActivitiesResponse( - 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 GetServerActivitiesResponse( - 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 Server Activities - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerActivitiesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerActivitiesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerActivitiesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Server Activities - */ - public GetServerActivitiesResponse withObject(GetServerActivitiesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The Server Activities - */ - public GetServerActivitiesResponse 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; - } - GetServerActivitiesResponse other = (GetServerActivitiesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetServerActivitiesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Server Activities - */ - public Builder object(GetServerActivitiesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The Server Activities - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetServerActivitiesResponse build() { - - return new GetServerActivitiesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesResponseBody.java deleted file mode 100644 index 68003eee..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerActivitiesResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetServerActivitiesResponseBody - * - *

The Server Activities - */ -public class GetServerActivitiesResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetServerActivitiesResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetServerActivitiesResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerActivitiesResponseBody withMediaContainer(GetServerActivitiesMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetServerActivitiesResponseBody 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; - } - GetServerActivitiesResponseBody other = (GetServerActivitiesResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetServerActivitiesResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetServerActivitiesMediaContainer 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 GetServerActivitiesResponseBody build() { - - return new GetServerActivitiesResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesRequestBuilder.java deleted file mode 100644 index 9bd56a7c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerCapabilities; -import java.lang.Exception; - -public class GetServerCapabilitiesRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetServerCapabilitiesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetServerCapabilitiesResponse call() throws Exception { - - RequestlessOperation operation - = new GetServerCapabilities.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesResponse.java deleted file mode 100644 index c89ffad1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetServerCapabilitiesResponse 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 Server Capabilities - */ - private Optional object; - - @JsonCreator - public GetServerCapabilitiesResponse( - 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 GetServerCapabilitiesResponse( - 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 Server Capabilities - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerCapabilitiesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerCapabilitiesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerCapabilitiesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Server Capabilities - */ - public GetServerCapabilitiesResponse withObject(GetServerCapabilitiesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The Server Capabilities - */ - public GetServerCapabilitiesResponse 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; - } - GetServerCapabilitiesResponse other = (GetServerCapabilitiesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetServerCapabilitiesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Server Capabilities - */ - public Builder object(GetServerCapabilitiesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The Server Capabilities - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetServerCapabilitiesResponse build() { - - return new GetServerCapabilitiesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesResponseBody.java deleted file mode 100644 index 13f856e1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerCapabilitiesResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetServerCapabilitiesResponseBody - * - *

The Server Capabilities - */ -public class GetServerCapabilitiesResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetServerCapabilitiesResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetServerCapabilitiesResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerCapabilitiesResponseBody withMediaContainer(MediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetServerCapabilitiesResponseBody 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; - } - GetServerCapabilitiesResponseBody other = (GetServerCapabilitiesResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetServerCapabilitiesResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(MediaContainer 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 GetServerCapabilitiesResponseBody build() { - - return new GetServerCapabilitiesResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityMediaContainer.java deleted file mode 100644 index f1fb5be7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityMediaContainer.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerIdentityMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("claimed") - private Optional claimed; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("machineIdentifier") - private Optional machineIdentifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("version") - private Optional version; - - @JsonCreator - public GetServerIdentityMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("claimed") Optional claimed, - @JsonProperty("machineIdentifier") Optional machineIdentifier, - @JsonProperty("version") Optional version) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(claimed, "claimed"); - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - Utils.checkNotNull(version, "version"); - this.size = size; - this.claimed = claimed; - this.machineIdentifier = machineIdentifier; - this.version = version; - } - - public GetServerIdentityMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional claimed() { - return claimed; - } - - @JsonIgnore - public Optional machineIdentifier() { - return machineIdentifier; - } - - @JsonIgnore - public Optional version() { - return version; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerIdentityMediaContainer withSize(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetServerIdentityMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetServerIdentityMediaContainer withClaimed(boolean claimed) { - Utils.checkNotNull(claimed, "claimed"); - this.claimed = Optional.ofNullable(claimed); - return this; - } - - - public GetServerIdentityMediaContainer withClaimed(Optional claimed) { - Utils.checkNotNull(claimed, "claimed"); - this.claimed = claimed; - return this; - } - - public GetServerIdentityMediaContainer withMachineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = Optional.ofNullable(machineIdentifier); - return this; - } - - - public GetServerIdentityMediaContainer withMachineIdentifier(Optional machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - public GetServerIdentityMediaContainer withVersion(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - - public GetServerIdentityMediaContainer withVersion(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerIdentityMediaContainer other = (GetServerIdentityMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.claimed, other.claimed) && - Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && - Utils.enhancedDeepEquals(this.version, other.version); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, claimed, machineIdentifier, - version); - } - - @Override - public String toString() { - return Utils.toString(GetServerIdentityMediaContainer.class, - "size", size, - "claimed", claimed, - "machineIdentifier", machineIdentifier, - "version", version); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional claimed = Optional.empty(); - - private Optional machineIdentifier = Optional.empty(); - - private Optional version = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 claimed(boolean claimed) { - Utils.checkNotNull(claimed, "claimed"); - this.claimed = Optional.ofNullable(claimed); - return this; - } - - public Builder claimed(Optional claimed) { - Utils.checkNotNull(claimed, "claimed"); - this.claimed = claimed; - return this; - } - - - public Builder machineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = Optional.ofNullable(machineIdentifier); - return this; - } - - public Builder machineIdentifier(Optional machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - - public Builder version(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - public Builder version(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - public GetServerIdentityMediaContainer build() { - - return new GetServerIdentityMediaContainer( - size, claimed, machineIdentifier, - version); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityRequestBuilder.java deleted file mode 100644 index 9653701f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerIdentity; -import java.lang.Exception; - -public class GetServerIdentityRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetServerIdentityRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetServerIdentityResponse call() throws Exception { - - RequestlessOperation operation - = new GetServerIdentity.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityResponse.java deleted file mode 100644 index 029928a7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetServerIdentityResponse 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 Server Identity information - */ - private Optional object; - - @JsonCreator - public GetServerIdentityResponse( - 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 GetServerIdentityResponse( - 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 Server Identity information - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerIdentityResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerIdentityResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerIdentityResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Server Identity information - */ - public GetServerIdentityResponse withObject(GetServerIdentityResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The Server Identity information - */ - public GetServerIdentityResponse 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; - } - GetServerIdentityResponse other = (GetServerIdentityResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetServerIdentityResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Server Identity information - */ - public Builder object(GetServerIdentityResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The Server Identity information - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetServerIdentityResponse build() { - - return new GetServerIdentityResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityResponseBody.java deleted file mode 100644 index 9c559e76..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerIdentityResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetServerIdentityResponseBody - * - *

The Server Identity information - */ -public class GetServerIdentityResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetServerIdentityResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetServerIdentityResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerIdentityResponseBody withMediaContainer(GetServerIdentityMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetServerIdentityResponseBody 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; - } - GetServerIdentityResponseBody other = (GetServerIdentityResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetServerIdentityResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetServerIdentityMediaContainer 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 GetServerIdentityResponseBody build() { - - return new GetServerIdentityResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoRequest.java new file mode 100644 index 00000000..2fc3f532 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoRequest.java @@ -0,0 +1,738 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetServerInfoRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + @JsonCreator + public GetServerInfoRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + } + + public GetServerInfoRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetServerInfoRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetServerInfoRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetServerInfoRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetServerInfoRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetServerInfoRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetServerInfoRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetServerInfoRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetServerInfoRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetServerInfoRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetServerInfoRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetServerInfoRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetServerInfoRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetServerInfoRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetServerInfoRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetServerInfoRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetServerInfoRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetServerInfoRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetServerInfoRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetServerInfoRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetServerInfoRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetServerInfoRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetServerInfoRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerInfoRequest other = (GetServerInfoRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace); + } + + @Override + public String toString() { + return Utils.toString(GetServerInfoRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public GetServerInfoRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetServerInfoRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoRequestBuilder.java new file mode 100644 index 00000000..3bdc94ae --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetServerInfo; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetServerInfoRequestBuilder { + + private GetServerInfoRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetServerInfoRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetServerInfoRequestBuilder request(GetServerInfoRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetServerInfoResponse call() throws Exception { + + RequestOperation operation + = new GetServerInfo.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoResponse.java new file mode 100644 index 00000000..e869ca9d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetServerInfoResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDirectory; +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.Optional; + + +public class GetServerInfoResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithDirectory; + + @JsonCreator + public GetServerInfoResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDirectory) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDirectory, "mediaContainerWithDirectory"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDirectory = mediaContainerWithDirectory; + } + + public GetServerInfoResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDirectory() { + return (Optional) mediaContainerWithDirectory; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetServerInfoResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetServerInfoResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetServerInfoResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetServerInfoResponse withMediaContainerWithDirectory(MediaContainerWithDirectory mediaContainerWithDirectory) { + Utils.checkNotNull(mediaContainerWithDirectory, "mediaContainerWithDirectory"); + this.mediaContainerWithDirectory = Optional.ofNullable(mediaContainerWithDirectory); + return this; + } + + + /** + * OK + */ + public GetServerInfoResponse withMediaContainerWithDirectory(Optional mediaContainerWithDirectory) { + Utils.checkNotNull(mediaContainerWithDirectory, "mediaContainerWithDirectory"); + this.mediaContainerWithDirectory = mediaContainerWithDirectory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerInfoResponse other = (GetServerInfoResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDirectory, other.mediaContainerWithDirectory); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDirectory); + } + + @Override + public String toString() { + return Utils.toString(GetServerInfoResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDirectory", mediaContainerWithDirectory); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDirectory = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDirectory(MediaContainerWithDirectory mediaContainerWithDirectory) { + Utils.checkNotNull(mediaContainerWithDirectory, "mediaContainerWithDirectory"); + this.mediaContainerWithDirectory = Optional.ofNullable(mediaContainerWithDirectory); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDirectory(Optional mediaContainerWithDirectory) { + Utils.checkNotNull(mediaContainerWithDirectory, "mediaContainerWithDirectory"); + this.mediaContainerWithDirectory = mediaContainerWithDirectory; + return this; + } + + public GetServerInfoResponse build() { + + return new GetServerInfoResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDirectory); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerListMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerListMediaContainer.java deleted file mode 100644 index 29701eeb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerListMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetServerListMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Server") - private Optional> server; - - @JsonCreator - public GetServerListMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Server") Optional> server) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(server, "server"); - this.size = size; - this.server = server; - } - - public GetServerListMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> server() { - return (Optional>) server; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerListMediaContainer withSize(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetServerListMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetServerListMediaContainer withServer(List server) { - Utils.checkNotNull(server, "server"); - this.server = Optional.ofNullable(server); - return this; - } - - - public GetServerListMediaContainer withServer(Optional> server) { - Utils.checkNotNull(server, "server"); - this.server = server; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerListMediaContainer other = (GetServerListMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.server, other.server); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, server); - } - - @Override - public String toString() { - return Utils.toString(GetServerListMediaContainer.class, - "size", size, - "server", server); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> server = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 server(List server) { - Utils.checkNotNull(server, "server"); - this.server = Optional.ofNullable(server); - return this; - } - - public Builder server(Optional> server) { - Utils.checkNotNull(server, "server"); - this.server = server; - return this; - } - - public GetServerListMediaContainer build() { - - return new GetServerListMediaContainer( - size, server); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerListRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerListRequestBuilder.java deleted file mode 100644 index 5dec8ee8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerListRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerList; -import java.lang.Exception; - -public class GetServerListRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetServerListRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetServerListResponse call() throws Exception { - - RequestlessOperation operation - = new GetServerList.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerListResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerListResponse.java deleted file mode 100644 index fb705a2b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerListResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetServerListResponse 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; - - /** - * List of Servers - */ - private Optional object; - - @JsonCreator - public GetServerListResponse( - 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 GetServerListResponse( - 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; - } - - /** - * List of Servers - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerListResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerListResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerListResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * List of Servers - */ - public GetServerListResponse withObject(GetServerListResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * List of Servers - */ - public GetServerListResponse 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; - } - GetServerListResponse other = (GetServerListResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetServerListResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * List of Servers - */ - public Builder object(GetServerListResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * List of Servers - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetServerListResponse build() { - - return new GetServerListResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerListResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerListResponseBody.java deleted file mode 100644 index a7faa94c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerListResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetServerListResponseBody - * - *

List of Servers - */ -public class GetServerListResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetServerListResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetServerListResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerListResponseBody withMediaContainer(GetServerListMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetServerListResponseBody 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; - } - GetServerListResponseBody other = (GetServerListResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetServerListResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetServerListMediaContainer 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 GetServerListResponseBody build() { - - return new GetServerListResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerListServer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerListServer.java deleted file mode 100644 index 4499a504..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerListServer.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetServerListServer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("name") - private Optional name; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("host") - private Optional host; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("address") - private Optional address; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("port") - private Optional port; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("machineIdentifier") - private Optional machineIdentifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("version") - private Optional version; - - @JsonCreator - public GetServerListServer( - @JsonProperty("name") Optional name, - @JsonProperty("host") Optional host, - @JsonProperty("address") Optional address, - @JsonProperty("port") Optional port, - @JsonProperty("machineIdentifier") Optional machineIdentifier, - @JsonProperty("version") Optional version) { - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(host, "host"); - Utils.checkNotNull(address, "address"); - Utils.checkNotNull(port, "port"); - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - Utils.checkNotNull(version, "version"); - this.name = name; - this.host = host; - this.address = address; - this.port = port; - this.machineIdentifier = machineIdentifier; - this.version = version; - } - - public GetServerListServer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional name() { - return name; - } - - @JsonIgnore - public Optional host() { - return host; - } - - @JsonIgnore - public Optional address() { - return address; - } - - @JsonIgnore - public Optional port() { - return port; - } - - @JsonIgnore - public Optional machineIdentifier() { - return machineIdentifier; - } - - @JsonIgnore - public Optional version() { - return version; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerListServer withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - - public GetServerListServer withName(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public GetServerListServer withHost(String host) { - Utils.checkNotNull(host, "host"); - this.host = Optional.ofNullable(host); - return this; - } - - - public GetServerListServer withHost(Optional host) { - Utils.checkNotNull(host, "host"); - this.host = host; - return this; - } - - public GetServerListServer withAddress(String address) { - Utils.checkNotNull(address, "address"); - this.address = Optional.ofNullable(address); - return this; - } - - - public GetServerListServer withAddress(Optional address) { - Utils.checkNotNull(address, "address"); - this.address = address; - return this; - } - - public GetServerListServer withPort(double port) { - Utils.checkNotNull(port, "port"); - this.port = Optional.ofNullable(port); - return this; - } - - - public GetServerListServer withPort(Optional port) { - Utils.checkNotNull(port, "port"); - this.port = port; - return this; - } - - public GetServerListServer withMachineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = Optional.ofNullable(machineIdentifier); - return this; - } - - - public GetServerListServer withMachineIdentifier(Optional machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - public GetServerListServer withVersion(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - - public GetServerListServer withVersion(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerListServer other = (GetServerListServer) o; - return - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.host, other.host) && - Utils.enhancedDeepEquals(this.address, other.address) && - Utils.enhancedDeepEquals(this.port, other.port) && - Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && - Utils.enhancedDeepEquals(this.version, other.version); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - name, host, address, - port, machineIdentifier, version); - } - - @Override - public String toString() { - return Utils.toString(GetServerListServer.class, - "name", name, - "host", host, - "address", address, - "port", port, - "machineIdentifier", machineIdentifier, - "version", version); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional name = Optional.empty(); - - private Optional host = Optional.empty(); - - private Optional address = Optional.empty(); - - private Optional port = Optional.empty(); - - private Optional machineIdentifier = Optional.empty(); - - private Optional version = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder name(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - public Builder name(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder host(String host) { - Utils.checkNotNull(host, "host"); - this.host = Optional.ofNullable(host); - return this; - } - - public Builder host(Optional host) { - Utils.checkNotNull(host, "host"); - this.host = host; - return this; - } - - - public Builder address(String address) { - Utils.checkNotNull(address, "address"); - this.address = Optional.ofNullable(address); - return this; - } - - public Builder address(Optional address) { - Utils.checkNotNull(address, "address"); - this.address = address; - return this; - } - - - public Builder port(double port) { - Utils.checkNotNull(port, "port"); - this.port = Optional.ofNullable(port); - return this; - } - - public Builder port(Optional port) { - Utils.checkNotNull(port, "port"); - this.port = port; - return this; - } - - - public Builder machineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = Optional.ofNullable(machineIdentifier); - return this; - } - - public Builder machineIdentifier(Optional machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - - public Builder version(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - public Builder version(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - public GetServerListServer build() { - - return new GetServerListServer( - name, host, address, - port, machineIdentifier, version); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesMediaContainer.java deleted file mode 100644 index 9de4bf8c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetServerPreferencesMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Setting") - private Optional> setting; - - @JsonCreator - public GetServerPreferencesMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Setting") Optional> setting) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(setting, "setting"); - this.size = size; - this.setting = setting; - } - - public GetServerPreferencesMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> setting() { - return (Optional>) setting; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerPreferencesMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetServerPreferencesMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetServerPreferencesMediaContainer withSetting(List setting) { - Utils.checkNotNull(setting, "setting"); - this.setting = Optional.ofNullable(setting); - return this; - } - - - public GetServerPreferencesMediaContainer withSetting(Optional> setting) { - Utils.checkNotNull(setting, "setting"); - this.setting = setting; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerPreferencesMediaContainer other = (GetServerPreferencesMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.setting, other.setting); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, setting); - } - - @Override - public String toString() { - return Utils.toString(GetServerPreferencesMediaContainer.class, - "size", size, - "setting", setting); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> setting = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 setting(List setting) { - Utils.checkNotNull(setting, "setting"); - this.setting = Optional.ofNullable(setting); - return this; - } - - public Builder setting(Optional> setting) { - Utils.checkNotNull(setting, "setting"); - this.setting = setting; - return this; - } - - public GetServerPreferencesMediaContainer build() { - - return new GetServerPreferencesMediaContainer( - size, setting); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesRequestBuilder.java deleted file mode 100644 index d696239e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerPreferences; -import java.lang.Exception; - -public class GetServerPreferencesRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetServerPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetServerPreferencesResponse call() throws Exception { - - RequestlessOperation operation - = new GetServerPreferences.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesResponse.java deleted file mode 100644 index 96863b4e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetServerPreferencesResponse 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; - - /** - * Server Preferences - */ - private Optional object; - - @JsonCreator - public GetServerPreferencesResponse( - 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 GetServerPreferencesResponse( - 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; - } - - /** - * Server Preferences - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerPreferencesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerPreferencesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerPreferencesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Server Preferences - */ - public GetServerPreferencesResponse withObject(GetServerPreferencesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Server Preferences - */ - public GetServerPreferencesResponse 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; - } - GetServerPreferencesResponse other = (GetServerPreferencesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetServerPreferencesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Server Preferences - */ - public Builder object(GetServerPreferencesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Server Preferences - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetServerPreferencesResponse build() { - - return new GetServerPreferencesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesResponseBody.java deleted file mode 100644 index 6e68be18..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerPreferencesResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetServerPreferencesResponseBody - * - *

Server Preferences - */ -public class GetServerPreferencesResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetServerPreferencesResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetServerPreferencesResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetServerPreferencesResponseBody withMediaContainer(GetServerPreferencesMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetServerPreferencesResponseBody 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; - } - GetServerPreferencesResponseBody other = (GetServerPreferencesResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetServerPreferencesResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetServerPreferencesMediaContainer 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 GetServerPreferencesResponseBody build() { - - return new GetServerPreferencesResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java deleted file mode 100644 index 6029dd35..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -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.Optional; - - -public class GetServerResourcesRequest { - /** - * Include Https entries in the results - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeHttps") - private Optional includeHttps; - - /** - * Include Relay addresses in the results - * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeRelay") - private Optional includeRelay; - - /** - * Include IPv6 entries in the results - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeIPv6") - private Optional includeIPv6; - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") - private String clientID; - - @JsonCreator - public GetServerResourcesRequest( - Optional includeHttps, - Optional includeRelay, - Optional includeIPv6, - String clientID) { - Utils.checkNotNull(includeHttps, "includeHttps"); - Utils.checkNotNull(includeRelay, "includeRelay"); - Utils.checkNotNull(includeIPv6, "includeIPv6"); - Utils.checkNotNull(clientID, "clientID"); - this.includeHttps = includeHttps; - this.includeRelay = includeRelay; - this.includeIPv6 = includeIPv6; - this.clientID = clientID; - } - - public GetServerResourcesRequest( - String clientID) { - this(Optional.empty(), Optional.empty(), Optional.empty(), - clientID); - } - - /** - * Include Https entries in the results - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeHttps() { - return (Optional) includeHttps; - } - - /** - * Include Relay addresses in the results - * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeRelay() { - return (Optional) includeRelay; - } - - /** - * Include IPv6 entries in the results - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeIPv6() { - return (Optional) includeIPv6; - } - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @JsonIgnore - public String clientID() { - return clientID; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Include Https entries in the results - */ - public GetServerResourcesRequest withIncludeHttps(IncludeHttps includeHttps) { - Utils.checkNotNull(includeHttps, "includeHttps"); - this.includeHttps = Optional.ofNullable(includeHttps); - return this; - } - - - /** - * Include Https entries in the results - */ - public GetServerResourcesRequest withIncludeHttps(Optional includeHttps) { - Utils.checkNotNull(includeHttps, "includeHttps"); - this.includeHttps = includeHttps; - return this; - } - - /** - * Include Relay addresses in the results - * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - */ - public GetServerResourcesRequest withIncludeRelay(IncludeRelay includeRelay) { - Utils.checkNotNull(includeRelay, "includeRelay"); - this.includeRelay = Optional.ofNullable(includeRelay); - return this; - } - - - /** - * Include Relay addresses in the results - * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - */ - public GetServerResourcesRequest withIncludeRelay(Optional includeRelay) { - Utils.checkNotNull(includeRelay, "includeRelay"); - this.includeRelay = includeRelay; - return this; - } - - /** - * Include IPv6 entries in the results - */ - public GetServerResourcesRequest withIncludeIPv6(IncludeIPv6 includeIPv6) { - Utils.checkNotNull(includeIPv6, "includeIPv6"); - this.includeIPv6 = Optional.ofNullable(includeIPv6); - return this; - } - - - /** - * Include IPv6 entries in the results - */ - public GetServerResourcesRequest withIncludeIPv6(Optional includeIPv6) { - Utils.checkNotNull(includeIPv6, "includeIPv6"); - this.includeIPv6 = includeIPv6; - return this; - } - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public GetServerResourcesRequest withClientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerResourcesRequest other = (GetServerResourcesRequest) o; - return - Utils.enhancedDeepEquals(this.includeHttps, other.includeHttps) && - Utils.enhancedDeepEquals(this.includeRelay, other.includeRelay) && - Utils.enhancedDeepEquals(this.includeIPv6, other.includeIPv6) && - Utils.enhancedDeepEquals(this.clientID, other.clientID); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - includeHttps, includeRelay, includeIPv6, - clientID); - } - - @Override - public String toString() { - return Utils.toString(GetServerResourcesRequest.class, - "includeHttps", includeHttps, - "includeRelay", includeRelay, - "includeIPv6", includeIPv6, - "clientID", clientID); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional includeHttps; - - private Optional includeRelay; - - private Optional includeIPv6; - - private String clientID; - - private Builder() { - // force use of static builder() method - } - - - /** - * Include Https entries in the results - */ - public Builder includeHttps(IncludeHttps includeHttps) { - Utils.checkNotNull(includeHttps, "includeHttps"); - this.includeHttps = Optional.ofNullable(includeHttps); - return this; - } - - /** - * Include Https entries in the results - */ - public Builder includeHttps(Optional includeHttps) { - Utils.checkNotNull(includeHttps, "includeHttps"); - this.includeHttps = includeHttps; - return this; - } - - - /** - * Include Relay addresses in the results - * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - */ - public Builder includeRelay(IncludeRelay includeRelay) { - Utils.checkNotNull(includeRelay, "includeRelay"); - this.includeRelay = Optional.ofNullable(includeRelay); - return this; - } - - /** - * Include Relay addresses in the results - * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - */ - public Builder includeRelay(Optional includeRelay) { - Utils.checkNotNull(includeRelay, "includeRelay"); - this.includeRelay = includeRelay; - return this; - } - - - /** - * Include IPv6 entries in the results - */ - public Builder includeIPv6(IncludeIPv6 includeIPv6) { - Utils.checkNotNull(includeIPv6, "includeIPv6"); - this.includeIPv6 = Optional.ofNullable(includeIPv6); - return this; - } - - /** - * Include IPv6 entries in the results - */ - public Builder includeIPv6(Optional includeIPv6) { - Utils.checkNotNull(includeIPv6, "includeIPv6"); - this.includeIPv6 = includeIPv6; - return this; - } - - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public Builder clientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - public GetServerResourcesRequest build() { - if (includeHttps == null) { - includeHttps = _SINGLETON_VALUE_IncludeHttps.value(); - } - if (includeRelay == null) { - includeRelay = _SINGLETON_VALUE_IncludeRelay.value(); - } - if (includeIPv6 == null) { - includeIPv6 = _SINGLETON_VALUE_IncludeIPv6.value(); - } - - return new GetServerResourcesRequest( - includeHttps, includeRelay, includeIPv6, - clientID); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeHttps = - new LazySingletonValue<>( - "includeHttps", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeRelay = - new LazySingletonValue<>( - "includeRelay", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeIPv6 = - new LazySingletonValue<>( - "includeIPv6", - "0", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java deleted file mode 100644 index fec7f415..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerResources; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetServerResourcesRequestBuilder { - - private Optional includeHttps = Utils.readDefaultOrConstValue( - "includeHttps", - "0", - new TypeReference>() {}); - private Optional includeRelay = Utils.readDefaultOrConstValue( - "includeRelay", - "0", - new TypeReference>() {}); - private Optional includeIPv6 = Utils.readDefaultOrConstValue( - "includeIPv6", - "0", - new TypeReference>() {}); - private String clientID; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetServerResourcesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetServerResourcesRequestBuilder includeHttps(IncludeHttps includeHttps) { - Utils.checkNotNull(includeHttps, "includeHttps"); - this.includeHttps = Optional.of(includeHttps); - return this; - } - - public GetServerResourcesRequestBuilder includeHttps(Optional includeHttps) { - Utils.checkNotNull(includeHttps, "includeHttps"); - this.includeHttps = includeHttps; - return this; - } - - public GetServerResourcesRequestBuilder includeRelay(IncludeRelay includeRelay) { - Utils.checkNotNull(includeRelay, "includeRelay"); - this.includeRelay = Optional.of(includeRelay); - return this; - } - - public GetServerResourcesRequestBuilder includeRelay(Optional includeRelay) { - Utils.checkNotNull(includeRelay, "includeRelay"); - this.includeRelay = includeRelay; - return this; - } - - public GetServerResourcesRequestBuilder includeIPv6(IncludeIPv6 includeIPv6) { - Utils.checkNotNull(includeIPv6, "includeIPv6"); - this.includeIPv6 = Optional.of(includeIPv6); - return this; - } - - public GetServerResourcesRequestBuilder includeIPv6(Optional includeIPv6) { - Utils.checkNotNull(includeIPv6, "includeIPv6"); - this.includeIPv6 = includeIPv6; - return this; - } - - public GetServerResourcesRequestBuilder clientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - public GetServerResourcesRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetServerResourcesRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - - private GetServerResourcesRequest buildRequest() { - if (includeHttps == null) { - includeHttps = _SINGLETON_VALUE_IncludeHttps.value(); - } - if (includeRelay == null) { - includeRelay = _SINGLETON_VALUE_IncludeRelay.value(); - } - if (includeIPv6 == null) { - includeIPv6 = _SINGLETON_VALUE_IncludeIPv6.value(); - } - - GetServerResourcesRequest request = new GetServerResourcesRequest(includeHttps, - includeRelay, - includeIPv6, - clientID); - - return request; - } - - public GetServerResourcesResponse call() throws Exception { - - RequestOperation operation - = new GetServerResources.Sync(sdkConfiguration, serverURL); - GetServerResourcesRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeHttps = - new LazySingletonValue<>( - "includeHttps", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeRelay = - new LazySingletonValue<>( - "includeRelay", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeIPv6 = - new LazySingletonValue<>( - "includeIPv6", - "0", - new TypeReference>() {}); -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesResponse.java deleted file mode 100644 index 4c961f17..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.List; -import java.util.Optional; - - -public class GetServerResourcesResponse 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; - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - private Optional> plexDevices; - - @JsonCreator - public GetServerResourcesResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional> plexDevices) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(plexDevices, "plexDevices"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.plexDevices = plexDevices; - } - - public GetServerResourcesResponse( - 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; - } - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> plexDevices() { - return (Optional>) plexDevices; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerResourcesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerResourcesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerResourcesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - public GetServerResourcesResponse withPlexDevices(List plexDevices) { - Utils.checkNotNull(plexDevices, "plexDevices"); - this.plexDevices = Optional.ofNullable(plexDevices); - return this; - } - - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - public GetServerResourcesResponse withPlexDevices(Optional> plexDevices) { - Utils.checkNotNull(plexDevices, "plexDevices"); - this.plexDevices = plexDevices; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerResourcesResponse other = (GetServerResourcesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.plexDevices, other.plexDevices); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - plexDevices); - } - - @Override - public String toString() { - return Utils.toString(GetServerResourcesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "plexDevices", plexDevices); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional> plexDevices = 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; - } - - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - public Builder plexDevices(List plexDevices) { - Utils.checkNotNull(plexDevices, "plexDevices"); - this.plexDevices = Optional.ofNullable(plexDevices); - return this; - } - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - public Builder plexDevices(Optional> plexDevices) { - Utils.checkNotNull(plexDevices, "plexDevices"); - this.plexDevices = plexDevices; - return this; - } - - public GetServerResourcesResponse build() { - - return new GetServerResourcesResponse( - contentType, statusCode, rawResponse, - plexDevices); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryMediaContainer.java deleted file mode 100644 index 3639765c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetSessionHistoryMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetSessionHistoryMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.metadata = metadata; - } - - public GetSessionHistoryMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionHistoryMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetSessionHistoryMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetSessionHistoryMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetSessionHistoryMediaContainer 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; - } - GetSessionHistoryMediaContainer other = (GetSessionHistoryMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, metadata); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryMediaContainer.class, - "size", size, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 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 GetSessionHistoryMediaContainer build() { - - return new GetSessionHistoryMediaContainer( - size, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryMetadata.java deleted file mode 100644 index b1240424..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryMetadata.java +++ /dev/null @@ -1,905 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.time.LocalDate; -import java.util.Optional; - - -public class GetSessionHistoryMetadata { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("historyKey") - private Optional historyKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingKey") - private Optional ratingKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentKey") - private Optional grandparentKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTitle") - private Optional grandparentTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentThumb") - private Optional grandparentThumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentArt") - private Optional grandparentArt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originallyAvailableAt") - private Optional originallyAvailableAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewedAt") - private Optional viewedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("accountID") - private Optional accountID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("deviceID") - private Optional deviceID; - - @JsonCreator - public GetSessionHistoryMetadata( - @JsonProperty("historyKey") Optional historyKey, - @JsonProperty("key") Optional key, - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("grandparentKey") Optional grandparentKey, - @JsonProperty("title") Optional title, - @JsonProperty("grandparentTitle") Optional grandparentTitle, - @JsonProperty("type") Optional type, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("grandparentThumb") Optional grandparentThumb, - @JsonProperty("grandparentArt") Optional grandparentArt, - @JsonProperty("index") Optional index, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, - @JsonProperty("viewedAt") Optional viewedAt, - @JsonProperty("accountID") Optional accountID, - @JsonProperty("deviceID") Optional deviceID) { - Utils.checkNotNull(historyKey, "historyKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(grandparentKey, "grandparentKey"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - Utils.checkNotNull(grandparentArt, "grandparentArt"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - Utils.checkNotNull(viewedAt, "viewedAt"); - Utils.checkNotNull(accountID, "accountID"); - Utils.checkNotNull(deviceID, "deviceID"); - this.historyKey = historyKey; - this.key = key; - this.ratingKey = ratingKey; - this.librarySectionID = librarySectionID; - this.parentKey = parentKey; - this.grandparentKey = grandparentKey; - this.title = title; - this.grandparentTitle = grandparentTitle; - this.type = type; - this.thumb = thumb; - this.parentThumb = parentThumb; - this.grandparentThumb = grandparentThumb; - this.grandparentArt = grandparentArt; - this.index = index; - this.parentIndex = parentIndex; - this.originallyAvailableAt = originallyAvailableAt; - this.viewedAt = viewedAt; - this.accountID = accountID; - this.deviceID = deviceID; - } - - public GetSessionHistoryMetadata() { - 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()); - } - - @JsonIgnore - public Optional historyKey() { - return historyKey; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - @JsonIgnore - public Optional grandparentKey() { - return grandparentKey; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional grandparentTitle() { - return grandparentTitle; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - @JsonIgnore - public Optional grandparentThumb() { - return grandparentThumb; - } - - @JsonIgnore - public Optional grandparentArt() { - return grandparentArt; - } - - @JsonIgnore - public Optional index() { - return index; - } - - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - @JsonIgnore - public Optional originallyAvailableAt() { - return originallyAvailableAt; - } - - @JsonIgnore - public Optional viewedAt() { - return viewedAt; - } - - @JsonIgnore - public Optional accountID() { - return accountID; - } - - @JsonIgnore - public Optional deviceID() { - return deviceID; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionHistoryMetadata withHistoryKey(String historyKey) { - Utils.checkNotNull(historyKey, "historyKey"); - this.historyKey = Optional.ofNullable(historyKey); - return this; - } - - - public GetSessionHistoryMetadata withHistoryKey(Optional historyKey) { - Utils.checkNotNull(historyKey, "historyKey"); - this.historyKey = historyKey; - return this; - } - - public GetSessionHistoryMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetSessionHistoryMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetSessionHistoryMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetSessionHistoryMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetSessionHistoryMetadata withLibrarySectionID(String librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - public GetSessionHistoryMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetSessionHistoryMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - - public GetSessionHistoryMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - public GetSessionHistoryMetadata withGrandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - - public GetSessionHistoryMetadata withGrandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - public GetSessionHistoryMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetSessionHistoryMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetSessionHistoryMetadata withGrandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - - public GetSessionHistoryMetadata withGrandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - public GetSessionHistoryMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetSessionHistoryMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetSessionHistoryMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetSessionHistoryMetadata withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetSessionHistoryMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - - public GetSessionHistoryMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - public GetSessionHistoryMetadata withGrandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - - public GetSessionHistoryMetadata withGrandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - public GetSessionHistoryMetadata withGrandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - - public GetSessionHistoryMetadata withGrandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - public GetSessionHistoryMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - - public GetSessionHistoryMetadata withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public GetSessionHistoryMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - - public GetSessionHistoryMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - public GetSessionHistoryMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - - public GetSessionHistoryMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - public GetSessionHistoryMetadata withViewedAt(int viewedAt) { - Utils.checkNotNull(viewedAt, "viewedAt"); - this.viewedAt = Optional.ofNullable(viewedAt); - return this; - } - - - public GetSessionHistoryMetadata withViewedAt(Optional viewedAt) { - Utils.checkNotNull(viewedAt, "viewedAt"); - this.viewedAt = viewedAt; - return this; - } - - public GetSessionHistoryMetadata withAccountID(int accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = Optional.ofNullable(accountID); - return this; - } - - - public GetSessionHistoryMetadata withAccountID(Optional accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = accountID; - return this; - } - - public GetSessionHistoryMetadata withDeviceID(int deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = Optional.ofNullable(deviceID); - return this; - } - - - public GetSessionHistoryMetadata withDeviceID(Optional deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = deviceID; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionHistoryMetadata other = (GetSessionHistoryMetadata) o; - return - Utils.enhancedDeepEquals(this.historyKey, other.historyKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && - Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && - Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && - Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.viewedAt, other.viewedAt) && - Utils.enhancedDeepEquals(this.accountID, other.accountID) && - Utils.enhancedDeepEquals(this.deviceID, other.deviceID); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - historyKey, key, ratingKey, - librarySectionID, parentKey, grandparentKey, - title, grandparentTitle, type, - thumb, parentThumb, grandparentThumb, - grandparentArt, index, parentIndex, - originallyAvailableAt, viewedAt, accountID, - deviceID); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryMetadata.class, - "historyKey", historyKey, - "key", key, - "ratingKey", ratingKey, - "librarySectionID", librarySectionID, - "parentKey", parentKey, - "grandparentKey", grandparentKey, - "title", title, - "grandparentTitle", grandparentTitle, - "type", type, - "thumb", thumb, - "parentThumb", parentThumb, - "grandparentThumb", grandparentThumb, - "grandparentArt", grandparentArt, - "index", index, - "parentIndex", parentIndex, - "originallyAvailableAt", originallyAvailableAt, - "viewedAt", viewedAt, - "accountID", accountID, - "deviceID", deviceID); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional historyKey = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional ratingKey = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional grandparentKey = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional grandparentTitle = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional parentThumb = Optional.empty(); - - private Optional grandparentThumb = Optional.empty(); - - private Optional grandparentArt = Optional.empty(); - - private Optional index = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional originallyAvailableAt = Optional.empty(); - - private Optional viewedAt = Optional.empty(); - - private Optional accountID = Optional.empty(); - - private Optional deviceID = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder historyKey(String historyKey) { - Utils.checkNotNull(historyKey, "historyKey"); - this.historyKey = Optional.ofNullable(historyKey); - return this; - } - - public Builder historyKey(Optional historyKey) { - Utils.checkNotNull(historyKey, "historyKey"); - this.historyKey = historyKey; - 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 ratingKey(String 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 librarySectionID(String 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 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 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 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 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 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 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 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 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 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 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 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 originallyAvailableAt(LocalDate 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 viewedAt(int viewedAt) { - Utils.checkNotNull(viewedAt, "viewedAt"); - this.viewedAt = Optional.ofNullable(viewedAt); - return this; - } - - public Builder viewedAt(Optional viewedAt) { - Utils.checkNotNull(viewedAt, "viewedAt"); - this.viewedAt = viewedAt; - return this; - } - - - public Builder accountID(int accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = Optional.ofNullable(accountID); - return this; - } - - public Builder accountID(Optional accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = accountID; - return this; - } - - - public Builder deviceID(int deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = Optional.ofNullable(deviceID); - return this; - } - - public Builder deviceID(Optional deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = deviceID; - return this; - } - - public GetSessionHistoryMetadata build() { - - return new GetSessionHistoryMetadata( - historyKey, key, ratingKey, - librarySectionID, parentKey, grandparentKey, - title, grandparentTitle, type, - thumb, parentThumb, grandparentThumb, - grandparentArt, index, parentIndex, - originallyAvailableAt, viewedAt, accountID, - deviceID); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryRequest.java deleted file mode 100644 index ed94c8da..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryRequest.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetSessionHistoryRequest { - /** - * Sorts the results by the specified field followed by the direction (asc, desc) - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sort") - private Optional sort; - - /** - * Filter results by those that are related to a specific users id - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=accountId") - private Optional accountId; - - /** - * Filters content by field and direction/equality - * (Unknown if viewedAt is the only supported column) - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=filter") - private Optional filter; - - /** - * Filters the results based on the id of a valid library section - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=librarySectionID") - private Optional librarySectionID; - - @JsonCreator - public GetSessionHistoryRequest( - Optional sort, - Optional accountId, - Optional filter, - Optional librarySectionID) { - Utils.checkNotNull(sort, "sort"); - Utils.checkNotNull(accountId, "accountId"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.sort = sort; - this.accountId = accountId; - this.filter = filter; - this.librarySectionID = librarySectionID; - } - - public GetSessionHistoryRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Sorts the results by the specified field followed by the direction (asc, desc) - */ - @JsonIgnore - public Optional sort() { - return sort; - } - - /** - * Filter results by those that are related to a specific users id - */ - @JsonIgnore - public Optional accountId() { - return accountId; - } - - /** - * Filters content by field and direction/equality - * (Unknown if viewedAt is the only supported column) - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional filter() { - return (Optional) filter; - } - - /** - * Filters the results based on the id of a valid library section - */ - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Sorts the results by the specified field followed by the direction (asc, desc) - */ - public GetSessionHistoryRequest withSort(String sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - - /** - * Sorts the results by the specified field followed by the direction (asc, desc) - */ - public GetSessionHistoryRequest withSort(Optional sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - /** - * Filter results by those that are related to a specific users id - */ - public GetSessionHistoryRequest withAccountId(long accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.ofNullable(accountId); - return this; - } - - - /** - * Filter results by those that are related to a specific users id - */ - public GetSessionHistoryRequest withAccountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - /** - * Filters content by field and direction/equality - * (Unknown if viewedAt is the only supported column) - */ - public GetSessionHistoryRequest withFilter(QueryParamFilter filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - - /** - * Filters content by field and direction/equality - * (Unknown if viewedAt is the only supported column) - */ - public GetSessionHistoryRequest withFilter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * Filters the results based on the id of a valid library section - */ - public GetSessionHistoryRequest withLibrarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - /** - * Filters the results based on the id of a valid library section - */ - public GetSessionHistoryRequest withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionHistoryRequest other = (GetSessionHistoryRequest) o; - return - Utils.enhancedDeepEquals(this.sort, other.sort) && - Utils.enhancedDeepEquals(this.accountId, other.accountId) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - sort, accountId, filter, - librarySectionID); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryRequest.class, - "sort", sort, - "accountId", accountId, - "filter", filter, - "librarySectionID", librarySectionID); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional sort = Optional.empty(); - - private Optional accountId = Optional.empty(); - - private Optional filter = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Sorts the results by the specified field followed by the direction (asc, desc) - */ - public Builder sort(String sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - /** - * Sorts the results by the specified field followed by the direction (asc, desc) - */ - public Builder sort(Optional sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - - /** - * Filter results by those that are related to a specific users id - */ - public Builder accountId(long accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.ofNullable(accountId); - return this; - } - - /** - * Filter results by those that are related to a specific users id - */ - public Builder accountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - - /** - * Filters content by field and direction/equality - * (Unknown if viewedAt is the only supported column) - */ - public Builder filter(QueryParamFilter filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - /** - * Filters content by field and direction/equality - * (Unknown if viewedAt is the only supported column) - */ - public Builder filter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * Filters the results based on the id of a valid library section - */ - public Builder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - /** - * Filters the results based on the id of a valid library section - */ - public Builder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetSessionHistoryRequest build() { - - return new GetSessionHistoryRequest( - sort, accountId, filter, - librarySectionID); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryRequestBuilder.java deleted file mode 100644 index 8f1e1def..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryRequestBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetSessionHistory; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.lang.String; -import java.util.Optional; - -public class GetSessionHistoryRequestBuilder { - - private Optional sort = Optional.empty(); - private Optional accountId = Optional.empty(); - private Optional filter = Optional.empty(); - private Optional librarySectionID = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetSessionHistoryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetSessionHistoryRequestBuilder sort(String sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.of(sort); - return this; - } - - public GetSessionHistoryRequestBuilder sort(Optional sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - public GetSessionHistoryRequestBuilder accountId(long accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.of(accountId); - return this; - } - - public GetSessionHistoryRequestBuilder accountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - public GetSessionHistoryRequestBuilder filter(QueryParamFilter filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.of(filter); - return this; - } - - public GetSessionHistoryRequestBuilder filter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetSessionHistoryRequestBuilder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.of(librarySectionID); - return this; - } - - public GetSessionHistoryRequestBuilder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - private GetSessionHistoryRequest buildRequest() { - - GetSessionHistoryRequest request = new GetSessionHistoryRequest(sort, - accountId, - filter, - librarySectionID); - - return request; - } - - public GetSessionHistoryResponse call() throws Exception { - - RequestOperation operation - = new GetSessionHistory.Sync(sdkConfiguration); - GetSessionHistoryRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryResponse.java deleted file mode 100644 index 27beafaf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetSessionHistoryResponse 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; - - /** - * List of Plex Sessions - */ - private Optional object; - - @JsonCreator - public GetSessionHistoryResponse( - 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 GetSessionHistoryResponse( - 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; - } - - /** - * List of Plex Sessions - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetSessionHistoryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetSessionHistoryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionHistoryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * List of Plex Sessions - */ - public GetSessionHistoryResponse withObject(GetSessionHistoryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * List of Plex Sessions - */ - public GetSessionHistoryResponse 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; - } - GetSessionHistoryResponse other = (GetSessionHistoryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * List of Plex Sessions - */ - public Builder object(GetSessionHistoryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * List of Plex Sessions - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetSessionHistoryResponse build() { - - return new GetSessionHistoryResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryResponseBody.java deleted file mode 100644 index db9d3838..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionHistoryResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetSessionHistoryResponseBody - * - *

List of Plex Sessions - */ -public class GetSessionHistoryResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetSessionHistoryResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetSessionHistoryResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionHistoryResponseBody withMediaContainer(GetSessionHistoryMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetSessionHistoryResponseBody 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; - } - GetSessionHistoryResponseBody other = (GetSessionHistoryResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetSessionHistoryMediaContainer 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 GetSessionHistoryResponseBody build() { - - return new GetSessionHistoryResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexRequest.java new file mode 100644 index 00000000..424bf1b6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexRequest.java @@ -0,0 +1,823 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetSessionPlaylistIndexRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The session id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sessionId") + private String sessionId; + + /** + * The consumer id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=consumerId") + private String consumerId; + + @JsonCreator + public GetSessionPlaylistIndexRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String sessionId, + String consumerId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sessionId, "sessionId"); + Utils.checkNotNull(consumerId, "consumerId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sessionId = sessionId; + this.consumerId = consumerId; + } + + public GetSessionPlaylistIndexRequest( + String sessionId, + String consumerId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sessionId, + consumerId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The session id + */ + @JsonIgnore + public String sessionId() { + return sessionId; + } + + /** + * The consumer id + */ + @JsonIgnore + public String consumerId() { + return consumerId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSessionPlaylistIndexRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSessionPlaylistIndexRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSessionPlaylistIndexRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSessionPlaylistIndexRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSessionPlaylistIndexRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSessionPlaylistIndexRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSessionPlaylistIndexRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSessionPlaylistIndexRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSessionPlaylistIndexRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSessionPlaylistIndexRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSessionPlaylistIndexRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSessionPlaylistIndexRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSessionPlaylistIndexRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSessionPlaylistIndexRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSessionPlaylistIndexRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSessionPlaylistIndexRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSessionPlaylistIndexRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSessionPlaylistIndexRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSessionPlaylistIndexRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSessionPlaylistIndexRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSessionPlaylistIndexRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSessionPlaylistIndexRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The session id + */ + public GetSessionPlaylistIndexRequest withSessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + /** + * The consumer id + */ + public GetSessionPlaylistIndexRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionPlaylistIndexRequest other = (GetSessionPlaylistIndexRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sessionId, other.sessionId) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sessionId, + consumerId); + } + + @Override + public String toString() { + return Utils.toString(GetSessionPlaylistIndexRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sessionId", sessionId, + "consumerId", consumerId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String sessionId; + + private String consumerId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The session id + */ + public Builder sessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + + /** + * The consumer id + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + public GetSessionPlaylistIndexRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSessionPlaylistIndexRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sessionId, + consumerId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexRequestBuilder.java new file mode 100644 index 00000000..3ec3a022 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSessionPlaylistIndex; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetSessionPlaylistIndexRequestBuilder { + + private GetSessionPlaylistIndexRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSessionPlaylistIndexRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSessionPlaylistIndexRequestBuilder request(GetSessionPlaylistIndexRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSessionPlaylistIndexResponse call() throws Exception { + + RequestOperation operation + = new GetSessionPlaylistIndex.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexResponse.java new file mode 100644 index 00000000..5462b2ae --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionPlaylistIndexResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetSessionPlaylistIndexResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetSessionPlaylistIndexResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSessionPlaylistIndexResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSessionPlaylistIndexResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSessionPlaylistIndexResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionPlaylistIndexResponse other = (GetSessionPlaylistIndexResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSessionPlaylistIndexResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetSessionPlaylistIndexResponse build() { + + return new GetSessionPlaylistIndexResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentRequest.java new file mode 100644 index 00000000..00ba6e36 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentRequest.java @@ -0,0 +1,864 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetSessionSegmentRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The session id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sessionId") + private String sessionId; + + /** + * The consumer id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=consumerId") + private String consumerId; + + /** + * The segment id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=segmentId") + private String segmentId; + + @JsonCreator + public GetSessionSegmentRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String sessionId, + String consumerId, + String segmentId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sessionId, "sessionId"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(segmentId, "segmentId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sessionId = sessionId; + this.consumerId = consumerId; + this.segmentId = segmentId; + } + + public GetSessionSegmentRequest( + String sessionId, + String consumerId, + String segmentId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sessionId, + consumerId, segmentId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The session id + */ + @JsonIgnore + public String sessionId() { + return sessionId; + } + + /** + * The consumer id + */ + @JsonIgnore + public String consumerId() { + return consumerId; + } + + /** + * The segment id + */ + @JsonIgnore + public String segmentId() { + return segmentId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSessionSegmentRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSessionSegmentRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSessionSegmentRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSessionSegmentRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSessionSegmentRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSessionSegmentRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSessionSegmentRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSessionSegmentRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSessionSegmentRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSessionSegmentRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSessionSegmentRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSessionSegmentRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSessionSegmentRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSessionSegmentRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSessionSegmentRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSessionSegmentRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSessionSegmentRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSessionSegmentRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSessionSegmentRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSessionSegmentRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSessionSegmentRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSessionSegmentRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The session id + */ + public GetSessionSegmentRequest withSessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + /** + * The consumer id + */ + public GetSessionSegmentRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The segment id + */ + public GetSessionSegmentRequest withSegmentId(String segmentId) { + Utils.checkNotNull(segmentId, "segmentId"); + this.segmentId = segmentId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionSegmentRequest other = (GetSessionSegmentRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sessionId, other.sessionId) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.segmentId, other.segmentId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sessionId, + consumerId, segmentId); + } + + @Override + public String toString() { + return Utils.toString(GetSessionSegmentRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sessionId", sessionId, + "consumerId", consumerId, + "segmentId", segmentId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String sessionId; + + private String consumerId; + + private String segmentId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The session id + */ + public Builder sessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + + /** + * The consumer id + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The segment id + */ + public Builder segmentId(String segmentId) { + Utils.checkNotNull(segmentId, "segmentId"); + this.segmentId = segmentId; + return this; + } + + public GetSessionSegmentRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSessionSegmentRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sessionId, + consumerId, segmentId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentRequestBuilder.java new file mode 100644 index 00000000..90942fda --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSessionSegment; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetSessionSegmentRequestBuilder { + + private GetSessionSegmentRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSessionSegmentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSessionSegmentRequestBuilder request(GetSessionSegmentRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSessionSegmentResponse call() throws Exception { + + RequestOperation operation + = new GetSessionSegment.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentResponse.java new file mode 100644 index 00000000..304e7eab --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionSegmentResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetSessionSegmentResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetSessionSegmentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSessionSegmentResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSessionSegmentResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSessionSegmentResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionSegmentResponse other = (GetSessionSegmentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSessionSegmentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetSessionSegmentResponse build() { + + return new GetSessionSegmentResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMedia.java deleted file mode 100644 index 74818cbf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMedia.java +++ /dev/null @@ -1,423 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetSessionsMedia { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannels") - private Optional audioChannels; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioCodec") - private Optional audioCodec; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("selected") - private Optional selected; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Part") - private Optional> part; - - @JsonCreator - public GetSessionsMedia( - @JsonProperty("audioChannels") Optional audioChannels, - @JsonProperty("audioCodec") Optional audioCodec, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("container") Optional container, - @JsonProperty("duration") Optional duration, - @JsonProperty("id") Optional id, - @JsonProperty("selected") Optional selected, - @JsonProperty("Part") Optional> part) { - Utils.checkNotNull(audioChannels, "audioChannels"); - Utils.checkNotNull(audioCodec, "audioCodec"); - Utils.checkNotNull(bitrate, "bitrate"); - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(selected, "selected"); - Utils.checkNotNull(part, "part"); - this.audioChannels = audioChannels; - this.audioCodec = audioCodec; - this.bitrate = bitrate; - this.container = container; - this.duration = duration; - this.id = id; - this.selected = selected; - this.part = part; - } - - public GetSessionsMedia() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional audioChannels() { - return audioChannels; - } - - @JsonIgnore - public Optional audioCodec() { - return audioCodec; - } - - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - @JsonIgnore - public Optional container() { - return container; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional selected() { - return selected; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> part() { - return (Optional>) part; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsMedia withAudioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - - public GetSessionsMedia withAudioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - public GetSessionsMedia withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - - public GetSessionsMedia withAudioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - public GetSessionsMedia withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - public GetSessionsMedia withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - public GetSessionsMedia withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - public GetSessionsMedia withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - public GetSessionsMedia withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetSessionsMedia withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetSessionsMedia withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetSessionsMedia withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetSessionsMedia withSelected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - - public GetSessionsMedia withSelected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - public GetSessionsMedia withPart(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - - public GetSessionsMedia 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; - } - GetSessionsMedia other = (GetSessionsMedia) o; - return - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.selected, other.selected) && - Utils.enhancedDeepEquals(this.part, other.part); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - audioChannels, audioCodec, bitrate, - container, duration, id, - selected, part); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsMedia.class, - "audioChannels", audioChannels, - "audioCodec", audioCodec, - "bitrate", bitrate, - "container", container, - "duration", duration, - "id", id, - "selected", selected, - "part", part); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional audioChannels = Optional.empty(); - - private Optional audioCodec = Optional.empty(); - - private Optional bitrate = Optional.empty(); - - private Optional container = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional selected = Optional.empty(); - - private Optional> part = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder audioChannels(int 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 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 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 duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - public Builder id(String 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 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 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 GetSessionsMedia build() { - - return new GetSessionsMedia( - audioChannels, audioCodec, bitrate, - container, duration, id, - selected, part); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMediaContainer.java deleted file mode 100644 index 60d2ab57..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetSessionsMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetSessionsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.metadata = metadata; - } - - public GetSessionsMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetSessionsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetSessionsMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetSessionsMediaContainer 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; - } - GetSessionsMediaContainer other = (GetSessionsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, metadata); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsMediaContainer.class, - "size", size, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 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 GetSessionsMediaContainer build() { - - return new GetSessionsMediaContainer( - size, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMetadata.java deleted file mode 100644 index c987f4a2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsMetadata.java +++ /dev/null @@ -1,1762 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetSessionsMetadata { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("addedAt") - private Optional addedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("art") - private Optional art; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentArt") - private Optional grandparentArt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentGuid") - private Optional grandparentGuid; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentKey") - private Optional grandparentKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentRatingKey") - private Optional grandparentRatingKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentThumb") - private Optional grandparentThumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("grandparentTitle") - private Optional grandparentTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("guid") - private Optional guid; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionKey") - private Optional librarySectionKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("musicAnalysisVersion") - private Optional musicAnalysisVersion; - - /** - * The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originalTitle") - private Optional originalTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentGuid") - private Optional parentGuid; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentIndex") - private Optional parentIndex; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentKey") - private Optional parentKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentRatingKey") - private Optional parentRatingKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentStudio") - private Optional parentStudio; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentThumb") - private Optional parentThumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentTitle") - private Optional parentTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parentYear") - private Optional parentYear; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingCount") - private Optional ratingCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingKey") - private Optional ratingKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("sessionKey") - private Optional sessionKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("titleSort") - private Optional titleSort; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("viewOffset") - private Optional viewOffset; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Media") - private Optional> media; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("User") - private Optional user; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Player") - private Optional player; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Session") - private Optional session; - - @JsonCreator - public GetSessionsMetadata( - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("art") Optional art, - @JsonProperty("duration") Optional duration, - @JsonProperty("grandparentArt") Optional grandparentArt, - @JsonProperty("grandparentGuid") Optional grandparentGuid, - @JsonProperty("grandparentKey") Optional grandparentKey, - @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, - @JsonProperty("grandparentThumb") Optional grandparentThumb, - @JsonProperty("grandparentTitle") Optional grandparentTitle, - @JsonProperty("guid") Optional guid, - @JsonProperty("index") Optional index, - @JsonProperty("key") Optional key, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionKey") Optional librarySectionKey, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("musicAnalysisVersion") Optional musicAnalysisVersion, - @JsonProperty("originalTitle") Optional originalTitle, - @JsonProperty("parentGuid") Optional parentGuid, - @JsonProperty("parentIndex") Optional parentIndex, - @JsonProperty("parentKey") Optional parentKey, - @JsonProperty("parentRatingKey") Optional parentRatingKey, - @JsonProperty("parentStudio") Optional parentStudio, - @JsonProperty("parentThumb") Optional parentThumb, - @JsonProperty("parentTitle") Optional parentTitle, - @JsonProperty("parentYear") Optional parentYear, - @JsonProperty("ratingCount") Optional ratingCount, - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("sessionKey") Optional sessionKey, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("title") Optional title, - @JsonProperty("titleSort") Optional titleSort, - @JsonProperty("type") Optional type, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("viewOffset") Optional viewOffset, - @JsonProperty("Media") Optional> media, - @JsonProperty("User") Optional user, - @JsonProperty("Player") Optional player, - @JsonProperty("Session") Optional session) { - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(grandparentArt, "grandparentArt"); - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - Utils.checkNotNull(grandparentKey, "grandparentKey"); - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(musicAnalysisVersion, "musicAnalysisVersion"); - Utils.checkNotNull(originalTitle, "originalTitle"); - Utils.checkNotNull(parentGuid, "parentGuid"); - Utils.checkNotNull(parentIndex, "parentIndex"); - Utils.checkNotNull(parentKey, "parentKey"); - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - Utils.checkNotNull(parentStudio, "parentStudio"); - Utils.checkNotNull(parentThumb, "parentThumb"); - Utils.checkNotNull(parentTitle, "parentTitle"); - Utils.checkNotNull(parentYear, "parentYear"); - Utils.checkNotNull(ratingCount, "ratingCount"); - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(sessionKey, "sessionKey"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(titleSort, "titleSort"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(viewOffset, "viewOffset"); - Utils.checkNotNull(media, "media"); - Utils.checkNotNull(user, "user"); - Utils.checkNotNull(player, "player"); - Utils.checkNotNull(session, "session"); - this.addedAt = addedAt; - this.art = art; - this.duration = duration; - this.grandparentArt = grandparentArt; - this.grandparentGuid = grandparentGuid; - this.grandparentKey = grandparentKey; - this.grandparentRatingKey = grandparentRatingKey; - this.grandparentThumb = grandparentThumb; - this.grandparentTitle = grandparentTitle; - this.guid = guid; - this.index = index; - this.key = key; - this.librarySectionID = librarySectionID; - this.librarySectionKey = librarySectionKey; - this.librarySectionTitle = librarySectionTitle; - this.musicAnalysisVersion = musicAnalysisVersion; - this.originalTitle = originalTitle; - this.parentGuid = parentGuid; - this.parentIndex = parentIndex; - this.parentKey = parentKey; - this.parentRatingKey = parentRatingKey; - this.parentStudio = parentStudio; - this.parentThumb = parentThumb; - this.parentTitle = parentTitle; - this.parentYear = parentYear; - this.ratingCount = ratingCount; - this.ratingKey = ratingKey; - this.sessionKey = sessionKey; - this.thumb = thumb; - this.title = title; - this.titleSort = titleSort; - this.type = type; - this.updatedAt = updatedAt; - this.viewOffset = viewOffset; - this.media = media; - this.user = user; - this.player = player; - this.session = session; - } - - public GetSessionsMetadata() { - 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(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional addedAt() { - return addedAt; - } - - @JsonIgnore - public Optional art() { - return art; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - @JsonIgnore - public Optional grandparentArt() { - return grandparentArt; - } - - @JsonIgnore - public Optional grandparentGuid() { - return grandparentGuid; - } - - @JsonIgnore - public Optional grandparentKey() { - return grandparentKey; - } - - @JsonIgnore - public Optional grandparentRatingKey() { - return grandparentRatingKey; - } - - @JsonIgnore - public Optional grandparentThumb() { - return grandparentThumb; - } - - @JsonIgnore - public Optional grandparentTitle() { - return grandparentTitle; - } - - @JsonIgnore - public Optional guid() { - return guid; - } - - @JsonIgnore - public Optional index() { - return index; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional librarySectionKey() { - return librarySectionKey; - } - - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional musicAnalysisVersion() { - return musicAnalysisVersion; - } - - /** - * The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist - */ - @JsonIgnore - public Optional originalTitle() { - return originalTitle; - } - - @JsonIgnore - public Optional parentGuid() { - return parentGuid; - } - - @JsonIgnore - public Optional parentIndex() { - return parentIndex; - } - - @JsonIgnore - public Optional parentKey() { - return parentKey; - } - - @JsonIgnore - public Optional parentRatingKey() { - return parentRatingKey; - } - - @JsonIgnore - public Optional parentStudio() { - return parentStudio; - } - - @JsonIgnore - public Optional parentThumb() { - return parentThumb; - } - - @JsonIgnore - public Optional parentTitle() { - return parentTitle; - } - - @JsonIgnore - public Optional parentYear() { - return parentYear; - } - - @JsonIgnore - public Optional ratingCount() { - return ratingCount; - } - - @JsonIgnore - public Optional ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional sessionKey() { - return sessionKey; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional titleSort() { - return titleSort; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - @JsonIgnore - public Optional viewOffset() { - return viewOffset; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> media() { - return (Optional>) media; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional user() { - return (Optional) user; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional player() { - return (Optional) player; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional session() { - return (Optional) session; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public GetSessionsMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public GetSessionsMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - - public GetSessionsMetadata withArt(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - public GetSessionsMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetSessionsMetadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetSessionsMetadata withGrandparentArt(String grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = Optional.ofNullable(grandparentArt); - return this; - } - - - public GetSessionsMetadata withGrandparentArt(Optional grandparentArt) { - Utils.checkNotNull(grandparentArt, "grandparentArt"); - this.grandparentArt = grandparentArt; - return this; - } - - public GetSessionsMetadata withGrandparentGuid(String grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = Optional.ofNullable(grandparentGuid); - return this; - } - - - public GetSessionsMetadata withGrandparentGuid(Optional grandparentGuid) { - Utils.checkNotNull(grandparentGuid, "grandparentGuid"); - this.grandparentGuid = grandparentGuid; - return this; - } - - public GetSessionsMetadata withGrandparentKey(String grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = Optional.ofNullable(grandparentKey); - return this; - } - - - public GetSessionsMetadata withGrandparentKey(Optional grandparentKey) { - Utils.checkNotNull(grandparentKey, "grandparentKey"); - this.grandparentKey = grandparentKey; - return this; - } - - public GetSessionsMetadata withGrandparentRatingKey(String grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); - return this; - } - - - public GetSessionsMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { - Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); - this.grandparentRatingKey = grandparentRatingKey; - return this; - } - - public GetSessionsMetadata withGrandparentThumb(String grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = Optional.ofNullable(grandparentThumb); - return this; - } - - - public GetSessionsMetadata withGrandparentThumb(Optional grandparentThumb) { - Utils.checkNotNull(grandparentThumb, "grandparentThumb"); - this.grandparentThumb = grandparentThumb; - return this; - } - - public GetSessionsMetadata withGrandparentTitle(String grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = Optional.ofNullable(grandparentTitle); - return this; - } - - - public GetSessionsMetadata withGrandparentTitle(Optional grandparentTitle) { - Utils.checkNotNull(grandparentTitle, "grandparentTitle"); - this.grandparentTitle = grandparentTitle; - return this; - } - - public GetSessionsMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public GetSessionsMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public GetSessionsMetadata withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - - public GetSessionsMetadata withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public GetSessionsMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetSessionsMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetSessionsMetadata withLibrarySectionID(String librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - public GetSessionsMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetSessionsMetadata withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - - public GetSessionsMetadata withLibrarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - public GetSessionsMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - public GetSessionsMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetSessionsMetadata withMusicAnalysisVersion(String musicAnalysisVersion) { - Utils.checkNotNull(musicAnalysisVersion, "musicAnalysisVersion"); - this.musicAnalysisVersion = Optional.ofNullable(musicAnalysisVersion); - return this; - } - - - public GetSessionsMetadata withMusicAnalysisVersion(Optional musicAnalysisVersion) { - Utils.checkNotNull(musicAnalysisVersion, "musicAnalysisVersion"); - this.musicAnalysisVersion = musicAnalysisVersion; - return this; - } - - /** - * The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist - */ - public GetSessionsMetadata withOriginalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - - /** - * The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist - */ - public GetSessionsMetadata withOriginalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - return this; - } - - public GetSessionsMetadata withParentGuid(String parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = Optional.ofNullable(parentGuid); - return this; - } - - - public GetSessionsMetadata withParentGuid(Optional parentGuid) { - Utils.checkNotNull(parentGuid, "parentGuid"); - this.parentGuid = parentGuid; - return this; - } - - public GetSessionsMetadata withParentIndex(int parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = Optional.ofNullable(parentIndex); - return this; - } - - - public GetSessionsMetadata withParentIndex(Optional parentIndex) { - Utils.checkNotNull(parentIndex, "parentIndex"); - this.parentIndex = parentIndex; - return this; - } - - public GetSessionsMetadata withParentKey(String parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = Optional.ofNullable(parentKey); - return this; - } - - - public GetSessionsMetadata withParentKey(Optional parentKey) { - Utils.checkNotNull(parentKey, "parentKey"); - this.parentKey = parentKey; - return this; - } - - public GetSessionsMetadata withParentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - - public GetSessionsMetadata withParentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - return this; - } - - public GetSessionsMetadata withParentStudio(String parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = Optional.ofNullable(parentStudio); - return this; - } - - - public GetSessionsMetadata withParentStudio(Optional parentStudio) { - Utils.checkNotNull(parentStudio, "parentStudio"); - this.parentStudio = parentStudio; - return this; - } - - public GetSessionsMetadata withParentThumb(String parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = Optional.ofNullable(parentThumb); - return this; - } - - - public GetSessionsMetadata withParentThumb(Optional parentThumb) { - Utils.checkNotNull(parentThumb, "parentThumb"); - this.parentThumb = parentThumb; - return this; - } - - public GetSessionsMetadata withParentTitle(String parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = Optional.ofNullable(parentTitle); - return this; - } - - - public GetSessionsMetadata withParentTitle(Optional parentTitle) { - Utils.checkNotNull(parentTitle, "parentTitle"); - this.parentTitle = parentTitle; - return this; - } - - public GetSessionsMetadata withParentYear(int parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = Optional.ofNullable(parentYear); - return this; - } - - - public GetSessionsMetadata withParentYear(Optional parentYear) { - Utils.checkNotNull(parentYear, "parentYear"); - this.parentYear = parentYear; - return this; - } - - public GetSessionsMetadata withRatingCount(int ratingCount) { - Utils.checkNotNull(ratingCount, "ratingCount"); - this.ratingCount = Optional.ofNullable(ratingCount); - return this; - } - - - public GetSessionsMetadata withRatingCount(Optional ratingCount) { - Utils.checkNotNull(ratingCount, "ratingCount"); - this.ratingCount = ratingCount; - return this; - } - - public GetSessionsMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetSessionsMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetSessionsMetadata withSessionKey(String sessionKey) { - Utils.checkNotNull(sessionKey, "sessionKey"); - this.sessionKey = Optional.ofNullable(sessionKey); - return this; - } - - - public GetSessionsMetadata withSessionKey(Optional sessionKey) { - Utils.checkNotNull(sessionKey, "sessionKey"); - this.sessionKey = sessionKey; - return this; - } - - public GetSessionsMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetSessionsMetadata withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetSessionsMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetSessionsMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetSessionsMetadata withTitleSort(String titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = Optional.ofNullable(titleSort); - return this; - } - - - public GetSessionsMetadata withTitleSort(Optional titleSort) { - Utils.checkNotNull(titleSort, "titleSort"); - this.titleSort = titleSort; - return this; - } - - public GetSessionsMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetSessionsMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetSessionsMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetSessionsMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - public GetSessionsMetadata withViewOffset(int viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = Optional.ofNullable(viewOffset); - return this; - } - - - public GetSessionsMetadata withViewOffset(Optional viewOffset) { - Utils.checkNotNull(viewOffset, "viewOffset"); - this.viewOffset = viewOffset; - return this; - } - - public GetSessionsMetadata withMedia(List media) { - Utils.checkNotNull(media, "media"); - this.media = Optional.ofNullable(media); - return this; - } - - - public GetSessionsMetadata withMedia(Optional> media) { - Utils.checkNotNull(media, "media"); - this.media = media; - return this; - } - - public GetSessionsMetadata withUser(GetSessionsUser user) { - Utils.checkNotNull(user, "user"); - this.user = Optional.ofNullable(user); - return this; - } - - - public GetSessionsMetadata withUser(Optional user) { - Utils.checkNotNull(user, "user"); - this.user = user; - return this; - } - - public GetSessionsMetadata withPlayer(Player player) { - Utils.checkNotNull(player, "player"); - this.player = Optional.ofNullable(player); - return this; - } - - - public GetSessionsMetadata withPlayer(Optional player) { - Utils.checkNotNull(player, "player"); - this.player = player; - return this; - } - - public GetSessionsMetadata withSession(Session session) { - Utils.checkNotNull(session, "session"); - this.session = Optional.ofNullable(session); - return this; - } - - - public GetSessionsMetadata withSession(Optional session) { - Utils.checkNotNull(session, "session"); - this.session = session; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionsMetadata other = (GetSessionsMetadata) o; - return - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && - Utils.enhancedDeepEquals(this.grandparentGuid, other.grandparentGuid) && - Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && - Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && - Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && - Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionKey, other.librarySectionKey) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.musicAnalysisVersion, other.musicAnalysisVersion) && - Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && - Utils.enhancedDeepEquals(this.parentGuid, other.parentGuid) && - Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && - Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && - Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && - Utils.enhancedDeepEquals(this.parentStudio, other.parentStudio) && - Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && - Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && - Utils.enhancedDeepEquals(this.parentYear, other.parentYear) && - Utils.enhancedDeepEquals(this.ratingCount, other.ratingCount) && - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.sessionKey, other.sessionKey) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && - Utils.enhancedDeepEquals(this.media, other.media) && - Utils.enhancedDeepEquals(this.user, other.user) && - Utils.enhancedDeepEquals(this.player, other.player) && - Utils.enhancedDeepEquals(this.session, other.session); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - addedAt, art, duration, - grandparentArt, grandparentGuid, grandparentKey, - grandparentRatingKey, grandparentThumb, grandparentTitle, - guid, index, key, - librarySectionID, librarySectionKey, librarySectionTitle, - musicAnalysisVersion, originalTitle, parentGuid, - parentIndex, parentKey, parentRatingKey, - parentStudio, parentThumb, parentTitle, - parentYear, ratingCount, ratingKey, - sessionKey, thumb, title, - titleSort, type, updatedAt, - viewOffset, media, user, - player, session); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsMetadata.class, - "addedAt", addedAt, - "art", art, - "duration", duration, - "grandparentArt", grandparentArt, - "grandparentGuid", grandparentGuid, - "grandparentKey", grandparentKey, - "grandparentRatingKey", grandparentRatingKey, - "grandparentThumb", grandparentThumb, - "grandparentTitle", grandparentTitle, - "guid", guid, - "index", index, - "key", key, - "librarySectionID", librarySectionID, - "librarySectionKey", librarySectionKey, - "librarySectionTitle", librarySectionTitle, - "musicAnalysisVersion", musicAnalysisVersion, - "originalTitle", originalTitle, - "parentGuid", parentGuid, - "parentIndex", parentIndex, - "parentKey", parentKey, - "parentRatingKey", parentRatingKey, - "parentStudio", parentStudio, - "parentThumb", parentThumb, - "parentTitle", parentTitle, - "parentYear", parentYear, - "ratingCount", ratingCount, - "ratingKey", ratingKey, - "sessionKey", sessionKey, - "thumb", thumb, - "title", title, - "titleSort", titleSort, - "type", type, - "updatedAt", updatedAt, - "viewOffset", viewOffset, - "media", media, - "user", user, - "player", player, - "session", session); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional addedAt = Optional.empty(); - - private Optional art = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional grandparentArt = Optional.empty(); - - private Optional grandparentGuid = Optional.empty(); - - private Optional grandparentKey = Optional.empty(); - - private Optional grandparentRatingKey = Optional.empty(); - - private Optional grandparentThumb = Optional.empty(); - - private Optional grandparentTitle = Optional.empty(); - - private Optional guid = Optional.empty(); - - private Optional index = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionKey = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional musicAnalysisVersion = Optional.empty(); - - private Optional originalTitle = Optional.empty(); - - private Optional parentGuid = Optional.empty(); - - private Optional parentIndex = Optional.empty(); - - private Optional parentKey = Optional.empty(); - - private Optional parentRatingKey = Optional.empty(); - - private Optional parentStudio = Optional.empty(); - - private Optional parentThumb = Optional.empty(); - - private Optional parentTitle = Optional.empty(); - - private Optional parentYear = Optional.empty(); - - private Optional ratingCount = Optional.empty(); - - private Optional ratingKey = Optional.empty(); - - private Optional sessionKey = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional titleSort = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional viewOffset = Optional.empty(); - - private Optional> media = Optional.empty(); - - private Optional user = Optional.empty(); - - private Optional player = Optional.empty(); - - private Optional session = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder addedAt(int 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 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(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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 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 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 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 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 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 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 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 librarySectionID(String 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 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; - } - - - 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 musicAnalysisVersion(String musicAnalysisVersion) { - Utils.checkNotNull(musicAnalysisVersion, "musicAnalysisVersion"); - this.musicAnalysisVersion = Optional.ofNullable(musicAnalysisVersion); - return this; - } - - public Builder musicAnalysisVersion(Optional musicAnalysisVersion) { - Utils.checkNotNull(musicAnalysisVersion, "musicAnalysisVersion"); - this.musicAnalysisVersion = musicAnalysisVersion; - return this; - } - - - /** - * The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist - */ - public Builder originalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); - return this; - } - - /** - * The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist - */ - public Builder originalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; - 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 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 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 parentRatingKey(String parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = Optional.ofNullable(parentRatingKey); - return this; - } - - public Builder parentRatingKey(Optional parentRatingKey) { - Utils.checkNotNull(parentRatingKey, "parentRatingKey"); - this.parentRatingKey = parentRatingKey; - 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 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 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 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 ratingCount(int ratingCount) { - Utils.checkNotNull(ratingCount, "ratingCount"); - this.ratingCount = Optional.ofNullable(ratingCount); - return this; - } - - public Builder ratingCount(Optional ratingCount) { - Utils.checkNotNull(ratingCount, "ratingCount"); - this.ratingCount = ratingCount; - return this; - } - - - public Builder ratingKey(String 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 sessionKey(String sessionKey) { - Utils.checkNotNull(sessionKey, "sessionKey"); - this.sessionKey = Optional.ofNullable(sessionKey); - return this; - } - - public Builder sessionKey(Optional sessionKey) { - Utils.checkNotNull(sessionKey, "sessionKey"); - this.sessionKey = sessionKey; - 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 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 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 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 updatedAt(int 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 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 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 user(GetSessionsUser user) { - Utils.checkNotNull(user, "user"); - this.user = Optional.ofNullable(user); - return this; - } - - public Builder user(Optional user) { - Utils.checkNotNull(user, "user"); - this.user = user; - return this; - } - - - public Builder player(Player player) { - Utils.checkNotNull(player, "player"); - this.player = Optional.ofNullable(player); - return this; - } - - public Builder player(Optional player) { - Utils.checkNotNull(player, "player"); - this.player = player; - return this; - } - - - public Builder session(Session session) { - Utils.checkNotNull(session, "session"); - this.session = Optional.ofNullable(session); - return this; - } - - public Builder session(Optional session) { - Utils.checkNotNull(session, "session"); - this.session = session; - return this; - } - - public GetSessionsMetadata build() { - - return new GetSessionsMetadata( - addedAt, art, duration, - grandparentArt, grandparentGuid, grandparentKey, - grandparentRatingKey, grandparentThumb, grandparentTitle, - guid, index, key, - librarySectionID, librarySectionKey, librarySectionTitle, - musicAnalysisVersion, originalTitle, parentGuid, - parentIndex, parentKey, parentRatingKey, - parentStudio, parentThumb, parentTitle, - parentYear, ratingCount, ratingKey, - sessionKey, thumb, title, - titleSort, type, updatedAt, - viewOffset, media, user, - player, session); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsPart.java deleted file mode 100644 index ad9ece1f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsPart.java +++ /dev/null @@ -1,512 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetSessionsPart { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("file") - private Optional file; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasThumbnail") - private Optional hasThumbnail; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("decision") - private Optional decision; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("selected") - private Optional selected; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Stream") - private Optional> stream; - - @JsonCreator - public GetSessionsPart( - @JsonProperty("container") Optional container, - @JsonProperty("duration") Optional duration, - @JsonProperty("file") Optional file, - @JsonProperty("hasThumbnail") Optional hasThumbnail, - @JsonProperty("id") Optional id, - @JsonProperty("key") Optional key, - @JsonProperty("size") Optional size, - @JsonProperty("decision") Optional decision, - @JsonProperty("selected") Optional selected, - @JsonProperty("Stream") Optional> stream) { - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(file, "file"); - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(decision, "decision"); - Utils.checkNotNull(selected, "selected"); - Utils.checkNotNull(stream, "stream"); - this.container = container; - this.duration = duration; - this.file = file; - this.hasThumbnail = hasThumbnail; - this.id = id; - this.key = key; - this.size = size; - this.decision = decision; - this.selected = selected; - this.stream = stream; - } - - public GetSessionsPart() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public Optional container() { - return container; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - @JsonIgnore - public Optional file() { - return file; - } - - @JsonIgnore - public Optional hasThumbnail() { - return hasThumbnail; - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional decision() { - return decision; - } - - @JsonIgnore - public Optional selected() { - return selected; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> stream() { - return (Optional>) stream; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsPart withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - public GetSessionsPart withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - public GetSessionsPart withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetSessionsPart withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetSessionsPart withFile(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - - public GetSessionsPart withFile(Optional file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - public GetSessionsPart withHasThumbnail(String hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = Optional.ofNullable(hasThumbnail); - return this; - } - - - public GetSessionsPart withHasThumbnail(Optional hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = hasThumbnail; - return this; - } - - public GetSessionsPart withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetSessionsPart withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetSessionsPart withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetSessionsPart withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetSessionsPart withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetSessionsPart withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetSessionsPart withDecision(String decision) { - Utils.checkNotNull(decision, "decision"); - this.decision = Optional.ofNullable(decision); - return this; - } - - - public GetSessionsPart withDecision(Optional decision) { - Utils.checkNotNull(decision, "decision"); - this.decision = decision; - return this; - } - - public GetSessionsPart withSelected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - - public GetSessionsPart withSelected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - public GetSessionsPart withStream(List stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = Optional.ofNullable(stream); - return this; - } - - - public GetSessionsPart withStream(Optional> stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = stream; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionsPart other = (GetSessionsPart) o; - return - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.file, other.file) && - Utils.enhancedDeepEquals(this.hasThumbnail, other.hasThumbnail) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.decision, other.decision) && - Utils.enhancedDeepEquals(this.selected, other.selected) && - Utils.enhancedDeepEquals(this.stream, other.stream); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - container, duration, file, - hasThumbnail, id, key, - size, decision, selected, - stream); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsPart.class, - "container", container, - "duration", duration, - "file", file, - "hasThumbnail", hasThumbnail, - "id", id, - "key", key, - "size", size, - "decision", decision, - "selected", selected, - "stream", stream); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional container = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional file = Optional.empty(); - - private Optional hasThumbnail = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional size = Optional.empty(); - - private Optional decision = Optional.empty(); - - private Optional selected = Optional.empty(); - - private Optional> stream = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - 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 hasThumbnail(String 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 id(String 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 size(int 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 decision(String decision) { - Utils.checkNotNull(decision, "decision"); - this.decision = Optional.ofNullable(decision); - return this; - } - - public Builder decision(Optional decision) { - Utils.checkNotNull(decision, "decision"); - this.decision = decision; - 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 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 GetSessionsPart build() { - - return new GetSessionsPart( - container, duration, file, - hasThumbnail, id, key, - size, decision, selected, - stream); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsResponse.java index 09f7d4d6..e0aa8755 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsResponse.java @@ -5,6 +5,7 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; import dev.plexapi.sdk.utils.Response; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; @@ -13,6 +14,8 @@ import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; import java.util.Optional; @@ -33,32 +36,40 @@ public class GetSessionsResponse implements Response { private HttpResponse rawResponse; /** - * List of Active Plex Sessions + * OK */ - private Optional object; + private Optional mediaContainerWithMetadata; + + + private Map> headers; @JsonCreator public GetSessionsResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional object) { + Optional mediaContainerWithMetadata, + Map> headers) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.object = object; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; } public GetSessionsResponse( String contentType, int statusCode, - HttpResponse rawResponse) { + HttpResponse rawResponse, + Map> headers) { this(contentType, statusCode, rawResponse, - Optional.empty()); + Optional.empty(), headers); } /** @@ -86,12 +97,17 @@ public class GetSessionsResponse implements Response { } /** - * List of Active Plex Sessions + * OK */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional object() { - return (Optional) object; + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; } public static Builder builder() { @@ -127,21 +143,27 @@ public class GetSessionsResponse implements Response { } /** - * List of Active Plex Sessions + * OK */ - public GetSessionsResponse withObject(GetSessionsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public GetSessionsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); return this; } /** - * List of Active Plex Sessions + * OK */ - public GetSessionsResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public GetSessionsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetSessionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; return this; } @@ -158,14 +180,15 @@ public class GetSessionsResponse implements Response { Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); } @Override public int hashCode() { return Utils.enhancedHash( contentType, statusCode, rawResponse, - object); + mediaContainerWithMetadata, headers); } @Override @@ -174,7 +197,8 @@ public class GetSessionsResponse implements Response { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "object", object); + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); } @SuppressWarnings("UnusedReturnValue") @@ -186,7 +210,9 @@ public class GetSessionsResponse implements Response { private HttpResponse rawResponse; - private Optional object = Optional.empty(); + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; private Builder() { // force use of static builder() method @@ -224,20 +250,27 @@ public class GetSessionsResponse implements Response { /** - * List of Active Plex Sessions + * OK */ - public Builder object(GetSessionsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); return this; } /** - * List of Active Plex Sessions + * OK */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; return this; } @@ -245,7 +278,7 @@ public class GetSessionsResponse implements Response { return new GetSessionsResponse( contentType, statusCode, rawResponse, - object); + mediaContainerWithMetadata, headers); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsResponseBody.java deleted file mode 100644 index 87d2d468..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetSessionsResponseBody - * - *

List of Active Plex Sessions - */ -public class GetSessionsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetSessionsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetSessionsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsResponseBody withMediaContainer(GetSessionsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetSessionsResponseBody 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; - } - GetSessionsResponseBody other = (GetSessionsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetSessionsMediaContainer 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 GetSessionsResponseBody build() { - - return new GetSessionsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsStream.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsStream.java deleted file mode 100644 index b65fe6e5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsStream.java +++ /dev/null @@ -1,948 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSessionsStream { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("albumGain") - private Optional albumGain; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("albumPeak") - private Optional albumPeak; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("albumRange") - private Optional albumRange; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannelLayout") - private Optional audioChannelLayout; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitDepth") - private Optional bitDepth; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("channels") - private Optional channels; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codec") - private Optional codec; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("displayTitle") - private Optional displayTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("extendedDisplayTitle") - private Optional extendedDisplayTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("gain") - private Optional gain; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("loudness") - private Optional loudness; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lra") - private Optional lra; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("peak") - private Optional peak; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("samplingRate") - private Optional samplingRate; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("selected") - private Optional selected; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("streamType") - private Optional streamType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("location") - private Optional location; - - @JsonCreator - public GetSessionsStream( - @JsonProperty("albumGain") Optional albumGain, - @JsonProperty("albumPeak") Optional albumPeak, - @JsonProperty("albumRange") Optional albumRange, - @JsonProperty("audioChannelLayout") Optional audioChannelLayout, - @JsonProperty("bitDepth") Optional bitDepth, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("channels") Optional channels, - @JsonProperty("codec") Optional codec, - @JsonProperty("displayTitle") Optional displayTitle, - @JsonProperty("extendedDisplayTitle") Optional extendedDisplayTitle, - @JsonProperty("gain") Optional gain, - @JsonProperty("id") Optional id, - @JsonProperty("index") Optional index, - @JsonProperty("loudness") Optional loudness, - @JsonProperty("lra") Optional lra, - @JsonProperty("peak") Optional peak, - @JsonProperty("samplingRate") Optional samplingRate, - @JsonProperty("selected") Optional selected, - @JsonProperty("streamType") Optional streamType, - @JsonProperty("location") Optional location) { - Utils.checkNotNull(albumGain, "albumGain"); - Utils.checkNotNull(albumPeak, "albumPeak"); - Utils.checkNotNull(albumRange, "albumRange"); - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - Utils.checkNotNull(bitDepth, "bitDepth"); - Utils.checkNotNull(bitrate, "bitrate"); - Utils.checkNotNull(channels, "channels"); - Utils.checkNotNull(codec, "codec"); - Utils.checkNotNull(displayTitle, "displayTitle"); - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - Utils.checkNotNull(gain, "gain"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(loudness, "loudness"); - Utils.checkNotNull(lra, "lra"); - Utils.checkNotNull(peak, "peak"); - Utils.checkNotNull(samplingRate, "samplingRate"); - Utils.checkNotNull(selected, "selected"); - Utils.checkNotNull(streamType, "streamType"); - Utils.checkNotNull(location, "location"); - this.albumGain = albumGain; - this.albumPeak = albumPeak; - this.albumRange = albumRange; - this.audioChannelLayout = audioChannelLayout; - this.bitDepth = bitDepth; - this.bitrate = bitrate; - this.channels = channels; - this.codec = codec; - this.displayTitle = displayTitle; - this.extendedDisplayTitle = extendedDisplayTitle; - this.gain = gain; - this.id = id; - this.index = index; - this.loudness = loudness; - this.lra = lra; - this.peak = peak; - this.samplingRate = samplingRate; - this.selected = selected; - this.streamType = streamType; - this.location = location; - } - - public GetSessionsStream() { - 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()); - } - - @JsonIgnore - public Optional albumGain() { - return albumGain; - } - - @JsonIgnore - public Optional albumPeak() { - return albumPeak; - } - - @JsonIgnore - public Optional albumRange() { - return albumRange; - } - - @JsonIgnore - public Optional audioChannelLayout() { - return audioChannelLayout; - } - - @JsonIgnore - public Optional bitDepth() { - return bitDepth; - } - - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - @JsonIgnore - public Optional channels() { - return channels; - } - - @JsonIgnore - public Optional codec() { - return codec; - } - - @JsonIgnore - public Optional displayTitle() { - return displayTitle; - } - - @JsonIgnore - public Optional extendedDisplayTitle() { - return extendedDisplayTitle; - } - - @JsonIgnore - public Optional gain() { - return gain; - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional index() { - return index; - } - - @JsonIgnore - public Optional loudness() { - return loudness; - } - - @JsonIgnore - public Optional lra() { - return lra; - } - - @JsonIgnore - public Optional peak() { - return peak; - } - - @JsonIgnore - public Optional samplingRate() { - return samplingRate; - } - - @JsonIgnore - public Optional selected() { - return selected; - } - - @JsonIgnore - public Optional streamType() { - return streamType; - } - - @JsonIgnore - public Optional location() { - return location; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsStream withAlbumGain(String albumGain) { - Utils.checkNotNull(albumGain, "albumGain"); - this.albumGain = Optional.ofNullable(albumGain); - return this; - } - - - public GetSessionsStream withAlbumGain(Optional albumGain) { - Utils.checkNotNull(albumGain, "albumGain"); - this.albumGain = albumGain; - return this; - } - - public GetSessionsStream withAlbumPeak(String albumPeak) { - Utils.checkNotNull(albumPeak, "albumPeak"); - this.albumPeak = Optional.ofNullable(albumPeak); - return this; - } - - - public GetSessionsStream withAlbumPeak(Optional albumPeak) { - Utils.checkNotNull(albumPeak, "albumPeak"); - this.albumPeak = albumPeak; - return this; - } - - public GetSessionsStream withAlbumRange(String albumRange) { - Utils.checkNotNull(albumRange, "albumRange"); - this.albumRange = Optional.ofNullable(albumRange); - return this; - } - - - public GetSessionsStream withAlbumRange(Optional albumRange) { - Utils.checkNotNull(albumRange, "albumRange"); - this.albumRange = albumRange; - return this; - } - - public GetSessionsStream withAudioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - - public GetSessionsStream withAudioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - public GetSessionsStream withBitDepth(int bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - - public GetSessionsStream withBitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - public GetSessionsStream withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - public GetSessionsStream withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - public GetSessionsStream withChannels(int channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = Optional.ofNullable(channels); - return this; - } - - - public GetSessionsStream withChannels(Optional channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = channels; - return this; - } - - public GetSessionsStream withCodec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = Optional.ofNullable(codec); - return this; - } - - - public GetSessionsStream withCodec(Optional codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - public GetSessionsStream withDisplayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = Optional.ofNullable(displayTitle); - return this; - } - - - public GetSessionsStream withDisplayTitle(Optional displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - public GetSessionsStream withExtendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); - return this; - } - - - public GetSessionsStream withExtendedDisplayTitle(Optional extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - public GetSessionsStream withGain(String gain) { - Utils.checkNotNull(gain, "gain"); - this.gain = Optional.ofNullable(gain); - return this; - } - - - public GetSessionsStream withGain(Optional gain) { - Utils.checkNotNull(gain, "gain"); - this.gain = gain; - return this; - } - - public GetSessionsStream withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetSessionsStream withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetSessionsStream withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - - public GetSessionsStream withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public GetSessionsStream withLoudness(String loudness) { - Utils.checkNotNull(loudness, "loudness"); - this.loudness = Optional.ofNullable(loudness); - return this; - } - - - public GetSessionsStream withLoudness(Optional loudness) { - Utils.checkNotNull(loudness, "loudness"); - this.loudness = loudness; - return this; - } - - public GetSessionsStream withLra(String lra) { - Utils.checkNotNull(lra, "lra"); - this.lra = Optional.ofNullable(lra); - return this; - } - - - public GetSessionsStream withLra(Optional lra) { - Utils.checkNotNull(lra, "lra"); - this.lra = lra; - return this; - } - - public GetSessionsStream withPeak(String peak) { - Utils.checkNotNull(peak, "peak"); - this.peak = Optional.ofNullable(peak); - return this; - } - - - public GetSessionsStream withPeak(Optional peak) { - Utils.checkNotNull(peak, "peak"); - this.peak = peak; - return this; - } - - public GetSessionsStream withSamplingRate(int samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - - public GetSessionsStream withSamplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - public GetSessionsStream withSelected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - - public GetSessionsStream withSelected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - public GetSessionsStream withStreamType(int streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = Optional.ofNullable(streamType); - return this; - } - - - public GetSessionsStream withStreamType(Optional streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = streamType; - return this; - } - - public GetSessionsStream withLocation(String location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - - public GetSessionsStream withLocation(Optional location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSessionsStream other = (GetSessionsStream) o; - return - Utils.enhancedDeepEquals(this.albumGain, other.albumGain) && - Utils.enhancedDeepEquals(this.albumPeak, other.albumPeak) && - Utils.enhancedDeepEquals(this.albumRange, other.albumRange) && - Utils.enhancedDeepEquals(this.audioChannelLayout, other.audioChannelLayout) && - Utils.enhancedDeepEquals(this.bitDepth, other.bitDepth) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.channels, other.channels) && - Utils.enhancedDeepEquals(this.codec, other.codec) && - Utils.enhancedDeepEquals(this.displayTitle, other.displayTitle) && - Utils.enhancedDeepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) && - Utils.enhancedDeepEquals(this.gain, other.gain) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.loudness, other.loudness) && - Utils.enhancedDeepEquals(this.lra, other.lra) && - Utils.enhancedDeepEquals(this.peak, other.peak) && - Utils.enhancedDeepEquals(this.samplingRate, other.samplingRate) && - Utils.enhancedDeepEquals(this.selected, other.selected) && - Utils.enhancedDeepEquals(this.streamType, other.streamType) && - Utils.enhancedDeepEquals(this.location, other.location); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - albumGain, albumPeak, albumRange, - audioChannelLayout, bitDepth, bitrate, - channels, codec, displayTitle, - extendedDisplayTitle, gain, id, - index, loudness, lra, - peak, samplingRate, selected, - streamType, location); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsStream.class, - "albumGain", albumGain, - "albumPeak", albumPeak, - "albumRange", albumRange, - "audioChannelLayout", audioChannelLayout, - "bitDepth", bitDepth, - "bitrate", bitrate, - "channels", channels, - "codec", codec, - "displayTitle", displayTitle, - "extendedDisplayTitle", extendedDisplayTitle, - "gain", gain, - "id", id, - "index", index, - "loudness", loudness, - "lra", lra, - "peak", peak, - "samplingRate", samplingRate, - "selected", selected, - "streamType", streamType, - "location", location); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional albumGain = Optional.empty(); - - private Optional albumPeak = Optional.empty(); - - private Optional albumRange = Optional.empty(); - - private Optional audioChannelLayout = Optional.empty(); - - private Optional bitDepth = Optional.empty(); - - private Optional bitrate = Optional.empty(); - - private Optional channels = Optional.empty(); - - private Optional codec = Optional.empty(); - - private Optional displayTitle = Optional.empty(); - - private Optional extendedDisplayTitle = Optional.empty(); - - private Optional gain = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional index = Optional.empty(); - - private Optional loudness = Optional.empty(); - - private Optional lra = Optional.empty(); - - private Optional peak = Optional.empty(); - - private Optional samplingRate = Optional.empty(); - - private Optional selected = Optional.empty(); - - private Optional streamType = Optional.empty(); - - private Optional location = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder albumGain(String albumGain) { - Utils.checkNotNull(albumGain, "albumGain"); - this.albumGain = Optional.ofNullable(albumGain); - return this; - } - - public Builder albumGain(Optional albumGain) { - Utils.checkNotNull(albumGain, "albumGain"); - this.albumGain = albumGain; - return this; - } - - - public Builder albumPeak(String albumPeak) { - Utils.checkNotNull(albumPeak, "albumPeak"); - this.albumPeak = Optional.ofNullable(albumPeak); - return this; - } - - public Builder albumPeak(Optional albumPeak) { - Utils.checkNotNull(albumPeak, "albumPeak"); - this.albumPeak = albumPeak; - return this; - } - - - public Builder albumRange(String albumRange) { - Utils.checkNotNull(albumRange, "albumRange"); - this.albumRange = Optional.ofNullable(albumRange); - return this; - } - - public Builder albumRange(Optional albumRange) { - Utils.checkNotNull(albumRange, "albumRange"); - this.albumRange = albumRange; - return this; - } - - - public Builder audioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - public Builder audioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - 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 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 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 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 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 gain(String gain) { - Utils.checkNotNull(gain, "gain"); - this.gain = Optional.ofNullable(gain); - return this; - } - - public Builder gain(Optional gain) { - Utils.checkNotNull(gain, "gain"); - this.gain = gain; - return this; - } - - - public Builder id(String 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 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 loudness(String loudness) { - Utils.checkNotNull(loudness, "loudness"); - this.loudness = Optional.ofNullable(loudness); - return this; - } - - public Builder loudness(Optional loudness) { - Utils.checkNotNull(loudness, "loudness"); - this.loudness = loudness; - return this; - } - - - public Builder lra(String lra) { - Utils.checkNotNull(lra, "lra"); - this.lra = Optional.ofNullable(lra); - return this; - } - - public Builder lra(Optional lra) { - Utils.checkNotNull(lra, "lra"); - this.lra = lra; - return this; - } - - - public Builder peak(String peak) { - Utils.checkNotNull(peak, "peak"); - this.peak = Optional.ofNullable(peak); - return this; - } - - public Builder peak(Optional peak) { - Utils.checkNotNull(peak, "peak"); - this.peak = peak; - 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 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 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 location(String location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - public Builder location(Optional location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - public GetSessionsStream build() { - - return new GetSessionsStream( - albumGain, albumPeak, albumRange, - audioChannelLayout, bitDepth, bitrate, - channels, codec, displayTitle, - extendedDisplayTitle, gain, id, - index, loudness, lra, - peak, samplingRate, selected, - streamType, location); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsUser.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsUser.java deleted file mode 100644 index f3fa5c40..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSessionsUser.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetSessionsUser { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - @JsonCreator - public GetSessionsUser( - @JsonProperty("id") Optional id, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("title") Optional title) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title, "title"); - this.id = id; - this.thumb = thumb; - this.title = title; - } - - public GetSessionsUser() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - @JsonIgnore - public Optional title() { - return title; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetSessionsUser withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetSessionsUser withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetSessionsUser withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetSessionsUser withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetSessionsUser withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetSessionsUser 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; - } - GetSessionsUser other = (GetSessionsUser) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, thumb, title); - } - - @Override - public String toString() { - return Utils.toString(GetSessionsUser.class, - "id", id, - "thumb", thumb, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Optional title = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder id(String 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 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 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 GetSessionsUser build() { - - return new GetSessionsUser( - id, thumb, title); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathRequest.java new file mode 100644 index 00000000..9228b0dd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathRequest.java @@ -0,0 +1,987 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetSonicPathRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * The starting metadata item id + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=startID") + private long startID; + + /** + * The ending metadata item id + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=endID") + private long endID; + + /** + * Limit results to count items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + /** + * The maximum distance allowed along the path; defaults to 0.25 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=maxDistance") + private Optional maxDistance; + + @JsonCreator + public GetSonicPathRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + long startID, + long endID, + Optional count, + Optional maxDistance) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(startID, "startID"); + Utils.checkNotNull(endID, "endID"); + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(maxDistance, "maxDistance"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.startID = startID; + this.endID = endID; + this.count = count; + this.maxDistance = maxDistance; + } + + public GetSonicPathRequest( + long sectionId, + long startID, + long endID) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + startID, endID, Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * The starting metadata item id + */ + @JsonIgnore + public long startID() { + return startID; + } + + /** + * The ending metadata item id + */ + @JsonIgnore + public long endID() { + return endID; + } + + /** + * Limit results to count items + */ + @JsonIgnore + public Optional count() { + return count; + } + + /** + * The maximum distance allowed along the path; defaults to 0.25 + */ + @JsonIgnore + public Optional maxDistance() { + return maxDistance; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSonicPathRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSonicPathRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSonicPathRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSonicPathRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSonicPathRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSonicPathRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSonicPathRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSonicPathRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSonicPathRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSonicPathRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSonicPathRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSonicPathRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSonicPathRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSonicPathRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSonicPathRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSonicPathRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSonicPathRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSonicPathRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSonicPathRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSonicPathRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSonicPathRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSonicPathRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetSonicPathRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The starting metadata item id + */ + public GetSonicPathRequest withStartID(long startID) { + Utils.checkNotNull(startID, "startID"); + this.startID = startID; + return this; + } + + /** + * The ending metadata item id + */ + public GetSonicPathRequest withEndID(long endID) { + Utils.checkNotNull(endID, "endID"); + this.endID = endID; + return this; + } + + /** + * Limit results to count items + */ + public GetSonicPathRequest withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + /** + * Limit results to count items + */ + public GetSonicPathRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * The maximum distance allowed along the path; defaults to 0.25 + */ + public GetSonicPathRequest withMaxDistance(double maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = Optional.ofNullable(maxDistance); + return this; + } + + + /** + * The maximum distance allowed along the path; defaults to 0.25 + */ + public GetSonicPathRequest withMaxDistance(Optional maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = maxDistance; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSonicPathRequest other = (GetSonicPathRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.startID, other.startID) && + Utils.enhancedDeepEquals(this.endID, other.endID) && + Utils.enhancedDeepEquals(this.count, other.count) && + Utils.enhancedDeepEquals(this.maxDistance, other.maxDistance); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + startID, endID, count, + maxDistance); + } + + @Override + public String toString() { + return Utils.toString(GetSonicPathRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "startID", startID, + "endID", endID, + "count", count, + "maxDistance", maxDistance); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Long startID; + + private Long endID; + + private Optional count = Optional.empty(); + + private Optional maxDistance = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The starting metadata item id + */ + public Builder startID(long startID) { + Utils.checkNotNull(startID, "startID"); + this.startID = startID; + return this; + } + + + /** + * The ending metadata item id + */ + public Builder endID(long endID) { + Utils.checkNotNull(endID, "endID"); + this.endID = endID; + return this; + } + + + /** + * Limit results to count items + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * Limit results to count items + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + + /** + * The maximum distance allowed along the path; defaults to 0.25 + */ + public Builder maxDistance(double maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = Optional.ofNullable(maxDistance); + return this; + } + + /** + * The maximum distance allowed along the path; defaults to 0.25 + */ + public Builder maxDistance(Optional maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = maxDistance; + return this; + } + + public GetSonicPathRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSonicPathRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + startID, endID, count, + maxDistance); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathRequestBuilder.java new file mode 100644 index 00000000..ca863e5b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSonicPath; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetSonicPathRequestBuilder { + + private GetSonicPathRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSonicPathRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSonicPathRequestBuilder request(GetSonicPathRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSonicPathResponse call() throws Exception { + + RequestOperation operation + = new GetSonicPath.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathResponse.java new file mode 100644 index 00000000..5ec56cbc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicPathResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class GetSonicPathResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public GetSonicPathResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public GetSonicPathResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSonicPathResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSonicPathResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSonicPathResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSonicPathResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetSonicPathResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSonicPathResponse other = (GetSonicPathResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetSonicPathResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetSonicPathResponse build() { + + return new GetSonicPathResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarRequest.java new file mode 100644 index 00000000..3906f712 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarRequest.java @@ -0,0 +1,1006 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class GetSonicallySimilarRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * The metadata type to fetch (should be 10 for audio track) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + /** + * The music analysis to center the search. Typically obtained from the `musicAnalysis` of a track + */ + @SpeakeasyMetadata("queryParam:style=form,explode=false,name=values") + private List values; + + /** + * The limit of the number of items to fetch; defaults to 50 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + /** + * The maximum distance to search, defaults to 0.25 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=maxDistance") + private Optional maxDistance; + + @JsonCreator + public GetSonicallySimilarRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + Optional type, + List values, + Optional limit, + Optional maxDistance) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(values, "values"); + Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(maxDistance, "maxDistance"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.type = type; + this.values = values; + this.limit = limit; + this.maxDistance = maxDistance; + } + + public GetSonicallySimilarRequest( + long sectionId, + List values) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty(), values, Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * The metadata type to fetch (should be 10 for audio track) + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * The music analysis to center the search. Typically obtained from the `musicAnalysis` of a track + */ + @JsonIgnore + public List values() { + return values; + } + + /** + * The limit of the number of items to fetch; defaults to 50 + */ + @JsonIgnore + public Optional limit() { + return limit; + } + + /** + * The maximum distance to search, defaults to 0.25 + */ + @JsonIgnore + public Optional maxDistance() { + return maxDistance; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSonicallySimilarRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSonicallySimilarRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSonicallySimilarRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSonicallySimilarRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSonicallySimilarRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSonicallySimilarRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSonicallySimilarRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSonicallySimilarRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSonicallySimilarRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSonicallySimilarRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSonicallySimilarRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSonicallySimilarRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSonicallySimilarRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSonicallySimilarRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSonicallySimilarRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSonicallySimilarRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSonicallySimilarRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSonicallySimilarRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSonicallySimilarRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSonicallySimilarRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSonicallySimilarRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSonicallySimilarRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public GetSonicallySimilarRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The metadata type to fetch (should be 10 for audio track) + */ + public GetSonicallySimilarRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The metadata type to fetch (should be 10 for audio track) + */ + public GetSonicallySimilarRequest withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The music analysis to center the search. Typically obtained from the `musicAnalysis` of a track + */ + public GetSonicallySimilarRequest withValues(List values) { + Utils.checkNotNull(values, "values"); + this.values = values; + return this; + } + + /** + * The limit of the number of items to fetch; defaults to 50 + */ + public GetSonicallySimilarRequest withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + + /** + * The limit of the number of items to fetch; defaults to 50 + */ + public GetSonicallySimilarRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + /** + * The maximum distance to search, defaults to 0.25 + */ + public GetSonicallySimilarRequest withMaxDistance(double maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = Optional.ofNullable(maxDistance); + return this; + } + + + /** + * The maximum distance to search, defaults to 0.25 + */ + public GetSonicallySimilarRequest withMaxDistance(Optional maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = maxDistance; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSonicallySimilarRequest other = (GetSonicallySimilarRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.values, other.values) && + Utils.enhancedDeepEquals(this.limit, other.limit) && + Utils.enhancedDeepEquals(this.maxDistance, other.maxDistance); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + type, values, limit, + maxDistance); + } + + @Override + public String toString() { + return Utils.toString(GetSonicallySimilarRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "type", type, + "values", values, + "limit", limit, + "maxDistance", maxDistance); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Optional type = Optional.empty(); + + private List values; + + private Optional limit = Optional.empty(); + + private Optional maxDistance = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The metadata type to fetch (should be 10 for audio track) + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The metadata type to fetch (should be 10 for audio track) + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The music analysis to center the search. Typically obtained from the `musicAnalysis` of a track + */ + public Builder values(List values) { + Utils.checkNotNull(values, "values"); + this.values = values; + return this; + } + + + /** + * The limit of the number of items to fetch; defaults to 50 + */ + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * The limit of the number of items to fetch; defaults to 50 + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + + /** + * The maximum distance to search, defaults to 0.25 + */ + public Builder maxDistance(double maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = Optional.ofNullable(maxDistance); + return this; + } + + /** + * The maximum distance to search, defaults to 0.25 + */ + public Builder maxDistance(Optional maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = maxDistance; + return this; + } + + public GetSonicallySimilarRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSonicallySimilarRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + type, values, limit, + maxDistance); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarRequestBuilder.java new file mode 100644 index 00000000..91d876e0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSonicallySimilar; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetSonicallySimilarRequestBuilder { + + private GetSonicallySimilarRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSonicallySimilarRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSonicallySimilarRequestBuilder request(GetSonicallySimilarRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSonicallySimilarResponse call() throws Exception { + + RequestOperation operation + = new GetSonicallySimilar.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarResponse.java new file mode 100644 index 00000000..0b5be7c8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSonicallySimilarResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class GetSonicallySimilarResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public GetSonicallySimilarResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public GetSonicallySimilarResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSonicallySimilarResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSonicallySimilarResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSonicallySimilarResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSonicallySimilarResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetSonicallySimilarResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSonicallySimilarResponse other = (GetSonicallySimilarResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetSonicallySimilarResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetSonicallySimilarResponse build() { + + return new GetSonicallySimilarResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationMediaContainer.java new file mode 100644 index 00000000..47d80556 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationMediaContainer.java @@ -0,0 +1,329 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +/** + * GetSourceConnectionInformationMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetSourceConnectionInformationMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional device; + + @JsonCreator + public GetSourceConnectionInformationMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Device") Optional device) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(device, "device"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.device = device; + } + + public GetSourceConnectionInformationMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional device() { + return (Optional) device; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetSourceConnectionInformationMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetSourceConnectionInformationMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetSourceConnectionInformationMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetSourceConnectionInformationMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetSourceConnectionInformationMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetSourceConnectionInformationMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetSourceConnectionInformationMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetSourceConnectionInformationMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetSourceConnectionInformationMediaContainer withDevice(Device device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public GetSourceConnectionInformationMediaContainer withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSourceConnectionInformationMediaContainer other = (GetSourceConnectionInformationMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.device, other.device); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, device); + } + + @Override + public String toString() { + return Utils.toString(GetSourceConnectionInformationMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "device", device); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional device = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder device(Device device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public GetSourceConnectionInformationMediaContainer build() { + + return new GetSourceConnectionInformationMediaContainer( + identifier, offset, size, + totalSize, device); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationRequest.java index aaeff9b4..8085b479 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationRequest.java @@ -5,24 +5,236 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; 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.Optional; public class GetSourceConnectionInformationRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + /** * The source identifier with an included prefix. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=source") private String source; + /** + * Force refresh + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=refresh") + private Optional refresh; + @JsonCreator public GetSourceConnectionInformationRequest( - String source) { + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String source, + Optional refresh) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); Utils.checkNotNull(source, "source"); + Utils.checkNotNull(refresh, "refresh"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; this.source = source; + this.refresh = refresh; + } + + public GetSourceConnectionInformationRequest( + String source) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), source, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; } /** @@ -33,11 +245,229 @@ public class GetSourceConnectionInformationRequest { return source; } + /** + * Force refresh + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional refresh() { + return (Optional) refresh; + } + public static Builder builder() { return new Builder(); } + /** + * Indicates the client accepts the indicated media types + */ + public GetSourceConnectionInformationRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSourceConnectionInformationRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSourceConnectionInformationRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSourceConnectionInformationRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSourceConnectionInformationRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSourceConnectionInformationRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSourceConnectionInformationRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSourceConnectionInformationRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSourceConnectionInformationRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSourceConnectionInformationRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSourceConnectionInformationRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSourceConnectionInformationRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSourceConnectionInformationRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSourceConnectionInformationRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSourceConnectionInformationRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSourceConnectionInformationRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSourceConnectionInformationRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSourceConnectionInformationRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSourceConnectionInformationRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSourceConnectionInformationRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSourceConnectionInformationRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSourceConnectionInformationRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + /** * The source identifier with an included prefix. */ @@ -47,6 +477,25 @@ public class GetSourceConnectionInformationRequest { return this; } + /** + * Force refresh + */ + public GetSourceConnectionInformationRequest withRefresh(BoolInt refresh) { + Utils.checkNotNull(refresh, "refresh"); + this.refresh = Optional.ofNullable(refresh); + return this; + } + + + /** + * Force refresh + */ + public GetSourceConnectionInformationRequest withRefresh(Optional refresh) { + Utils.checkNotNull(refresh, "refresh"); + this.refresh = refresh; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -57,31 +506,292 @@ public class GetSourceConnectionInformationRequest { } GetSourceConnectionInformationRequest other = (GetSourceConnectionInformationRequest) o; return - Utils.enhancedDeepEquals(this.source, other.source); + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.source, other.source) && + Utils.enhancedDeepEquals(this.refresh, other.refresh); } @Override public int hashCode() { return Utils.enhancedHash( - source); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, source, + refresh); } @Override public String toString() { return Utils.toString(GetSourceConnectionInformationRequest.class, - "source", source); + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "source", source, + "refresh", refresh); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + private String source; + private Optional refresh = Optional.empty(); + private Builder() { // force use of static builder() method } + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** * The source identifier with an included prefix. */ @@ -91,11 +801,43 @@ public class GetSourceConnectionInformationRequest { return this; } - public GetSourceConnectionInformationRequest build() { - return new GetSourceConnectionInformationRequest( - source); + /** + * Force refresh + */ + public Builder refresh(BoolInt refresh) { + Utils.checkNotNull(refresh, "refresh"); + this.refresh = Optional.ofNullable(refresh); + return this; } + /** + * Force refresh + */ + public Builder refresh(Optional refresh) { + Utils.checkNotNull(refresh, "refresh"); + this.refresh = refresh; + return this; + } + + public GetSourceConnectionInformationRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSourceConnectionInformationRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, source, + refresh); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationRequestBuilder.java index e33ab82b..10934217 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationRequestBuilder.java @@ -9,36 +9,26 @@ import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.operations.GetSourceConnectionInformation; import dev.plexapi.sdk.utils.Utils; import java.lang.Exception; -import java.lang.String; public class GetSourceConnectionInformationRequestBuilder { - private String source; + private GetSourceConnectionInformationRequest request; private final SDKConfiguration sdkConfiguration; public GetSourceConnectionInformationRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public GetSourceConnectionInformationRequestBuilder source(String source) { - Utils.checkNotNull(source, "source"); - this.source = source; + public GetSourceConnectionInformationRequestBuilder request(GetSourceConnectionInformationRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private GetSourceConnectionInformationRequest buildRequest() { - - GetSourceConnectionInformationRequest request = new GetSourceConnectionInformationRequest(source); - - return request; - } - public GetSourceConnectionInformationResponse call() throws Exception { RequestOperation operation = new GetSourceConnectionInformation.Sync(sdkConfiguration); - GetSourceConnectionInformationRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationResponse.java index 6eae4cca..1f1213d7 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationResponse.java @@ -11,7 +11,9 @@ 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.Optional; public class GetSourceConnectionInformationResponse implements Response { @@ -30,17 +32,33 @@ public class GetSourceConnectionInformationResponse implements Response { */ private HttpResponse rawResponse; + /** + * OK + */ + private Optional object; + @JsonCreator public GetSourceConnectionInformationResponse( String contentType, int statusCode, - HttpResponse rawResponse) { + 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 GetSourceConnectionInformationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -67,6 +85,15 @@ public class GetSourceConnectionInformationResponse implements Response { return rawResponse; } + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + public static Builder builder() { return new Builder(); } @@ -99,6 +126,25 @@ public class GetSourceConnectionInformationResponse implements Response { return this; } + /** + * OK + */ + public GetSourceConnectionInformationResponse withObject(GetSourceConnectionInformationResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetSourceConnectionInformationResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -111,13 +157,15 @@ public class GetSourceConnectionInformationResponse implements Response { return Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); } @Override public int hashCode() { return Utils.enhancedHash( - contentType, statusCode, rawResponse); + contentType, statusCode, rawResponse, + object); } @Override @@ -125,7 +173,8 @@ public class GetSourceConnectionInformationResponse implements Response { return Utils.toString(GetSourceConnectionInformationResponse.class, "contentType", contentType, "statusCode", statusCode, - "rawResponse", rawResponse); + "rawResponse", rawResponse, + "object", object); } @SuppressWarnings("UnusedReturnValue") @@ -137,6 +186,8 @@ public class GetSourceConnectionInformationResponse implements Response { private HttpResponse rawResponse; + private Optional object = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -171,10 +222,30 @@ public class GetSourceConnectionInformationResponse implements Response { return this; } + + /** + * OK + */ + public Builder object(GetSourceConnectionInformationResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + public GetSourceConnectionInformationResponse build() { return new GetSourceConnectionInformationResponse( - contentType, statusCode, rawResponse); + contentType, statusCode, rawResponse, + object); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationResponseBody.java new file mode 100644 index 00000000..4f92be13 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSourceConnectionInformationResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetSourceConnectionInformationResponseBody + * + *

OK + */ +public class GetSourceConnectionInformationResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetSourceConnectionInformationResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetSourceConnectionInformationResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetSourceConnectionInformationResponseBody withMediaContainer(GetSourceConnectionInformationMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetSourceConnectionInformationResponseBody 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; + } + GetSourceConnectionInformationResponseBody other = (GetSourceConnectionInformationResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetSourceConnectionInformationResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetSourceConnectionInformationMediaContainer 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 GetSourceConnectionInformationResponseBody build() { + + return new GetSourceConnectionInformationResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsDevice.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsDevice.java deleted file mode 100644 index b3e4893c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsDevice.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetStatisticsDevice { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("name") - private Optional name; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("platform") - private Optional platform; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("clientIdentifier") - private Optional clientIdentifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("createdAt") - private Optional createdAt; - - @JsonCreator - public GetStatisticsDevice( - @JsonProperty("id") Optional id, - @JsonProperty("name") Optional name, - @JsonProperty("platform") Optional platform, - @JsonProperty("clientIdentifier") Optional clientIdentifier, - @JsonProperty("createdAt") Optional createdAt) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(platform, "platform"); - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - Utils.checkNotNull(createdAt, "createdAt"); - this.id = id; - this.name = name; - this.platform = platform; - this.clientIdentifier = clientIdentifier; - this.createdAt = createdAt; - } - - public GetStatisticsDevice() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional name() { - return name; - } - - @JsonIgnore - public Optional platform() { - return platform; - } - - @JsonIgnore - public Optional clientIdentifier() { - return clientIdentifier; - } - - @JsonIgnore - public Optional createdAt() { - return createdAt; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetStatisticsDevice withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetStatisticsDevice withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetStatisticsDevice withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - - public GetStatisticsDevice withName(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public GetStatisticsDevice withPlatform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - - public GetStatisticsDevice withPlatform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - public GetStatisticsDevice withClientIdentifier(String clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = Optional.ofNullable(clientIdentifier); - return this; - } - - - public GetStatisticsDevice withClientIdentifier(Optional clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = clientIdentifier; - return this; - } - - public GetStatisticsDevice withCreatedAt(int createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - - public GetStatisticsDevice withCreatedAt(Optional createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetStatisticsDevice other = (GetStatisticsDevice) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.platform, other.platform) && - Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, name, platform, - clientIdentifier, createdAt); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsDevice.class, - "id", id, - "name", name, - "platform", platform, - "clientIdentifier", clientIdentifier, - "createdAt", createdAt); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional platform = Optional.empty(); - - private Optional clientIdentifier = Optional.empty(); - - private Optional createdAt = 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 name(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - public Builder name(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder platform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - public Builder platform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - - public Builder clientIdentifier(String clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = Optional.ofNullable(clientIdentifier); - return this; - } - - public Builder clientIdentifier(Optional clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = clientIdentifier; - return this; - } - - - public Builder createdAt(int createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - public Builder createdAt(Optional createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - public GetStatisticsDevice build() { - - return new GetStatisticsDevice( - id, name, platform, - clientIdentifier, createdAt); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsMediaContainer.java deleted file mode 100644 index e51ddccd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsMediaContainer.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetStatisticsMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Device") - private Optional> device; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Account") - private Optional> account; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("StatisticsMedia") - private Optional> statisticsMedia; - - @JsonCreator - public GetStatisticsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("Device") Optional> device, - @JsonProperty("Account") Optional> account, - @JsonProperty("StatisticsMedia") Optional> statisticsMedia) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(device, "device"); - Utils.checkNotNull(account, "account"); - Utils.checkNotNull(statisticsMedia, "statisticsMedia"); - this.size = size; - this.device = device; - this.account = account; - this.statisticsMedia = statisticsMedia; - } - - public GetStatisticsMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> device() { - return (Optional>) device; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> account() { - return (Optional>) account; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> statisticsMedia() { - return (Optional>) statisticsMedia; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetStatisticsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetStatisticsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetStatisticsMediaContainer withDevice(List device) { - Utils.checkNotNull(device, "device"); - this.device = Optional.ofNullable(device); - return this; - } - - - public GetStatisticsMediaContainer withDevice(Optional> device) { - Utils.checkNotNull(device, "device"); - this.device = device; - return this; - } - - public GetStatisticsMediaContainer withAccount(List account) { - Utils.checkNotNull(account, "account"); - this.account = Optional.ofNullable(account); - return this; - } - - - public GetStatisticsMediaContainer withAccount(Optional> account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - public GetStatisticsMediaContainer withStatisticsMedia(List statisticsMedia) { - Utils.checkNotNull(statisticsMedia, "statisticsMedia"); - this.statisticsMedia = Optional.ofNullable(statisticsMedia); - return this; - } - - - public GetStatisticsMediaContainer withStatisticsMedia(Optional> statisticsMedia) { - Utils.checkNotNull(statisticsMedia, "statisticsMedia"); - this.statisticsMedia = statisticsMedia; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetStatisticsMediaContainer other = (GetStatisticsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.device, other.device) && - Utils.enhancedDeepEquals(this.account, other.account) && - Utils.enhancedDeepEquals(this.statisticsMedia, other.statisticsMedia); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, device, account, - statisticsMedia); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsMediaContainer.class, - "size", size, - "device", device, - "account", account, - "statisticsMedia", statisticsMedia); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> device = Optional.empty(); - - private Optional> account = Optional.empty(); - - private Optional> statisticsMedia = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 device(List device) { - Utils.checkNotNull(device, "device"); - this.device = Optional.ofNullable(device); - return this; - } - - public Builder device(Optional> device) { - Utils.checkNotNull(device, "device"); - this.device = device; - return this; - } - - - public Builder account(List account) { - Utils.checkNotNull(account, "account"); - this.account = Optional.ofNullable(account); - return this; - } - - public Builder account(Optional> account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - - public Builder statisticsMedia(List statisticsMedia) { - Utils.checkNotNull(statisticsMedia, "statisticsMedia"); - this.statisticsMedia = Optional.ofNullable(statisticsMedia); - return this; - } - - public Builder statisticsMedia(Optional> statisticsMedia) { - Utils.checkNotNull(statisticsMedia, "statisticsMedia"); - this.statisticsMedia = statisticsMedia; - return this; - } - - public GetStatisticsMediaContainer build() { - - return new GetStatisticsMediaContainer( - size, device, account, - statisticsMedia); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsRequest.java deleted file mode 100644 index 242785f2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsRequest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetStatisticsRequest { - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timespan") - private Optional timespan; - - @JsonCreator - public GetStatisticsRequest( - Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - } - - public GetStatisticsRequest() { - this(Optional.empty()); - } - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - @JsonIgnore - public Optional timespan() { - return timespan; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public GetStatisticsRequest withTimespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public GetStatisticsRequest withTimespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetStatisticsRequest other = (GetStatisticsRequest) o; - return - Utils.enhancedDeepEquals(this.timespan, other.timespan); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - timespan); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsRequest.class, - "timespan", timespan); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional timespan = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public Builder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - /** - * The timespan to retrieve statistics for - * the exact meaning of this parameter is not known - */ - public Builder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - public GetStatisticsRequest build() { - - return new GetStatisticsRequest( - timespan); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsRequestBuilder.java deleted file mode 100644 index 795dd7f0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsRequestBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetStatistics; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.util.Optional; - -public class GetStatisticsRequestBuilder { - - private Optional timespan = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetStatisticsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetStatisticsRequestBuilder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.of(timespan); - return this; - } - - public GetStatisticsRequestBuilder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - - private GetStatisticsRequest buildRequest() { - - GetStatisticsRequest request = new GetStatisticsRequest(timespan); - - return request; - } - - public GetStatisticsResponse call() throws Exception { - - RequestOperation operation - = new GetStatistics.Sync(sdkConfiguration); - GetStatisticsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsResponse.java deleted file mode 100644 index c5a60686..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetStatisticsResponse 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; - - /** - * Media Statistics - */ - private Optional object; - - @JsonCreator - public GetStatisticsResponse( - 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 GetStatisticsResponse( - 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; - } - - /** - * Media Statistics - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetStatisticsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetStatisticsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetStatisticsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Media Statistics - */ - public GetStatisticsResponse withObject(GetStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Media Statistics - */ - public GetStatisticsResponse 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; - } - GetStatisticsResponse other = (GetStatisticsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Media Statistics - */ - public Builder object(GetStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Media Statistics - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetStatisticsResponse build() { - - return new GetStatisticsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsResponseBody.java deleted file mode 100644 index c8ab9218..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetStatisticsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetStatisticsResponseBody - * - *

Media Statistics - */ -public class GetStatisticsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetStatisticsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetStatisticsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetStatisticsResponseBody withMediaContainer(GetStatisticsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetStatisticsResponseBody 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; - } - GetStatisticsResponseBody other = (GetStatisticsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetStatisticsMediaContainer 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 GetStatisticsResponseBody build() { - - return new GetStatisticsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsLevel.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsLevel.java new file mode 100644 index 00000000..347e1b2e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsLevel.java @@ -0,0 +1,129 @@ +/* + * 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.Double; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GetStreamLevelsLevel { + /** + * The level in db. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("v") + private Optional v; + + @JsonCreator + public GetStreamLevelsLevel( + @JsonProperty("v") Optional v) { + Utils.checkNotNull(v, "v"); + this.v = v; + } + + public GetStreamLevelsLevel() { + this(Optional.empty()); + } + + /** + * The level in db. + */ + @JsonIgnore + public Optional v() { + return v; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The level in db. + */ + public GetStreamLevelsLevel withV(double v) { + Utils.checkNotNull(v, "v"); + this.v = Optional.ofNullable(v); + return this; + } + + + /** + * The level in db. + */ + public GetStreamLevelsLevel withV(Optional v) { + Utils.checkNotNull(v, "v"); + this.v = v; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStreamLevelsLevel other = (GetStreamLevelsLevel) o; + return + Utils.enhancedDeepEquals(this.v, other.v); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + v); + } + + @Override + public String toString() { + return Utils.toString(GetStreamLevelsLevel.class, + "v", v); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional v = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The level in db. + */ + public Builder v(double v) { + Utils.checkNotNull(v, "v"); + this.v = Optional.ofNullable(v); + return this; + } + + /** + * The level in db. + */ + public Builder v(Optional v) { + Utils.checkNotNull(v, "v"); + this.v = v; + return this; + } + + public GetStreamLevelsLevel build() { + + return new GetStreamLevelsLevel( + v); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsMediaContainer.java new file mode 100644 index 00000000..93542d57 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsMediaContainer.java @@ -0,0 +1,390 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetStreamLevelsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetStreamLevelsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Level") + private Optional> level; + + /** + * The total number of samples (as a string) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSamples") + private Optional totalSamples; + + @JsonCreator + public GetStreamLevelsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Level") Optional> level, + @JsonProperty("totalSamples") Optional totalSamples) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(level, "level"); + Utils.checkNotNull(totalSamples, "totalSamples"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.level = level; + this.totalSamples = totalSamples; + } + + public GetStreamLevelsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> level() { + return (Optional>) level; + } + + /** + * The total number of samples (as a string) + */ + @JsonIgnore + public Optional totalSamples() { + return totalSamples; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetStreamLevelsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetStreamLevelsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetStreamLevelsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetStreamLevelsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetStreamLevelsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetStreamLevelsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetStreamLevelsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetStreamLevelsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetStreamLevelsMediaContainer withLevel(List level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + + public GetStreamLevelsMediaContainer withLevel(Optional> level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + /** + * The total number of samples (as a string) + */ + public GetStreamLevelsMediaContainer withTotalSamples(String totalSamples) { + Utils.checkNotNull(totalSamples, "totalSamples"); + this.totalSamples = Optional.ofNullable(totalSamples); + return this; + } + + + /** + * The total number of samples (as a string) + */ + public GetStreamLevelsMediaContainer withTotalSamples(Optional totalSamples) { + Utils.checkNotNull(totalSamples, "totalSamples"); + this.totalSamples = totalSamples; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStreamLevelsMediaContainer other = (GetStreamLevelsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.level, other.level) && + Utils.enhancedDeepEquals(this.totalSamples, other.totalSamples); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, level, totalSamples); + } + + @Override + public String toString() { + return Utils.toString(GetStreamLevelsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "level", level, + "totalSamples", totalSamples); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> level = Optional.empty(); + + private Optional totalSamples = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder level(List 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; + } + + + /** + * The total number of samples (as a string) + */ + public Builder totalSamples(String totalSamples) { + Utils.checkNotNull(totalSamples, "totalSamples"); + this.totalSamples = Optional.ofNullable(totalSamples); + return this; + } + + /** + * The total number of samples (as a string) + */ + public Builder totalSamples(Optional totalSamples) { + Utils.checkNotNull(totalSamples, "totalSamples"); + this.totalSamples = totalSamples; + return this; + } + + public GetStreamLevelsMediaContainer build() { + + return new GetStreamLevelsMediaContainer( + identifier, offset, size, + totalSize, level, totalSamples); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsRequest.java new file mode 100644 index 00000000..036001c8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsRequest.java @@ -0,0 +1,842 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetStreamLevelsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the stream + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=streamId") + private long streamId; + + /** + * Subsample result down to return only the provided number of samples + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subsample") + private Optional subsample; + + @JsonCreator + public GetStreamLevelsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long streamId, + Optional subsample) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(streamId, "streamId"); + Utils.checkNotNull(subsample, "subsample"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.streamId = streamId; + this.subsample = subsample; + } + + public GetStreamLevelsRequest( + long streamId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), streamId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the stream + */ + @JsonIgnore + public long streamId() { + return streamId; + } + + /** + * Subsample result down to return only the provided number of samples + */ + @JsonIgnore + public Optional subsample() { + return subsample; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetStreamLevelsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetStreamLevelsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetStreamLevelsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetStreamLevelsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetStreamLevelsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetStreamLevelsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetStreamLevelsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetStreamLevelsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetStreamLevelsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetStreamLevelsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetStreamLevelsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetStreamLevelsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetStreamLevelsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetStreamLevelsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetStreamLevelsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetStreamLevelsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetStreamLevelsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetStreamLevelsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetStreamLevelsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetStreamLevelsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetStreamLevelsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetStreamLevelsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the stream + */ + public GetStreamLevelsRequest withStreamId(long streamId) { + Utils.checkNotNull(streamId, "streamId"); + this.streamId = streamId; + return this; + } + + /** + * Subsample result down to return only the provided number of samples + */ + public GetStreamLevelsRequest withSubsample(long subsample) { + Utils.checkNotNull(subsample, "subsample"); + this.subsample = Optional.ofNullable(subsample); + return this; + } + + + /** + * Subsample result down to return only the provided number of samples + */ + public GetStreamLevelsRequest withSubsample(Optional subsample) { + Utils.checkNotNull(subsample, "subsample"); + this.subsample = subsample; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStreamLevelsRequest other = (GetStreamLevelsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.streamId, other.streamId) && + Utils.enhancedDeepEquals(this.subsample, other.subsample); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, streamId, + subsample); + } + + @Override + public String toString() { + return Utils.toString(GetStreamLevelsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "streamId", streamId, + "subsample", subsample); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long streamId; + + private Optional subsample = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the stream + */ + public Builder streamId(long streamId) { + Utils.checkNotNull(streamId, "streamId"); + this.streamId = streamId; + return this; + } + + + /** + * Subsample result down to return only the provided number of samples + */ + public Builder subsample(long subsample) { + Utils.checkNotNull(subsample, "subsample"); + this.subsample = Optional.ofNullable(subsample); + return this; + } + + /** + * Subsample result down to return only the provided number of samples + */ + public Builder subsample(Optional subsample) { + Utils.checkNotNull(subsample, "subsample"); + this.subsample = subsample; + return this; + } + + public GetStreamLevelsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetStreamLevelsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, streamId, + subsample); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsRequestBuilder.java new file mode 100644 index 00000000..8c7c156e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetStreamLevels; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetStreamLevelsRequestBuilder { + + private GetStreamLevelsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetStreamLevelsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetStreamLevelsRequestBuilder request(GetStreamLevelsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetStreamLevelsResponse call() throws Exception { + + RequestOperation operation + = new GetStreamLevels.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsResponse.java new file mode 100644 index 00000000..fa13adbb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetStreamLevelsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetStreamLevelsResponse( + 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 GetStreamLevelsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetStreamLevelsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetStreamLevelsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetStreamLevelsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetStreamLevelsResponse withObject(GetStreamLevelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetStreamLevelsResponse 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; + } + GetStreamLevelsResponse other = (GetStreamLevelsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetStreamLevelsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetStreamLevelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetStreamLevelsResponse build() { + + return new GetStreamLevelsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsResponseBody.java new file mode 100644 index 00000000..f50826cd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLevelsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetStreamLevelsResponseBody + * + *

OK + */ +public class GetStreamLevelsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetStreamLevelsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetStreamLevelsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetStreamLevelsResponseBody withMediaContainer(GetStreamLevelsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetStreamLevelsResponseBody 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; + } + GetStreamLevelsResponseBody other = (GetStreamLevelsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetStreamLevelsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetStreamLevelsMediaContainer 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 GetStreamLevelsResponseBody build() { + + return new GetStreamLevelsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessRequest.java new file mode 100644 index 00000000..31f6cf44 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessRequest.java @@ -0,0 +1,842 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetStreamLoudnessRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the stream + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=streamId") + private long streamId; + + /** + * Subsample result down to return only the provided number of samples + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subsample") + private Optional subsample; + + @JsonCreator + public GetStreamLoudnessRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long streamId, + Optional subsample) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(streamId, "streamId"); + Utils.checkNotNull(subsample, "subsample"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.streamId = streamId; + this.subsample = subsample; + } + + public GetStreamLoudnessRequest( + long streamId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), streamId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the stream + */ + @JsonIgnore + public long streamId() { + return streamId; + } + + /** + * Subsample result down to return only the provided number of samples + */ + @JsonIgnore + public Optional subsample() { + return subsample; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetStreamLoudnessRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetStreamLoudnessRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetStreamLoudnessRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetStreamLoudnessRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetStreamLoudnessRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetStreamLoudnessRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetStreamLoudnessRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetStreamLoudnessRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetStreamLoudnessRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetStreamLoudnessRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetStreamLoudnessRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetStreamLoudnessRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetStreamLoudnessRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetStreamLoudnessRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetStreamLoudnessRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetStreamLoudnessRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetStreamLoudnessRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetStreamLoudnessRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetStreamLoudnessRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetStreamLoudnessRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetStreamLoudnessRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetStreamLoudnessRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the stream + */ + public GetStreamLoudnessRequest withStreamId(long streamId) { + Utils.checkNotNull(streamId, "streamId"); + this.streamId = streamId; + return this; + } + + /** + * Subsample result down to return only the provided number of samples + */ + public GetStreamLoudnessRequest withSubsample(long subsample) { + Utils.checkNotNull(subsample, "subsample"); + this.subsample = Optional.ofNullable(subsample); + return this; + } + + + /** + * Subsample result down to return only the provided number of samples + */ + public GetStreamLoudnessRequest withSubsample(Optional subsample) { + Utils.checkNotNull(subsample, "subsample"); + this.subsample = subsample; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStreamLoudnessRequest other = (GetStreamLoudnessRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.streamId, other.streamId) && + Utils.enhancedDeepEquals(this.subsample, other.subsample); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, streamId, + subsample); + } + + @Override + public String toString() { + return Utils.toString(GetStreamLoudnessRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "streamId", streamId, + "subsample", subsample); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long streamId; + + private Optional subsample = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the stream + */ + public Builder streamId(long streamId) { + Utils.checkNotNull(streamId, "streamId"); + this.streamId = streamId; + return this; + } + + + /** + * Subsample result down to return only the provided number of samples + */ + public Builder subsample(long subsample) { + Utils.checkNotNull(subsample, "subsample"); + this.subsample = Optional.ofNullable(subsample); + return this; + } + + /** + * Subsample result down to return only the provided number of samples + */ + public Builder subsample(Optional subsample) { + Utils.checkNotNull(subsample, "subsample"); + this.subsample = subsample; + return this; + } + + public GetStreamLoudnessRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetStreamLoudnessRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, streamId, + subsample); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessRequestBuilder.java new file mode 100644 index 00000000..c68dba4e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetStreamLoudness; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetStreamLoudnessRequestBuilder { + + private GetStreamLoudnessRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetStreamLoudnessRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetStreamLoudnessRequestBuilder request(GetStreamLoudnessRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetStreamLoudnessResponse call() throws Exception { + + RequestOperation operation + = new GetStreamLoudness.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessResponse.java new file mode 100644 index 00000000..1fe21410 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamLoudnessResponse.java @@ -0,0 +1,250 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetStreamLoudnessResponse 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; + + /** + * OK + */ + private Optional res; + + @JsonCreator + public GetStreamLoudnessResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional res) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(res, "res"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.res = res; + } + + public GetStreamLoudnessResponse( + 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; + } + + /** + * OK + */ + @JsonIgnore + public Optional res() { + return res; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetStreamLoudnessResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetStreamLoudnessResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetStreamLoudnessResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetStreamLoudnessResponse withRes(String res) { + Utils.checkNotNull(res, "res"); + this.res = Optional.ofNullable(res); + return this; + } + + + /** + * OK + */ + public GetStreamLoudnessResponse withRes(Optional res) { + Utils.checkNotNull(res, "res"); + this.res = res; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStreamLoudnessResponse other = (GetStreamLoudnessResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.res, other.res); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + res); + } + + @Override + public String toString() { + return Utils.toString(GetStreamLoudnessResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "res", res); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional res = 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; + } + + + /** + * OK + */ + public Builder res(String res) { + Utils.checkNotNull(res, "res"); + this.res = Optional.ofNullable(res); + return this; + } + + /** + * OK + */ + public Builder res(Optional res) { + Utils.checkNotNull(res, "res"); + this.res = res; + return this; + } + + public GetStreamLoudnessResponse build() { + + return new GetStreamLoudnessResponse( + contentType, statusCode, rawResponse, + res); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamRequest.java new file mode 100644 index 00000000..5f49ba2f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamRequest.java @@ -0,0 +1,1006 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetStreamRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the stream + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=streamId") + private long streamId; + + /** + * The extension of the stream. Required to fetch the `sub` portion of `idx`/`sub` subtitles + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ext") + private String ext; + + /** + * The requested encoding for the subtitle (only used for text subtitles) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=encoding") + private Optional encoding; + + /** + * The requested format for the subtitle to convert the subtitles to (only used for text subtitles) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=format") + private Optional format; + + /** + * Whether the server should attempt to automatically adjust the subtitle timestamps to match the media + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustSubtitle") + private Optional autoAdjustSubtitle; + + @JsonCreator + public GetStreamRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long streamId, + String ext, + Optional encoding, + Optional format, + Optional autoAdjustSubtitle) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(streamId, "streamId"); + Utils.checkNotNull(ext, "ext"); + Utils.checkNotNull(encoding, "encoding"); + Utils.checkNotNull(format, "format"); + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.streamId = streamId; + this.ext = ext; + this.encoding = encoding; + this.format = format; + this.autoAdjustSubtitle = autoAdjustSubtitle; + } + + public GetStreamRequest( + long streamId, + String ext) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), streamId, + ext, Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the stream + */ + @JsonIgnore + public long streamId() { + return streamId; + } + + /** + * The extension of the stream. Required to fetch the `sub` portion of `idx`/`sub` subtitles + */ + @JsonIgnore + public String ext() { + return ext; + } + + /** + * The requested encoding for the subtitle (only used for text subtitles) + */ + @JsonIgnore + public Optional encoding() { + return encoding; + } + + /** + * The requested format for the subtitle to convert the subtitles to (only used for text subtitles) + */ + @JsonIgnore + public Optional format() { + return format; + } + + /** + * Whether the server should attempt to automatically adjust the subtitle timestamps to match the media + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional autoAdjustSubtitle() { + return (Optional) autoAdjustSubtitle; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetStreamRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetStreamRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetStreamRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetStreamRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetStreamRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetStreamRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetStreamRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetStreamRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetStreamRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetStreamRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetStreamRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetStreamRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetStreamRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetStreamRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetStreamRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetStreamRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetStreamRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetStreamRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetStreamRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetStreamRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetStreamRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetStreamRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the stream + */ + public GetStreamRequest withStreamId(long streamId) { + Utils.checkNotNull(streamId, "streamId"); + this.streamId = streamId; + return this; + } + + /** + * The extension of the stream. Required to fetch the `sub` portion of `idx`/`sub` subtitles + */ + public GetStreamRequest withExt(String ext) { + Utils.checkNotNull(ext, "ext"); + this.ext = ext; + return this; + } + + /** + * The requested encoding for the subtitle (only used for text subtitles) + */ + public GetStreamRequest withEncoding(String encoding) { + Utils.checkNotNull(encoding, "encoding"); + this.encoding = Optional.ofNullable(encoding); + return this; + } + + + /** + * The requested encoding for the subtitle (only used for text subtitles) + */ + public GetStreamRequest withEncoding(Optional encoding) { + Utils.checkNotNull(encoding, "encoding"); + this.encoding = encoding; + return this; + } + + /** + * The requested format for the subtitle to convert the subtitles to (only used for text subtitles) + */ + public GetStreamRequest withFormat(String format) { + Utils.checkNotNull(format, "format"); + this.format = Optional.ofNullable(format); + return this; + } + + + /** + * The requested format for the subtitle to convert the subtitles to (only used for text subtitles) + */ + public GetStreamRequest withFormat(Optional format) { + Utils.checkNotNull(format, "format"); + this.format = format; + return this; + } + + /** + * Whether the server should attempt to automatically adjust the subtitle timestamps to match the media + */ + public GetStreamRequest withAutoAdjustSubtitle(BoolInt autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + + /** + * Whether the server should attempt to automatically adjust the subtitle timestamps to match the media + */ + public GetStreamRequest withAutoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStreamRequest other = (GetStreamRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.streamId, other.streamId) && + Utils.enhancedDeepEquals(this.ext, other.ext) && + Utils.enhancedDeepEquals(this.encoding, other.encoding) && + Utils.enhancedDeepEquals(this.format, other.format) && + Utils.enhancedDeepEquals(this.autoAdjustSubtitle, other.autoAdjustSubtitle); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, streamId, + ext, encoding, format, + autoAdjustSubtitle); + } + + @Override + public String toString() { + return Utils.toString(GetStreamRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "streamId", streamId, + "ext", ext, + "encoding", encoding, + "format", format, + "autoAdjustSubtitle", autoAdjustSubtitle); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long streamId; + + private String ext; + + private Optional encoding = Optional.empty(); + + private Optional format = Optional.empty(); + + private Optional autoAdjustSubtitle = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the stream + */ + public Builder streamId(long streamId) { + Utils.checkNotNull(streamId, "streamId"); + this.streamId = streamId; + return this; + } + + + /** + * The extension of the stream. Required to fetch the `sub` portion of `idx`/`sub` subtitles + */ + public Builder ext(String ext) { + Utils.checkNotNull(ext, "ext"); + this.ext = ext; + return this; + } + + + /** + * The requested encoding for the subtitle (only used for text subtitles) + */ + public Builder encoding(String encoding) { + Utils.checkNotNull(encoding, "encoding"); + this.encoding = Optional.ofNullable(encoding); + return this; + } + + /** + * The requested encoding for the subtitle (only used for text subtitles) + */ + public Builder encoding(Optional encoding) { + Utils.checkNotNull(encoding, "encoding"); + this.encoding = encoding; + return this; + } + + + /** + * The requested format for the subtitle to convert the subtitles to (only used for text subtitles) + */ + public Builder format(String format) { + Utils.checkNotNull(format, "format"); + this.format = Optional.ofNullable(format); + return this; + } + + /** + * The requested format for the subtitle to convert the subtitles to (only used for text subtitles) + */ + public Builder format(Optional format) { + Utils.checkNotNull(format, "format"); + this.format = format; + return this; + } + + + /** + * Whether the server should attempt to automatically adjust the subtitle timestamps to match the media + */ + public Builder autoAdjustSubtitle(BoolInt autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + /** + * Whether the server should attempt to automatically adjust the subtitle timestamps to match the media + */ + public Builder autoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + public GetStreamRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetStreamRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, streamId, + ext, encoding, format, + autoAdjustSubtitle); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamRequestBuilder.java new file mode 100644 index 00000000..f1973609 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetStream; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetStreamRequestBuilder { + + private GetStreamRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetStreamRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetStreamRequestBuilder request(GetStreamRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetStreamResponse call() throws Exception { + + RequestOperation operation + = new GetStream.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetStreamResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamResponse.java new file mode 100644 index 00000000..6514af0f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetStreamResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetStreamResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetStreamResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetStreamResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetStreamResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetStreamResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStreamResponse other = (GetStreamResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetStreamResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetStreamResponse build() { + + return new GetStreamResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionRequest.java new file mode 100644 index 00000000..752a5ad9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionRequest.java @@ -0,0 +1,893 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetSubscriptionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriptionId") + private long subscriptionId; + + /** + * Indicates whether the active grabs should be included as well + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGrabs") + private Optional includeGrabs; + + /** + * Compute the storage of recorded items desired by this subscription + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeStorage") + private Optional includeStorage; + + @JsonCreator + public GetSubscriptionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long subscriptionId, + Optional includeGrabs, + Optional includeStorage) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(subscriptionId, "subscriptionId"); + Utils.checkNotNull(includeGrabs, "includeGrabs"); + Utils.checkNotNull(includeStorage, "includeStorage"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.subscriptionId = subscriptionId; + this.includeGrabs = includeGrabs; + this.includeStorage = includeStorage; + } + + public GetSubscriptionRequest( + long subscriptionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), subscriptionId, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public long subscriptionId() { + return subscriptionId; + } + + /** + * Indicates whether the active grabs should be included as well + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeGrabs() { + return (Optional) includeGrabs; + } + + /** + * Compute the storage of recorded items desired by this subscription + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeStorage() { + return (Optional) includeStorage; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSubscriptionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetSubscriptionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetSubscriptionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetSubscriptionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetSubscriptionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetSubscriptionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetSubscriptionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetSubscriptionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetSubscriptionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetSubscriptionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetSubscriptionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetSubscriptionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetSubscriptionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetSubscriptionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetSubscriptionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetSubscriptionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetSubscriptionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetSubscriptionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetSubscriptionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetSubscriptionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetSubscriptionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetSubscriptionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public GetSubscriptionRequest withSubscriptionId(long subscriptionId) { + Utils.checkNotNull(subscriptionId, "subscriptionId"); + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Indicates whether the active grabs should be included as well + */ + public GetSubscriptionRequest withIncludeGrabs(BoolInt includeGrabs) { + Utils.checkNotNull(includeGrabs, "includeGrabs"); + this.includeGrabs = Optional.ofNullable(includeGrabs); + return this; + } + + + /** + * Indicates whether the active grabs should be included as well + */ + public GetSubscriptionRequest withIncludeGrabs(Optional includeGrabs) { + Utils.checkNotNull(includeGrabs, "includeGrabs"); + this.includeGrabs = includeGrabs; + return this; + } + + /** + * Compute the storage of recorded items desired by this subscription + */ + public GetSubscriptionRequest withIncludeStorage(BoolInt includeStorage) { + Utils.checkNotNull(includeStorage, "includeStorage"); + this.includeStorage = Optional.ofNullable(includeStorage); + return this; + } + + + /** + * Compute the storage of recorded items desired by this subscription + */ + public GetSubscriptionRequest withIncludeStorage(Optional includeStorage) { + Utils.checkNotNull(includeStorage, "includeStorage"); + this.includeStorage = includeStorage; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSubscriptionRequest other = (GetSubscriptionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.subscriptionId, other.subscriptionId) && + Utils.enhancedDeepEquals(this.includeGrabs, other.includeGrabs) && + Utils.enhancedDeepEquals(this.includeStorage, other.includeStorage); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, subscriptionId, + includeGrabs, includeStorage); + } + + @Override + public String toString() { + return Utils.toString(GetSubscriptionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "subscriptionId", subscriptionId, + "includeGrabs", includeGrabs, + "includeStorage", includeStorage); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long subscriptionId; + + private Optional includeGrabs = Optional.empty(); + + private Optional includeStorage = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder subscriptionId(long subscriptionId) { + Utils.checkNotNull(subscriptionId, "subscriptionId"); + this.subscriptionId = subscriptionId; + return this; + } + + + /** + * Indicates whether the active grabs should be included as well + */ + public Builder includeGrabs(BoolInt includeGrabs) { + Utils.checkNotNull(includeGrabs, "includeGrabs"); + this.includeGrabs = Optional.ofNullable(includeGrabs); + return this; + } + + /** + * Indicates whether the active grabs should be included as well + */ + public Builder includeGrabs(Optional includeGrabs) { + Utils.checkNotNull(includeGrabs, "includeGrabs"); + this.includeGrabs = includeGrabs; + return this; + } + + + /** + * Compute the storage of recorded items desired by this subscription + */ + public Builder includeStorage(BoolInt includeStorage) { + Utils.checkNotNull(includeStorage, "includeStorage"); + this.includeStorage = Optional.ofNullable(includeStorage); + return this; + } + + /** + * Compute the storage of recorded items desired by this subscription + */ + public Builder includeStorage(Optional includeStorage) { + Utils.checkNotNull(includeStorage, "includeStorage"); + this.includeStorage = includeStorage; + return this; + } + + public GetSubscriptionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetSubscriptionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, subscriptionId, + includeGrabs, includeStorage); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionRequestBuilder.java new file mode 100644 index 00000000..fb9a746c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSubscription; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetSubscriptionRequestBuilder { + + private GetSubscriptionRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSubscriptionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSubscriptionRequestBuilder request(GetSubscriptionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSubscriptionResponse call() throws Exception { + + RequestOperation operation + = new GetSubscription.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionResponse.java new file mode 100644 index 00000000..17066211 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSubscriptionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +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.Optional; + + +public class GetSubscriptionResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithSubscription; + + @JsonCreator + public GetSubscriptionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSubscription) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + } + + public GetSubscriptionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSubscription() { + return (Optional) mediaContainerWithSubscription; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSubscriptionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSubscriptionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSubscriptionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSubscriptionResponse withMediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + + /** + * OK + */ + public GetSubscriptionResponse withMediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSubscriptionResponse other = (GetSubscriptionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSubscription, other.mediaContainerWithSubscription); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + @Override + public String toString() { + return Utils.toString(GetSubscriptionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSubscription", mediaContainerWithSubscription); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSubscription = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + public GetSubscriptionResponse build() { + + return new GetSubscriptionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTagsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTagsMediaContainer.java new file mode 100644 index 00000000..75ef01f4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTagsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetTagsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetTagsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonCreator + public GetTagsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Directory") Optional> directory) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(directory, "directory"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.directory = directory; + } + + public GetTagsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetTagsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetTagsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetTagsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetTagsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetTagsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetTagsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetTagsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetTagsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetTagsMediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public GetTagsMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTagsMediaContainer other = (GetTagsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.directory, other.directory); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, directory); + } + + @Override + public String toString() { + return Utils.toString(GetTagsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "directory", directory); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public GetTagsMediaContainer build() { + + return new GetTagsMediaContainer( + identifier, offset, size, + totalSize, directory); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTagsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTagsRequest.java new file mode 100644 index 00000000..43c78b0a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTagsRequest.java @@ -0,0 +1,798 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetTagsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The metadata type to filter by + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + @JsonCreator + public GetTagsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional type) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(type, "type"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.type = type; + } + + public GetTagsRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The metadata type to filter by + */ + @JsonIgnore + public Optional type() { + return type; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetTagsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetTagsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetTagsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetTagsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetTagsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetTagsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetTagsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetTagsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetTagsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetTagsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetTagsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetTagsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetTagsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetTagsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetTagsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetTagsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetTagsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetTagsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetTagsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetTagsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetTagsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetTagsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The metadata type to filter by + */ + public GetTagsRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The metadata type to filter by + */ + public GetTagsRequest withType(Optional 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; + } + GetTagsRequest other = (GetTagsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, type); + } + + @Override + public String toString() { + return Utils.toString(GetTagsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "type", type); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional type = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The metadata type to filter by + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The metadata type to filter by + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetTagsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetTagsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, type); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTagsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTagsRequestBuilder.java new file mode 100644 index 00000000..ab6bfa4e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTagsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetTags; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetTagsRequestBuilder { + + private GetTagsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetTagsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetTagsRequestBuilder request(GetTagsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetTagsResponse call() throws Exception { + + RequestOperation operation + = new GetTags.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTagsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTagsResponse.java new file mode 100644 index 00000000..0768b5b2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTagsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetTagsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetTagsResponse( + 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 GetTagsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetTagsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTagsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTagsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetTagsResponse withObject(GetTagsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetTagsResponse 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; + } + GetTagsResponse other = (GetTagsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetTagsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetTagsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetTagsResponse build() { + + return new GetTagsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTagsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTagsResponseBody.java new file mode 100644 index 00000000..078d5c2a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTagsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetTagsResponseBody + * + *

OK + */ +public class GetTagsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetTagsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetTagsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetTagsResponseBody withMediaContainer(GetTagsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetTagsResponseBody 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; + } + GetTagsResponseBody other = (GetTagsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetTagsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetTagsMediaContainer 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 GetTagsResponseBody build() { + + return new GetTagsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTasksRequestBuilder.java new file mode 100644 index 00000000..7dfee978 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTasksRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetTasks; +import java.lang.Exception; + +public class GetTasksRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetTasksRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetTasksResponse call() throws Exception { + + RequestlessOperation operation + = new GetTasks.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTasksResponse.java new file mode 100644 index 00000000..f09ffd86 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTasksResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetTasksResponse 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; + + /** + * Butler tasks + */ + private Optional object; + + @JsonCreator + public GetTasksResponse( + 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 GetTasksResponse( + 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; + } + + /** + * Butler tasks + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Butler tasks + */ + public GetTasksResponse withObject(GetTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * Butler tasks + */ + public GetTasksResponse 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; + } + GetTasksResponse other = (GetTasksResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * Butler tasks + */ + public Builder object(GetTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Butler tasks + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetTasksResponse build() { + + return new GetTasksResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTasksResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTasksResponseBody.java new file mode 100644 index 00000000..206fee5b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTasksResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetTasksResponseBody + * + *

Butler tasks + */ +public class GetTasksResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ButlerTasks") + private Optional butlerTasks; + + @JsonCreator + public GetTasksResponseBody( + @JsonProperty("ButlerTasks") Optional butlerTasks) { + Utils.checkNotNull(butlerTasks, "butlerTasks"); + this.butlerTasks = butlerTasks; + } + + public GetTasksResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional butlerTasks() { + return (Optional) butlerTasks; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetTasksResponseBody withButlerTasks(ButlerTasks butlerTasks) { + Utils.checkNotNull(butlerTasks, "butlerTasks"); + this.butlerTasks = Optional.ofNullable(butlerTasks); + return this; + } + + + public GetTasksResponseBody withButlerTasks(Optional butlerTasks) { + Utils.checkNotNull(butlerTasks, "butlerTasks"); + this.butlerTasks = butlerTasks; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTasksResponseBody other = (GetTasksResponseBody) o; + return + Utils.enhancedDeepEquals(this.butlerTasks, other.butlerTasks); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + butlerTasks); + } + + @Override + public String toString() { + return Utils.toString(GetTasksResponseBody.class, + "butlerTasks", butlerTasks); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional butlerTasks = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder butlerTasks(ButlerTasks butlerTasks) { + Utils.checkNotNull(butlerTasks, "butlerTasks"); + this.butlerTasks = Optional.ofNullable(butlerTasks); + return this; + } + + public Builder butlerTasks(Optional butlerTasks) { + Utils.checkNotNull(butlerTasks, "butlerTasks"); + this.butlerTasks = butlerTasks; + return this; + } + + public GetTasksResponseBody build() { + + return new GetTasksResponseBody( + butlerTasks); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateMediaContainer.java new file mode 100644 index 00000000..da50c97f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetTemplateMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetTemplateMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("SubscriptionTemplate") + private Optional> subscriptionTemplate; + + @JsonCreator + public GetTemplateMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("SubscriptionTemplate") Optional> subscriptionTemplate) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(subscriptionTemplate, "subscriptionTemplate"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.subscriptionTemplate = subscriptionTemplate; + } + + public GetTemplateMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> subscriptionTemplate() { + return (Optional>) subscriptionTemplate; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetTemplateMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetTemplateMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetTemplateMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetTemplateMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetTemplateMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetTemplateMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetTemplateMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetTemplateMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetTemplateMediaContainer withSubscriptionTemplate(List subscriptionTemplate) { + Utils.checkNotNull(subscriptionTemplate, "subscriptionTemplate"); + this.subscriptionTemplate = Optional.ofNullable(subscriptionTemplate); + return this; + } + + + public GetTemplateMediaContainer withSubscriptionTemplate(Optional> subscriptionTemplate) { + Utils.checkNotNull(subscriptionTemplate, "subscriptionTemplate"); + this.subscriptionTemplate = subscriptionTemplate; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTemplateMediaContainer other = (GetTemplateMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.subscriptionTemplate, other.subscriptionTemplate); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, subscriptionTemplate); + } + + @Override + public String toString() { + return Utils.toString(GetTemplateMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "subscriptionTemplate", subscriptionTemplate); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> subscriptionTemplate = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder subscriptionTemplate(List subscriptionTemplate) { + Utils.checkNotNull(subscriptionTemplate, "subscriptionTemplate"); + this.subscriptionTemplate = Optional.ofNullable(subscriptionTemplate); + return this; + } + + public Builder subscriptionTemplate(Optional> subscriptionTemplate) { + Utils.checkNotNull(subscriptionTemplate, "subscriptionTemplate"); + this.subscriptionTemplate = subscriptionTemplate; + return this; + } + + public GetTemplateMediaContainer build() { + + return new GetTemplateMediaContainer( + identifier, offset, size, + totalSize, subscriptionTemplate); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateRequest.java new file mode 100644 index 00000000..b94286d9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateRequest.java @@ -0,0 +1,797 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class GetTemplateRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The guid of the item for which to get the template + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=guid") + private Optional guid; + + @JsonCreator + public GetTemplateRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional guid) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(guid, "guid"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.guid = guid; + } + + public GetTemplateRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The guid of the item for which to get the template + */ + @JsonIgnore + public Optional guid() { + return guid; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetTemplateRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetTemplateRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetTemplateRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetTemplateRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetTemplateRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetTemplateRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetTemplateRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetTemplateRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetTemplateRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetTemplateRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetTemplateRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetTemplateRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetTemplateRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetTemplateRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetTemplateRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetTemplateRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetTemplateRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetTemplateRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetTemplateRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetTemplateRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetTemplateRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetTemplateRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The guid of the item for which to get the template + */ + public GetTemplateRequest withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + + /** + * The guid of the item for which to get the template + */ + public GetTemplateRequest withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTemplateRequest other = (GetTemplateRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.guid, other.guid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, guid); + } + + @Override + public String toString() { + return Utils.toString(GetTemplateRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "guid", guid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The guid of the item for which to get the template + */ + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + /** + * The guid of the item for which to get the template + */ + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetTemplateRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetTemplateRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, guid); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateRequestBuilder.java new file mode 100644 index 00000000..7c27626d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetTemplate; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetTemplateRequestBuilder { + + private GetTemplateRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetTemplateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetTemplateRequestBuilder request(GetTemplateRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetTemplateResponse call() throws Exception { + + RequestOperation operation + = new GetTemplate.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateResponse.java new file mode 100644 index 00000000..561ddbbc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class GetTemplateResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetTemplateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetTemplateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetTemplateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTemplateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTemplateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetTemplateResponse withObject(GetTemplateResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetTemplateResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetTemplateResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTemplateResponse other = (GetTemplateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetTemplateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetTemplateResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetTemplateResponse build() { + + return new GetTemplateResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateResponseBody.java new file mode 100644 index 00000000..28340511 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTemplateResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetTemplateResponseBody + * + *

OK + */ +public class GetTemplateResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetTemplateResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetTemplateResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetTemplateResponseBody withMediaContainer(GetTemplateMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetTemplateResponseBody 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; + } + GetTemplateResponseBody other = (GetTemplateResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetTemplateResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetTemplateMediaContainer 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 GetTemplateResponseBody build() { + + return new GetTemplateResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageRequest.java deleted file mode 100644 index ae3e8028..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageRequest.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; - - -public class GetThumbImageRequest { - /** - * the id of the library item to return the children of. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") - private long ratingKey; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=width") - private long width; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=height") - private long height; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize") - private long minSize; - - - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale") - private long upscale; - - /** - * An authentication token, obtained from plex.tv - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Token") - private String xPlexToken; - - @JsonCreator - public GetThumbImageRequest( - long ratingKey, - long width, - long height, - long minSize, - long upscale, - String xPlexToken) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(width, "width"); - Utils.checkNotNull(height, "height"); - Utils.checkNotNull(minSize, "minSize"); - Utils.checkNotNull(upscale, "upscale"); - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.ratingKey = ratingKey; - this.width = width; - this.height = height; - this.minSize = minSize; - this.upscale = upscale; - this.xPlexToken = xPlexToken; - } - - /** - * the id of the library item to return the children of. - */ - @JsonIgnore - public long ratingKey() { - return ratingKey; - } - - @JsonIgnore - public long width() { - return width; - } - - @JsonIgnore - public long height() { - return height; - } - - @JsonIgnore - public long minSize() { - return minSize; - } - - @JsonIgnore - public long upscale() { - return upscale; - } - - /** - * An authentication token, obtained from plex.tv - */ - @JsonIgnore - public String xPlexToken() { - return xPlexToken; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the id of the library item to return the children of. - */ - public GetThumbImageRequest withRatingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetThumbImageRequest withWidth(long width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - public GetThumbImageRequest withHeight(long height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - public GetThumbImageRequest withMinSize(long minSize) { - Utils.checkNotNull(minSize, "minSize"); - this.minSize = minSize; - return this; - } - - public GetThumbImageRequest withUpscale(long upscale) { - Utils.checkNotNull(upscale, "upscale"); - this.upscale = upscale; - return this; - } - - /** - * An authentication token, obtained from plex.tv - */ - public GetThumbImageRequest withXPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetThumbImageRequest other = (GetThumbImageRequest) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.minSize, other.minSize) && - Utils.enhancedDeepEquals(this.upscale, other.upscale) && - Utils.enhancedDeepEquals(this.xPlexToken, other.xPlexToken); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, width, height, - minSize, upscale, xPlexToken); - } - - @Override - public String toString() { - return Utils.toString(GetThumbImageRequest.class, - "ratingKey", ratingKey, - "width", width, - "height", height, - "minSize", minSize, - "upscale", upscale, - "xPlexToken", xPlexToken); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long ratingKey; - - private Long width; - - private Long height; - - private Long minSize; - - private Long upscale; - - private String xPlexToken; - - private Builder() { - // force use of static builder() method - } - - - /** - * the id of the library item to return the children of. - */ - public Builder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - public Builder width(long width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - public Builder height(long height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - public Builder minSize(long minSize) { - Utils.checkNotNull(minSize, "minSize"); - this.minSize = minSize; - return this; - } - - - public Builder upscale(long upscale) { - Utils.checkNotNull(upscale, "upscale"); - this.upscale = upscale; - return this; - } - - - /** - * An authentication token, obtained from plex.tv - */ - public Builder xPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - public GetThumbImageRequest build() { - - return new GetThumbImageRequest( - ratingKey, width, height, - minSize, upscale, xPlexToken); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageRequestBuilder.java deleted file mode 100644 index 25a1baef..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageRequestBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetThumbImage; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; - -public class GetThumbImageRequestBuilder { - - private GetThumbImageRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetThumbImageRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetThumbImageRequestBuilder request(GetThumbImageRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetThumbImageResponse call() throws Exception { - - RequestOperation operation - = new GetThumbImage.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageResponse.java deleted file mode 100644 index 26fb7f22..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetThumbImageResponse.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.List; -import java.util.Map; -import java.util.Optional; - - -public class GetThumbImageResponse 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; - - /** - * Successful response returning an image - */ - private Optional responseStream; - - - private Map> headers; - - @JsonCreator - public GetThumbImageResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional responseStream, - Map> headers) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(responseStream, "responseStream"); - headers = Utils.emptyMapIfNull(headers); - Utils.checkNotNull(headers, "headers"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.responseStream = responseStream; - this.headers = headers; - } - - public GetThumbImageResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Map> headers) { - this(contentType, statusCode, rawResponse, - Optional.empty(), headers); - } - - /** - * 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; - } - - /** - * Successful response returning an image - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional responseStream() { - return (Optional) responseStream; - } - - @JsonIgnore - public Map> headers() { - return headers; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetThumbImageResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetThumbImageResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetThumbImageResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response returning an image - */ - public GetThumbImageResponse withResponseStream(InputStream responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = Optional.ofNullable(responseStream); - return this; - } - - - /** - * Successful response returning an image - */ - public GetThumbImageResponse withResponseStream(Optional responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = responseStream; - return this; - } - - public GetThumbImageResponse withHeaders(Map> headers) { - Utils.checkNotNull(headers, "headers"); - this.headers = headers; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetThumbImageResponse other = (GetThumbImageResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.responseStream, other.responseStream) && - Utils.enhancedDeepEquals(this.headers, other.headers); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - responseStream, headers); - } - - @Override - public String toString() { - return Utils.toString(GetThumbImageResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "responseStream", responseStream, - "headers", headers); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional responseStream = Optional.empty(); - - private Map> headers; - - 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; - } - - - /** - * Successful response returning an image - */ - public Builder responseStream(InputStream responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = Optional.ofNullable(responseStream); - return this; - } - - /** - * Successful response returning an image - */ - public Builder responseStream(Optional responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = responseStream; - return this; - } - - - public Builder headers(Map> headers) { - Utils.checkNotNull(headers, "headers"); - this.headers = headers; - return this; - } - - public GetThumbImageResponse build() { - - return new GetThumbImageResponse( - contentType, statusCode, rawResponse, - responseStream, headers); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetThumbRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetThumbRequest.java new file mode 100644 index 00000000..1fcf41f1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetThumbRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class GetThumbRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the device. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + /** + * A version number of the thumb used for busting cache + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=version") + private long versionPathParameter; + + @JsonCreator + public GetThumbRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long deviceId, + long versionPathParameter) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceId, "deviceId"); + Utils.checkNotNull(versionPathParameter, "versionPathParameter"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceId = deviceId; + this.versionPathParameter = versionPathParameter; + } + + public GetThumbRequest( + long deviceId, + long versionPathParameter) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceId, + versionPathParameter); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the device. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + /** + * A version number of the thumb used for busting cache + */ + @JsonIgnore + public long versionPathParameter() { + return versionPathParameter; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetThumbRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetThumbRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetThumbRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetThumbRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetThumbRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetThumbRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetThumbRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetThumbRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetThumbRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetThumbRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetThumbRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetThumbRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetThumbRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetThumbRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetThumbRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetThumbRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetThumbRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetThumbRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetThumbRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetThumbRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetThumbRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetThumbRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the device. + */ + public GetThumbRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + /** + * A version number of the thumb used for busting cache + */ + public GetThumbRequest withVersionPathParameter(long versionPathParameter) { + Utils.checkNotNull(versionPathParameter, "versionPathParameter"); + this.versionPathParameter = versionPathParameter; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetThumbRequest other = (GetThumbRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId) && + Utils.enhancedDeepEquals(this.versionPathParameter, other.versionPathParameter); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId, + versionPathParameter); + } + + @Override + public String toString() { + return Utils.toString(GetThumbRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceId", deviceId, + "versionPathParameter", versionPathParameter); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long deviceId; + + private Long versionPathParameter; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the device. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + + /** + * A version number of the thumb used for busting cache + */ + public Builder versionPathParameter(long versionPathParameter) { + Utils.checkNotNull(versionPathParameter, "versionPathParameter"); + this.versionPathParameter = versionPathParameter; + return this; + } + + public GetThumbRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new GetThumbRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId, + versionPathParameter); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetThumbRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetThumbRequestBuilder.java new file mode 100644 index 00000000..adb7ebab --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetThumbRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetThumb; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class GetThumbRequestBuilder { + + private GetThumbRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetThumbRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetThumbRequestBuilder request(GetThumbRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetThumbResponse call() throws Exception { + + RequestOperation operation + = new GetThumb.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetThumbResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetThumbResponse.java new file mode 100644 index 00000000..fe62ddbc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetThumbResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetThumbResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetThumbResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetThumbResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetThumbResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetThumbResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetThumbResponse other = (GetThumbResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetThumbResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetThumbResponse build() { + + return new GetThumbResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTimelineRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTimelineRequest.java deleted file mode 100644 index bd695594..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTimelineRequest.java +++ /dev/null @@ -1,468 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; - - -public class GetTimelineRequest { - /** - * The rating key of the media item - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=ratingKey") - private double ratingKey; - - /** - * The key of the media item to get the timeline for - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") - private String key; - - /** - * The state of the media item - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=state") - private State state; - - /** - * Whether the media item has MDE - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=hasMDE") - private double hasMDE; - - /** - * The time of the media item - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=time") - private double time; - - /** - * The duration of the media item - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=duration") - private double duration; - - /** - * The context of the media item - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=context") - private String context; - - /** - * The play queue item ID of the media item - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueItemID") - private double playQueueItemID; - - /** - * The playback time of the media item - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playBackTime") - private double playBackTime; - - /** - * The row of the media item - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=row") - private double row; - - @JsonCreator - public GetTimelineRequest( - double ratingKey, - String key, - State state, - double hasMDE, - double time, - double duration, - String context, - double playQueueItemID, - double playBackTime, - double row) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(state, "state"); - Utils.checkNotNull(hasMDE, "hasMDE"); - Utils.checkNotNull(time, "time"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(context, "context"); - Utils.checkNotNull(playQueueItemID, "playQueueItemID"); - Utils.checkNotNull(playBackTime, "playBackTime"); - Utils.checkNotNull(row, "row"); - this.ratingKey = ratingKey; - this.key = key; - this.state = state; - this.hasMDE = hasMDE; - this.time = time; - this.duration = duration; - this.context = context; - this.playQueueItemID = playQueueItemID; - this.playBackTime = playBackTime; - this.row = row; - } - - /** - * The rating key of the media item - */ - @JsonIgnore - public double ratingKey() { - return ratingKey; - } - - /** - * The key of the media item to get the timeline for - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The state of the media item - */ - @JsonIgnore - public State state() { - return state; - } - - /** - * Whether the media item has MDE - */ - @JsonIgnore - public double hasMDE() { - return hasMDE; - } - - /** - * The time of the media item - */ - @JsonIgnore - public double time() { - return time; - } - - /** - * The duration of the media item - */ - @JsonIgnore - public double duration() { - return duration; - } - - /** - * The context of the media item - */ - @JsonIgnore - public String context() { - return context; - } - - /** - * The play queue item ID of the media item - */ - @JsonIgnore - public double playQueueItemID() { - return playQueueItemID; - } - - /** - * The playback time of the media item - */ - @JsonIgnore - public double playBackTime() { - return playBackTime; - } - - /** - * The row of the media item - */ - @JsonIgnore - public double row() { - return row; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The rating key of the media item - */ - public GetTimelineRequest withRatingKey(double ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * The key of the media item to get the timeline for - */ - public GetTimelineRequest withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The state of the media item - */ - public GetTimelineRequest withState(State state) { - Utils.checkNotNull(state, "state"); - this.state = state; - return this; - } - - /** - * Whether the media item has MDE - */ - public GetTimelineRequest withHasMDE(double hasMDE) { - Utils.checkNotNull(hasMDE, "hasMDE"); - this.hasMDE = hasMDE; - return this; - } - - /** - * The time of the media item - */ - public GetTimelineRequest withTime(double time) { - Utils.checkNotNull(time, "time"); - this.time = time; - return this; - } - - /** - * The duration of the media item - */ - public GetTimelineRequest withDuration(double duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * The context of the media item - */ - public GetTimelineRequest withContext(String context) { - Utils.checkNotNull(context, "context"); - this.context = context; - return this; - } - - /** - * The play queue item ID of the media item - */ - public GetTimelineRequest withPlayQueueItemID(double playQueueItemID) { - Utils.checkNotNull(playQueueItemID, "playQueueItemID"); - this.playQueueItemID = playQueueItemID; - return this; - } - - /** - * The playback time of the media item - */ - public GetTimelineRequest withPlayBackTime(double playBackTime) { - Utils.checkNotNull(playBackTime, "playBackTime"); - this.playBackTime = playBackTime; - return this; - } - - /** - * The row of the media item - */ - public GetTimelineRequest withRow(double row) { - Utils.checkNotNull(row, "row"); - this.row = row; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTimelineRequest other = (GetTimelineRequest) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.state, other.state) && - Utils.enhancedDeepEquals(this.hasMDE, other.hasMDE) && - Utils.enhancedDeepEquals(this.time, other.time) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.context, other.context) && - Utils.enhancedDeepEquals(this.playQueueItemID, other.playQueueItemID) && - Utils.enhancedDeepEquals(this.playBackTime, other.playBackTime) && - Utils.enhancedDeepEquals(this.row, other.row); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, state, - hasMDE, time, duration, - context, playQueueItemID, playBackTime, - row); - } - - @Override - public String toString() { - return Utils.toString(GetTimelineRequest.class, - "ratingKey", ratingKey, - "key", key, - "state", state, - "hasMDE", hasMDE, - "time", time, - "duration", duration, - "context", context, - "playQueueItemID", playQueueItemID, - "playBackTime", playBackTime, - "row", row); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Double ratingKey; - - private String key; - - private State state; - - private Double hasMDE; - - private Double time; - - private Double duration; - - private String context; - - private Double playQueueItemID; - - private Double playBackTime; - - private Double row; - - private Builder() { - // force use of static builder() method - } - - - /** - * The rating key of the media item - */ - public Builder ratingKey(double ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * The key of the media item to get the timeline for - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The state of the media item - */ - public Builder state(State state) { - Utils.checkNotNull(state, "state"); - this.state = state; - return this; - } - - - /** - * Whether the media item has MDE - */ - public Builder hasMDE(double hasMDE) { - Utils.checkNotNull(hasMDE, "hasMDE"); - this.hasMDE = hasMDE; - return this; - } - - - /** - * The time of the media item - */ - public Builder time(double time) { - Utils.checkNotNull(time, "time"); - this.time = time; - return this; - } - - - /** - * The duration of the media item - */ - public Builder duration(double duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * The context of the media item - */ - public Builder context(String context) { - Utils.checkNotNull(context, "context"); - this.context = context; - return this; - } - - - /** - * The play queue item ID of the media item - */ - public Builder playQueueItemID(double playQueueItemID) { - Utils.checkNotNull(playQueueItemID, "playQueueItemID"); - this.playQueueItemID = playQueueItemID; - return this; - } - - - /** - * The playback time of the media item - */ - public Builder playBackTime(double playBackTime) { - Utils.checkNotNull(playBackTime, "playBackTime"); - this.playBackTime = playBackTime; - return this; - } - - - /** - * The row of the media item - */ - public Builder row(double row) { - Utils.checkNotNull(row, "row"); - this.row = row; - return this; - } - - public GetTimelineRequest build() { - - return new GetTimelineRequest( - ratingKey, key, state, - hasMDE, time, duration, - context, playQueueItemID, playBackTime, - row); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTimelineRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTimelineRequestBuilder.java deleted file mode 100644 index 10b3e542..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTimelineRequestBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetTimeline; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; - -public class GetTimelineRequestBuilder { - - private GetTimelineRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetTimelineRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetTimelineRequestBuilder request(GetTimelineRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetTimelineResponse call() throws Exception { - - RequestOperation operation - = new GetTimeline.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTimelineResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTimelineResponse.java deleted file mode 100644 index 79ac137d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTimelineResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class GetTimelineResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public GetTimelineResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetTimelineResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetTimelineResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTimelineResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTimelineResponse other = (GetTimelineResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTimelineResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTimelineResponse build() { - - return new GetTimelineResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdAuthPinContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdAuthPinContainer.java deleted file mode 100644 index 32f4414f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdAuthPinContainer.java +++ /dev/null @@ -1,557 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.Object; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * GetTokenByPinIdAuthPinContainer - * - *

The Pin with a non-null authToken when it has been verified by the user - */ -public class GetTokenByPinIdAuthPinContainer { - - @JsonProperty("id") - private long id; - - - @JsonProperty("code") - private String code; - - - @JsonProperty("product") - private String product; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("trusted") - private Optional trusted; - - - @JsonProperty("qr") - private String qr; - - /** - * The X-Client-Identifier used in the request - */ - @JsonProperty("clientIdentifier") - private String clientIdentifier; - - /** - * Geo location data - */ - @JsonProperty("location") - private GetTokenByPinIdGeoData location; - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("expiresIn") - private Optional expiresIn; - - - @JsonProperty("createdAt") - private OffsetDateTime createdAt; - - - @JsonProperty("expiresAt") - private OffsetDateTime expiresAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("authToken") - private JsonNullable authToken; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("newRegistration") - private JsonNullable newRegistration; - - @JsonCreator - public GetTokenByPinIdAuthPinContainer( - @JsonProperty("id") long id, - @JsonProperty("code") String code, - @JsonProperty("product") String product, - @JsonProperty("trusted") Optional trusted, - @JsonProperty("qr") String qr, - @JsonProperty("clientIdentifier") String clientIdentifier, - @JsonProperty("location") GetTokenByPinIdGeoData location, - @JsonProperty("expiresIn") Optional expiresIn, - @JsonProperty("createdAt") OffsetDateTime createdAt, - @JsonProperty("expiresAt") OffsetDateTime expiresAt, - @JsonProperty("authToken") JsonNullable authToken, - @JsonProperty("newRegistration") JsonNullable newRegistration) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(product, "product"); - Utils.checkNotNull(trusted, "trusted"); - Utils.checkNotNull(qr, "qr"); - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - Utils.checkNotNull(location, "location"); - Utils.checkNotNull(expiresIn, "expiresIn"); - Utils.checkNotNull(createdAt, "createdAt"); - Utils.checkNotNull(expiresAt, "expiresAt"); - Utils.checkNotNull(authToken, "authToken"); - Utils.checkNotNull(newRegistration, "newRegistration"); - this.id = id; - this.code = code; - this.product = product; - this.trusted = trusted; - this.qr = qr; - this.clientIdentifier = clientIdentifier; - this.location = location; - this.expiresIn = expiresIn; - this.createdAt = createdAt; - this.expiresAt = expiresAt; - this.authToken = authToken; - this.newRegistration = newRegistration; - } - - public GetTokenByPinIdAuthPinContainer( - long id, - String code, - String product, - String qr, - String clientIdentifier, - GetTokenByPinIdGeoData location, - OffsetDateTime createdAt, - OffsetDateTime expiresAt) { - this(id, code, product, - Optional.empty(), qr, clientIdentifier, - location, Optional.empty(), createdAt, - expiresAt, JsonNullable.undefined(), JsonNullable.undefined()); - } - - @JsonIgnore - public long id() { - return id; - } - - @JsonIgnore - public String code() { - return code; - } - - @JsonIgnore - public String product() { - return product; - } - - @JsonIgnore - public Optional trusted() { - return trusted; - } - - @JsonIgnore - public String qr() { - return qr; - } - - /** - * The X-Client-Identifier used in the request - */ - @JsonIgnore - public String clientIdentifier() { - return clientIdentifier; - } - - /** - * Geo location data - */ - @JsonIgnore - public GetTokenByPinIdGeoData location() { - return location; - } - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - @JsonIgnore - public Optional expiresIn() { - return expiresIn; - } - - @JsonIgnore - public OffsetDateTime createdAt() { - return createdAt; - } - - @JsonIgnore - public OffsetDateTime expiresAt() { - return expiresAt; - } - - @JsonIgnore - public JsonNullable authToken() { - return authToken; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable newRegistration() { - return (JsonNullable) newRegistration; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTokenByPinIdAuthPinContainer withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetTokenByPinIdAuthPinContainer withCode(String code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - public GetTokenByPinIdAuthPinContainer withProduct(String product) { - Utils.checkNotNull(product, "product"); - this.product = product; - return this; - } - - public GetTokenByPinIdAuthPinContainer withTrusted(boolean trusted) { - Utils.checkNotNull(trusted, "trusted"); - this.trusted = Optional.ofNullable(trusted); - return this; - } - - - public GetTokenByPinIdAuthPinContainer withTrusted(Optional trusted) { - Utils.checkNotNull(trusted, "trusted"); - this.trusted = trusted; - return this; - } - - public GetTokenByPinIdAuthPinContainer withQr(String qr) { - Utils.checkNotNull(qr, "qr"); - this.qr = qr; - return this; - } - - /** - * The X-Client-Identifier used in the request - */ - public GetTokenByPinIdAuthPinContainer withClientIdentifier(String clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = clientIdentifier; - return this; - } - - /** - * Geo location data - */ - public GetTokenByPinIdAuthPinContainer withLocation(GetTokenByPinIdGeoData location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - public GetTokenByPinIdAuthPinContainer withExpiresIn(long expiresIn) { - Utils.checkNotNull(expiresIn, "expiresIn"); - this.expiresIn = Optional.ofNullable(expiresIn); - return this; - } - - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - public GetTokenByPinIdAuthPinContainer withExpiresIn(Optional expiresIn) { - Utils.checkNotNull(expiresIn, "expiresIn"); - this.expiresIn = expiresIn; - return this; - } - - public GetTokenByPinIdAuthPinContainer withCreatedAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - public GetTokenByPinIdAuthPinContainer withExpiresAt(OffsetDateTime expiresAt) { - Utils.checkNotNull(expiresAt, "expiresAt"); - this.expiresAt = expiresAt; - return this; - } - - public GetTokenByPinIdAuthPinContainer withAuthToken(String authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = JsonNullable.of(authToken); - return this; - } - - public GetTokenByPinIdAuthPinContainer withAuthToken(JsonNullable authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = authToken; - return this; - } - - public GetTokenByPinIdAuthPinContainer withNewRegistration(Object newRegistration) { - Utils.checkNotNull(newRegistration, "newRegistration"); - this.newRegistration = JsonNullable.of(newRegistration); - return this; - } - - public GetTokenByPinIdAuthPinContainer withNewRegistration(JsonNullable newRegistration) { - Utils.checkNotNull(newRegistration, "newRegistration"); - this.newRegistration = newRegistration; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdAuthPinContainer other = (GetTokenByPinIdAuthPinContainer) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.product, other.product) && - Utils.enhancedDeepEquals(this.trusted, other.trusted) && - Utils.enhancedDeepEquals(this.qr, other.qr) && - Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && - Utils.enhancedDeepEquals(this.location, other.location) && - Utils.enhancedDeepEquals(this.expiresIn, other.expiresIn) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && - Utils.enhancedDeepEquals(this.expiresAt, other.expiresAt) && - Utils.enhancedDeepEquals(this.authToken, other.authToken) && - Utils.enhancedDeepEquals(this.newRegistration, other.newRegistration); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, code, product, - trusted, qr, clientIdentifier, - location, expiresIn, createdAt, - expiresAt, authToken, newRegistration); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdAuthPinContainer.class, - "id", id, - "code", code, - "product", product, - "trusted", trusted, - "qr", qr, - "clientIdentifier", clientIdentifier, - "location", location, - "expiresIn", expiresIn, - "createdAt", createdAt, - "expiresAt", expiresAt, - "authToken", authToken, - "newRegistration", newRegistration); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String code; - - private String product; - - private Optional trusted; - - private String qr; - - private String clientIdentifier; - - private GetTokenByPinIdGeoData location; - - private Optional expiresIn; - - private OffsetDateTime createdAt; - - private OffsetDateTime expiresAt; - - private JsonNullable authToken = JsonNullable.undefined(); - - private JsonNullable newRegistration = JsonNullable.undefined(); - - private Builder() { - // force use of static builder() method - } - - - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - public Builder code(String code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - public Builder product(String product) { - Utils.checkNotNull(product, "product"); - this.product = product; - return this; - } - - - public Builder trusted(boolean trusted) { - Utils.checkNotNull(trusted, "trusted"); - this.trusted = Optional.ofNullable(trusted); - return this; - } - - public Builder trusted(Optional trusted) { - Utils.checkNotNull(trusted, "trusted"); - this.trusted = trusted; - return this; - } - - - public Builder qr(String qr) { - Utils.checkNotNull(qr, "qr"); - this.qr = qr; - return this; - } - - - /** - * The X-Client-Identifier used in the request - */ - public Builder clientIdentifier(String clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = clientIdentifier; - return this; - } - - - /** - * Geo location data - */ - public Builder location(GetTokenByPinIdGeoData location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - public Builder expiresIn(long expiresIn) { - Utils.checkNotNull(expiresIn, "expiresIn"); - this.expiresIn = Optional.ofNullable(expiresIn); - return this; - } - - /** - * The number of seconds this pin expires, by default 900 seconds - */ - public Builder expiresIn(Optional expiresIn) { - Utils.checkNotNull(expiresIn, "expiresIn"); - this.expiresIn = expiresIn; - return this; - } - - - public Builder createdAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - - public Builder expiresAt(OffsetDateTime expiresAt) { - Utils.checkNotNull(expiresAt, "expiresAt"); - this.expiresAt = expiresAt; - return this; - } - - - public Builder authToken(String authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = JsonNullable.of(authToken); - return this; - } - - public Builder authToken(JsonNullable authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = authToken; - return this; - } - - - public Builder newRegistration(Object newRegistration) { - Utils.checkNotNull(newRegistration, "newRegistration"); - this.newRegistration = JsonNullable.of(newRegistration); - return this; - } - - public Builder newRegistration(JsonNullable newRegistration) { - Utils.checkNotNull(newRegistration, "newRegistration"); - this.newRegistration = newRegistration; - return this; - } - - public GetTokenByPinIdAuthPinContainer build() { - if (trusted == null) { - trusted = _SINGLETON_VALUE_Trusted.value(); - } - if (expiresIn == null) { - expiresIn = _SINGLETON_VALUE_ExpiresIn.value(); - } - - return new GetTokenByPinIdAuthPinContainer( - id, code, product, - trusted, qr, clientIdentifier, - location, expiresIn, createdAt, - expiresAt, authToken, newRegistration); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_Trusted = - new LazySingletonValue<>( - "trusted", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_ExpiresIn = - new LazySingletonValue<>( - "expiresIn", - "900", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdGeoData.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdGeoData.java deleted file mode 100644 index 91720fc3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdGeoData.java +++ /dev/null @@ -1,619 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - -/** - * GetTokenByPinIdGeoData - * - *

Geo location data - */ -public class GetTokenByPinIdGeoData { - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - @JsonProperty("code") - private String code; - - /** - * The continent code where the country is located. - */ - @JsonProperty("continent_code") - private String continentCode; - - /** - * The official name of the country. - */ - @JsonProperty("country") - private String country; - - /** - * The name of the city. - */ - @JsonProperty("city") - private String city; - - /** - * Indicates if the country is a member of the European Union. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("european_union_member") - private Optional europeanUnionMember; - - /** - * The time zone of the country. - */ - @JsonProperty("time_zone") - private String timeZone; - - /** - * The postal code of the location. - */ - @JsonProperty("postal_code") - private String postalCode; - - /** - * Indicates if the country has privacy restrictions. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("in_privacy_restricted_country") - private Optional inPrivacyRestrictedCountry; - - /** - * Indicates if the region has privacy restrictions. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("in_privacy_restricted_region") - private Optional inPrivacyRestrictedRegion; - - /** - * The name of the primary administrative subdivision. - */ - @JsonProperty("subdivisions") - private String subdivisions; - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - @JsonProperty("coordinates") - private String coordinates; - - @JsonCreator - public GetTokenByPinIdGeoData( - @JsonProperty("code") String code, - @JsonProperty("continent_code") String continentCode, - @JsonProperty("country") String country, - @JsonProperty("city") String city, - @JsonProperty("european_union_member") Optional europeanUnionMember, - @JsonProperty("time_zone") String timeZone, - @JsonProperty("postal_code") String postalCode, - @JsonProperty("in_privacy_restricted_country") Optional inPrivacyRestrictedCountry, - @JsonProperty("in_privacy_restricted_region") Optional inPrivacyRestrictedRegion, - @JsonProperty("subdivisions") String subdivisions, - @JsonProperty("coordinates") String coordinates) { - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(continentCode, "continentCode"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(city, "city"); - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - Utils.checkNotNull(timeZone, "timeZone"); - Utils.checkNotNull(postalCode, "postalCode"); - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - Utils.checkNotNull(subdivisions, "subdivisions"); - Utils.checkNotNull(coordinates, "coordinates"); - this.code = code; - this.continentCode = continentCode; - this.country = country; - this.city = city; - this.europeanUnionMember = europeanUnionMember; - this.timeZone = timeZone; - this.postalCode = postalCode; - this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; - this.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion; - this.subdivisions = subdivisions; - this.coordinates = coordinates; - } - - public GetTokenByPinIdGeoData( - String code, - String continentCode, - String country, - String city, - String timeZone, - String postalCode, - String subdivisions, - String coordinates) { - this(code, continentCode, country, - city, Optional.empty(), timeZone, - postalCode, Optional.empty(), Optional.empty(), - subdivisions, coordinates); - } - - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - @JsonIgnore - public String code() { - return code; - } - - /** - * The continent code where the country is located. - */ - @JsonIgnore - public String continentCode() { - return continentCode; - } - - /** - * The official name of the country. - */ - @JsonIgnore - public String country() { - return country; - } - - /** - * The name of the city. - */ - @JsonIgnore - public String city() { - return city; - } - - /** - * Indicates if the country is a member of the European Union. - */ - @JsonIgnore - public Optional europeanUnionMember() { - return europeanUnionMember; - } - - /** - * The time zone of the country. - */ - @JsonIgnore - public String timeZone() { - return timeZone; - } - - /** - * The postal code of the location. - */ - @JsonIgnore - public String postalCode() { - return postalCode; - } - - /** - * Indicates if the country has privacy restrictions. - */ - @JsonIgnore - public Optional inPrivacyRestrictedCountry() { - return inPrivacyRestrictedCountry; - } - - /** - * Indicates if the region has privacy restrictions. - */ - @JsonIgnore - public Optional inPrivacyRestrictedRegion() { - return inPrivacyRestrictedRegion; - } - - /** - * The name of the primary administrative subdivision. - */ - @JsonIgnore - public String subdivisions() { - return subdivisions; - } - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - @JsonIgnore - public String coordinates() { - return coordinates; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - public GetTokenByPinIdGeoData withCode(String code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - /** - * The continent code where the country is located. - */ - public GetTokenByPinIdGeoData withContinentCode(String continentCode) { - Utils.checkNotNull(continentCode, "continentCode"); - this.continentCode = continentCode; - return this; - } - - /** - * The official name of the country. - */ - public GetTokenByPinIdGeoData withCountry(String country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - /** - * The name of the city. - */ - public GetTokenByPinIdGeoData withCity(String city) { - Utils.checkNotNull(city, "city"); - this.city = city; - return this; - } - - /** - * Indicates if the country is a member of the European Union. - */ - public GetTokenByPinIdGeoData withEuropeanUnionMember(boolean europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = Optional.ofNullable(europeanUnionMember); - return this; - } - - - /** - * Indicates if the country is a member of the European Union. - */ - public GetTokenByPinIdGeoData withEuropeanUnionMember(Optional europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = europeanUnionMember; - return this; - } - - /** - * The time zone of the country. - */ - public GetTokenByPinIdGeoData withTimeZone(String timeZone) { - Utils.checkNotNull(timeZone, "timeZone"); - this.timeZone = timeZone; - return this; - } - - /** - * The postal code of the location. - */ - public GetTokenByPinIdGeoData withPostalCode(String postalCode) { - Utils.checkNotNull(postalCode, "postalCode"); - this.postalCode = postalCode; - return this; - } - - /** - * Indicates if the country has privacy restrictions. - */ - public GetTokenByPinIdGeoData withInPrivacyRestrictedCountry(boolean inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = Optional.ofNullable(inPrivacyRestrictedCountry); - return this; - } - - - /** - * Indicates if the country has privacy restrictions. - */ - public GetTokenByPinIdGeoData withInPrivacyRestrictedCountry(Optional inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; - return this; - } - - /** - * Indicates if the region has privacy restrictions. - */ - public GetTokenByPinIdGeoData withInPrivacyRestrictedRegion(boolean inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = Optional.ofNullable(inPrivacyRestrictedRegion); - return this; - } - - - /** - * Indicates if the region has privacy restrictions. - */ - public GetTokenByPinIdGeoData withInPrivacyRestrictedRegion(Optional inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion; - return this; - } - - /** - * The name of the primary administrative subdivision. - */ - public GetTokenByPinIdGeoData withSubdivisions(String subdivisions) { - Utils.checkNotNull(subdivisions, "subdivisions"); - this.subdivisions = subdivisions; - return this; - } - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - public GetTokenByPinIdGeoData withCoordinates(String coordinates) { - Utils.checkNotNull(coordinates, "coordinates"); - this.coordinates = coordinates; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdGeoData other = (GetTokenByPinIdGeoData) o; - return - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.continentCode, other.continentCode) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.city, other.city) && - Utils.enhancedDeepEquals(this.europeanUnionMember, other.europeanUnionMember) && - Utils.enhancedDeepEquals(this.timeZone, other.timeZone) && - Utils.enhancedDeepEquals(this.postalCode, other.postalCode) && - Utils.enhancedDeepEquals(this.inPrivacyRestrictedCountry, other.inPrivacyRestrictedCountry) && - Utils.enhancedDeepEquals(this.inPrivacyRestrictedRegion, other.inPrivacyRestrictedRegion) && - Utils.enhancedDeepEquals(this.subdivisions, other.subdivisions) && - Utils.enhancedDeepEquals(this.coordinates, other.coordinates); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - code, continentCode, country, - city, europeanUnionMember, timeZone, - postalCode, inPrivacyRestrictedCountry, inPrivacyRestrictedRegion, - subdivisions, coordinates); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdGeoData.class, - "code", code, - "continentCode", continentCode, - "country", country, - "city", city, - "europeanUnionMember", europeanUnionMember, - "timeZone", timeZone, - "postalCode", postalCode, - "inPrivacyRestrictedCountry", inPrivacyRestrictedCountry, - "inPrivacyRestrictedRegion", inPrivacyRestrictedRegion, - "subdivisions", subdivisions, - "coordinates", coordinates); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String code; - - private String continentCode; - - private String country; - - private String city; - - private Optional europeanUnionMember; - - private String timeZone; - - private String postalCode; - - private Optional inPrivacyRestrictedCountry; - - private Optional inPrivacyRestrictedRegion; - - private String subdivisions; - - private String coordinates; - - private Builder() { - // force use of static builder() method - } - - - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - public Builder code(String code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - /** - * The continent code where the country is located. - */ - public Builder continentCode(String continentCode) { - Utils.checkNotNull(continentCode, "continentCode"); - this.continentCode = continentCode; - return this; - } - - - /** - * The official name of the country. - */ - public Builder country(String country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - - /** - * The name of the city. - */ - public Builder city(String city) { - Utils.checkNotNull(city, "city"); - this.city = city; - return this; - } - - - /** - * Indicates if the country is a member of the European Union. - */ - public Builder europeanUnionMember(boolean europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = Optional.ofNullable(europeanUnionMember); - return this; - } - - /** - * Indicates if the country is a member of the European Union. - */ - public Builder europeanUnionMember(Optional europeanUnionMember) { - Utils.checkNotNull(europeanUnionMember, "europeanUnionMember"); - this.europeanUnionMember = europeanUnionMember; - return this; - } - - - /** - * The time zone of the country. - */ - public Builder timeZone(String timeZone) { - Utils.checkNotNull(timeZone, "timeZone"); - this.timeZone = timeZone; - return this; - } - - - /** - * The postal code of the location. - */ - public Builder postalCode(String postalCode) { - Utils.checkNotNull(postalCode, "postalCode"); - this.postalCode = postalCode; - return this; - } - - - /** - * Indicates if the country has privacy restrictions. - */ - public Builder inPrivacyRestrictedCountry(boolean inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = Optional.ofNullable(inPrivacyRestrictedCountry); - return this; - } - - /** - * Indicates if the country has privacy restrictions. - */ - public Builder inPrivacyRestrictedCountry(Optional inPrivacyRestrictedCountry) { - Utils.checkNotNull(inPrivacyRestrictedCountry, "inPrivacyRestrictedCountry"); - this.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry; - return this; - } - - - /** - * Indicates if the region has privacy restrictions. - */ - public Builder inPrivacyRestrictedRegion(boolean inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = Optional.ofNullable(inPrivacyRestrictedRegion); - return this; - } - - /** - * Indicates if the region has privacy restrictions. - */ - public Builder inPrivacyRestrictedRegion(Optional inPrivacyRestrictedRegion) { - Utils.checkNotNull(inPrivacyRestrictedRegion, "inPrivacyRestrictedRegion"); - this.inPrivacyRestrictedRegion = inPrivacyRestrictedRegion; - return this; - } - - - /** - * The name of the primary administrative subdivision. - */ - public Builder subdivisions(String subdivisions) { - Utils.checkNotNull(subdivisions, "subdivisions"); - this.subdivisions = subdivisions; - return this; - } - - - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - public Builder coordinates(String coordinates) { - Utils.checkNotNull(coordinates, "coordinates"); - this.coordinates = coordinates; - return this; - } - - public GetTokenByPinIdGeoData build() { - if (europeanUnionMember == null) { - europeanUnionMember = _SINGLETON_VALUE_EuropeanUnionMember.value(); - } - if (inPrivacyRestrictedCountry == null) { - inPrivacyRestrictedCountry = _SINGLETON_VALUE_InPrivacyRestrictedCountry.value(); - } - if (inPrivacyRestrictedRegion == null) { - inPrivacyRestrictedRegion = _SINGLETON_VALUE_InPrivacyRestrictedRegion.value(); - } - - return new GetTokenByPinIdGeoData( - code, continentCode, country, - city, europeanUnionMember, timeZone, - postalCode, inPrivacyRestrictedCountry, inPrivacyRestrictedRegion, - subdivisions, coordinates); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_EuropeanUnionMember = - new LazySingletonValue<>( - "european_union_member", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_InPrivacyRestrictedCountry = - new LazySingletonValue<>( - "in_privacy_restricted_country", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_InPrivacyRestrictedRegion = - new LazySingletonValue<>( - "in_privacy_restricted_region", - "false", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequest.java deleted file mode 100644 index 8be247a4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequest.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTokenByPinIdRequest { - /** - * The PinID to retrieve an access token for - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=pinID") - private long pinID; - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") - private String clientID; - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") - private Optional clientName; - - /** - * A relatively friendly name for the client device - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") - private Optional deviceNickname; - - /** - * The version of the client application. - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") - private Optional clientVersion; - - /** - * The platform of the client application. - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") - private Optional platform; - - @JsonCreator - public GetTokenByPinIdRequest( - long pinID, - String clientID, - Optional clientName, - Optional deviceNickname, - Optional clientVersion, - Optional platform) { - Utils.checkNotNull(pinID, "pinID"); - Utils.checkNotNull(clientID, "clientID"); - Utils.checkNotNull(clientName, "clientName"); - Utils.checkNotNull(deviceNickname, "deviceNickname"); - Utils.checkNotNull(clientVersion, "clientVersion"); - Utils.checkNotNull(platform, "platform"); - this.pinID = pinID; - this.clientID = clientID; - this.clientName = clientName; - this.deviceNickname = deviceNickname; - this.clientVersion = clientVersion; - this.platform = platform; - } - - public GetTokenByPinIdRequest( - long pinID, - String clientID) { - this(pinID, clientID, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - /** - * The PinID to retrieve an access token for - */ - @JsonIgnore - public long pinID() { - return pinID; - } - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @JsonIgnore - public String clientID() { - return clientID; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - @JsonIgnore - public Optional clientName() { - return clientName; - } - - /** - * A relatively friendly name for the client device - */ - @JsonIgnore - public Optional deviceNickname() { - return deviceNickname; - } - - /** - * The version of the client application. - */ - @JsonIgnore - public Optional clientVersion() { - return clientVersion; - } - - /** - * The platform of the client application. - */ - @JsonIgnore - public Optional platform() { - return platform; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The PinID to retrieve an access token for - */ - public GetTokenByPinIdRequest withPinID(long pinID) { - Utils.checkNotNull(pinID, "pinID"); - this.pinID = pinID; - return this; - } - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public GetTokenByPinIdRequest withClientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public GetTokenByPinIdRequest withClientName(String clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = Optional.ofNullable(clientName); - return this; - } - - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public GetTokenByPinIdRequest withClientName(Optional clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = clientName; - return this; - } - - /** - * A relatively friendly name for the client device - */ - public GetTokenByPinIdRequest withDeviceNickname(String deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = Optional.ofNullable(deviceNickname); - return this; - } - - - /** - * A relatively friendly name for the client device - */ - public GetTokenByPinIdRequest withDeviceNickname(Optional deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = deviceNickname; - return this; - } - - /** - * The version of the client application. - */ - public GetTokenByPinIdRequest withClientVersion(String clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = Optional.ofNullable(clientVersion); - return this; - } - - - /** - * The version of the client application. - */ - public GetTokenByPinIdRequest withClientVersion(Optional clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = clientVersion; - return this; - } - - /** - * The platform of the client application. - */ - public GetTokenByPinIdRequest withPlatform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - - /** - * The platform of the client application. - */ - public GetTokenByPinIdRequest withPlatform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdRequest other = (GetTokenByPinIdRequest) o; - return - Utils.enhancedDeepEquals(this.pinID, other.pinID) && - Utils.enhancedDeepEquals(this.clientID, other.clientID) && - Utils.enhancedDeepEquals(this.clientName, other.clientName) && - Utils.enhancedDeepEquals(this.deviceNickname, other.deviceNickname) && - Utils.enhancedDeepEquals(this.clientVersion, other.clientVersion) && - Utils.enhancedDeepEquals(this.platform, other.platform); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - pinID, clientID, clientName, - deviceNickname, clientVersion, platform); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdRequest.class, - "pinID", pinID, - "clientID", clientID, - "clientName", clientName, - "deviceNickname", deviceNickname, - "clientVersion", clientVersion, - "platform", platform); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long pinID; - - private String clientID; - - private Optional clientName = Optional.empty(); - - private Optional deviceNickname = Optional.empty(); - - private Optional clientVersion = Optional.empty(); - - private Optional platform = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The PinID to retrieve an access token for - */ - public Builder pinID(long pinID) { - Utils.checkNotNull(pinID, "pinID"); - this.pinID = pinID; - return this; - } - - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public Builder clientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public Builder clientName(String clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = Optional.ofNullable(clientName); - return this; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public Builder clientName(Optional clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = clientName; - return this; - } - - - /** - * A relatively friendly name for the client device - */ - public Builder deviceNickname(String deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = Optional.ofNullable(deviceNickname); - return this; - } - - /** - * A relatively friendly name for the client device - */ - public Builder deviceNickname(Optional deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = deviceNickname; - return this; - } - - - /** - * The version of the client application. - */ - public Builder clientVersion(String clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = Optional.ofNullable(clientVersion); - return this; - } - - /** - * The version of the client application. - */ - public Builder clientVersion(Optional clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = clientVersion; - return this; - } - - - /** - * The platform of the client application. - */ - public Builder platform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - /** - * The platform of the client application. - */ - public Builder platform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - public GetTokenByPinIdRequest build() { - - return new GetTokenByPinIdRequest( - pinID, clientID, clientName, - deviceNickname, clientVersion, platform); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequestBuilder.java deleted file mode 100644 index 803d446c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequestBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetTokenByPinId; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetTokenByPinIdRequestBuilder { - - private GetTokenByPinIdRequest request; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetTokenByPinIdRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetTokenByPinIdRequestBuilder request(GetTokenByPinIdRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetTokenByPinIdRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetTokenByPinIdRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public GetTokenByPinIdResponse call() throws Exception { - - RequestOperation operation - = new GetTokenByPinId.Sync(sdkConfiguration, serverURL); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdResponse.java deleted file mode 100644 index 50c3a8d0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetTokenByPinIdResponse 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 Pin with a non-null authToken when it has been verified by the user - */ - private Optional authPinContainer; - - @JsonCreator - public GetTokenByPinIdResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional authPinContainer) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.authPinContainer = authPinContainer; - } - - public GetTokenByPinIdResponse( - 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 Pin with a non-null authToken when it has been verified by the user - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional authPinContainer() { - return (Optional) authPinContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetTokenByPinIdResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetTokenByPinIdResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenByPinIdResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Pin with a non-null authToken when it has been verified by the user - */ - public GetTokenByPinIdResponse withAuthPinContainer(GetTokenByPinIdAuthPinContainer authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = Optional.ofNullable(authPinContainer); - return this; - } - - - /** - * The Pin with a non-null authToken when it has been verified by the user - */ - public GetTokenByPinIdResponse withAuthPinContainer(Optional authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = authPinContainer; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdResponse other = (GetTokenByPinIdResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.authPinContainer, other.authPinContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - authPinContainer); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "authPinContainer", authPinContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional authPinContainer = 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 Pin with a non-null authToken when it has been verified by the user - */ - public Builder authPinContainer(GetTokenByPinIdAuthPinContainer authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = Optional.ofNullable(authPinContainer); - return this; - } - - /** - * The Pin with a non-null authToken when it has been verified by the user - */ - public Builder authPinContainer(Optional authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = authPinContainer; - return this; - } - - public GetTokenByPinIdResponse build() { - - return new GetTokenByPinIdResponse( - contentType, statusCode, rawResponse, - authPinContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationResponseStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationResponseStatus.java deleted file mode 100644 index 6d87ca1a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsAuthenticationResponseStatus.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

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

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

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

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

String representation of subscriptionActive - */ -@JsonDeserialize(using = GetTokenDetailsAuthenticationStatus._Deserializer.class) -@JsonSerialize(using = GetTokenDetailsAuthenticationStatus._Serializer.class) -public class GetTokenDetailsAuthenticationStatus { - - public static final GetTokenDetailsAuthenticationStatus INACTIVE = new GetTokenDetailsAuthenticationStatus("Inactive"); - public static final GetTokenDetailsAuthenticationStatus ACTIVE = new GetTokenDetailsAuthenticationStatus("Active"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetTokenDetailsAuthenticationStatus(String value) { - this.value = value; - } - - /** - * Returns a GetTokenDetailsAuthenticationStatus with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetTokenDetailsAuthenticationStatus - */ - public static GetTokenDetailsAuthenticationStatus of(String value) { - synchronized (GetTokenDetailsAuthenticationStatus.class) { - return values.computeIfAbsent(value, v -> new GetTokenDetailsAuthenticationStatus(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetTokenDetailsAuthenticationStatus other = (GetTokenDetailsAuthenticationStatus) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetTokenDetailsAuthenticationStatus [value=" + value + "]"; - } - - // return an array just like an enum - public static GetTokenDetailsAuthenticationStatus[] values() { - synchronized (GetTokenDetailsAuthenticationStatus.class) { - return values.values().toArray(new GetTokenDetailsAuthenticationStatus[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("Inactive", INACTIVE); - map.put("Active", ACTIVE); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("Inactive", GetTokenDetailsAuthenticationStatusEnum.INACTIVE); - map.put("Active", GetTokenDetailsAuthenticationStatusEnum.ACTIVE); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetTokenDetailsAuthenticationStatus.class); - } - - @Override - public void serialize(GetTokenDetailsAuthenticationStatus value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetTokenDetailsAuthenticationStatus.class); - } - - @Override - public GetTokenDetailsAuthenticationStatus deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetTokenDetailsAuthenticationStatus.of(v); - } - } - - public enum GetTokenDetailsAuthenticationStatusEnum { - - INACTIVE("Inactive"), - ACTIVE("Active"),; - - private final String value; - - private GetTokenDetailsAuthenticationStatusEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsRequestBuilder.java deleted file mode 100644 index 89e69d26..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsRequestBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetTokenDetails; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetTokenDetailsRequestBuilder { - - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetTokenDetailsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetTokenDetailsRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetTokenDetailsRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public GetTokenDetailsResponse call() throws Exception { - - RequestlessOperation operation - = new GetTokenDetails.Sync(sdkConfiguration, serverURL); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsResponse.java deleted file mode 100644 index e9a5f1ec..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetTokenDetailsResponse 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; - - /** - * Logged in user details - */ - private Optional userPlexAccount; - - @JsonCreator - public GetTokenDetailsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional userPlexAccount) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.userPlexAccount = userPlexAccount; - } - - public GetTokenDetailsResponse( - 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; - } - - /** - * Logged in user details - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional userPlexAccount() { - return (Optional) userPlexAccount; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetTokenDetailsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetTokenDetailsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenDetailsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Logged in user details - */ - public GetTokenDetailsResponse withUserPlexAccount(GetTokenDetailsUserPlexAccount userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = Optional.ofNullable(userPlexAccount); - return this; - } - - - /** - * Logged in user details - */ - public GetTokenDetailsResponse withUserPlexAccount(Optional userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = userPlexAccount; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenDetailsResponse other = (GetTokenDetailsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.userPlexAccount, other.userPlexAccount); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - userPlexAccount); - } - - @Override - public String toString() { - return Utils.toString(GetTokenDetailsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "userPlexAccount", userPlexAccount); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional userPlexAccount = 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; - } - - - /** - * Logged in user details - */ - public Builder userPlexAccount(GetTokenDetailsUserPlexAccount userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = Optional.ofNullable(userPlexAccount); - return this; - } - - /** - * Logged in user details - */ - public Builder userPlexAccount(Optional userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = userPlexAccount; - return this; - } - - public GetTokenDetailsResponse build() { - - return new GetTokenDetailsResponse( - contentType, statusCode, rawResponse, - userPlexAccount); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsStatus.java deleted file mode 100644 index cd6053cd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsStatus.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -@JsonDeserialize(using = GetTokenDetailsStatus._Deserializer.class) -@JsonSerialize(using = GetTokenDetailsStatus._Serializer.class) -public class GetTokenDetailsStatus { - - public static final GetTokenDetailsStatus ONLINE = new GetTokenDetailsStatus("online"); - public static final GetTokenDetailsStatus OFFLINE = new GetTokenDetailsStatus("offline"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private GetTokenDetailsStatus(String value) { - this.value = value; - } - - /** - * Returns a GetTokenDetailsStatus with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetTokenDetailsStatus - */ - public static GetTokenDetailsStatus of(String value) { - synchronized (GetTokenDetailsStatus.class) { - return values.computeIfAbsent(value, v -> new GetTokenDetailsStatus(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetTokenDetailsStatus other = (GetTokenDetailsStatus) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetTokenDetailsStatus [value=" + value + "]"; - } - - // return an array just like an enum - public static GetTokenDetailsStatus[] values() { - synchronized (GetTokenDetailsStatus.class) { - return values.values().toArray(new GetTokenDetailsStatus[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("online", ONLINE); - map.put("offline", OFFLINE); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("online", GetTokenDetailsStatusEnum.ONLINE); - map.put("offline", GetTokenDetailsStatusEnum.OFFLINE); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetTokenDetailsStatus.class); - } - - @Override - public void serialize(GetTokenDetailsStatus value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetTokenDetailsStatus.class); - } - - @Override - public GetTokenDetailsStatus deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetTokenDetailsStatus.of(v); - } - } - - public enum GetTokenDetailsStatusEnum { - - ONLINE("online"), - OFFLINE("offline"),; - - private final String value; - - private GetTokenDetailsStatusEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsSubscription.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsSubscription.java deleted file mode 100644 index 71fcd576..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsSubscription.java +++ /dev/null @@ -1,434 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class GetTokenDetailsSubscription { - /** - * List of features allowed on your Plex Pass subscription - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("features") - private Optional> features; - - /** - * If the account's Plex Pass subscription is active - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("active") - private Optional active; - - /** - * Date the account subscribed to Plex Pass - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subscribedAt") - private JsonNullable subscribedAt; - - /** - * String representation of subscriptionActive - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - /** - * Payment service used for your Plex Pass subscription - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("paymentService") - private JsonNullable paymentService; - - /** - * Name of Plex Pass subscription plan - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("plan") - private JsonNullable plan; - - @JsonCreator - public GetTokenDetailsSubscription( - @JsonProperty("features") Optional> features, - @JsonProperty("active") Optional active, - @JsonProperty("subscribedAt") JsonNullable subscribedAt, - @JsonProperty("status") Optional status, - @JsonProperty("paymentService") JsonNullable paymentService, - @JsonProperty("plan") JsonNullable plan) { - Utils.checkNotNull(features, "features"); - Utils.checkNotNull(active, "active"); - Utils.checkNotNull(subscribedAt, "subscribedAt"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(paymentService, "paymentService"); - Utils.checkNotNull(plan, "plan"); - this.features = features; - this.active = active; - this.subscribedAt = subscribedAt; - this.status = status; - this.paymentService = paymentService; - this.plan = plan; - } - - public GetTokenDetailsSubscription() { - this(Optional.empty(), Optional.empty(), JsonNullable.undefined(), - Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); - } - - /** - * List of features allowed on your Plex Pass subscription - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> features() { - return (Optional>) features; - } - - /** - * If the account's Plex Pass subscription is active - */ - @JsonIgnore - public Optional active() { - return active; - } - - /** - * Date the account subscribed to Plex Pass - */ - @JsonIgnore - public JsonNullable subscribedAt() { - return subscribedAt; - } - - /** - * String representation of subscriptionActive - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional status() { - return (Optional) status; - } - - /** - * Payment service used for your Plex Pass subscription - */ - @JsonIgnore - public JsonNullable paymentService() { - return paymentService; - } - - /** - * Name of Plex Pass subscription plan - */ - @JsonIgnore - public JsonNullable plan() { - return plan; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public GetTokenDetailsSubscription withFeatures(List features) { - Utils.checkNotNull(features, "features"); - this.features = Optional.ofNullable(features); - return this; - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public GetTokenDetailsSubscription withFeatures(Optional> features) { - Utils.checkNotNull(features, "features"); - this.features = features; - return this; - } - - /** - * If the account's Plex Pass subscription is active - */ - public GetTokenDetailsSubscription withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - - /** - * If the account's Plex Pass subscription is active - */ - public GetTokenDetailsSubscription withActive(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public GetTokenDetailsSubscription withSubscribedAt(String subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = JsonNullable.of(subscribedAt); - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public GetTokenDetailsSubscription withSubscribedAt(JsonNullable subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = subscribedAt; - return this; - } - - /** - * String representation of subscriptionActive - */ - public GetTokenDetailsSubscription withStatus(GetTokenDetailsAuthenticationResponseStatus status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - /** - * String representation of subscriptionActive - */ - public GetTokenDetailsSubscription withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public GetTokenDetailsSubscription withPaymentService(String paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = JsonNullable.of(paymentService); - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public GetTokenDetailsSubscription withPaymentService(JsonNullable paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = paymentService; - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public GetTokenDetailsSubscription withPlan(String plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = JsonNullable.of(plan); - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public GetTokenDetailsSubscription withPlan(JsonNullable plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = plan; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenDetailsSubscription other = (GetTokenDetailsSubscription) o; - return - Utils.enhancedDeepEquals(this.features, other.features) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.subscribedAt, other.subscribedAt) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.paymentService, other.paymentService) && - Utils.enhancedDeepEquals(this.plan, other.plan); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - features, active, subscribedAt, - status, paymentService, plan); - } - - @Override - public String toString() { - return Utils.toString(GetTokenDetailsSubscription.class, - "features", features, - "active", active, - "subscribedAt", subscribedAt, - "status", status, - "paymentService", paymentService, - "plan", plan); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> features = Optional.empty(); - - private Optional active = Optional.empty(); - - private JsonNullable subscribedAt = JsonNullable.undefined(); - - private Optional status = Optional.empty(); - - private JsonNullable paymentService = JsonNullable.undefined(); - - private JsonNullable plan = JsonNullable.undefined(); - - private Builder() { - // force use of static builder() method - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public Builder features(List features) { - Utils.checkNotNull(features, "features"); - this.features = Optional.ofNullable(features); - return this; - } - - /** - * List of features allowed on your Plex Pass subscription - */ - public Builder features(Optional> features) { - Utils.checkNotNull(features, "features"); - this.features = features; - return this; - } - - - /** - * If the account's Plex Pass subscription is active - */ - public Builder active(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - /** - * If the account's Plex Pass subscription is active - */ - public Builder active(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - - /** - * Date the account subscribed to Plex Pass - */ - public Builder subscribedAt(String subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = JsonNullable.of(subscribedAt); - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public Builder subscribedAt(JsonNullable subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = subscribedAt; - return this; - } - - - /** - * String representation of subscriptionActive - */ - public Builder status(GetTokenDetailsAuthenticationResponseStatus status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - /** - * String representation of subscriptionActive - */ - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * Payment service used for your Plex Pass subscription - */ - public Builder paymentService(String paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = JsonNullable.of(paymentService); - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public Builder paymentService(JsonNullable paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = paymentService; - return this; - } - - - /** - * Name of Plex Pass subscription plan - */ - public Builder plan(String plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = JsonNullable.of(plan); - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public Builder plan(JsonNullable plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = plan; - return this; - } - - public GetTokenDetailsSubscription build() { - - return new GetTokenDetailsSubscription( - features, active, subscribedAt, - status, paymentService, plan); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsUserPlexAccount.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsUserPlexAccount.java deleted file mode 100644 index d9ca82f5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenDetailsUserPlexAccount.java +++ /dev/null @@ -1,2266 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Deprecated; -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.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * GetTokenDetailsUserPlexAccount - * - *

Logged in user details - */ -public class GetTokenDetailsUserPlexAccount { - /** - * Unknown - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("adsConsent") - private Optional adsConsent; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("adsConsentReminderAt") - private Optional adsConsentReminderAt; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("adsConsentSetAt") - private Optional adsConsentSetAt; - - /** - * Unknown - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("anonymous") - private JsonNullable anonymous; - - /** - * The account token - */ - @JsonProperty("authToken") - private String authToken; - - /** - * If the two-factor authentication backup codes have been created - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("backupCodesCreated") - private Optional backupCodesCreated; - - /** - * If the account has been confirmed - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("confirmed") - private Optional confirmed; - - /** - * The account country - */ - @JsonProperty("country") - private String country; - - /** - * The account email address - */ - @JsonProperty("email") - private String email; - - /** - * If login with email only is enabled - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("emailOnlyAuth") - private Optional emailOnlyAuth; - - /** - * If experimental features are enabled - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("experimentalFeatures") - private Optional experimentalFeatures; - - /** - * Your account full name - */ - @JsonProperty("friendlyName") - private String friendlyName; - - /** - * List of devices your allowed to use with this account - */ - @JsonProperty("entitlements") - private List entitlements; - - /** - * If the account is a Plex Home guest user - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("guest") - private Optional guest; - - /** - * If the account has a password - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasPassword") - private Optional hasPassword; - - /** - * If the account is a Plex Home user - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("home") - private Optional home; - - /** - * If the account is the Plex Home admin - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("homeAdmin") - private Optional homeAdmin; - - /** - * The number of accounts in the Plex Home - */ - @JsonProperty("homeSize") - private int homeSize; - - /** - * The Plex account ID - */ - @JsonProperty("id") - private int id; - - /** - * Unix epoch datetime in seconds - */ - @JsonProperty("joinedAt") - private long joinedAt; - - /** - * The account locale - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("locale") - private Optional locale; - - /** - * If you are subscribed to the Plex newsletter - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mailingListActive") - private Optional mailingListActive; - - /** - * Your current mailing list status (active or unsubscribed) - */ - @JsonProperty("mailingListStatus") - private MailingListStatus mailingListStatus; - - /** - * The maximum number of accounts allowed in the Plex Home - */ - @JsonProperty("maxHomeSize") - private int maxHomeSize; - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("pin") - @Deprecated - private Optional pin; - - - @JsonProperty("profile") - private UserProfile profile; - - /** - * If the account has a Plex Home PIN enabled - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("protected") - private Optional protected_; - - /** - * Unix epoch datetime in seconds - */ - @JsonProperty("rememberExpiresAt") - private long rememberExpiresAt; - - /** - * If the account is a Plex Home managed user - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("restricted") - private Optional restricted; - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("roles") - private Optional> roles; - - /** - * Unknown - */ - @JsonProperty("scrobbleTypes") - private String scrobbleTypes; - - - @JsonProperty("services") - private List services; - - /** - * If the account’s Plex Pass subscription is active - */ - @JsonProperty("subscription") - private Subscription subscription; - - /** - * Description of the Plex Pass subscription - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("subscriptionDescription") - private Optional subscriptionDescription; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subscriptions") - private Optional> subscriptions; - - /** - * URL of the account thumbnail - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The title of the account (username or friendly name) - */ - @JsonProperty("title") - private String title; - - /** - * If two-factor authentication is enabled - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("twoFactorEnabled") - private Optional twoFactorEnabled; - - /** - * The account username - */ - @JsonProperty("username") - private String username; - - /** - * The account UUID - */ - @JsonProperty("uuid") - private String uuid; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("attributionPartner") - private Optional attributionPartner; - - @JsonCreator - public GetTokenDetailsUserPlexAccount( - @JsonProperty("adsConsent") Optional adsConsent, - @JsonProperty("adsConsentReminderAt") Optional adsConsentReminderAt, - @JsonProperty("adsConsentSetAt") Optional adsConsentSetAt, - @JsonProperty("anonymous") JsonNullable anonymous, - @JsonProperty("authToken") String authToken, - @JsonProperty("backupCodesCreated") Optional backupCodesCreated, - @JsonProperty("confirmed") Optional confirmed, - @JsonProperty("country") String country, - @JsonProperty("email") String email, - @JsonProperty("emailOnlyAuth") Optional emailOnlyAuth, - @JsonProperty("experimentalFeatures") Optional experimentalFeatures, - @JsonProperty("friendlyName") String friendlyName, - @JsonProperty("entitlements") List entitlements, - @JsonProperty("guest") Optional guest, - @JsonProperty("hasPassword") Optional hasPassword, - @JsonProperty("home") Optional home, - @JsonProperty("homeAdmin") Optional homeAdmin, - @JsonProperty("homeSize") int homeSize, - @JsonProperty("id") int id, - @JsonProperty("joinedAt") long joinedAt, - @JsonProperty("locale") Optional locale, - @JsonProperty("mailingListActive") Optional mailingListActive, - @JsonProperty("mailingListStatus") MailingListStatus mailingListStatus, - @JsonProperty("maxHomeSize") int maxHomeSize, - @JsonProperty("pin") Optional pin, - @JsonProperty("profile") UserProfile profile, - @JsonProperty("protected") Optional protected_, - @JsonProperty("rememberExpiresAt") long rememberExpiresAt, - @JsonProperty("restricted") Optional restricted, - @JsonProperty("roles") Optional> roles, - @JsonProperty("scrobbleTypes") String scrobbleTypes, - @JsonProperty("services") List services, - @JsonProperty("subscription") Subscription subscription, - @JsonProperty("subscriptionDescription") Optional subscriptionDescription, - @JsonProperty("subscriptions") Optional> subscriptions, - @JsonProperty("thumb") String thumb, - @JsonProperty("title") String title, - @JsonProperty("twoFactorEnabled") Optional twoFactorEnabled, - @JsonProperty("username") String username, - @JsonProperty("uuid") String uuid, - @JsonProperty("attributionPartner") Optional attributionPartner) { - Utils.checkNotNull(adsConsent, "adsConsent"); - Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); - Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); - Utils.checkNotNull(anonymous, "anonymous"); - Utils.checkNotNull(authToken, "authToken"); - Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); - Utils.checkNotNull(confirmed, "confirmed"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(email, "email"); - Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); - Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); - Utils.checkNotNull(friendlyName, "friendlyName"); - Utils.checkNotNull(entitlements, "entitlements"); - Utils.checkNotNull(guest, "guest"); - Utils.checkNotNull(hasPassword, "hasPassword"); - Utils.checkNotNull(home, "home"); - Utils.checkNotNull(homeAdmin, "homeAdmin"); - Utils.checkNotNull(homeSize, "homeSize"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(joinedAt, "joinedAt"); - Utils.checkNotNull(locale, "locale"); - Utils.checkNotNull(mailingListActive, "mailingListActive"); - Utils.checkNotNull(mailingListStatus, "mailingListStatus"); - Utils.checkNotNull(maxHomeSize, "maxHomeSize"); - Utils.checkNotNull(pin, "pin"); - Utils.checkNotNull(profile, "profile"); - Utils.checkNotNull(protected_, "protected_"); - Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt"); - Utils.checkNotNull(restricted, "restricted"); - Utils.checkNotNull(roles, "roles"); - Utils.checkNotNull(scrobbleTypes, "scrobbleTypes"); - Utils.checkNotNull(services, "services"); - Utils.checkNotNull(subscription, "subscription"); - Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); - Utils.checkNotNull(subscriptions, "subscriptions"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); - Utils.checkNotNull(username, "username"); - Utils.checkNotNull(uuid, "uuid"); - Utils.checkNotNull(attributionPartner, "attributionPartner"); - this.adsConsent = adsConsent; - this.adsConsentReminderAt = adsConsentReminderAt; - this.adsConsentSetAt = adsConsentSetAt; - this.anonymous = anonymous; - this.authToken = authToken; - this.backupCodesCreated = backupCodesCreated; - this.confirmed = confirmed; - this.country = country; - this.email = email; - this.emailOnlyAuth = emailOnlyAuth; - this.experimentalFeatures = experimentalFeatures; - this.friendlyName = friendlyName; - this.entitlements = entitlements; - this.guest = guest; - this.hasPassword = hasPassword; - this.home = home; - this.homeAdmin = homeAdmin; - this.homeSize = homeSize; - this.id = id; - this.joinedAt = joinedAt; - this.locale = locale; - this.mailingListActive = mailingListActive; - this.mailingListStatus = mailingListStatus; - this.maxHomeSize = maxHomeSize; - this.pin = pin; - this.profile = profile; - this.protected_ = protected_; - this.rememberExpiresAt = rememberExpiresAt; - this.restricted = restricted; - this.roles = roles; - this.scrobbleTypes = scrobbleTypes; - this.services = services; - this.subscription = subscription; - this.subscriptionDescription = subscriptionDescription; - this.subscriptions = subscriptions; - this.thumb = thumb; - this.title = title; - this.twoFactorEnabled = twoFactorEnabled; - this.username = username; - this.uuid = uuid; - this.attributionPartner = attributionPartner; - } - - public GetTokenDetailsUserPlexAccount( - String authToken, - String country, - String email, - String friendlyName, - List entitlements, - int homeSize, - int id, - long joinedAt, - MailingListStatus mailingListStatus, - int maxHomeSize, - UserProfile profile, - long rememberExpiresAt, - String scrobbleTypes, - List services, - Subscription subscription, - String thumb, - String title, - String username, - String uuid) { - this(Optional.empty(), Optional.empty(), Optional.empty(), - JsonNullable.undefined(), authToken, Optional.empty(), - Optional.empty(), country, email, - Optional.empty(), Optional.empty(), friendlyName, - entitlements, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), homeSize, - id, joinedAt, Optional.empty(), - Optional.empty(), mailingListStatus, maxHomeSize, - Optional.empty(), profile, Optional.empty(), - rememberExpiresAt, Optional.empty(), Optional.empty(), - scrobbleTypes, services, subscription, - Optional.empty(), Optional.empty(), thumb, - title, Optional.empty(), username, - uuid, Optional.empty()); - } - - /** - * Unknown - */ - @JsonIgnore - public Optional adsConsent() { - return adsConsent; - } - - @JsonIgnore - public Optional adsConsentReminderAt() { - return adsConsentReminderAt; - } - - @JsonIgnore - public Optional adsConsentSetAt() { - return adsConsentSetAt; - } - - /** - * Unknown - */ - @JsonIgnore - public JsonNullable anonymous() { - return anonymous; - } - - /** - * The account token - */ - @JsonIgnore - public String authToken() { - return authToken; - } - - /** - * If the two-factor authentication backup codes have been created - */ - @JsonIgnore - public Optional backupCodesCreated() { - return backupCodesCreated; - } - - /** - * If the account has been confirmed - */ - @JsonIgnore - public Optional confirmed() { - return confirmed; - } - - /** - * The account country - */ - @JsonIgnore - public String country() { - return country; - } - - /** - * The account email address - */ - @JsonIgnore - public String email() { - return email; - } - - /** - * If login with email only is enabled - */ - @JsonIgnore - public Optional emailOnlyAuth() { - return emailOnlyAuth; - } - - /** - * If experimental features are enabled - */ - @JsonIgnore - public Optional experimentalFeatures() { - return experimentalFeatures; - } - - /** - * Your account full name - */ - @JsonIgnore - public String friendlyName() { - return friendlyName; - } - - /** - * List of devices your allowed to use with this account - */ - @JsonIgnore - public List entitlements() { - return entitlements; - } - - /** - * If the account is a Plex Home guest user - */ - @JsonIgnore - public Optional guest() { - return guest; - } - - /** - * If the account has a password - */ - @JsonIgnore - public Optional hasPassword() { - return hasPassword; - } - - /** - * If the account is a Plex Home user - */ - @JsonIgnore - public Optional home() { - return home; - } - - /** - * If the account is the Plex Home admin - */ - @JsonIgnore - public Optional homeAdmin() { - return homeAdmin; - } - - /** - * The number of accounts in the Plex Home - */ - @JsonIgnore - public int homeSize() { - return homeSize; - } - - /** - * The Plex account ID - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public long joinedAt() { - return joinedAt; - } - - /** - * The account locale - */ - @JsonIgnore - public Optional locale() { - return locale; - } - - /** - * If you are subscribed to the Plex newsletter - */ - @JsonIgnore - public Optional mailingListActive() { - return mailingListActive; - } - - /** - * Your current mailing list status (active or unsubscribed) - */ - @JsonIgnore - public MailingListStatus mailingListStatus() { - return mailingListStatus; - } - - /** - * The maximum number of accounts allowed in the Plex Home - */ - @JsonIgnore - public int maxHomeSize() { - return maxHomeSize; - } - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - @JsonIgnore - public Optional pin() { - return pin; - } - - @JsonIgnore - public UserProfile profile() { - return profile; - } - - /** - * If the account has a Plex Home PIN enabled - */ - @JsonIgnore - public Optional protected_() { - return protected_; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public long rememberExpiresAt() { - return rememberExpiresAt; - } - - /** - * If the account is a Plex Home managed user - */ - @JsonIgnore - public Optional restricted() { - return restricted; - } - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> roles() { - return (Optional>) roles; - } - - /** - * Unknown - */ - @JsonIgnore - public String scrobbleTypes() { - return scrobbleTypes; - } - - @JsonIgnore - public List services() { - return services; - } - - /** - * If the account’s Plex Pass subscription is active - */ - @JsonIgnore - public Subscription subscription() { - return subscription; - } - - /** - * Description of the Plex Pass subscription - */ - @JsonIgnore - public Optional subscriptionDescription() { - return subscriptionDescription; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> subscriptions() { - return (Optional>) subscriptions; - } - - /** - * URL of the account thumbnail - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The title of the account (username or friendly name) - */ - @JsonIgnore - public String title() { - return title; - } - - /** - * If two-factor authentication is enabled - */ - @JsonIgnore - public Optional twoFactorEnabled() { - return twoFactorEnabled; - } - - /** - * The account username - */ - @JsonIgnore - public String username() { - return username; - } - - /** - * The account UUID - */ - @JsonIgnore - public String uuid() { - return uuid; - } - - @JsonIgnore - public Optional attributionPartner() { - return attributionPartner; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unknown - */ - public GetTokenDetailsUserPlexAccount withAdsConsent(boolean adsConsent) { - Utils.checkNotNull(adsConsent, "adsConsent"); - this.adsConsent = Optional.ofNullable(adsConsent); - return this; - } - - - /** - * Unknown - */ - public GetTokenDetailsUserPlexAccount withAdsConsent(Optional adsConsent) { - Utils.checkNotNull(adsConsent, "adsConsent"); - this.adsConsent = adsConsent; - return this; - } - - public GetTokenDetailsUserPlexAccount withAdsConsentReminderAt(long adsConsentReminderAt) { - Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); - this.adsConsentReminderAt = Optional.ofNullable(adsConsentReminderAt); - return this; - } - - - public GetTokenDetailsUserPlexAccount withAdsConsentReminderAt(Optional adsConsentReminderAt) { - Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); - this.adsConsentReminderAt = adsConsentReminderAt; - return this; - } - - public GetTokenDetailsUserPlexAccount withAdsConsentSetAt(long adsConsentSetAt) { - Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); - this.adsConsentSetAt = Optional.ofNullable(adsConsentSetAt); - return this; - } - - - public GetTokenDetailsUserPlexAccount withAdsConsentSetAt(Optional adsConsentSetAt) { - Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); - this.adsConsentSetAt = adsConsentSetAt; - return this; - } - - /** - * Unknown - */ - public GetTokenDetailsUserPlexAccount withAnonymous(boolean anonymous) { - Utils.checkNotNull(anonymous, "anonymous"); - this.anonymous = JsonNullable.of(anonymous); - return this; - } - - /** - * Unknown - */ - public GetTokenDetailsUserPlexAccount withAnonymous(JsonNullable anonymous) { - Utils.checkNotNull(anonymous, "anonymous"); - this.anonymous = anonymous; - return this; - } - - /** - * The account token - */ - public GetTokenDetailsUserPlexAccount withAuthToken(String authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = authToken; - return this; - } - - /** - * If the two-factor authentication backup codes have been created - */ - public GetTokenDetailsUserPlexAccount withBackupCodesCreated(boolean backupCodesCreated) { - Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); - this.backupCodesCreated = Optional.ofNullable(backupCodesCreated); - return this; - } - - - /** - * If the two-factor authentication backup codes have been created - */ - public GetTokenDetailsUserPlexAccount withBackupCodesCreated(Optional backupCodesCreated) { - Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); - this.backupCodesCreated = backupCodesCreated; - return this; - } - - /** - * If the account has been confirmed - */ - public GetTokenDetailsUserPlexAccount withConfirmed(boolean confirmed) { - Utils.checkNotNull(confirmed, "confirmed"); - this.confirmed = Optional.ofNullable(confirmed); - return this; - } - - - /** - * If the account has been confirmed - */ - public GetTokenDetailsUserPlexAccount withConfirmed(Optional confirmed) { - Utils.checkNotNull(confirmed, "confirmed"); - this.confirmed = confirmed; - return this; - } - - /** - * The account country - */ - public GetTokenDetailsUserPlexAccount withCountry(String country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - /** - * The account email address - */ - public GetTokenDetailsUserPlexAccount withEmail(String email) { - Utils.checkNotNull(email, "email"); - this.email = email; - return this; - } - - /** - * If login with email only is enabled - */ - public GetTokenDetailsUserPlexAccount withEmailOnlyAuth(boolean emailOnlyAuth) { - Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); - this.emailOnlyAuth = Optional.ofNullable(emailOnlyAuth); - return this; - } - - - /** - * If login with email only is enabled - */ - public GetTokenDetailsUserPlexAccount withEmailOnlyAuth(Optional emailOnlyAuth) { - Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); - this.emailOnlyAuth = emailOnlyAuth; - return this; - } - - /** - * If experimental features are enabled - */ - public GetTokenDetailsUserPlexAccount withExperimentalFeatures(boolean experimentalFeatures) { - Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); - this.experimentalFeatures = Optional.ofNullable(experimentalFeatures); - return this; - } - - - /** - * If experimental features are enabled - */ - public GetTokenDetailsUserPlexAccount withExperimentalFeatures(Optional experimentalFeatures) { - Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); - this.experimentalFeatures = experimentalFeatures; - return this; - } - - /** - * Your account full name - */ - public GetTokenDetailsUserPlexAccount withFriendlyName(String friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = friendlyName; - return this; - } - - /** - * List of devices your allowed to use with this account - */ - public GetTokenDetailsUserPlexAccount withEntitlements(List entitlements) { - Utils.checkNotNull(entitlements, "entitlements"); - this.entitlements = entitlements; - return this; - } - - /** - * If the account is a Plex Home guest user - */ - public GetTokenDetailsUserPlexAccount withGuest(boolean guest) { - Utils.checkNotNull(guest, "guest"); - this.guest = Optional.ofNullable(guest); - return this; - } - - - /** - * If the account is a Plex Home guest user - */ - public GetTokenDetailsUserPlexAccount withGuest(Optional guest) { - Utils.checkNotNull(guest, "guest"); - this.guest = guest; - return this; - } - - /** - * If the account has a password - */ - public GetTokenDetailsUserPlexAccount withHasPassword(boolean hasPassword) { - Utils.checkNotNull(hasPassword, "hasPassword"); - this.hasPassword = Optional.ofNullable(hasPassword); - return this; - } - - - /** - * If the account has a password - */ - public GetTokenDetailsUserPlexAccount withHasPassword(Optional hasPassword) { - Utils.checkNotNull(hasPassword, "hasPassword"); - this.hasPassword = hasPassword; - return this; - } - - /** - * If the account is a Plex Home user - */ - public GetTokenDetailsUserPlexAccount withHome(boolean home) { - Utils.checkNotNull(home, "home"); - this.home = Optional.ofNullable(home); - return this; - } - - - /** - * If the account is a Plex Home user - */ - public GetTokenDetailsUserPlexAccount withHome(Optional home) { - Utils.checkNotNull(home, "home"); - this.home = home; - return this; - } - - /** - * If the account is the Plex Home admin - */ - public GetTokenDetailsUserPlexAccount withHomeAdmin(boolean homeAdmin) { - Utils.checkNotNull(homeAdmin, "homeAdmin"); - this.homeAdmin = Optional.ofNullable(homeAdmin); - return this; - } - - - /** - * If the account is the Plex Home admin - */ - public GetTokenDetailsUserPlexAccount withHomeAdmin(Optional homeAdmin) { - Utils.checkNotNull(homeAdmin, "homeAdmin"); - this.homeAdmin = homeAdmin; - return this; - } - - /** - * The number of accounts in the Plex Home - */ - public GetTokenDetailsUserPlexAccount withHomeSize(int homeSize) { - Utils.checkNotNull(homeSize, "homeSize"); - this.homeSize = homeSize; - return this; - } - - /** - * The Plex account ID - */ - public GetTokenDetailsUserPlexAccount withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public GetTokenDetailsUserPlexAccount withJoinedAt(long joinedAt) { - Utils.checkNotNull(joinedAt, "joinedAt"); - this.joinedAt = joinedAt; - return this; - } - - /** - * The account locale - */ - public GetTokenDetailsUserPlexAccount withLocale(String locale) { - Utils.checkNotNull(locale, "locale"); - this.locale = Optional.ofNullable(locale); - return this; - } - - - /** - * The account locale - */ - public GetTokenDetailsUserPlexAccount withLocale(Optional locale) { - Utils.checkNotNull(locale, "locale"); - this.locale = locale; - return this; - } - - /** - * If you are subscribed to the Plex newsletter - */ - public GetTokenDetailsUserPlexAccount withMailingListActive(boolean mailingListActive) { - Utils.checkNotNull(mailingListActive, "mailingListActive"); - this.mailingListActive = Optional.ofNullable(mailingListActive); - return this; - } - - - /** - * If you are subscribed to the Plex newsletter - */ - public GetTokenDetailsUserPlexAccount withMailingListActive(Optional mailingListActive) { - Utils.checkNotNull(mailingListActive, "mailingListActive"); - this.mailingListActive = mailingListActive; - return this; - } - - /** - * Your current mailing list status (active or unsubscribed) - */ - public GetTokenDetailsUserPlexAccount withMailingListStatus(MailingListStatus mailingListStatus) { - Utils.checkNotNull(mailingListStatus, "mailingListStatus"); - this.mailingListStatus = mailingListStatus; - return this; - } - - /** - * The maximum number of accounts allowed in the Plex Home - */ - public GetTokenDetailsUserPlexAccount withMaxHomeSize(int maxHomeSize) { - Utils.checkNotNull(maxHomeSize, "maxHomeSize"); - this.maxHomeSize = maxHomeSize; - return this; - } - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public GetTokenDetailsUserPlexAccount withPin(String pin) { - Utils.checkNotNull(pin, "pin"); - this.pin = Optional.ofNullable(pin); - return this; - } - - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public GetTokenDetailsUserPlexAccount withPin(Optional pin) { - Utils.checkNotNull(pin, "pin"); - this.pin = pin; - return this; - } - - public GetTokenDetailsUserPlexAccount withProfile(UserProfile profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - /** - * If the account has a Plex Home PIN enabled - */ - public GetTokenDetailsUserPlexAccount withProtected(boolean protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = Optional.ofNullable(protected_); - return this; - } - - - /** - * If the account has a Plex Home PIN enabled - */ - public GetTokenDetailsUserPlexAccount withProtected(Optional protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = protected_; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public GetTokenDetailsUserPlexAccount withRememberExpiresAt(long rememberExpiresAt) { - Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt"); - this.rememberExpiresAt = rememberExpiresAt; - return this; - } - - /** - * If the account is a Plex Home managed user - */ - public GetTokenDetailsUserPlexAccount withRestricted(boolean restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = Optional.ofNullable(restricted); - return this; - } - - - /** - * If the account is a Plex Home managed user - */ - public GetTokenDetailsUserPlexAccount withRestricted(Optional restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = restricted; - return this; - } - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - public GetTokenDetailsUserPlexAccount withRoles(List roles) { - Utils.checkNotNull(roles, "roles"); - this.roles = Optional.ofNullable(roles); - return this; - } - - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - public GetTokenDetailsUserPlexAccount withRoles(Optional> roles) { - Utils.checkNotNull(roles, "roles"); - this.roles = roles; - return this; - } - - /** - * Unknown - */ - public GetTokenDetailsUserPlexAccount withScrobbleTypes(String scrobbleTypes) { - Utils.checkNotNull(scrobbleTypes, "scrobbleTypes"); - this.scrobbleTypes = scrobbleTypes; - return this; - } - - public GetTokenDetailsUserPlexAccount withServices(List services) { - Utils.checkNotNull(services, "services"); - this.services = services; - return this; - } - - /** - * If the account’s Plex Pass subscription is active - */ - public GetTokenDetailsUserPlexAccount withSubscription(Subscription subscription) { - Utils.checkNotNull(subscription, "subscription"); - this.subscription = subscription; - return this; - } - - /** - * Description of the Plex Pass subscription - */ - public GetTokenDetailsUserPlexAccount withSubscriptionDescription(String subscriptionDescription) { - Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); - this.subscriptionDescription = Optional.ofNullable(subscriptionDescription); - return this; - } - - - /** - * Description of the Plex Pass subscription - */ - public GetTokenDetailsUserPlexAccount withSubscriptionDescription(Optional subscriptionDescription) { - Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); - this.subscriptionDescription = subscriptionDescription; - return this; - } - - public GetTokenDetailsUserPlexAccount withSubscriptions(List subscriptions) { - Utils.checkNotNull(subscriptions, "subscriptions"); - this.subscriptions = Optional.ofNullable(subscriptions); - return this; - } - - - public GetTokenDetailsUserPlexAccount withSubscriptions(Optional> subscriptions) { - Utils.checkNotNull(subscriptions, "subscriptions"); - this.subscriptions = subscriptions; - return this; - } - - /** - * URL of the account thumbnail - */ - public GetTokenDetailsUserPlexAccount withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The title of the account (username or friendly name) - */ - public GetTokenDetailsUserPlexAccount withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * If two-factor authentication is enabled - */ - public GetTokenDetailsUserPlexAccount withTwoFactorEnabled(boolean twoFactorEnabled) { - Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); - this.twoFactorEnabled = Optional.ofNullable(twoFactorEnabled); - return this; - } - - - /** - * If two-factor authentication is enabled - */ - public GetTokenDetailsUserPlexAccount withTwoFactorEnabled(Optional twoFactorEnabled) { - Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); - this.twoFactorEnabled = twoFactorEnabled; - return this; - } - - /** - * The account username - */ - public GetTokenDetailsUserPlexAccount withUsername(String username) { - Utils.checkNotNull(username, "username"); - this.username = username; - return this; - } - - /** - * The account UUID - */ - public GetTokenDetailsUserPlexAccount withUuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - public GetTokenDetailsUserPlexAccount withAttributionPartner(String attributionPartner) { - Utils.checkNotNull(attributionPartner, "attributionPartner"); - this.attributionPartner = Optional.ofNullable(attributionPartner); - return this; - } - - - public GetTokenDetailsUserPlexAccount withAttributionPartner(Optional attributionPartner) { - Utils.checkNotNull(attributionPartner, "attributionPartner"); - this.attributionPartner = attributionPartner; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenDetailsUserPlexAccount other = (GetTokenDetailsUserPlexAccount) o; - return - Utils.enhancedDeepEquals(this.adsConsent, other.adsConsent) && - Utils.enhancedDeepEquals(this.adsConsentReminderAt, other.adsConsentReminderAt) && - Utils.enhancedDeepEquals(this.adsConsentSetAt, other.adsConsentSetAt) && - Utils.enhancedDeepEquals(this.anonymous, other.anonymous) && - Utils.enhancedDeepEquals(this.authToken, other.authToken) && - Utils.enhancedDeepEquals(this.backupCodesCreated, other.backupCodesCreated) && - Utils.enhancedDeepEquals(this.confirmed, other.confirmed) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.email, other.email) && - Utils.enhancedDeepEquals(this.emailOnlyAuth, other.emailOnlyAuth) && - Utils.enhancedDeepEquals(this.experimentalFeatures, other.experimentalFeatures) && - Utils.enhancedDeepEquals(this.friendlyName, other.friendlyName) && - Utils.enhancedDeepEquals(this.entitlements, other.entitlements) && - Utils.enhancedDeepEquals(this.guest, other.guest) && - Utils.enhancedDeepEquals(this.hasPassword, other.hasPassword) && - Utils.enhancedDeepEquals(this.home, other.home) && - Utils.enhancedDeepEquals(this.homeAdmin, other.homeAdmin) && - Utils.enhancedDeepEquals(this.homeSize, other.homeSize) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.joinedAt, other.joinedAt) && - Utils.enhancedDeepEquals(this.locale, other.locale) && - Utils.enhancedDeepEquals(this.mailingListActive, other.mailingListActive) && - Utils.enhancedDeepEquals(this.mailingListStatus, other.mailingListStatus) && - Utils.enhancedDeepEquals(this.maxHomeSize, other.maxHomeSize) && - Utils.enhancedDeepEquals(this.pin, other.pin) && - Utils.enhancedDeepEquals(this.profile, other.profile) && - Utils.enhancedDeepEquals(this.protected_, other.protected_) && - Utils.enhancedDeepEquals(this.rememberExpiresAt, other.rememberExpiresAt) && - Utils.enhancedDeepEquals(this.restricted, other.restricted) && - Utils.enhancedDeepEquals(this.roles, other.roles) && - Utils.enhancedDeepEquals(this.scrobbleTypes, other.scrobbleTypes) && - Utils.enhancedDeepEquals(this.services, other.services) && - Utils.enhancedDeepEquals(this.subscription, other.subscription) && - Utils.enhancedDeepEquals(this.subscriptionDescription, other.subscriptionDescription) && - Utils.enhancedDeepEquals(this.subscriptions, other.subscriptions) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.twoFactorEnabled, other.twoFactorEnabled) && - Utils.enhancedDeepEquals(this.username, other.username) && - Utils.enhancedDeepEquals(this.uuid, other.uuid) && - Utils.enhancedDeepEquals(this.attributionPartner, other.attributionPartner); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - adsConsent, adsConsentReminderAt, adsConsentSetAt, - anonymous, authToken, backupCodesCreated, - confirmed, country, email, - emailOnlyAuth, experimentalFeatures, friendlyName, - entitlements, guest, hasPassword, - home, homeAdmin, homeSize, - id, joinedAt, locale, - mailingListActive, mailingListStatus, maxHomeSize, - pin, profile, protected_, - rememberExpiresAt, restricted, roles, - scrobbleTypes, services, subscription, - subscriptionDescription, subscriptions, thumb, - title, twoFactorEnabled, username, - uuid, attributionPartner); - } - - @Override - public String toString() { - return Utils.toString(GetTokenDetailsUserPlexAccount.class, - "adsConsent", adsConsent, - "adsConsentReminderAt", adsConsentReminderAt, - "adsConsentSetAt", adsConsentSetAt, - "anonymous", anonymous, - "authToken", authToken, - "backupCodesCreated", backupCodesCreated, - "confirmed", confirmed, - "country", country, - "email", email, - "emailOnlyAuth", emailOnlyAuth, - "experimentalFeatures", experimentalFeatures, - "friendlyName", friendlyName, - "entitlements", entitlements, - "guest", guest, - "hasPassword", hasPassword, - "home", home, - "homeAdmin", homeAdmin, - "homeSize", homeSize, - "id", id, - "joinedAt", joinedAt, - "locale", locale, - "mailingListActive", mailingListActive, - "mailingListStatus", mailingListStatus, - "maxHomeSize", maxHomeSize, - "pin", pin, - "profile", profile, - "protected_", protected_, - "rememberExpiresAt", rememberExpiresAt, - "restricted", restricted, - "roles", roles, - "scrobbleTypes", scrobbleTypes, - "services", services, - "subscription", subscription, - "subscriptionDescription", subscriptionDescription, - "subscriptions", subscriptions, - "thumb", thumb, - "title", title, - "twoFactorEnabled", twoFactorEnabled, - "username", username, - "uuid", uuid, - "attributionPartner", attributionPartner); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional adsConsent = Optional.empty(); - - private Optional adsConsentReminderAt = Optional.empty(); - - private Optional adsConsentSetAt = Optional.empty(); - - private JsonNullable anonymous; - - private String authToken; - - private Optional backupCodesCreated; - - private Optional confirmed; - - private String country; - - private String email; - - private Optional emailOnlyAuth; - - private Optional experimentalFeatures; - - private String friendlyName; - - private List entitlements; - - private Optional guest; - - private Optional hasPassword; - - private Optional home; - - private Optional homeAdmin; - - private Integer homeSize; - - private Integer id; - - private Long joinedAt; - - private Optional locale = Optional.empty(); - - private Optional mailingListActive; - - private MailingListStatus mailingListStatus; - - private Integer maxHomeSize; - - @Deprecated - private Optional pin = Optional.empty(); - - private UserProfile profile; - - private Optional protected_; - - private Long rememberExpiresAt; - - private Optional restricted; - - private Optional> roles = Optional.empty(); - - private String scrobbleTypes; - - private List services; - - private Subscription subscription; - - private Optional subscriptionDescription = Optional.empty(); - - private Optional> subscriptions = Optional.empty(); - - private String thumb; - - private String title; - - private Optional twoFactorEnabled; - - private String username; - - private String uuid; - - private Optional attributionPartner = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unknown - */ - public Builder adsConsent(boolean adsConsent) { - Utils.checkNotNull(adsConsent, "adsConsent"); - this.adsConsent = Optional.ofNullable(adsConsent); - return this; - } - - /** - * Unknown - */ - public Builder adsConsent(Optional adsConsent) { - Utils.checkNotNull(adsConsent, "adsConsent"); - this.adsConsent = adsConsent; - return this; - } - - - public Builder adsConsentReminderAt(long adsConsentReminderAt) { - Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); - this.adsConsentReminderAt = Optional.ofNullable(adsConsentReminderAt); - return this; - } - - public Builder adsConsentReminderAt(Optional adsConsentReminderAt) { - Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); - this.adsConsentReminderAt = adsConsentReminderAt; - return this; - } - - - public Builder adsConsentSetAt(long adsConsentSetAt) { - Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); - this.adsConsentSetAt = Optional.ofNullable(adsConsentSetAt); - return this; - } - - public Builder adsConsentSetAt(Optional adsConsentSetAt) { - Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); - this.adsConsentSetAt = adsConsentSetAt; - return this; - } - - - /** - * Unknown - */ - public Builder anonymous(boolean anonymous) { - Utils.checkNotNull(anonymous, "anonymous"); - this.anonymous = JsonNullable.of(anonymous); - return this; - } - - /** - * Unknown - */ - public Builder anonymous(JsonNullable anonymous) { - Utils.checkNotNull(anonymous, "anonymous"); - this.anonymous = anonymous; - return this; - } - - - /** - * The account token - */ - public Builder authToken(String authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = authToken; - return this; - } - - - /** - * If the two-factor authentication backup codes have been created - */ - public Builder backupCodesCreated(boolean backupCodesCreated) { - Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); - this.backupCodesCreated = Optional.ofNullable(backupCodesCreated); - return this; - } - - /** - * If the two-factor authentication backup codes have been created - */ - public Builder backupCodesCreated(Optional backupCodesCreated) { - Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); - this.backupCodesCreated = backupCodesCreated; - return this; - } - - - /** - * If the account has been confirmed - */ - public Builder confirmed(boolean confirmed) { - Utils.checkNotNull(confirmed, "confirmed"); - this.confirmed = Optional.ofNullable(confirmed); - return this; - } - - /** - * If the account has been confirmed - */ - public Builder confirmed(Optional confirmed) { - Utils.checkNotNull(confirmed, "confirmed"); - this.confirmed = confirmed; - return this; - } - - - /** - * The account country - */ - public Builder country(String country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - - /** - * The account email address - */ - public Builder email(String email) { - Utils.checkNotNull(email, "email"); - this.email = email; - return this; - } - - - /** - * If login with email only is enabled - */ - public Builder emailOnlyAuth(boolean emailOnlyAuth) { - Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); - this.emailOnlyAuth = Optional.ofNullable(emailOnlyAuth); - return this; - } - - /** - * If login with email only is enabled - */ - public Builder emailOnlyAuth(Optional emailOnlyAuth) { - Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); - this.emailOnlyAuth = emailOnlyAuth; - return this; - } - - - /** - * If experimental features are enabled - */ - public Builder experimentalFeatures(boolean experimentalFeatures) { - Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); - this.experimentalFeatures = Optional.ofNullable(experimentalFeatures); - return this; - } - - /** - * If experimental features are enabled - */ - public Builder experimentalFeatures(Optional experimentalFeatures) { - Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); - this.experimentalFeatures = experimentalFeatures; - return this; - } - - - /** - * Your account full name - */ - public Builder friendlyName(String friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = friendlyName; - return this; - } - - - /** - * List of devices your allowed to use with this account - */ - public Builder entitlements(List entitlements) { - Utils.checkNotNull(entitlements, "entitlements"); - this.entitlements = entitlements; - return this; - } - - - /** - * If the account is a Plex Home guest user - */ - public Builder guest(boolean guest) { - Utils.checkNotNull(guest, "guest"); - this.guest = Optional.ofNullable(guest); - return this; - } - - /** - * If the account is a Plex Home guest user - */ - public Builder guest(Optional guest) { - Utils.checkNotNull(guest, "guest"); - this.guest = guest; - return this; - } - - - /** - * If the account has a password - */ - public Builder hasPassword(boolean hasPassword) { - Utils.checkNotNull(hasPassword, "hasPassword"); - this.hasPassword = Optional.ofNullable(hasPassword); - return this; - } - - /** - * If the account has a password - */ - public Builder hasPassword(Optional hasPassword) { - Utils.checkNotNull(hasPassword, "hasPassword"); - this.hasPassword = hasPassword; - return this; - } - - - /** - * If the account is a Plex Home user - */ - public Builder home(boolean home) { - Utils.checkNotNull(home, "home"); - this.home = Optional.ofNullable(home); - return this; - } - - /** - * If the account is a Plex Home user - */ - public Builder home(Optional home) { - Utils.checkNotNull(home, "home"); - this.home = home; - return this; - } - - - /** - * If the account is the Plex Home admin - */ - public Builder homeAdmin(boolean homeAdmin) { - Utils.checkNotNull(homeAdmin, "homeAdmin"); - this.homeAdmin = Optional.ofNullable(homeAdmin); - return this; - } - - /** - * If the account is the Plex Home admin - */ - public Builder homeAdmin(Optional homeAdmin) { - Utils.checkNotNull(homeAdmin, "homeAdmin"); - this.homeAdmin = homeAdmin; - return this; - } - - - /** - * The number of accounts in the Plex Home - */ - public Builder homeSize(int homeSize) { - Utils.checkNotNull(homeSize, "homeSize"); - this.homeSize = homeSize; - return this; - } - - - /** - * The Plex account ID - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder joinedAt(long joinedAt) { - Utils.checkNotNull(joinedAt, "joinedAt"); - this.joinedAt = joinedAt; - return this; - } - - - /** - * The account locale - */ - public Builder locale(String locale) { - Utils.checkNotNull(locale, "locale"); - this.locale = Optional.ofNullable(locale); - return this; - } - - /** - * The account locale - */ - public Builder locale(Optional locale) { - Utils.checkNotNull(locale, "locale"); - this.locale = locale; - return this; - } - - - /** - * If you are subscribed to the Plex newsletter - */ - public Builder mailingListActive(boolean mailingListActive) { - Utils.checkNotNull(mailingListActive, "mailingListActive"); - this.mailingListActive = Optional.ofNullable(mailingListActive); - return this; - } - - /** - * If you are subscribed to the Plex newsletter - */ - public Builder mailingListActive(Optional mailingListActive) { - Utils.checkNotNull(mailingListActive, "mailingListActive"); - this.mailingListActive = mailingListActive; - return this; - } - - - /** - * Your current mailing list status (active or unsubscribed) - */ - public Builder mailingListStatus(MailingListStatus mailingListStatus) { - Utils.checkNotNull(mailingListStatus, "mailingListStatus"); - this.mailingListStatus = mailingListStatus; - return this; - } - - - /** - * The maximum number of accounts allowed in the Plex Home - */ - public Builder maxHomeSize(int maxHomeSize) { - Utils.checkNotNull(maxHomeSize, "maxHomeSize"); - this.maxHomeSize = maxHomeSize; - return this; - } - - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder pin(String pin) { - Utils.checkNotNull(pin, "pin"); - this.pin = Optional.ofNullable(pin); - return this; - } - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder pin(Optional pin) { - Utils.checkNotNull(pin, "pin"); - this.pin = pin; - return this; - } - - - public Builder profile(UserProfile profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - - /** - * If the account has a Plex Home PIN enabled - */ - public Builder protected_(boolean protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = Optional.ofNullable(protected_); - return this; - } - - /** - * If the account has a Plex Home PIN enabled - */ - public Builder protected_(Optional protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = protected_; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder rememberExpiresAt(long rememberExpiresAt) { - Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt"); - this.rememberExpiresAt = rememberExpiresAt; - return this; - } - - - /** - * If the account is a Plex Home managed user - */ - public Builder restricted(boolean restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = Optional.ofNullable(restricted); - return this; - } - - /** - * If the account is a Plex Home managed user - */ - public Builder restricted(Optional restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = restricted; - return this; - } - - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - public Builder roles(List roles) { - Utils.checkNotNull(roles, "roles"); - this.roles = Optional.ofNullable(roles); - return this; - } - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - public Builder roles(Optional> roles) { - Utils.checkNotNull(roles, "roles"); - this.roles = roles; - return this; - } - - - /** - * Unknown - */ - public Builder scrobbleTypes(String scrobbleTypes) { - Utils.checkNotNull(scrobbleTypes, "scrobbleTypes"); - this.scrobbleTypes = scrobbleTypes; - return this; - } - - - public Builder services(List services) { - Utils.checkNotNull(services, "services"); - this.services = services; - return this; - } - - - /** - * If the account’s Plex Pass subscription is active - */ - public Builder subscription(Subscription subscription) { - Utils.checkNotNull(subscription, "subscription"); - this.subscription = subscription; - return this; - } - - - /** - * Description of the Plex Pass subscription - */ - public Builder subscriptionDescription(String subscriptionDescription) { - Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); - this.subscriptionDescription = Optional.ofNullable(subscriptionDescription); - return this; - } - - /** - * Description of the Plex Pass subscription - */ - public Builder subscriptionDescription(Optional subscriptionDescription) { - Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); - this.subscriptionDescription = subscriptionDescription; - return this; - } - - - public Builder subscriptions(List subscriptions) { - Utils.checkNotNull(subscriptions, "subscriptions"); - this.subscriptions = Optional.ofNullable(subscriptions); - return this; - } - - public Builder subscriptions(Optional> subscriptions) { - Utils.checkNotNull(subscriptions, "subscriptions"); - this.subscriptions = subscriptions; - return this; - } - - - /** - * URL of the account thumbnail - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The title of the account (username or friendly name) - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - /** - * If two-factor authentication is enabled - */ - public Builder twoFactorEnabled(boolean twoFactorEnabled) { - Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); - this.twoFactorEnabled = Optional.ofNullable(twoFactorEnabled); - return this; - } - - /** - * If two-factor authentication is enabled - */ - public Builder twoFactorEnabled(Optional twoFactorEnabled) { - Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); - this.twoFactorEnabled = twoFactorEnabled; - return this; - } - - - /** - * The account username - */ - public Builder username(String username) { - Utils.checkNotNull(username, "username"); - this.username = username; - return this; - } - - - /** - * The account UUID - */ - public Builder uuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - - public Builder attributionPartner(String attributionPartner) { - Utils.checkNotNull(attributionPartner, "attributionPartner"); - this.attributionPartner = Optional.ofNullable(attributionPartner); - return this; - } - - public Builder attributionPartner(Optional attributionPartner) { - Utils.checkNotNull(attributionPartner, "attributionPartner"); - this.attributionPartner = attributionPartner; - return this; - } - - public GetTokenDetailsUserPlexAccount build() { - if (anonymous == null) { - anonymous = _SINGLETON_VALUE_Anonymous.value(); - } - if (backupCodesCreated == null) { - backupCodesCreated = _SINGLETON_VALUE_BackupCodesCreated.value(); - } - if (confirmed == null) { - confirmed = _SINGLETON_VALUE_Confirmed.value(); - } - if (emailOnlyAuth == null) { - emailOnlyAuth = _SINGLETON_VALUE_EmailOnlyAuth.value(); - } - if (experimentalFeatures == null) { - experimentalFeatures = _SINGLETON_VALUE_ExperimentalFeatures.value(); - } - if (guest == null) { - guest = _SINGLETON_VALUE_Guest.value(); - } - if (hasPassword == null) { - hasPassword = _SINGLETON_VALUE_HasPassword.value(); - } - if (home == null) { - home = _SINGLETON_VALUE_Home.value(); - } - if (homeAdmin == null) { - homeAdmin = _SINGLETON_VALUE_HomeAdmin.value(); - } - if (mailingListActive == null) { - mailingListActive = _SINGLETON_VALUE_MailingListActive.value(); - } - if (protected_ == null) { - protected_ = _SINGLETON_VALUE_Protected.value(); - } - if (restricted == null) { - restricted = _SINGLETON_VALUE_Restricted.value(); - } - if (twoFactorEnabled == null) { - twoFactorEnabled = _SINGLETON_VALUE_TwoFactorEnabled.value(); - } - - return new GetTokenDetailsUserPlexAccount( - adsConsent, adsConsentReminderAt, adsConsentSetAt, - anonymous, authToken, backupCodesCreated, - confirmed, country, email, - emailOnlyAuth, experimentalFeatures, friendlyName, - entitlements, guest, hasPassword, - home, homeAdmin, homeSize, - id, joinedAt, locale, - mailingListActive, mailingListStatus, maxHomeSize, - pin, profile, protected_, - rememberExpiresAt, restricted, roles, - scrobbleTypes, services, subscription, - subscriptionDescription, subscriptions, thumb, - title, twoFactorEnabled, username, - uuid, attributionPartner); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_Anonymous = - new LazySingletonValue<>( - "anonymous", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_BackupCodesCreated = - new LazySingletonValue<>( - "backupCodesCreated", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Confirmed = - new LazySingletonValue<>( - "confirmed", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_EmailOnlyAuth = - new LazySingletonValue<>( - "emailOnlyAuth", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_ExperimentalFeatures = - new LazySingletonValue<>( - "experimentalFeatures", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Guest = - new LazySingletonValue<>( - "guest", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_HasPassword = - new LazySingletonValue<>( - "hasPassword", - "true", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Home = - new LazySingletonValue<>( - "home", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_HomeAdmin = - new LazySingletonValue<>( - "homeAdmin", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_MailingListActive = - new LazySingletonValue<>( - "mailingListActive", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Protected = - new LazySingletonValue<>( - "protected", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Restricted = - new LazySingletonValue<>( - "restricted", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_TwoFactorEnabled = - new LazySingletonValue<>( - "twoFactorEnabled", - "false", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentCountry.java deleted file mode 100644 index 60c9903c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentCountry.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTopWatchedContentCountry { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("filter") - private Optional filter; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetTopWatchedContentCountry( - @JsonProperty("id") Optional id, - @JsonProperty("filter") Optional filter, - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - this.id = id; - this.filter = filter; - this.tag = tag; - } - - public GetTopWatchedContentCountry() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional filter() { - return filter; - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentCountry withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetTopWatchedContentCountry withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetTopWatchedContentCountry withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - - public GetTopWatchedContentCountry withFilter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetTopWatchedContentCountry withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetTopWatchedContentCountry 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; - } - GetTopWatchedContentCountry other = (GetTopWatchedContentCountry) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentCountry.class, - "id", id, - "filter", filter, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional filter = Optional.empty(); - - private Optional tag = 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 filter(String 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 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 GetTopWatchedContentCountry build() { - - return new GetTopWatchedContentCountry( - id, filter, tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentGenre.java deleted file mode 100644 index b632b7f4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentGenre.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTopWatchedContentGenre { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("filter") - private Optional filter; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - @JsonCreator - public GetTopWatchedContentGenre( - @JsonProperty("id") Optional id, - @JsonProperty("filter") Optional filter, - @JsonProperty("tag") Optional tag) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - this.id = id; - this.filter = filter; - this.tag = tag; - } - - public GetTopWatchedContentGenre() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional filter() { - return filter; - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentGenre withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetTopWatchedContentGenre withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetTopWatchedContentGenre withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - - public GetTopWatchedContentGenre withFilter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetTopWatchedContentGenre withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetTopWatchedContentGenre 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; - } - GetTopWatchedContentGenre other = (GetTopWatchedContentGenre) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentGenre.class, - "id", id, - "filter", filter, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional filter = Optional.empty(); - - private Optional tag = 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 filter(String 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 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 GetTopWatchedContentGenre build() { - - return new GetTopWatchedContentGenre( - id, filter, tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentGuids.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentGuids.java deleted file mode 100644 index bbdb7e81..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentGuids.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTopWatchedContentGuids { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - @JsonCreator - public GetTopWatchedContentGuids( - @JsonProperty("id") Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - } - - public GetTopWatchedContentGuids() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional id() { - return id; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentGuids withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetTopWatchedContentGuids withId(Optional 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; - } - GetTopWatchedContentGuids other = (GetTopWatchedContentGuids) o; - return - Utils.enhancedDeepEquals(this.id, other.id); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentGuids.class, - "id", id); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder id(String 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 GetTopWatchedContentGuids build() { - - return new GetTopWatchedContentGuids( - id); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentMediaContainer.java deleted file mode 100644 index e74f66ee..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentMediaContainer.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetTopWatchedContentMediaContainer { - /** - * Number of media items returned in this response. - */ - @JsonProperty("size") - private int size; - - /** - * Indicates whether syncing is allowed. - */ - @JsonProperty("allowSync") - private boolean allowSync; - - /** - * An plugin identifier for the media container. - */ - @JsonProperty("identifier") - private String identifier; - - /** - * The prefix used for media tag resource paths. - */ - @JsonProperty("mediaTagPrefix") - private String mediaTagPrefix; - - /** - * The version number for media tags. - */ - @JsonProperty("mediaTagVersion") - private long mediaTagVersion; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetTopWatchedContentMediaContainer( - @JsonProperty("size") int size, - @JsonProperty("allowSync") boolean allowSync, - @JsonProperty("identifier") String identifier, - @JsonProperty("mediaTagPrefix") String mediaTagPrefix, - @JsonProperty("mediaTagVersion") long mediaTagVersion, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(metadata, "metadata"); - this.size = size; - this.allowSync = allowSync; - this.identifier = identifier; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.metadata = metadata; - } - - public GetTopWatchedContentMediaContainer( - int size, - boolean allowSync, - String identifier, - String mediaTagPrefix, - long mediaTagVersion) { - this(size, allowSync, identifier, - mediaTagPrefix, mediaTagVersion, Optional.empty()); - } - - /** - * Number of media items returned in this response. - */ - @JsonIgnore - public int size() { - return size; - } - - /** - * Indicates whether syncing is allowed. - */ - @JsonIgnore - public boolean allowSync() { - return allowSync; - } - - /** - * An plugin identifier for the media container. - */ - @JsonIgnore - public String identifier() { - return identifier; - } - - /** - * The prefix used for media tag resource paths. - */ - @JsonIgnore - public String mediaTagPrefix() { - return mediaTagPrefix; - } - - /** - * The version number for media tags. - */ - @JsonIgnore - public long mediaTagVersion() { - return mediaTagVersion; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number of media items returned in this response. - */ - public GetTopWatchedContentMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * Indicates whether syncing is allowed. - */ - public GetTopWatchedContentMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - /** - * An plugin identifier for the media container. - */ - public GetTopWatchedContentMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - /** - * The prefix used for media tag resource paths. - */ - public GetTopWatchedContentMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - /** - * The version number for media tags. - */ - public GetTopWatchedContentMediaContainer withMediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - public GetTopWatchedContentMediaContainer withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetTopWatchedContentMediaContainer 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; - } - GetTopWatchedContentMediaContainer other = (GetTopWatchedContentMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, allowSync, identifier, - mediaTagPrefix, mediaTagVersion, metadata); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentMediaContainer.class, - "size", size, - "allowSync", allowSync, - "identifier", identifier, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer size; - - private Boolean allowSync; - - private String identifier; - - private String mediaTagPrefix; - - private Long mediaTagVersion; - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Number of media items returned in this response. - */ - public Builder size(int size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * Indicates whether syncing is allowed. - */ - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - - /** - * An plugin identifier for the media container. - */ - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - /** - * The prefix used for media tag resource paths. - */ - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; - return this; - } - - - /** - * The version number for media tags. - */ - public Builder mediaTagVersion(long mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - - public Builder 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 GetTopWatchedContentMediaContainer build() { - - return new GetTopWatchedContentMediaContainer( - size, allowSync, identifier, - mediaTagPrefix, mediaTagVersion, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentMetadata.java deleted file mode 100644 index aab13212..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentMetadata.java +++ /dev/null @@ -1,1485 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.LocalDate; -import java.util.List; -import java.util.Optional; - - -public class GetTopWatchedContentMetadata { - - @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("slug") - private Optional slug; - - - @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("librarySectionTitle") - private Optional librarySectionTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionKey") - private Optional librarySectionKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("contentRating") - private Optional contentRating; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("summary") - private Optional summary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - - @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("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("addedAt") - private Optional addedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updatedAt") - private Optional updatedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("globalViewCount") - private Optional globalViewCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audienceRatingImage") - private Optional audienceRatingImage; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Genre") - private Optional> genre; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Country") - private Optional> country; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Guid") - private Optional> guids; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Role") - private Optional> role; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("User") - private Optional> user; - - @JsonCreator - public GetTopWatchedContentMetadata( - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("key") Optional key, - @JsonProperty("guid") Optional guid, - @JsonProperty("slug") Optional slug, - @JsonProperty("studio") Optional studio, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionKey") Optional librarySectionKey, - @JsonProperty("contentRating") Optional contentRating, - @JsonProperty("summary") Optional summary, - @JsonProperty("index") Optional index, - @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("leafCount") Optional leafCount, - @JsonProperty("viewedLeafCount") Optional viewedLeafCount, - @JsonProperty("childCount") Optional childCount, - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("updatedAt") Optional updatedAt, - @JsonProperty("globalViewCount") Optional globalViewCount, - @JsonProperty("audienceRatingImage") Optional audienceRatingImage, - @JsonProperty("Genre") Optional> genre, - @JsonProperty("Country") Optional> country, - @JsonProperty("Guid") Optional> guids, - @JsonProperty("Role") Optional> role, - @JsonProperty("User") Optional> user) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(slug, "slug"); - Utils.checkNotNull(studio, "studio"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - Utils.checkNotNull(contentRating, "contentRating"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(index, "index"); - 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(leafCount, "leafCount"); - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - Utils.checkNotNull(childCount, "childCount"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(globalViewCount, "globalViewCount"); - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - Utils.checkNotNull(genre, "genre"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(guids, "guids"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(user, "user"); - this.ratingKey = ratingKey; - this.key = key; - this.guid = guid; - this.slug = slug; - this.studio = studio; - this.type = type; - this.title = title; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionID = librarySectionID; - this.librarySectionKey = librarySectionKey; - this.contentRating = contentRating; - this.summary = summary; - this.index = index; - this.audienceRating = audienceRating; - this.year = year; - this.tagline = tagline; - this.thumb = thumb; - this.art = art; - this.duration = duration; - this.originallyAvailableAt = originallyAvailableAt; - this.leafCount = leafCount; - this.viewedLeafCount = viewedLeafCount; - this.childCount = childCount; - this.addedAt = addedAt; - this.updatedAt = updatedAt; - this.globalViewCount = globalViewCount; - this.audienceRatingImage = audienceRatingImage; - this.genre = genre; - this.country = country; - this.guids = guids; - this.role = role; - this.user = user; - } - - public GetTopWatchedContentMetadata() { - 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 ratingKey() { - return ratingKey; - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional guid() { - return guid; - } - - @JsonIgnore - public Optional slug() { - return slug; - } - - @JsonIgnore - public Optional studio() { - return studio; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional librarySectionKey() { - return librarySectionKey; - } - - @JsonIgnore - public Optional contentRating() { - return contentRating; - } - - @JsonIgnore - public Optional summary() { - return summary; - } - - @JsonIgnore - public Optional index() { - return index; - } - - @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 leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional viewedLeafCount() { - return viewedLeafCount; - } - - @JsonIgnore - public Optional childCount() { - return childCount; - } - - @JsonIgnore - public Optional addedAt() { - return addedAt; - } - - @JsonIgnore - public Optional updatedAt() { - return updatedAt; - } - - @JsonIgnore - public Optional globalViewCount() { - return globalViewCount; - } - - @JsonIgnore - public Optional audienceRatingImage() { - return audienceRatingImage; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> genre() { - return (Optional>) genre; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> country() { - return (Optional>) country; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> guids() { - return (Optional>) guids; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> role() { - return (Optional>) role; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> user() { - return (Optional>) user; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentMetadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public GetTopWatchedContentMetadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetTopWatchedContentMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public GetTopWatchedContentMetadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public GetTopWatchedContentMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - - public GetTopWatchedContentMetadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; - return this; - } - - public GetTopWatchedContentMetadata withSlug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = Optional.ofNullable(slug); - return this; - } - - - public GetTopWatchedContentMetadata withSlug(Optional slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - public GetTopWatchedContentMetadata withStudio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - - public GetTopWatchedContentMetadata withStudio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - public GetTopWatchedContentMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public GetTopWatchedContentMetadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetTopWatchedContentMetadata withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public GetTopWatchedContentMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public GetTopWatchedContentMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - public GetTopWatchedContentMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetTopWatchedContentMetadata withLibrarySectionID(int librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - public GetTopWatchedContentMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetTopWatchedContentMetadata withLibrarySectionKey(String librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = Optional.ofNullable(librarySectionKey); - return this; - } - - - public GetTopWatchedContentMetadata withLibrarySectionKey(Optional librarySectionKey) { - Utils.checkNotNull(librarySectionKey, "librarySectionKey"); - this.librarySectionKey = librarySectionKey; - return this; - } - - public GetTopWatchedContentMetadata withContentRating(String contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = Optional.ofNullable(contentRating); - return this; - } - - - public GetTopWatchedContentMetadata withContentRating(Optional contentRating) { - Utils.checkNotNull(contentRating, "contentRating"); - this.contentRating = contentRating; - return this; - } - - public GetTopWatchedContentMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public GetTopWatchedContentMetadata withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public GetTopWatchedContentMetadata withIndex(long index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - - public GetTopWatchedContentMetadata withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public GetTopWatchedContentMetadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = Optional.ofNullable(audienceRating); - return this; - } - - - public GetTopWatchedContentMetadata withAudienceRating(Optional audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - public GetTopWatchedContentMetadata withYear(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); - return this; - } - - - public GetTopWatchedContentMetadata withYear(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; - return this; - } - - public GetTopWatchedContentMetadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = Optional.ofNullable(tagline); - return this; - } - - - public GetTopWatchedContentMetadata withTagline(Optional tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - public GetTopWatchedContentMetadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetTopWatchedContentMetadata withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public GetTopWatchedContentMetadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); - return this; - } - - - public GetTopWatchedContentMetadata withArt(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; - return this; - } - - public GetTopWatchedContentMetadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public GetTopWatchedContentMetadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public GetTopWatchedContentMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); - return this; - } - - - public GetTopWatchedContentMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; - return this; - } - - public GetTopWatchedContentMetadata withLeafCount(long leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); - return this; - } - - - public GetTopWatchedContentMetadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public GetTopWatchedContentMetadata withViewedLeafCount(long viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); - return this; - } - - - public GetTopWatchedContentMetadata withViewedLeafCount(Optional viewedLeafCount) { - Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); - this.viewedLeafCount = viewedLeafCount; - return this; - } - - public GetTopWatchedContentMetadata withChildCount(long childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = Optional.ofNullable(childCount); - return this; - } - - - public GetTopWatchedContentMetadata withChildCount(Optional childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - public GetTopWatchedContentMetadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public GetTopWatchedContentMetadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public GetTopWatchedContentMetadata withUpdatedAt(int updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - - public GetTopWatchedContentMetadata withUpdatedAt(Optional updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - public GetTopWatchedContentMetadata withGlobalViewCount(long globalViewCount) { - Utils.checkNotNull(globalViewCount, "globalViewCount"); - this.globalViewCount = Optional.ofNullable(globalViewCount); - return this; - } - - - public GetTopWatchedContentMetadata withGlobalViewCount(Optional globalViewCount) { - Utils.checkNotNull(globalViewCount, "globalViewCount"); - this.globalViewCount = globalViewCount; - return this; - } - - public GetTopWatchedContentMetadata withAudienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - - public GetTopWatchedContentMetadata withAudienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - public GetTopWatchedContentMetadata withGenre(List genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = Optional.ofNullable(genre); - return this; - } - - - public GetTopWatchedContentMetadata withGenre(Optional> genre) { - Utils.checkNotNull(genre, "genre"); - this.genre = genre; - return this; - } - - public GetTopWatchedContentMetadata withCountry(List country) { - Utils.checkNotNull(country, "country"); - this.country = Optional.ofNullable(country); - return this; - } - - - public GetTopWatchedContentMetadata withCountry(Optional> country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - public GetTopWatchedContentMetadata withGuids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - - public GetTopWatchedContentMetadata withGuids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - public GetTopWatchedContentMetadata withRole(List role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - public GetTopWatchedContentMetadata withRole(Optional> role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - public GetTopWatchedContentMetadata withUser(List user) { - Utils.checkNotNull(user, "user"); - this.user = Optional.ofNullable(user); - return this; - } - - - public GetTopWatchedContentMetadata withUser(Optional> user) { - Utils.checkNotNull(user, "user"); - this.user = user; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopWatchedContentMetadata other = (GetTopWatchedContentMetadata) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.slug, other.slug) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionKey, other.librarySectionKey) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && - Utils.enhancedDeepEquals(this.childCount, other.childCount) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.globalViewCount, other.globalViewCount) && - Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.genre, other.genre) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.guids, other.guids) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.user, other.user); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, key, guid, - slug, studio, type, - title, librarySectionTitle, librarySectionID, - librarySectionKey, contentRating, summary, - index, audienceRating, year, - tagline, thumb, art, - duration, originallyAvailableAt, leafCount, - viewedLeafCount, childCount, addedAt, - updatedAt, globalViewCount, audienceRatingImage, - genre, country, guids, - role, user); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentMetadata.class, - "ratingKey", ratingKey, - "key", key, - "guid", guid, - "slug", slug, - "studio", studio, - "type", type, - "title", title, - "librarySectionTitle", librarySectionTitle, - "librarySectionID", librarySectionID, - "librarySectionKey", librarySectionKey, - "contentRating", contentRating, - "summary", summary, - "index", index, - "audienceRating", audienceRating, - "year", year, - "tagline", tagline, - "thumb", thumb, - "art", art, - "duration", duration, - "originallyAvailableAt", originallyAvailableAt, - "leafCount", leafCount, - "viewedLeafCount", viewedLeafCount, - "childCount", childCount, - "addedAt", addedAt, - "updatedAt", updatedAt, - "globalViewCount", globalViewCount, - "audienceRatingImage", audienceRatingImage, - "genre", genre, - "country", country, - "guids", guids, - "role", role, - "user", user); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional ratingKey = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional guid = Optional.empty(); - - private Optional slug = Optional.empty(); - - private Optional studio = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionKey = Optional.empty(); - - private Optional contentRating = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional index = 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 leafCount = Optional.empty(); - - private Optional viewedLeafCount = Optional.empty(); - - private Optional childCount = Optional.empty(); - - private Optional addedAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional globalViewCount = Optional.empty(); - - private Optional audienceRatingImage = Optional.empty(); - - private Optional> genre = Optional.empty(); - - private Optional> country = Optional.empty(); - - private Optional> guids = Optional.empty(); - - private Optional> role = Optional.empty(); - - private Optional> user = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder ratingKey(String 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 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; - } - - - 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 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 librarySectionID(int 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 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; - } - - - 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 index(long 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 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(int 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(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - public Builder originallyAvailableAt(LocalDate 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 leafCount(long 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(long 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(long 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 addedAt(int 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(int 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 globalViewCount(long globalViewCount) { - Utils.checkNotNull(globalViewCount, "globalViewCount"); - this.globalViewCount = Optional.ofNullable(globalViewCount); - return this; - } - - public Builder globalViewCount(Optional globalViewCount) { - Utils.checkNotNull(globalViewCount, "globalViewCount"); - this.globalViewCount = globalViewCount; - 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 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 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 guids(List guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = Optional.ofNullable(guids); - return this; - } - - public Builder guids(Optional> guids) { - Utils.checkNotNull(guids, "guids"); - this.guids = guids; - return this; - } - - - 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 Builder user(List user) { - Utils.checkNotNull(user, "user"); - this.user = Optional.ofNullable(user); - return this; - } - - public Builder user(Optional> user) { - Utils.checkNotNull(user, "user"); - this.user = user; - return this; - } - - public GetTopWatchedContentMetadata build() { - - return new GetTopWatchedContentMetadata( - ratingKey, key, guid, - slug, studio, type, - title, librarySectionTitle, librarySectionID, - librarySectionKey, contentRating, summary, - index, audienceRating, year, - tagline, thumb, art, - duration, originallyAvailableAt, leafCount, - viewedLeafCount, childCount, addedAt, - updatedAt, globalViewCount, audienceRatingImage, - genre, country, guids, - role, user); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentQueryParamIncludeGuids.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentQueryParamIncludeGuids.java deleted file mode 100644 index 9e8cda4b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentQueryParamIncludeGuids.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * GetTopWatchedContentQueryParamIncludeGuids - * - *

Adds the Guid object to the response - */ -public enum GetTopWatchedContentQueryParamIncludeGuids { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - GetTopWatchedContentQueryParamIncludeGuids(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (GetTopWatchedContentQueryParamIncludeGuids o: GetTopWatchedContentQueryParamIncludeGuids.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentQueryParamType.java deleted file mode 100644 index f9fcdd8b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentQueryParamType.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ -@JsonDeserialize(using = GetTopWatchedContentQueryParamType._Deserializer.class) -@JsonSerialize(using = GetTopWatchedContentQueryParamType._Serializer.class) -public class GetTopWatchedContentQueryParamType { - - public static final GetTopWatchedContentQueryParamType Movie = new GetTopWatchedContentQueryParamType(1L); - public static final GetTopWatchedContentQueryParamType TvShow = new GetTopWatchedContentQueryParamType(2L); - public static final GetTopWatchedContentQueryParamType Season = new GetTopWatchedContentQueryParamType(3L); - public static final GetTopWatchedContentQueryParamType Episode = new GetTopWatchedContentQueryParamType(4L); - public static final GetTopWatchedContentQueryParamType Artist = new GetTopWatchedContentQueryParamType(5L); - public static final GetTopWatchedContentQueryParamType Album = new GetTopWatchedContentQueryParamType(6L); - public static final GetTopWatchedContentQueryParamType Track = new GetTopWatchedContentQueryParamType(7L); - public static final GetTopWatchedContentQueryParamType PhotoAlbum = new GetTopWatchedContentQueryParamType(8L); - public static final GetTopWatchedContentQueryParamType Photo = new GetTopWatchedContentQueryParamType(9L); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final long value; - - private GetTopWatchedContentQueryParamType(long value) { - this.value = value; - } - - /** - * Returns a GetTopWatchedContentQueryParamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as GetTopWatchedContentQueryParamType - */ - public static GetTopWatchedContentQueryParamType of(long value) { - synchronized (GetTopWatchedContentQueryParamType.class) { - return values.computeIfAbsent(value, v -> new GetTopWatchedContentQueryParamType(v)); - } - } - - public long value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - GetTopWatchedContentQueryParamType other = (GetTopWatchedContentQueryParamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "GetTopWatchedContentQueryParamType [value=" + value + "]"; - } - - // return an array just like an enum - public static GetTopWatchedContentQueryParamType[] values() { - synchronized (GetTopWatchedContentQueryParamType.class) { - return values.values().toArray(new GetTopWatchedContentQueryParamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1L, Movie); - map.put(2L, TvShow); - map.put(3L, Season); - map.put(4L, Episode); - map.put(5L, Artist); - map.put(6L, Album); - map.put(7L, Track); - map.put(8L, PhotoAlbum); - map.put(9L, Photo); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1L, GetTopWatchedContentQueryParamTypeEnum.Movie); - map.put(2L, GetTopWatchedContentQueryParamTypeEnum.TvShow); - map.put(3L, GetTopWatchedContentQueryParamTypeEnum.Season); - map.put(4L, GetTopWatchedContentQueryParamTypeEnum.Episode); - map.put(5L, GetTopWatchedContentQueryParamTypeEnum.Artist); - map.put(6L, GetTopWatchedContentQueryParamTypeEnum.Album); - map.put(7L, GetTopWatchedContentQueryParamTypeEnum.Track); - map.put(8L, GetTopWatchedContentQueryParamTypeEnum.PhotoAlbum); - map.put(9L, GetTopWatchedContentQueryParamTypeEnum.Photo); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(GetTopWatchedContentQueryParamType.class); - } - - @Override - public void serialize(GetTopWatchedContentQueryParamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(GetTopWatchedContentQueryParamType.class); - } - - @Override - public GetTopWatchedContentQueryParamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - long v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return GetTopWatchedContentQueryParamType.of(v); - } - } - - public enum GetTopWatchedContentQueryParamTypeEnum { - - Movie(1L), - TvShow(2L), - Season(3L), - Episode(4L), - Artist(5L), - Album(6L), - Track(7L), - PhotoAlbum(8L), - Photo(9L),; - - private final long value; - - private GetTopWatchedContentQueryParamTypeEnum(long value) { - this.value = value; - } - - public long value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRequest.java deleted file mode 100644 index e518eb1f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRequest.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -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.Optional; - - -public class GetTopWatchedContentRequest { - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private GetTopWatchedContentQueryParamType type; - - /** - * Adds the Guid object to the response - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids") - private Optional includeGuids; - - @JsonCreator - public GetTopWatchedContentRequest( - GetTopWatchedContentQueryParamType type, - Optional includeGuids) { - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(includeGuids, "includeGuids"); - this.type = type; - this.includeGuids = includeGuids; - } - - public GetTopWatchedContentRequest( - GetTopWatchedContentQueryParamType type) { - this(type, Optional.empty()); - } - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - @JsonIgnore - public GetTopWatchedContentQueryParamType type() { - return type; - } - - /** - * Adds the Guid object to the response - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeGuids() { - return (Optional) includeGuids; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public GetTopWatchedContentRequest withType(GetTopWatchedContentQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * Adds the Guid object to the response - */ - public GetTopWatchedContentRequest withIncludeGuids(GetTopWatchedContentQueryParamIncludeGuids includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = Optional.ofNullable(includeGuids); - return this; - } - - - /** - * Adds the Guid object to the response - */ - public GetTopWatchedContentRequest withIncludeGuids(Optional includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = includeGuids; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopWatchedContentRequest other = (GetTopWatchedContentRequest) o; - return - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.includeGuids, other.includeGuids); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - type, includeGuids); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentRequest.class, - "type", type, - "includeGuids", includeGuids); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private GetTopWatchedContentQueryParamType type; - - private Optional includeGuids; - - private Builder() { - // force use of static builder() method - } - - - /** - * The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - */ - public Builder type(GetTopWatchedContentQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * Adds the Guid object to the response - */ - public Builder includeGuids(GetTopWatchedContentQueryParamIncludeGuids includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = Optional.ofNullable(includeGuids); - return this; - } - - /** - * Adds the Guid object to the response - */ - public Builder includeGuids(Optional includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = includeGuids; - return this; - } - - public GetTopWatchedContentRequest build() { - if (includeGuids == null) { - includeGuids = _SINGLETON_VALUE_IncludeGuids.value(); - } - - return new GetTopWatchedContentRequest( - type, includeGuids); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeGuids = - new LazySingletonValue<>( - "includeGuids", - "0", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRequestBuilder.java deleted file mode 100644 index 7722e916..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRequestBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetTopWatchedContent; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.Optional; - -public class GetTopWatchedContentRequestBuilder { - - private GetTopWatchedContentQueryParamType type; - private Optional includeGuids = Utils.readDefaultOrConstValue( - "includeGuids", - "0", - new TypeReference>() {}); - private final SDKConfiguration sdkConfiguration; - - public GetTopWatchedContentRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetTopWatchedContentRequestBuilder type(GetTopWatchedContentQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetTopWatchedContentRequestBuilder includeGuids(GetTopWatchedContentQueryParamIncludeGuids includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = Optional.of(includeGuids); - return this; - } - - public GetTopWatchedContentRequestBuilder includeGuids(Optional includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = includeGuids; - return this; - } - - - private GetTopWatchedContentRequest buildRequest() { - if (includeGuids == null) { - includeGuids = _SINGLETON_VALUE_IncludeGuids.value(); - } - - GetTopWatchedContentRequest request = new GetTopWatchedContentRequest(type, - includeGuids); - - return request; - } - - public GetTopWatchedContentResponse call() throws Exception { - - RequestOperation operation - = new GetTopWatchedContent.Sync(sdkConfiguration); - GetTopWatchedContentRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeGuids = - new LazySingletonValue<>( - "includeGuids", - "0", - new TypeReference>() {}); -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentResponse.java deleted file mode 100644 index b832e065..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetTopWatchedContentResponse 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 metadata of the library item. - */ - private Optional object; - - @JsonCreator - public GetTopWatchedContentResponse( - 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 GetTopWatchedContentResponse( - 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 metadata of the library item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetTopWatchedContentResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetTopWatchedContentResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTopWatchedContentResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The metadata of the library item. - */ - public GetTopWatchedContentResponse withObject(GetTopWatchedContentResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The metadata of the library item. - */ - public GetTopWatchedContentResponse 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; - } - GetTopWatchedContentResponse other = (GetTopWatchedContentResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 metadata of the library item. - */ - public Builder object(GetTopWatchedContentResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The metadata of the library item. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetTopWatchedContentResponse build() { - - return new GetTopWatchedContentResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentResponseBody.java deleted file mode 100644 index 4629153a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetTopWatchedContentResponseBody - * - *

The metadata of the library item. - */ -public class GetTopWatchedContentResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetTopWatchedContentResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetTopWatchedContentResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentResponseBody withMediaContainer(GetTopWatchedContentMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetTopWatchedContentResponseBody 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; - } - GetTopWatchedContentResponseBody other = (GetTopWatchedContentResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetTopWatchedContentMediaContainer 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 GetTopWatchedContentResponseBody build() { - - return new GetTopWatchedContentResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRole.java deleted file mode 100644 index 8a6ed0bc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentRole.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTopWatchedContentRole { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("filter") - private Optional filter; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tag") - private Optional tag; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tagKey") - private Optional tagKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("role") - private Optional role; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public GetTopWatchedContentRole( - @JsonProperty("id") Optional id, - @JsonProperty("filter") Optional filter, - @JsonProperty("tag") Optional tag, - @JsonProperty("tagKey") Optional tagKey, - @JsonProperty("role") Optional role, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(tagKey, "tagKey"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.filter = filter; - this.tag = tag; - this.tagKey = tagKey; - this.role = role; - this.thumb = thumb; - } - - public GetTopWatchedContentRole() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional filter() { - return filter; - } - - @JsonIgnore - public Optional tag() { - return tag; - } - - @JsonIgnore - public Optional tagKey() { - return tagKey; - } - - @JsonIgnore - public Optional role() { - return role; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentRole withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetTopWatchedContentRole withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GetTopWatchedContentRole withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.ofNullable(filter); - return this; - } - - - public GetTopWatchedContentRole withFilter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetTopWatchedContentRole withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = Optional.ofNullable(tag); - return this; - } - - - public GetTopWatchedContentRole withTag(Optional tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public GetTopWatchedContentRole withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - - public GetTopWatchedContentRole withTagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - public GetTopWatchedContentRole withRole(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - public GetTopWatchedContentRole withRole(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - public GetTopWatchedContentRole withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public GetTopWatchedContentRole withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopWatchedContentRole other = (GetTopWatchedContentRole) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag, - tagKey, role, thumb); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentRole.class, - "id", id, - "filter", filter, - "tag", tag, - "tagKey", tagKey, - "role", role, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional filter = Optional.empty(); - - private Optional tag = Optional.empty(); - - private Optional tagKey = Optional.empty(); - - private Optional role = Optional.empty(); - - private Optional thumb = 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 filter(String 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 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 Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - public Builder tagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - - public Builder role(String 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 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 GetTopWatchedContentRole build() { - - return new GetTopWatchedContentRole( - id, filter, tag, - tagKey, role, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentUser.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentUser.java deleted file mode 100644 index a26c90f8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTopWatchedContentUser.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetTopWatchedContentUser { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - @JsonCreator - public GetTopWatchedContentUser( - @JsonProperty("id") Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - } - - public GetTopWatchedContentUser() { - this(Optional.empty()); - } - - @JsonIgnore - public Optional id() { - return id; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTopWatchedContentUser withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public GetTopWatchedContentUser withId(Optional 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; - } - GetTopWatchedContentUser other = (GetTopWatchedContentUser) o; - return - Utils.enhancedDeepEquals(this.id, other.id); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentUser.class, - "id", id); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = 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 GetTopWatchedContentUser build() { - - return new GetTopWatchedContentUser( - id); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsMediaContainer.java deleted file mode 100644 index 717184ca..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsMediaContainer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetTranscodeSessionsMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("TranscodeSession") - private Optional> transcodeSession; - - @JsonCreator - public GetTranscodeSessionsMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("TranscodeSession") Optional> transcodeSession) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(transcodeSession, "transcodeSession"); - this.size = size; - this.transcodeSession = transcodeSession; - } - - public GetTranscodeSessionsMediaContainer() { - this(Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> transcodeSession() { - return (Optional>) transcodeSession; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTranscodeSessionsMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetTranscodeSessionsMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetTranscodeSessionsMediaContainer withTranscodeSession(List transcodeSession) { - Utils.checkNotNull(transcodeSession, "transcodeSession"); - this.transcodeSession = Optional.ofNullable(transcodeSession); - return this; - } - - - public GetTranscodeSessionsMediaContainer withTranscodeSession(Optional> transcodeSession) { - Utils.checkNotNull(transcodeSession, "transcodeSession"); - this.transcodeSession = transcodeSession; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTranscodeSessionsMediaContainer other = (GetTranscodeSessionsMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.transcodeSession, other.transcodeSession); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, transcodeSession); - } - - @Override - public String toString() { - return Utils.toString(GetTranscodeSessionsMediaContainer.class, - "size", size, - "transcodeSession", transcodeSession); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional> transcodeSession = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 transcodeSession(List transcodeSession) { - Utils.checkNotNull(transcodeSession, "transcodeSession"); - this.transcodeSession = Optional.ofNullable(transcodeSession); - return this; - } - - public Builder transcodeSession(Optional> transcodeSession) { - Utils.checkNotNull(transcodeSession, "transcodeSession"); - this.transcodeSession = transcodeSession; - return this; - } - - public GetTranscodeSessionsMediaContainer build() { - - return new GetTranscodeSessionsMediaContainer( - size, transcodeSession); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsRequestBuilder.java deleted file mode 100644 index 761aded1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetTranscodeSessions; -import java.lang.Exception; - -public class GetTranscodeSessionsRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetTranscodeSessionsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetTranscodeSessionsResponse call() throws Exception { - - RequestlessOperation operation - = new GetTranscodeSessions.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsResponse.java deleted file mode 100644 index 0373eec2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetTranscodeSessionsResponse 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 Transcode Sessions - */ - private Optional object; - - @JsonCreator - public GetTranscodeSessionsResponse( - 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 GetTranscodeSessionsResponse( - 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 Transcode Sessions - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetTranscodeSessionsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetTranscodeSessionsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTranscodeSessionsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Transcode Sessions - */ - public GetTranscodeSessionsResponse withObject(GetTranscodeSessionsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The Transcode Sessions - */ - public GetTranscodeSessionsResponse 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; - } - GetTranscodeSessionsResponse other = (GetTranscodeSessionsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetTranscodeSessionsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Transcode Sessions - */ - public Builder object(GetTranscodeSessionsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The Transcode Sessions - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetTranscodeSessionsResponse build() { - - return new GetTranscodeSessionsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsResponseBody.java deleted file mode 100644 index c2fa2553..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTranscodeSessionsResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetTranscodeSessionsResponseBody - * - *

The Transcode Sessions - */ -public class GetTranscodeSessionsResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetTranscodeSessionsResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetTranscodeSessionsResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetTranscodeSessionsResponseBody withMediaContainer(GetTranscodeSessionsMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetTranscodeSessionsResponseBody 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; - } - GetTranscodeSessionsResponseBody other = (GetTranscodeSessionsResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetTranscodeSessionsResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetTranscodeSessionsMediaContainer 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 GetTranscodeSessionsResponseBody build() { - - return new GetTranscodeSessionsResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenMediaContainer.java new file mode 100644 index 00000000..6e7a4fbd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenMediaContainer.java @@ -0,0 +1,344 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * GetTransientTokenMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetTransientTokenMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * The transient token + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("token") + private Optional token; + + @JsonCreator + public GetTransientTokenMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("token") Optional token) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(token, "token"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.token = token; + } + + public GetTransientTokenMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * The transient token + */ + @JsonIgnore + public Optional token() { + return token; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetTransientTokenMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetTransientTokenMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetTransientTokenMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetTransientTokenMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetTransientTokenMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetTransientTokenMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetTransientTokenMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetTransientTokenMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * The transient token + */ + public GetTransientTokenMediaContainer withToken(String token) { + Utils.checkNotNull(token, "token"); + this.token = Optional.ofNullable(token); + return this; + } + + + /** + * The transient token + */ + public GetTransientTokenMediaContainer withToken(Optional token) { + Utils.checkNotNull(token, "token"); + this.token = token; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTransientTokenMediaContainer other = (GetTransientTokenMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.token, other.token); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, token); + } + + @Override + public String toString() { + return Utils.toString(GetTransientTokenMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "token", token); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional token = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * The transient token + */ + public Builder token(String token) { + Utils.checkNotNull(token, "token"); + this.token = Optional.ofNullable(token); + return this; + } + + /** + * The transient token + */ + public Builder token(Optional token) { + Utils.checkNotNull(token, "token"); + this.token = token; + return this; + } + + public GetTransientTokenMediaContainer build() { + + return new GetTransientTokenMediaContainer( + identifier, offset, size, + totalSize, token); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenQueryParamType.java deleted file mode 100644 index f3d1fd15..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenQueryParamType.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * GetTransientTokenQueryParamType - * - *

`delegation` - This is the only supported `type` parameter. - */ -public enum GetTransientTokenQueryParamType { - DELEGATION("delegation"); - - @JsonValue - private final String value; - - GetTransientTokenQueryParamType(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (GetTransientTokenQueryParamType o: GetTransientTokenQueryParamType.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenRequest.java index 3918cc08..f1a7a6cd 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenRequest.java @@ -5,45 +5,248 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; 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.Optional; public class GetTransientTokenRequest { /** - * `delegation` - This is the only supported `type` parameter. + * Indicates the client accepts the indicated media types */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private GetTransientTokenQueryParamType type; + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; /** - * `all` - This is the only supported `scope` parameter. + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The value `delegation` is the only supported `type` parameter. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private QueryParamType type; + + /** + * The value `all` is the only supported `scope` parameter. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=scope") private Scope scope; @JsonCreator public GetTransientTokenRequest( - GetTransientTokenQueryParamType type, + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + QueryParamType type, Scope scope) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); Utils.checkNotNull(type, "type"); Utils.checkNotNull(scope, "scope"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; this.type = type; this.scope = scope; } + + public GetTransientTokenRequest( + QueryParamType type, + Scope scope) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), type, + scope); + } /** - * `delegation` - This is the only supported `type` parameter. + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client */ @JsonIgnore - public GetTransientTokenQueryParamType type() { + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The value `delegation` is the only supported `type` parameter. + */ + @JsonIgnore + public QueryParamType type() { return type; } /** - * `all` - This is the only supported `scope` parameter. + * The value `all` is the only supported `scope` parameter. */ @JsonIgnore public Scope scope() { @@ -56,16 +259,225 @@ public class GetTransientTokenRequest { /** - * `delegation` - This is the only supported `type` parameter. + * Indicates the client accepts the indicated media types */ - public GetTransientTokenRequest withType(GetTransientTokenQueryParamType type) { + public GetTransientTokenRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public GetTransientTokenRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public GetTransientTokenRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public GetTransientTokenRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public GetTransientTokenRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public GetTransientTokenRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public GetTransientTokenRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public GetTransientTokenRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public GetTransientTokenRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public GetTransientTokenRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public GetTransientTokenRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public GetTransientTokenRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public GetTransientTokenRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public GetTransientTokenRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public GetTransientTokenRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public GetTransientTokenRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public GetTransientTokenRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public GetTransientTokenRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public GetTransientTokenRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public GetTransientTokenRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public GetTransientTokenRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public GetTransientTokenRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The value `delegation` is the only supported `type` parameter. + */ + public GetTransientTokenRequest withType(QueryParamType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } /** - * `all` - This is the only supported `scope` parameter. + * The value `all` is the only supported `scope` parameter. */ public GetTransientTokenRequest withScope(Scope scope) { Utils.checkNotNull(scope, "scope"); @@ -83,6 +495,17 @@ public class GetTransientTokenRequest { } GetTransientTokenRequest other = (GetTransientTokenRequest) o; return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && Utils.enhancedDeepEquals(this.type, other.type) && Utils.enhancedDeepEquals(this.scope, other.scope); } @@ -90,12 +513,27 @@ public class GetTransientTokenRequest { @Override public int hashCode() { return Utils.enhancedHash( - type, scope); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, type, + scope); } @Override public String toString() { return Utils.toString(GetTransientTokenRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, "type", type, "scope", scope); } @@ -103,7 +541,29 @@ public class GetTransientTokenRequest { @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private GetTransientTokenQueryParamType type; + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private QueryParamType type; private Scope scope; @@ -113,9 +573,218 @@ public class GetTransientTokenRequest { /** - * `delegation` - This is the only supported `type` parameter. + * Indicates the client accepts the indicated media types */ - public Builder type(GetTransientTokenQueryParamType type) { + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The value `delegation` is the only supported `type` parameter. + */ + public Builder type(QueryParamType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -123,7 +792,7 @@ public class GetTransientTokenRequest { /** - * `all` - This is the only supported `scope` parameter. + * The value `all` is the only supported `scope` parameter. */ public Builder scope(Scope scope) { Utils.checkNotNull(scope, "scope"); @@ -132,10 +801,23 @@ public class GetTransientTokenRequest { } public GetTransientTokenRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } return new GetTransientTokenRequest( - type, scope); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, type, + scope); } + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenRequestBuilder.java index 877e0d6a..120ff7b2 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenRequestBuilder.java @@ -12,40 +12,23 @@ import java.lang.Exception; public class GetTransientTokenRequestBuilder { - private GetTransientTokenQueryParamType type; - private Scope scope; + private GetTransientTokenRequest request; private final SDKConfiguration sdkConfiguration; public GetTransientTokenRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public GetTransientTokenRequestBuilder type(GetTransientTokenQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; + public GetTransientTokenRequestBuilder request(GetTransientTokenRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - public GetTransientTokenRequestBuilder scope(Scope scope) { - Utils.checkNotNull(scope, "scope"); - this.scope = scope; - return this; - } - - - private GetTransientTokenRequest buildRequest() { - - GetTransientTokenRequest request = new GetTransientTokenRequest(type, - scope); - - return request; - } - public GetTransientTokenResponse call() throws Exception { RequestOperation operation = new GetTransientToken.Sync(sdkConfiguration); - GetTransientTokenRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenResponse.java index a15a71cc..cdd8e03e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenResponse.java @@ -11,7 +11,9 @@ 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.Optional; public class GetTransientTokenResponse implements Response { @@ -30,17 +32,33 @@ public class GetTransientTokenResponse implements Response { */ private HttpResponse rawResponse; + /** + * OK + */ + private Optional object; + @JsonCreator public GetTransientTokenResponse( String contentType, int statusCode, - HttpResponse rawResponse) { + 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 GetTransientTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -67,6 +85,15 @@ public class GetTransientTokenResponse implements Response { return rawResponse; } + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + public static Builder builder() { return new Builder(); } @@ -99,6 +126,25 @@ public class GetTransientTokenResponse implements Response { return this; } + /** + * OK + */ + public GetTransientTokenResponse withObject(GetTransientTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetTransientTokenResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -111,13 +157,15 @@ public class GetTransientTokenResponse implements Response { return Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); } @Override public int hashCode() { return Utils.enhancedHash( - contentType, statusCode, rawResponse); + contentType, statusCode, rawResponse, + object); } @Override @@ -125,7 +173,8 @@ public class GetTransientTokenResponse implements Response { return Utils.toString(GetTransientTokenResponse.class, "contentType", contentType, "statusCode", statusCode, - "rawResponse", rawResponse); + "rawResponse", rawResponse, + "object", object); } @SuppressWarnings("UnusedReturnValue") @@ -137,6 +186,8 @@ public class GetTransientTokenResponse implements Response { private HttpResponse rawResponse; + private Optional object = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -171,10 +222,30 @@ public class GetTransientTokenResponse implements Response { return this; } + + /** + * OK + */ + public Builder object(GetTransientTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + public GetTransientTokenResponse build() { return new GetTransientTokenResponse( - contentType, statusCode, rawResponse); + contentType, statusCode, rawResponse, + object); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenResponseBody.java new file mode 100644 index 00000000..060a461e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTransientTokenResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetTransientTokenResponseBody + * + *

OK + */ +public class GetTransientTokenResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetTransientTokenResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetTransientTokenResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetTransientTokenResponseBody withMediaContainer(GetTransientTokenMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetTransientTokenResponseBody 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; + } + GetTransientTokenResponseBody other = (GetTransientTokenResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetTransientTokenResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetTransientTokenMediaContainer 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 GetTransientTokenResponseBody build() { + + return new GetTransientTokenResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusMediaContainer.java deleted file mode 100644 index 0fb4a7ef..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusMediaContainer.java +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class GetUpdateStatusMediaContainer { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canInstall") - private Optional canInstall; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("checkedAt") - private Optional checkedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("downloadURL") - private Optional downloadURL; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Release") - private Optional> release; - - @JsonCreator - public GetUpdateStatusMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("canInstall") Optional canInstall, - @JsonProperty("checkedAt") Optional checkedAt, - @JsonProperty("downloadURL") Optional downloadURL, - @JsonProperty("status") Optional status, - @JsonProperty("Release") Optional> release) { - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(canInstall, "canInstall"); - Utils.checkNotNull(checkedAt, "checkedAt"); - Utils.checkNotNull(downloadURL, "downloadURL"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(release, "release"); - this.size = size; - this.canInstall = canInstall; - this.checkedAt = checkedAt; - this.downloadURL = downloadURL; - this.status = status; - this.release = release; - } - - public GetUpdateStatusMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional canInstall() { - return canInstall; - } - - @JsonIgnore - public Optional checkedAt() { - return checkedAt; - } - - @JsonIgnore - public Optional downloadURL() { - return downloadURL; - } - - @JsonIgnore - public Optional status() { - return status; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> release() { - return (Optional>) release; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUpdateStatusMediaContainer withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetUpdateStatusMediaContainer withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetUpdateStatusMediaContainer withCanInstall(boolean canInstall) { - Utils.checkNotNull(canInstall, "canInstall"); - this.canInstall = Optional.ofNullable(canInstall); - return this; - } - - - public GetUpdateStatusMediaContainer withCanInstall(Optional canInstall) { - Utils.checkNotNull(canInstall, "canInstall"); - this.canInstall = canInstall; - return this; - } - - public GetUpdateStatusMediaContainer withCheckedAt(int checkedAt) { - Utils.checkNotNull(checkedAt, "checkedAt"); - this.checkedAt = Optional.ofNullable(checkedAt); - return this; - } - - - public GetUpdateStatusMediaContainer withCheckedAt(Optional checkedAt) { - Utils.checkNotNull(checkedAt, "checkedAt"); - this.checkedAt = checkedAt; - return this; - } - - public GetUpdateStatusMediaContainer withDownloadURL(String downloadURL) { - Utils.checkNotNull(downloadURL, "downloadURL"); - this.downloadURL = Optional.ofNullable(downloadURL); - return this; - } - - - public GetUpdateStatusMediaContainer withDownloadURL(Optional downloadURL) { - Utils.checkNotNull(downloadURL, "downloadURL"); - this.downloadURL = downloadURL; - return this; - } - - public GetUpdateStatusMediaContainer withStatus(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - public GetUpdateStatusMediaContainer withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public GetUpdateStatusMediaContainer withRelease(List release) { - Utils.checkNotNull(release, "release"); - this.release = Optional.ofNullable(release); - return this; - } - - - public GetUpdateStatusMediaContainer withRelease(Optional> release) { - Utils.checkNotNull(release, "release"); - this.release = release; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUpdateStatusMediaContainer other = (GetUpdateStatusMediaContainer) o; - return - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.canInstall, other.canInstall) && - Utils.enhancedDeepEquals(this.checkedAt, other.checkedAt) && - Utils.enhancedDeepEquals(this.downloadURL, other.downloadURL) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.release, other.release); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - size, canInstall, checkedAt, - downloadURL, status, release); - } - - @Override - public String toString() { - return Utils.toString(GetUpdateStatusMediaContainer.class, - "size", size, - "canInstall", canInstall, - "checkedAt", checkedAt, - "downloadURL", downloadURL, - "status", status, - "release", release); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional size = Optional.empty(); - - private Optional canInstall = Optional.empty(); - - private Optional checkedAt = Optional.empty(); - - private Optional downloadURL = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional> release = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder size(int 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 canInstall(boolean canInstall) { - Utils.checkNotNull(canInstall, "canInstall"); - this.canInstall = Optional.ofNullable(canInstall); - return this; - } - - public Builder canInstall(Optional canInstall) { - Utils.checkNotNull(canInstall, "canInstall"); - this.canInstall = canInstall; - return this; - } - - - public Builder checkedAt(int checkedAt) { - Utils.checkNotNull(checkedAt, "checkedAt"); - this.checkedAt = Optional.ofNullable(checkedAt); - return this; - } - - public Builder checkedAt(Optional checkedAt) { - Utils.checkNotNull(checkedAt, "checkedAt"); - this.checkedAt = checkedAt; - return this; - } - - - public Builder downloadURL(String downloadURL) { - Utils.checkNotNull(downloadURL, "downloadURL"); - this.downloadURL = Optional.ofNullable(downloadURL); - return this; - } - - public Builder downloadURL(Optional downloadURL) { - Utils.checkNotNull(downloadURL, "downloadURL"); - this.downloadURL = downloadURL; - return this; - } - - - public Builder status(int status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - public Builder release(List release) { - Utils.checkNotNull(release, "release"); - this.release = Optional.ofNullable(release); - return this; - } - - public Builder release(Optional> release) { - Utils.checkNotNull(release, "release"); - this.release = release; - return this; - } - - public GetUpdateStatusMediaContainer build() { - - return new GetUpdateStatusMediaContainer( - size, canInstall, checkedAt, - downloadURL, status, release); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusRequestBuilder.java deleted file mode 100644 index 8d4465ea..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetUpdateStatus; -import java.lang.Exception; - -public class GetUpdateStatusRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetUpdateStatusRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetUpdateStatusResponse call() throws Exception { - - RequestlessOperation operation - = new GetUpdateStatus.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusResponse.java deleted file mode 100644 index 678247da..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetUpdateStatusResponse 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 Server Updates - */ - private Optional object; - - @JsonCreator - public GetUpdateStatusResponse( - 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 GetUpdateStatusResponse( - 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 Server Updates - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetUpdateStatusResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetUpdateStatusResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUpdateStatusResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Server Updates - */ - public GetUpdateStatusResponse withObject(GetUpdateStatusResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The Server Updates - */ - public GetUpdateStatusResponse 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; - } - GetUpdateStatusResponse other = (GetUpdateStatusResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetUpdateStatusResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Server Updates - */ - public Builder object(GetUpdateStatusResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The Server Updates - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetUpdateStatusResponse build() { - - return new GetUpdateStatusResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusResponseBody.java deleted file mode 100644 index bbdea604..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusResponseBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetUpdateStatusResponseBody - * - *

The Server Updates - */ -public class GetUpdateStatusResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("MediaContainer") - private Optional mediaContainer; - - @JsonCreator - public GetUpdateStatusResponseBody( - @JsonProperty("MediaContainer") Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetUpdateStatusResponseBody() { - this(Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetUpdateStatusResponseBody withMediaContainer(GetUpdateStatusMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - public GetUpdateStatusResponseBody 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; - } - GetUpdateStatusResponseBody other = (GetUpdateStatusResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetUpdateStatusResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder mediaContainer(GetUpdateStatusMediaContainer 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 GetUpdateStatusResponseBody build() { - - return new GetUpdateStatusResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusMediaContainer.java new file mode 100644 index 00000000..2a6a55cc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusMediaContainer.java @@ -0,0 +1,419 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class GetUpdatesStatusMediaContainer { + /** + * The version of the updater (currently `1`) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("autoUpdateVersion") + private Optional autoUpdateVersion; + + /** + * Indicates whether this install can be updated through these endpoints (typically only on MacOS and Windows) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("canInstall") + private Optional canInstall; + + /** + * The last time a check for updates was performed + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("checkedAt") + private Optional checkedAt; + + /** + * The URL where the update is available + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("downloadURL") + private Optional downloadURL; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Release") + private Optional> release; + + /** + * The current error code (`0` means no error) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public GetUpdatesStatusMediaContainer( + @JsonProperty("autoUpdateVersion") Optional autoUpdateVersion, + @JsonProperty("canInstall") Optional canInstall, + @JsonProperty("checkedAt") Optional checkedAt, + @JsonProperty("downloadURL") Optional downloadURL, + @JsonProperty("Release") Optional> release, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(autoUpdateVersion, "autoUpdateVersion"); + Utils.checkNotNull(canInstall, "canInstall"); + Utils.checkNotNull(checkedAt, "checkedAt"); + Utils.checkNotNull(downloadURL, "downloadURL"); + Utils.checkNotNull(release, "release"); + Utils.checkNotNull(status, "status"); + this.autoUpdateVersion = autoUpdateVersion; + this.canInstall = canInstall; + this.checkedAt = checkedAt; + this.downloadURL = downloadURL; + this.release = release; + this.status = status; + } + + public GetUpdatesStatusMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The version of the updater (currently `1`) + */ + @JsonIgnore + public Optional autoUpdateVersion() { + return autoUpdateVersion; + } + + /** + * Indicates whether this install can be updated through these endpoints (typically only on MacOS and Windows) + */ + @JsonIgnore + public Optional canInstall() { + return canInstall; + } + + /** + * The last time a check for updates was performed + */ + @JsonIgnore + public Optional checkedAt() { + return checkedAt; + } + + /** + * The URL where the update is available + */ + @JsonIgnore + public Optional downloadURL() { + return downloadURL; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> release() { + return (Optional>) release; + } + + /** + * The current error code (`0` means no error) + */ + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The version of the updater (currently `1`) + */ + public GetUpdatesStatusMediaContainer withAutoUpdateVersion(long autoUpdateVersion) { + Utils.checkNotNull(autoUpdateVersion, "autoUpdateVersion"); + this.autoUpdateVersion = Optional.ofNullable(autoUpdateVersion); + return this; + } + + + /** + * The version of the updater (currently `1`) + */ + public GetUpdatesStatusMediaContainer withAutoUpdateVersion(Optional autoUpdateVersion) { + Utils.checkNotNull(autoUpdateVersion, "autoUpdateVersion"); + this.autoUpdateVersion = autoUpdateVersion; + return this; + } + + /** + * Indicates whether this install can be updated through these endpoints (typically only on MacOS and Windows) + */ + public GetUpdatesStatusMediaContainer withCanInstall(boolean canInstall) { + Utils.checkNotNull(canInstall, "canInstall"); + this.canInstall = Optional.ofNullable(canInstall); + return this; + } + + + /** + * Indicates whether this install can be updated through these endpoints (typically only on MacOS and Windows) + */ + public GetUpdatesStatusMediaContainer withCanInstall(Optional canInstall) { + Utils.checkNotNull(canInstall, "canInstall"); + this.canInstall = canInstall; + return this; + } + + /** + * The last time a check for updates was performed + */ + public GetUpdatesStatusMediaContainer withCheckedAt(long checkedAt) { + Utils.checkNotNull(checkedAt, "checkedAt"); + this.checkedAt = Optional.ofNullable(checkedAt); + return this; + } + + + /** + * The last time a check for updates was performed + */ + public GetUpdatesStatusMediaContainer withCheckedAt(Optional checkedAt) { + Utils.checkNotNull(checkedAt, "checkedAt"); + this.checkedAt = checkedAt; + return this; + } + + /** + * The URL where the update is available + */ + public GetUpdatesStatusMediaContainer withDownloadURL(String downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = Optional.ofNullable(downloadURL); + return this; + } + + + /** + * The URL where the update is available + */ + public GetUpdatesStatusMediaContainer withDownloadURL(Optional downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = downloadURL; + return this; + } + + public GetUpdatesStatusMediaContainer withRelease(List release) { + Utils.checkNotNull(release, "release"); + this.release = Optional.ofNullable(release); + return this; + } + + + public GetUpdatesStatusMediaContainer withRelease(Optional> release) { + Utils.checkNotNull(release, "release"); + this.release = release; + return this; + } + + /** + * The current error code (`0` means no error) + */ + public GetUpdatesStatusMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * The current error code (`0` means no error) + */ + public GetUpdatesStatusMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUpdatesStatusMediaContainer other = (GetUpdatesStatusMediaContainer) o; + return + Utils.enhancedDeepEquals(this.autoUpdateVersion, other.autoUpdateVersion) && + Utils.enhancedDeepEquals(this.canInstall, other.canInstall) && + Utils.enhancedDeepEquals(this.checkedAt, other.checkedAt) && + Utils.enhancedDeepEquals(this.downloadURL, other.downloadURL) && + Utils.enhancedDeepEquals(this.release, other.release) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + autoUpdateVersion, canInstall, checkedAt, + downloadURL, release, status); + } + + @Override + public String toString() { + return Utils.toString(GetUpdatesStatusMediaContainer.class, + "autoUpdateVersion", autoUpdateVersion, + "canInstall", canInstall, + "checkedAt", checkedAt, + "downloadURL", downloadURL, + "release", release, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional autoUpdateVersion = Optional.empty(); + + private Optional canInstall = Optional.empty(); + + private Optional checkedAt = Optional.empty(); + + private Optional downloadURL = Optional.empty(); + + private Optional> release = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The version of the updater (currently `1`) + */ + public Builder autoUpdateVersion(long autoUpdateVersion) { + Utils.checkNotNull(autoUpdateVersion, "autoUpdateVersion"); + this.autoUpdateVersion = Optional.ofNullable(autoUpdateVersion); + return this; + } + + /** + * The version of the updater (currently `1`) + */ + public Builder autoUpdateVersion(Optional autoUpdateVersion) { + Utils.checkNotNull(autoUpdateVersion, "autoUpdateVersion"); + this.autoUpdateVersion = autoUpdateVersion; + return this; + } + + + /** + * Indicates whether this install can be updated through these endpoints (typically only on MacOS and Windows) + */ + public Builder canInstall(boolean canInstall) { + Utils.checkNotNull(canInstall, "canInstall"); + this.canInstall = Optional.ofNullable(canInstall); + return this; + } + + /** + * Indicates whether this install can be updated through these endpoints (typically only on MacOS and Windows) + */ + public Builder canInstall(Optional canInstall) { + Utils.checkNotNull(canInstall, "canInstall"); + this.canInstall = canInstall; + return this; + } + + + /** + * The last time a check for updates was performed + */ + public Builder checkedAt(long checkedAt) { + Utils.checkNotNull(checkedAt, "checkedAt"); + this.checkedAt = Optional.ofNullable(checkedAt); + return this; + } + + /** + * The last time a check for updates was performed + */ + public Builder checkedAt(Optional checkedAt) { + Utils.checkNotNull(checkedAt, "checkedAt"); + this.checkedAt = checkedAt; + return this; + } + + + /** + * The URL where the update is available + */ + public Builder downloadURL(String downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = Optional.ofNullable(downloadURL); + return this; + } + + /** + * The URL where the update is available + */ + public Builder downloadURL(Optional downloadURL) { + Utils.checkNotNull(downloadURL, "downloadURL"); + this.downloadURL = downloadURL; + return this; + } + + + public Builder release(List release) { + Utils.checkNotNull(release, "release"); + this.release = Optional.ofNullable(release); + return this; + } + + public Builder release(Optional> release) { + Utils.checkNotNull(release, "release"); + this.release = release; + return this; + } + + + /** + * The current error code (`0` means no error) + */ + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * The current error code (`0` means no error) + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public GetUpdatesStatusMediaContainer build() { + + return new GetUpdatesStatusMediaContainer( + autoUpdateVersion, canInstall, checkedAt, + downloadURL, release, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusRequestBuilder.java new file mode 100644 index 00000000..7077ef38 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetUpdatesStatus; +import java.lang.Exception; + +public class GetUpdatesStatusRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetUpdatesStatusRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetUpdatesStatusResponse call() throws Exception { + + RequestlessOperation operation + = new GetUpdatesStatus.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusResponse.java new file mode 100644 index 00000000..1160fc03 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class GetUpdatesStatusResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetUpdatesStatusResponse( + 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 GetUpdatesStatusResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetUpdatesStatusResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetUpdatesStatusResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetUpdatesStatusResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetUpdatesStatusResponse withObject(GetUpdatesStatusResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetUpdatesStatusResponse 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; + } + GetUpdatesStatusResponse other = (GetUpdatesStatusResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetUpdatesStatusResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetUpdatesStatusResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetUpdatesStatusResponse build() { + + return new GetUpdatesStatusResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusResponseBody.java new file mode 100644 index 00000000..d4aae01c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * GetUpdatesStatusResponseBody + * + *

OK + */ +public class GetUpdatesStatusResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetUpdatesStatusResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetUpdatesStatusResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetUpdatesStatusResponseBody withMediaContainer(GetUpdatesStatusMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetUpdatesStatusResponseBody 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; + } + GetUpdatesStatusResponseBody other = (GetUpdatesStatusResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetUpdatesStatusResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetUpdatesStatusMediaContainer 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 GetUpdatesStatusResponseBody build() { + + return new GetUpdatesStatusResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusState.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusState.java new file mode 100644 index 00000000..d86ec2b1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetUpdatesStatusState.java @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * GetUpdatesStatusState + * + *

The status of this update. + * + *

- available - This release is available + * - downloading - This release is downloading + * - downloaded - This release has been downloaded + * - installing - This release is installing + * - tonight - This release will be installed tonight + * - skipped - This release has been skipped + * - error - This release has an error + * - notify - This release is only notifying it is available (typically because it cannot be installed on this setup) + * - done - This release is complete + */ +public enum GetUpdatesStatusState { + AVAILABLE("available"), + DOWNLOADING("downloading"), + DOWNLOADED("downloaded"), + INSTALLING("installing"), + TONIGHT("tonight"), + SKIPPED("skipped"), + ERROR("error"), + NOTIFY("notify"), + DONE("done"); + + @JsonValue + private final String value; + + GetUpdatesStatusState(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (GetUpdatesStatusState o: GetUpdatesStatusState.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUserFriendsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUserFriendsRequestBuilder.java deleted file mode 100644 index c7453956..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserFriendsRequestBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetUserFriends; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetUserFriendsRequestBuilder { - - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetUserFriendsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetUserFriendsRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetUserFriendsRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public GetUserFriendsResponse call() throws Exception { - - RequestlessOperation operation - = new GetUserFriends.Sync(sdkConfiguration, serverURL); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUserFriendsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUserFriendsResponse.java deleted file mode 100644 index 322f6311..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUserFriendsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.List; -import java.util.Optional; - - -public class GetUserFriendsResponse 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; - - /** - * Friends Data - */ - private Optional> friends; - - @JsonCreator - public GetUserFriendsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional> friends) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(friends, "friends"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.friends = friends; - } - - public GetUserFriendsResponse( - 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; - } - - /** - * Friends Data - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> friends() { - return (Optional>) friends; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetUserFriendsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetUserFriendsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUserFriendsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Friends Data - */ - public GetUserFriendsResponse withFriends(List friends) { - Utils.checkNotNull(friends, "friends"); - this.friends = Optional.ofNullable(friends); - return this; - } - - - /** - * Friends Data - */ - public GetUserFriendsResponse withFriends(Optional> friends) { - Utils.checkNotNull(friends, "friends"); - this.friends = friends; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUserFriendsResponse other = (GetUserFriendsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.friends, other.friends); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - friends); - } - - @Override - public String toString() { - return Utils.toString(GetUserFriendsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "friends", friends); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional> friends = 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; - } - - - /** - * Friends Data - */ - public Builder friends(List friends) { - Utils.checkNotNull(friends, "friends"); - this.friends = Optional.ofNullable(friends); - return this; - } - - /** - * Friends Data - */ - public Builder friends(Optional> friends) { - Utils.checkNotNull(friends, "friends"); - this.friends = friends; - return this; - } - - public GetUserFriendsResponse build() { - - return new GetUserFriendsResponse( - contentType, statusCode, rawResponse, - friends); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUsersMediaContainer.java deleted file mode 100644 index c5996098..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersMediaContainer.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.List; - -/** - * GetUsersMediaContainer - * - *

Container holding user and server details. - */ -public class GetUsersMediaContainer { - /** - * The friendly name of the Plex instance. - */ - private String friendlyName; - - - private String identifier; - - /** - * Unique Machine identifier of the Plex server. - */ - private String machineIdentifier; - - /** - * Total number of users. - */ - private long totalSize; - - /** - * Number of users in the current response. - */ - private long size; - - /** - * List of users with access to the Plex server. - */ - private List user; - - @JsonCreator - public GetUsersMediaContainer( - String friendlyName, - String identifier, - String machineIdentifier, - long totalSize, - long size, - List user) { - Utils.checkNotNull(friendlyName, "friendlyName"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - Utils.checkNotNull(totalSize, "totalSize"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(user, "user"); - this.friendlyName = friendlyName; - this.identifier = identifier; - this.machineIdentifier = machineIdentifier; - this.totalSize = totalSize; - this.size = size; - this.user = user; - } - - /** - * The friendly name of the Plex instance. - */ - @JsonIgnore - public String friendlyName() { - return friendlyName; - } - - @JsonIgnore - public String identifier() { - return identifier; - } - - /** - * Unique Machine identifier of the Plex server. - */ - @JsonIgnore - public String machineIdentifier() { - return machineIdentifier; - } - - /** - * Total number of users. - */ - @JsonIgnore - public long totalSize() { - return totalSize; - } - - /** - * Number of users in the current response. - */ - @JsonIgnore - public long size() { - return size; - } - - /** - * List of users with access to the Plex server. - */ - @JsonIgnore - public List user() { - return user; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The friendly name of the Plex instance. - */ - public GetUsersMediaContainer withFriendlyName(String friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = friendlyName; - return this; - } - - public GetUsersMediaContainer withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - /** - * Unique Machine identifier of the Plex server. - */ - public GetUsersMediaContainer withMachineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - /** - * Total number of users. - */ - public GetUsersMediaContainer withTotalSize(long totalSize) { - Utils.checkNotNull(totalSize, "totalSize"); - this.totalSize = totalSize; - return this; - } - - /** - * Number of users in the current response. - */ - public GetUsersMediaContainer withSize(long size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - /** - * List of users with access to the Plex server. - */ - public GetUsersMediaContainer withUser(List user) { - Utils.checkNotNull(user, "user"); - this.user = user; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersMediaContainer other = (GetUsersMediaContainer) o; - return - Utils.enhancedDeepEquals(this.friendlyName, other.friendlyName) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && - Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.user, other.user); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - friendlyName, identifier, machineIdentifier, - totalSize, size, user); - } - - @Override - public String toString() { - return Utils.toString(GetUsersMediaContainer.class, - "friendlyName", friendlyName, - "identifier", identifier, - "machineIdentifier", machineIdentifier, - "totalSize", totalSize, - "size", size, - "user", user); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String friendlyName; - - private String identifier; - - private String machineIdentifier; - - private Long totalSize; - - private Long size; - - private List user; - - private Builder() { - // force use of static builder() method - } - - - /** - * The friendly name of the Plex instance. - */ - public Builder friendlyName(String friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = friendlyName; - return this; - } - - - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - /** - * Unique Machine identifier of the Plex server. - */ - public Builder machineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - - /** - * Total number of users. - */ - public Builder totalSize(long totalSize) { - Utils.checkNotNull(totalSize, "totalSize"); - this.totalSize = totalSize; - return this; - } - - - /** - * Number of users in the current response. - */ - public Builder size(long size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - /** - * List of users with access to the Plex server. - */ - public Builder user(List user) { - Utils.checkNotNull(user, "user"); - this.user = user; - return this; - } - - public GetUsersMediaContainer build() { - - return new GetUsersMediaContainer( - friendlyName, identifier, machineIdentifier, - totalSize, size, user); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUsersRequest.java deleted file mode 100644 index 21ba652f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersRequest.java +++ /dev/null @@ -1,809 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class GetUsersRequest { - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") - private String clientID; - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") - private Optional clientName; - - /** - * A relatively friendly name for the client device - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") - private Optional deviceNickname; - - /** - * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") - private Optional deviceName; - - /** - * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Screen-Resolution") - private Optional deviceScreenResolution; - - /** - * The version of the client application. - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") - private Optional clientVersion; - - /** - * The platform of the client application. - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") - private Optional platform; - - /** - * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Features") - private Optional clientFeatures; - - /** - * A potentially less friendly identifier for the device model - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") - private Optional model; - - /** - * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Session-Id") - private Optional xPlexSessionId; - - /** - * The language of the client application. - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Language") - private Optional xPlexLanguage; - - /** - * The version of the platform - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") - private Optional platformVersion; - - /** - * An authentication token, obtained from plex.tv - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Token") - private String xPlexToken; - - @JsonCreator - public GetUsersRequest( - String clientID, - Optional clientName, - Optional deviceNickname, - Optional deviceName, - Optional deviceScreenResolution, - Optional clientVersion, - Optional platform, - Optional clientFeatures, - Optional model, - Optional xPlexSessionId, - Optional xPlexLanguage, - Optional platformVersion, - String xPlexToken) { - Utils.checkNotNull(clientID, "clientID"); - Utils.checkNotNull(clientName, "clientName"); - Utils.checkNotNull(deviceNickname, "deviceNickname"); - Utils.checkNotNull(deviceName, "deviceName"); - Utils.checkNotNull(deviceScreenResolution, "deviceScreenResolution"); - Utils.checkNotNull(clientVersion, "clientVersion"); - Utils.checkNotNull(platform, "platform"); - Utils.checkNotNull(clientFeatures, "clientFeatures"); - Utils.checkNotNull(model, "model"); - Utils.checkNotNull(xPlexSessionId, "xPlexSessionId"); - Utils.checkNotNull(xPlexLanguage, "xPlexLanguage"); - Utils.checkNotNull(platformVersion, "platformVersion"); - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.clientID = clientID; - this.clientName = clientName; - this.deviceNickname = deviceNickname; - this.deviceName = deviceName; - this.deviceScreenResolution = deviceScreenResolution; - this.clientVersion = clientVersion; - this.platform = platform; - this.clientFeatures = clientFeatures; - this.model = model; - this.xPlexSessionId = xPlexSessionId; - this.xPlexLanguage = xPlexLanguage; - this.platformVersion = platformVersion; - this.xPlexToken = xPlexToken; - } - - public GetUsersRequest( - String clientID, - String xPlexToken) { - this(clientID, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - xPlexToken); - } - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @JsonIgnore - public String clientID() { - return clientID; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - @JsonIgnore - public Optional clientName() { - return clientName; - } - - /** - * A relatively friendly name for the client device - */ - @JsonIgnore - public Optional deviceNickname() { - return deviceNickname; - } - - /** - * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) - */ - @JsonIgnore - public Optional deviceName() { - return deviceName; - } - - /** - * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) - */ - @JsonIgnore - public Optional deviceScreenResolution() { - return deviceScreenResolution; - } - - /** - * The version of the client application. - */ - @JsonIgnore - public Optional clientVersion() { - return clientVersion; - } - - /** - * The platform of the client application. - */ - @JsonIgnore - public Optional platform() { - return platform; - } - - /** - * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) - */ - @JsonIgnore - public Optional clientFeatures() { - return clientFeatures; - } - - /** - * A potentially less friendly identifier for the device model - */ - @JsonIgnore - public Optional model() { - return model; - } - - /** - * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) - */ - @JsonIgnore - public Optional xPlexSessionId() { - return xPlexSessionId; - } - - /** - * The language of the client application. - */ - @JsonIgnore - public Optional xPlexLanguage() { - return xPlexLanguage; - } - - /** - * The version of the platform - */ - @JsonIgnore - public Optional platformVersion() { - return platformVersion; - } - - /** - * An authentication token, obtained from plex.tv - */ - @JsonIgnore - public String xPlexToken() { - return xPlexToken; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public GetUsersRequest withClientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public GetUsersRequest withClientName(String clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = Optional.ofNullable(clientName); - return this; - } - - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public GetUsersRequest withClientName(Optional clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = clientName; - return this; - } - - /** - * A relatively friendly name for the client device - */ - public GetUsersRequest withDeviceNickname(String deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = Optional.ofNullable(deviceNickname); - return this; - } - - - /** - * A relatively friendly name for the client device - */ - public GetUsersRequest withDeviceNickname(Optional deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = deviceNickname; - return this; - } - - /** - * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) - */ - public GetUsersRequest withDeviceName(String deviceName) { - Utils.checkNotNull(deviceName, "deviceName"); - this.deviceName = Optional.ofNullable(deviceName); - return this; - } - - - /** - * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) - */ - public GetUsersRequest withDeviceName(Optional deviceName) { - Utils.checkNotNull(deviceName, "deviceName"); - this.deviceName = deviceName; - return this; - } - - /** - * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) - */ - public GetUsersRequest withDeviceScreenResolution(String deviceScreenResolution) { - Utils.checkNotNull(deviceScreenResolution, "deviceScreenResolution"); - this.deviceScreenResolution = Optional.ofNullable(deviceScreenResolution); - return this; - } - - - /** - * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) - */ - public GetUsersRequest withDeviceScreenResolution(Optional deviceScreenResolution) { - Utils.checkNotNull(deviceScreenResolution, "deviceScreenResolution"); - this.deviceScreenResolution = deviceScreenResolution; - return this; - } - - /** - * The version of the client application. - */ - public GetUsersRequest withClientVersion(String clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = Optional.ofNullable(clientVersion); - return this; - } - - - /** - * The version of the client application. - */ - public GetUsersRequest withClientVersion(Optional clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = clientVersion; - return this; - } - - /** - * The platform of the client application. - */ - public GetUsersRequest withPlatform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - - /** - * The platform of the client application. - */ - public GetUsersRequest withPlatform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - /** - * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) - */ - public GetUsersRequest withClientFeatures(String clientFeatures) { - Utils.checkNotNull(clientFeatures, "clientFeatures"); - this.clientFeatures = Optional.ofNullable(clientFeatures); - return this; - } - - - /** - * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) - */ - public GetUsersRequest withClientFeatures(Optional clientFeatures) { - Utils.checkNotNull(clientFeatures, "clientFeatures"); - this.clientFeatures = clientFeatures; - return this; - } - - /** - * A potentially less friendly identifier for the device model - */ - public GetUsersRequest withModel(String model) { - Utils.checkNotNull(model, "model"); - this.model = Optional.ofNullable(model); - return this; - } - - - /** - * A potentially less friendly identifier for the device model - */ - public GetUsersRequest withModel(Optional model) { - Utils.checkNotNull(model, "model"); - this.model = model; - return this; - } - - /** - * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) - */ - public GetUsersRequest withXPlexSessionId(String xPlexSessionId) { - Utils.checkNotNull(xPlexSessionId, "xPlexSessionId"); - this.xPlexSessionId = Optional.ofNullable(xPlexSessionId); - return this; - } - - - /** - * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) - */ - public GetUsersRequest withXPlexSessionId(Optional xPlexSessionId) { - Utils.checkNotNull(xPlexSessionId, "xPlexSessionId"); - this.xPlexSessionId = xPlexSessionId; - return this; - } - - /** - * The language of the client application. - */ - public GetUsersRequest withXPlexLanguage(String xPlexLanguage) { - Utils.checkNotNull(xPlexLanguage, "xPlexLanguage"); - this.xPlexLanguage = Optional.ofNullable(xPlexLanguage); - return this; - } - - - /** - * The language of the client application. - */ - public GetUsersRequest withXPlexLanguage(Optional xPlexLanguage) { - Utils.checkNotNull(xPlexLanguage, "xPlexLanguage"); - this.xPlexLanguage = xPlexLanguage; - return this; - } - - /** - * The version of the platform - */ - public GetUsersRequest withPlatformVersion(String platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = Optional.ofNullable(platformVersion); - return this; - } - - - /** - * The version of the platform - */ - public GetUsersRequest withPlatformVersion(Optional platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = platformVersion; - return this; - } - - /** - * An authentication token, obtained from plex.tv - */ - public GetUsersRequest withXPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersRequest other = (GetUsersRequest) o; - return - Utils.enhancedDeepEquals(this.clientID, other.clientID) && - Utils.enhancedDeepEquals(this.clientName, other.clientName) && - Utils.enhancedDeepEquals(this.deviceNickname, other.deviceNickname) && - Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && - Utils.enhancedDeepEquals(this.deviceScreenResolution, other.deviceScreenResolution) && - Utils.enhancedDeepEquals(this.clientVersion, other.clientVersion) && - Utils.enhancedDeepEquals(this.platform, other.platform) && - Utils.enhancedDeepEquals(this.clientFeatures, other.clientFeatures) && - Utils.enhancedDeepEquals(this.model, other.model) && - Utils.enhancedDeepEquals(this.xPlexSessionId, other.xPlexSessionId) && - Utils.enhancedDeepEquals(this.xPlexLanguage, other.xPlexLanguage) && - Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && - Utils.enhancedDeepEquals(this.xPlexToken, other.xPlexToken); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - clientID, clientName, deviceNickname, - deviceName, deviceScreenResolution, clientVersion, - platform, clientFeatures, model, - xPlexSessionId, xPlexLanguage, platformVersion, - xPlexToken); - } - - @Override - public String toString() { - return Utils.toString(GetUsersRequest.class, - "clientID", clientID, - "clientName", clientName, - "deviceNickname", deviceNickname, - "deviceName", deviceName, - "deviceScreenResolution", deviceScreenResolution, - "clientVersion", clientVersion, - "platform", platform, - "clientFeatures", clientFeatures, - "model", model, - "xPlexSessionId", xPlexSessionId, - "xPlexLanguage", xPlexLanguage, - "platformVersion", platformVersion, - "xPlexToken", xPlexToken); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String clientID; - - private Optional clientName = Optional.empty(); - - private Optional deviceNickname = Optional.empty(); - - private Optional deviceName = Optional.empty(); - - private Optional deviceScreenResolution = Optional.empty(); - - private Optional clientVersion = Optional.empty(); - - private Optional platform = Optional.empty(); - - private Optional clientFeatures = Optional.empty(); - - private Optional model = Optional.empty(); - - private Optional xPlexSessionId = Optional.empty(); - - private Optional xPlexLanguage = Optional.empty(); - - private Optional platformVersion = Optional.empty(); - - private String xPlexToken; - - private Builder() { - // force use of static builder() method - } - - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public Builder clientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public Builder clientName(String clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = Optional.ofNullable(clientName); - return this; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public Builder clientName(Optional clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = clientName; - return this; - } - - - /** - * A relatively friendly name for the client device - */ - public Builder deviceNickname(String deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = Optional.ofNullable(deviceNickname); - return this; - } - - /** - * A relatively friendly name for the client device - */ - public Builder deviceNickname(Optional deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = deviceNickname; - return this; - } - - - /** - * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) - */ - public Builder deviceName(String deviceName) { - Utils.checkNotNull(deviceName, "deviceName"); - this.deviceName = Optional.ofNullable(deviceName); - return this; - } - - /** - * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) - */ - public Builder deviceName(Optional deviceName) { - Utils.checkNotNull(deviceName, "deviceName"); - this.deviceName = deviceName; - return this; - } - - - /** - * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) - */ - public Builder deviceScreenResolution(String deviceScreenResolution) { - Utils.checkNotNull(deviceScreenResolution, "deviceScreenResolution"); - this.deviceScreenResolution = Optional.ofNullable(deviceScreenResolution); - return this; - } - - /** - * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) - */ - public Builder deviceScreenResolution(Optional deviceScreenResolution) { - Utils.checkNotNull(deviceScreenResolution, "deviceScreenResolution"); - this.deviceScreenResolution = deviceScreenResolution; - return this; - } - - - /** - * The version of the client application. - */ - public Builder clientVersion(String clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = Optional.ofNullable(clientVersion); - return this; - } - - /** - * The version of the client application. - */ - public Builder clientVersion(Optional clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = clientVersion; - return this; - } - - - /** - * The platform of the client application. - */ - public Builder platform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - /** - * The platform of the client application. - */ - public Builder platform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - - /** - * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) - */ - public Builder clientFeatures(String clientFeatures) { - Utils.checkNotNull(clientFeatures, "clientFeatures"); - this.clientFeatures = Optional.ofNullable(clientFeatures); - return this; - } - - /** - * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) - */ - public Builder clientFeatures(Optional clientFeatures) { - Utils.checkNotNull(clientFeatures, "clientFeatures"); - this.clientFeatures = clientFeatures; - return this; - } - - - /** - * A potentially less friendly identifier for the device model - */ - public Builder model(String model) { - Utils.checkNotNull(model, "model"); - this.model = Optional.ofNullable(model); - return this; - } - - /** - * A potentially less friendly identifier for the device model - */ - public Builder model(Optional model) { - Utils.checkNotNull(model, "model"); - this.model = model; - return this; - } - - - /** - * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) - */ - public Builder xPlexSessionId(String xPlexSessionId) { - Utils.checkNotNull(xPlexSessionId, "xPlexSessionId"); - this.xPlexSessionId = Optional.ofNullable(xPlexSessionId); - return this; - } - - /** - * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) - */ - public Builder xPlexSessionId(Optional xPlexSessionId) { - Utils.checkNotNull(xPlexSessionId, "xPlexSessionId"); - this.xPlexSessionId = xPlexSessionId; - return this; - } - - - /** - * The language of the client application. - */ - public Builder xPlexLanguage(String xPlexLanguage) { - Utils.checkNotNull(xPlexLanguage, "xPlexLanguage"); - this.xPlexLanguage = Optional.ofNullable(xPlexLanguage); - return this; - } - - /** - * The language of the client application. - */ - public Builder xPlexLanguage(Optional xPlexLanguage) { - Utils.checkNotNull(xPlexLanguage, "xPlexLanguage"); - this.xPlexLanguage = xPlexLanguage; - return this; - } - - - /** - * The version of the platform - */ - public Builder platformVersion(String platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = Optional.ofNullable(platformVersion); - return this; - } - - /** - * The version of the platform - */ - public Builder platformVersion(Optional platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = platformVersion; - return this; - } - - - /** - * An authentication token, obtained from plex.tv - */ - public Builder xPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - public GetUsersRequest build() { - - return new GetUsersRequest( - clientID, clientName, deviceNickname, - deviceName, deviceScreenResolution, clientVersion, - platform, clientFeatures, model, - xPlexSessionId, xPlexLanguage, platformVersion, - xPlexToken); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUsersRequestBuilder.java deleted file mode 100644 index 89124204..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersRequestBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetUsers; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetUsersRequestBuilder { - - private GetUsersRequest request; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetUsersRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetUsersRequestBuilder request(GetUsersRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetUsersRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetUsersRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public GetUsersResponse call() throws Exception { - - RequestOperation operation - = new GetUsers.Sync(sdkConfiguration, serverURL); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUsersResponse.java deleted file mode 100644 index 621b7195..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersResponse.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.IOException; -import java.io.InputStream; -import java.io.UncheckedIOException; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetUsersResponse 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; - - - private Optional body; - - @JsonCreator - public GetUsersResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional body) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(body, "body"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.body = body; - } - - public GetUsersResponse( - 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; - } - - @JsonIgnore - public Optional body() { - this.body = body - .or(() -> { - try { - return Optional.of(Utils.extractByteArrayFromBody(rawResponse)); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - }); - return this.body; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetUsersResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetUsersResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUsersResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUsersResponse withBody(byte[] body) { - Utils.checkNotNull(body, "body"); - this.body = Optional.ofNullable(body); - return this; - } - - - public GetUsersResponse withBody(Optional body) { - Utils.checkNotNull(body, "body"); - this.body = body; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersResponse other = (GetUsersResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.body, other.body); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - body); - } - - @Override - public String toString() { - return Utils.toString(GetUsersResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "body", body); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional body = 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; - } - - - public Builder body(byte[] body) { - Utils.checkNotNull(body, "body"); - this.body = Optional.ofNullable(body); - return this; - } - - public Builder body(Optional body) { - Utils.checkNotNull(body, "body"); - this.body = body; - return this; - } - - public GetUsersResponse build() { - - return new GetUsersResponse( - contentType, statusCode, rawResponse, - body); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUsersResponseBody.java deleted file mode 100644 index 2192b0fd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersResponseBody.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * GetUsersResponseBody - * - *

Successful response with media container data in XML - */ -public class GetUsersResponseBody { - /** - * Container holding user and server details. - */ - private Optional mediaContainer; - - @JsonCreator - public GetUsersResponseBody( - Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - } - - public GetUsersResponseBody() { - this(Optional.empty()); - } - - /** - * Container holding user and server details. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaContainer() { - return (Optional) mediaContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Container holding user and server details. - */ - public GetUsersResponseBody withMediaContainer(GetUsersMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - - /** - * Container holding user and server details. - */ - public GetUsersResponseBody 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; - } - GetUsersResponseBody other = (GetUsersResponseBody) o; - return - Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - mediaContainer); - } - - @Override - public String toString() { - return Utils.toString(GetUsersResponseBody.class, - "mediaContainer", mediaContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional mediaContainer = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Container holding user and server details. - */ - public Builder mediaContainer(GetUsersMediaContainer mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = Optional.ofNullable(mediaContainer); - return this; - } - - /** - * Container holding user and server details. - */ - public Builder mediaContainer(Optional mediaContainer) { - Utils.checkNotNull(mediaContainer, "mediaContainer"); - this.mediaContainer = mediaContainer; - return this; - } - - public GetUsersResponseBody build() { - - return new GetUsersResponseBody( - mediaContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersServer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetUsersServer.java deleted file mode 100644 index 0125c35e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetUsersServer.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetUsersServer { - /** - * Unique ID of the server of the connected user - */ - private long id; - - /** - * ID of the actual Plex server. - */ - private long serverId; - - /** - * Machine identifier of the Plex server. - */ - private String machineIdentifier; - - /** - * Name of the Plex server of the connected user. - */ - private String name; - - - private long lastSeenAt; - - /** - * Number of libraries in the server this user has access to. - */ - private long numLibraries; - - - private Optional allLibraries; - - - private Optional owned; - - - private Optional pending; - - @JsonCreator - public GetUsersServer( - long id, - long serverId, - String machineIdentifier, - String name, - long lastSeenAt, - long numLibraries, - Optional allLibraries, - Optional owned, - Optional pending) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(serverId, "serverId"); - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(lastSeenAt, "lastSeenAt"); - Utils.checkNotNull(numLibraries, "numLibraries"); - Utils.checkNotNull(allLibraries, "allLibraries"); - Utils.checkNotNull(owned, "owned"); - Utils.checkNotNull(pending, "pending"); - this.id = id; - this.serverId = serverId; - this.machineIdentifier = machineIdentifier; - this.name = name; - this.lastSeenAt = lastSeenAt; - this.numLibraries = numLibraries; - this.allLibraries = allLibraries; - this.owned = owned; - this.pending = pending; - } - - public GetUsersServer( - long id, - long serverId, - String machineIdentifier, - String name, - long lastSeenAt, - long numLibraries) { - this(id, serverId, machineIdentifier, - name, lastSeenAt, numLibraries, - Optional.empty(), Optional.empty(), Optional.empty()); - } - - /** - * Unique ID of the server of the connected user - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * ID of the actual Plex server. - */ - @JsonIgnore - public long serverId() { - return serverId; - } - - /** - * Machine identifier of the Plex server. - */ - @JsonIgnore - public String machineIdentifier() { - return machineIdentifier; - } - - /** - * Name of the Plex server of the connected user. - */ - @JsonIgnore - public String name() { - return name; - } - - @JsonIgnore - public long lastSeenAt() { - return lastSeenAt; - } - - /** - * Number of libraries in the server this user has access to. - */ - @JsonIgnore - public long numLibraries() { - return numLibraries; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional allLibraries() { - return (Optional) allLibraries; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional owned() { - return (Optional) owned; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional pending() { - return (Optional) pending; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique ID of the server of the connected user - */ - public GetUsersServer withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * ID of the actual Plex server. - */ - public GetUsersServer withServerId(long serverId) { - Utils.checkNotNull(serverId, "serverId"); - this.serverId = serverId; - return this; - } - - /** - * Machine identifier of the Plex server. - */ - public GetUsersServer withMachineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - /** - * Name of the Plex server of the connected user. - */ - public GetUsersServer withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public GetUsersServer withLastSeenAt(long lastSeenAt) { - Utils.checkNotNull(lastSeenAt, "lastSeenAt"); - this.lastSeenAt = lastSeenAt; - return this; - } - - /** - * Number of libraries in the server this user has access to. - */ - public GetUsersServer withNumLibraries(long numLibraries) { - Utils.checkNotNull(numLibraries, "numLibraries"); - this.numLibraries = numLibraries; - return this; - } - - public GetUsersServer withAllLibraries(AllLibraries allLibraries) { - Utils.checkNotNull(allLibraries, "allLibraries"); - this.allLibraries = Optional.ofNullable(allLibraries); - return this; - } - - - public GetUsersServer withAllLibraries(Optional allLibraries) { - Utils.checkNotNull(allLibraries, "allLibraries"); - this.allLibraries = allLibraries; - return this; - } - - public GetUsersServer withOwned(Owned owned) { - Utils.checkNotNull(owned, "owned"); - this.owned = Optional.ofNullable(owned); - return this; - } - - - public GetUsersServer withOwned(Optional owned) { - Utils.checkNotNull(owned, "owned"); - this.owned = owned; - return this; - } - - public GetUsersServer withPending(Pending pending) { - Utils.checkNotNull(pending, "pending"); - this.pending = Optional.ofNullable(pending); - return this; - } - - - public GetUsersServer withPending(Optional pending) { - Utils.checkNotNull(pending, "pending"); - this.pending = pending; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersServer other = (GetUsersServer) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.serverId, other.serverId) && - Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.lastSeenAt, other.lastSeenAt) && - Utils.enhancedDeepEquals(this.numLibraries, other.numLibraries) && - Utils.enhancedDeepEquals(this.allLibraries, other.allLibraries) && - Utils.enhancedDeepEquals(this.owned, other.owned) && - Utils.enhancedDeepEquals(this.pending, other.pending); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, serverId, machineIdentifier, - name, lastSeenAt, numLibraries, - allLibraries, owned, pending); - } - - @Override - public String toString() { - return Utils.toString(GetUsersServer.class, - "id", id, - "serverId", serverId, - "machineIdentifier", machineIdentifier, - "name", name, - "lastSeenAt", lastSeenAt, - "numLibraries", numLibraries, - "allLibraries", allLibraries, - "owned", owned, - "pending", pending); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private Long serverId; - - private String machineIdentifier; - - private String name; - - private Long lastSeenAt; - - private Long numLibraries; - - private Optional allLibraries; - - private Optional owned; - - private Optional pending; - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique ID of the server of the connected user - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * ID of the actual Plex server. - */ - public Builder serverId(long serverId) { - Utils.checkNotNull(serverId, "serverId"); - this.serverId = serverId; - return this; - } - - - /** - * Machine identifier of the Plex server. - */ - public Builder machineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - - /** - * Name of the Plex server of the connected user. - */ - public Builder name(String name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder lastSeenAt(long lastSeenAt) { - Utils.checkNotNull(lastSeenAt, "lastSeenAt"); - this.lastSeenAt = lastSeenAt; - return this; - } - - - /** - * Number of libraries in the server this user has access to. - */ - public Builder numLibraries(long numLibraries) { - Utils.checkNotNull(numLibraries, "numLibraries"); - this.numLibraries = numLibraries; - return this; - } - - - public Builder allLibraries(AllLibraries allLibraries) { - Utils.checkNotNull(allLibraries, "allLibraries"); - this.allLibraries = Optional.ofNullable(allLibraries); - return this; - } - - public Builder allLibraries(Optional allLibraries) { - Utils.checkNotNull(allLibraries, "allLibraries"); - this.allLibraries = allLibraries; - return this; - } - - - public Builder owned(Owned owned) { - Utils.checkNotNull(owned, "owned"); - this.owned = Optional.ofNullable(owned); - return this; - } - - public Builder owned(Optional owned) { - Utils.checkNotNull(owned, "owned"); - this.owned = owned; - return this; - } - - - public Builder pending(Pending pending) { - Utils.checkNotNull(pending, "pending"); - this.pending = Optional.ofNullable(pending); - return this; - } - - public Builder pending(Optional pending) { - Utils.checkNotNull(pending, "pending"); - this.pending = pending; - return this; - } - - public GetUsersServer build() { - if (allLibraries == null) { - allLibraries = _SINGLETON_VALUE_AllLibraries.value(); - } - if (owned == null) { - owned = _SINGLETON_VALUE_Owned.value(); - } - if (pending == null) { - pending = _SINGLETON_VALUE_Pending.value(); - } - - return new GetUsersServer( - id, serverId, machineIdentifier, - name, lastSeenAt, numLibraries, - allLibraries, owned, pending); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_AllLibraries = - new LazySingletonValue<>( - "allLibraries", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Owned = - new LazySingletonValue<>( - "owned", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Pending = - new LazySingletonValue<>( - "pending", - "0", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListRequest.java deleted file mode 100644 index ab58d385..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListRequest.java +++ /dev/null @@ -1,634 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.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.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class GetWatchListRequest { - /** - * Filter - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=filter") - private Filter filter; - - /** - * In the format "field:dir". Available fields are "watchlistedAt" (Added At), - * "titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating). - * "dir" can be "asc" or "desc" - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sort") - private Optional sort; - - /** - * The type of library to filter. Can be "movie" or "show", or all if not present. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=libtype") - private Optional libtype; - - /** - * 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. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=maxresults") - private Optional maxresults; - - /** - * include collections in the results - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeCollections") - private Optional includeCollections; - - /** - * include external media in the results - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeExternalMedia") - private Optional includeExternalMedia; - - /** - * 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; - - /** - * An authentication token, obtained from plex.tv - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Token") - private String xPlexToken; - - @JsonCreator - public GetWatchListRequest( - Filter filter, - Optional sort, - Optional libtype, - Optional maxresults, - Optional includeCollections, - Optional includeExternalMedia, - Optional xPlexContainerStart, - Optional xPlexContainerSize, - String xPlexToken) { - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(sort, "sort"); - Utils.checkNotNull(libtype, "libtype"); - Utils.checkNotNull(maxresults, "maxresults"); - Utils.checkNotNull(includeCollections, "includeCollections"); - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); - Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.filter = filter; - this.sort = sort; - this.libtype = libtype; - this.maxresults = maxresults; - this.includeCollections = includeCollections; - this.includeExternalMedia = includeExternalMedia; - this.xPlexContainerStart = xPlexContainerStart; - this.xPlexContainerSize = xPlexContainerSize; - this.xPlexToken = xPlexToken; - } - - public GetWatchListRequest( - Filter filter, - String xPlexToken) { - this(filter, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), xPlexToken); - } - - /** - * Filter - */ - @JsonIgnore - public Filter filter() { - return filter; - } - - /** - * In the format "field:dir". Available fields are "watchlistedAt" (Added At), - * "titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating). - * "dir" can be "asc" or "desc" - */ - @JsonIgnore - public Optional sort() { - return sort; - } - - /** - * The type of library to filter. Can be "movie" or "show", or all if not present. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional libtype() { - return (Optional) libtype; - } - - /** - * 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. - */ - @JsonIgnore - public Optional maxresults() { - return maxresults; - } - - /** - * include collections in the results - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeCollections() { - return (Optional) includeCollections; - } - - /** - * include external media in the results - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeExternalMedia() { - return (Optional) includeExternalMedia; - } - - /** - * 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; - } - - /** - * An authentication token, obtained from plex.tv - */ - @JsonIgnore - public String xPlexToken() { - return xPlexToken; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Filter - */ - public GetWatchListRequest withFilter(Filter filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * In the format "field:dir". Available fields are "watchlistedAt" (Added At), - * "titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating). - * "dir" can be "asc" or "desc" - */ - public GetWatchListRequest withSort(String sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - - /** - * In the format "field:dir". Available fields are "watchlistedAt" (Added At), - * "titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating). - * "dir" can be "asc" or "desc" - */ - public GetWatchListRequest withSort(Optional sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - /** - * The type of library to filter. Can be "movie" or "show", or all if not present. - */ - public GetWatchListRequest withLibtype(Libtype libtype) { - Utils.checkNotNull(libtype, "libtype"); - this.libtype = Optional.ofNullable(libtype); - return this; - } - - - /** - * The type of library to filter. Can be "movie" or "show", or all if not present. - */ - public GetWatchListRequest withLibtype(Optional libtype) { - Utils.checkNotNull(libtype, "libtype"); - this.libtype = libtype; - 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. - */ - public GetWatchListRequest withMaxresults(int maxresults) { - Utils.checkNotNull(maxresults, "maxresults"); - this.maxresults = Optional.ofNullable(maxresults); - 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. - */ - public GetWatchListRequest withMaxresults(Optional maxresults) { - Utils.checkNotNull(maxresults, "maxresults"); - this.maxresults = maxresults; - return this; - } - - /** - * include collections in the results - */ - public GetWatchListRequest withIncludeCollections(IncludeCollections includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = Optional.ofNullable(includeCollections); - return this; - } - - - /** - * include collections in the results - */ - public GetWatchListRequest withIncludeCollections(Optional includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = includeCollections; - return this; - } - - /** - * include external media in the results - */ - public GetWatchListRequest withIncludeExternalMedia(IncludeExternalMedia includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = Optional.ofNullable(includeExternalMedia); - return this; - } - - - /** - * include external media in the results - */ - public GetWatchListRequest withIncludeExternalMedia(Optional includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = includeExternalMedia; - 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 GetWatchListRequest 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 GetWatchListRequest 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 GetWatchListRequest 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 GetWatchListRequest withXPlexContainerSize(Optional xPlexContainerSize) { - Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); - this.xPlexContainerSize = xPlexContainerSize; - return this; - } - - /** - * An authentication token, obtained from plex.tv - */ - public GetWatchListRequest withXPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetWatchListRequest other = (GetWatchListRequest) o; - return - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.sort, other.sort) && - Utils.enhancedDeepEquals(this.libtype, other.libtype) && - Utils.enhancedDeepEquals(this.maxresults, other.maxresults) && - Utils.enhancedDeepEquals(this.includeCollections, other.includeCollections) && - Utils.enhancedDeepEquals(this.includeExternalMedia, other.includeExternalMedia) && - Utils.enhancedDeepEquals(this.xPlexContainerStart, other.xPlexContainerStart) && - Utils.enhancedDeepEquals(this.xPlexContainerSize, other.xPlexContainerSize) && - Utils.enhancedDeepEquals(this.xPlexToken, other.xPlexToken); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - filter, sort, libtype, - maxresults, includeCollections, includeExternalMedia, - xPlexContainerStart, xPlexContainerSize, xPlexToken); - } - - @Override - public String toString() { - return Utils.toString(GetWatchListRequest.class, - "filter", filter, - "sort", sort, - "libtype", libtype, - "maxresults", maxresults, - "includeCollections", includeCollections, - "includeExternalMedia", includeExternalMedia, - "xPlexContainerStart", xPlexContainerStart, - "xPlexContainerSize", xPlexContainerSize, - "xPlexToken", xPlexToken); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Filter filter; - - private Optional sort = Optional.empty(); - - private Optional libtype = Optional.empty(); - - private Optional maxresults = Optional.empty(); - - private Optional includeCollections = Optional.empty(); - - private Optional includeExternalMedia = Optional.empty(); - - private Optional xPlexContainerStart; - - private Optional xPlexContainerSize; - - private String xPlexToken; - - private Builder() { - // force use of static builder() method - } - - - /** - * Filter - */ - public Builder filter(Filter filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * In the format "field:dir". Available fields are "watchlistedAt" (Added At), - * "titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating). - * "dir" can be "asc" or "desc" - */ - public Builder sort(String sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.ofNullable(sort); - return this; - } - - /** - * In the format "field:dir". Available fields are "watchlistedAt" (Added At), - * "titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating). - * "dir" can be "asc" or "desc" - */ - public Builder sort(Optional sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - - /** - * The type of library to filter. Can be "movie" or "show", or all if not present. - */ - public Builder libtype(Libtype libtype) { - Utils.checkNotNull(libtype, "libtype"); - this.libtype = Optional.ofNullable(libtype); - return this; - } - - /** - * The type of library to filter. Can be "movie" or "show", or all if not present. - */ - public Builder libtype(Optional libtype) { - Utils.checkNotNull(libtype, "libtype"); - this.libtype = libtype; - 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. - */ - public Builder maxresults(int maxresults) { - Utils.checkNotNull(maxresults, "maxresults"); - this.maxresults = Optional.ofNullable(maxresults); - 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. - */ - public Builder maxresults(Optional maxresults) { - Utils.checkNotNull(maxresults, "maxresults"); - this.maxresults = maxresults; - return this; - } - - - /** - * include collections in the results - */ - public Builder includeCollections(IncludeCollections includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = Optional.ofNullable(includeCollections); - return this; - } - - /** - * include collections in the results - */ - public Builder includeCollections(Optional includeCollections) { - Utils.checkNotNull(includeCollections, "includeCollections"); - this.includeCollections = includeCollections; - return this; - } - - - /** - * include external media in the results - */ - public Builder includeExternalMedia(IncludeExternalMedia includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = Optional.ofNullable(includeExternalMedia); - return this; - } - - /** - * include external media in the results - */ - public Builder includeExternalMedia(Optional includeExternalMedia) { - Utils.checkNotNull(includeExternalMedia, "includeExternalMedia"); - this.includeExternalMedia = includeExternalMedia; - 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; - } - - - /** - * An authentication token, obtained from plex.tv - */ - public Builder xPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - public GetWatchListRequest build() { - if (xPlexContainerStart == null) { - xPlexContainerStart = _SINGLETON_VALUE_XPlexContainerStart.value(); - } - if (xPlexContainerSize == null) { - xPlexContainerSize = _SINGLETON_VALUE_XPlexContainerSize.value(); - } - - return new GetWatchListRequest( - filter, sort, libtype, - maxresults, includeCollections, includeExternalMedia, - xPlexContainerStart, xPlexContainerSize, xPlexToken); - } - - - 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/GetWatchListRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListRequestBuilder.java deleted file mode 100644 index 9f4f1980..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListRequestBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetWatchList; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class GetWatchListRequestBuilder { - - private GetWatchListRequest request; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetWatchListRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetWatchListRequestBuilder request(GetWatchListRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetWatchListRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetWatchListRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public GetWatchListResponse call() throws Exception { - - RequestOperation operation - = new GetWatchList.Sync(sdkConfiguration, serverURL); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListResponse.java deleted file mode 100644 index 4b04793a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class GetWatchListResponse 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; - - /** - * Watchlist Data - */ - private Optional object; - - @JsonCreator - public GetWatchListResponse( - 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 GetWatchListResponse( - 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; - } - - /** - * Watchlist Data - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetWatchListResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetWatchListResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetWatchListResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Watchlist Data - */ - public GetWatchListResponse withObject(GetWatchListResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Watchlist Data - */ - public GetWatchListResponse 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; - } - GetWatchListResponse other = (GetWatchListResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetWatchListResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Watchlist Data - */ - public Builder object(GetWatchListResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Watchlist Data - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetWatchListResponse build() { - - return new GetWatchListResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListResponseBody.java deleted file mode 100644 index 02628579..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetWatchListResponseBody.java +++ /dev/null @@ -1,383 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - -/** - * GetWatchListResponseBody - * - *

Watchlist Data - */ -public class GetWatchListResponseBody { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - - @JsonInclude(Include.NON_ABSENT) - @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("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - - @JsonCreator - public GetWatchListResponseBody( - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("offset") Optional offset, - @JsonProperty("totalSize") Optional totalSize, - @JsonProperty("identifier") Optional identifier, - @JsonProperty("size") Optional size, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(offset, "offset"); - Utils.checkNotNull(totalSize, "totalSize"); - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(metadata, "metadata"); - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.offset = offset; - this.totalSize = totalSize; - this.identifier = identifier; - this.size = size; - this.metadata = metadata; - } - - public GetWatchListResponseBody() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional offset() { - return offset; - } - - @JsonIgnore - public Optional totalSize() { - return totalSize; - } - - @JsonIgnore - public Optional identifier() { - return identifier; - } - - @JsonIgnore - public Optional size() { - return size; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - public GetWatchListResponseBody withLibrarySectionID(String librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - - public GetWatchListResponseBody withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetWatchListResponseBody withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - - public GetWatchListResponseBody withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetWatchListResponseBody withOffset(int offset) { - Utils.checkNotNull(offset, "offset"); - this.offset = Optional.ofNullable(offset); - return this; - } - - - public GetWatchListResponseBody withOffset(Optional offset) { - Utils.checkNotNull(offset, "offset"); - this.offset = offset; - return this; - } - - public GetWatchListResponseBody withTotalSize(int totalSize) { - Utils.checkNotNull(totalSize, "totalSize"); - this.totalSize = Optional.ofNullable(totalSize); - return this; - } - - - public GetWatchListResponseBody withTotalSize(Optional totalSize) { - Utils.checkNotNull(totalSize, "totalSize"); - this.totalSize = totalSize; - return this; - } - - public GetWatchListResponseBody withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = Optional.ofNullable(identifier); - return this; - } - - - public GetWatchListResponseBody withIdentifier(Optional identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public GetWatchListResponseBody withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public GetWatchListResponseBody withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public GetWatchListResponseBody withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public GetWatchListResponseBody 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; - } - GetWatchListResponseBody other = (GetWatchListResponseBody) o; - return - Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && - Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Utils.enhancedDeepEquals(this.offset, other.offset) && - Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - librarySectionID, librarySectionTitle, offset, - totalSize, identifier, size, - metadata); - } - - @Override - public String toString() { - return Utils.toString(GetWatchListResponseBody.class, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "offset", offset, - "totalSize", totalSize, - "identifier", identifier, - "size", size, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional librarySectionID = Optional.empty(); - - private Optional librarySectionTitle = Optional.empty(); - - private Optional offset = Optional.empty(); - - private Optional totalSize = Optional.empty(); - - private Optional identifier = Optional.empty(); - - private Optional size = Optional.empty(); - - private Optional> metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder librarySectionID(String 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 offset(int offset) { - Utils.checkNotNull(offset, "offset"); - this.offset = Optional.ofNullable(offset); - return this; - } - - 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; - } - - - 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 size(int 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 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 GetWatchListResponseBody build() { - - return new GetWatchListResponseBody( - librarySectionID, librarySectionTitle, offset, - totalSize, identifier, size, - metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Guids.java b/src/main/java/dev/plexapi/sdk/models/operations/Guids.java deleted file mode 100644 index 6f39fbce..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Guids.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class Guids { - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - @JsonProperty("id") - private String id; - - @JsonCreator - public Guids( - @JsonProperty("id") String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - } - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - @JsonIgnore - public String id() { - return id; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - public Guids 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; - } - Guids other = (Guids) o; - return - Utils.enhancedDeepEquals(this.id, other.id); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id); - } - - @Override - public String toString() { - return Utils.toString(Guids.class, - "id", id); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String id; - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// - */ - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Guids build() { - - return new Guids( - id); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/HasThumbnail.java b/src/main/java/dev/plexapi/sdk/models/operations/HasThumbnail.java deleted file mode 100644 index 08890774..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/HasThumbnail.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * HasThumbnail - * - *

Indicates if the part has a thumbnail. - */ -public enum HasThumbnail { - False("0"), - True("1"); - - @JsonValue - private final String value; - - HasThumbnail(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (HasThumbnail o: HasThumbnail.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Hidden.java b/src/main/java/dev/plexapi/sdk/models/operations/Hidden.java deleted file mode 100644 index 6975125c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Hidden.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Hidden - * - *

The Plex library visibility setting - */ -public enum Hidden { - Visible(0), - ExcludeHomeScreen(1), - ExcludeHomeScreenAndGlobalSearch(2); - - @JsonValue - private final int value; - - Hidden(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (Hidden o: Hidden.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Hints.java b/src/main/java/dev/plexapi/sdk/models/operations/Hints.java new file mode 100644 index 00000000..20ec6c64 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Hints.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * Hints + * + *

Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + */ +public class Hints { + @JsonCreator + public Hints() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(Hints.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public Hints build() { + + return new Hints( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Home.java b/src/main/java/dev/plexapi/sdk/models/operations/Home.java deleted file mode 100644 index b4b279f4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Home.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Home - * - *

Indicates if the user is part of a home group. - */ -public enum Home { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - Home(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (Home o: Home.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/HomeVisibility.java b/src/main/java/dev/plexapi/sdk/models/operations/HomeVisibility.java new file mode 100644 index 00000000..c39b79ba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/HomeVisibility.java @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * HomeVisibility + * + *

Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ +public enum HomeVisibility { + ALL("all"), + NONE("none"), + ADMIN("admin"), + SHARED("shared"); + + @JsonValue + private final String value; + + HomeVisibility(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (HomeVisibility o: HomeVisibility.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Hub.java b/src/main/java/dev/plexapi/sdk/models/operations/Hub.java index dcbfb914..1baad6e8 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Hub.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Hub.java @@ -10,201 +10,305 @@ 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.lang.SuppressWarnings; -import java.util.List; import java.util.Optional; public class Hub { - + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hubKey") - private Optional hubKey; - + @JsonProperty("homeVisibility") + private Optional homeVisibility; + /** + * The identifier for this hub + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; + @JsonProperty("identifier") + private Optional identifier; + /** + * Whether this hub is visible to admin user home + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("promotedToOwnHome") + private Optional promotedToOwnHome; + /** + * Whether this hub is promoted to all for recommendations + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("promotedToRecommended") + private Optional promotedToRecommended; + + /** + * Whether this hub is visible to shared user's home + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("promotedToSharedHome") + private Optional promotedToSharedHome; + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("recommendationsVisibility") + private Optional recommendationsVisibility; + + /** + * The title of this hub + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("title") private Optional title; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hubIdentifier") - private Optional hubIdentifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("context") - private Optional context; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("more") - private Optional more; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("style") - private Optional style; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("promoted") - private Optional promoted; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional> metadata; - @JsonCreator public Hub( - @JsonProperty("hubKey") Optional hubKey, - @JsonProperty("key") Optional key, - @JsonProperty("title") Optional title, - @JsonProperty("type") Optional type, - @JsonProperty("hubIdentifier") Optional hubIdentifier, - @JsonProperty("context") Optional context, - @JsonProperty("size") Optional size, - @JsonProperty("more") Optional more, - @JsonProperty("style") Optional style, - @JsonProperty("promoted") Optional promoted, - @JsonProperty("Metadata") Optional> metadata) { - Utils.checkNotNull(hubKey, "hubKey"); - Utils.checkNotNull(key, "key"); + @JsonProperty("homeVisibility") Optional homeVisibility, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("promotedToOwnHome") Optional promotedToOwnHome, + @JsonProperty("promotedToRecommended") Optional promotedToRecommended, + @JsonProperty("promotedToSharedHome") Optional promotedToSharedHome, + @JsonProperty("recommendationsVisibility") Optional recommendationsVisibility, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(homeVisibility, "homeVisibility"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + Utils.checkNotNull(recommendationsVisibility, "recommendationsVisibility"); Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(hubIdentifier, "hubIdentifier"); - Utils.checkNotNull(context, "context"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(more, "more"); - Utils.checkNotNull(style, "style"); - Utils.checkNotNull(promoted, "promoted"); - Utils.checkNotNull(metadata, "metadata"); - this.hubKey = hubKey; - this.key = key; + this.homeVisibility = homeVisibility; + this.identifier = identifier; + this.promotedToOwnHome = promotedToOwnHome; + this.promotedToRecommended = promotedToRecommended; + this.promotedToSharedHome = promotedToSharedHome; + this.recommendationsVisibility = recommendationsVisibility; this.title = title; - this.type = type; - this.hubIdentifier = hubIdentifier; - this.context = context; - this.size = size; - this.more = more; - this.style = style; - this.promoted = promoted; - this.metadata = metadata; } public Hub() { 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()); } + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional hubKey() { - return hubKey; + public Optional homeVisibility() { + return (Optional) homeVisibility; } + /** + * The identifier for this hub + */ @JsonIgnore - public Optional key() { - return key; + public Optional identifier() { + return identifier; } + /** + * Whether this hub is visible to admin user home + */ + @JsonIgnore + public Optional promotedToOwnHome() { + return promotedToOwnHome; + } + + /** + * Whether this hub is promoted to all for recommendations + */ + @JsonIgnore + public Optional promotedToRecommended() { + return promotedToRecommended; + } + + /** + * Whether this hub is visible to shared user's home + */ + @JsonIgnore + public Optional promotedToSharedHome() { + return promotedToSharedHome; + } + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional recommendationsVisibility() { + return (Optional) recommendationsVisibility; + } + + /** + * The title of this hub + */ @JsonIgnore public Optional title() { return title; } - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional hubIdentifier() { - return hubIdentifier; - } - - @JsonIgnore - public Optional context() { - return context; - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional more() { - return more; - } - - @JsonIgnore - public Optional style() { - return style; - } - - @JsonIgnore - public Optional promoted() { - return promoted; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> metadata() { - return (Optional>) metadata; - } - public static Builder builder() { return new Builder(); } - public Hub withHubKey(String hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = Optional.ofNullable(hubKey); + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Hub withHomeVisibility(HomeVisibility homeVisibility) { + Utils.checkNotNull(homeVisibility, "homeVisibility"); + this.homeVisibility = Optional.ofNullable(homeVisibility); return this; } - public Hub withHubKey(Optional hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = hubKey; + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Hub withHomeVisibility(Optional homeVisibility) { + Utils.checkNotNull(homeVisibility, "homeVisibility"); + this.homeVisibility = homeVisibility; return this; } - public Hub withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); + /** + * The identifier for this hub + */ + public Hub withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); return this; } - public Hub withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; + /** + * The identifier for this hub + */ + public Hub withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; return this; } + /** + * Whether this hub is visible to admin user home + */ + public Hub withPromotedToOwnHome(boolean promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = Optional.ofNullable(promotedToOwnHome); + return this; + } + + + /** + * Whether this hub is visible to admin user home + */ + public Hub withPromotedToOwnHome(Optional promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = promotedToOwnHome; + return this; + } + + /** + * Whether this hub is promoted to all for recommendations + */ + public Hub withPromotedToRecommended(boolean promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = Optional.ofNullable(promotedToRecommended); + return this; + } + + + /** + * Whether this hub is promoted to all for recommendations + */ + public Hub withPromotedToRecommended(Optional promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = promotedToRecommended; + return this; + } + + /** + * Whether this hub is visible to shared user's home + */ + public Hub withPromotedToSharedHome(boolean promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = Optional.ofNullable(promotedToSharedHome); + return this; + } + + + /** + * Whether this hub is visible to shared user's home + */ + public Hub withPromotedToSharedHome(Optional promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = promotedToSharedHome; + return this; + } + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Hub withRecommendationsVisibility(RecommendationsVisibility recommendationsVisibility) { + Utils.checkNotNull(recommendationsVisibility, "recommendationsVisibility"); + this.recommendationsVisibility = Optional.ofNullable(recommendationsVisibility); + return this; + } + + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Hub withRecommendationsVisibility(Optional recommendationsVisibility) { + Utils.checkNotNull(recommendationsVisibility, "recommendationsVisibility"); + this.recommendationsVisibility = recommendationsVisibility; + return this; + } + + /** + * The title of this hub + */ public Hub withTitle(String title) { Utils.checkNotNull(title, "title"); this.title = Optional.ofNullable(title); @@ -212,116 +316,15 @@ public class Hub { } + /** + * The title of this hub + */ public Hub withTitle(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } - public Hub withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public Hub withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Hub withHubIdentifier(String hubIdentifier) { - Utils.checkNotNull(hubIdentifier, "hubIdentifier"); - this.hubIdentifier = Optional.ofNullable(hubIdentifier); - return this; - } - - - public Hub withHubIdentifier(Optional hubIdentifier) { - Utils.checkNotNull(hubIdentifier, "hubIdentifier"); - this.hubIdentifier = hubIdentifier; - return this; - } - - public Hub withContext(String context) { - Utils.checkNotNull(context, "context"); - this.context = Optional.ofNullable(context); - return this; - } - - - public Hub withContext(Optional context) { - Utils.checkNotNull(context, "context"); - this.context = context; - return this; - } - - public Hub withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public Hub withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public Hub withMore(boolean more) { - Utils.checkNotNull(more, "more"); - this.more = Optional.ofNullable(more); - return this; - } - - - public Hub withMore(Optional more) { - Utils.checkNotNull(more, "more"); - this.more = more; - return this; - } - - public Hub withStyle(String style) { - Utils.checkNotNull(style, "style"); - this.style = Optional.ofNullable(style); - return this; - } - - - public Hub withStyle(Optional style) { - Utils.checkNotNull(style, "style"); - this.style = style; - return this; - } - - public Hub withPromoted(boolean promoted) { - Utils.checkNotNull(promoted, "promoted"); - this.promoted = Optional.ofNullable(promoted); - return this; - } - - - public Hub withPromoted(Optional promoted) { - Utils.checkNotNull(promoted, "promoted"); - this.promoted = promoted; - return this; - } - - public Hub withMetadata(List metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public Hub withMetadata(Optional> metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -332,223 +335,211 @@ public class Hub { } Hub other = (Hub) o; return - Utils.enhancedDeepEquals(this.hubKey, other.hubKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.hubIdentifier, other.hubIdentifier) && - Utils.enhancedDeepEquals(this.context, other.context) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.more, other.more) && - Utils.enhancedDeepEquals(this.style, other.style) && - Utils.enhancedDeepEquals(this.promoted, other.promoted) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); + Utils.enhancedDeepEquals(this.homeVisibility, other.homeVisibility) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.promotedToOwnHome, other.promotedToOwnHome) && + Utils.enhancedDeepEquals(this.promotedToRecommended, other.promotedToRecommended) && + Utils.enhancedDeepEquals(this.promotedToSharedHome, other.promotedToSharedHome) && + Utils.enhancedDeepEquals(this.recommendationsVisibility, other.recommendationsVisibility) && + Utils.enhancedDeepEquals(this.title, other.title); } @Override public int hashCode() { return Utils.enhancedHash( - hubKey, key, title, - type, hubIdentifier, context, - size, more, style, - promoted, metadata); + homeVisibility, identifier, promotedToOwnHome, + promotedToRecommended, promotedToSharedHome, recommendationsVisibility, + title); } @Override public String toString() { return Utils.toString(Hub.class, - "hubKey", hubKey, - "key", key, - "title", title, - "type", type, - "hubIdentifier", hubIdentifier, - "context", context, - "size", size, - "more", more, - "style", style, - "promoted", promoted, - "metadata", metadata); + "homeVisibility", homeVisibility, + "identifier", identifier, + "promotedToOwnHome", promotedToOwnHome, + "promotedToRecommended", promotedToRecommended, + "promotedToSharedHome", promotedToSharedHome, + "recommendationsVisibility", recommendationsVisibility, + "title", title); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional hubKey = Optional.empty(); + private Optional homeVisibility = Optional.empty(); - private Optional key = Optional.empty(); + private Optional identifier = Optional.empty(); + + private Optional promotedToOwnHome = Optional.empty(); + + private Optional promotedToRecommended = Optional.empty(); + + private Optional promotedToSharedHome = Optional.empty(); + + private Optional recommendationsVisibility = Optional.empty(); private Optional title = Optional.empty(); - private Optional type = Optional.empty(); - - private Optional hubIdentifier = Optional.empty(); - - private Optional context = Optional.empty(); - - private Optional size = Optional.empty(); - - private Optional more = Optional.empty(); - - private Optional style = Optional.empty(); - - private Optional promoted = Optional.empty(); - - private Optional> metadata = Optional.empty(); - private Builder() { // force use of static builder() method } - public Builder hubKey(String hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = Optional.ofNullable(hubKey); + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Builder homeVisibility(HomeVisibility homeVisibility) { + Utils.checkNotNull(homeVisibility, "homeVisibility"); + this.homeVisibility = Optional.ofNullable(homeVisibility); return this; } - public Builder hubKey(Optional hubKey) { - Utils.checkNotNull(hubKey, "hubKey"); - this.hubKey = hubKey; + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Builder homeVisibility(Optional homeVisibility) { + Utils.checkNotNull(homeVisibility, "homeVisibility"); + this.homeVisibility = homeVisibility; return this; } - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); + /** + * The identifier for this hub + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); return this; } - public Builder key(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; + /** + * The identifier for this hub + */ + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; return this; } + /** + * Whether this hub is visible to admin user home + */ + public Builder promotedToOwnHome(boolean promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = Optional.ofNullable(promotedToOwnHome); + return this; + } + + /** + * Whether this hub is visible to admin user home + */ + public Builder promotedToOwnHome(Optional promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = promotedToOwnHome; + return this; + } + + + /** + * Whether this hub is promoted to all for recommendations + */ + public Builder promotedToRecommended(boolean promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = Optional.ofNullable(promotedToRecommended); + return this; + } + + /** + * Whether this hub is promoted to all for recommendations + */ + public Builder promotedToRecommended(Optional promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = promotedToRecommended; + return this; + } + + + /** + * Whether this hub is visible to shared user's home + */ + public Builder promotedToSharedHome(boolean promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = Optional.ofNullable(promotedToSharedHome); + return this; + } + + /** + * Whether this hub is visible to shared user's home + */ + public Builder promotedToSharedHome(Optional promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = promotedToSharedHome; + return this; + } + + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Builder recommendationsVisibility(RecommendationsVisibility recommendationsVisibility) { + Utils.checkNotNull(recommendationsVisibility, "recommendationsVisibility"); + this.recommendationsVisibility = Optional.ofNullable(recommendationsVisibility); + return this; + } + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Builder recommendationsVisibility(Optional recommendationsVisibility) { + Utils.checkNotNull(recommendationsVisibility, "recommendationsVisibility"); + this.recommendationsVisibility = recommendationsVisibility; + return this; + } + + + /** + * The title of this hub + */ public Builder title(String title) { Utils.checkNotNull(title, "title"); this.title = Optional.ofNullable(title); return this; } + /** + * The title of this hub + */ 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 hubIdentifier(String hubIdentifier) { - Utils.checkNotNull(hubIdentifier, "hubIdentifier"); - this.hubIdentifier = Optional.ofNullable(hubIdentifier); - return this; - } - - public Builder hubIdentifier(Optional hubIdentifier) { - Utils.checkNotNull(hubIdentifier, "hubIdentifier"); - this.hubIdentifier = hubIdentifier; - return this; - } - - - public Builder context(String context) { - Utils.checkNotNull(context, "context"); - this.context = Optional.ofNullable(context); - return this; - } - - public Builder context(Optional context) { - Utils.checkNotNull(context, "context"); - this.context = context; - return this; - } - - - public Builder size(int 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 more(boolean more) { - Utils.checkNotNull(more, "more"); - this.more = Optional.ofNullable(more); - return this; - } - - public Builder more(Optional more) { - Utils.checkNotNull(more, "more"); - this.more = more; - return this; - } - - - public Builder style(String style) { - Utils.checkNotNull(style, "style"); - this.style = Optional.ofNullable(style); - return this; - } - - public Builder style(Optional style) { - Utils.checkNotNull(style, "style"); - this.style = style; - return this; - } - - - public Builder promoted(boolean promoted) { - Utils.checkNotNull(promoted, "promoted"); - this.promoted = Optional.ofNullable(promoted); - return this; - } - - public Builder promoted(Optional promoted) { - Utils.checkNotNull(promoted, "promoted"); - this.promoted = promoted; - 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 Hub build() { return new Hub( - hubKey, key, title, - type, hubIdentifier, context, - size, more, style, - promoted, metadata); + homeVisibility, identifier, promotedToOwnHome, + promotedToRecommended, promotedToSharedHome, recommendationsVisibility, + title); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Image.java b/src/main/java/dev/plexapi/sdk/models/operations/Image.java deleted file mode 100644 index 94e32dd7..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Image.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Image { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("alt") - private Optional alt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("url") - private Optional url; - - @JsonCreator - public Image( - @JsonProperty("alt") Optional alt, - @JsonProperty("type") Optional type, - @JsonProperty("url") Optional url) { - Utils.checkNotNull(alt, "alt"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(url, "url"); - this.alt = alt; - this.type = type; - this.url = url; - } - - public Image() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional alt() { - return alt; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional url() { - return url; - } - - public static Builder builder() { - return new Builder(); - } - - - public Image withAlt(String alt) { - Utils.checkNotNull(alt, "alt"); - this.alt = Optional.ofNullable(alt); - return this; - } - - - public Image withAlt(Optional alt) { - Utils.checkNotNull(alt, "alt"); - this.alt = alt; - return this; - } - - public Image withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public Image withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Image withUrl(String url) { - Utils.checkNotNull(url, "url"); - this.url = Optional.ofNullable(url); - return this; - } - - - public Image withUrl(Optional 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; - } - Image other = (Image) o; - return - Utils.enhancedDeepEquals(this.alt, other.alt) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.url, other.url); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - alt, type, url); - } - - @Override - public String toString() { - return Utils.toString(Image.class, - "alt", alt, - "type", type, - "url", url); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional alt = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional url = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder alt(String alt) { - Utils.checkNotNull(alt, "alt"); - this.alt = Optional.ofNullable(alt); - return this; - } - - public Builder alt(Optional alt) { - Utils.checkNotNull(alt, "alt"); - this.alt = alt; - 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 url(String url) { - Utils.checkNotNull(url, "url"); - this.url = Optional.ofNullable(url); - return this; - } - - public Builder url(Optional url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - public Image build() { - - return new Image( - alt, type, url); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IncludeAdvanced.java b/src/main/java/dev/plexapi/sdk/models/operations/IncludeAdvanced.java deleted file mode 100644 index 8e141e01..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/IncludeAdvanced.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * IncludeAdvanced - */ -public enum IncludeAdvanced { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - IncludeAdvanced(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (IncludeAdvanced o: IncludeAdvanced.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IncludeCollections.java b/src/main/java/dev/plexapi/sdk/models/operations/IncludeCollections.java deleted file mode 100644 index ce0df524..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/IncludeCollections.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * IncludeCollections - * - *

include collections in the results - */ -public enum IncludeCollections { - ONE(1L), - ZERO(0L); - - @JsonValue - private final long value; - - IncludeCollections(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (IncludeCollections o: IncludeCollections.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IncludeDetails.java b/src/main/java/dev/plexapi/sdk/models/operations/IncludeDetails.java deleted file mode 100644 index f500e72c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/IncludeDetails.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * IncludeDetails - * - *

Whether or not to include details for a section (types, filters, and sorts). - * Only exists for backwards compatibility, media providers other than the server libraries have it on always. - */ -public enum IncludeDetails { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - IncludeDetails(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (IncludeDetails o: IncludeDetails.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IncludeExternalMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/IncludeExternalMedia.java deleted file mode 100644 index 0cb59fba..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/IncludeExternalMedia.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * IncludeExternalMedia - * - *

include external media in the results - */ -public enum IncludeExternalMedia { - ONE(1L), - ZERO(0L); - - @JsonValue - private final long value; - - IncludeExternalMedia(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (IncludeExternalMedia o: IncludeExternalMedia.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IncludeGuids.java b/src/main/java/dev/plexapi/sdk/models/operations/IncludeGuids.java deleted file mode 100644 index 3030c163..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/IncludeGuids.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * IncludeGuids - * - *

Adds the Guids object to the response - */ -public enum IncludeGuids { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - IncludeGuids(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (IncludeGuids o: IncludeGuids.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IncludeHttps.java b/src/main/java/dev/plexapi/sdk/models/operations/IncludeHttps.java deleted file mode 100644 index 452059af..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/IncludeHttps.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * IncludeHttps - * - *

Include Https entries in the results - */ -public enum IncludeHttps { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - IncludeHttps(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (IncludeHttps o: IncludeHttps.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IncludeIPv6.java b/src/main/java/dev/plexapi/sdk/models/operations/IncludeIPv6.java deleted file mode 100644 index 0e0bff5e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/IncludeIPv6.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * IncludeIPv6 - * - *

Include IPv6 entries in the results - */ -public enum IncludeIPv6 { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - IncludeIPv6(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (IncludeIPv6 o: IncludeIPv6.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IncludeMeta.java b/src/main/java/dev/plexapi/sdk/models/operations/IncludeMeta.java deleted file mode 100644 index a8f84c4e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/IncludeMeta.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * IncludeMeta - * - *

Adds the Meta object to the response - */ -public enum IncludeMeta { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - IncludeMeta(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (IncludeMeta o: IncludeMeta.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IncludeRelay.java b/src/main/java/dev/plexapi/sdk/models/operations/IncludeRelay.java deleted file mode 100644 index 75c6000c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/IncludeRelay.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * IncludeRelay - * - *

Include Relay addresses in the results - * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - */ -public enum IncludeRelay { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - IncludeRelay(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (IncludeRelay o: IncludeRelay.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Index.java b/src/main/java/dev/plexapi/sdk/models/operations/Index.java new file mode 100644 index 00000000..820c7a6a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Index.java @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * Index + * + *

The type of index to grab. + */ +public enum Index { + SD("sd"); + + @JsonValue + private final String value; + + Index(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Index o: Index.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemRequest.java new file mode 100644 index 00000000..c4e703aa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemRequest.java @@ -0,0 +1,980 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class IngestTransientItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The file of the file to ingest. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private Optional url; + + /** + * A virtual path to use when the url is opaque. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=virtualFilePath") + private Optional virtualFilePath; + + /** + * Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=computeHashes") + private Optional computeHashes; + + /** + * Whether or not non matching media should be stored. Defaults to 0. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=ingestNonMatches") + private Optional ingestNonMatches; + + @JsonCreator + public IngestTransientItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional url, + Optional virtualFilePath, + Optional computeHashes, + Optional ingestNonMatches) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(url, "url"); + Utils.checkNotNull(virtualFilePath, "virtualFilePath"); + Utils.checkNotNull(computeHashes, "computeHashes"); + Utils.checkNotNull(ingestNonMatches, "ingestNonMatches"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.url = url; + this.virtualFilePath = virtualFilePath; + this.computeHashes = computeHashes; + this.ingestNonMatches = ingestNonMatches; + } + + public IngestTransientItemRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The file of the file to ingest. + */ + @JsonIgnore + public Optional url() { + return url; + } + + /** + * A virtual path to use when the url is opaque. + */ + @JsonIgnore + public Optional virtualFilePath() { + return virtualFilePath; + } + + /** + * Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional computeHashes() { + return (Optional) computeHashes; + } + + /** + * Whether or not non matching media should be stored. Defaults to 0. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ingestNonMatches() { + return (Optional) ingestNonMatches; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public IngestTransientItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public IngestTransientItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public IngestTransientItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public IngestTransientItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public IngestTransientItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public IngestTransientItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public IngestTransientItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public IngestTransientItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public IngestTransientItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public IngestTransientItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public IngestTransientItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public IngestTransientItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public IngestTransientItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public IngestTransientItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public IngestTransientItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public IngestTransientItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public IngestTransientItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public IngestTransientItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public IngestTransientItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public IngestTransientItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public IngestTransientItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public IngestTransientItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The file of the file to ingest. + */ + public IngestTransientItemRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + + /** + * The file of the file to ingest. + */ + public IngestTransientItemRequest withUrl(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * A virtual path to use when the url is opaque. + */ + public IngestTransientItemRequest withVirtualFilePath(String virtualFilePath) { + Utils.checkNotNull(virtualFilePath, "virtualFilePath"); + this.virtualFilePath = Optional.ofNullable(virtualFilePath); + return this; + } + + + /** + * A virtual path to use when the url is opaque. + */ + public IngestTransientItemRequest withVirtualFilePath(Optional virtualFilePath) { + Utils.checkNotNull(virtualFilePath, "virtualFilePath"); + this.virtualFilePath = virtualFilePath; + return this; + } + + /** + * Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0. + */ + public IngestTransientItemRequest withComputeHashes(BoolInt computeHashes) { + Utils.checkNotNull(computeHashes, "computeHashes"); + this.computeHashes = Optional.ofNullable(computeHashes); + return this; + } + + + /** + * Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0. + */ + public IngestTransientItemRequest withComputeHashes(Optional computeHashes) { + Utils.checkNotNull(computeHashes, "computeHashes"); + this.computeHashes = computeHashes; + return this; + } + + /** + * Whether or not non matching media should be stored. Defaults to 0. + */ + public IngestTransientItemRequest withIngestNonMatches(BoolInt ingestNonMatches) { + Utils.checkNotNull(ingestNonMatches, "ingestNonMatches"); + this.ingestNonMatches = Optional.ofNullable(ingestNonMatches); + return this; + } + + + /** + * Whether or not non matching media should be stored. Defaults to 0. + */ + public IngestTransientItemRequest withIngestNonMatches(Optional ingestNonMatches) { + Utils.checkNotNull(ingestNonMatches, "ingestNonMatches"); + this.ingestNonMatches = ingestNonMatches; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IngestTransientItemRequest other = (IngestTransientItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.url, other.url) && + Utils.enhancedDeepEquals(this.virtualFilePath, other.virtualFilePath) && + Utils.enhancedDeepEquals(this.computeHashes, other.computeHashes) && + Utils.enhancedDeepEquals(this.ingestNonMatches, other.ingestNonMatches); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, url, + virtualFilePath, computeHashes, ingestNonMatches); + } + + @Override + public String toString() { + return Utils.toString(IngestTransientItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "url", url, + "virtualFilePath", virtualFilePath, + "computeHashes", computeHashes, + "ingestNonMatches", ingestNonMatches); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional url = Optional.empty(); + + private Optional virtualFilePath = Optional.empty(); + + private Optional computeHashes = Optional.empty(); + + private Optional ingestNonMatches = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The file of the file to ingest. + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The file of the file to ingest. + */ + public Builder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + + /** + * A virtual path to use when the url is opaque. + */ + public Builder virtualFilePath(String virtualFilePath) { + Utils.checkNotNull(virtualFilePath, "virtualFilePath"); + this.virtualFilePath = Optional.ofNullable(virtualFilePath); + return this; + } + + /** + * A virtual path to use when the url is opaque. + */ + public Builder virtualFilePath(Optional virtualFilePath) { + Utils.checkNotNull(virtualFilePath, "virtualFilePath"); + this.virtualFilePath = virtualFilePath; + return this; + } + + + /** + * Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0. + */ + public Builder computeHashes(BoolInt computeHashes) { + Utils.checkNotNull(computeHashes, "computeHashes"); + this.computeHashes = Optional.ofNullable(computeHashes); + return this; + } + + /** + * Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0. + */ + public Builder computeHashes(Optional computeHashes) { + Utils.checkNotNull(computeHashes, "computeHashes"); + this.computeHashes = computeHashes; + return this; + } + + + /** + * Whether or not non matching media should be stored. Defaults to 0. + */ + public Builder ingestNonMatches(BoolInt ingestNonMatches) { + Utils.checkNotNull(ingestNonMatches, "ingestNonMatches"); + this.ingestNonMatches = Optional.ofNullable(ingestNonMatches); + return this; + } + + /** + * Whether or not non matching media should be stored. Defaults to 0. + */ + public Builder ingestNonMatches(Optional ingestNonMatches) { + Utils.checkNotNull(ingestNonMatches, "ingestNonMatches"); + this.ingestNonMatches = ingestNonMatches; + return this; + } + + public IngestTransientItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new IngestTransientItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, url, + virtualFilePath, computeHashes, ingestNonMatches); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemRequestBuilder.java new file mode 100644 index 00000000..b9d27744 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.IngestTransientItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class IngestTransientItemRequestBuilder { + + private IngestTransientItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public IngestTransientItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public IngestTransientItemRequestBuilder request(IngestTransientItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public IngestTransientItemResponse call() throws Exception { + + RequestOperation operation + = new IngestTransientItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemResponse.java new file mode 100644 index 00000000..e08ed522 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/IngestTransientItemResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class IngestTransientItemResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public IngestTransientItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public IngestTransientItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public IngestTransientItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public IngestTransientItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public IngestTransientItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public IngestTransientItemResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public IngestTransientItemResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public IngestTransientItemResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IngestTransientItemResponse other = (IngestTransientItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(IngestTransientItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public IngestTransientItemResponse build() { + + return new IngestTransientItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/InternalPaymentMethod.java b/src/main/java/dev/plexapi/sdk/models/operations/InternalPaymentMethod.java deleted file mode 100644 index faf6c0b2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/InternalPaymentMethod.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class InternalPaymentMethod { - @JsonCreator - public InternalPaymentMethod() { - } - - public static Builder builder() { - return new Builder(); - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ); - } - - @Override - public String toString() { - return Utils.toString(InternalPaymentMethod.class); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public InternalPaymentMethod build() { - - return new InternalPaymentMethod( - ); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Item.java b/src/main/java/dev/plexapi/sdk/models/operations/Item.java new file mode 100644 index 00000000..553bb68d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Item.java @@ -0,0 +1,609 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class Item { + /** + * The composite thumbnail image path + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional device; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Location") + private Optional location; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaSettings") + private Optional mediaSettings; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Policy") + private Optional policy; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Status") + private Optional status; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("target") + private Optional target; + + /** + * The tag of this generator's settings + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("targetTagID") + private Optional targetTagID; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of this generator + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonCreator + public Item( + @JsonProperty("composite") Optional composite, + @JsonProperty("Device") Optional device, + @JsonProperty("id") Optional id, + @JsonProperty("Location") Optional location, + @JsonProperty("MediaSettings") Optional mediaSettings, + @JsonProperty("Policy") Optional policy, + @JsonProperty("Status") Optional status, + @JsonProperty("target") Optional target, + @JsonProperty("targetTagID") Optional targetTagID, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type) { + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(mediaSettings, "mediaSettings"); + Utils.checkNotNull(policy, "policy"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(target, "target"); + Utils.checkNotNull(targetTagID, "targetTagID"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + this.composite = composite; + this.device = device; + this.id = id; + this.location = location; + this.mediaSettings = mediaSettings; + this.policy = policy; + this.status = status; + this.target = target; + this.targetTagID = targetTagID; + this.title = title; + this.type = type; + } + + public Item() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * The composite thumbnail image path + */ + @JsonIgnore + public Optional composite() { + return composite; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional device() { + return (Optional) device; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional location() { + return (Optional) location; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaSettings() { + return (Optional) mediaSettings; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional policy() { + return (Optional) policy; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + @JsonIgnore + public Optional target() { + return target; + } + + /** + * The tag of this generator's settings + */ + @JsonIgnore + public Optional targetTagID() { + return targetTagID; + } + + @JsonIgnore + public Optional title() { + return title; + } + + /** + * The type of this generator + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The composite thumbnail image path + */ + public Item withComposite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + /** + * The composite thumbnail image path + */ + public Item withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public Item withDevice(GetPlaylistGeneratorDevice device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public Item withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public Item withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public Item withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Item withLocation(GetPlaylistGeneratorLocation location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + public Item withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + public Item withMediaSettings(MediaSettings mediaSettings) { + Utils.checkNotNull(mediaSettings, "mediaSettings"); + this.mediaSettings = Optional.ofNullable(mediaSettings); + return this; + } + + + public Item withMediaSettings(Optional mediaSettings) { + Utils.checkNotNull(mediaSettings, "mediaSettings"); + this.mediaSettings = mediaSettings; + return this; + } + + public Item withPolicy(Policy policy) { + Utils.checkNotNull(policy, "policy"); + this.policy = Optional.ofNullable(policy); + return this; + } + + + public Item withPolicy(Optional policy) { + Utils.checkNotNull(policy, "policy"); + this.policy = policy; + return this; + } + + public Item withStatus(GetPlaylistGeneratorStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + public Item withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public Item withTarget(String target) { + Utils.checkNotNull(target, "target"); + this.target = Optional.ofNullable(target); + return this; + } + + + public Item withTarget(Optional target) { + Utils.checkNotNull(target, "target"); + this.target = target; + return this; + } + + /** + * The tag of this generator's settings + */ + public Item withTargetTagID(long targetTagID) { + Utils.checkNotNull(targetTagID, "targetTagID"); + this.targetTagID = Optional.ofNullable(targetTagID); + return this; + } + + + /** + * The tag of this generator's settings + */ + public Item withTargetTagID(Optional targetTagID) { + Utils.checkNotNull(targetTagID, "targetTagID"); + this.targetTagID = targetTagID; + return this; + } + + public Item withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public Item withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of this generator + */ + public Item withType(GetPlaylistGeneratorType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of this generator + */ + public Item withType(Optional 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; + } + Item other = (Item) o; + return + Utils.enhancedDeepEquals(this.composite, other.composite) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.mediaSettings, other.mediaSettings) && + Utils.enhancedDeepEquals(this.policy, other.policy) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.target, other.target) && + Utils.enhancedDeepEquals(this.targetTagID, other.targetTagID) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + composite, device, id, + location, mediaSettings, policy, + status, target, targetTagID, + title, type); + } + + @Override + public String toString() { + return Utils.toString(Item.class, + "composite", composite, + "device", device, + "id", id, + "location", location, + "mediaSettings", mediaSettings, + "policy", policy, + "status", status, + "target", target, + "targetTagID", targetTagID, + "title", title, + "type", type); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional composite = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional location = Optional.empty(); + + private Optional mediaSettings = Optional.empty(); + + private Optional policy = Optional.empty(); + + private Optional status = Optional.empty(); + + private Optional target = Optional.empty(); + + private Optional targetTagID = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The composite thumbnail image path + */ + public Builder composite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + /** + * The composite thumbnail image path + */ + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + + public Builder device(GetPlaylistGeneratorDevice device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + public Builder id(long 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 location(GetPlaylistGeneratorLocation location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + public Builder mediaSettings(MediaSettings mediaSettings) { + Utils.checkNotNull(mediaSettings, "mediaSettings"); + this.mediaSettings = Optional.ofNullable(mediaSettings); + return this; + } + + public Builder mediaSettings(Optional mediaSettings) { + Utils.checkNotNull(mediaSettings, "mediaSettings"); + this.mediaSettings = mediaSettings; + return this; + } + + + public Builder policy(Policy policy) { + Utils.checkNotNull(policy, "policy"); + this.policy = Optional.ofNullable(policy); + return this; + } + + public Builder policy(Optional policy) { + Utils.checkNotNull(policy, "policy"); + this.policy = policy; + return this; + } + + + public Builder status(GetPlaylistGeneratorStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + public Builder target(String target) { + Utils.checkNotNull(target, "target"); + this.target = Optional.ofNullable(target); + return this; + } + + public Builder target(Optional target) { + Utils.checkNotNull(target, "target"); + this.target = target; + return this; + } + + + /** + * The tag of this generator's settings + */ + public Builder targetTagID(long targetTagID) { + Utils.checkNotNull(targetTagID, "targetTagID"); + this.targetTagID = Optional.ofNullable(targetTagID); + return this; + } + + /** + * The tag of this generator's settings + */ + public Builder targetTagID(Optional targetTagID) { + Utils.checkNotNull(targetTagID, "targetTagID"); + this.targetTagID = targetTagID; + 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; + } + + + /** + * The type of this generator + */ + public Builder type(GetPlaylistGeneratorType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of this generator + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Item build() { + + return new Item( + composite, device, id, + location, mediaSettings, policy, + status, target, targetTagID, + title, type); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Language.java b/src/main/java/dev/plexapi/sdk/models/operations/Language.java new file mode 100644 index 00000000..726c56b6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Language.java @@ -0,0 +1,171 @@ +/* + * 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.Optional; + + +public class Language { + /** + * 3 letter language code + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonCreator + public Language( + @JsonProperty("code") Optional code, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(title, "title"); + this.code = code; + this.title = title; + } + + public Language() { + this(Optional.empty(), Optional.empty()); + } + + /** + * 3 letter language code + */ + @JsonIgnore + public Optional code() { + return code; + } + + @JsonIgnore + public Optional title() { + return title; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * 3 letter language code + */ + public Language withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + + /** + * 3 letter language code + */ + public Language withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public Language withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public Language 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; + } + Language other = (Language) o; + return + Utils.enhancedDeepEquals(this.code, other.code) && + Utils.enhancedDeepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + code, title); + } + + @Override + public String toString() { + return Utils.toString(Language.class, + "code", code, + "title", title); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional code = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * 3 letter language code + */ + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + /** + * 3 letter language code + */ + public Builder code(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + 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 Language build() { + + return new Language( + code, title); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Level.java b/src/main/java/dev/plexapi/sdk/models/operations/Level.java index c95a7ee0..3f1c8454 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Level.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Level.java @@ -3,200 +3,45 @@ */ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; +import com.fasterxml.jackson.annotation.JsonValue; import java.util.Objects; import java.util.Optional; -/** - *

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

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

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

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

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

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

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

The type of library to filter. Can be "movie" or "show", or all if not present. - */ -@JsonDeserialize(using = Libtype._Deserializer.class) -@JsonSerialize(using = Libtype._Serializer.class) -public class Libtype { - - public static final Libtype MOVIE = new Libtype("movie"); - public static final Libtype SHOW = new Libtype("show"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private Libtype(String value) { - this.value = value; - } - - /** - * Returns a Libtype with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as Libtype - */ - public static Libtype of(String value) { - synchronized (Libtype.class) { - return values.computeIfAbsent(value, v -> new Libtype(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Libtype other = (Libtype) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "Libtype [value=" + value + "]"; - } - - // return an array just like an enum - public static Libtype[] values() { - synchronized (Libtype.class) { - return values.values().toArray(new Libtype[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("movie", MOVIE); - map.put("show", SHOW); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("movie", LibtypeEnum.MOVIE); - map.put("show", LibtypeEnum.SHOW); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(Libtype.class); - } - - @Override - public void serialize(Libtype value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(Libtype.class); - } - - @Override - public Libtype deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return Libtype.of(v); - } - } - - public enum LibtypeEnum { - - MOVIE("movie"), - SHOW("show"),; - - private final String value; - - private LibtypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Lineup.java b/src/main/java/dev/plexapi/sdk/models/operations/Lineup.java new file mode 100644 index 00000000..76d969bd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Lineup.java @@ -0,0 +1,415 @@ +/* + * 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.models.shared.Channel; +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.Optional; + + +public class Lineup { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of this object (`lineup` in this case) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineupType") + private Optional lineupType; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private Optional location; + + /** + * The uuid of this lineup + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Channel") + private Optional> channel; + + @JsonCreator + public Lineup( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("lineupType") Optional lineupType, + @JsonProperty("location") Optional location, + @JsonProperty("uuid") Optional uuid, + @JsonProperty("Channel") Optional> channel) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(lineupType, "lineupType"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(uuid, "uuid"); + Utils.checkNotNull(channel, "channel"); + this.title = title; + this.type = type; + this.lineupType = lineupType; + this.location = location; + this.uuid = uuid; + this.channel = channel; + } + + public Lineup() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional title() { + return title; + } + + /** + * The type of this object (`lineup` in this case) + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional lineupType() { + return (Optional) lineupType; + } + + @JsonIgnore + public Optional location() { + return location; + } + + /** + * The uuid of this lineup + */ + @JsonIgnore + public Optional uuid() { + return uuid; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> channel() { + return (Optional>) channel; + } + + public static Builder builder() { + return new Builder(); + } + + + public Lineup withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public Lineup withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of this object (`lineup` in this case) + */ + public Lineup withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of this object (`lineup` in this case) + */ + public Lineup withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + public Lineup withLineupType(LineupType lineupType) { + Utils.checkNotNull(lineupType, "lineupType"); + this.lineupType = Optional.ofNullable(lineupType); + return this; + } + + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + public Lineup withLineupType(Optional lineupType) { + Utils.checkNotNull(lineupType, "lineupType"); + this.lineupType = lineupType; + return this; + } + + public Lineup withLocation(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + public Lineup withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * The uuid of this lineup + */ + public Lineup withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + /** + * The uuid of this lineup + */ + public Lineup withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public Lineup withChannel(List channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = Optional.ofNullable(channel); + return this; + } + + + public Lineup withChannel(Optional> channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Lineup other = (Lineup) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.lineupType, other.lineupType) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.uuid, other.uuid) && + Utils.enhancedDeepEquals(this.channel, other.channel); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, lineupType, + location, uuid, channel); + } + + @Override + public String toString() { + return Utils.toString(Lineup.class, + "title", title, + "type", type, + "lineupType", lineupType, + "location", location, + "uuid", uuid, + "channel", channel); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional lineupType = Optional.empty(); + + private Optional location = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Optional> channel = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The type of this object (`lineup` in this case) + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of this object (`lineup` in this case) + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + public Builder lineupType(LineupType lineupType) { + Utils.checkNotNull(lineupType, "lineupType"); + this.lineupType = Optional.ofNullable(lineupType); + return this; + } + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + public Builder lineupType(Optional lineupType) { + Utils.checkNotNull(lineupType, "lineupType"); + this.lineupType = lineupType; + return this; + } + + + public Builder location(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + /** + * The uuid of this lineup + */ + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + /** + * The uuid of this lineup + */ + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + + public Builder channel(List channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = Optional.ofNullable(channel); + return this; + } + + public Builder channel(Optional> channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + + public Lineup build() { + + return new Lineup( + title, type, lineupType, + location, uuid, channel); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/LineupType.java b/src/main/java/dev/plexapi/sdk/models/operations/LineupType.java new file mode 100644 index 00000000..3f4863cb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/LineupType.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +/** + * LineupType + * + *

- `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ +public enum LineupType { + MINUS1(-1L), + ZERO(0L), + ONE(1L), + TWO(2L), + THREE(3L), + FOUR(4L); + + @JsonValue + private final long value; + + LineupType(long value) { + this.value = value; + } + + public long value() { + return value; + } + + public static Optional fromValue(long value) { + for (LineupType o: LineupType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesMediaContainer.java new file mode 100644 index 00000000..d67bb168 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesMediaContainer.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.List; +import java.util.Optional; + + +public class ListActivitiesMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Activity") + private Optional> activity; + + @JsonCreator + public ListActivitiesMediaContainer( + @JsonProperty("Activity") Optional> activity) { + Utils.checkNotNull(activity, "activity"); + this.activity = activity; + } + + public ListActivitiesMediaContainer() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> activity() { + return (Optional>) activity; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListActivitiesMediaContainer withActivity(List activity) { + Utils.checkNotNull(activity, "activity"); + this.activity = Optional.ofNullable(activity); + return this; + } + + + public ListActivitiesMediaContainer withActivity(Optional> activity) { + Utils.checkNotNull(activity, "activity"); + this.activity = activity; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListActivitiesMediaContainer other = (ListActivitiesMediaContainer) o; + return + Utils.enhancedDeepEquals(this.activity, other.activity); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + activity); + } + + @Override + public String toString() { + return Utils.toString(ListActivitiesMediaContainer.class, + "activity", activity); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> activity = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder activity(List activity) { + Utils.checkNotNull(activity, "activity"); + this.activity = Optional.ofNullable(activity); + return this; + } + + public Builder activity(Optional> activity) { + Utils.checkNotNull(activity, "activity"); + this.activity = activity; + return this; + } + + public ListActivitiesMediaContainer build() { + + return new ListActivitiesMediaContainer( + activity); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesRequestBuilder.java new file mode 100644 index 00000000..b8e5b8d3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListActivities; +import java.lang.Exception; + +public class ListActivitiesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ListActivitiesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListActivitiesResponse call() throws Exception { + + RequestlessOperation operation + = new ListActivities.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesResponse.java new file mode 100644 index 00000000..2482e2e4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class ListActivitiesResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public ListActivitiesResponse( + 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 ListActivitiesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListActivitiesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListActivitiesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListActivitiesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListActivitiesResponse withObject(ListActivitiesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListActivitiesResponse 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; + } + ListActivitiesResponse other = (ListActivitiesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ListActivitiesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(ListActivitiesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListActivitiesResponse build() { + + return new ListActivitiesResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesResponseBody.java new file mode 100644 index 00000000..02fa948c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListActivitiesResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ListActivitiesResponseBody + * + *

OK + */ +public class ListActivitiesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ListActivitiesResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ListActivitiesResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListActivitiesResponseBody withMediaContainer(ListActivitiesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ListActivitiesResponseBody 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; + } + ListActivitiesResponseBody other = (ListActivitiesResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ListActivitiesResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ListActivitiesMediaContainer 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 ListActivitiesResponseBody build() { + + return new ListActivitiesResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListContentRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListContentRequest.java new file mode 100644 index 00000000..ee188757 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListContentRequest.java @@ -0,0 +1,843 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.MediaQuery; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class ListContentRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaQuery") + private Optional mediaQuery; + + /** + * The id of the section + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private String sectionId; + + @JsonCreator + public ListContentRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional mediaQuery, + String sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(mediaQuery, "mediaQuery"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.mediaQuery = mediaQuery; + this.sectionId = sectionId; + } + + public ListContentRequest( + String sectionId) { + 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(), + sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaQuery() { + return (Optional) mediaQuery; + } + + /** + * The id of the section + */ + @JsonIgnore + public String sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListContentRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListContentRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListContentRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListContentRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListContentRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListContentRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListContentRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListContentRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListContentRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListContentRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListContentRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListContentRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListContentRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListContentRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListContentRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListContentRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListContentRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListContentRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListContentRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListContentRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListContentRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListContentRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public ListContentRequest withMediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public ListContentRequest withMediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + /** + * The id of the section + */ + public ListContentRequest withSectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListContentRequest other = (ListContentRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.mediaQuery, other.mediaQuery) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, mediaQuery, + sectionId); + } + + @Override + public String toString() { + return Utils.toString(ListContentRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "mediaQuery", mediaQuery, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional mediaQuery = Optional.empty(); + + private String sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(MediaQuery mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = Optional.ofNullable(mediaQuery); + return this; + } + + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + public Builder mediaQuery(Optional mediaQuery) { + Utils.checkNotNull(mediaQuery, "mediaQuery"); + this.mediaQuery = mediaQuery; + return this; + } + + + /** + * The id of the section + */ + public Builder sectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public ListContentRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListContentRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, mediaQuery, + sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListContentRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListContentRequestBuilder.java new file mode 100644 index 00000000..41da49d9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListContentRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListContent; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListContentRequestBuilder { + + private ListContentRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListContentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListContentRequestBuilder request(ListContentRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListContentResponse call() throws Exception { + + RequestOperation operation + = new ListContent.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListContentResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListContentResponse.java new file mode 100644 index 00000000..1551390b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListContentResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class ListContentResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public ListContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public ListContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListContentResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListContentResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListContentResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListContentResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public ListContentResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public ListContentResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListContentResponse other = (ListContentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(ListContentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListContentResponse build() { + + return new ListContentResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsDVRsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsDVRsMediaContainer.java new file mode 100644 index 00000000..06b83400 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsDVRsMediaContainer.java @@ -0,0 +1,344 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * ListDVRsDVRsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class ListDVRsDVRsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public ListDVRsDVRsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(status, "status"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.status = status; + } + + public ListDVRsDVRsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListDVRsDVRsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public ListDVRsDVRsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListDVRsDVRsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListDVRsDVRsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ListDVRsDVRsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public ListDVRsDVRsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListDVRsDVRsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListDVRsDVRsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public ListDVRsDVRsMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public ListDVRsDVRsMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListDVRsDVRsMediaContainer other = (ListDVRsDVRsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, status); + } + + @Override + public String toString() { + return Utils.toString(ListDVRsDVRsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public ListDVRsDVRsMediaContainer build() { + + return new ListDVRsDVRsMediaContainer( + identifier, offset, size, + totalSize, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsMediaContainer.java new file mode 100644 index 00000000..ec6db500 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsMediaContainer.java @@ -0,0 +1,158 @@ +/* + * 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.Optional; + + +public class ListDVRsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DVR") + private Optional> dvr; + + @JsonCreator + public ListDVRsMediaContainer( + @JsonProperty("MediaContainer") Optional mediaContainer, + @JsonProperty("DVR") Optional> dvr) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + Utils.checkNotNull(dvr, "dvr"); + this.mediaContainer = mediaContainer; + this.dvr = dvr; + } + + public ListDVRsMediaContainer() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> dvr() { + return (Optional>) dvr; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListDVRsMediaContainer withMediaContainer(ListDVRsDVRsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ListDVRsMediaContainer withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public ListDVRsMediaContainer withDvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + + public ListDVRsMediaContainer withDvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListDVRsMediaContainer other = (ListDVRsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer) && + Utils.enhancedDeepEquals(this.dvr, other.dvr); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer, dvr); + } + + @Override + public String toString() { + return Utils.toString(ListDVRsMediaContainer.class, + "mediaContainer", mediaContainer, + "dvr", dvr); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Optional> dvr = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ListDVRsDVRsMediaContainer 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 Builder dvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + public Builder dvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + public ListDVRsMediaContainer build() { + + return new ListDVRsMediaContainer( + mediaContainer, dvr); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsRequestBuilder.java new file mode 100644 index 00000000..86a8dafc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListDVRs; +import java.lang.Exception; + +public class ListDVRsRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ListDVRsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListDVRsResponse call() throws Exception { + + RequestlessOperation operation + = new ListDVRs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsResponse.java new file mode 100644 index 00000000..2d59f5b0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class ListDVRsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ListDVRsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ListDVRsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListDVRsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListDVRsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListDVRsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListDVRsResponse withObject(ListDVRsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListDVRsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListDVRsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListDVRsResponse other = (ListDVRsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ListDVRsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ListDVRsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListDVRsResponse build() { + + return new ListDVRsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsResponseBody.java new file mode 100644 index 00000000..04111fd8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDVRsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ListDVRsResponseBody + * + *

OK + */ +public class ListDVRsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ListDVRsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ListDVRsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListDVRsResponseBody withMediaContainer(ListDVRsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ListDVRsResponseBody 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; + } + ListDVRsResponseBody other = (ListDVRsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ListDVRsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ListDVRsMediaContainer 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 ListDVRsResponseBody build() { + + return new ListDVRsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDevicesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDevicesRequestBuilder.java new file mode 100644 index 00000000..ed15c613 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDevicesRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListDevices; +import java.lang.Exception; + +public class ListDevicesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ListDevicesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListDevicesResponse call() throws Exception { + + RequestlessOperation operation + = new ListDevices.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDevicesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDevicesResponse.java new file mode 100644 index 00000000..283f7943 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDevicesResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithDevice; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class ListDevicesResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + + private Map> headers; + + @JsonCreator + public ListDevicesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + this.headers = headers; + } + + public ListDevicesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListDevicesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListDevicesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListDevicesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListDevicesResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public ListDevicesResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public ListDevicesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListDevicesResponse other = (ListDevicesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice, headers); + } + + @Override + public String toString() { + return Utils.toString(ListDevicesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListDevicesResponse build() { + + return new ListDevicesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsMediaContainer.java new file mode 100644 index 00000000..9fa61943 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * ListDownloadQueueItemsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class ListDownloadQueueItemsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DownloadQueueItem") + private Optional> downloadQueueItem; + + @JsonCreator + public ListDownloadQueueItemsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("DownloadQueueItem") Optional> downloadQueueItem) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(downloadQueueItem, "downloadQueueItem"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.downloadQueueItem = downloadQueueItem; + } + + public ListDownloadQueueItemsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> downloadQueueItem() { + return (Optional>) downloadQueueItem; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListDownloadQueueItemsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public ListDownloadQueueItemsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListDownloadQueueItemsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListDownloadQueueItemsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ListDownloadQueueItemsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public ListDownloadQueueItemsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListDownloadQueueItemsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListDownloadQueueItemsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public ListDownloadQueueItemsMediaContainer withDownloadQueueItem(List downloadQueueItem) { + Utils.checkNotNull(downloadQueueItem, "downloadQueueItem"); + this.downloadQueueItem = Optional.ofNullable(downloadQueueItem); + return this; + } + + + public ListDownloadQueueItemsMediaContainer withDownloadQueueItem(Optional> downloadQueueItem) { + Utils.checkNotNull(downloadQueueItem, "downloadQueueItem"); + this.downloadQueueItem = downloadQueueItem; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListDownloadQueueItemsMediaContainer other = (ListDownloadQueueItemsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.downloadQueueItem, other.downloadQueueItem); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, downloadQueueItem); + } + + @Override + public String toString() { + return Utils.toString(ListDownloadQueueItemsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "downloadQueueItem", downloadQueueItem); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> downloadQueueItem = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder downloadQueueItem(List downloadQueueItem) { + Utils.checkNotNull(downloadQueueItem, "downloadQueueItem"); + this.downloadQueueItem = Optional.ofNullable(downloadQueueItem); + return this; + } + + public Builder downloadQueueItem(Optional> downloadQueueItem) { + Utils.checkNotNull(downloadQueueItem, "downloadQueueItem"); + this.downloadQueueItem = downloadQueueItem; + return this; + } + + public ListDownloadQueueItemsMediaContainer build() { + + return new ListDownloadQueueItemsMediaContainer( + identifier, offset, size, + totalSize, downloadQueueItem); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsRequest.java new file mode 100644 index 00000000..39d6d35e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ListDownloadQueueItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The queue id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=queueId") + private long queueId; + + @JsonCreator + public ListDownloadQueueItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long queueId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(queueId, "queueId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.queueId = queueId; + } + + public ListDownloadQueueItemsRequest( + long queueId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), queueId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The queue id + */ + @JsonIgnore + public long queueId() { + return queueId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListDownloadQueueItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListDownloadQueueItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListDownloadQueueItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListDownloadQueueItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListDownloadQueueItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListDownloadQueueItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListDownloadQueueItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListDownloadQueueItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListDownloadQueueItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListDownloadQueueItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListDownloadQueueItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListDownloadQueueItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListDownloadQueueItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListDownloadQueueItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListDownloadQueueItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListDownloadQueueItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListDownloadQueueItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListDownloadQueueItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListDownloadQueueItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListDownloadQueueItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListDownloadQueueItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListDownloadQueueItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The queue id + */ + public ListDownloadQueueItemsRequest withQueueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListDownloadQueueItemsRequest other = (ListDownloadQueueItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.queueId, other.queueId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId); + } + + @Override + public String toString() { + return Utils.toString(ListDownloadQueueItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "queueId", queueId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long queueId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The queue id + */ + public Builder queueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + public ListDownloadQueueItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListDownloadQueueItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsRequestBuilder.java new file mode 100644 index 00000000..0eccc689 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListDownloadQueueItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListDownloadQueueItemsRequestBuilder { + + private ListDownloadQueueItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListDownloadQueueItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListDownloadQueueItemsRequestBuilder request(ListDownloadQueueItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListDownloadQueueItemsResponse call() throws Exception { + + RequestOperation operation + = new ListDownloadQueueItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsResponse.java new file mode 100644 index 00000000..cf01ad52 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class ListDownloadQueueItemsResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public ListDownloadQueueItemsResponse( + 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 ListDownloadQueueItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListDownloadQueueItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListDownloadQueueItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListDownloadQueueItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListDownloadQueueItemsResponse withObject(ListDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListDownloadQueueItemsResponse 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; + } + ListDownloadQueueItemsResponse other = (ListDownloadQueueItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ListDownloadQueueItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(ListDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListDownloadQueueItemsResponse build() { + + return new ListDownloadQueueItemsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsResponseBody.java new file mode 100644 index 00000000..1057136f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ListDownloadQueueItemsResponseBody + * + *

OK + */ +public class ListDownloadQueueItemsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ListDownloadQueueItemsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ListDownloadQueueItemsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListDownloadQueueItemsResponseBody withMediaContainer(ListDownloadQueueItemsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ListDownloadQueueItemsResponseBody 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; + } + ListDownloadQueueItemsResponseBody other = (ListDownloadQueueItemsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ListDownloadQueueItemsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ListDownloadQueueItemsMediaContainer 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 ListDownloadQueueItemsResponseBody build() { + + return new ListDownloadQueueItemsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsStatus.java new file mode 100644 index 00000000..084a7b33 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListDownloadQueueItemsStatus.java @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * ListDownloadQueueItemsStatus + * + *

The state of the item: + * - deciding: The item decision is pending + * - waiting: The item is waiting for transcode + * - processing: The item is being transcoded + * - available: The item is available for download + * - error: The item encountered an error in the decision or transcode + * - expired: The transcoded item has timed out and is no longer available + */ +public enum ListDownloadQueueItemsStatus { + DECIDING("deciding"), + WAITING("waiting"), + PROCESSING("processing"), + AVAILABLE("available"), + ERROR("error"), + EXPIRED("expired"); + + @JsonValue + private final String value; + + ListDownloadQueueItemsStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (ListDownloadQueueItemsStatus o: ListDownloadQueueItemsStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListHubsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ListHubsMediaContainer.java new file mode 100644 index 00000000..e5e249f4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListHubsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * ListHubsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class ListHubsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + @JsonCreator + public ListHubsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(hub, "hub"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.hub = hub; + } + + public ListHubsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hub() { + return (Optional>) hub; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListHubsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public ListHubsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListHubsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListHubsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ListHubsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public ListHubsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListHubsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListHubsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public ListHubsMediaContainer withHub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + + public ListHubsMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListHubsMediaContainer other = (ListHubsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, hub); + } + + @Override + public String toString() { + return Utils.toString(ListHubsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "hub", hub); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder hub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public ListHubsMediaContainer build() { + + return new ListHubsMediaContainer( + identifier, offset, size, + totalSize, hub); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListHubsRequest.java new file mode 100644 index 00000000..9f9b0425 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListHubsRequest.java @@ -0,0 +1,842 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ListHubsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section ID for the hubs to reorder + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * Restrict hubs to ones relevant to the provided metadata item + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=metadataItemId") + private Optional metadataItemId; + + @JsonCreator + public ListHubsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + Optional metadataItemId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(metadataItemId, "metadataItemId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.metadataItemId = metadataItemId; + } + + public ListHubsRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section ID for the hubs to reorder + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * Restrict hubs to ones relevant to the provided metadata item + */ + @JsonIgnore + public Optional metadataItemId() { + return metadataItemId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListHubsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListHubsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListHubsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListHubsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListHubsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListHubsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListHubsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListHubsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListHubsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListHubsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListHubsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListHubsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListHubsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListHubsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListHubsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListHubsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListHubsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListHubsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListHubsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListHubsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListHubsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListHubsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section ID for the hubs to reorder + */ + public ListHubsRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Restrict hubs to ones relevant to the provided metadata item + */ + public ListHubsRequest withMetadataItemId(long metadataItemId) { + Utils.checkNotNull(metadataItemId, "metadataItemId"); + this.metadataItemId = Optional.ofNullable(metadataItemId); + return this; + } + + + /** + * Restrict hubs to ones relevant to the provided metadata item + */ + public ListHubsRequest withMetadataItemId(Optional metadataItemId) { + Utils.checkNotNull(metadataItemId, "metadataItemId"); + this.metadataItemId = metadataItemId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListHubsRequest other = (ListHubsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.metadataItemId, other.metadataItemId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + metadataItemId); + } + + @Override + public String toString() { + return Utils.toString(ListHubsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "metadataItemId", metadataItemId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Optional metadataItemId = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section ID for the hubs to reorder + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * Restrict hubs to ones relevant to the provided metadata item + */ + public Builder metadataItemId(long metadataItemId) { + Utils.checkNotNull(metadataItemId, "metadataItemId"); + this.metadataItemId = Optional.ofNullable(metadataItemId); + return this; + } + + /** + * Restrict hubs to ones relevant to the provided metadata item + */ + public Builder metadataItemId(Optional metadataItemId) { + Utils.checkNotNull(metadataItemId, "metadataItemId"); + this.metadataItemId = metadataItemId; + return this; + } + + public ListHubsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListHubsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + metadataItemId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListHubsRequestBuilder.java new file mode 100644 index 00000000..92396ba1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListHubsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListHubsRequestBuilder { + + private ListHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListHubsRequestBuilder request(ListHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListHubsResponse call() throws Exception { + + RequestOperation operation + = new ListHubs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListHubsResponse.java new file mode 100644 index 00000000..b78b2e61 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListHubsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class ListHubsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ListHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ListHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListHubsResponse withObject(ListHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListHubsResponse other = (ListHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ListHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ListHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListHubsResponse build() { + + return new ListHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListHubsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ListHubsResponseBody.java new file mode 100644 index 00000000..151c8a8b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListHubsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ListHubsResponseBody + * + *

OK + */ +public class ListHubsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ListHubsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ListHubsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListHubsResponseBody withMediaContainer(ListHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ListHubsResponseBody 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; + } + ListHubsResponseBody other = (ListHubsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ListHubsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ListHubsMediaContainer 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 ListHubsResponseBody build() { + + return new ListHubsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListLineupsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListLineupsRequest.java new file mode 100644 index 00000000..45950081 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListLineupsRequest.java @@ -0,0 +1,864 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class ListLineupsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * 3 letter country code + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=country") + private String country; + + /** + * The `providerIdentifier` of the provider + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=epgId") + private String epgId; + + /** + * The region for the lineup + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=region") + private String region; + + @JsonCreator + public ListLineupsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String country, + String epgId, + String region) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(epgId, "epgId"); + Utils.checkNotNull(region, "region"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.country = country; + this.epgId = epgId; + this.region = region; + } + + public ListLineupsRequest( + String country, + String epgId, + String region) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), country, + epgId, region); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * 3 letter country code + */ + @JsonIgnore + public String country() { + return country; + } + + /** + * The `providerIdentifier` of the provider + */ + @JsonIgnore + public String epgId() { + return epgId; + } + + /** + * The region for the lineup + */ + @JsonIgnore + public String region() { + return region; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListLineupsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListLineupsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListLineupsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListLineupsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListLineupsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListLineupsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListLineupsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListLineupsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListLineupsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListLineupsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListLineupsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListLineupsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListLineupsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListLineupsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListLineupsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListLineupsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListLineupsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListLineupsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListLineupsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListLineupsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListLineupsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListLineupsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * 3 letter country code + */ + public ListLineupsRequest withCountry(String country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + /** + * The `providerIdentifier` of the provider + */ + public ListLineupsRequest withEpgId(String epgId) { + Utils.checkNotNull(epgId, "epgId"); + this.epgId = epgId; + return this; + } + + /** + * The region for the lineup + */ + public ListLineupsRequest withRegion(String region) { + Utils.checkNotNull(region, "region"); + this.region = region; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListLineupsRequest other = (ListLineupsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.country, other.country) && + Utils.enhancedDeepEquals(this.epgId, other.epgId) && + Utils.enhancedDeepEquals(this.region, other.region); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, country, + epgId, region); + } + + @Override + public String toString() { + return Utils.toString(ListLineupsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "country", country, + "epgId", epgId, + "region", region); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String country; + + private String epgId; + + private String region; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * 3 letter country code + */ + public Builder country(String country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + + /** + * The `providerIdentifier` of the provider + */ + public Builder epgId(String epgId) { + Utils.checkNotNull(epgId, "epgId"); + this.epgId = epgId; + return this; + } + + + /** + * The region for the lineup + */ + public Builder region(String region) { + Utils.checkNotNull(region, "region"); + this.region = region; + return this; + } + + public ListLineupsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListLineupsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, country, + epgId, region); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListLineupsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListLineupsRequestBuilder.java new file mode 100644 index 00000000..bc674fa3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListLineupsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListLineups; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListLineupsRequestBuilder { + + private ListLineupsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListLineupsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListLineupsRequestBuilder request(ListLineupsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListLineupsResponse call() throws Exception { + + RequestOperation operation + = new ListLineups.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListLineupsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListLineupsResponse.java new file mode 100644 index 00000000..c540dcf3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListLineupsResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithLineup; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class ListLineupsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithLineup; + + + private Map> headers; + + @JsonCreator + public ListLineupsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithLineup, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithLineup = mediaContainerWithLineup; + this.headers = headers; + } + + public ListLineupsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithLineup() { + return (Optional) mediaContainerWithLineup; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListLineupsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListLineupsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListLineupsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListLineupsResponse withMediaContainerWithLineup(MediaContainerWithLineup mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = Optional.ofNullable(mediaContainerWithLineup); + return this; + } + + + /** + * OK + */ + public ListLineupsResponse withMediaContainerWithLineup(Optional mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = mediaContainerWithLineup; + return this; + } + + public ListLineupsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListLineupsResponse other = (ListLineupsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithLineup, other.mediaContainerWithLineup) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithLineup, headers); + } + + @Override + public String toString() { + return Utils.toString(ListLineupsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithLineup", mediaContainerWithLineup, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithLineup = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithLineup(MediaContainerWithLineup mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = Optional.ofNullable(mediaContainerWithLineup); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithLineup(Optional mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = mediaContainerWithLineup; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListLineupsResponse build() { + + return new ListLineupsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithLineup, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListMatchesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListMatchesRequest.java new file mode 100644 index 00000000..b3a4e442 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListMatchesRequest.java @@ -0,0 +1,1029 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ListMatchesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=title") + private Optional title; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=parentTitle") + private Optional parentTitle; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=agent") + private Optional agent; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=language") + private Optional language; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=year") + private Optional year; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=manual") + private Optional manual; + + @JsonCreator + public ListMatchesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional title, + Optional parentTitle, + Optional agent, + Optional language, + Optional year, + Optional manual) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(agent, "agent"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(manual, "manual"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.title = title; + this.parentTitle = parentTitle; + this.agent = agent; + this.language = language; + this.year = year; + this.manual = manual; + } + + public ListMatchesRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + @JsonIgnore + public Optional agent() { + return agent; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional year() { + return year; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional manual() { + return (Optional) manual; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListMatchesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListMatchesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListMatchesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListMatchesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListMatchesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListMatchesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListMatchesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListMatchesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListMatchesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListMatchesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListMatchesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListMatchesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListMatchesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListMatchesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListMatchesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListMatchesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListMatchesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListMatchesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListMatchesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListMatchesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListMatchesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListMatchesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public ListMatchesRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public ListMatchesRequest withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public ListMatchesRequest withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public ListMatchesRequest withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + + public ListMatchesRequest withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public ListMatchesRequest withAgent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + + public ListMatchesRequest withAgent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + public ListMatchesRequest withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public ListMatchesRequest withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public ListMatchesRequest withYear(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + + public ListMatchesRequest withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public ListMatchesRequest withManual(BoolInt manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = Optional.ofNullable(manual); + return this; + } + + + public ListMatchesRequest withManual(Optional manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = manual; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListMatchesRequest other = (ListMatchesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && + Utils.enhancedDeepEquals(this.agent, other.agent) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.year, other.year) && + Utils.enhancedDeepEquals(this.manual, other.manual); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + title, parentTitle, agent, + language, year, manual); + } + + @Override + public String toString() { + return Utils.toString(ListMatchesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "title", title, + "parentTitle", parentTitle, + "agent", agent, + "language", language, + "year", year, + "manual", manual); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional title = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional agent = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional manual = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + 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 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 agent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + public Builder agent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + 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 year(long 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 manual(BoolInt manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = Optional.ofNullable(manual); + return this; + } + + public Builder manual(Optional manual) { + Utils.checkNotNull(manual, "manual"); + this.manual = manual; + return this; + } + + public ListMatchesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListMatchesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + title, parentTitle, agent, + language, year, manual); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListMatchesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListMatchesRequestBuilder.java new file mode 100644 index 00000000..8298a2ad --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListMatchesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListMatches; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListMatchesRequestBuilder { + + private ListMatchesRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListMatchesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListMatchesRequestBuilder request(ListMatchesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListMatchesResponse call() throws Exception { + + RequestOperation operation + = new ListMatches.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListMatchesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListMatchesResponse.java new file mode 100644 index 00000000..b3a613e9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListMatchesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class ListMatchesResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public ListMatchesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public ListMatchesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListMatchesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListMatchesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListMatchesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListMatchesResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public ListMatchesResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListMatchesResponse other = (ListMatchesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(ListMatchesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public ListMatchesResponse build() { + + return new ListMatchesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListMomentsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListMomentsRequest.java new file mode 100644 index 00000000..b37f2f44 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListMomentsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ListMomentsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public ListMomentsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public ListMomentsRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListMomentsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListMomentsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListMomentsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListMomentsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListMomentsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListMomentsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListMomentsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListMomentsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListMomentsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListMomentsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListMomentsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListMomentsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListMomentsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListMomentsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListMomentsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListMomentsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListMomentsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListMomentsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListMomentsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListMomentsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListMomentsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListMomentsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public ListMomentsRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListMomentsRequest other = (ListMomentsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(ListMomentsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public ListMomentsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListMomentsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListMomentsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListMomentsRequestBuilder.java new file mode 100644 index 00000000..d7b2bc67 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListMomentsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListMoments; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListMomentsRequestBuilder { + + private ListMomentsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListMomentsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListMomentsRequestBuilder request(ListMomentsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListMomentsResponse call() throws Exception { + + RequestOperation operation + = new ListMoments.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListMomentsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListMomentsResponse.java new file mode 100644 index 00000000..c1a306c8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListMomentsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +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.Optional; + + +public class ListMomentsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithArtwork; + + @JsonCreator + public ListMomentsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithArtwork) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + } + + public ListMomentsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithArtwork() { + return (Optional) mediaContainerWithArtwork; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListMomentsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListMomentsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListMomentsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListMomentsResponse withMediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + + /** + * OK + */ + public ListMomentsResponse withMediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListMomentsResponse other = (ListMomentsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithArtwork, other.mediaContainerWithArtwork); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + @Override + public String toString() { + return Utils.toString(ListMomentsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithArtwork", mediaContainerWithArtwork); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithArtwork = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + public ListMomentsResponse build() { + + return new ListMomentsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaRequest.java new file mode 100644 index 00000000..e6fe4a7a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaRequest.java @@ -0,0 +1,779 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class ListPersonMediaRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=personId") + private String personId; + + @JsonCreator + public ListPersonMediaRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String personId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(personId, "personId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.personId = personId; + } + + public ListPersonMediaRequest( + String personId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), personId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor + */ + @JsonIgnore + public String personId() { + return personId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListPersonMediaRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListPersonMediaRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListPersonMediaRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListPersonMediaRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListPersonMediaRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListPersonMediaRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListPersonMediaRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListPersonMediaRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListPersonMediaRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListPersonMediaRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListPersonMediaRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListPersonMediaRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListPersonMediaRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListPersonMediaRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListPersonMediaRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListPersonMediaRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListPersonMediaRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListPersonMediaRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListPersonMediaRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListPersonMediaRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListPersonMediaRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListPersonMediaRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor + */ + public ListPersonMediaRequest withPersonId(String personId) { + Utils.checkNotNull(personId, "personId"); + this.personId = personId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPersonMediaRequest other = (ListPersonMediaRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.personId, other.personId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, personId); + } + + @Override + public String toString() { + return Utils.toString(ListPersonMediaRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "personId", personId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String personId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor + */ + public Builder personId(String personId) { + Utils.checkNotNull(personId, "personId"); + this.personId = personId; + return this; + } + + public ListPersonMediaRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListPersonMediaRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, personId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaRequestBuilder.java new file mode 100644 index 00000000..6c04c55d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListPersonMedia; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListPersonMediaRequestBuilder { + + private ListPersonMediaRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListPersonMediaRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListPersonMediaRequestBuilder request(ListPersonMediaRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListPersonMediaResponse call() throws Exception { + + RequestOperation operation + = new ListPersonMedia.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaResponse.java new file mode 100644 index 00000000..efd013e3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPersonMediaResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class ListPersonMediaResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public ListPersonMediaResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public ListPersonMediaResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListPersonMediaResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListPersonMediaResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListPersonMediaResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListPersonMediaResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public ListPersonMediaResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPersonMediaResponse other = (ListPersonMediaResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(ListPersonMediaResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public ListPersonMediaResponse build() { + + return new ListPersonMediaResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryMediaContainer.java new file mode 100644 index 00000000..f7b74048 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * ListPlaybackHistoryMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class ListPlaybackHistoryMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + @JsonCreator + public ListPlaybackHistoryMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(metadata, "metadata"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.metadata = metadata; + } + + public ListPlaybackHistoryMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadata() { + return (Optional>) metadata; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListPlaybackHistoryMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public ListPlaybackHistoryMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListPlaybackHistoryMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListPlaybackHistoryMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ListPlaybackHistoryMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public ListPlaybackHistoryMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListPlaybackHistoryMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListPlaybackHistoryMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public ListPlaybackHistoryMediaContainer withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + + public ListPlaybackHistoryMediaContainer 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; + } + ListPlaybackHistoryMediaContainer other = (ListPlaybackHistoryMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, metadata); + } + + @Override + public String toString() { + return Utils.toString(ListPlaybackHistoryMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "metadata", metadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + 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 ListPlaybackHistoryMediaContainer build() { + + return new ListPlaybackHistoryMediaContainer( + identifier, offset, size, + totalSize, metadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryMetadata.java new file mode 100644 index 00000000..a18c198f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryMetadata.java @@ -0,0 +1,738 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class ListPlaybackHistoryMetadata { + /** + * The account id of this playback + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("accountID") + private Optional accountID; + + /** + * The device id which played the item + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("deviceID") + private Optional deviceID; + + /** + * The key for this individual history item + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("historyKey") + private Optional historyKey; + + /** + * The metadata key for the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * The library section id containing the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + /** + * The originally available at of the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + /** + * The rating key for the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + /** + * The thumb of the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + /** + * The title of the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The metadata type of the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * The time when the item was played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedAt") + private Optional viewedAt; + + @JsonCreator + public ListPlaybackHistoryMetadata( + @JsonProperty("accountID") Optional accountID, + @JsonProperty("deviceID") Optional deviceID, + @JsonProperty("historyKey") Optional historyKey, + @JsonProperty("key") Optional key, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("viewedAt") Optional viewedAt) { + Utils.checkNotNull(accountID, "accountID"); + Utils.checkNotNull(deviceID, "deviceID"); + Utils.checkNotNull(historyKey, "historyKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(viewedAt, "viewedAt"); + this.accountID = accountID; + this.deviceID = deviceID; + this.historyKey = historyKey; + this.key = key; + this.librarySectionID = librarySectionID; + this.originallyAvailableAt = originallyAvailableAt; + this.ratingKey = ratingKey; + this.thumb = thumb; + this.title = title; + this.type = type; + this.viewedAt = viewedAt; + } + + public ListPlaybackHistoryMetadata() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * The account id of this playback + */ + @JsonIgnore + public Optional accountID() { + return accountID; + } + + /** + * The device id which played the item + */ + @JsonIgnore + public Optional deviceID() { + return deviceID; + } + + /** + * The key for this individual history item + */ + @JsonIgnore + public Optional historyKey() { + return historyKey; + } + + /** + * The metadata key for the item played + */ + @JsonIgnore + public Optional key() { + return key; + } + + /** + * The library section id containing the item played + */ + @JsonIgnore + public Optional librarySectionID() { + return librarySectionID; + } + + /** + * The originally available at of the item played + */ + @JsonIgnore + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + /** + * The rating key for the item played + */ + @JsonIgnore + public Optional ratingKey() { + return ratingKey; + } + + /** + * The thumb of the item played + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + + /** + * The title of the item played + */ + @JsonIgnore + public Optional title() { + return title; + } + + /** + * The metadata type of the item played + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * The time when the item was played + */ + @JsonIgnore + public Optional viewedAt() { + return viewedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The account id of this playback + */ + public ListPlaybackHistoryMetadata withAccountID(long accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = Optional.ofNullable(accountID); + return this; + } + + + /** + * The account id of this playback + */ + public ListPlaybackHistoryMetadata withAccountID(Optional accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = accountID; + return this; + } + + /** + * The device id which played the item + */ + public ListPlaybackHistoryMetadata withDeviceID(long deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = Optional.ofNullable(deviceID); + return this; + } + + + /** + * The device id which played the item + */ + public ListPlaybackHistoryMetadata withDeviceID(Optional deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = deviceID; + return this; + } + + /** + * The key for this individual history item + */ + public ListPlaybackHistoryMetadata withHistoryKey(String historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = Optional.ofNullable(historyKey); + return this; + } + + + /** + * The key for this individual history item + */ + public ListPlaybackHistoryMetadata withHistoryKey(Optional historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = historyKey; + return this; + } + + /** + * The metadata key for the item played + */ + public ListPlaybackHistoryMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The metadata key for the item played + */ + public ListPlaybackHistoryMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The library section id containing the item played + */ + public ListPlaybackHistoryMetadata withLibrarySectionID(String librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + + /** + * The library section id containing the item played + */ + public ListPlaybackHistoryMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The originally available at of the item played + */ + public ListPlaybackHistoryMetadata withOriginallyAvailableAt(String originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + + /** + * The originally available at of the item played + */ + public ListPlaybackHistoryMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + /** + * The rating key for the item played + */ + public ListPlaybackHistoryMetadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + /** + * The rating key for the item played + */ + public ListPlaybackHistoryMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The thumb of the item played + */ + public ListPlaybackHistoryMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * The thumb of the item played + */ + public ListPlaybackHistoryMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * The title of the item played + */ + public ListPlaybackHistoryMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the item played + */ + public ListPlaybackHistoryMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The metadata type of the item played + */ + public ListPlaybackHistoryMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The metadata type of the item played + */ + public ListPlaybackHistoryMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The time when the item was played + */ + public ListPlaybackHistoryMetadata withViewedAt(long viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = Optional.ofNullable(viewedAt); + return this; + } + + + /** + * The time when the item was played + */ + public ListPlaybackHistoryMetadata withViewedAt(Optional viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = viewedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPlaybackHistoryMetadata other = (ListPlaybackHistoryMetadata) o; + return + Utils.enhancedDeepEquals(this.accountID, other.accountID) && + Utils.enhancedDeepEquals(this.deviceID, other.deviceID) && + Utils.enhancedDeepEquals(this.historyKey, other.historyKey) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && + Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.viewedAt, other.viewedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accountID, deviceID, historyKey, + key, librarySectionID, originallyAvailableAt, + ratingKey, thumb, title, + type, viewedAt); + } + + @Override + public String toString() { + return Utils.toString(ListPlaybackHistoryMetadata.class, + "accountID", accountID, + "deviceID", deviceID, + "historyKey", historyKey, + "key", key, + "librarySectionID", librarySectionID, + "originallyAvailableAt", originallyAvailableAt, + "ratingKey", ratingKey, + "thumb", thumb, + "title", title, + "type", type, + "viewedAt", viewedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accountID = Optional.empty(); + + private Optional deviceID = Optional.empty(); + + private Optional historyKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional viewedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The account id of this playback + */ + public Builder accountID(long accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = Optional.ofNullable(accountID); + return this; + } + + /** + * The account id of this playback + */ + public Builder accountID(Optional accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = accountID; + return this; + } + + + /** + * The device id which played the item + */ + public Builder deviceID(long deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = Optional.ofNullable(deviceID); + return this; + } + + /** + * The device id which played the item + */ + public Builder deviceID(Optional deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = deviceID; + return this; + } + + + /** + * The key for this individual history item + */ + public Builder historyKey(String historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = Optional.ofNullable(historyKey); + return this; + } + + /** + * The key for this individual history item + */ + public Builder historyKey(Optional historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = historyKey; + return this; + } + + + /** + * The metadata key for the item played + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The metadata key for the item played + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * The library section id containing the item played + */ + public Builder librarySectionID(String librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The library section id containing the item played + */ + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + + /** + * The originally available at of the item played + */ + public Builder originallyAvailableAt(String originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * The originally available at of the item played + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + + /** + * The rating key for the item played + */ + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + /** + * The rating key for the item played + */ + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + + /** + * The thumb of the item played + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The thumb of the item played + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + /** + * The title of the item played + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the item played + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The metadata type of the item played + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The metadata type of the item played + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The time when the item was played + */ + public Builder viewedAt(long viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = Optional.ofNullable(viewedAt); + return this; + } + + /** + * The time when the item was played + */ + public Builder viewedAt(Optional viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = viewedAt; + return this; + } + + public ListPlaybackHistoryMetadata build() { + + return new ListPlaybackHistoryMetadata( + accountID, deviceID, historyKey, + key, librarySectionID, originallyAvailableAt, + ratingKey, thumb, title, + type, viewedAt); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryRequest.java new file mode 100644 index 00000000..79b18f07 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryRequest.java @@ -0,0 +1,1042 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class ListPlaybackHistoryRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The account id to restrict view history + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=accountID") + private Optional accountID; + + /** + * The time period to restrict history (typically of the form `viewedAt>=12456789`) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=viewedAt") + private Optional viewedAt; + + /** + * The library section id to restrict view history + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=librarySectionID") + private Optional librarySectionID; + + /** + * The metadata item to restrict view history (can provide the id for a show to see all of that show's view history). Note this is translated to `metadata_items.id`, `parents.id`, or `grandparents.id` internally depending on the metadata type. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=metadataItemID") + private Optional metadataItemID; + + /** + * The field on which to sort. Multiple orderings can be specified separated by `,` and the direction specified following a `:` (`desc` or `asc`; `asc` is assumed if not provided). Note `metadataItemID` may not be used here. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sort") + private Optional> sort; + + @JsonCreator + public ListPlaybackHistoryRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional accountID, + Optional viewedAt, + Optional librarySectionID, + Optional metadataItemID, + Optional> sort) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(accountID, "accountID"); + Utils.checkNotNull(viewedAt, "viewedAt"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(metadataItemID, "metadataItemID"); + Utils.checkNotNull(sort, "sort"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.accountID = accountID; + this.viewedAt = viewedAt; + this.librarySectionID = librarySectionID; + this.metadataItemID = metadataItemID; + this.sort = sort; + } + + public ListPlaybackHistoryRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The account id to restrict view history + */ + @JsonIgnore + public Optional accountID() { + return accountID; + } + + /** + * The time period to restrict history (typically of the form `viewedAt>=12456789`) + */ + @JsonIgnore + public Optional viewedAt() { + return viewedAt; + } + + /** + * The library section id to restrict view history + */ + @JsonIgnore + public Optional librarySectionID() { + return librarySectionID; + } + + /** + * The metadata item to restrict view history (can provide the id for a show to see all of that show's view history). Note this is translated to `metadata_items.id`, `parents.id`, or `grandparents.id` internally depending on the metadata type. + */ + @JsonIgnore + public Optional metadataItemID() { + return metadataItemID; + } + + /** + * The field on which to sort. Multiple orderings can be specified separated by `,` and the direction specified following a `:` (`desc` or `asc`; `asc` is assumed if not provided). Note `metadataItemID` may not be used here. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> sort() { + return (Optional>) sort; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListPlaybackHistoryRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListPlaybackHistoryRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListPlaybackHistoryRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListPlaybackHistoryRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListPlaybackHistoryRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListPlaybackHistoryRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListPlaybackHistoryRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListPlaybackHistoryRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListPlaybackHistoryRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListPlaybackHistoryRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListPlaybackHistoryRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListPlaybackHistoryRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListPlaybackHistoryRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListPlaybackHistoryRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListPlaybackHistoryRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListPlaybackHistoryRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListPlaybackHistoryRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListPlaybackHistoryRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListPlaybackHistoryRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListPlaybackHistoryRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListPlaybackHistoryRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListPlaybackHistoryRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The account id to restrict view history + */ + public ListPlaybackHistoryRequest withAccountID(long accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = Optional.ofNullable(accountID); + return this; + } + + + /** + * The account id to restrict view history + */ + public ListPlaybackHistoryRequest withAccountID(Optional accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = accountID; + return this; + } + + /** + * The time period to restrict history (typically of the form `viewedAt>=12456789`) + */ + public ListPlaybackHistoryRequest withViewedAt(long viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = Optional.ofNullable(viewedAt); + return this; + } + + + /** + * The time period to restrict history (typically of the form `viewedAt>=12456789`) + */ + public ListPlaybackHistoryRequest withViewedAt(Optional viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = viewedAt; + return this; + } + + /** + * The library section id to restrict view history + */ + public ListPlaybackHistoryRequest withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + + /** + * The library section id to restrict view history + */ + public ListPlaybackHistoryRequest withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The metadata item to restrict view history (can provide the id for a show to see all of that show's view history). Note this is translated to `metadata_items.id`, `parents.id`, or `grandparents.id` internally depending on the metadata type. + */ + public ListPlaybackHistoryRequest withMetadataItemID(long metadataItemID) { + Utils.checkNotNull(metadataItemID, "metadataItemID"); + this.metadataItemID = Optional.ofNullable(metadataItemID); + return this; + } + + + /** + * The metadata item to restrict view history (can provide the id for a show to see all of that show's view history). Note this is translated to `metadata_items.id`, `parents.id`, or `grandparents.id` internally depending on the metadata type. + */ + public ListPlaybackHistoryRequest withMetadataItemID(Optional metadataItemID) { + Utils.checkNotNull(metadataItemID, "metadataItemID"); + this.metadataItemID = metadataItemID; + return this; + } + + /** + * The field on which to sort. Multiple orderings can be specified separated by `,` and the direction specified following a `:` (`desc` or `asc`; `asc` is assumed if not provided). Note `metadataItemID` may not be used here. + */ + public ListPlaybackHistoryRequest withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + + /** + * The field on which to sort. Multiple orderings can be specified separated by `,` and the direction specified following a `:` (`desc` or `asc`; `asc` is assumed if not provided). Note `metadataItemID` may not be used here. + */ + public ListPlaybackHistoryRequest withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPlaybackHistoryRequest other = (ListPlaybackHistoryRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.accountID, other.accountID) && + Utils.enhancedDeepEquals(this.viewedAt, other.viewedAt) && + Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && + Utils.enhancedDeepEquals(this.metadataItemID, other.metadataItemID) && + Utils.enhancedDeepEquals(this.sort, other.sort); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, accountID, + viewedAt, librarySectionID, metadataItemID, + sort); + } + + @Override + public String toString() { + return Utils.toString(ListPlaybackHistoryRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "accountID", accountID, + "viewedAt", viewedAt, + "librarySectionID", librarySectionID, + "metadataItemID", metadataItemID, + "sort", sort); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional accountID = Optional.empty(); + + private Optional viewedAt = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional metadataItemID = Optional.empty(); + + private Optional> sort = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The account id to restrict view history + */ + public Builder accountID(long accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = Optional.ofNullable(accountID); + return this; + } + + /** + * The account id to restrict view history + */ + public Builder accountID(Optional accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = accountID; + return this; + } + + + /** + * The time period to restrict history (typically of the form `viewedAt>=12456789`) + */ + public Builder viewedAt(long viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = Optional.ofNullable(viewedAt); + return this; + } + + /** + * The time period to restrict history (typically of the form `viewedAt>=12456789`) + */ + public Builder viewedAt(Optional viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = viewedAt; + return this; + } + + + /** + * The library section id to restrict view history + */ + public Builder librarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The library section id to restrict view history + */ + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + + /** + * The metadata item to restrict view history (can provide the id for a show to see all of that show's view history). Note this is translated to `metadata_items.id`, `parents.id`, or `grandparents.id` internally depending on the metadata type. + */ + public Builder metadataItemID(long metadataItemID) { + Utils.checkNotNull(metadataItemID, "metadataItemID"); + this.metadataItemID = Optional.ofNullable(metadataItemID); + return this; + } + + /** + * The metadata item to restrict view history (can provide the id for a show to see all of that show's view history). Note this is translated to `metadata_items.id`, `parents.id`, or `grandparents.id` internally depending on the metadata type. + */ + public Builder metadataItemID(Optional metadataItemID) { + Utils.checkNotNull(metadataItemID, "metadataItemID"); + this.metadataItemID = metadataItemID; + return this; + } + + + /** + * The field on which to sort. Multiple orderings can be specified separated by `,` and the direction specified following a `:` (`desc` or `asc`; `asc` is assumed if not provided). Note `metadataItemID` may not be used here. + */ + public Builder sort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + /** + * The field on which to sort. Multiple orderings can be specified separated by `,` and the direction specified following a `:` (`desc` or `asc`; `asc` is assumed if not provided). Note `metadataItemID` may not be used here. + */ + public Builder sort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + public ListPlaybackHistoryRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListPlaybackHistoryRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, accountID, + viewedAt, librarySectionID, metadataItemID, + sort); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryRequestBuilder.java new file mode 100644 index 00000000..2244dece --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListPlaybackHistory; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListPlaybackHistoryRequestBuilder { + + private ListPlaybackHistoryRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListPlaybackHistoryRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListPlaybackHistoryRequestBuilder request(ListPlaybackHistoryRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListPlaybackHistoryResponse call() throws Exception { + + RequestOperation operation + = new ListPlaybackHistory.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryResponse.java new file mode 100644 index 00000000..fc0ad536 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class ListPlaybackHistoryResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ListPlaybackHistoryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ListPlaybackHistoryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListPlaybackHistoryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListPlaybackHistoryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListPlaybackHistoryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListPlaybackHistoryResponse withObject(ListPlaybackHistoryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListPlaybackHistoryResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListPlaybackHistoryResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPlaybackHistoryResponse other = (ListPlaybackHistoryResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ListPlaybackHistoryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ListPlaybackHistoryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListPlaybackHistoryResponse build() { + + return new ListPlaybackHistoryResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryResponseBody.java new file mode 100644 index 00000000..7094ca2f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaybackHistoryResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ListPlaybackHistoryResponseBody + * + *

OK + */ +public class ListPlaybackHistoryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ListPlaybackHistoryResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ListPlaybackHistoryResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListPlaybackHistoryResponseBody withMediaContainer(ListPlaybackHistoryMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ListPlaybackHistoryResponseBody 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; + } + ListPlaybackHistoryResponseBody other = (ListPlaybackHistoryResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ListPlaybackHistoryResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ListPlaybackHistoryMediaContainer 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 ListPlaybackHistoryResponseBody build() { + + return new ListPlaybackHistoryResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsRequest.java new file mode 100644 index 00000000..8877d2b6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsRequest.java @@ -0,0 +1,861 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +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.Optional; + + +public class ListPlaylistsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Limit to a type of playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playlistType") + private Optional playlistType; + + /** + * Whether this is a smart collection/playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=smart") + private Optional smart; + + @JsonCreator + public ListPlaylistsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional playlistType, + Optional smart) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistType, "playlistType"); + Utils.checkNotNull(smart, "smart"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistType = playlistType; + this.smart = smart; + } + + public ListPlaylistsRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Limit to a type of playlist + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional playlistType() { + return (Optional) playlistType; + } + + /** + * Whether this is a smart collection/playlist + */ + @JsonIgnore + public Optional smart() { + return smart; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListPlaylistsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListPlaylistsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListPlaylistsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListPlaylistsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListPlaylistsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListPlaylistsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListPlaylistsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListPlaylistsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListPlaylistsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListPlaylistsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListPlaylistsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListPlaylistsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListPlaylistsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListPlaylistsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListPlaylistsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListPlaylistsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListPlaylistsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListPlaylistsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListPlaylistsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListPlaylistsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListPlaylistsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListPlaylistsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Limit to a type of playlist + */ + public ListPlaylistsRequest withPlaylistType(PlaylistType playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + + /** + * Limit to a type of playlist + */ + public ListPlaylistsRequest withPlaylistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + /** + * Whether this is a smart collection/playlist + */ + public ListPlaylistsRequest withSmart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + + /** + * Whether this is a smart collection/playlist + */ + public ListPlaylistsRequest withSmart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPlaylistsRequest other = (ListPlaylistsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistType, other.playlistType) && + Utils.enhancedDeepEquals(this.smart, other.smart); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistType, + smart); + } + + @Override + public String toString() { + return Utils.toString(ListPlaylistsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistType", playlistType, + "smart", smart); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional playlistType = Optional.empty(); + + private Optional smart = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Limit to a type of playlist + */ + public Builder playlistType(PlaylistType playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + /** + * Limit to a type of playlist + */ + public Builder playlistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + + /** + * Whether this is a smart collection/playlist + */ + public Builder smart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + /** + * Whether this is a smart collection/playlist + */ + public Builder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + public ListPlaylistsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListPlaylistsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistType, + smart); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsRequestBuilder.java new file mode 100644 index 00000000..39e41050 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListPlaylists; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListPlaylistsRequestBuilder { + + private ListPlaylistsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListPlaylistsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListPlaylistsRequestBuilder request(ListPlaylistsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListPlaylistsResponse call() throws Exception { + + RequestOperation operation + = new ListPlaylists.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsResponse.java new file mode 100644 index 00000000..c7a65edb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListPlaylistsResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithPlaylistMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class ListPlaylistsResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + + private Map> headers; + + @JsonCreator + public ListPlaylistsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + this.headers = headers; + } + + public ListPlaylistsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListPlaylistsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListPlaylistsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListPlaylistsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListPlaylistsResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public ListPlaylistsResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public ListPlaylistsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPlaylistsResponse other = (ListPlaylistsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(ListPlaylistsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListPlaylistsResponse build() { + + return new ListPlaylistsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersMediaContainer.java new file mode 100644 index 00000000..0b7de218 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersMediaContainer.java @@ -0,0 +1,2707 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * ListProvidersMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class ListProvidersMediaContainer { + /** + * A unique identifier for the provider, e.g. `com.plexapp.plugins.library`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowCameraUpload") + private Optional allowCameraUpload; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowChannelAccess") + private Optional allowChannelAccess; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowMediaDeletion") + private Optional allowMediaDeletion; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSharing") + private Optional allowSharing; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowTuners") + private Optional allowTuners; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("backgroundProcessing") + private Optional backgroundProcessing; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("certificate") + private Optional certificate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("companionProxy") + private Optional companionProxy; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("countryCode") + private Optional countryCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("diagnostics") + private Optional diagnostics; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("eventStream") + private Optional eventStream; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("friendlyName") + private Optional friendlyName; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubSearch") + private Optional hubSearch; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("itemClusters") + private Optional itemClusters; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("livetv") + private Optional livetv; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("machineIdentifier") + private Optional machineIdentifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaProviders") + private Optional mediaProviders; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("multiuser") + private Optional multiuser; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("musicAnalysis") + private Optional musicAnalysis; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlex") + private Optional myPlex; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexMappingState") + private Optional myPlexMappingState; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexSigninState") + private Optional myPlexSigninState; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexSubscription") + private Optional myPlexSubscription; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexUsername") + private Optional myPlexUsername; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offlineTranscode") + private Optional offlineTranscode; + + /** + * A comma-separated list of features which are enabled for the server owner + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ownerFeatures") + private Optional ownerFeatures; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platform") + private Optional platform; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platformVersion") + private Optional platformVersion; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pluginHost") + private Optional pluginHost; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pushNotifications") + private Optional pushNotifications; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("readOnlyLibraries") + private Optional readOnlyLibraries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamingBrainABRVersion") + private Optional streamingBrainABRVersion; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamingBrainVersion") + private Optional streamingBrainVersion; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sync") + private Optional sync; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderActiveVideoSessions") + private Optional transcoderActiveVideoSessions; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderAudio") + private Optional transcoderAudio; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderLyrics") + private Optional transcoderLyrics; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderPhoto") + private Optional transcoderPhoto; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderSubtitles") + private Optional transcoderSubtitles; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideo") + private Optional transcoderVideo; + + /** + * The suggested video quality bitrates to present to the user + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideoBitrates") + private Optional transcoderVideoBitrates; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideoQualities") + private Optional transcoderVideoQualities; + + /** + * The suggested video resolutions to the above quality bitrates + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideoResolutions") + private Optional transcoderVideoResolutions; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updater") + private Optional updater; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("voiceSearch") + private Optional voiceSearch; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Feature") + private Optional> feature; + + /** + * A comma-separated list of default protocols for the provider, which can be: + * - `stream`: The provider allows streaming media directly from the provider (e.g. for Vimeo). - `download`: The provider allows downloading media for offline storage, sync, etc. (e.g. Podcasts). - `livetv`: The provider provides live content which is only available on a schedule basis. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("protocols") + private Optional protocols; + + /** + * The title of the provider. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * This attribute contains a comma-separated list of the media types exposed by the provider (e.g. `video, audio`). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("types") + private Optional types; + + @JsonCreator + public ListProvidersMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("allowCameraUpload") Optional allowCameraUpload, + @JsonProperty("allowChannelAccess") Optional allowChannelAccess, + @JsonProperty("allowMediaDeletion") Optional allowMediaDeletion, + @JsonProperty("allowSharing") Optional allowSharing, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("allowTuners") Optional allowTuners, + @JsonProperty("backgroundProcessing") Optional backgroundProcessing, + @JsonProperty("certificate") Optional certificate, + @JsonProperty("companionProxy") Optional companionProxy, + @JsonProperty("countryCode") Optional countryCode, + @JsonProperty("diagnostics") Optional diagnostics, + @JsonProperty("eventStream") Optional eventStream, + @JsonProperty("friendlyName") Optional friendlyName, + @JsonProperty("hubSearch") Optional hubSearch, + @JsonProperty("itemClusters") Optional itemClusters, + @JsonProperty("livetv") Optional livetv, + @JsonProperty("machineIdentifier") Optional machineIdentifier, + @JsonProperty("mediaProviders") Optional mediaProviders, + @JsonProperty("multiuser") Optional multiuser, + @JsonProperty("musicAnalysis") Optional musicAnalysis, + @JsonProperty("myPlex") Optional myPlex, + @JsonProperty("myPlexMappingState") Optional myPlexMappingState, + @JsonProperty("myPlexSigninState") Optional myPlexSigninState, + @JsonProperty("myPlexSubscription") Optional myPlexSubscription, + @JsonProperty("myPlexUsername") Optional myPlexUsername, + @JsonProperty("offlineTranscode") Optional offlineTranscode, + @JsonProperty("ownerFeatures") Optional ownerFeatures, + @JsonProperty("platform") Optional platform, + @JsonProperty("platformVersion") Optional platformVersion, + @JsonProperty("pluginHost") Optional pluginHost, + @JsonProperty("pushNotifications") Optional pushNotifications, + @JsonProperty("readOnlyLibraries") Optional readOnlyLibraries, + @JsonProperty("streamingBrainABRVersion") Optional streamingBrainABRVersion, + @JsonProperty("streamingBrainVersion") Optional streamingBrainVersion, + @JsonProperty("sync") Optional sync, + @JsonProperty("transcoderActiveVideoSessions") Optional transcoderActiveVideoSessions, + @JsonProperty("transcoderAudio") Optional transcoderAudio, + @JsonProperty("transcoderLyrics") Optional transcoderLyrics, + @JsonProperty("transcoderPhoto") Optional transcoderPhoto, + @JsonProperty("transcoderSubtitles") Optional transcoderSubtitles, + @JsonProperty("transcoderVideo") Optional transcoderVideo, + @JsonProperty("transcoderVideoBitrates") Optional transcoderVideoBitrates, + @JsonProperty("transcoderVideoQualities") Optional transcoderVideoQualities, + @JsonProperty("transcoderVideoResolutions") Optional transcoderVideoResolutions, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("updater") Optional updater, + @JsonProperty("version") Optional version, + @JsonProperty("voiceSearch") Optional voiceSearch, + @JsonProperty("Feature") Optional> feature, + @JsonProperty("protocols") Optional protocols, + @JsonProperty("title") Optional title, + @JsonProperty("types") Optional types) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + Utils.checkNotNull(allowSharing, "allowSharing"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(allowTuners, "allowTuners"); + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + Utils.checkNotNull(certificate, "certificate"); + Utils.checkNotNull(companionProxy, "companionProxy"); + Utils.checkNotNull(countryCode, "countryCode"); + Utils.checkNotNull(diagnostics, "diagnostics"); + Utils.checkNotNull(eventStream, "eventStream"); + Utils.checkNotNull(friendlyName, "friendlyName"); + Utils.checkNotNull(hubSearch, "hubSearch"); + Utils.checkNotNull(itemClusters, "itemClusters"); + Utils.checkNotNull(livetv, "livetv"); + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + Utils.checkNotNull(mediaProviders, "mediaProviders"); + Utils.checkNotNull(multiuser, "multiuser"); + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + Utils.checkNotNull(myPlex, "myPlex"); + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(pluginHost, "pluginHost"); + Utils.checkNotNull(pushNotifications, "pushNotifications"); + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + Utils.checkNotNull(sync, "sync"); + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(updater, "updater"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(voiceSearch, "voiceSearch"); + Utils.checkNotNull(feature, "feature"); + Utils.checkNotNull(protocols, "protocols"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(types, "types"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.allowCameraUpload = allowCameraUpload; + this.allowChannelAccess = allowChannelAccess; + this.allowMediaDeletion = allowMediaDeletion; + this.allowSharing = allowSharing; + this.allowSync = allowSync; + this.allowTuners = allowTuners; + this.backgroundProcessing = backgroundProcessing; + this.certificate = certificate; + this.companionProxy = companionProxy; + this.countryCode = countryCode; + this.diagnostics = diagnostics; + this.eventStream = eventStream; + this.friendlyName = friendlyName; + this.hubSearch = hubSearch; + this.itemClusters = itemClusters; + this.livetv = livetv; + this.machineIdentifier = machineIdentifier; + this.mediaProviders = mediaProviders; + this.multiuser = multiuser; + this.musicAnalysis = musicAnalysis; + this.myPlex = myPlex; + this.myPlexMappingState = myPlexMappingState; + this.myPlexSigninState = myPlexSigninState; + this.myPlexSubscription = myPlexSubscription; + this.myPlexUsername = myPlexUsername; + this.offlineTranscode = offlineTranscode; + this.ownerFeatures = ownerFeatures; + this.platform = platform; + this.platformVersion = platformVersion; + this.pluginHost = pluginHost; + this.pushNotifications = pushNotifications; + this.readOnlyLibraries = readOnlyLibraries; + this.streamingBrainABRVersion = streamingBrainABRVersion; + this.streamingBrainVersion = streamingBrainVersion; + this.sync = sync; + this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; + this.transcoderAudio = transcoderAudio; + this.transcoderLyrics = transcoderLyrics; + this.transcoderPhoto = transcoderPhoto; + this.transcoderSubtitles = transcoderSubtitles; + this.transcoderVideo = transcoderVideo; + this.transcoderVideoBitrates = transcoderVideoBitrates; + this.transcoderVideoQualities = transcoderVideoQualities; + this.transcoderVideoResolutions = transcoderVideoResolutions; + this.updatedAt = updatedAt; + this.updater = updater; + this.version = version; + this.voiceSearch = voiceSearch; + this.feature = feature; + this.protocols = protocols; + this.title = title; + this.types = types; + } + + public ListProvidersMediaContainer() { + 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(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * A unique identifier for the provider, e.g. `com.plexapp.plugins.library`. + */ + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @JsonIgnore + public Optional allowCameraUpload() { + return allowCameraUpload; + } + + @JsonIgnore + public Optional allowChannelAccess() { + return allowChannelAccess; + } + + @JsonIgnore + public Optional allowMediaDeletion() { + return allowMediaDeletion; + } + + @JsonIgnore + public Optional allowSharing() { + return allowSharing; + } + + @JsonIgnore + public Optional allowSync() { + return allowSync; + } + + @JsonIgnore + public Optional allowTuners() { + return allowTuners; + } + + @JsonIgnore + public Optional backgroundProcessing() { + return backgroundProcessing; + } + + @JsonIgnore + public Optional certificate() { + return certificate; + } + + @JsonIgnore + public Optional companionProxy() { + return companionProxy; + } + + @JsonIgnore + public Optional countryCode() { + return countryCode; + } + + @JsonIgnore + public Optional diagnostics() { + return diagnostics; + } + + @JsonIgnore + public Optional eventStream() { + return eventStream; + } + + @JsonIgnore + public Optional friendlyName() { + return friendlyName; + } + + @JsonIgnore + public Optional hubSearch() { + return hubSearch; + } + + @JsonIgnore + public Optional itemClusters() { + return itemClusters; + } + + @JsonIgnore + public Optional livetv() { + return livetv; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional machineIdentifier() { + return (Optional) machineIdentifier; + } + + @JsonIgnore + public Optional mediaProviders() { + return mediaProviders; + } + + @JsonIgnore + public Optional multiuser() { + return multiuser; + } + + @JsonIgnore + public Optional musicAnalysis() { + return musicAnalysis; + } + + @JsonIgnore + public Optional myPlex() { + return myPlex; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional myPlexMappingState() { + return (Optional) myPlexMappingState; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional myPlexSigninState() { + return (Optional) myPlexSigninState; + } + + @JsonIgnore + public Optional myPlexSubscription() { + return myPlexSubscription; + } + + @JsonIgnore + public Optional myPlexUsername() { + return myPlexUsername; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional offlineTranscode() { + return (Optional) offlineTranscode; + } + + /** + * A comma-separated list of features which are enabled for the server owner + */ + @JsonIgnore + public Optional ownerFeatures() { + return ownerFeatures; + } + + @JsonIgnore + public Optional platform() { + return platform; + } + + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + @JsonIgnore + public Optional pluginHost() { + return pluginHost; + } + + @JsonIgnore + public Optional pushNotifications() { + return pushNotifications; + } + + @JsonIgnore + public Optional readOnlyLibraries() { + return readOnlyLibraries; + } + + @JsonIgnore + public Optional streamingBrainABRVersion() { + return streamingBrainABRVersion; + } + + @JsonIgnore + public Optional streamingBrainVersion() { + return streamingBrainVersion; + } + + @JsonIgnore + public Optional sync() { + return sync; + } + + @JsonIgnore + public Optional transcoderActiveVideoSessions() { + return transcoderActiveVideoSessions; + } + + @JsonIgnore + public Optional transcoderAudio() { + return transcoderAudio; + } + + @JsonIgnore + public Optional transcoderLyrics() { + return transcoderLyrics; + } + + @JsonIgnore + public Optional transcoderPhoto() { + return transcoderPhoto; + } + + @JsonIgnore + public Optional transcoderSubtitles() { + return transcoderSubtitles; + } + + @JsonIgnore + public Optional transcoderVideo() { + return transcoderVideo; + } + + /** + * The suggested video quality bitrates to present to the user + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional transcoderVideoBitrates() { + return (Optional) transcoderVideoBitrates; + } + + @JsonIgnore + public Optional transcoderVideoQualities() { + return transcoderVideoQualities; + } + + /** + * The suggested video resolutions to the above quality bitrates + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional transcoderVideoResolutions() { + return (Optional) transcoderVideoResolutions; + } + + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + @JsonIgnore + public Optional updater() { + return updater; + } + + @JsonIgnore + public Optional version() { + return version; + } + + @JsonIgnore + public Optional voiceSearch() { + return voiceSearch; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> feature() { + return (Optional>) feature; + } + + /** + * A comma-separated list of default protocols for the provider, which can be: + * - `stream`: The provider allows streaming media directly from the provider (e.g. for Vimeo). - `download`: The provider allows downloading media for offline storage, sync, etc. (e.g. Podcasts). - `livetv`: The provider provides live content which is only available on a schedule basis. + */ + @JsonIgnore + public Optional protocols() { + return protocols; + } + + /** + * The title of the provider. + */ + @JsonIgnore + public Optional title() { + return title; + } + + /** + * This attribute contains a comma-separated list of the media types exposed by the provider (e.g. `video, audio`). + */ + @JsonIgnore + public Optional types() { + return types; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A unique identifier for the provider, e.g. `com.plexapp.plugins.library`. + */ + public ListProvidersMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + /** + * A unique identifier for the provider, e.g. `com.plexapp.plugins.library`. + */ + public ListProvidersMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListProvidersMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListProvidersMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ListProvidersMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public ListProvidersMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListProvidersMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListProvidersMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public ListProvidersMediaContainer withAllowCameraUpload(boolean allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); + return this; + } + + + public ListProvidersMediaContainer withAllowCameraUpload(Optional allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = allowCameraUpload; + return this; + } + + public ListProvidersMediaContainer withAllowChannelAccess(boolean allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = Optional.ofNullable(allowChannelAccess); + return this; + } + + + public ListProvidersMediaContainer withAllowChannelAccess(Optional allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = allowChannelAccess; + return this; + } + + public ListProvidersMediaContainer withAllowMediaDeletion(boolean allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = Optional.ofNullable(allowMediaDeletion); + return this; + } + + + public ListProvidersMediaContainer withAllowMediaDeletion(Optional allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = allowMediaDeletion; + return this; + } + + public ListProvidersMediaContainer withAllowSharing(boolean allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = Optional.ofNullable(allowSharing); + return this; + } + + + public ListProvidersMediaContainer withAllowSharing(Optional allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = allowSharing; + return this; + } + + public ListProvidersMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + + public ListProvidersMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public ListProvidersMediaContainer withAllowTuners(boolean allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = Optional.ofNullable(allowTuners); + return this; + } + + + public ListProvidersMediaContainer withAllowTuners(Optional allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = allowTuners; + return this; + } + + public ListProvidersMediaContainer withBackgroundProcessing(boolean backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = Optional.ofNullable(backgroundProcessing); + return this; + } + + + public ListProvidersMediaContainer withBackgroundProcessing(Optional backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = backgroundProcessing; + return this; + } + + public ListProvidersMediaContainer withCertificate(boolean certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = Optional.ofNullable(certificate); + return this; + } + + + public ListProvidersMediaContainer withCertificate(Optional certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = certificate; + return this; + } + + public ListProvidersMediaContainer withCompanionProxy(boolean companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = Optional.ofNullable(companionProxy); + return this; + } + + + public ListProvidersMediaContainer withCompanionProxy(Optional companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = companionProxy; + return this; + } + + public ListProvidersMediaContainer withCountryCode(String countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = Optional.ofNullable(countryCode); + return this; + } + + + public ListProvidersMediaContainer withCountryCode(Optional countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = countryCode; + return this; + } + + public ListProvidersMediaContainer withDiagnostics(String diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = Optional.ofNullable(diagnostics); + return this; + } + + + public ListProvidersMediaContainer withDiagnostics(Optional diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = diagnostics; + return this; + } + + public ListProvidersMediaContainer withEventStream(boolean eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = Optional.ofNullable(eventStream); + return this; + } + + + public ListProvidersMediaContainer withEventStream(Optional eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = eventStream; + return this; + } + + public ListProvidersMediaContainer withFriendlyName(String friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = Optional.ofNullable(friendlyName); + return this; + } + + + public ListProvidersMediaContainer withFriendlyName(Optional friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = friendlyName; + return this; + } + + public ListProvidersMediaContainer withHubSearch(boolean hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = Optional.ofNullable(hubSearch); + return this; + } + + + public ListProvidersMediaContainer withHubSearch(Optional hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = hubSearch; + return this; + } + + public ListProvidersMediaContainer withItemClusters(boolean itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = Optional.ofNullable(itemClusters); + return this; + } + + + public ListProvidersMediaContainer withItemClusters(Optional itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = itemClusters; + return this; + } + + public ListProvidersMediaContainer withLivetv(long livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = Optional.ofNullable(livetv); + return this; + } + + + public ListProvidersMediaContainer withLivetv(Optional livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = livetv; + return this; + } + + public ListProvidersMediaContainer withMachineIdentifier(Object machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + + public ListProvidersMediaContainer withMachineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public ListProvidersMediaContainer withMediaProviders(boolean mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = Optional.ofNullable(mediaProviders); + return this; + } + + + public ListProvidersMediaContainer withMediaProviders(Optional mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = mediaProviders; + return this; + } + + public ListProvidersMediaContainer withMultiuser(boolean multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = Optional.ofNullable(multiuser); + return this; + } + + + public ListProvidersMediaContainer withMultiuser(Optional multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = multiuser; + return this; + } + + public ListProvidersMediaContainer withMusicAnalysis(long musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = Optional.ofNullable(musicAnalysis); + return this; + } + + + public ListProvidersMediaContainer withMusicAnalysis(Optional musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = musicAnalysis; + return this; + } + + public ListProvidersMediaContainer withMyPlex(boolean myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = Optional.ofNullable(myPlex); + return this; + } + + + public ListProvidersMediaContainer withMyPlex(Optional myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = myPlex; + return this; + } + + public ListProvidersMediaContainer withMyPlexMappingState(Object myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = Optional.ofNullable(myPlexMappingState); + return this; + } + + + public ListProvidersMediaContainer withMyPlexMappingState(Optional myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = myPlexMappingState; + return this; + } + + public ListProvidersMediaContainer withMyPlexSigninState(Object myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = Optional.ofNullable(myPlexSigninState); + return this; + } + + + public ListProvidersMediaContainer withMyPlexSigninState(Optional myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = myPlexSigninState; + return this; + } + + public ListProvidersMediaContainer withMyPlexSubscription(boolean myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = Optional.ofNullable(myPlexSubscription); + return this; + } + + + public ListProvidersMediaContainer withMyPlexSubscription(Optional myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = myPlexSubscription; + return this; + } + + public ListProvidersMediaContainer withMyPlexUsername(String myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = Optional.ofNullable(myPlexUsername); + return this; + } + + + public ListProvidersMediaContainer withMyPlexUsername(Optional myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = myPlexUsername; + return this; + } + + public ListProvidersMediaContainer withOfflineTranscode(Object offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = Optional.ofNullable(offlineTranscode); + return this; + } + + + public ListProvidersMediaContainer withOfflineTranscode(Optional offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = offlineTranscode; + return this; + } + + /** + * A comma-separated list of features which are enabled for the server owner + */ + public ListProvidersMediaContainer withOwnerFeatures(String ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = Optional.ofNullable(ownerFeatures); + return this; + } + + + /** + * A comma-separated list of features which are enabled for the server owner + */ + public ListProvidersMediaContainer withOwnerFeatures(Optional ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = ownerFeatures; + return this; + } + + public ListProvidersMediaContainer withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + public ListProvidersMediaContainer withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + public ListProvidersMediaContainer withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + public ListProvidersMediaContainer withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + public ListProvidersMediaContainer withPluginHost(boolean pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = Optional.ofNullable(pluginHost); + return this; + } + + + public ListProvidersMediaContainer withPluginHost(Optional pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = pluginHost; + return this; + } + + public ListProvidersMediaContainer withPushNotifications(boolean pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = Optional.ofNullable(pushNotifications); + return this; + } + + + public ListProvidersMediaContainer withPushNotifications(Optional pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = pushNotifications; + return this; + } + + public ListProvidersMediaContainer withReadOnlyLibraries(boolean readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = Optional.ofNullable(readOnlyLibraries); + return this; + } + + + public ListProvidersMediaContainer withReadOnlyLibraries(Optional readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = readOnlyLibraries; + return this; + } + + public ListProvidersMediaContainer withStreamingBrainABRVersion(long streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = Optional.ofNullable(streamingBrainABRVersion); + return this; + } + + + public ListProvidersMediaContainer withStreamingBrainABRVersion(Optional streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = streamingBrainABRVersion; + return this; + } + + public ListProvidersMediaContainer withStreamingBrainVersion(long streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = Optional.ofNullable(streamingBrainVersion); + return this; + } + + + public ListProvidersMediaContainer withStreamingBrainVersion(Optional streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = streamingBrainVersion; + return this; + } + + public ListProvidersMediaContainer withSync(boolean sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = Optional.ofNullable(sync); + return this; + } + + + public ListProvidersMediaContainer withSync(Optional sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = sync; + return this; + } + + public ListProvidersMediaContainer withTranscoderActiveVideoSessions(long transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = Optional.ofNullable(transcoderActiveVideoSessions); + return this; + } + + + public ListProvidersMediaContainer withTranscoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; + return this; + } + + public ListProvidersMediaContainer withTranscoderAudio(boolean transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = Optional.ofNullable(transcoderAudio); + return this; + } + + + public ListProvidersMediaContainer withTranscoderAudio(Optional transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = transcoderAudio; + return this; + } + + public ListProvidersMediaContainer withTranscoderLyrics(boolean transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = Optional.ofNullable(transcoderLyrics); + return this; + } + + + public ListProvidersMediaContainer withTranscoderLyrics(Optional transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = transcoderLyrics; + return this; + } + + public ListProvidersMediaContainer withTranscoderPhoto(boolean transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = Optional.ofNullable(transcoderPhoto); + return this; + } + + + public ListProvidersMediaContainer withTranscoderPhoto(Optional transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = transcoderPhoto; + return this; + } + + public ListProvidersMediaContainer withTranscoderSubtitles(boolean transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = Optional.ofNullable(transcoderSubtitles); + return this; + } + + + public ListProvidersMediaContainer withTranscoderSubtitles(Optional transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = transcoderSubtitles; + return this; + } + + public ListProvidersMediaContainer withTranscoderVideo(boolean transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = Optional.ofNullable(transcoderVideo); + return this; + } + + + public ListProvidersMediaContainer withTranscoderVideo(Optional transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = transcoderVideo; + return this; + } + + /** + * The suggested video quality bitrates to present to the user + */ + public ListProvidersMediaContainer withTranscoderVideoBitrates(Object transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = Optional.ofNullable(transcoderVideoBitrates); + return this; + } + + + /** + * The suggested video quality bitrates to present to the user + */ + public ListProvidersMediaContainer withTranscoderVideoBitrates(Optional transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = transcoderVideoBitrates; + return this; + } + + public ListProvidersMediaContainer withTranscoderVideoQualities(String transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = Optional.ofNullable(transcoderVideoQualities); + return this; + } + + + public ListProvidersMediaContainer withTranscoderVideoQualities(Optional transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = transcoderVideoQualities; + return this; + } + + /** + * The suggested video resolutions to the above quality bitrates + */ + public ListProvidersMediaContainer withTranscoderVideoResolutions(Object transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = Optional.ofNullable(transcoderVideoResolutions); + return this; + } + + + /** + * The suggested video resolutions to the above quality bitrates + */ + public ListProvidersMediaContainer withTranscoderVideoResolutions(Optional transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = transcoderVideoResolutions; + return this; + } + + public ListProvidersMediaContainer withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + public ListProvidersMediaContainer withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public ListProvidersMediaContainer withUpdater(boolean updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = Optional.ofNullable(updater); + return this; + } + + + public ListProvidersMediaContainer withUpdater(Optional updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = updater; + return this; + } + + public ListProvidersMediaContainer withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + public ListProvidersMediaContainer withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public ListProvidersMediaContainer withVoiceSearch(boolean voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = Optional.ofNullable(voiceSearch); + return this; + } + + + public ListProvidersMediaContainer withVoiceSearch(Optional voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = voiceSearch; + return this; + } + + public ListProvidersMediaContainer withFeature(List feature) { + Utils.checkNotNull(feature, "feature"); + this.feature = Optional.ofNullable(feature); + return this; + } + + + public ListProvidersMediaContainer withFeature(Optional> feature) { + Utils.checkNotNull(feature, "feature"); + this.feature = feature; + return this; + } + + /** + * A comma-separated list of default protocols for the provider, which can be: + * - `stream`: The provider allows streaming media directly from the provider (e.g. for Vimeo). - `download`: The provider allows downloading media for offline storage, sync, etc. (e.g. Podcasts). - `livetv`: The provider provides live content which is only available on a schedule basis. + */ + public ListProvidersMediaContainer withProtocols(String protocols) { + Utils.checkNotNull(protocols, "protocols"); + this.protocols = Optional.ofNullable(protocols); + return this; + } + + + /** + * A comma-separated list of default protocols for the provider, which can be: + * - `stream`: The provider allows streaming media directly from the provider (e.g. for Vimeo). - `download`: The provider allows downloading media for offline storage, sync, etc. (e.g. Podcasts). - `livetv`: The provider provides live content which is only available on a schedule basis. + */ + public ListProvidersMediaContainer withProtocols(Optional protocols) { + Utils.checkNotNull(protocols, "protocols"); + this.protocols = protocols; + return this; + } + + /** + * The title of the provider. + */ + public ListProvidersMediaContainer withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the provider. + */ + public ListProvidersMediaContainer withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * This attribute contains a comma-separated list of the media types exposed by the provider (e.g. `video, audio`). + */ + public ListProvidersMediaContainer withTypes(String types) { + Utils.checkNotNull(types, "types"); + this.types = Optional.ofNullable(types); + return this; + } + + + /** + * This attribute contains a comma-separated list of the media types exposed by the provider (e.g. `video, audio`). + */ + public ListProvidersMediaContainer withTypes(Optional types) { + Utils.checkNotNull(types, "types"); + this.types = types; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListProvidersMediaContainer other = (ListProvidersMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.allowCameraUpload, other.allowCameraUpload) && + Utils.enhancedDeepEquals(this.allowChannelAccess, other.allowChannelAccess) && + Utils.enhancedDeepEquals(this.allowMediaDeletion, other.allowMediaDeletion) && + Utils.enhancedDeepEquals(this.allowSharing, other.allowSharing) && + Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && + Utils.enhancedDeepEquals(this.allowTuners, other.allowTuners) && + Utils.enhancedDeepEquals(this.backgroundProcessing, other.backgroundProcessing) && + Utils.enhancedDeepEquals(this.certificate, other.certificate) && + Utils.enhancedDeepEquals(this.companionProxy, other.companionProxy) && + Utils.enhancedDeepEquals(this.countryCode, other.countryCode) && + Utils.enhancedDeepEquals(this.diagnostics, other.diagnostics) && + Utils.enhancedDeepEquals(this.eventStream, other.eventStream) && + Utils.enhancedDeepEquals(this.friendlyName, other.friendlyName) && + Utils.enhancedDeepEquals(this.hubSearch, other.hubSearch) && + Utils.enhancedDeepEquals(this.itemClusters, other.itemClusters) && + Utils.enhancedDeepEquals(this.livetv, other.livetv) && + Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && + Utils.enhancedDeepEquals(this.mediaProviders, other.mediaProviders) && + Utils.enhancedDeepEquals(this.multiuser, other.multiuser) && + Utils.enhancedDeepEquals(this.musicAnalysis, other.musicAnalysis) && + Utils.enhancedDeepEquals(this.myPlex, other.myPlex) && + Utils.enhancedDeepEquals(this.myPlexMappingState, other.myPlexMappingState) && + Utils.enhancedDeepEquals(this.myPlexSigninState, other.myPlexSigninState) && + Utils.enhancedDeepEquals(this.myPlexSubscription, other.myPlexSubscription) && + Utils.enhancedDeepEquals(this.myPlexUsername, other.myPlexUsername) && + Utils.enhancedDeepEquals(this.offlineTranscode, other.offlineTranscode) && + Utils.enhancedDeepEquals(this.ownerFeatures, other.ownerFeatures) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.pluginHost, other.pluginHost) && + Utils.enhancedDeepEquals(this.pushNotifications, other.pushNotifications) && + Utils.enhancedDeepEquals(this.readOnlyLibraries, other.readOnlyLibraries) && + Utils.enhancedDeepEquals(this.streamingBrainABRVersion, other.streamingBrainABRVersion) && + Utils.enhancedDeepEquals(this.streamingBrainVersion, other.streamingBrainVersion) && + Utils.enhancedDeepEquals(this.sync, other.sync) && + Utils.enhancedDeepEquals(this.transcoderActiveVideoSessions, other.transcoderActiveVideoSessions) && + Utils.enhancedDeepEquals(this.transcoderAudio, other.transcoderAudio) && + Utils.enhancedDeepEquals(this.transcoderLyrics, other.transcoderLyrics) && + Utils.enhancedDeepEquals(this.transcoderPhoto, other.transcoderPhoto) && + Utils.enhancedDeepEquals(this.transcoderSubtitles, other.transcoderSubtitles) && + Utils.enhancedDeepEquals(this.transcoderVideo, other.transcoderVideo) && + Utils.enhancedDeepEquals(this.transcoderVideoBitrates, other.transcoderVideoBitrates) && + Utils.enhancedDeepEquals(this.transcoderVideoQualities, other.transcoderVideoQualities) && + Utils.enhancedDeepEquals(this.transcoderVideoResolutions, other.transcoderVideoResolutions) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.updater, other.updater) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.voiceSearch, other.voiceSearch) && + Utils.enhancedDeepEquals(this.feature, other.feature) && + Utils.enhancedDeepEquals(this.protocols, other.protocols) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.types, other.types); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, allowCameraUpload, allowChannelAccess, + allowMediaDeletion, allowSharing, allowSync, + allowTuners, backgroundProcessing, certificate, + companionProxy, countryCode, diagnostics, + eventStream, friendlyName, hubSearch, + itemClusters, livetv, machineIdentifier, + mediaProviders, multiuser, musicAnalysis, + myPlex, myPlexMappingState, myPlexSigninState, + myPlexSubscription, myPlexUsername, offlineTranscode, + ownerFeatures, platform, platformVersion, + pluginHost, pushNotifications, readOnlyLibraries, + streamingBrainABRVersion, streamingBrainVersion, sync, + transcoderActiveVideoSessions, transcoderAudio, transcoderLyrics, + transcoderPhoto, transcoderSubtitles, transcoderVideo, + transcoderVideoBitrates, transcoderVideoQualities, transcoderVideoResolutions, + updatedAt, updater, version, + voiceSearch, feature, protocols, + title, types); + } + + @Override + public String toString() { + return Utils.toString(ListProvidersMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "allowCameraUpload", allowCameraUpload, + "allowChannelAccess", allowChannelAccess, + "allowMediaDeletion", allowMediaDeletion, + "allowSharing", allowSharing, + "allowSync", allowSync, + "allowTuners", allowTuners, + "backgroundProcessing", backgroundProcessing, + "certificate", certificate, + "companionProxy", companionProxy, + "countryCode", countryCode, + "diagnostics", diagnostics, + "eventStream", eventStream, + "friendlyName", friendlyName, + "hubSearch", hubSearch, + "itemClusters", itemClusters, + "livetv", livetv, + "machineIdentifier", machineIdentifier, + "mediaProviders", mediaProviders, + "multiuser", multiuser, + "musicAnalysis", musicAnalysis, + "myPlex", myPlex, + "myPlexMappingState", myPlexMappingState, + "myPlexSigninState", myPlexSigninState, + "myPlexSubscription", myPlexSubscription, + "myPlexUsername", myPlexUsername, + "offlineTranscode", offlineTranscode, + "ownerFeatures", ownerFeatures, + "platform", platform, + "platformVersion", platformVersion, + "pluginHost", pluginHost, + "pushNotifications", pushNotifications, + "readOnlyLibraries", readOnlyLibraries, + "streamingBrainABRVersion", streamingBrainABRVersion, + "streamingBrainVersion", streamingBrainVersion, + "sync", sync, + "transcoderActiveVideoSessions", transcoderActiveVideoSessions, + "transcoderAudio", transcoderAudio, + "transcoderLyrics", transcoderLyrics, + "transcoderPhoto", transcoderPhoto, + "transcoderSubtitles", transcoderSubtitles, + "transcoderVideo", transcoderVideo, + "transcoderVideoBitrates", transcoderVideoBitrates, + "transcoderVideoQualities", transcoderVideoQualities, + "transcoderVideoResolutions", transcoderVideoResolutions, + "updatedAt", updatedAt, + "updater", updater, + "version", version, + "voiceSearch", voiceSearch, + "feature", feature, + "protocols", protocols, + "title", title, + "types", types); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional allowCameraUpload = Optional.empty(); + + private Optional allowChannelAccess = Optional.empty(); + + private Optional allowMediaDeletion = Optional.empty(); + + private Optional allowSharing = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional allowTuners = Optional.empty(); + + private Optional backgroundProcessing = Optional.empty(); + + private Optional certificate = Optional.empty(); + + private Optional companionProxy = Optional.empty(); + + private Optional countryCode = Optional.empty(); + + private Optional diagnostics = Optional.empty(); + + private Optional eventStream = Optional.empty(); + + private Optional friendlyName = Optional.empty(); + + private Optional hubSearch = Optional.empty(); + + private Optional itemClusters = Optional.empty(); + + private Optional livetv = Optional.empty(); + + private Optional machineIdentifier = Optional.empty(); + + private Optional mediaProviders = Optional.empty(); + + private Optional multiuser = Optional.empty(); + + private Optional musicAnalysis = Optional.empty(); + + private Optional myPlex = Optional.empty(); + + private Optional myPlexMappingState = Optional.empty(); + + private Optional myPlexSigninState = Optional.empty(); + + private Optional myPlexSubscription = Optional.empty(); + + private Optional myPlexUsername = Optional.empty(); + + private Optional offlineTranscode = Optional.empty(); + + private Optional ownerFeatures = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional pluginHost = Optional.empty(); + + private Optional pushNotifications = Optional.empty(); + + private Optional readOnlyLibraries = Optional.empty(); + + private Optional streamingBrainABRVersion = Optional.empty(); + + private Optional streamingBrainVersion = Optional.empty(); + + private Optional sync = Optional.empty(); + + private Optional transcoderActiveVideoSessions = Optional.empty(); + + private Optional transcoderAudio = Optional.empty(); + + private Optional transcoderLyrics = Optional.empty(); + + private Optional transcoderPhoto = Optional.empty(); + + private Optional transcoderSubtitles = Optional.empty(); + + private Optional transcoderVideo = Optional.empty(); + + private Optional transcoderVideoBitrates = Optional.empty(); + + private Optional transcoderVideoQualities = Optional.empty(); + + private Optional transcoderVideoResolutions = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional updater = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional voiceSearch = Optional.empty(); + + private Optional> feature = Optional.empty(); + + private Optional protocols = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional types = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * A unique identifier for the provider, e.g. `com.plexapp.plugins.library`. + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + /** + * A unique identifier for the provider, e.g. `com.plexapp.plugins.library`. + */ + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder allowCameraUpload(boolean allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); + return this; + } + + public Builder allowCameraUpload(Optional allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = allowCameraUpload; + return this; + } + + + public Builder allowChannelAccess(boolean allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = Optional.ofNullable(allowChannelAccess); + return this; + } + + public Builder allowChannelAccess(Optional allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = allowChannelAccess; + return this; + } + + + public Builder allowMediaDeletion(boolean allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = Optional.ofNullable(allowMediaDeletion); + return this; + } + + public Builder allowMediaDeletion(Optional allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = allowMediaDeletion; + return this; + } + + + public Builder allowSharing(boolean allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = Optional.ofNullable(allowSharing); + return this; + } + + public Builder allowSharing(Optional allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = allowSharing; + 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 allowTuners(boolean allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = Optional.ofNullable(allowTuners); + return this; + } + + public Builder allowTuners(Optional allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = allowTuners; + return this; + } + + + public Builder backgroundProcessing(boolean backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = Optional.ofNullable(backgroundProcessing); + return this; + } + + public Builder backgroundProcessing(Optional backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = backgroundProcessing; + return this; + } + + + public Builder certificate(boolean certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = Optional.ofNullable(certificate); + return this; + } + + public Builder certificate(Optional certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = certificate; + return this; + } + + + public Builder companionProxy(boolean companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = Optional.ofNullable(companionProxy); + return this; + } + + public Builder companionProxy(Optional companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = companionProxy; + return this; + } + + + public Builder countryCode(String countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = Optional.ofNullable(countryCode); + return this; + } + + public Builder countryCode(Optional countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = countryCode; + return this; + } + + + public Builder diagnostics(String diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = Optional.ofNullable(diagnostics); + return this; + } + + public Builder diagnostics(Optional diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = diagnostics; + return this; + } + + + public Builder eventStream(boolean eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = Optional.ofNullable(eventStream); + return this; + } + + public Builder eventStream(Optional eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = eventStream; + return this; + } + + + public Builder friendlyName(String friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = Optional.ofNullable(friendlyName); + return this; + } + + public Builder friendlyName(Optional friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = friendlyName; + return this; + } + + + public Builder hubSearch(boolean hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = Optional.ofNullable(hubSearch); + return this; + } + + public Builder hubSearch(Optional hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = hubSearch; + return this; + } + + + public Builder itemClusters(boolean itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = Optional.ofNullable(itemClusters); + return this; + } + + public Builder itemClusters(Optional itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = itemClusters; + return this; + } + + + public Builder livetv(long livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = Optional.ofNullable(livetv); + return this; + } + + public Builder livetv(Optional livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = livetv; + return this; + } + + + public Builder machineIdentifier(Object machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public Builder machineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + + public Builder mediaProviders(boolean mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = Optional.ofNullable(mediaProviders); + return this; + } + + public Builder mediaProviders(Optional mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = mediaProviders; + return this; + } + + + public Builder multiuser(boolean multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = Optional.ofNullable(multiuser); + return this; + } + + public Builder multiuser(Optional multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = multiuser; + return this; + } + + + public Builder musicAnalysis(long musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = Optional.ofNullable(musicAnalysis); + return this; + } + + public Builder musicAnalysis(Optional musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = musicAnalysis; + return this; + } + + + public Builder myPlex(boolean myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = Optional.ofNullable(myPlex); + return this; + } + + public Builder myPlex(Optional myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = myPlex; + return this; + } + + + public Builder myPlexMappingState(Object myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = Optional.ofNullable(myPlexMappingState); + return this; + } + + public Builder myPlexMappingState(Optional myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = myPlexMappingState; + return this; + } + + + public Builder myPlexSigninState(Object myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = Optional.ofNullable(myPlexSigninState); + return this; + } + + public Builder myPlexSigninState(Optional myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = myPlexSigninState; + return this; + } + + + public Builder myPlexSubscription(boolean myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = Optional.ofNullable(myPlexSubscription); + return this; + } + + public Builder myPlexSubscription(Optional myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = myPlexSubscription; + return this; + } + + + public Builder myPlexUsername(String myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = Optional.ofNullable(myPlexUsername); + return this; + } + + public Builder myPlexUsername(Optional myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = myPlexUsername; + return this; + } + + + public Builder offlineTranscode(Object offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = Optional.ofNullable(offlineTranscode); + return this; + } + + public Builder offlineTranscode(Optional offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = offlineTranscode; + return this; + } + + + /** + * A comma-separated list of features which are enabled for the server owner + */ + public Builder ownerFeatures(String ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = Optional.ofNullable(ownerFeatures); + return this; + } + + /** + * A comma-separated list of features which are enabled for the server owner + */ + public Builder ownerFeatures(Optional ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = ownerFeatures; + return this; + } + + + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + public Builder pluginHost(boolean pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = Optional.ofNullable(pluginHost); + return this; + } + + public Builder pluginHost(Optional pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = pluginHost; + return this; + } + + + public Builder pushNotifications(boolean pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = Optional.ofNullable(pushNotifications); + return this; + } + + public Builder pushNotifications(Optional pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = pushNotifications; + return this; + } + + + public Builder readOnlyLibraries(boolean readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = Optional.ofNullable(readOnlyLibraries); + return this; + } + + public Builder readOnlyLibraries(Optional readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = readOnlyLibraries; + return this; + } + + + public Builder streamingBrainABRVersion(long streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = Optional.ofNullable(streamingBrainABRVersion); + return this; + } + + public Builder streamingBrainABRVersion(Optional streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = streamingBrainABRVersion; + return this; + } + + + public Builder streamingBrainVersion(long streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = Optional.ofNullable(streamingBrainVersion); + return this; + } + + public Builder streamingBrainVersion(Optional streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = streamingBrainVersion; + return this; + } + + + public Builder sync(boolean sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = Optional.ofNullable(sync); + return this; + } + + public Builder sync(Optional sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = sync; + return this; + } + + + public Builder transcoderActiveVideoSessions(long transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = Optional.ofNullable(transcoderActiveVideoSessions); + return this; + } + + public Builder transcoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; + return this; + } + + + public Builder transcoderAudio(boolean transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = Optional.ofNullable(transcoderAudio); + return this; + } + + public Builder transcoderAudio(Optional transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = transcoderAudio; + return this; + } + + + public Builder transcoderLyrics(boolean transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = Optional.ofNullable(transcoderLyrics); + return this; + } + + public Builder transcoderLyrics(Optional transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = transcoderLyrics; + return this; + } + + + public Builder transcoderPhoto(boolean transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = Optional.ofNullable(transcoderPhoto); + return this; + } + + public Builder transcoderPhoto(Optional transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = transcoderPhoto; + return this; + } + + + public Builder transcoderSubtitles(boolean transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = Optional.ofNullable(transcoderSubtitles); + return this; + } + + public Builder transcoderSubtitles(Optional transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = transcoderSubtitles; + return this; + } + + + public Builder transcoderVideo(boolean transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = Optional.ofNullable(transcoderVideo); + return this; + } + + public Builder transcoderVideo(Optional transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = transcoderVideo; + return this; + } + + + /** + * The suggested video quality bitrates to present to the user + */ + public Builder transcoderVideoBitrates(Object transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = Optional.ofNullable(transcoderVideoBitrates); + return this; + } + + /** + * The suggested video quality bitrates to present to the user + */ + public Builder transcoderVideoBitrates(Optional transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = transcoderVideoBitrates; + return this; + } + + + public Builder transcoderVideoQualities(String transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = Optional.ofNullable(transcoderVideoQualities); + return this; + } + + public Builder transcoderVideoQualities(Optional transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = transcoderVideoQualities; + return this; + } + + + /** + * The suggested video resolutions to the above quality bitrates + */ + public Builder transcoderVideoResolutions(Object transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = Optional.ofNullable(transcoderVideoResolutions); + return this; + } + + /** + * The suggested video resolutions to the above quality bitrates + */ + public Builder transcoderVideoResolutions(Optional transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = transcoderVideoResolutions; + return this; + } + + + public Builder updatedAt(long 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 updater(boolean updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = Optional.ofNullable(updater); + return this; + } + + public Builder updater(Optional updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = updater; + return this; + } + + + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + public Builder voiceSearch(boolean voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = Optional.ofNullable(voiceSearch); + return this; + } + + public Builder voiceSearch(Optional voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = voiceSearch; + return this; + } + + + public Builder feature(List feature) { + Utils.checkNotNull(feature, "feature"); + this.feature = Optional.ofNullable(feature); + return this; + } + + public Builder feature(Optional> feature) { + Utils.checkNotNull(feature, "feature"); + this.feature = feature; + return this; + } + + + /** + * A comma-separated list of default protocols for the provider, which can be: + * - `stream`: The provider allows streaming media directly from the provider (e.g. for Vimeo). - `download`: The provider allows downloading media for offline storage, sync, etc. (e.g. Podcasts). - `livetv`: The provider provides live content which is only available on a schedule basis. + */ + public Builder protocols(String protocols) { + Utils.checkNotNull(protocols, "protocols"); + this.protocols = Optional.ofNullable(protocols); + return this; + } + + /** + * A comma-separated list of default protocols for the provider, which can be: + * - `stream`: The provider allows streaming media directly from the provider (e.g. for Vimeo). - `download`: The provider allows downloading media for offline storage, sync, etc. (e.g. Podcasts). - `livetv`: The provider provides live content which is only available on a schedule basis. + */ + public Builder protocols(Optional protocols) { + Utils.checkNotNull(protocols, "protocols"); + this.protocols = protocols; + return this; + } + + + /** + * The title of the provider. + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the provider. + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * This attribute contains a comma-separated list of the media types exposed by the provider (e.g. `video, audio`). + */ + public Builder types(String types) { + Utils.checkNotNull(types, "types"); + this.types = Optional.ofNullable(types); + return this; + } + + /** + * This attribute contains a comma-separated list of the media types exposed by the provider (e.g. `video, audio`). + */ + public Builder types(Optional types) { + Utils.checkNotNull(types, "types"); + this.types = types; + return this; + } + + public ListProvidersMediaContainer build() { + + return new ListProvidersMediaContainer( + identifier, offset, size, + totalSize, allowCameraUpload, allowChannelAccess, + allowMediaDeletion, allowSharing, allowSync, + allowTuners, backgroundProcessing, certificate, + companionProxy, countryCode, diagnostics, + eventStream, friendlyName, hubSearch, + itemClusters, livetv, machineIdentifier, + mediaProviders, multiuser, musicAnalysis, + myPlex, myPlexMappingState, myPlexSigninState, + myPlexSubscription, myPlexUsername, offlineTranscode, + ownerFeatures, platform, platformVersion, + pluginHost, pushNotifications, readOnlyLibraries, + streamingBrainABRVersion, streamingBrainVersion, sync, + transcoderActiveVideoSessions, transcoderAudio, transcoderLyrics, + transcoderPhoto, transcoderSubtitles, transcoderVideo, + transcoderVideoBitrates, transcoderVideoQualities, transcoderVideoResolutions, + updatedAt, updater, version, + voiceSearch, feature, protocols, + title, types); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersRequestBuilder.java new file mode 100644 index 00000000..221e72c0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListProviders; +import java.lang.Exception; + +public class ListProvidersRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ListProvidersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListProvidersResponse call() throws Exception { + + RequestlessOperation operation + = new ListProviders.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersResponse.java new file mode 100644 index 00000000..f03d3974 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class ListProvidersResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public ListProvidersResponse( + 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 ListProvidersResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListProvidersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListProvidersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListProvidersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListProvidersResponse withObject(ListProvidersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListProvidersResponse 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; + } + ListProvidersResponse other = (ListProvidersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ListProvidersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(ListProvidersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListProvidersResponse build() { + + return new ListProvidersResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersResponseBody.java new file mode 100644 index 00000000..3e6d05de --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListProvidersResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ListProvidersResponseBody + * + *

OK + */ +public class ListProvidersResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ListProvidersResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ListProvidersResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListProvidersResponseBody withMediaContainer(ListProvidersMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ListProvidersResponseBody 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; + } + ListProvidersResponseBody other = (ListProvidersResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ListProvidersResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ListProvidersMediaContainer 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 ListProvidersResponseBody build() { + + return new ListProvidersResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsMediaContainer.java new file mode 100644 index 00000000..7a18aec1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * ListSessionsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class ListSessionsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + @JsonCreator + public ListSessionsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(metadata, "metadata"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.metadata = metadata; + } + + public ListSessionsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadata() { + return (Optional>) metadata; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListSessionsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public ListSessionsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListSessionsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListSessionsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ListSessionsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public ListSessionsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListSessionsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListSessionsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public ListSessionsMediaContainer withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + + public ListSessionsMediaContainer 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; + } + ListSessionsMediaContainer other = (ListSessionsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, metadata); + } + + @Override + public String toString() { + return Utils.toString(ListSessionsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "metadata", metadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + 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 ListSessionsMediaContainer build() { + + return new ListSessionsMediaContainer( + identifier, offset, size, + totalSize, metadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsRequestBuilder.java new file mode 100644 index 00000000..dea97195 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListSessions; +import java.lang.Exception; + +public class ListSessionsRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ListSessionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListSessionsResponse call() throws Exception { + + RequestlessOperation operation + = new ListSessions.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsResponse.java new file mode 100644 index 00000000..de4111a6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class ListSessionsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ListSessionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ListSessionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListSessionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListSessionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListSessionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListSessionsResponse withObject(ListSessionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListSessionsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListSessionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListSessionsResponse other = (ListSessionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ListSessionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ListSessionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListSessionsResponse build() { + + return new ListSessionsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsResponseBody.java new file mode 100644 index 00000000..277815d6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListSessionsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ListSessionsResponseBody + * + *

OK + */ +public class ListSessionsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ListSessionsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ListSessionsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListSessionsResponseBody withMediaContainer(ListSessionsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ListSessionsResponseBody 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; + } + ListSessionsResponseBody other = (ListSessionsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ListSessionsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ListSessionsMediaContainer 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 ListSessionsResponseBody build() { + + return new ListSessionsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListSimilarRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListSimilarRequest.java new file mode 100644 index 00000000..87e6e5d8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListSimilarRequest.java @@ -0,0 +1,831 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ListSimilarRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + /** + * Limit results to count items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=count") + private Optional count; + + @JsonCreator + public ListSimilarRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional count) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(count, "count"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.count = count; + } + + public ListSimilarRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + /** + * Limit results to count items + */ + @JsonIgnore + public Optional count() { + return count; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListSimilarRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListSimilarRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListSimilarRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListSimilarRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListSimilarRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListSimilarRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListSimilarRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListSimilarRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListSimilarRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListSimilarRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListSimilarRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListSimilarRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListSimilarRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListSimilarRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListSimilarRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListSimilarRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListSimilarRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListSimilarRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListSimilarRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListSimilarRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListSimilarRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListSimilarRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public ListSimilarRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + /** + * Limit results to count items + */ + public ListSimilarRequest withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + /** + * Limit results to count items + */ + public ListSimilarRequest withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListSimilarRequest other = (ListSimilarRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.count, other.count); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + count); + } + + @Override + public String toString() { + return Utils.toString(ListSimilarRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "count", count); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional count = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + /** + * Limit results to count items + */ + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + /** + * Limit results to count items + */ + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + public ListSimilarRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListSimilarRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + count); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListSimilarRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListSimilarRequestBuilder.java new file mode 100644 index 00000000..62a3da8b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListSimilarRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListSimilar; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListSimilarRequestBuilder { + + private ListSimilarRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListSimilarRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListSimilarRequestBuilder request(ListSimilarRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListSimilarResponse call() throws Exception { + + RequestOperation operation + = new ListSimilar.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListSimilarResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListSimilarResponse.java new file mode 100644 index 00000000..57aadffa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListSimilarResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class ListSimilarResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public ListSimilarResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public ListSimilarResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListSimilarResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListSimilarResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListSimilarResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListSimilarResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public ListSimilarResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListSimilarResponse other = (ListSimilarResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(ListSimilarResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public ListSimilarResponse build() { + + return new ListSimilarResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarRequest.java new file mode 100644 index 00000000..b212f5cf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarRequest.java @@ -0,0 +1,944 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ListSonicallySimilarRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=excludeParentID") + private Optional excludeParentID; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=excludeGrandparentID") + private Optional excludeGrandparentID; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=maxDistance") + private Optional maxDistance; + + @JsonCreator + public ListSonicallySimilarRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional excludeParentID, + Optional excludeGrandparentID, + Optional limit, + Optional maxDistance) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(excludeParentID, "excludeParentID"); + Utils.checkNotNull(excludeGrandparentID, "excludeGrandparentID"); + Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(maxDistance, "maxDistance"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.excludeParentID = excludeParentID; + this.excludeGrandparentID = excludeGrandparentID; + this.limit = limit; + this.maxDistance = maxDistance; + } + + public ListSonicallySimilarRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @JsonIgnore + public Optional excludeParentID() { + return excludeParentID; + } + + @JsonIgnore + public Optional excludeGrandparentID() { + return excludeGrandparentID; + } + + @JsonIgnore + public Optional limit() { + return limit; + } + + @JsonIgnore + public Optional maxDistance() { + return maxDistance; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListSonicallySimilarRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListSonicallySimilarRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListSonicallySimilarRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListSonicallySimilarRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListSonicallySimilarRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListSonicallySimilarRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListSonicallySimilarRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListSonicallySimilarRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListSonicallySimilarRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListSonicallySimilarRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListSonicallySimilarRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListSonicallySimilarRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListSonicallySimilarRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListSonicallySimilarRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListSonicallySimilarRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListSonicallySimilarRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListSonicallySimilarRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListSonicallySimilarRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListSonicallySimilarRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListSonicallySimilarRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListSonicallySimilarRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListSonicallySimilarRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public ListSonicallySimilarRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public ListSonicallySimilarRequest withExcludeParentID(long excludeParentID) { + Utils.checkNotNull(excludeParentID, "excludeParentID"); + this.excludeParentID = Optional.ofNullable(excludeParentID); + return this; + } + + + public ListSonicallySimilarRequest withExcludeParentID(Optional excludeParentID) { + Utils.checkNotNull(excludeParentID, "excludeParentID"); + this.excludeParentID = excludeParentID; + return this; + } + + public ListSonicallySimilarRequest withExcludeGrandparentID(long excludeGrandparentID) { + Utils.checkNotNull(excludeGrandparentID, "excludeGrandparentID"); + this.excludeGrandparentID = Optional.ofNullable(excludeGrandparentID); + return this; + } + + + public ListSonicallySimilarRequest withExcludeGrandparentID(Optional excludeGrandparentID) { + Utils.checkNotNull(excludeGrandparentID, "excludeGrandparentID"); + this.excludeGrandparentID = excludeGrandparentID; + return this; + } + + public ListSonicallySimilarRequest withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + + public ListSonicallySimilarRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public ListSonicallySimilarRequest withMaxDistance(double maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = Optional.ofNullable(maxDistance); + return this; + } + + + public ListSonicallySimilarRequest withMaxDistance(Optional maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = maxDistance; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListSonicallySimilarRequest other = (ListSonicallySimilarRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.excludeParentID, other.excludeParentID) && + Utils.enhancedDeepEquals(this.excludeGrandparentID, other.excludeGrandparentID) && + Utils.enhancedDeepEquals(this.limit, other.limit) && + Utils.enhancedDeepEquals(this.maxDistance, other.maxDistance); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + excludeParentID, excludeGrandparentID, limit, + maxDistance); + } + + @Override + public String toString() { + return Utils.toString(ListSonicallySimilarRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "excludeParentID", excludeParentID, + "excludeGrandparentID", excludeGrandparentID, + "limit", limit, + "maxDistance", maxDistance); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional excludeParentID = Optional.empty(); + + private Optional excludeGrandparentID = Optional.empty(); + + private Optional limit = Optional.empty(); + + private Optional maxDistance = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder excludeParentID(long excludeParentID) { + Utils.checkNotNull(excludeParentID, "excludeParentID"); + this.excludeParentID = Optional.ofNullable(excludeParentID); + return this; + } + + public Builder excludeParentID(Optional excludeParentID) { + Utils.checkNotNull(excludeParentID, "excludeParentID"); + this.excludeParentID = excludeParentID; + return this; + } + + + public Builder excludeGrandparentID(long excludeGrandparentID) { + Utils.checkNotNull(excludeGrandparentID, "excludeGrandparentID"); + this.excludeGrandparentID = Optional.ofNullable(excludeGrandparentID); + return this; + } + + public Builder excludeGrandparentID(Optional excludeGrandparentID) { + Utils.checkNotNull(excludeGrandparentID, "excludeGrandparentID"); + this.excludeGrandparentID = excludeGrandparentID; + return this; + } + + + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + + public Builder maxDistance(double maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = Optional.ofNullable(maxDistance); + return this; + } + + public Builder maxDistance(Optional maxDistance) { + Utils.checkNotNull(maxDistance, "maxDistance"); + this.maxDistance = maxDistance; + return this; + } + + public ListSonicallySimilarRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListSonicallySimilarRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + excludeParentID, excludeGrandparentID, limit, + maxDistance); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarRequestBuilder.java new file mode 100644 index 00000000..d9e295a6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListSonicallySimilar; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListSonicallySimilarRequestBuilder { + + private ListSonicallySimilarRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListSonicallySimilarRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListSonicallySimilarRequestBuilder request(ListSonicallySimilarRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListSonicallySimilarResponse call() throws Exception { + + RequestOperation operation + = new ListSonicallySimilar.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarResponse.java new file mode 100644 index 00000000..be0e653d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListSonicallySimilarResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class ListSonicallySimilarResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public ListSonicallySimilarResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public ListSonicallySimilarResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListSonicallySimilarResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListSonicallySimilarResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListSonicallySimilarResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListSonicallySimilarResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public ListSonicallySimilarResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListSonicallySimilarResponse other = (ListSonicallySimilarResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(ListSonicallySimilarResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public ListSonicallySimilarResponse build() { + + return new ListSonicallySimilarResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersMediaContainer.java new file mode 100644 index 00000000..5c03c4b1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * ListTopUsersMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class ListTopUsersMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Account") + private Optional> account; + + @JsonCreator + public ListTopUsersMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Account") Optional> account) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(account, "account"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.account = account; + } + + public ListTopUsersMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> account() { + return (Optional>) account; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListTopUsersMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public ListTopUsersMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListTopUsersMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ListTopUsersMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ListTopUsersMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public ListTopUsersMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListTopUsersMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ListTopUsersMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public ListTopUsersMediaContainer withAccount(List account) { + Utils.checkNotNull(account, "account"); + this.account = Optional.ofNullable(account); + return this; + } + + + public ListTopUsersMediaContainer withAccount(Optional> account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListTopUsersMediaContainer other = (ListTopUsersMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.account, other.account); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, account); + } + + @Override + public String toString() { + return Utils.toString(ListTopUsersMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "account", account); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> account = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder account(List account) { + Utils.checkNotNull(account, "account"); + this.account = Optional.ofNullable(account); + return this; + } + + public Builder account(Optional> account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + public ListTopUsersMediaContainer build() { + + return new ListTopUsersMediaContainer( + identifier, offset, size, + totalSize, account); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersRequest.java new file mode 100644 index 00000000..a1a8992c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersRequest.java @@ -0,0 +1,768 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class ListTopUsersRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + @JsonCreator + public ListTopUsersRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + } + + public ListTopUsersRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListTopUsersRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ListTopUsersRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ListTopUsersRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ListTopUsersRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ListTopUsersRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ListTopUsersRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ListTopUsersRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ListTopUsersRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ListTopUsersRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ListTopUsersRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ListTopUsersRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ListTopUsersRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ListTopUsersRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ListTopUsersRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ListTopUsersRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ListTopUsersRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ListTopUsersRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ListTopUsersRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ListTopUsersRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ListTopUsersRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ListTopUsersRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ListTopUsersRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public ListTopUsersRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListTopUsersRequest other = (ListTopUsersRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + @Override + public String toString() { + return Utils.toString(ListTopUsersRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public ListTopUsersRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ListTopUsersRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersRequestBuilder.java new file mode 100644 index 00000000..c0a0c530 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListTopUsers; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ListTopUsersRequestBuilder { + + private ListTopUsersRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListTopUsersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListTopUsersRequestBuilder request(ListTopUsersRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListTopUsersResponse call() throws Exception { + + RequestOperation operation + = new ListTopUsers.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersResponse.java new file mode 100644 index 00000000..d2f713a3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class ListTopUsersResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public ListTopUsersResponse( + 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 ListTopUsersResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListTopUsersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListTopUsersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListTopUsersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListTopUsersResponse withObject(ListTopUsersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListTopUsersResponse 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; + } + ListTopUsersResponse other = (ListTopUsersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ListTopUsersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(ListTopUsersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListTopUsersResponse build() { + + return new ListTopUsersResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersResponseBody.java new file mode 100644 index 00000000..6dd9185e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ListTopUsersResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ListTopUsersResponseBody + * + *

OK + */ +public class ListTopUsersResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ListTopUsersResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ListTopUsersResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ListTopUsersResponseBody withMediaContainer(ListTopUsersMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ListTopUsersResponseBody 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; + } + ListTopUsersResponseBody other = (ListTopUsersResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ListTopUsersResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ListTopUsersMediaContainer 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 ListTopUsersResponseBody build() { + + return new ListTopUsersResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Location.java b/src/main/java/dev/plexapi/sdk/models/operations/Location.java index c32854b0..dc1bb63c 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Location.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Location.java @@ -3,92 +3,39 @@ */ 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 com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * Location * - *

The folder path for the media item. + *

Network type of the client, can be used to help determine target bitrate. */ -public class Location { +public enum Location { + LAN("lan"), + WAN("wan"), + CELLULAR("cellular"); - @JsonProperty("path") - private String path; + @JsonValue + private final String value; - @JsonCreator - public Location( - @JsonProperty("path") String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - } - - @JsonIgnore - public String path() { - return path; - } - - public static Builder builder() { - return new Builder(); - } - - - public Location withPath(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Location other = (Location) o; - return - Utils.enhancedDeepEquals(this.path, other.path); + Location(String value) { + this.value = value; } - @Override - public int hashCode() { - return Utils.enhancedHash( - path); + public String value() { + return value; } - @Override - public String toString() { - return Utils.toString(Location.class, - "path", path); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String path; - - private Builder() { - // force use of static builder() method + public static Optional fromValue(String value) { + for (Location o: Location.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } } - - - public Builder path(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - return this; - } - - public Location build() { - - return new Location( - path); - } - + return Optional.empty(); } } + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/LogLineRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/LogLineRequest.java deleted file mode 100644 index c43549f3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/LogLineRequest.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class LogLineRequest { - /** - * An integer log level to write to the PMS log with. - * 0: Error - * 1: Warning - * 2: Info - * 3: Debug - * 4: Verbose - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=level") - private Level level; - - /** - * The text of the message to write to the log. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=message") - private String message; - - /** - * a string indicating the source of the message. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=source") - private String source; - - @JsonCreator - public LogLineRequest( - Level level, - String message, - String source) { - Utils.checkNotNull(level, "level"); - Utils.checkNotNull(message, "message"); - Utils.checkNotNull(source, "source"); - this.level = level; - this.message = message; - this.source = source; - } - - /** - * An integer log level to write to the PMS log with. - * 0: Error - * 1: Warning - * 2: Info - * 3: Debug - * 4: Verbose - */ - @JsonIgnore - public Level level() { - return level; - } - - /** - * The text of the message to write to the log. - */ - @JsonIgnore - public String message() { - return message; - } - - /** - * a string indicating the source of the message. - */ - @JsonIgnore - public String source() { - return source; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * An integer log level to write to the PMS log with. - * 0: Error - * 1: Warning - * 2: Info - * 3: Debug - * 4: Verbose - */ - public LogLineRequest withLevel(Level level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - /** - * The text of the message to write to the log. - */ - public LogLineRequest withMessage(String message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - /** - * a string indicating the source of the message. - */ - public LogLineRequest withSource(String source) { - Utils.checkNotNull(source, "source"); - this.source = source; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogLineRequest other = (LogLineRequest) o; - return - Utils.enhancedDeepEquals(this.level, other.level) && - Utils.enhancedDeepEquals(this.message, other.message) && - Utils.enhancedDeepEquals(this.source, other.source); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - level, message, source); - } - - @Override - public String toString() { - return Utils.toString(LogLineRequest.class, - "level", level, - "message", message, - "source", source); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Level level; - - private String message; - - private String source; - - private Builder() { - // force use of static builder() method - } - - - /** - * An integer log level to write to the PMS log with. - * 0: Error - * 1: Warning - * 2: Info - * 3: Debug - * 4: Verbose - */ - public Builder level(Level level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - - /** - * The text of the message to write to the log. - */ - public Builder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - - /** - * a string indicating the source of the message. - */ - public Builder source(String source) { - Utils.checkNotNull(source, "source"); - this.source = source; - return this; - } - - public LogLineRequest build() { - - return new LogLineRequest( - level, message, source); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/LogLineRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/LogLineRequestBuilder.java deleted file mode 100644 index e1b898df..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/LogLineRequestBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.LogLine; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; - -public class LogLineRequestBuilder { - - private Level level; - private String message; - private String source; - private final SDKConfiguration sdkConfiguration; - - public LogLineRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public LogLineRequestBuilder level(Level level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - public LogLineRequestBuilder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public LogLineRequestBuilder source(String source) { - Utils.checkNotNull(source, "source"); - this.source = source; - return this; - } - - - private LogLineRequest buildRequest() { - - LogLineRequest request = new LogLineRequest(level, - message, - source); - - return request; - } - - public LogLineResponse call() throws Exception { - - RequestOperation operation - = new LogLine.Sync(sdkConfiguration); - LogLineRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/LogLineResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/LogLineResponse.java deleted file mode 100644 index b14ee54b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/LogLineResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class LogLineResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public LogLineResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public LogLineResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public LogLineResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogLineResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogLineResponse other = (LogLineResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogLineResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogLineResponse build() { - - return new LogLineResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/LogMultiLineRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/LogMultiLineRequestBuilder.java deleted file mode 100644 index 1ab3ae04..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/LogMultiLineRequestBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.LogMultiLine; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; - -public class LogMultiLineRequestBuilder { - - private String request; - private final SDKConfiguration sdkConfiguration; - - public LogMultiLineRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public LogMultiLineRequestBuilder request(String request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public LogMultiLineResponse call() throws Exception { - - RequestOperation operation - = new LogMultiLine.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/LogMultiLineResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/LogMultiLineResponse.java deleted file mode 100644 index ae40fdfd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/LogMultiLineResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class LogMultiLineResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public LogMultiLineResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public LogMultiLineResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public LogMultiLineResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogMultiLineResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogMultiLineResponse other = (LogMultiLineResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogMultiLineResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogMultiLineResponse build() { - - return new LogMultiLineResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MailingListStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/MailingListStatus.java deleted file mode 100644 index ce14d662..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/MailingListStatus.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

Your current mailing list status (active or unsubscribed) - */ -@JsonDeserialize(using = MailingListStatus._Deserializer.class) -@JsonSerialize(using = MailingListStatus._Serializer.class) -public class MailingListStatus { - - public static final MailingListStatus ACTIVE = new MailingListStatus("active"); - public static final MailingListStatus UNSUBSCRIBED = new MailingListStatus("unsubscribed"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private MailingListStatus(String value) { - this.value = value; - } - - /** - * Returns a MailingListStatus with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as MailingListStatus - */ - public static MailingListStatus of(String value) { - synchronized (MailingListStatus.class) { - return values.computeIfAbsent(value, v -> new MailingListStatus(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - MailingListStatus other = (MailingListStatus) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "MailingListStatus [value=" + value + "]"; - } - - // return an array just like an enum - public static MailingListStatus[] values() { - synchronized (MailingListStatus.class) { - return values.values().toArray(new MailingListStatus[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("active", ACTIVE); - map.put("unsubscribed", UNSUBSCRIBED); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("active", MailingListStatusEnum.ACTIVE); - map.put("unsubscribed", MailingListStatusEnum.UNSUBSCRIBED); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(MailingListStatus.class); - } - - @Override - public void serialize(MailingListStatus value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(MailingListStatus.class); - } - - @Override - public MailingListStatus deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return MailingListStatus.of(v); - } - } - - public enum MailingListStatusEnum { - - ACTIVE("active"), - UNSUBSCRIBED("unsubscribed"),; - - private final String value; - - private MailingListStatusEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionRequest.java new file mode 100644 index 00000000..3de04c6c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionRequest.java @@ -0,0 +1,2595 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.AdvancedSubtitles; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.models.shared.TranscodeType; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class MakeDecisionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Type of transcode media + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transcodeType") + private TranscodeType transcodeType; + + /** + * Transcode session UUID + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=transcodeSessionId") + private Optional transcodeSessionId; + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=advancedSubtitles") + private Optional advancedSubtitles; + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioBoost") + private Optional audioBoost; + + /** + * Target video number of audio channels. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioChannelCount") + private Optional audioChannelCount; + + /** + * Indicates the client supports ABR. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustQuality") + private Optional autoAdjustQuality; + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustSubtitle") + private Optional autoAdjustSubtitle; + + /** + * Indicates the client supports direct playing the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directPlay") + private Optional directPlay; + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directStream") + private Optional directStream; + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directStreamAudio") + private Optional directStreamAudio; + + /** + * Indicates if resolution should be adjusted for orientation. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=disableResolutionRotation") + private Optional disableResolutionRotation; + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=hasMDE") + private Optional hasMDE; + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=location") + private Optional location; + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaBufferSize") + private Optional mediaBufferSize; + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaIndex") + private Optional mediaIndex; + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=musicBitrate") + private Optional musicBitrate; + + /** + * Offset from the start of the media (in seconds). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset") + private Optional offset; + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=partIndex") + private Optional partIndex; + + /** + * Internal PMS path of the media to transcode. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=path") + private Optional path; + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=peakBitrate") + private Optional peakBitrate; + + /** + * Target photo resolution. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=photoResolution") + private Optional photoResolution; + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=protocol") + private Optional protocol; + + /** + * Number of seconds to include in each transcoded segment + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=secondsPerSegment") + private Optional secondsPerSegment; + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitleSize") + private Optional subtitleSize; + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitles") + private Optional subtitles; + + /** + * Target video bitrate (in kbps). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoBitrate") + private Optional videoBitrate; + + /** + * Target photo quality. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoQuality") + private Optional videoQuality; + + /** + * Target maximum video resolution. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoResolution") + private Optional videoResolution; + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Profile-Extra") + private Optional xPlexClientProfileExtra; + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Profile-Name") + private Optional xPlexClientProfileName; + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Session-Identifier") + private Optional xPlexSessionIdentifier; + + @JsonCreator + public MakeDecisionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + TranscodeType transcodeType, + Optional transcodeSessionId, + Optional advancedSubtitles, + Optional audioBoost, + Optional audioChannelCount, + Optional autoAdjustQuality, + Optional autoAdjustSubtitle, + Optional directPlay, + Optional directStream, + Optional directStreamAudio, + Optional disableResolutionRotation, + Optional hasMDE, + Optional location, + Optional mediaBufferSize, + Optional mediaIndex, + Optional musicBitrate, + Optional offset, + Optional partIndex, + Optional path, + Optional peakBitrate, + Optional photoResolution, + Optional protocol, + Optional secondsPerSegment, + Optional subtitleSize, + Optional subtitles, + Optional videoBitrate, + Optional videoQuality, + Optional videoResolution, + Optional xPlexClientProfileExtra, + Optional xPlexClientProfileName, + Optional xPlexSessionIdentifier) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(transcodeType, "transcodeType"); + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + Utils.checkNotNull(audioBoost, "audioBoost"); + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + Utils.checkNotNull(directPlay, "directPlay"); + Utils.checkNotNull(directStream, "directStream"); + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + Utils.checkNotNull(hasMDE, "hasMDE"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + Utils.checkNotNull(mediaIndex, "mediaIndex"); + Utils.checkNotNull(musicBitrate, "musicBitrate"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(partIndex, "partIndex"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(peakBitrate, "peakBitrate"); + Utils.checkNotNull(photoResolution, "photoResolution"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + Utils.checkNotNull(subtitleSize, "subtitleSize"); + Utils.checkNotNull(subtitles, "subtitles"); + Utils.checkNotNull(videoBitrate, "videoBitrate"); + Utils.checkNotNull(videoQuality, "videoQuality"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.transcodeType = transcodeType; + this.transcodeSessionId = transcodeSessionId; + this.advancedSubtitles = advancedSubtitles; + this.audioBoost = audioBoost; + this.audioChannelCount = audioChannelCount; + this.autoAdjustQuality = autoAdjustQuality; + this.autoAdjustSubtitle = autoAdjustSubtitle; + this.directPlay = directPlay; + this.directStream = directStream; + this.directStreamAudio = directStreamAudio; + this.disableResolutionRotation = disableResolutionRotation; + this.hasMDE = hasMDE; + this.location = location; + this.mediaBufferSize = mediaBufferSize; + this.mediaIndex = mediaIndex; + this.musicBitrate = musicBitrate; + this.offset = offset; + this.partIndex = partIndex; + this.path = path; + this.peakBitrate = peakBitrate; + this.photoResolution = photoResolution; + this.protocol = protocol; + this.secondsPerSegment = secondsPerSegment; + this.subtitleSize = subtitleSize; + this.subtitles = subtitles; + this.videoBitrate = videoBitrate; + this.videoQuality = videoQuality; + this.videoResolution = videoResolution; + this.xPlexClientProfileExtra = xPlexClientProfileExtra; + this.xPlexClientProfileName = xPlexClientProfileName; + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + } + + public MakeDecisionRequest( + TranscodeType transcodeType) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), transcodeType, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Type of transcode media + */ + @JsonIgnore + public TranscodeType transcodeType() { + return transcodeType; + } + + /** + * Transcode session UUID + */ + @JsonIgnore + public Optional transcodeSessionId() { + return transcodeSessionId; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional advancedSubtitles() { + return (Optional) advancedSubtitles; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + @JsonIgnore + public Optional audioBoost() { + return audioBoost; + } + + /** + * Target video number of audio channels. + */ + @JsonIgnore + public Optional audioChannelCount() { + return audioChannelCount; + } + + /** + * Indicates the client supports ABR. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional autoAdjustQuality() { + return (Optional) autoAdjustQuality; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional autoAdjustSubtitle() { + return (Optional) autoAdjustSubtitle; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directPlay() { + return (Optional) directPlay; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directStream() { + return (Optional) directStream; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directStreamAudio() { + return (Optional) directStreamAudio; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional disableResolutionRotation() { + return (Optional) disableResolutionRotation; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hasMDE() { + return (Optional) hasMDE; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional location() { + return (Optional) location; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + @JsonIgnore + public Optional mediaBufferSize() { + return mediaBufferSize; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + @JsonIgnore + public Optional mediaIndex() { + return mediaIndex; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + @JsonIgnore + public Optional musicBitrate() { + return musicBitrate; + } + + /** + * Offset from the start of the media (in seconds). + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + @JsonIgnore + public Optional partIndex() { + return partIndex; + } + + /** + * Internal PMS path of the media to transcode. + */ + @JsonIgnore + public Optional path() { + return path; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + @JsonIgnore + public Optional peakBitrate() { + return peakBitrate; + } + + /** + * Target photo resolution. + */ + @JsonIgnore + public Optional photoResolution() { + return photoResolution; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional protocol() { + return (Optional) protocol; + } + + /** + * Number of seconds to include in each transcoded segment + */ + @JsonIgnore + public Optional secondsPerSegment() { + return secondsPerSegment; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + @JsonIgnore + public Optional subtitleSize() { + return subtitleSize; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtitles() { + return (Optional) subtitles; + } + + /** + * Target video bitrate (in kbps). + */ + @JsonIgnore + public Optional videoBitrate() { + return videoBitrate; + } + + /** + * Target photo quality. + */ + @JsonIgnore + public Optional videoQuality() { + return videoQuality; + } + + /** + * Target maximum video resolution. + */ + @JsonIgnore + public Optional videoResolution() { + return videoResolution; + } + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + @JsonIgnore + public Optional xPlexClientProfileExtra() { + return xPlexClientProfileExtra; + } + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + @JsonIgnore + public Optional xPlexClientProfileName() { + return xPlexClientProfileName; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + @JsonIgnore + public Optional xPlexSessionIdentifier() { + return xPlexSessionIdentifier; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MakeDecisionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MakeDecisionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public MakeDecisionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public MakeDecisionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public MakeDecisionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public MakeDecisionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public MakeDecisionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public MakeDecisionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public MakeDecisionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public MakeDecisionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public MakeDecisionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public MakeDecisionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public MakeDecisionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public MakeDecisionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public MakeDecisionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public MakeDecisionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public MakeDecisionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public MakeDecisionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public MakeDecisionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public MakeDecisionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public MakeDecisionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public MakeDecisionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Type of transcode media + */ + public MakeDecisionRequest withTranscodeType(TranscodeType transcodeType) { + Utils.checkNotNull(transcodeType, "transcodeType"); + this.transcodeType = transcodeType; + return this; + } + + /** + * Transcode session UUID + */ + public MakeDecisionRequest withTranscodeSessionId(String transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = Optional.ofNullable(transcodeSessionId); + return this; + } + + + /** + * Transcode session UUID + */ + public MakeDecisionRequest withTranscodeSessionId(Optional transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = transcodeSessionId; + return this; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public MakeDecisionRequest withAdvancedSubtitles(AdvancedSubtitles advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = Optional.ofNullable(advancedSubtitles); + return this; + } + + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public MakeDecisionRequest withAdvancedSubtitles(Optional advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = advancedSubtitles; + return this; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public MakeDecisionRequest withAudioBoost(long audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public MakeDecisionRequest withAudioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + /** + * Target video number of audio channels. + */ + public MakeDecisionRequest withAudioChannelCount(long audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = Optional.ofNullable(audioChannelCount); + return this; + } + + + /** + * Target video number of audio channels. + */ + public MakeDecisionRequest withAudioChannelCount(Optional audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = audioChannelCount; + return this; + } + + /** + * Indicates the client supports ABR. + */ + public MakeDecisionRequest withAutoAdjustQuality(BoolInt autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + + /** + * Indicates the client supports ABR. + */ + public MakeDecisionRequest withAutoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public MakeDecisionRequest withAutoAdjustSubtitle(BoolInt autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public MakeDecisionRequest withAutoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + public MakeDecisionRequest withDirectPlay(BoolInt directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + + /** + * Indicates the client supports direct playing the indicated content. + */ + public MakeDecisionRequest withDirectPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public MakeDecisionRequest withDirectStream(BoolInt directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public MakeDecisionRequest withDirectStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public MakeDecisionRequest withDirectStreamAudio(BoolInt directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = Optional.ofNullable(directStreamAudio); + return this; + } + + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public MakeDecisionRequest withDirectStreamAudio(Optional directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = directStreamAudio; + return this; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public MakeDecisionRequest withDisableResolutionRotation(BoolInt disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = Optional.ofNullable(disableResolutionRotation); + return this; + } + + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public MakeDecisionRequest withDisableResolutionRotation(Optional disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = disableResolutionRotation; + return this; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public MakeDecisionRequest withHasMDE(BoolInt hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = Optional.ofNullable(hasMDE); + return this; + } + + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public MakeDecisionRequest withHasMDE(Optional hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public MakeDecisionRequest withLocation(Location location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public MakeDecisionRequest withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public MakeDecisionRequest withMediaBufferSize(long mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); + return this; + } + + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public MakeDecisionRequest withMediaBufferSize(Optional mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = mediaBufferSize; + return this; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public MakeDecisionRequest withMediaIndex(long mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = Optional.ofNullable(mediaIndex); + return this; + } + + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public MakeDecisionRequest withMediaIndex(Optional mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public MakeDecisionRequest withMusicBitrate(long musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = Optional.ofNullable(musicBitrate); + return this; + } + + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public MakeDecisionRequest withMusicBitrate(Optional musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = musicBitrate; + return this; + } + + /** + * Offset from the start of the media (in seconds). + */ + public MakeDecisionRequest withOffset(double offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * Offset from the start of the media (in seconds). + */ + public MakeDecisionRequest withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public MakeDecisionRequest withPartIndex(long partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = Optional.ofNullable(partIndex); + return this; + } + + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public MakeDecisionRequest withPartIndex(Optional partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = partIndex; + return this; + } + + /** + * Internal PMS path of the media to transcode. + */ + public MakeDecisionRequest withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + + /** + * Internal PMS path of the media to transcode. + */ + public MakeDecisionRequest withPath(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public MakeDecisionRequest withPeakBitrate(long peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = Optional.ofNullable(peakBitrate); + return this; + } + + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public MakeDecisionRequest withPeakBitrate(Optional peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = peakBitrate; + return this; + } + + /** + * Target photo resolution. + */ + public MakeDecisionRequest withPhotoResolution(String photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = Optional.ofNullable(photoResolution); + return this; + } + + + /** + * Target photo resolution. + */ + public MakeDecisionRequest withPhotoResolution(Optional photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = photoResolution; + return this; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public MakeDecisionRequest withProtocol(Protocol protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public MakeDecisionRequest withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + /** + * Number of seconds to include in each transcoded segment + */ + public MakeDecisionRequest withSecondsPerSegment(long secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = Optional.ofNullable(secondsPerSegment); + return this; + } + + + /** + * Number of seconds to include in each transcoded segment + */ + public MakeDecisionRequest withSecondsPerSegment(Optional secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = secondsPerSegment; + return this; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public MakeDecisionRequest withSubtitleSize(long subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public MakeDecisionRequest withSubtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public MakeDecisionRequest withSubtitles(Subtitles subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = Optional.ofNullable(subtitles); + return this; + } + + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public MakeDecisionRequest withSubtitles(Optional subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = subtitles; + return this; + } + + /** + * Target video bitrate (in kbps). + */ + public MakeDecisionRequest withVideoBitrate(long videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = Optional.ofNullable(videoBitrate); + return this; + } + + + /** + * Target video bitrate (in kbps). + */ + public MakeDecisionRequest withVideoBitrate(Optional videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = videoBitrate; + return this; + } + + /** + * Target photo quality. + */ + public MakeDecisionRequest withVideoQuality(long videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = Optional.ofNullable(videoQuality); + return this; + } + + + /** + * Target photo quality. + */ + public MakeDecisionRequest withVideoQuality(Optional videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = videoQuality; + return this; + } + + /** + * Target maximum video resolution. + */ + public MakeDecisionRequest withVideoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + + /** + * Target maximum video resolution. + */ + public MakeDecisionRequest withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public MakeDecisionRequest withXPlexClientProfileExtra(String xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = Optional.ofNullable(xPlexClientProfileExtra); + return this; + } + + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public MakeDecisionRequest withXPlexClientProfileExtra(Optional xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = xPlexClientProfileExtra; + return this; + } + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public MakeDecisionRequest withXPlexClientProfileName(String xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = Optional.ofNullable(xPlexClientProfileName); + return this; + } + + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public MakeDecisionRequest withXPlexClientProfileName(Optional xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = xPlexClientProfileName; + return this; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public MakeDecisionRequest withXPlexSessionIdentifier(String xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = Optional.ofNullable(xPlexSessionIdentifier); + return this; + } + + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public MakeDecisionRequest withXPlexSessionIdentifier(Optional xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MakeDecisionRequest other = (MakeDecisionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.transcodeType, other.transcodeType) && + Utils.enhancedDeepEquals(this.transcodeSessionId, other.transcodeSessionId) && + Utils.enhancedDeepEquals(this.advancedSubtitles, other.advancedSubtitles) && + Utils.enhancedDeepEquals(this.audioBoost, other.audioBoost) && + Utils.enhancedDeepEquals(this.audioChannelCount, other.audioChannelCount) && + Utils.enhancedDeepEquals(this.autoAdjustQuality, other.autoAdjustQuality) && + Utils.enhancedDeepEquals(this.autoAdjustSubtitle, other.autoAdjustSubtitle) && + Utils.enhancedDeepEquals(this.directPlay, other.directPlay) && + Utils.enhancedDeepEquals(this.directStream, other.directStream) && + Utils.enhancedDeepEquals(this.directStreamAudio, other.directStreamAudio) && + Utils.enhancedDeepEquals(this.disableResolutionRotation, other.disableResolutionRotation) && + Utils.enhancedDeepEquals(this.hasMDE, other.hasMDE) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.mediaBufferSize, other.mediaBufferSize) && + Utils.enhancedDeepEquals(this.mediaIndex, other.mediaIndex) && + Utils.enhancedDeepEquals(this.musicBitrate, other.musicBitrate) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.partIndex, other.partIndex) && + Utils.enhancedDeepEquals(this.path, other.path) && + Utils.enhancedDeepEquals(this.peakBitrate, other.peakBitrate) && + Utils.enhancedDeepEquals(this.photoResolution, other.photoResolution) && + Utils.enhancedDeepEquals(this.protocol, other.protocol) && + Utils.enhancedDeepEquals(this.secondsPerSegment, other.secondsPerSegment) && + Utils.enhancedDeepEquals(this.subtitleSize, other.subtitleSize) && + Utils.enhancedDeepEquals(this.subtitles, other.subtitles) && + Utils.enhancedDeepEquals(this.videoBitrate, other.videoBitrate) && + Utils.enhancedDeepEquals(this.videoQuality, other.videoQuality) && + Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && + Utils.enhancedDeepEquals(this.xPlexClientProfileExtra, other.xPlexClientProfileExtra) && + Utils.enhancedDeepEquals(this.xPlexClientProfileName, other.xPlexClientProfileName) && + Utils.enhancedDeepEquals(this.xPlexSessionIdentifier, other.xPlexSessionIdentifier); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, transcodeType, + transcodeSessionId, advancedSubtitles, audioBoost, + audioChannelCount, autoAdjustQuality, autoAdjustSubtitle, + directPlay, directStream, directStreamAudio, + disableResolutionRotation, hasMDE, location, + mediaBufferSize, mediaIndex, musicBitrate, + offset, partIndex, path, + peakBitrate, photoResolution, protocol, + secondsPerSegment, subtitleSize, subtitles, + videoBitrate, videoQuality, videoResolution, + xPlexClientProfileExtra, xPlexClientProfileName, xPlexSessionIdentifier); + } + + @Override + public String toString() { + return Utils.toString(MakeDecisionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "transcodeType", transcodeType, + "transcodeSessionId", transcodeSessionId, + "advancedSubtitles", advancedSubtitles, + "audioBoost", audioBoost, + "audioChannelCount", audioChannelCount, + "autoAdjustQuality", autoAdjustQuality, + "autoAdjustSubtitle", autoAdjustSubtitle, + "directPlay", directPlay, + "directStream", directStream, + "directStreamAudio", directStreamAudio, + "disableResolutionRotation", disableResolutionRotation, + "hasMDE", hasMDE, + "location", location, + "mediaBufferSize", mediaBufferSize, + "mediaIndex", mediaIndex, + "musicBitrate", musicBitrate, + "offset", offset, + "partIndex", partIndex, + "path", path, + "peakBitrate", peakBitrate, + "photoResolution", photoResolution, + "protocol", protocol, + "secondsPerSegment", secondsPerSegment, + "subtitleSize", subtitleSize, + "subtitles", subtitles, + "videoBitrate", videoBitrate, + "videoQuality", videoQuality, + "videoResolution", videoResolution, + "xPlexClientProfileExtra", xPlexClientProfileExtra, + "xPlexClientProfileName", xPlexClientProfileName, + "xPlexSessionIdentifier", xPlexSessionIdentifier); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private TranscodeType transcodeType; + + private Optional transcodeSessionId = Optional.empty(); + + private Optional advancedSubtitles = Optional.empty(); + + private Optional audioBoost = Optional.empty(); + + private Optional audioChannelCount = Optional.empty(); + + private Optional autoAdjustQuality = Optional.empty(); + + private Optional autoAdjustSubtitle = Optional.empty(); + + private Optional directPlay = Optional.empty(); + + private Optional directStream = Optional.empty(); + + private Optional directStreamAudio = Optional.empty(); + + private Optional disableResolutionRotation = Optional.empty(); + + private Optional hasMDE = Optional.empty(); + + private Optional location = Optional.empty(); + + private Optional mediaBufferSize = Optional.empty(); + + private Optional mediaIndex = Optional.empty(); + + private Optional musicBitrate = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional partIndex = Optional.empty(); + + private Optional path = Optional.empty(); + + private Optional peakBitrate = Optional.empty(); + + private Optional photoResolution = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional secondsPerSegment = Optional.empty(); + + private Optional subtitleSize = Optional.empty(); + + private Optional subtitles = Optional.empty(); + + private Optional videoBitrate = Optional.empty(); + + private Optional videoQuality = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional xPlexClientProfileExtra = Optional.empty(); + + private Optional xPlexClientProfileName = Optional.empty(); + + private Optional xPlexSessionIdentifier = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Type of transcode media + */ + public Builder transcodeType(TranscodeType transcodeType) { + Utils.checkNotNull(transcodeType, "transcodeType"); + this.transcodeType = transcodeType; + return this; + } + + + /** + * Transcode session UUID + */ + public Builder transcodeSessionId(String transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = Optional.ofNullable(transcodeSessionId); + return this; + } + + /** + * Transcode session UUID + */ + public Builder transcodeSessionId(Optional transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = transcodeSessionId; + return this; + } + + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public Builder advancedSubtitles(AdvancedSubtitles advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = Optional.ofNullable(advancedSubtitles); + return this; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public Builder advancedSubtitles(Optional advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = advancedSubtitles; + return this; + } + + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public Builder audioBoost(long audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public Builder audioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + + /** + * Target video number of audio channels. + */ + public Builder audioChannelCount(long audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = Optional.ofNullable(audioChannelCount); + return this; + } + + /** + * Target video number of audio channels. + */ + public Builder audioChannelCount(Optional audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = audioChannelCount; + return this; + } + + + /** + * Indicates the client supports ABR. + */ + public Builder autoAdjustQuality(BoolInt autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + /** + * Indicates the client supports ABR. + */ + public Builder autoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public Builder autoAdjustSubtitle(BoolInt autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public Builder autoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + + /** + * Indicates the client supports direct playing the indicated content. + */ + public Builder directPlay(BoolInt directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + public Builder directPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public Builder directStream(BoolInt directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public Builder directStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public Builder directStreamAudio(BoolInt directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = Optional.ofNullable(directStreamAudio); + return this; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public Builder directStreamAudio(Optional directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = directStreamAudio; + return this; + } + + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public Builder disableResolutionRotation(BoolInt disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = Optional.ofNullable(disableResolutionRotation); + return this; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public Builder disableResolutionRotation(Optional disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = disableResolutionRotation; + return this; + } + + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public Builder hasMDE(BoolInt hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = Optional.ofNullable(hasMDE); + return this; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public Builder hasMDE(Optional hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public Builder location(Location location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public Builder mediaBufferSize(long mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); + return this; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public Builder mediaBufferSize(Optional mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = mediaBufferSize; + return this; + } + + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public Builder mediaIndex(long mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = Optional.ofNullable(mediaIndex); + return this; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public Builder mediaIndex(Optional mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public Builder musicBitrate(long musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = Optional.ofNullable(musicBitrate); + return this; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public Builder musicBitrate(Optional musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = musicBitrate; + return this; + } + + + /** + * Offset from the start of the media (in seconds). + */ + public Builder offset(double offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * Offset from the start of the media (in seconds). + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public Builder partIndex(long partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = Optional.ofNullable(partIndex); + return this; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public Builder partIndex(Optional partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = partIndex; + return this; + } + + + /** + * Internal PMS path of the media to transcode. + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + /** + * Internal PMS path of the media to transcode. + */ + public Builder path(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public Builder peakBitrate(long peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = Optional.ofNullable(peakBitrate); + return this; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public Builder peakBitrate(Optional peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = peakBitrate; + return this; + } + + + /** + * Target photo resolution. + */ + public Builder photoResolution(String photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = Optional.ofNullable(photoResolution); + return this; + } + + /** + * Target photo resolution. + */ + public Builder photoResolution(Optional photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = photoResolution; + return this; + } + + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public Builder protocol(Protocol protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + + /** + * Number of seconds to include in each transcoded segment + */ + public Builder secondsPerSegment(long secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = Optional.ofNullable(secondsPerSegment); + return this; + } + + /** + * Number of seconds to include in each transcoded segment + */ + public Builder secondsPerSegment(Optional secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = secondsPerSegment; + return this; + } + + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public Builder subtitleSize(long subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public Builder subtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public Builder subtitles(Subtitles subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = Optional.ofNullable(subtitles); + return this; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public Builder subtitles(Optional subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = subtitles; + return this; + } + + + /** + * Target video bitrate (in kbps). + */ + public Builder videoBitrate(long videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = Optional.ofNullable(videoBitrate); + return this; + } + + /** + * Target video bitrate (in kbps). + */ + public Builder videoBitrate(Optional videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = videoBitrate; + return this; + } + + + /** + * Target photo quality. + */ + public Builder videoQuality(long videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = Optional.ofNullable(videoQuality); + return this; + } + + /** + * Target photo quality. + */ + public Builder videoQuality(Optional videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = videoQuality; + return this; + } + + + /** + * Target maximum video resolution. + */ + public Builder videoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + /** + * Target maximum video resolution. + */ + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public Builder xPlexClientProfileExtra(String xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = Optional.ofNullable(xPlexClientProfileExtra); + return this; + } + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public Builder xPlexClientProfileExtra(Optional xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = xPlexClientProfileExtra; + return this; + } + + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public Builder xPlexClientProfileName(String xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = Optional.ofNullable(xPlexClientProfileName); + return this; + } + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public Builder xPlexClientProfileName(Optional xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = xPlexClientProfileName; + return this; + } + + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public Builder xPlexSessionIdentifier(String xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = Optional.ofNullable(xPlexSessionIdentifier); + return this; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public Builder xPlexSessionIdentifier(Optional xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + return this; + } + + public MakeDecisionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new MakeDecisionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, transcodeType, + transcodeSessionId, advancedSubtitles, audioBoost, + audioChannelCount, autoAdjustQuality, autoAdjustSubtitle, + directPlay, directStream, directStreamAudio, + disableResolutionRotation, hasMDE, location, + mediaBufferSize, mediaIndex, musicBitrate, + offset, partIndex, path, + peakBitrate, photoResolution, protocol, + secondsPerSegment, subtitleSize, subtitles, + videoBitrate, videoQuality, videoResolution, + xPlexClientProfileExtra, xPlexClientProfileName, xPlexSessionIdentifier); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionRequestBuilder.java new file mode 100644 index 00000000..f47219ed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.MakeDecision; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class MakeDecisionRequestBuilder { + + private MakeDecisionRequest request; + private final SDKConfiguration sdkConfiguration; + + public MakeDecisionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MakeDecisionRequestBuilder request(MakeDecisionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public MakeDecisionResponse call() throws Exception { + + RequestOperation operation + = new MakeDecision.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionResponse.java new file mode 100644 index 00000000..4a59b563 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MakeDecisionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDecision; +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.Optional; + + +public class MakeDecisionResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithDecision; + + @JsonCreator + public MakeDecisionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDecision) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDecision = mediaContainerWithDecision; + } + + public MakeDecisionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDecision() { + return (Optional) mediaContainerWithDecision; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MakeDecisionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MakeDecisionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MakeDecisionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public MakeDecisionResponse withMediaContainerWithDecision(MediaContainerWithDecision mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = Optional.ofNullable(mediaContainerWithDecision); + return this; + } + + + /** + * OK + */ + public MakeDecisionResponse withMediaContainerWithDecision(Optional mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = mediaContainerWithDecision; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MakeDecisionResponse other = (MakeDecisionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDecision, other.mediaContainerWithDecision); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDecision); + } + + @Override + public String toString() { + return Utils.toString(MakeDecisionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDecision", mediaContainerWithDecision); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDecision = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDecision(MediaContainerWithDecision mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = Optional.ofNullable(mediaContainerWithDecision); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDecision(Optional mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = mediaContainerWithDecision; + return this; + } + + public MakeDecisionResponse build() { + + return new MakeDecisionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDecision); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedRequest.java index e3390e88..1a35446e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedRequest.java @@ -5,49 +5,531 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.SpeakeasyMetadata; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; public class MarkPlayedRequest { /** - * The media key to mark as played + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=identifier") + private String identifier; + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") - private double key; + private Optional key; + + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") + private Optional uri; @JsonCreator public MarkPlayedRequest( - double key) { + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String identifier, + Optional key, + Optional uri) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(identifier, "identifier"); Utils.checkNotNull(key, "key"); + Utils.checkNotNull(uri, "uri"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.identifier = identifier; this.key = key; + this.uri = uri; + } + + public MarkPlayedRequest( + String identifier) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), identifier, + Optional.empty(), Optional.empty()); } /** - * The media key to mark as played + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client */ @JsonIgnore - public double key() { + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + @JsonIgnore + public String identifier() { + return identifier; + } + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + @JsonIgnore + public Optional key() { return key; } + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + @JsonIgnore + public Optional uri() { + return uri; + } + public static Builder builder() { return new Builder(); } /** - * The media key to mark as played + * Indicates the client accepts the indicated media types */ - public MarkPlayedRequest withKey(double key) { + public MarkPlayedRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MarkPlayedRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public MarkPlayedRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public MarkPlayedRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public MarkPlayedRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public MarkPlayedRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public MarkPlayedRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public MarkPlayedRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public MarkPlayedRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public MarkPlayedRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public MarkPlayedRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public MarkPlayedRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public MarkPlayedRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public MarkPlayedRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public MarkPlayedRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public MarkPlayedRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public MarkPlayedRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public MarkPlayedRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public MarkPlayedRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public MarkPlayedRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public MarkPlayedRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public MarkPlayedRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + public MarkPlayedRequest withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + public MarkPlayedRequest withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + public MarkPlayedRequest withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + public MarkPlayedRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + public MarkPlayedRequest withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -58,25 +540,81 @@ public class MarkPlayedRequest { } MarkPlayedRequest other = (MarkPlayedRequest) o; return - Utils.enhancedDeepEquals(this.key, other.key); + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.uri, other.uri); } @Override public int hashCode() { return Utils.enhancedHash( - key); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, identifier, + key, uri); } @Override public String toString() { return Utils.toString(MarkPlayedRequest.class, - "key", key); + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "identifier", identifier, + "key", key, + "uri", uri); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Double key; + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String identifier; + + private Optional key = Optional.empty(); + + private Optional uri = Optional.empty(); private Builder() { // force use of static builder() method @@ -84,19 +622,279 @@ public class MarkPlayedRequest { /** - * The media key to mark as played + * Indicates the client accepts the indicated media types */ - public Builder key(double key) { + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } - public MarkPlayedRequest build() { - return new MarkPlayedRequest( - key); + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; } + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + public MarkPlayedRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new MarkPlayedRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, identifier, + key, uri); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedRequestBuilder.java index 83f0d3e2..99b08477 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/MarkPlayedRequestBuilder.java @@ -8,37 +8,27 @@ import static dev.plexapi.sdk.operations.Operations.RequestOperation; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.operations.MarkPlayed; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; import java.lang.Exception; public class MarkPlayedRequestBuilder { - private Double key; + private MarkPlayedRequest request; private final SDKConfiguration sdkConfiguration; public MarkPlayedRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public MarkPlayedRequestBuilder key(double key) { - Utils.checkNotNull(key, "key"); - this.key = key; + public MarkPlayedRequestBuilder request(MarkPlayedRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private MarkPlayedRequest buildRequest() { - - MarkPlayedRequest request = new MarkPlayedRequest(key); - - return request; - } - public MarkPlayedResponse call() throws Exception { RequestOperation operation = new MarkPlayed.Sync(sdkConfiguration); - MarkPlayedRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedRequest.java deleted file mode 100644 index 8ead217a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedRequest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; - - -public class MarkUnplayedRequest { - /** - * The media key to mark as Unplayed - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") - private double key; - - @JsonCreator - public MarkUnplayedRequest( - double key) { - Utils.checkNotNull(key, "key"); - this.key = key; - } - - /** - * The media key to mark as Unplayed - */ - @JsonIgnore - public double key() { - return key; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The media key to mark as Unplayed - */ - public MarkUnplayedRequest withKey(double key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkUnplayedRequest other = (MarkUnplayedRequest) o; - return - Utils.enhancedDeepEquals(this.key, other.key); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key); - } - - @Override - public String toString() { - return Utils.toString(MarkUnplayedRequest.class, - "key", key); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Double key; - - private Builder() { - // force use of static builder() method - } - - - /** - * The media key to mark as Unplayed - */ - public Builder key(double key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public MarkUnplayedRequest build() { - - return new MarkUnplayedRequest( - key); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedRequestBuilder.java deleted file mode 100644 index 69030721..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.MarkUnplayed; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; - -public class MarkUnplayedRequestBuilder { - - private Double key; - private final SDKConfiguration sdkConfiguration; - - public MarkUnplayedRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public MarkUnplayedRequestBuilder key(double key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - private MarkUnplayedRequest buildRequest() { - - MarkUnplayedRequest request = new MarkUnplayedRequest(key); - - return request; - } - - public MarkUnplayedResponse call() throws Exception { - - RequestOperation operation - = new MarkUnplayed.Sync(sdkConfiguration); - MarkUnplayedRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedResponse.java deleted file mode 100644 index 07179d62..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/MarkUnplayedResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class MarkUnplayedResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public MarkUnplayedResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public MarkUnplayedResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public MarkUnplayedResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkUnplayedResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkUnplayedResponse other = (MarkUnplayedResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(MarkUnplayedResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public MarkUnplayedResponse build() { - - return new MarkUnplayedResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Marker.java b/src/main/java/dev/plexapi/sdk/models/operations/Marker.java deleted file mode 100644 index 0d8b848f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Marker.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - -/** - * Marker - * - *

The final status of the marker - */ -public class Marker { - - @JsonProperty("id") - private long id; - - - @JsonProperty("type") - private String type; - - - @JsonProperty("startTimeOffset") - private long startTimeOffset; - - - @JsonProperty("endTimeOffset") - private long endTimeOffset; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("final") - private Optional final_; - - /** - * Attributes associated with the marker. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Attributes") - private Optional attributes; - - @JsonCreator - public Marker( - @JsonProperty("id") long id, - @JsonProperty("type") String type, - @JsonProperty("startTimeOffset") long startTimeOffset, - @JsonProperty("endTimeOffset") long endTimeOffset, - @JsonProperty("final") Optional final_, - @JsonProperty("Attributes") Optional attributes) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - Utils.checkNotNull(final_, "final_"); - Utils.checkNotNull(attributes, "attributes"); - this.id = id; - this.type = type; - this.startTimeOffset = startTimeOffset; - this.endTimeOffset = endTimeOffset; - this.final_ = final_; - this.attributes = attributes; - } - - public Marker( - long id, - String type, - long startTimeOffset, - long endTimeOffset) { - this(id, type, startTimeOffset, - endTimeOffset, Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public long id() { - return id; - } - - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public long startTimeOffset() { - return startTimeOffset; - } - - @JsonIgnore - public long endTimeOffset() { - return endTimeOffset; - } - - @JsonIgnore - public Optional final_() { - return final_; - } - - /** - * Attributes associated with the marker. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional attributes() { - return (Optional) attributes; - } - - public static Builder builder() { - return new Builder(); - } - - - public Marker withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Marker withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Marker withStartTimeOffset(long startTimeOffset) { - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - this.startTimeOffset = startTimeOffset; - return this; - } - - public Marker withEndTimeOffset(long endTimeOffset) { - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - this.endTimeOffset = endTimeOffset; - return this; - } - - public Marker withFinal(boolean final_) { - Utils.checkNotNull(final_, "final_"); - this.final_ = Optional.ofNullable(final_); - return this; - } - - - public Marker withFinal(Optional final_) { - Utils.checkNotNull(final_, "final_"); - this.final_ = final_; - return this; - } - - /** - * Attributes associated with the marker. - */ - public Marker withAttributes(Attributes attributes) { - Utils.checkNotNull(attributes, "attributes"); - this.attributes = Optional.ofNullable(attributes); - return this; - } - - - /** - * Attributes associated with the marker. - */ - public Marker withAttributes(Optional attributes) { - Utils.checkNotNull(attributes, "attributes"); - this.attributes = attributes; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Marker other = (Marker) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.startTimeOffset, other.startTimeOffset) && - Utils.enhancedDeepEquals(this.endTimeOffset, other.endTimeOffset) && - Utils.enhancedDeepEquals(this.final_, other.final_) && - Utils.enhancedDeepEquals(this.attributes, other.attributes); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, type, startTimeOffset, - endTimeOffset, final_, attributes); - } - - @Override - public String toString() { - return Utils.toString(Marker.class, - "id", id, - "type", type, - "startTimeOffset", startTimeOffset, - "endTimeOffset", endTimeOffset, - "final_", final_, - "attributes", attributes); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String type; - - private Long startTimeOffset; - - private Long endTimeOffset; - - private Optional final_ = Optional.empty(); - - private Optional attributes = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - public Builder startTimeOffset(long startTimeOffset) { - Utils.checkNotNull(startTimeOffset, "startTimeOffset"); - this.startTimeOffset = startTimeOffset; - return this; - } - - - public Builder endTimeOffset(long endTimeOffset) { - Utils.checkNotNull(endTimeOffset, "endTimeOffset"); - this.endTimeOffset = endTimeOffset; - return this; - } - - - public Builder final_(boolean final_) { - Utils.checkNotNull(final_, "final_"); - this.final_ = Optional.ofNullable(final_); - return this; - } - - public Builder final_(Optional final_) { - Utils.checkNotNull(final_, "final_"); - this.final_ = final_; - return this; - } - - - /** - * Attributes associated with the marker. - */ - public Builder attributes(Attributes attributes) { - Utils.checkNotNull(attributes, "attributes"); - this.attributes = Optional.ofNullable(attributes); - return this; - } - - /** - * Attributes associated with the marker. - */ - public Builder attributes(Optional attributes) { - Utils.checkNotNull(attributes, "attributes"); - this.attributes = attributes; - return this; - } - - public Marker build() { - - return new Marker( - id, type, startTimeOffset, - endTimeOffset, final_, attributes); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MatchItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/MatchItemRequest.java new file mode 100644 index 00000000..38779b3b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MatchItemRequest.java @@ -0,0 +1,898 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class MatchItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=guid") + private Optional guid; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=name") + private Optional name; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=year") + private Optional year; + + @JsonCreator + public MatchItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional guid, + Optional name, + Optional year) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(year, "year"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.guid = guid; + this.name = name; + this.year = year; + } + + public MatchItemRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @JsonIgnore + public Optional guid() { + return guid; + } + + @JsonIgnore + public Optional name() { + return name; + } + + @JsonIgnore + public Optional year() { + return year; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MatchItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MatchItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public MatchItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public MatchItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public MatchItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public MatchItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public MatchItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public MatchItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public MatchItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public MatchItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public MatchItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public MatchItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public MatchItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public MatchItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public MatchItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public MatchItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public MatchItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public MatchItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public MatchItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public MatchItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public MatchItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public MatchItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public MatchItemRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public MatchItemRequest withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + + public MatchItemRequest withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public MatchItemRequest withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + public MatchItemRequest withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public MatchItemRequest withYear(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + + public MatchItemRequest withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchItemRequest other = (MatchItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.guid, other.guid) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.year, other.year); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + guid, name, year); + } + + @Override + public String toString() { + return Utils.toString(MatchItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "guid", guid, + "name", name, + "year", year); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional guid = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional year = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + 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 name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + public Builder year(long 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 MatchItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new MatchItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + guid, name, year); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MatchItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/MatchItemRequestBuilder.java new file mode 100644 index 00000000..9149d8d8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MatchItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.MatchItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class MatchItemRequestBuilder { + + private MatchItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public MatchItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MatchItemRequestBuilder request(MatchItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public MatchItemResponse call() throws Exception { + + RequestOperation operation + = new MatchItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MatchItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/MatchItemResponse.java new file mode 100644 index 00000000..0b9d1cd3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MatchItemResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class MatchItemResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public MatchItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MatchItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MatchItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MatchItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchItemResponse other = (MatchItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(MatchItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public MatchItemResponse build() { + + return new MatchItemResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Media.java b/src/main/java/dev/plexapi/sdk/models/operations/Media.java deleted file mode 100644 index 47e01c93..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Media.java +++ /dev/null @@ -1,1181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Float; -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.Optional; - - -public class Media { - /** - * Unique media identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Duration of the media in milliseconds. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - /** - * Bitrate in bits per second. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - /** - * Video width in pixels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("width") - private Optional width; - - /** - * Video height in pixels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("height") - private Optional height; - - /** - * Aspect ratio of the video. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("aspectRatio") - private Optional aspectRatio; - - /** - * Number of audio channels. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannels") - private Optional audioChannels; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("displayOffset") - private Optional displayOffset; - - /** - * Audio codec used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioCodec") - private Optional audioCodec; - - /** - * Video codec used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoCodec") - private Optional videoCodec; - - /** - * Video resolution (e.g., 4k). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoResolution") - private Optional videoResolution; - - /** - * File container type. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoFrameRate") - private Optional videoFrameRate; - - /** - * Video profile (e.g., main 10). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - /** - * Indicates whether voice activity is detected. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasVoiceActivity") - private Optional hasVoiceActivity; - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - /** - * An array of parts for this media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Part") - private Optional> part; - - @JsonCreator - public Media( - @JsonProperty("id") long id, - @JsonProperty("duration") Optional duration, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("width") Optional width, - @JsonProperty("height") Optional height, - @JsonProperty("aspectRatio") Optional aspectRatio, - @JsonProperty("audioChannels") Optional audioChannels, - @JsonProperty("displayOffset") Optional displayOffset, - @JsonProperty("audioCodec") Optional audioCodec, - @JsonProperty("videoCodec") Optional videoCodec, - @JsonProperty("videoResolution") Optional videoResolution, - @JsonProperty("container") Optional container, - @JsonProperty("videoFrameRate") Optional videoFrameRate, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("Part") 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(displayOffset, "displayOffset"); - 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(audioProfile, "audioProfile"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - 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.displayOffset = displayOffset; - this.audioCodec = audioCodec; - this.videoCodec = videoCodec; - this.videoResolution = videoResolution; - this.container = container; - this.videoFrameRate = videoFrameRate; - this.videoProfile = videoProfile; - this.hasVoiceActivity = hasVoiceActivity; - this.audioProfile = audioProfile; - this.optimizedForStreaming = optimizedForStreaming; - this.has64bitOffsets = has64bitOffsets; - this.part = part; - } - - public Media( - long id) { - this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Unique media identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Duration of the media in milliseconds. - */ - @JsonIgnore - public Optional duration() { - return duration; - } - - /** - * Bitrate in bits per second. - */ - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - /** - * Video width in pixels. - */ - @JsonIgnore - public Optional width() { - return width; - } - - /** - * Video height in pixels. - */ - @JsonIgnore - public Optional height() { - return height; - } - - /** - * Aspect ratio of the video. - */ - @JsonIgnore - public Optional aspectRatio() { - return aspectRatio; - } - - /** - * Number of audio channels. - */ - @JsonIgnore - public Optional audioChannels() { - return audioChannels; - } - - @JsonIgnore - public Optional displayOffset() { - return displayOffset; - } - - /** - * Audio codec used. - */ - @JsonIgnore - public Optional audioCodec() { - return audioCodec; - } - - /** - * Video codec used. - */ - @JsonIgnore - public Optional videoCodec() { - return videoCodec; - } - - /** - * Video resolution (e.g., 4k). - */ - @JsonIgnore - public Optional videoResolution() { - return videoResolution; - } - - /** - * File container type. - */ - @JsonIgnore - public Optional container() { - return container; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - @JsonIgnore - public Optional videoFrameRate() { - return videoFrameRate; - } - - /** - * Video profile (e.g., main 10). - */ - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - /** - * Indicates whether voice activity is detected. - */ - @JsonIgnore - public Optional hasVoiceActivity() { - return hasVoiceActivity; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional optimizedForStreaming() { - return (Optional) optimizedForStreaming; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - /** - * An array of parts for this media item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> part() { - return (Optional>) part; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique media identifier. - */ - public Media withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Duration of the media in milliseconds. - */ - public Media withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - /** - * Duration of the media in milliseconds. - */ - public Media withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * Bitrate in bits per second. - */ - public Media withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - /** - * Bitrate in bits per second. - */ - public Media withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * Video width in pixels. - */ - public Media withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - /** - * Video width in pixels. - */ - public Media withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Video height in pixels. - */ - public Media withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - /** - * Video height in pixels. - */ - public Media withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * Aspect ratio of the video. - */ - public Media withAspectRatio(float aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - - /** - * Aspect ratio of the video. - */ - public Media withAspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - /** - * Number of audio channels. - */ - public Media withAudioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - - /** - * Number of audio channels. - */ - public Media withAudioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - public Media withDisplayOffset(int displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = Optional.ofNullable(displayOffset); - return this; - } - - - public Media withDisplayOffset(Optional displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = displayOffset; - return this; - } - - /** - * Audio codec used. - */ - public Media withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - - /** - * Audio codec used. - */ - public Media withAudioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - /** - * Video codec used. - */ - public Media withVideoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - - /** - * Video codec used. - */ - public Media withVideoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - /** - * Video resolution (e.g., 4k). - */ - public Media withVideoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - - /** - * Video resolution (e.g., 4k). - */ - public Media withVideoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - /** - * File container type. - */ - public Media withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - /** - * File container type. - */ - public Media withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Media withVideoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Media withVideoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - /** - * Video profile (e.g., main 10). - */ - public Media withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - /** - * Video profile (e.g., main 10). - */ - public Media withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - /** - * Indicates whether voice activity is detected. - */ - public Media withHasVoiceActivity(boolean hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); - return this; - } - - - /** - * Indicates whether voice activity is detected. - */ - public Media withHasVoiceActivity(Optional hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = hasVoiceActivity; - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Media withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Media withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Media withOptimizedForStreaming(OptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Media withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - public Media withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - public Media withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - /** - * An array of parts for this media item. - */ - public Media withPart(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - - /** - * An array of parts for this media item. - */ - public Media 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; - } - Media other = (Media) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.displayOffset, other.displayOffset) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && - Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.part, other.part); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, displayOffset, audioCodec, - videoCodec, videoResolution, container, - videoFrameRate, videoProfile, hasVoiceActivity, - audioProfile, optimizedForStreaming, has64bitOffsets, - part); - } - - @Override - public String toString() { - return Utils.toString(Media.class, - "id", id, - "duration", duration, - "bitrate", bitrate, - "width", width, - "height", height, - "aspectRatio", aspectRatio, - "audioChannels", audioChannels, - "displayOffset", displayOffset, - "audioCodec", audioCodec, - "videoCodec", videoCodec, - "videoResolution", videoResolution, - "container", container, - "videoFrameRate", videoFrameRate, - "videoProfile", videoProfile, - "hasVoiceActivity", hasVoiceActivity, - "audioProfile", audioProfile, - "optimizedForStreaming", optimizedForStreaming, - "has64bitOffsets", has64bitOffsets, - "part", part); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - 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 displayOffset = 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 videoProfile = Optional.empty(); - - private Optional hasVoiceActivity = Optional.empty(); - - private Optional audioProfile = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional> part = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique media identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Duration of the media in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - /** - * Duration of the media in milliseconds. - */ - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * Bitrate in bits per second. - */ - public Builder bitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * Bitrate in bits per second. - */ - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - - /** - * Video width in pixels. - */ - public Builder width(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * Video width in pixels. - */ - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - /** - * Video height in pixels. - */ - public Builder height(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * Video height in pixels. - */ - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - /** - * Aspect ratio of the video. - */ - public Builder aspectRatio(float aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - /** - * Aspect ratio of the video. - */ - public Builder aspectRatio(Optional aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = aspectRatio; - return this; - } - - - /** - * Number of audio channels. - */ - public Builder audioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - /** - * Number of audio channels. - */ - public Builder audioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - - public Builder displayOffset(int displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = Optional.ofNullable(displayOffset); - return this; - } - - public Builder displayOffset(Optional displayOffset) { - Utils.checkNotNull(displayOffset, "displayOffset"); - this.displayOffset = displayOffset; - return this; - } - - - /** - * Audio codec used. - */ - public Builder audioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - /** - * Audio codec used. - */ - public Builder audioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - - /** - * Video codec used. - */ - public Builder videoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - /** - * Video codec used. - */ - public Builder videoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - - /** - * Video resolution (e.g., 4k). - */ - public Builder videoResolution(String videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - /** - * Video resolution (e.g., 4k). - */ - public Builder videoResolution(Optional videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = videoResolution; - return this; - } - - - /** - * File container type. - */ - public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - /** - * File container type. - */ - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Builder videoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - /** - * Frame rate of the video. Values found include NTSC, PAL, 24p - */ - public Builder videoFrameRate(Optional videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = videoFrameRate; - return this; - } - - - /** - * Video profile (e.g., main 10). - */ - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - /** - * Video profile (e.g., main 10). - */ - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - - /** - * Indicates whether voice activity is detected. - */ - public Builder hasVoiceActivity(boolean hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); - return this; - } - - /** - * Indicates whether voice activity is detected. - */ - public Builder hasVoiceActivity(Optional hasVoiceActivity) { - Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); - this.hasVoiceActivity = hasVoiceActivity; - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(OptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - - 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; - } - - - /** - * An array of parts for this media item. - */ - public Builder part(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - /** - * An array of parts for this media item. - */ - public Builder part(Optional> part) { - Utils.checkNotNull(part, "part"); - this.part = part; - return this; - } - - public Media build() { - - return new Media( - id, duration, bitrate, - width, height, aspectRatio, - audioChannels, displayOffset, audioCodec, - videoCodec, videoResolution, container, - videoFrameRate, videoProfile, hasVoiceActivity, - audioProfile, optimizedForStreaming, has64bitOffsets, - part); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/MediaContainer.java index b6851c41..aaf3ca55 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/MediaContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/MediaContainer.java @@ -10,19 +10,44 @@ 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.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; -import java.util.List; import java.util.Optional; - +/** + * MediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ public class MediaContainer { + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + @JsonInclude(Include.NON_ABSENT) @JsonProperty("size") - private Optional size; + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; @JsonInclude(Include.NON_ABSENT) @@ -102,12 +127,12 @@ public class MediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("livetv") - private Optional livetv; + private Optional livetv; @JsonInclude(Include.NON_ABSENT) @JsonProperty("machineIdentifier") - private Optional machineIdentifier; + private Optional machineIdentifier; @JsonInclude(Include.NON_ABSENT) @@ -122,7 +147,7 @@ public class MediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("musicAnalysis") - private Optional musicAnalysis; + private Optional musicAnalysis; @JsonInclude(Include.NON_ABSENT) @@ -132,12 +157,12 @@ public class MediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("myPlexMappingState") - private Optional myPlexMappingState; + private Optional myPlexMappingState; @JsonInclude(Include.NON_ABSENT) @JsonProperty("myPlexSigninState") - private Optional myPlexSigninState; + private Optional myPlexSigninState; @JsonInclude(Include.NON_ABSENT) @@ -152,19 +177,16 @@ public class MediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("offlineTranscode") - private Optional offlineTranscode; - + private Optional offlineTranscode; + /** + * A comma-separated list of features which are enabled for the server owner + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("ownerFeatures") private Optional ownerFeatures; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("photoAutoTag") - private Optional photoAutoTag; - - @JsonInclude(Include.NON_ABSENT) @JsonProperty("platform") private Optional platform; @@ -192,12 +214,12 @@ public class MediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("streamingBrainABRVersion") - private Optional streamingBrainABRVersion; + private Optional streamingBrainABRVersion; @JsonInclude(Include.NON_ABSENT) @JsonProperty("streamingBrainVersion") - private Optional streamingBrainVersion; + private Optional streamingBrainVersion; @JsonInclude(Include.NON_ABSENT) @@ -207,7 +229,7 @@ public class MediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("transcoderActiveVideoSessions") - private Optional transcoderActiveVideoSessions; + private Optional transcoderActiveVideoSessions; @JsonInclude(Include.NON_ABSENT) @@ -234,25 +256,29 @@ public class MediaContainer { @JsonProperty("transcoderVideo") private Optional transcoderVideo; - + /** + * The suggested video quality bitrates to present to the user + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("transcoderVideoBitrates") - private Optional transcoderVideoBitrates; + private Optional transcoderVideoBitrates; @JsonInclude(Include.NON_ABSENT) @JsonProperty("transcoderVideoQualities") private Optional transcoderVideoQualities; - + /** + * The suggested video resolutions to the above quality bitrates + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("transcoderVideoResolutions") - private Optional transcoderVideoResolutions; + private Optional transcoderVideoResolutions; @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedAt") - private Optional updatedAt; + private Optional updatedAt; @JsonInclude(Include.NON_ABSENT) @@ -269,14 +295,33 @@ public class MediaContainer { @JsonProperty("voiceSearch") private Optional voiceSearch; - + /** + * A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Directory") - private Optional> directory; + @JsonProperty("Bandwidths") + private Optional bandwidths; + + /** + * A code describing why the session was terminated by the server. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("terminationCode") + private Optional terminationCode; + + /** + * A user friendly and localized text describing why the session was terminated by the server. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("terminationText") + private Optional terminationText; @JsonCreator public MediaContainer( - @JsonProperty("size") Optional size, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, @JsonProperty("allowCameraUpload") Optional allowCameraUpload, @JsonProperty("allowChannelAccess") Optional allowChannelAccess, @JsonProperty("allowMediaDeletion") Optional allowMediaDeletion, @@ -292,42 +337,46 @@ public class MediaContainer { @JsonProperty("friendlyName") Optional friendlyName, @JsonProperty("hubSearch") Optional hubSearch, @JsonProperty("itemClusters") Optional itemClusters, - @JsonProperty("livetv") Optional livetv, - @JsonProperty("machineIdentifier") Optional machineIdentifier, + @JsonProperty("livetv") Optional livetv, + @JsonProperty("machineIdentifier") Optional machineIdentifier, @JsonProperty("mediaProviders") Optional mediaProviders, @JsonProperty("multiuser") Optional multiuser, - @JsonProperty("musicAnalysis") Optional musicAnalysis, + @JsonProperty("musicAnalysis") Optional musicAnalysis, @JsonProperty("myPlex") Optional myPlex, - @JsonProperty("myPlexMappingState") Optional myPlexMappingState, - @JsonProperty("myPlexSigninState") Optional myPlexSigninState, + @JsonProperty("myPlexMappingState") Optional myPlexMappingState, + @JsonProperty("myPlexSigninState") Optional myPlexSigninState, @JsonProperty("myPlexSubscription") Optional myPlexSubscription, @JsonProperty("myPlexUsername") Optional myPlexUsername, - @JsonProperty("offlineTranscode") Optional offlineTranscode, + @JsonProperty("offlineTranscode") Optional offlineTranscode, @JsonProperty("ownerFeatures") Optional ownerFeatures, - @JsonProperty("photoAutoTag") Optional photoAutoTag, @JsonProperty("platform") Optional platform, @JsonProperty("platformVersion") Optional platformVersion, @JsonProperty("pluginHost") Optional pluginHost, @JsonProperty("pushNotifications") Optional pushNotifications, @JsonProperty("readOnlyLibraries") Optional readOnlyLibraries, - @JsonProperty("streamingBrainABRVersion") Optional streamingBrainABRVersion, - @JsonProperty("streamingBrainVersion") Optional streamingBrainVersion, + @JsonProperty("streamingBrainABRVersion") Optional streamingBrainABRVersion, + @JsonProperty("streamingBrainVersion") Optional streamingBrainVersion, @JsonProperty("sync") Optional sync, - @JsonProperty("transcoderActiveVideoSessions") Optional transcoderActiveVideoSessions, + @JsonProperty("transcoderActiveVideoSessions") Optional transcoderActiveVideoSessions, @JsonProperty("transcoderAudio") Optional transcoderAudio, @JsonProperty("transcoderLyrics") Optional transcoderLyrics, @JsonProperty("transcoderPhoto") Optional transcoderPhoto, @JsonProperty("transcoderSubtitles") Optional transcoderSubtitles, @JsonProperty("transcoderVideo") Optional transcoderVideo, - @JsonProperty("transcoderVideoBitrates") Optional transcoderVideoBitrates, + @JsonProperty("transcoderVideoBitrates") Optional transcoderVideoBitrates, @JsonProperty("transcoderVideoQualities") Optional transcoderVideoQualities, - @JsonProperty("transcoderVideoResolutions") Optional transcoderVideoResolutions, - @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("transcoderVideoResolutions") Optional transcoderVideoResolutions, + @JsonProperty("updatedAt") Optional updatedAt, @JsonProperty("updater") Optional updater, @JsonProperty("version") Optional version, @JsonProperty("voiceSearch") Optional voiceSearch, - @JsonProperty("Directory") Optional> directory) { + @JsonProperty("Bandwidths") Optional bandwidths, + @JsonProperty("terminationCode") Optional terminationCode, + @JsonProperty("terminationText") Optional terminationText) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); @@ -355,7 +404,6 @@ public class MediaContainer { Utils.checkNotNull(myPlexUsername, "myPlexUsername"); Utils.checkNotNull(offlineTranscode, "offlineTranscode"); Utils.checkNotNull(ownerFeatures, "ownerFeatures"); - Utils.checkNotNull(photoAutoTag, "photoAutoTag"); Utils.checkNotNull(platform, "platform"); Utils.checkNotNull(platformVersion, "platformVersion"); Utils.checkNotNull(pluginHost, "pluginHost"); @@ -377,8 +425,13 @@ public class MediaContainer { Utils.checkNotNull(updater, "updater"); Utils.checkNotNull(version, "version"); Utils.checkNotNull(voiceSearch, "voiceSearch"); - Utils.checkNotNull(directory, "directory"); + Utils.checkNotNull(bandwidths, "bandwidths"); + Utils.checkNotNull(terminationCode, "terminationCode"); + Utils.checkNotNull(terminationText, "terminationText"); + this.identifier = identifier; + this.offset = offset; this.size = size; + this.totalSize = totalSize; this.allowCameraUpload = allowCameraUpload; this.allowChannelAccess = allowChannelAccess; this.allowMediaDeletion = allowMediaDeletion; @@ -406,7 +459,6 @@ public class MediaContainer { this.myPlexUsername = myPlexUsername; this.offlineTranscode = offlineTranscode; this.ownerFeatures = ownerFeatures; - this.photoAutoTag = photoAutoTag; this.platform = platform; this.platformVersion = platformVersion; this.pluginHost = pluginHost; @@ -428,7 +480,9 @@ public class MediaContainer { this.updater = updater; this.version = version; this.voiceSearch = voiceSearch; - this.directory = directory; + this.bandwidths = bandwidths; + this.terminationCode = terminationCode; + this.terminationText = terminationText; } public MediaContainer() { @@ -448,14 +502,37 @@ public class MediaContainer { Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), 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 size() { + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { return size; } + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + @JsonIgnore public Optional allowCameraUpload() { return allowCameraUpload; @@ -532,13 +609,14 @@ public class MediaContainer { } @JsonIgnore - public Optional livetv() { + public Optional livetv() { return livetv; } + @SuppressWarnings("unchecked") @JsonIgnore - public Optional machineIdentifier() { - return machineIdentifier; + public Optional machineIdentifier() { + return (Optional) machineIdentifier; } @JsonIgnore @@ -552,7 +630,7 @@ public class MediaContainer { } @JsonIgnore - public Optional musicAnalysis() { + public Optional musicAnalysis() { return musicAnalysis; } @@ -561,14 +639,16 @@ public class MediaContainer { return myPlex; } + @SuppressWarnings("unchecked") @JsonIgnore - public Optional myPlexMappingState() { - return myPlexMappingState; + public Optional myPlexMappingState() { + return (Optional) myPlexMappingState; } + @SuppressWarnings("unchecked") @JsonIgnore - public Optional myPlexSigninState() { - return myPlexSigninState; + public Optional myPlexSigninState() { + return (Optional) myPlexSigninState; } @JsonIgnore @@ -581,21 +661,20 @@ public class MediaContainer { return myPlexUsername; } + @SuppressWarnings("unchecked") @JsonIgnore - public Optional offlineTranscode() { - return offlineTranscode; + public Optional offlineTranscode() { + return (Optional) offlineTranscode; } + /** + * A comma-separated list of features which are enabled for the server owner + */ @JsonIgnore public Optional ownerFeatures() { return ownerFeatures; } - @JsonIgnore - public Optional photoAutoTag() { - return photoAutoTag; - } - @JsonIgnore public Optional platform() { return platform; @@ -622,12 +701,12 @@ public class MediaContainer { } @JsonIgnore - public Optional streamingBrainABRVersion() { + public Optional streamingBrainABRVersion() { return streamingBrainABRVersion; } @JsonIgnore - public Optional streamingBrainVersion() { + public Optional streamingBrainVersion() { return streamingBrainVersion; } @@ -637,7 +716,7 @@ public class MediaContainer { } @JsonIgnore - public Optional transcoderActiveVideoSessions() { + public Optional transcoderActiveVideoSessions() { return transcoderActiveVideoSessions; } @@ -666,9 +745,13 @@ public class MediaContainer { return transcoderVideo; } + /** + * The suggested video quality bitrates to present to the user + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional transcoderVideoBitrates() { - return transcoderVideoBitrates; + public Optional transcoderVideoBitrates() { + return (Optional) transcoderVideoBitrates; } @JsonIgnore @@ -676,13 +759,17 @@ public class MediaContainer { return transcoderVideoQualities; } + /** + * The suggested video resolutions to the above quality bitrates + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional transcoderVideoResolutions() { - return transcoderVideoResolutions; + public Optional transcoderVideoResolutions() { + return (Optional) transcoderVideoResolutions; } @JsonIgnore - public Optional updatedAt() { + public Optional updatedAt() { return updatedAt; } @@ -701,10 +788,29 @@ public class MediaContainer { return voiceSearch; } + /** + * A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth + */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional> directory() { - return (Optional>) directory; + public Optional bandwidths() { + return (Optional) bandwidths; + } + + /** + * A code describing why the session was terminated by the server. + */ + @JsonIgnore + public Optional terminationCode() { + return terminationCode; + } + + /** + * A user friendly and localized text describing why the session was terminated by the server. + */ + @JsonIgnore + public Optional terminationText() { + return terminationText; } public static Builder builder() { @@ -712,19 +818,70 @@ public class MediaContainer { } - public MediaContainer withSize(double size) { + public MediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainer withSize(long size) { Utils.checkNotNull(size, "size"); this.size = Optional.ofNullable(size); return this; } - public MediaContainer withSize(Optional size) { + public MediaContainer withSize(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + public MediaContainer withAllowCameraUpload(boolean allowCameraUpload) { Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); @@ -920,27 +1077,27 @@ public class MediaContainer { return this; } - public MediaContainer withLivetv(double livetv) { + public MediaContainer withLivetv(long livetv) { Utils.checkNotNull(livetv, "livetv"); this.livetv = Optional.ofNullable(livetv); return this; } - public MediaContainer withLivetv(Optional livetv) { + public MediaContainer withLivetv(Optional livetv) { Utils.checkNotNull(livetv, "livetv"); this.livetv = livetv; return this; } - public MediaContainer withMachineIdentifier(String machineIdentifier) { + public MediaContainer withMachineIdentifier(Object machineIdentifier) { Utils.checkNotNull(machineIdentifier, "machineIdentifier"); this.machineIdentifier = Optional.ofNullable(machineIdentifier); return this; } - public MediaContainer withMachineIdentifier(Optional machineIdentifier) { + public MediaContainer withMachineIdentifier(Optional machineIdentifier) { Utils.checkNotNull(machineIdentifier, "machineIdentifier"); this.machineIdentifier = machineIdentifier; return this; @@ -972,14 +1129,14 @@ public class MediaContainer { return this; } - public MediaContainer withMusicAnalysis(double musicAnalysis) { + public MediaContainer withMusicAnalysis(long musicAnalysis) { Utils.checkNotNull(musicAnalysis, "musicAnalysis"); this.musicAnalysis = Optional.ofNullable(musicAnalysis); return this; } - public MediaContainer withMusicAnalysis(Optional musicAnalysis) { + public MediaContainer withMusicAnalysis(Optional musicAnalysis) { Utils.checkNotNull(musicAnalysis, "musicAnalysis"); this.musicAnalysis = musicAnalysis; return this; @@ -998,27 +1155,27 @@ public class MediaContainer { return this; } - public MediaContainer withMyPlexMappingState(String myPlexMappingState) { + public MediaContainer withMyPlexMappingState(Object myPlexMappingState) { Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); this.myPlexMappingState = Optional.ofNullable(myPlexMappingState); return this; } - public MediaContainer withMyPlexMappingState(Optional myPlexMappingState) { + public MediaContainer withMyPlexMappingState(Optional myPlexMappingState) { Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); this.myPlexMappingState = myPlexMappingState; return this; } - public MediaContainer withMyPlexSigninState(String myPlexSigninState) { + public MediaContainer withMyPlexSigninState(Object myPlexSigninState) { Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); this.myPlexSigninState = Optional.ofNullable(myPlexSigninState); return this; } - public MediaContainer withMyPlexSigninState(Optional myPlexSigninState) { + public MediaContainer withMyPlexSigninState(Optional myPlexSigninState) { Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); this.myPlexSigninState = myPlexSigninState; return this; @@ -1050,19 +1207,22 @@ public class MediaContainer { return this; } - public MediaContainer withOfflineTranscode(double offlineTranscode) { + public MediaContainer withOfflineTranscode(Object offlineTranscode) { Utils.checkNotNull(offlineTranscode, "offlineTranscode"); this.offlineTranscode = Optional.ofNullable(offlineTranscode); return this; } - public MediaContainer withOfflineTranscode(Optional offlineTranscode) { + public MediaContainer withOfflineTranscode(Optional offlineTranscode) { Utils.checkNotNull(offlineTranscode, "offlineTranscode"); this.offlineTranscode = offlineTranscode; return this; } + /** + * A comma-separated list of features which are enabled for the server owner + */ public MediaContainer withOwnerFeatures(String ownerFeatures) { Utils.checkNotNull(ownerFeatures, "ownerFeatures"); this.ownerFeatures = Optional.ofNullable(ownerFeatures); @@ -1070,25 +1230,15 @@ public class MediaContainer { } + /** + * A comma-separated list of features which are enabled for the server owner + */ public MediaContainer withOwnerFeatures(Optional ownerFeatures) { Utils.checkNotNull(ownerFeatures, "ownerFeatures"); this.ownerFeatures = ownerFeatures; return this; } - public MediaContainer withPhotoAutoTag(boolean photoAutoTag) { - Utils.checkNotNull(photoAutoTag, "photoAutoTag"); - this.photoAutoTag = Optional.ofNullable(photoAutoTag); - return this; - } - - - public MediaContainer withPhotoAutoTag(Optional photoAutoTag) { - Utils.checkNotNull(photoAutoTag, "photoAutoTag"); - this.photoAutoTag = photoAutoTag; - return this; - } - public MediaContainer withPlatform(String platform) { Utils.checkNotNull(platform, "platform"); this.platform = Optional.ofNullable(platform); @@ -1154,27 +1304,27 @@ public class MediaContainer { return this; } - public MediaContainer withStreamingBrainABRVersion(double streamingBrainABRVersion) { + public MediaContainer withStreamingBrainABRVersion(long streamingBrainABRVersion) { Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); this.streamingBrainABRVersion = Optional.ofNullable(streamingBrainABRVersion); return this; } - public MediaContainer withStreamingBrainABRVersion(Optional streamingBrainABRVersion) { + public MediaContainer withStreamingBrainABRVersion(Optional streamingBrainABRVersion) { Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); this.streamingBrainABRVersion = streamingBrainABRVersion; return this; } - public MediaContainer withStreamingBrainVersion(double streamingBrainVersion) { + public MediaContainer withStreamingBrainVersion(long streamingBrainVersion) { Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); this.streamingBrainVersion = Optional.ofNullable(streamingBrainVersion); return this; } - public MediaContainer withStreamingBrainVersion(Optional streamingBrainVersion) { + public MediaContainer withStreamingBrainVersion(Optional streamingBrainVersion) { Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); this.streamingBrainVersion = streamingBrainVersion; return this; @@ -1193,14 +1343,14 @@ public class MediaContainer { return this; } - public MediaContainer withTranscoderActiveVideoSessions(double transcoderActiveVideoSessions) { + public MediaContainer withTranscoderActiveVideoSessions(long transcoderActiveVideoSessions) { Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); this.transcoderActiveVideoSessions = Optional.ofNullable(transcoderActiveVideoSessions); return this; } - public MediaContainer withTranscoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { + public MediaContainer withTranscoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; return this; @@ -1271,14 +1421,20 @@ public class MediaContainer { return this; } - public MediaContainer withTranscoderVideoBitrates(String transcoderVideoBitrates) { + /** + * The suggested video quality bitrates to present to the user + */ + public MediaContainer withTranscoderVideoBitrates(Object transcoderVideoBitrates) { Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); this.transcoderVideoBitrates = Optional.ofNullable(transcoderVideoBitrates); return this; } - public MediaContainer withTranscoderVideoBitrates(Optional transcoderVideoBitrates) { + /** + * The suggested video quality bitrates to present to the user + */ + public MediaContainer withTranscoderVideoBitrates(Optional transcoderVideoBitrates) { Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); this.transcoderVideoBitrates = transcoderVideoBitrates; return this; @@ -1297,27 +1453,33 @@ public class MediaContainer { return this; } - public MediaContainer withTranscoderVideoResolutions(String transcoderVideoResolutions) { + /** + * The suggested video resolutions to the above quality bitrates + */ + public MediaContainer withTranscoderVideoResolutions(Object transcoderVideoResolutions) { Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); this.transcoderVideoResolutions = Optional.ofNullable(transcoderVideoResolutions); return this; } - public MediaContainer withTranscoderVideoResolutions(Optional transcoderVideoResolutions) { + /** + * The suggested video resolutions to the above quality bitrates + */ + public MediaContainer withTranscoderVideoResolutions(Optional transcoderVideoResolutions) { Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); this.transcoderVideoResolutions = transcoderVideoResolutions; return this; } - public MediaContainer withUpdatedAt(double updatedAt) { + public MediaContainer withUpdatedAt(long updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = Optional.ofNullable(updatedAt); return this; } - public MediaContainer withUpdatedAt(Optional updatedAt) { + public MediaContainer withUpdatedAt(Optional updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = updatedAt; return this; @@ -1362,16 +1524,60 @@ public class MediaContainer { return this; } - public MediaContainer withDirectory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); + /** + * A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth + */ + public MediaContainer withBandwidths(Bandwidths bandwidths) { + Utils.checkNotNull(bandwidths, "bandwidths"); + this.bandwidths = Optional.ofNullable(bandwidths); return this; } - public MediaContainer withDirectory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; + /** + * A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth + */ + public MediaContainer withBandwidths(Optional bandwidths) { + Utils.checkNotNull(bandwidths, "bandwidths"); + this.bandwidths = bandwidths; + return this; + } + + /** + * A code describing why the session was terminated by the server. + */ + public MediaContainer withTerminationCode(long terminationCode) { + Utils.checkNotNull(terminationCode, "terminationCode"); + this.terminationCode = Optional.ofNullable(terminationCode); + return this; + } + + + /** + * A code describing why the session was terminated by the server. + */ + public MediaContainer withTerminationCode(Optional terminationCode) { + Utils.checkNotNull(terminationCode, "terminationCode"); + this.terminationCode = terminationCode; + return this; + } + + /** + * A user friendly and localized text describing why the session was terminated by the server. + */ + public MediaContainer withTerminationText(String terminationText) { + Utils.checkNotNull(terminationText, "terminationText"); + this.terminationText = Optional.ofNullable(terminationText); + return this; + } + + + /** + * A user friendly and localized text describing why the session was terminated by the server. + */ + public MediaContainer withTerminationText(Optional terminationText) { + Utils.checkNotNull(terminationText, "terminationText"); + this.terminationText = terminationText; return this; } @@ -1385,7 +1591,10 @@ public class MediaContainer { } MediaContainer other = (MediaContainer) o; return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && Utils.enhancedDeepEquals(this.allowCameraUpload, other.allowCameraUpload) && Utils.enhancedDeepEquals(this.allowChannelAccess, other.allowChannelAccess) && Utils.enhancedDeepEquals(this.allowMediaDeletion, other.allowMediaDeletion) && @@ -1413,7 +1622,6 @@ public class MediaContainer { Utils.enhancedDeepEquals(this.myPlexUsername, other.myPlexUsername) && Utils.enhancedDeepEquals(this.offlineTranscode, other.offlineTranscode) && Utils.enhancedDeepEquals(this.ownerFeatures, other.ownerFeatures) && - Utils.enhancedDeepEquals(this.photoAutoTag, other.photoAutoTag) && Utils.enhancedDeepEquals(this.platform, other.platform) && Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && Utils.enhancedDeepEquals(this.pluginHost, other.pluginHost) && @@ -1435,13 +1643,16 @@ public class MediaContainer { Utils.enhancedDeepEquals(this.updater, other.updater) && Utils.enhancedDeepEquals(this.version, other.version) && Utils.enhancedDeepEquals(this.voiceSearch, other.voiceSearch) && - Utils.enhancedDeepEquals(this.directory, other.directory); + Utils.enhancedDeepEquals(this.bandwidths, other.bandwidths) && + Utils.enhancedDeepEquals(this.terminationCode, other.terminationCode) && + Utils.enhancedDeepEquals(this.terminationText, other.terminationText); } @Override public int hashCode() { return Utils.enhancedHash( - size, allowCameraUpload, allowChannelAccess, + identifier, offset, size, + totalSize, allowCameraUpload, allowChannelAccess, allowMediaDeletion, allowSharing, allowSync, allowTuners, backgroundProcessing, certificate, companionProxy, countryCode, diagnostics, @@ -1450,20 +1661,24 @@ public class MediaContainer { mediaProviders, multiuser, musicAnalysis, myPlex, myPlexMappingState, myPlexSigninState, myPlexSubscription, myPlexUsername, offlineTranscode, - ownerFeatures, photoAutoTag, platform, - platformVersion, pluginHost, pushNotifications, - readOnlyLibraries, streamingBrainABRVersion, streamingBrainVersion, - sync, transcoderActiveVideoSessions, transcoderAudio, - transcoderLyrics, transcoderPhoto, transcoderSubtitles, - transcoderVideo, transcoderVideoBitrates, transcoderVideoQualities, - transcoderVideoResolutions, updatedAt, updater, - version, voiceSearch, directory); + ownerFeatures, platform, platformVersion, + pluginHost, pushNotifications, readOnlyLibraries, + streamingBrainABRVersion, streamingBrainVersion, sync, + transcoderActiveVideoSessions, transcoderAudio, transcoderLyrics, + transcoderPhoto, transcoderSubtitles, transcoderVideo, + transcoderVideoBitrates, transcoderVideoQualities, transcoderVideoResolutions, + updatedAt, updater, version, + voiceSearch, bandwidths, terminationCode, + terminationText); } @Override public String toString() { return Utils.toString(MediaContainer.class, + "identifier", identifier, + "offset", offset, "size", size, + "totalSize", totalSize, "allowCameraUpload", allowCameraUpload, "allowChannelAccess", allowChannelAccess, "allowMediaDeletion", allowMediaDeletion, @@ -1491,7 +1706,6 @@ public class MediaContainer { "myPlexUsername", myPlexUsername, "offlineTranscode", offlineTranscode, "ownerFeatures", ownerFeatures, - "photoAutoTag", photoAutoTag, "platform", platform, "platformVersion", platformVersion, "pluginHost", pluginHost, @@ -1513,13 +1727,21 @@ public class MediaContainer { "updater", updater, "version", version, "voiceSearch", voiceSearch, - "directory", directory); + "bandwidths", bandwidths, + "terminationCode", terminationCode, + "terminationText", terminationText); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional size = Optional.empty(); + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); private Optional allowCameraUpload = Optional.empty(); @@ -1551,32 +1773,30 @@ public class MediaContainer { private Optional itemClusters = Optional.empty(); - private Optional livetv = Optional.empty(); + private Optional livetv = Optional.empty(); - private Optional machineIdentifier = Optional.empty(); + private Optional machineIdentifier = Optional.empty(); private Optional mediaProviders = Optional.empty(); private Optional multiuser = Optional.empty(); - private Optional musicAnalysis = Optional.empty(); + private Optional musicAnalysis = Optional.empty(); private Optional myPlex = Optional.empty(); - private Optional myPlexMappingState = Optional.empty(); + private Optional myPlexMappingState = Optional.empty(); - private Optional myPlexSigninState = Optional.empty(); + private Optional myPlexSigninState = Optional.empty(); private Optional myPlexSubscription = Optional.empty(); private Optional myPlexUsername = Optional.empty(); - private Optional offlineTranscode = Optional.empty(); + private Optional offlineTranscode = Optional.empty(); private Optional ownerFeatures = Optional.empty(); - private Optional photoAutoTag = Optional.empty(); - private Optional platform = Optional.empty(); private Optional platformVersion = Optional.empty(); @@ -1587,13 +1807,13 @@ public class MediaContainer { private Optional readOnlyLibraries = Optional.empty(); - private Optional streamingBrainABRVersion = Optional.empty(); + private Optional streamingBrainABRVersion = Optional.empty(); - private Optional streamingBrainVersion = Optional.empty(); + private Optional streamingBrainVersion = Optional.empty(); private Optional sync = Optional.empty(); - private Optional transcoderActiveVideoSessions = Optional.empty(); + private Optional transcoderActiveVideoSessions = Optional.empty(); private Optional transcoderAudio = Optional.empty(); @@ -1605,13 +1825,13 @@ public class MediaContainer { private Optional transcoderVideo = Optional.empty(); - private Optional transcoderVideoBitrates = Optional.empty(); + private Optional transcoderVideoBitrates = Optional.empty(); private Optional transcoderVideoQualities = Optional.empty(); - private Optional transcoderVideoResolutions = Optional.empty(); + private Optional transcoderVideoResolutions = Optional.empty(); - private Optional updatedAt = Optional.empty(); + private Optional updatedAt = Optional.empty(); private Optional updater = Optional.empty(); @@ -1619,26 +1839,81 @@ public class MediaContainer { private Optional voiceSearch = Optional.empty(); - private Optional> directory = Optional.empty(); + private Optional bandwidths = Optional.empty(); + + private Optional terminationCode = Optional.empty(); + + private Optional terminationText = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder size(double size) { + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long size) { Utils.checkNotNull(size, "size"); this.size = Optional.ofNullable(size); return this; } - public Builder size(Optional size) { + public Builder size(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public Builder allowCameraUpload(boolean allowCameraUpload) { Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); @@ -1834,26 +2109,26 @@ public class MediaContainer { } - public Builder livetv(double livetv) { + public Builder livetv(long livetv) { Utils.checkNotNull(livetv, "livetv"); this.livetv = Optional.ofNullable(livetv); return this; } - public Builder livetv(Optional livetv) { + public Builder livetv(Optional livetv) { Utils.checkNotNull(livetv, "livetv"); this.livetv = livetv; return this; } - public Builder machineIdentifier(String machineIdentifier) { + public Builder machineIdentifier(Object machineIdentifier) { Utils.checkNotNull(machineIdentifier, "machineIdentifier"); this.machineIdentifier = Optional.ofNullable(machineIdentifier); return this; } - public Builder machineIdentifier(Optional machineIdentifier) { + public Builder machineIdentifier(Optional machineIdentifier) { Utils.checkNotNull(machineIdentifier, "machineIdentifier"); this.machineIdentifier = machineIdentifier; return this; @@ -1886,13 +2161,13 @@ public class MediaContainer { } - public Builder musicAnalysis(double musicAnalysis) { + public Builder musicAnalysis(long musicAnalysis) { Utils.checkNotNull(musicAnalysis, "musicAnalysis"); this.musicAnalysis = Optional.ofNullable(musicAnalysis); return this; } - public Builder musicAnalysis(Optional musicAnalysis) { + public Builder musicAnalysis(Optional musicAnalysis) { Utils.checkNotNull(musicAnalysis, "musicAnalysis"); this.musicAnalysis = musicAnalysis; return this; @@ -1912,26 +2187,26 @@ public class MediaContainer { } - public Builder myPlexMappingState(String myPlexMappingState) { + public Builder myPlexMappingState(Object myPlexMappingState) { Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); this.myPlexMappingState = Optional.ofNullable(myPlexMappingState); return this; } - public Builder myPlexMappingState(Optional myPlexMappingState) { + public Builder myPlexMappingState(Optional myPlexMappingState) { Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); this.myPlexMappingState = myPlexMappingState; return this; } - public Builder myPlexSigninState(String myPlexSigninState) { + public Builder myPlexSigninState(Object myPlexSigninState) { Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); this.myPlexSigninState = Optional.ofNullable(myPlexSigninState); return this; } - public Builder myPlexSigninState(Optional myPlexSigninState) { + public Builder myPlexSigninState(Optional myPlexSigninState) { Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); this.myPlexSigninState = myPlexSigninState; return this; @@ -1964,25 +2239,31 @@ public class MediaContainer { } - public Builder offlineTranscode(double offlineTranscode) { + public Builder offlineTranscode(Object offlineTranscode) { Utils.checkNotNull(offlineTranscode, "offlineTranscode"); this.offlineTranscode = Optional.ofNullable(offlineTranscode); return this; } - public Builder offlineTranscode(Optional offlineTranscode) { + public Builder offlineTranscode(Optional offlineTranscode) { Utils.checkNotNull(offlineTranscode, "offlineTranscode"); this.offlineTranscode = offlineTranscode; return this; } + /** + * A comma-separated list of features which are enabled for the server owner + */ public Builder ownerFeatures(String ownerFeatures) { Utils.checkNotNull(ownerFeatures, "ownerFeatures"); this.ownerFeatures = Optional.ofNullable(ownerFeatures); return this; } + /** + * A comma-separated list of features which are enabled for the server owner + */ public Builder ownerFeatures(Optional ownerFeatures) { Utils.checkNotNull(ownerFeatures, "ownerFeatures"); this.ownerFeatures = ownerFeatures; @@ -1990,19 +2271,6 @@ public class MediaContainer { } - public Builder photoAutoTag(boolean photoAutoTag) { - Utils.checkNotNull(photoAutoTag, "photoAutoTag"); - this.photoAutoTag = Optional.ofNullable(photoAutoTag); - return this; - } - - public Builder photoAutoTag(Optional photoAutoTag) { - Utils.checkNotNull(photoAutoTag, "photoAutoTag"); - this.photoAutoTag = photoAutoTag; - return this; - } - - public Builder platform(String platform) { Utils.checkNotNull(platform, "platform"); this.platform = Optional.ofNullable(platform); @@ -2068,26 +2336,26 @@ public class MediaContainer { } - public Builder streamingBrainABRVersion(double streamingBrainABRVersion) { + public Builder streamingBrainABRVersion(long streamingBrainABRVersion) { Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); this.streamingBrainABRVersion = Optional.ofNullable(streamingBrainABRVersion); return this; } - public Builder streamingBrainABRVersion(Optional streamingBrainABRVersion) { + public Builder streamingBrainABRVersion(Optional streamingBrainABRVersion) { Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); this.streamingBrainABRVersion = streamingBrainABRVersion; return this; } - public Builder streamingBrainVersion(double streamingBrainVersion) { + public Builder streamingBrainVersion(long streamingBrainVersion) { Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); this.streamingBrainVersion = Optional.ofNullable(streamingBrainVersion); return this; } - public Builder streamingBrainVersion(Optional streamingBrainVersion) { + public Builder streamingBrainVersion(Optional streamingBrainVersion) { Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); this.streamingBrainVersion = streamingBrainVersion; return this; @@ -2107,13 +2375,13 @@ public class MediaContainer { } - public Builder transcoderActiveVideoSessions(double transcoderActiveVideoSessions) { + public Builder transcoderActiveVideoSessions(long transcoderActiveVideoSessions) { Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); this.transcoderActiveVideoSessions = Optional.ofNullable(transcoderActiveVideoSessions); return this; } - public Builder transcoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { + public Builder transcoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; return this; @@ -2185,13 +2453,19 @@ public class MediaContainer { } - public Builder transcoderVideoBitrates(String transcoderVideoBitrates) { + /** + * The suggested video quality bitrates to present to the user + */ + public Builder transcoderVideoBitrates(Object transcoderVideoBitrates) { Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); this.transcoderVideoBitrates = Optional.ofNullable(transcoderVideoBitrates); return this; } - public Builder transcoderVideoBitrates(Optional transcoderVideoBitrates) { + /** + * The suggested video quality bitrates to present to the user + */ + public Builder transcoderVideoBitrates(Optional transcoderVideoBitrates) { Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); this.transcoderVideoBitrates = transcoderVideoBitrates; return this; @@ -2211,26 +2485,32 @@ public class MediaContainer { } - public Builder transcoderVideoResolutions(String transcoderVideoResolutions) { + /** + * The suggested video resolutions to the above quality bitrates + */ + public Builder transcoderVideoResolutions(Object transcoderVideoResolutions) { Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); this.transcoderVideoResolutions = Optional.ofNullable(transcoderVideoResolutions); return this; } - public Builder transcoderVideoResolutions(Optional transcoderVideoResolutions) { + /** + * The suggested video resolutions to the above quality bitrates + */ + public Builder transcoderVideoResolutions(Optional transcoderVideoResolutions) { Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); this.transcoderVideoResolutions = transcoderVideoResolutions; return this; } - public Builder updatedAt(double updatedAt) { + public Builder updatedAt(long updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = Optional.ofNullable(updatedAt); return this; } - public Builder updatedAt(Optional updatedAt) { + public Builder updatedAt(Optional updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = updatedAt; return this; @@ -2276,22 +2556,67 @@ public class MediaContainer { } - public Builder directory(List directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); + /** + * A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth + */ + public Builder bandwidths(Bandwidths bandwidths) { + Utils.checkNotNull(bandwidths, "bandwidths"); + this.bandwidths = Optional.ofNullable(bandwidths); return this; } - public Builder directory(Optional> directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; + /** + * A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth + */ + public Builder bandwidths(Optional bandwidths) { + Utils.checkNotNull(bandwidths, "bandwidths"); + this.bandwidths = bandwidths; + return this; + } + + + /** + * A code describing why the session was terminated by the server. + */ + public Builder terminationCode(long terminationCode) { + Utils.checkNotNull(terminationCode, "terminationCode"); + this.terminationCode = Optional.ofNullable(terminationCode); + return this; + } + + /** + * A code describing why the session was terminated by the server. + */ + public Builder terminationCode(Optional terminationCode) { + Utils.checkNotNull(terminationCode, "terminationCode"); + this.terminationCode = terminationCode; + return this; + } + + + /** + * A user friendly and localized text describing why the session was terminated by the server. + */ + public Builder terminationText(String terminationText) { + Utils.checkNotNull(terminationText, "terminationText"); + this.terminationText = Optional.ofNullable(terminationText); + return this; + } + + /** + * A user friendly and localized text describing why the session was terminated by the server. + */ + public Builder terminationText(Optional terminationText) { + Utils.checkNotNull(terminationText, "terminationText"); + this.terminationText = terminationText; return this; } public MediaContainer build() { return new MediaContainer( - size, allowCameraUpload, allowChannelAccess, + identifier, offset, size, + totalSize, allowCameraUpload, allowChannelAccess, allowMediaDeletion, allowSharing, allowSync, allowTuners, backgroundProcessing, certificate, companionProxy, countryCode, diagnostics, @@ -2300,14 +2625,15 @@ public class MediaContainer { mediaProviders, multiuser, musicAnalysis, myPlex, myPlexMappingState, myPlexSigninState, myPlexSubscription, myPlexUsername, offlineTranscode, - ownerFeatures, photoAutoTag, platform, - platformVersion, pluginHost, pushNotifications, - readOnlyLibraries, streamingBrainABRVersion, streamingBrainVersion, - sync, transcoderActiveVideoSessions, transcoderAudio, - transcoderLyrics, transcoderPhoto, transcoderSubtitles, - transcoderVideo, transcoderVideoBitrates, transcoderVideoQualities, - transcoderVideoResolutions, updatedAt, updater, - version, voiceSearch, directory); + ownerFeatures, platform, platformVersion, + pluginHost, pushNotifications, readOnlyLibraries, + streamingBrainABRVersion, streamingBrainVersion, sync, + transcoderActiveVideoSessions, transcoderAudio, transcoderLyrics, + transcoderPhoto, transcoderSubtitles, transcoderVideo, + transcoderVideoBitrates, transcoderVideoQualities, transcoderVideoResolutions, + updatedAt, updater, version, + voiceSearch, bandwidths, terminationCode, + terminationText); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MediaGrabber.java b/src/main/java/dev/plexapi/sdk/models/operations/MediaGrabber.java new file mode 100644 index 00000000..fe0daf8d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MediaGrabber.java @@ -0,0 +1,197 @@ +/* + * 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.Optional; + + +public class MediaGrabber { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("protocol") + private Optional protocol; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonCreator + public MediaGrabber( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("protocol") Optional protocol, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(title, "title"); + this.identifier = identifier; + this.protocol = protocol; + this.title = title; + } + + public MediaGrabber() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + @JsonIgnore + public Optional protocol() { + return protocol; + } + + @JsonIgnore + public Optional title() { + return title; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaGrabber withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaGrabber withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public MediaGrabber withProtocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + + public MediaGrabber withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + public MediaGrabber withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public MediaGrabber 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; + } + MediaGrabber other = (MediaGrabber) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.protocol, other.protocol) && + Utils.enhancedDeepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, protocol, title); + } + + @Override + public String toString() { + return Utils.toString(MediaGrabber.class, + "identifier", identifier, + "protocol", protocol, + "title", title); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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 protocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + 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 MediaGrabber build() { + + return new MediaGrabber( + identifier, protocol, title); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MediaProvider.java b/src/main/java/dev/plexapi/sdk/models/operations/MediaProvider.java deleted file mode 100644 index b432d8be..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/MediaProvider.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class MediaProvider { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("identifier") - private Optional identifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("types") - private Optional types; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("protocols") - private Optional protocols; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Feature") - private Optional> feature; - - @JsonCreator - public MediaProvider( - @JsonProperty("identifier") Optional identifier, - @JsonProperty("title") Optional title, - @JsonProperty("types") Optional types, - @JsonProperty("protocols") Optional protocols, - @JsonProperty("Feature") Optional> feature) { - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(types, "types"); - Utils.checkNotNull(protocols, "protocols"); - Utils.checkNotNull(feature, "feature"); - this.identifier = identifier; - this.title = title; - this.types = types; - this.protocols = protocols; - this.feature = feature; - } - - public MediaProvider() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional identifier() { - return identifier; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional types() { - return types; - } - - @JsonIgnore - public Optional protocols() { - return protocols; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> feature() { - return (Optional>) feature; - } - - public static Builder builder() { - return new Builder(); - } - - - public MediaProvider withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = Optional.ofNullable(identifier); - return this; - } - - - public MediaProvider withIdentifier(Optional identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public MediaProvider withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public MediaProvider withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public MediaProvider withTypes(String types) { - Utils.checkNotNull(types, "types"); - this.types = Optional.ofNullable(types); - return this; - } - - - public MediaProvider withTypes(Optional types) { - Utils.checkNotNull(types, "types"); - this.types = types; - return this; - } - - public MediaProvider withProtocols(String protocols) { - Utils.checkNotNull(protocols, "protocols"); - this.protocols = Optional.ofNullable(protocols); - return this; - } - - - public MediaProvider withProtocols(Optional protocols) { - Utils.checkNotNull(protocols, "protocols"); - this.protocols = protocols; - return this; - } - - public MediaProvider withFeature(List feature) { - Utils.checkNotNull(feature, "feature"); - this.feature = Optional.ofNullable(feature); - return this; - } - - - public MediaProvider withFeature(Optional> feature) { - Utils.checkNotNull(feature, "feature"); - this.feature = feature; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MediaProvider other = (MediaProvider) o; - return - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.types, other.types) && - Utils.enhancedDeepEquals(this.protocols, other.protocols) && - Utils.enhancedDeepEquals(this.feature, other.feature); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - identifier, title, types, - protocols, feature); - } - - @Override - public String toString() { - return Utils.toString(MediaProvider.class, - "identifier", identifier, - "title", title, - "types", types, - "protocols", protocols, - "feature", feature); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional identifier = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional types = Optional.empty(); - - private Optional protocols = Optional.empty(); - - private Optional> feature = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - 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 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 types(String types) { - Utils.checkNotNull(types, "types"); - this.types = Optional.ofNullable(types); - return this; - } - - public Builder types(Optional types) { - Utils.checkNotNull(types, "types"); - this.types = types; - return this; - } - - - public Builder protocols(String protocols) { - Utils.checkNotNull(protocols, "protocols"); - this.protocols = Optional.ofNullable(protocols); - return this; - } - - public Builder protocols(Optional protocols) { - Utils.checkNotNull(protocols, "protocols"); - this.protocols = protocols; - return this; - } - - - public Builder feature(List feature) { - Utils.checkNotNull(feature, "feature"); - this.feature = Optional.ofNullable(feature); - return this; - } - - public Builder feature(Optional> feature) { - Utils.checkNotNull(feature, "feature"); - this.feature = feature; - return this; - } - - public MediaProvider build() { - - return new MediaProvider( - identifier, title, types, - protocols, feature); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MediaReviewsVisibility.java b/src/main/java/dev/plexapi/sdk/models/operations/MediaReviewsVisibility.java deleted file mode 100644 index 9d819b6c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/MediaReviewsVisibility.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * MediaReviewsVisibility - * - *

Whether or not the account has media reviews visibility enabled - */ -public enum MediaReviewsVisibility { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - MediaReviewsVisibility(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (MediaReviewsVisibility o: MediaReviewsVisibility.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MediaSettings.java b/src/main/java/dev/plexapi/sdk/models/operations/MediaSettings.java new file mode 100644 index 00000000..a47b346c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MediaSettings.java @@ -0,0 +1,951 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class MediaSettings { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("advancedSubtitles") + private Optional advancedSubtitles; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioBoost") + private Optional audioBoost; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannelCount") + private Optional audioChannelCount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("autoAdjustQuality") + private Optional autoAdjustQuality; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("autoAdjustSubtitle") + private Optional autoAdjustSubtitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directPlay") + private Optional directPlay; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directStream") + private Optional directStream; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directStreamAudio") + private Optional directStreamAudio; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("disableResolutionRotation") + private Optional disableResolutionRotation; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("maxVideoBitrate") + private Optional maxVideoBitrate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("musicBitrate") + private Optional musicBitrate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("peakBitrate") + private Optional peakBitrate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("photoQuality") + private Optional photoQuality; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("photoResolution") + private Optional photoResolution; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secondsPerSegment") + private Optional secondsPerSegment; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtitles") + private Optional subtitles; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtitleSize") + private Optional subtitleSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoBitrate") + private Optional videoBitrate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoQuality") + private Optional videoQuality; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + @JsonCreator + public MediaSettings( + @JsonProperty("advancedSubtitles") Optional advancedSubtitles, + @JsonProperty("audioBoost") Optional audioBoost, + @JsonProperty("audioChannelCount") Optional audioChannelCount, + @JsonProperty("autoAdjustQuality") Optional autoAdjustQuality, + @JsonProperty("autoAdjustSubtitle") Optional autoAdjustSubtitle, + @JsonProperty("directPlay") Optional directPlay, + @JsonProperty("directStream") Optional directStream, + @JsonProperty("directStreamAudio") Optional directStreamAudio, + @JsonProperty("disableResolutionRotation") Optional disableResolutionRotation, + @JsonProperty("maxVideoBitrate") Optional maxVideoBitrate, + @JsonProperty("musicBitrate") Optional musicBitrate, + @JsonProperty("peakBitrate") Optional peakBitrate, + @JsonProperty("photoQuality") Optional photoQuality, + @JsonProperty("photoResolution") Optional photoResolution, + @JsonProperty("secondsPerSegment") Optional secondsPerSegment, + @JsonProperty("subtitles") Optional subtitles, + @JsonProperty("subtitleSize") Optional subtitleSize, + @JsonProperty("videoBitrate") Optional videoBitrate, + @JsonProperty("videoQuality") Optional videoQuality, + @JsonProperty("videoResolution") Optional videoResolution) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + Utils.checkNotNull(audioBoost, "audioBoost"); + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + Utils.checkNotNull(directPlay, "directPlay"); + Utils.checkNotNull(directStream, "directStream"); + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + Utils.checkNotNull(maxVideoBitrate, "maxVideoBitrate"); + Utils.checkNotNull(musicBitrate, "musicBitrate"); + Utils.checkNotNull(peakBitrate, "peakBitrate"); + Utils.checkNotNull(photoQuality, "photoQuality"); + Utils.checkNotNull(photoResolution, "photoResolution"); + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + Utils.checkNotNull(subtitles, "subtitles"); + Utils.checkNotNull(subtitleSize, "subtitleSize"); + Utils.checkNotNull(videoBitrate, "videoBitrate"); + Utils.checkNotNull(videoQuality, "videoQuality"); + Utils.checkNotNull(videoResolution, "videoResolution"); + this.advancedSubtitles = advancedSubtitles; + this.audioBoost = audioBoost; + this.audioChannelCount = audioChannelCount; + this.autoAdjustQuality = autoAdjustQuality; + this.autoAdjustSubtitle = autoAdjustSubtitle; + this.directPlay = directPlay; + this.directStream = directStream; + this.directStreamAudio = directStreamAudio; + this.disableResolutionRotation = disableResolutionRotation; + this.maxVideoBitrate = maxVideoBitrate; + this.musicBitrate = musicBitrate; + this.peakBitrate = peakBitrate; + this.photoQuality = photoQuality; + this.photoResolution = photoResolution; + this.secondsPerSegment = secondsPerSegment; + this.subtitles = subtitles; + this.subtitleSize = subtitleSize; + this.videoBitrate = videoBitrate; + this.videoQuality = videoQuality; + this.videoResolution = videoResolution; + } + + public MediaSettings() { + 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()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional advancedSubtitles() { + return (Optional) advancedSubtitles; + } + + @JsonIgnore + public Optional audioBoost() { + return audioBoost; + } + + @JsonIgnore + public Optional audioChannelCount() { + return audioChannelCount; + } + + @JsonIgnore + public Optional autoAdjustQuality() { + return autoAdjustQuality; + } + + @JsonIgnore + public Optional autoAdjustSubtitle() { + return autoAdjustSubtitle; + } + + @JsonIgnore + public Optional directPlay() { + return directPlay; + } + + @JsonIgnore + public Optional directStream() { + return directStream; + } + + @JsonIgnore + public Optional directStreamAudio() { + return directStreamAudio; + } + + @JsonIgnore + public Optional disableResolutionRotation() { + return disableResolutionRotation; + } + + @JsonIgnore + public Optional maxVideoBitrate() { + return maxVideoBitrate; + } + + @JsonIgnore + public Optional musicBitrate() { + return musicBitrate; + } + + @JsonIgnore + public Optional peakBitrate() { + return peakBitrate; + } + + @JsonIgnore + public Optional photoQuality() { + return photoQuality; + } + + @JsonIgnore + public Optional photoResolution() { + return photoResolution; + } + + @JsonIgnore + public Optional secondsPerSegment() { + return secondsPerSegment; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtitles() { + return (Optional) subtitles; + } + + @JsonIgnore + public Optional subtitleSize() { + return subtitleSize; + } + + @JsonIgnore + public Optional videoBitrate() { + return videoBitrate; + } + + @JsonIgnore + public Optional videoQuality() { + return videoQuality; + } + + @JsonIgnore + public Optional videoResolution() { + return videoResolution; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaSettings withAdvancedSubtitles(AdvancedSubtitles advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = Optional.ofNullable(advancedSubtitles); + return this; + } + + + public MediaSettings withAdvancedSubtitles(Optional advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = advancedSubtitles; + return this; + } + + public MediaSettings withAudioBoost(long audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + + public MediaSettings withAudioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + public MediaSettings withAudioChannelCount(long audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = Optional.ofNullable(audioChannelCount); + return this; + } + + + public MediaSettings withAudioChannelCount(Optional audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = audioChannelCount; + return this; + } + + public MediaSettings withAutoAdjustQuality(boolean autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + + public MediaSettings withAutoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + public MediaSettings withAutoAdjustSubtitle(boolean autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + + public MediaSettings withAutoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + public MediaSettings withDirectPlay(boolean directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + + public MediaSettings withDirectPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + public MediaSettings withDirectStream(boolean directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + + public MediaSettings withDirectStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + public MediaSettings withDirectStreamAudio(boolean directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = Optional.ofNullable(directStreamAudio); + return this; + } + + + public MediaSettings withDirectStreamAudio(Optional directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = directStreamAudio; + return this; + } + + public MediaSettings withDisableResolutionRotation(boolean disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = Optional.ofNullable(disableResolutionRotation); + return this; + } + + + public MediaSettings withDisableResolutionRotation(Optional disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = disableResolutionRotation; + return this; + } + + public MediaSettings withMaxVideoBitrate(long maxVideoBitrate) { + Utils.checkNotNull(maxVideoBitrate, "maxVideoBitrate"); + this.maxVideoBitrate = Optional.ofNullable(maxVideoBitrate); + return this; + } + + + public MediaSettings withMaxVideoBitrate(Optional maxVideoBitrate) { + Utils.checkNotNull(maxVideoBitrate, "maxVideoBitrate"); + this.maxVideoBitrate = maxVideoBitrate; + return this; + } + + public MediaSettings withMusicBitrate(long musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = Optional.ofNullable(musicBitrate); + return this; + } + + + public MediaSettings withMusicBitrate(Optional musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = musicBitrate; + return this; + } + + public MediaSettings withPeakBitrate(long peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = Optional.ofNullable(peakBitrate); + return this; + } + + + public MediaSettings withPeakBitrate(Optional peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = peakBitrate; + return this; + } + + public MediaSettings withPhotoQuality(long photoQuality) { + Utils.checkNotNull(photoQuality, "photoQuality"); + this.photoQuality = Optional.ofNullable(photoQuality); + return this; + } + + + public MediaSettings withPhotoQuality(Optional photoQuality) { + Utils.checkNotNull(photoQuality, "photoQuality"); + this.photoQuality = photoQuality; + return this; + } + + public MediaSettings withPhotoResolution(String photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = Optional.ofNullable(photoResolution); + return this; + } + + + public MediaSettings withPhotoResolution(Optional photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = photoResolution; + return this; + } + + public MediaSettings withSecondsPerSegment(long secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = Optional.ofNullable(secondsPerSegment); + return this; + } + + + public MediaSettings withSecondsPerSegment(Optional secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = secondsPerSegment; + return this; + } + + public MediaSettings withSubtitles(GetPlaylistGeneratorSubtitles subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = Optional.ofNullable(subtitles); + return this; + } + + + public MediaSettings withSubtitles(Optional subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = subtitles; + return this; + } + + public MediaSettings withSubtitleSize(long subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + + public MediaSettings withSubtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + public MediaSettings withVideoBitrate(long videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = Optional.ofNullable(videoBitrate); + return this; + } + + + public MediaSettings withVideoBitrate(Optional videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = videoBitrate; + return this; + } + + public MediaSettings withVideoQuality(long videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = Optional.ofNullable(videoQuality); + return this; + } + + + public MediaSettings withVideoQuality(Optional videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = videoQuality; + return this; + } + + public MediaSettings withVideoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + + public MediaSettings withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaSettings other = (MediaSettings) o; + return + Utils.enhancedDeepEquals(this.advancedSubtitles, other.advancedSubtitles) && + Utils.enhancedDeepEquals(this.audioBoost, other.audioBoost) && + Utils.enhancedDeepEquals(this.audioChannelCount, other.audioChannelCount) && + Utils.enhancedDeepEquals(this.autoAdjustQuality, other.autoAdjustQuality) && + Utils.enhancedDeepEquals(this.autoAdjustSubtitle, other.autoAdjustSubtitle) && + Utils.enhancedDeepEquals(this.directPlay, other.directPlay) && + Utils.enhancedDeepEquals(this.directStream, other.directStream) && + Utils.enhancedDeepEquals(this.directStreamAudio, other.directStreamAudio) && + Utils.enhancedDeepEquals(this.disableResolutionRotation, other.disableResolutionRotation) && + Utils.enhancedDeepEquals(this.maxVideoBitrate, other.maxVideoBitrate) && + Utils.enhancedDeepEquals(this.musicBitrate, other.musicBitrate) && + Utils.enhancedDeepEquals(this.peakBitrate, other.peakBitrate) && + Utils.enhancedDeepEquals(this.photoQuality, other.photoQuality) && + Utils.enhancedDeepEquals(this.photoResolution, other.photoResolution) && + Utils.enhancedDeepEquals(this.secondsPerSegment, other.secondsPerSegment) && + Utils.enhancedDeepEquals(this.subtitles, other.subtitles) && + Utils.enhancedDeepEquals(this.subtitleSize, other.subtitleSize) && + Utils.enhancedDeepEquals(this.videoBitrate, other.videoBitrate) && + Utils.enhancedDeepEquals(this.videoQuality, other.videoQuality) && + Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + advancedSubtitles, audioBoost, audioChannelCount, + autoAdjustQuality, autoAdjustSubtitle, directPlay, + directStream, directStreamAudio, disableResolutionRotation, + maxVideoBitrate, musicBitrate, peakBitrate, + photoQuality, photoResolution, secondsPerSegment, + subtitles, subtitleSize, videoBitrate, + videoQuality, videoResolution); + } + + @Override + public String toString() { + return Utils.toString(MediaSettings.class, + "advancedSubtitles", advancedSubtitles, + "audioBoost", audioBoost, + "audioChannelCount", audioChannelCount, + "autoAdjustQuality", autoAdjustQuality, + "autoAdjustSubtitle", autoAdjustSubtitle, + "directPlay", directPlay, + "directStream", directStream, + "directStreamAudio", directStreamAudio, + "disableResolutionRotation", disableResolutionRotation, + "maxVideoBitrate", maxVideoBitrate, + "musicBitrate", musicBitrate, + "peakBitrate", peakBitrate, + "photoQuality", photoQuality, + "photoResolution", photoResolution, + "secondsPerSegment", secondsPerSegment, + "subtitles", subtitles, + "subtitleSize", subtitleSize, + "videoBitrate", videoBitrate, + "videoQuality", videoQuality, + "videoResolution", videoResolution); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional advancedSubtitles = Optional.empty(); + + private Optional audioBoost = Optional.empty(); + + private Optional audioChannelCount = Optional.empty(); + + private Optional autoAdjustQuality = Optional.empty(); + + private Optional autoAdjustSubtitle = Optional.empty(); + + private Optional directPlay = Optional.empty(); + + private Optional directStream = Optional.empty(); + + private Optional directStreamAudio = Optional.empty(); + + private Optional disableResolutionRotation = Optional.empty(); + + private Optional maxVideoBitrate = Optional.empty(); + + private Optional musicBitrate = Optional.empty(); + + private Optional peakBitrate = Optional.empty(); + + private Optional photoQuality = Optional.empty(); + + private Optional photoResolution = Optional.empty(); + + private Optional secondsPerSegment = Optional.empty(); + + private Optional subtitles = Optional.empty(); + + private Optional subtitleSize = Optional.empty(); + + private Optional videoBitrate = Optional.empty(); + + private Optional videoQuality = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder advancedSubtitles(AdvancedSubtitles advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = Optional.ofNullable(advancedSubtitles); + return this; + } + + public Builder advancedSubtitles(Optional advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = advancedSubtitles; + return this; + } + + + public Builder audioBoost(long audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + public Builder audioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + + public Builder audioChannelCount(long audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = Optional.ofNullable(audioChannelCount); + return this; + } + + public Builder audioChannelCount(Optional audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = audioChannelCount; + return this; + } + + + public Builder autoAdjustQuality(boolean autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + public Builder autoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + + public Builder autoAdjustSubtitle(boolean autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + public Builder autoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + + public Builder directPlay(boolean directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + public Builder directPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + + public Builder directStream(boolean directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + public Builder directStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + + public Builder directStreamAudio(boolean directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = Optional.ofNullable(directStreamAudio); + return this; + } + + public Builder directStreamAudio(Optional directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = directStreamAudio; + return this; + } + + + public Builder disableResolutionRotation(boolean disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = Optional.ofNullable(disableResolutionRotation); + return this; + } + + public Builder disableResolutionRotation(Optional disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = disableResolutionRotation; + return this; + } + + + public Builder maxVideoBitrate(long maxVideoBitrate) { + Utils.checkNotNull(maxVideoBitrate, "maxVideoBitrate"); + this.maxVideoBitrate = Optional.ofNullable(maxVideoBitrate); + return this; + } + + public Builder maxVideoBitrate(Optional maxVideoBitrate) { + Utils.checkNotNull(maxVideoBitrate, "maxVideoBitrate"); + this.maxVideoBitrate = maxVideoBitrate; + return this; + } + + + public Builder musicBitrate(long musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = Optional.ofNullable(musicBitrate); + return this; + } + + public Builder musicBitrate(Optional musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = musicBitrate; + return this; + } + + + public Builder peakBitrate(long peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = Optional.ofNullable(peakBitrate); + return this; + } + + public Builder peakBitrate(Optional peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = peakBitrate; + return this; + } + + + public Builder photoQuality(long photoQuality) { + Utils.checkNotNull(photoQuality, "photoQuality"); + this.photoQuality = Optional.ofNullable(photoQuality); + return this; + } + + public Builder photoQuality(Optional photoQuality) { + Utils.checkNotNull(photoQuality, "photoQuality"); + this.photoQuality = photoQuality; + return this; + } + + + public Builder photoResolution(String photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = Optional.ofNullable(photoResolution); + return this; + } + + public Builder photoResolution(Optional photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = photoResolution; + return this; + } + + + public Builder secondsPerSegment(long secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = Optional.ofNullable(secondsPerSegment); + return this; + } + + public Builder secondsPerSegment(Optional secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = secondsPerSegment; + return this; + } + + + public Builder subtitles(GetPlaylistGeneratorSubtitles subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = Optional.ofNullable(subtitles); + return this; + } + + public Builder subtitles(Optional subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = subtitles; + return this; + } + + + public Builder subtitleSize(long subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + public Builder subtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + + public Builder videoBitrate(long videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = Optional.ofNullable(videoBitrate); + return this; + } + + public Builder videoBitrate(Optional videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = videoBitrate; + return this; + } + + + public Builder videoQuality(long videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = Optional.ofNullable(videoQuality); + return this; + } + + public Builder videoQuality(Optional videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = videoQuality; + return this; + } + + + public Builder videoResolution(String 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 MediaSettings build() { + + return new MediaSettings( + advancedSubtitles, audioBoost, audioChannelCount, + autoAdjustQuality, autoAdjustSubtitle, directPlay, + directStream, directStreamAudio, disableResolutionRotation, + maxVideoBitrate, musicBitrate, peakBitrate, + photoQuality, photoResolution, secondsPerSegment, + subtitles, subtitleSize, videoBitrate, + videoQuality, videoResolution); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MediaSubscription.java b/src/main/java/dev/plexapi/sdk/models/operations/MediaSubscription.java new file mode 100644 index 00000000..bf996356 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MediaSubscription.java @@ -0,0 +1,1044 @@ +/* + * 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.models.shared.MediaGrabOperation; +import dev.plexapi.sdk.models.shared.Setting; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * MediaSubscription + * + *

A media subscription contains a representation of metadata desired to be recorded + */ +public class MediaSubscription { + /** + * The title of this subscription type + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * Metadata type number + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("airingsType") + private Optional airingsType; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAt") + private Optional createdAt; + + /** + * Media Matching Hints + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + /** + * Only included if `includeStorage` is specified + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("durationTotal") + private Optional durationTotal; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("locationPath") + private Optional locationPath; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaGrabOperation") + private Optional> mediaGrabOperation; + + /** + * Media Matching Hints + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Playlist") + private Optional> playlist; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Setting") + private Optional> setting; + + /** + * Only included if `includeStorage` is specified + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("storageTotal") + private Optional storageTotal; + + /** + * Where this subscription will record to + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("targetLibrarySectionID") + private Optional targetLibrarySectionID; + + /** + * The library section location id for where the item is to be recorded + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("targetSectionLocationID") + private Optional targetSectionLocationID; + + /** + * Media Matching Hints + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Video") + private Optional> video; + + /** + * Parameter string for creating this subscription + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parameters") + private Optional parameters; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("selected") + private Optional selected; + + @JsonCreator + public MediaSubscription( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("airingsType") Optional airingsType, + @JsonProperty("createdAt") Optional createdAt, + @JsonProperty("Directory") Optional> directory, + @JsonProperty("durationTotal") Optional durationTotal, + @JsonProperty("key") Optional key, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("locationPath") Optional locationPath, + @JsonProperty("MediaGrabOperation") Optional> mediaGrabOperation, + @JsonProperty("Playlist") Optional> playlist, + @JsonProperty("Setting") Optional> setting, + @JsonProperty("storageTotal") Optional storageTotal, + @JsonProperty("targetLibrarySectionID") Optional targetLibrarySectionID, + @JsonProperty("targetSectionLocationID") Optional targetSectionLocationID, + @JsonProperty("Video") Optional> video, + @JsonProperty("parameters") Optional parameters, + @JsonProperty("selected") Optional selected) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(airingsType, "airingsType"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(directory, "directory"); + Utils.checkNotNull(durationTotal, "durationTotal"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(locationPath, "locationPath"); + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + Utils.checkNotNull(playlist, "playlist"); + Utils.checkNotNull(setting, "setting"); + Utils.checkNotNull(storageTotal, "storageTotal"); + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + Utils.checkNotNull(video, "video"); + Utils.checkNotNull(parameters, "parameters"); + Utils.checkNotNull(selected, "selected"); + this.title = title; + this.type = type; + this.airingsType = airingsType; + this.createdAt = createdAt; + this.directory = directory; + this.durationTotal = durationTotal; + this.key = key; + this.librarySectionTitle = librarySectionTitle; + this.locationPath = locationPath; + this.mediaGrabOperation = mediaGrabOperation; + this.playlist = playlist; + this.setting = setting; + this.storageTotal = storageTotal; + this.targetLibrarySectionID = targetLibrarySectionID; + this.targetSectionLocationID = targetSectionLocationID; + this.video = video; + this.parameters = parameters; + this.selected = selected; + } + + public MediaSubscription() { + 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()); + } + + /** + * The title of this subscription type + */ + @JsonIgnore + public Optional title() { + return title; + } + + /** + * Metadata type number + */ + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional airingsType() { + return airingsType; + } + + @JsonIgnore + public Optional createdAt() { + return createdAt; + } + + /** + * Media Matching Hints + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + /** + * Only included if `includeStorage` is specified + */ + @JsonIgnore + public Optional durationTotal() { + return durationTotal; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + @JsonIgnore + public Optional locationPath() { + return locationPath; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> mediaGrabOperation() { + return (Optional>) mediaGrabOperation; + } + + /** + * Media Matching Hints + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> playlist() { + return (Optional>) playlist; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> setting() { + return (Optional>) setting; + } + + /** + * Only included if `includeStorage` is specified + */ + @JsonIgnore + public Optional storageTotal() { + return storageTotal; + } + + /** + * Where this subscription will record to + */ + @JsonIgnore + public Optional targetLibrarySectionID() { + return targetLibrarySectionID; + } + + /** + * The library section location id for where the item is to be recorded + */ + @JsonIgnore + public Optional targetSectionLocationID() { + return targetSectionLocationID; + } + + /** + * Media Matching Hints + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> video() { + return (Optional>) video; + } + + /** + * Parameter string for creating this subscription + */ + @JsonIgnore + public Optional parameters() { + return parameters; + } + + @JsonIgnore + public Optional selected() { + return selected; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The title of this subscription type + */ + public MediaSubscription withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of this subscription type + */ + public MediaSubscription withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * Metadata type number + */ + public MediaSubscription withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * Metadata type number + */ + public MediaSubscription withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public MediaSubscription withAiringsType(String airingsType) { + Utils.checkNotNull(airingsType, "airingsType"); + this.airingsType = Optional.ofNullable(airingsType); + return this; + } + + + public MediaSubscription withAiringsType(Optional airingsType) { + Utils.checkNotNull(airingsType, "airingsType"); + this.airingsType = airingsType; + return this; + } + + public MediaSubscription withCreatedAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + + public MediaSubscription withCreatedAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Media Matching Hints + */ + public MediaSubscription withDirectory(Map directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + /** + * Media Matching Hints + */ + public MediaSubscription withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + /** + * Only included if `includeStorage` is specified + */ + public MediaSubscription withDurationTotal(long durationTotal) { + Utils.checkNotNull(durationTotal, "durationTotal"); + this.durationTotal = Optional.ofNullable(durationTotal); + return this; + } + + + /** + * Only included if `includeStorage` is specified + */ + public MediaSubscription withDurationTotal(Optional durationTotal) { + Utils.checkNotNull(durationTotal, "durationTotal"); + this.durationTotal = durationTotal; + return this; + } + + public MediaSubscription withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public MediaSubscription withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public MediaSubscription withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + + public MediaSubscription withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public MediaSubscription withLocationPath(String locationPath) { + Utils.checkNotNull(locationPath, "locationPath"); + this.locationPath = Optional.ofNullable(locationPath); + return this; + } + + + public MediaSubscription withLocationPath(Optional locationPath) { + Utils.checkNotNull(locationPath, "locationPath"); + this.locationPath = locationPath; + return this; + } + + public MediaSubscription withMediaGrabOperation(List mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = Optional.ofNullable(mediaGrabOperation); + return this; + } + + + public MediaSubscription withMediaGrabOperation(Optional> mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = mediaGrabOperation; + return this; + } + + /** + * Media Matching Hints + */ + public MediaSubscription withPlaylist(Map playlist) { + Utils.checkNotNull(playlist, "playlist"); + this.playlist = Optional.ofNullable(playlist); + return this; + } + + + /** + * Media Matching Hints + */ + public MediaSubscription withPlaylist(Optional> playlist) { + Utils.checkNotNull(playlist, "playlist"); + this.playlist = playlist; + return this; + } + + public MediaSubscription withSetting(List setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = Optional.ofNullable(setting); + return this; + } + + + public MediaSubscription withSetting(Optional> setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = setting; + return this; + } + + /** + * Only included if `includeStorage` is specified + */ + public MediaSubscription withStorageTotal(long storageTotal) { + Utils.checkNotNull(storageTotal, "storageTotal"); + this.storageTotal = Optional.ofNullable(storageTotal); + return this; + } + + + /** + * Only included if `includeStorage` is specified + */ + public MediaSubscription withStorageTotal(Optional storageTotal) { + Utils.checkNotNull(storageTotal, "storageTotal"); + this.storageTotal = storageTotal; + return this; + } + + /** + * Where this subscription will record to + */ + public MediaSubscription withTargetLibrarySectionID(long targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = Optional.ofNullable(targetLibrarySectionID); + return this; + } + + + /** + * Where this subscription will record to + */ + public MediaSubscription withTargetLibrarySectionID(Optional targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = targetLibrarySectionID; + return this; + } + + /** + * The library section location id for where the item is to be recorded + */ + public MediaSubscription withTargetSectionLocationID(long targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = Optional.ofNullable(targetSectionLocationID); + return this; + } + + + /** + * The library section location id for where the item is to be recorded + */ + public MediaSubscription withTargetSectionLocationID(Optional targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = targetSectionLocationID; + return this; + } + + /** + * Media Matching Hints + */ + public MediaSubscription withVideo(Map video) { + Utils.checkNotNull(video, "video"); + this.video = Optional.ofNullable(video); + return this; + } + + + /** + * Media Matching Hints + */ + public MediaSubscription withVideo(Optional> video) { + Utils.checkNotNull(video, "video"); + this.video = video; + return this; + } + + /** + * Parameter string for creating this subscription + */ + public MediaSubscription withParameters(String parameters) { + Utils.checkNotNull(parameters, "parameters"); + this.parameters = Optional.ofNullable(parameters); + return this; + } + + + /** + * Parameter string for creating this subscription + */ + public MediaSubscription withParameters(Optional parameters) { + Utils.checkNotNull(parameters, "parameters"); + this.parameters = parameters; + return this; + } + + public MediaSubscription withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + + public MediaSubscription withSelected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaSubscription other = (MediaSubscription) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.airingsType, other.airingsType) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.directory, other.directory) && + Utils.enhancedDeepEquals(this.durationTotal, other.durationTotal) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && + Utils.enhancedDeepEquals(this.locationPath, other.locationPath) && + Utils.enhancedDeepEquals(this.mediaGrabOperation, other.mediaGrabOperation) && + Utils.enhancedDeepEquals(this.playlist, other.playlist) && + Utils.enhancedDeepEquals(this.setting, other.setting) && + Utils.enhancedDeepEquals(this.storageTotal, other.storageTotal) && + Utils.enhancedDeepEquals(this.targetLibrarySectionID, other.targetLibrarySectionID) && + Utils.enhancedDeepEquals(this.targetSectionLocationID, other.targetSectionLocationID) && + Utils.enhancedDeepEquals(this.video, other.video) && + Utils.enhancedDeepEquals(this.parameters, other.parameters) && + Utils.enhancedDeepEquals(this.selected, other.selected); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, airingsType, + createdAt, directory, durationTotal, + key, librarySectionTitle, locationPath, + mediaGrabOperation, playlist, setting, + storageTotal, targetLibrarySectionID, targetSectionLocationID, + video, parameters, selected); + } + + @Override + public String toString() { + return Utils.toString(MediaSubscription.class, + "title", title, + "type", type, + "airingsType", airingsType, + "createdAt", createdAt, + "directory", directory, + "durationTotal", durationTotal, + "key", key, + "librarySectionTitle", librarySectionTitle, + "locationPath", locationPath, + "mediaGrabOperation", mediaGrabOperation, + "playlist", playlist, + "setting", setting, + "storageTotal", storageTotal, + "targetLibrarySectionID", targetLibrarySectionID, + "targetSectionLocationID", targetSectionLocationID, + "video", video, + "parameters", parameters, + "selected", selected); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional airingsType = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Optional durationTotal = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional locationPath = Optional.empty(); + + private Optional> mediaGrabOperation = Optional.empty(); + + private Optional> playlist = Optional.empty(); + + private Optional> setting = Optional.empty(); + + private Optional storageTotal = Optional.empty(); + + private Optional targetLibrarySectionID = Optional.empty(); + + private Optional targetSectionLocationID = Optional.empty(); + + private Optional> video = Optional.empty(); + + private Optional parameters = Optional.empty(); + + private Optional selected = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The title of this subscription type + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of this subscription type + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * Metadata type number + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Metadata type number + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + public Builder airingsType(String airingsType) { + Utils.checkNotNull(airingsType, "airingsType"); + this.airingsType = Optional.ofNullable(airingsType); + return this; + } + + public Builder airingsType(Optional airingsType) { + Utils.checkNotNull(airingsType, "airingsType"); + this.airingsType = airingsType; + return this; + } + + + public Builder createdAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + /** + * Media Matching Hints + */ + public Builder directory(Map directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + /** + * Media Matching Hints + */ + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + + /** + * Only included if `includeStorage` is specified + */ + public Builder durationTotal(long durationTotal) { + Utils.checkNotNull(durationTotal, "durationTotal"); + this.durationTotal = Optional.ofNullable(durationTotal); + return this; + } + + /** + * Only included if `includeStorage` is specified + */ + public Builder durationTotal(Optional durationTotal) { + Utils.checkNotNull(durationTotal, "durationTotal"); + this.durationTotal = durationTotal; + 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 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 locationPath(String locationPath) { + Utils.checkNotNull(locationPath, "locationPath"); + this.locationPath = Optional.ofNullable(locationPath); + return this; + } + + public Builder locationPath(Optional locationPath) { + Utils.checkNotNull(locationPath, "locationPath"); + this.locationPath = locationPath; + return this; + } + + + public Builder mediaGrabOperation(List mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = Optional.ofNullable(mediaGrabOperation); + return this; + } + + public Builder mediaGrabOperation(Optional> mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = mediaGrabOperation; + return this; + } + + + /** + * Media Matching Hints + */ + public Builder playlist(Map playlist) { + Utils.checkNotNull(playlist, "playlist"); + this.playlist = Optional.ofNullable(playlist); + return this; + } + + /** + * Media Matching Hints + */ + public Builder playlist(Optional> playlist) { + Utils.checkNotNull(playlist, "playlist"); + this.playlist = playlist; + return this; + } + + + public Builder setting(List setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = Optional.ofNullable(setting); + return this; + } + + public Builder setting(Optional> setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = setting; + return this; + } + + + /** + * Only included if `includeStorage` is specified + */ + public Builder storageTotal(long storageTotal) { + Utils.checkNotNull(storageTotal, "storageTotal"); + this.storageTotal = Optional.ofNullable(storageTotal); + return this; + } + + /** + * Only included if `includeStorage` is specified + */ + public Builder storageTotal(Optional storageTotal) { + Utils.checkNotNull(storageTotal, "storageTotal"); + this.storageTotal = storageTotal; + return this; + } + + + /** + * Where this subscription will record to + */ + public Builder targetLibrarySectionID(long targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = Optional.ofNullable(targetLibrarySectionID); + return this; + } + + /** + * Where this subscription will record to + */ + public Builder targetLibrarySectionID(Optional targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = targetLibrarySectionID; + return this; + } + + + /** + * The library section location id for where the item is to be recorded + */ + public Builder targetSectionLocationID(long targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = Optional.ofNullable(targetSectionLocationID); + return this; + } + + /** + * The library section location id for where the item is to be recorded + */ + public Builder targetSectionLocationID(Optional targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = targetSectionLocationID; + return this; + } + + + /** + * Media Matching Hints + */ + public Builder video(Map video) { + Utils.checkNotNull(video, "video"); + this.video = Optional.ofNullable(video); + return this; + } + + /** + * Media Matching Hints + */ + public Builder video(Optional> video) { + Utils.checkNotNull(video, "video"); + this.video = video; + return this; + } + + + /** + * Parameter string for creating this subscription + */ + public Builder parameters(String parameters) { + Utils.checkNotNull(parameters, "parameters"); + this.parameters = Optional.ofNullable(parameters); + return this; + } + + /** + * Parameter string for creating this subscription + */ + public Builder parameters(Optional parameters) { + Utils.checkNotNull(parameters, "parameters"); + this.parameters = parameters; + 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 MediaSubscription build() { + + return new MediaSubscription( + title, type, airingsType, + createdAt, directory, durationTotal, + key, librarySectionTitle, locationPath, + mediaGrabOperation, playlist, setting, + storageTotal, targetLibrarySectionID, targetSectionLocationID, + video, parameters, selected); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MergeItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/MergeItemsRequest.java new file mode 100644 index 00000000..411118bd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MergeItemsRequest.java @@ -0,0 +1,815 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.List; +import java.util.Optional; + + +public class MergeItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String idsPathParameter; + + + @SpeakeasyMetadata("queryParam:style=form,explode=false,name=ids") + private Optional> idsQueryParameter; + + @JsonCreator + public MergeItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String idsPathParameter, + Optional> idsQueryParameter) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(idsPathParameter, "idsPathParameter"); + Utils.checkNotNull(idsQueryParameter, "idsQueryParameter"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.idsPathParameter = idsPathParameter; + this.idsQueryParameter = idsQueryParameter; + } + + public MergeItemsRequest( + String idsPathParameter) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), idsPathParameter, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String idsPathParameter() { + return idsPathParameter; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> idsQueryParameter() { + return (Optional>) idsQueryParameter; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MergeItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MergeItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public MergeItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public MergeItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public MergeItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public MergeItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public MergeItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public MergeItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public MergeItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public MergeItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public MergeItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public MergeItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public MergeItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public MergeItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public MergeItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public MergeItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public MergeItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public MergeItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public MergeItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public MergeItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public MergeItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public MergeItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public MergeItemsRequest withIdsPathParameter(String idsPathParameter) { + Utils.checkNotNull(idsPathParameter, "idsPathParameter"); + this.idsPathParameter = idsPathParameter; + return this; + } + + public MergeItemsRequest withIdsQueryParameter(List idsQueryParameter) { + Utils.checkNotNull(idsQueryParameter, "idsQueryParameter"); + this.idsQueryParameter = Optional.ofNullable(idsQueryParameter); + return this; + } + + + public MergeItemsRequest withIdsQueryParameter(Optional> idsQueryParameter) { + Utils.checkNotNull(idsQueryParameter, "idsQueryParameter"); + this.idsQueryParameter = idsQueryParameter; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeItemsRequest other = (MergeItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.idsPathParameter, other.idsPathParameter) && + Utils.enhancedDeepEquals(this.idsQueryParameter, other.idsQueryParameter); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, idsPathParameter, + idsQueryParameter); + } + + @Override + public String toString() { + return Utils.toString(MergeItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "idsPathParameter", idsPathParameter, + "idsQueryParameter", idsQueryParameter); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String idsPathParameter; + + private Optional> idsQueryParameter = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder idsPathParameter(String idsPathParameter) { + Utils.checkNotNull(idsPathParameter, "idsPathParameter"); + this.idsPathParameter = idsPathParameter; + return this; + } + + + public Builder idsQueryParameter(List idsQueryParameter) { + Utils.checkNotNull(idsQueryParameter, "idsQueryParameter"); + this.idsQueryParameter = Optional.ofNullable(idsQueryParameter); + return this; + } + + public Builder idsQueryParameter(Optional> idsQueryParameter) { + Utils.checkNotNull(idsQueryParameter, "idsQueryParameter"); + this.idsQueryParameter = idsQueryParameter; + return this; + } + + public MergeItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new MergeItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, idsPathParameter, + idsQueryParameter); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MergeItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/MergeItemsRequestBuilder.java new file mode 100644 index 00000000..db813c97 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MergeItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.MergeItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class MergeItemsRequestBuilder { + + private MergeItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public MergeItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MergeItemsRequestBuilder request(MergeItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public MergeItemsResponse call() throws Exception { + + RequestOperation operation + = new MergeItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MergeItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/MergeItemsResponse.java new file mode 100644 index 00000000..400b7f0c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MergeItemsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class MergeItemsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public MergeItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MergeItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MergeItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MergeItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeItemsResponse other = (MergeItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(MergeItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public MergeItemsResponse build() { + + return new MergeItemsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Meta.java b/src/main/java/dev/plexapi/sdk/models/operations/Meta.java deleted file mode 100644 index 6bc4f6a0..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Meta.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - -/** - * Meta - * - *

The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - */ -public class Meta { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Type") - private Optional> type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("FieldType") - private Optional> fieldType; - - @JsonCreator - public Meta( - @JsonProperty("Type") Optional> type, - @JsonProperty("FieldType") Optional> fieldType) { - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(fieldType, "fieldType"); - this.type = type; - this.fieldType = fieldType; - } - - public Meta() { - this(Optional.empty(), Optional.empty()); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> type() { - return (Optional>) type; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> fieldType() { - return (Optional>) fieldType; - } - - public static Builder builder() { - return new Builder(); - } - - - public Meta withType(List type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public Meta withType(Optional> type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Meta withFieldType(List fieldType) { - Utils.checkNotNull(fieldType, "fieldType"); - this.fieldType = Optional.ofNullable(fieldType); - return this; - } - - - public Meta 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; - } - Meta other = (Meta) o; - return - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.fieldType, other.fieldType); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - type, fieldType); - } - - @Override - public String toString() { - return Utils.toString(Meta.class, - "type", type, - "fieldType", fieldType); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Meta build() { - - return new Meta( - type, fieldType); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Metadata.java b/src/main/java/dev/plexapi/sdk/models/operations/Metadata.java index 648cb6fa..50007e01 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Metadata.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Metadata.java @@ -3,306 +3,731 @@ */ package dev.plexapi.sdk.models.operations; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; 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.models.shared.Filter; +import dev.plexapi.sdk.models.shared.Image; +import dev.plexapi.sdk.models.shared.Media; +import dev.plexapi.sdk.models.shared.Player; +import dev.plexapi.sdk.models.shared.Session; +import dev.plexapi.sdk.models.shared.Sort; +import dev.plexapi.sdk.models.shared.Tag; +import dev.plexapi.sdk.models.shared.User; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; -import java.time.LocalDate; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Optional; - +/** + * Metadata + * + *

Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ public class Metadata { - + /** + * Information about the player being used for playback + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("art") - private Optional art; - + @JsonProperty("Player") + private Optional player; + /** + * Information about the playback session + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("guid") - private Optional guid; - + @JsonProperty("Session") + private Optional session; + /** + * The user playing the content + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("ratingKey") - private Optional ratingKey; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("studio") - private Optional studio; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tagline") - private Optional tagline; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("addedAt") - private Optional addedAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("publicPagesURL") - private Optional publicPagesURL; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("slug") - private Optional slug; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("userState") - private Optional userState; - + @JsonProperty("User") + private Optional user; + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("title") - private Optional title; + private Optional title; + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("absoluteIndex") + private Optional absoluteIndex; + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + /** + * When present, the URL for the background artwork for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Autotag") + private Optional> autotag; + + /** + * When present, the URL for a banner graphic for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("banner") + private Optional banner; + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("contentRating") - private Optional contentRating; + private Optional contentRating; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originallyAvailableAt") - private Optional originallyAvailableAt; + @JsonProperty("Country") + private Optional> country; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("year") - private Optional year; + @JsonProperty("Director") + private Optional> director; + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Filter") + private Optional> filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + /** + * The `art` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + /** + * The `hero` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentHero") + private Optional grandparentHero; + + /** + * The `key` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + /** + * The `ratingKey` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + /** + * The `theme` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTheme") + private Optional grandparentTheme; + + /** + * The `thumb` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + /** + * The `title` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guid; + + /** + * When present, the URL for a hero image for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hero") + private Optional hero; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Image") private Optional> image; + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + @JsonInclude(Include.NON_ABSENT) - @JsonProperty("banner") - private Optional banner; + @JsonProperty("Media") + private Optional> media; + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originalTitle") + private Optional originalTitle; + + /** + * The `hero` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentHero") + private Optional parentHero; + + /** + * The `index` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + /** + * The `key` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + /** + * The `ratingKey` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + /** + * The `thumb` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + /** + * The `title` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("prompt") + private Optional prompt; + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("rating") private Optional rating; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("expiresAt") - private Optional expiresAt; - + @JsonProperty("Rating") + private Optional> ratingArray; + /** + * Number of ratings under this metadata + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("originalTitle") - private Optional originalTitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audienceRating") - private Optional audienceRating; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audienceRatingImage") - private Optional audienceRatingImage; - + @JsonProperty("ratingCount") + private Optional ratingCount; + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("ratingImage") - private Optional ratingImage; + private Optional ratingImage; + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("imdbRatingCount") - private Optional imdbRatingCount; - + @JsonProperty("Role") + private Optional> role; + /** + * Indicates this is a search directory + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtype") - private Optional subtype; - + @JsonProperty("search") + private Optional search; + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("theme") - private Optional theme; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("leafCount") - private Optional leafCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("childCount") - private Optional childCount; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("isContinuingSeries") - private Optional isContinuingSeries; - + @JsonProperty("secondary") + private Optional secondary; + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("skipChildren") private Optional skipChildren; - + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("availabilityId") - private Optional availabilityId; + @JsonProperty("skipParent") + private Optional skipParent; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Sort") + private Optional> sort; + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtype") + private Optional subtype; + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("theme") + private Optional theme; + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userRating") + private Optional userRating; + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("streamingMediaId") - private Optional streamingMediaId; - + @JsonProperty("Writer") + private Optional> writer; + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("playableKey") - private Optional playableKey; + @JsonProperty("year") + private Optional year; + + + @JsonIgnore + private Map additionalProperties; @JsonCreator public Metadata( - @JsonProperty("art") Optional art, - @JsonProperty("guid") Optional guid, - @JsonProperty("key") Optional key, - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("studio") Optional studio, - @JsonProperty("tagline") Optional tagline, - @JsonProperty("type") Optional type, - @JsonProperty("thumb") Optional thumb, - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("duration") Optional duration, - @JsonProperty("publicPagesURL") Optional publicPagesURL, - @JsonProperty("slug") Optional slug, - @JsonProperty("userState") Optional userState, - @JsonProperty("title") Optional title, - @JsonProperty("contentRating") Optional contentRating, - @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, - @JsonProperty("year") Optional year, - @JsonProperty("Image") Optional> image, - @JsonProperty("banner") Optional banner, - @JsonProperty("rating") Optional rating, - @JsonProperty("expiresAt") Optional expiresAt, - @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("Player") Optional player, + @JsonProperty("Session") Optional session, + @JsonProperty("User") Optional user, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("absoluteIndex") Optional absoluteIndex, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("art") Optional art, @JsonProperty("audienceRating") Optional audienceRating, - @JsonProperty("audienceRatingImage") Optional audienceRatingImage, - @JsonProperty("ratingImage") Optional ratingImage, - @JsonProperty("imdbRatingCount") Optional imdbRatingCount, - @JsonProperty("subtype") Optional subtype, - @JsonProperty("theme") Optional theme, - @JsonProperty("leafCount") Optional leafCount, - @JsonProperty("childCount") Optional childCount, - @JsonProperty("isContinuingSeries") Optional isContinuingSeries, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("Autotag") Optional> autotag, + @JsonProperty("banner") Optional banner, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("composite") Optional composite, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("Country") Optional> country, + @JsonProperty("Director") Optional> director, + @JsonProperty("duration") Optional duration, + @JsonProperty("Filter") Optional> filter, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("grandparentHero") Optional grandparentHero, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("Guid") Optional> guid, + @JsonProperty("hero") Optional hero, + @JsonProperty("Image") Optional> image, + @JsonProperty("index") Optional index, + @JsonProperty("key") Optional key, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("Media") Optional> media, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("parentHero") Optional parentHero, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("prompt") Optional prompt, + @JsonProperty("rating") Optional rating, + @JsonProperty("Rating") Optional> ratingArray, + @JsonProperty("ratingCount") Optional ratingCount, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("Role") Optional> role, + @JsonProperty("search") Optional search, + @JsonProperty("secondary") Optional secondary, @JsonProperty("skipChildren") Optional skipChildren, - @JsonProperty("availabilityId") Optional availabilityId, - @JsonProperty("streamingMediaId") Optional streamingMediaId, - @JsonProperty("playableKey") Optional playableKey) { - Utils.checkNotNull(art, "art"); - Utils.checkNotNull(guid, "guid"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(studio, "studio"); - Utils.checkNotNull(tagline, "tagline"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(addedAt, "addedAt"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(publicPagesURL, "publicPagesURL"); - Utils.checkNotNull(slug, "slug"); - Utils.checkNotNull(userState, "userState"); + @JsonProperty("skipParent") Optional skipParent, + @JsonProperty("Sort") Optional> sort, + @JsonProperty("studio") Optional studio, + @JsonProperty("subtype") Optional subtype, + @JsonProperty("summary") Optional summary, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("theme") Optional theme, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("userRating") Optional userRating, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("year") Optional year) { + Utils.checkNotNull(player, "player"); + Utils.checkNotNull(session, "session"); + Utils.checkNotNull(user, "user"); Utils.checkNotNull(title, "title"); - Utils.checkNotNull(contentRating, "contentRating"); - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - Utils.checkNotNull(year, "year"); - Utils.checkNotNull(image, "image"); - Utils.checkNotNull(banner, "banner"); - Utils.checkNotNull(rating, "rating"); - Utils.checkNotNull(expiresAt, "expiresAt"); - Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(art, "art"); Utils.checkNotNull(audienceRating, "audienceRating"); Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - Utils.checkNotNull(ratingImage, "ratingImage"); - Utils.checkNotNull(imdbRatingCount, "imdbRatingCount"); - Utils.checkNotNull(subtype, "subtype"); - Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(autotag, "autotag"); + Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(grandparentHero, "grandparentHero"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(hero, "hero"); + Utils.checkNotNull(image, "image"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); Utils.checkNotNull(leafCount, "leafCount"); - Utils.checkNotNull(childCount, "childCount"); - Utils.checkNotNull(isContinuingSeries, "isContinuingSeries"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(parentHero, "parentHero"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(prompt, "prompt"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(ratingArray, "ratingArray"); + Utils.checkNotNull(ratingCount, "ratingCount"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(search, "search"); + Utils.checkNotNull(secondary, "secondary"); Utils.checkNotNull(skipChildren, "skipChildren"); - Utils.checkNotNull(availabilityId, "availabilityId"); - Utils.checkNotNull(streamingMediaId, "streamingMediaId"); - Utils.checkNotNull(playableKey, "playableKey"); - this.art = art; - this.guid = guid; - this.key = key; - this.ratingKey = ratingKey; - this.studio = studio; - this.tagline = tagline; - this.type = type; - this.thumb = thumb; - this.addedAt = addedAt; - this.duration = duration; - this.publicPagesURL = publicPagesURL; - this.slug = slug; - this.userState = userState; + Utils.checkNotNull(skipParent, "skipParent"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(subtype, "subtype"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(userRating, "userRating"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(year, "year"); + this.player = player; + this.session = session; + this.user = user; this.title = title; - this.contentRating = contentRating; - this.originallyAvailableAt = originallyAvailableAt; - this.year = year; - this.image = image; - this.banner = banner; - this.rating = rating; - this.expiresAt = expiresAt; - this.originalTitle = originalTitle; + this.type = type; + this.absoluteIndex = absoluteIndex; + this.addedAt = addedAt; + this.art = art; this.audienceRating = audienceRating; this.audienceRatingImage = audienceRatingImage; - this.ratingImage = ratingImage; - this.imdbRatingCount = imdbRatingCount; - this.subtype = subtype; - this.theme = theme; + this.autotag = autotag; + this.banner = banner; + this.chapterSource = chapterSource; + this.composite = composite; + this.contentRating = contentRating; + this.country = country; + this.director = director; + this.duration = duration; + this.filter = filter; + this.genre = genre; + this.grandparentArt = grandparentArt; + this.grandparentHero = grandparentHero; + this.grandparentKey = grandparentKey; + this.grandparentRatingKey = grandparentRatingKey; + this.grandparentTheme = grandparentTheme; + this.grandparentThumb = grandparentThumb; + this.grandparentTitle = grandparentTitle; + this.guid = guid; + this.hero = hero; + this.image = image; + this.index = index; + this.key = key; + this.lastViewedAt = lastViewedAt; this.leafCount = leafCount; - this.childCount = childCount; - this.isContinuingSeries = isContinuingSeries; + this.media = media; + this.originallyAvailableAt = originallyAvailableAt; + this.originalTitle = originalTitle; + this.parentHero = parentHero; + this.parentIndex = parentIndex; + this.parentKey = parentKey; + this.parentRatingKey = parentRatingKey; + this.parentThumb = parentThumb; + this.parentTitle = parentTitle; + this.primaryExtraKey = primaryExtraKey; + this.prompt = prompt; + this.rating = rating; + this.ratingArray = ratingArray; + this.ratingCount = ratingCount; + this.ratingImage = ratingImage; + this.ratingKey = ratingKey; + this.role = role; + this.search = search; + this.secondary = secondary; this.skipChildren = skipChildren; - this.availabilityId = availabilityId; - this.streamingMediaId = streamingMediaId; - this.playableKey = playableKey; + this.skipParent = skipParent; + this.sort = sort; + this.studio = studio; + this.subtype = subtype; + this.summary = summary; + this.tagline = tagline; + this.theme = theme; + this.thumb = thumb; + this.titleSort = titleSort; + this.updatedAt = updatedAt; + this.userRating = userRating; + this.viewCount = viewCount; + this.viewedLeafCount = viewedLeafCount; + this.viewOffset = viewOffset; + this.writer = writer; + this.year = year; + this.additionalProperties = new HashMap<>(); } public Metadata() { @@ -317,92 +742,254 @@ public class Metadata { Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } + /** + * Information about the player being used for playback + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional art() { - return art; + public Optional player() { + return (Optional) player; } + /** + * Information about the playback session + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional guid() { - return guid; + public Optional session() { + return (Optional) session; } + /** + * The user playing the content + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional key() { - return key; + public Optional user() { + return (Optional) user; } + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional ratingKey() { - return ratingKey; + public Optional title() { + return (Optional) title; } + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional studio() { - return studio; + public Optional type() { + return (Optional) type; } + /** + * When present, contains the disc number for a track on multi-disc albums. + */ @JsonIgnore - public Optional tagline() { - return tagline; + public Optional absoluteIndex() { + return absoluteIndex; } + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional thumb() { - return thumb; - } - - @JsonIgnore - public Optional addedAt() { + public Optional addedAt() { return addedAt; } + /** + * When present, the URL for the background artwork for the item. + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional duration() { + public Optional art() { + return (Optional) art; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonIgnore + public Optional audienceRating() { + return audienceRating; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audienceRatingImage() { + return (Optional) audienceRatingImage; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> autotag() { + return (Optional>) autotag; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional banner() { + return (Optional) banner; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chapterSource() { + return (Optional) chapterSource; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional composite() { + return (Optional) composite; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional contentRating() { + return (Optional) contentRating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> director() { + return (Optional>) director; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonIgnore + public Optional duration() { return duration; } + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicPagesURL() { - return publicPagesURL; + public Optional> filter() { + return (Optional>) filter; } + @SuppressWarnings("unchecked") @JsonIgnore - public Optional slug() { - return slug; + public Optional> genre() { + return (Optional>) genre; } + /** + * The `art` of the grandparent + */ @JsonIgnore - public Optional userState() { - return userState; + public Optional grandparentArt() { + return grandparentArt; } + /** + * The `hero` of the grandparent + */ @JsonIgnore - public Optional title() { - return title; + public Optional grandparentHero() { + return grandparentHero; } + /** + * The `key` of the grandparent + */ @JsonIgnore - public Optional contentRating() { - return contentRating; + public Optional grandparentKey() { + return grandparentKey; } + /** + * The `ratingKey` of the grandparent + */ @JsonIgnore - public Optional originallyAvailableAt() { - return originallyAvailableAt; + public Optional grandparentRatingKey() { + return grandparentRatingKey; } + /** + * The `theme` of the grandparent + */ @JsonIgnore - public Optional year() { - return year; + public Optional grandparentTheme() { + return grandparentTheme; + } + + /** + * The `thumb` of the grandparent + */ + @JsonIgnore + public Optional grandparentThumb() { + return grandparentThumb; + } + + /** + * The `title` of the grandparent + */ + @JsonIgnore + public Optional grandparentTitle() { + return grandparentTitle; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> guid() { + return (Optional>) guid; + } + + /** + * When present, the URL for a hero image for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hero() { + return (Optional) hero; } @SuppressWarnings("unchecked") @@ -411,89 +998,335 @@ public class Metadata { return (Optional>) image; } + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ @JsonIgnore - public Optional banner() { - return banner; + public Optional index() { + return index; } + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonIgnore + public Optional lastViewedAt() { + return lastViewedAt; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonIgnore + public Optional leafCount() { + return leafCount; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> media() { + return (Optional>) media; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originallyAvailableAt() { + return (Optional) originallyAvailableAt; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originalTitle() { + return (Optional) originalTitle; + } + + /** + * The `hero` of the parent + */ + @JsonIgnore + public Optional parentHero() { + return parentHero; + } + + /** + * The `index` of the parent + */ + @JsonIgnore + public Optional parentIndex() { + return parentIndex; + } + + /** + * The `key` of the parent + */ + @JsonIgnore + public Optional parentKey() { + return parentKey; + } + + /** + * The `ratingKey` of the parent + */ + @JsonIgnore + public Optional parentRatingKey() { + return parentRatingKey; + } + + /** + * The `thumb` of the parent + */ + @JsonIgnore + public Optional parentThumb() { + return parentThumb; + } + + /** + * The `title` of the parent + */ + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional primaryExtraKey() { + return (Optional) primaryExtraKey; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonIgnore + public Optional prompt() { + return prompt; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ @JsonIgnore public Optional rating() { return rating; } + @SuppressWarnings("unchecked") @JsonIgnore - public Optional expiresAt() { - return expiresAt; + public Optional> ratingArray() { + return (Optional>) ratingArray; } + /** + * Number of ratings under this metadata + */ @JsonIgnore - public Optional originalTitle() { - return originalTitle; + public Optional ratingCount() { + return ratingCount; } + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional audienceRating() { - return audienceRating; + public Optional ratingImage() { + return (Optional) ratingImage; } + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional audienceRatingImage() { - return audienceRatingImage; + public Optional ratingKey() { + return (Optional) ratingKey; } + @SuppressWarnings("unchecked") @JsonIgnore - public Optional ratingImage() { - return ratingImage; + public Optional> role() { + return (Optional>) role; } + /** + * Indicates this is a search directory + */ @JsonIgnore - public Optional imdbRatingCount() { - return imdbRatingCount; + public Optional search() { + return search; } + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ @JsonIgnore - public Optional subtype() { - return subtype; - } - - @JsonIgnore - public Optional theme() { - return theme; - } - - @JsonIgnore - public Optional leafCount() { - return leafCount; - } - - @JsonIgnore - public Optional childCount() { - return childCount; - } - - @JsonIgnore - public Optional isContinuingSeries() { - return isContinuingSeries; + public Optional secondary() { + return secondary; } + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ @JsonIgnore public Optional skipChildren() { return skipChildren; } + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ @JsonIgnore - public Optional availabilityId() { - return availabilityId; + public Optional skipParent() { + return skipParent; } + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional streamingMediaId() { - return streamingMediaId; + public Optional> sort() { + return (Optional>) sort; } + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional playableKey() { - return playableKey; + public Optional studio() { + return (Optional) studio; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtype() { + return (Optional) subtype; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional summary() { + return (Optional) summary; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional tagline() { + return (Optional) tagline; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional theme() { + return (Optional) theme; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional thumb() { + return (Optional) thumb; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional titleSort() { + return (Optional) titleSort; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonIgnore + public Optional userRating() { + return userRating; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonIgnore + public Optional viewCount() { + return viewCount; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonIgnore + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonIgnore + public Optional viewOffset() { + return viewOffset; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> writer() { + return (Optional>) writer; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonIgnore + public Optional year() { + return year; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; } public static Builder builder() { @@ -501,224 +1334,524 @@ public class Metadata { } - public Metadata withArt(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); + /** + * Information about the player being used for playback + */ + public Metadata withPlayer(Player player) { + Utils.checkNotNull(player, "player"); + this.player = Optional.ofNullable(player); return this; } - public Metadata withArt(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; + /** + * Information about the player being used for playback + */ + public Metadata withPlayer(Optional player) { + Utils.checkNotNull(player, "player"); + this.player = player; return this; } - public Metadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); + /** + * Information about the playback session + */ + public Metadata withSession(Session session) { + Utils.checkNotNull(session, "session"); + this.session = Optional.ofNullable(session); return this; } - public Metadata withGuid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; + /** + * Information about the playback session + */ + public Metadata withSession(Optional session) { + Utils.checkNotNull(session, "session"); + this.session = session; return this; } - public Metadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); + /** + * The user playing the content + */ + public Metadata withUser(User user) { + Utils.checkNotNull(user, "user"); + this.user = Optional.ofNullable(user); return this; } - public Metadata withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; + /** + * The user playing the content + */ + public Metadata withUser(Optional user) { + Utils.checkNotNull(user, "user"); + this.user = user; return this; } - public Metadata withRatingKey(String ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - - public Metadata withRatingKey(Optional ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public Metadata withStudio(String studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = Optional.ofNullable(studio); - return this; - } - - - public Metadata withStudio(Optional studio) { - Utils.checkNotNull(studio, "studio"); - this.studio = studio; - return this; - } - - public Metadata withTagline(String tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = Optional.ofNullable(tagline); - return this; - } - - - public Metadata withTagline(Optional tagline) { - Utils.checkNotNull(tagline, "tagline"); - this.tagline = tagline; - return this; - } - - public Metadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public Metadata withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Metadata withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - public Metadata withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public Metadata withAddedAt(int addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - - public Metadata withAddedAt(Optional addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = addedAt; - return this; - } - - public Metadata withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public Metadata withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public Metadata withPublicPagesURL(String publicPagesURL) { - Utils.checkNotNull(publicPagesURL, "publicPagesURL"); - this.publicPagesURL = Optional.ofNullable(publicPagesURL); - return this; - } - - - public Metadata withPublicPagesURL(Optional publicPagesURL) { - Utils.checkNotNull(publicPagesURL, "publicPagesURL"); - this.publicPagesURL = publicPagesURL; - return this; - } - - public Metadata withSlug(String slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = Optional.ofNullable(slug); - return this; - } - - - public Metadata withSlug(Optional slug) { - Utils.checkNotNull(slug, "slug"); - this.slug = slug; - return this; - } - - public Metadata withUserState(boolean userState) { - Utils.checkNotNull(userState, "userState"); - this.userState = Optional.ofNullable(userState); - return this; - } - - - public Metadata withUserState(Optional userState) { - Utils.checkNotNull(userState, "userState"); - this.userState = userState; - return this; - } - - public Metadata withTitle(String title) { + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Metadata withTitle(Object title) { Utils.checkNotNull(title, "title"); this.title = Optional.ofNullable(title); return this; } - public Metadata withTitle(Optional title) { + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Metadata withTitle(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } - public Metadata withContentRating(String contentRating) { + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Metadata withType(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Metadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Metadata withAbsoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Metadata withAbsoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Metadata withAddedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Metadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public Metadata withArt(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public Metadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Metadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Metadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Metadata withAudienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Metadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Metadata withAutotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + + public Metadata withAutotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public Metadata withBanner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public Metadata withBanner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Metadata withChapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Metadata withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Metadata withComposite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Metadata withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Metadata withContentRating(Object contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = Optional.ofNullable(contentRating); return this; } - public Metadata withContentRating(Optional contentRating) { + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Metadata withContentRating(Optional contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = contentRating; return this; } - public Metadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + public Metadata withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); return this; } - public Metadata withOriginallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; + public Metadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; return this; } - public Metadata withYear(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); + public Metadata withDirector(List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); return this; } - public Metadata withYear(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; + public Metadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Metadata withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Metadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Metadata withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Metadata withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Metadata withGenre(List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + + public Metadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + /** + * The `art` of the grandparent + */ + public Metadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + + /** + * The `art` of the grandparent + */ + public Metadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The `hero` of the grandparent + */ + public Metadata withGrandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + + /** + * The `hero` of the grandparent + */ + public Metadata withGrandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + /** + * The `key` of the grandparent + */ + public Metadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + + /** + * The `key` of the grandparent + */ + public Metadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public Metadata withGrandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public Metadata withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + /** + * The `theme` of the grandparent + */ + public Metadata withGrandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + + /** + * The `theme` of the grandparent + */ + public Metadata withGrandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + /** + * The `thumb` of the grandparent + */ + public Metadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public Metadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The `title` of the grandparent + */ + public Metadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + + /** + * The `title` of the grandparent + */ + public Metadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public Metadata withGuid(List guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + + public Metadata withGuid(Optional> guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public Metadata withHero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public Metadata withHero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; return this; } @@ -735,19 +1868,288 @@ public class Metadata { return this; } - public Metadata withBanner(String banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = Optional.ofNullable(banner); + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Metadata withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); return this; } - public Metadata withBanner(Optional banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = banner; + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Metadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; return this; } + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Metadata withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Metadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Metadata withLastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Metadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Metadata withLeafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Metadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Metadata withMedia(List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + + public Metadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Metadata withOriginallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Metadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Metadata withOriginalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Metadata withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + /** + * The `hero` of the parent + */ + public Metadata withParentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + + /** + * The `hero` of the parent + */ + public Metadata withParentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + /** + * The `index` of the parent + */ + public Metadata withParentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + + /** + * The `index` of the parent + */ + public Metadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The `key` of the parent + */ + public Metadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + + /** + * The `key` of the parent + */ + public Metadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The `ratingKey` of the parent + */ + public Metadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public Metadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The `thumb` of the parent + */ + public Metadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + + /** + * The `thumb` of the parent + */ + public Metadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The `title` of the parent + */ + public Metadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + + /** + * The `title` of the parent + */ + public Metadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Metadata withPrimaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Metadata withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Metadata withPrompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Metadata withPrompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ public Metadata withRating(double rating) { Utils.checkNotNull(rating, "rating"); this.rating = Optional.ofNullable(rating); @@ -755,155 +2157,139 @@ public class Metadata { } + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ public Metadata withRating(Optional rating) { Utils.checkNotNull(rating, "rating"); this.rating = rating; return this; } - public Metadata withExpiresAt(int expiresAt) { - Utils.checkNotNull(expiresAt, "expiresAt"); - this.expiresAt = Optional.ofNullable(expiresAt); + public Metadata withRatingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); return this; } - public Metadata withExpiresAt(Optional expiresAt) { - Utils.checkNotNull(expiresAt, "expiresAt"); - this.expiresAt = expiresAt; + public Metadata withRatingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; return this; } - public Metadata withOriginalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); + /** + * Number of ratings under this metadata + */ + public Metadata withRatingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); return this; } - public Metadata withOriginalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; + /** + * Number of ratings under this metadata + */ + public Metadata withRatingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; return this; } - public Metadata withAudienceRating(double audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = Optional.ofNullable(audienceRating); - return this; - } - - - public Metadata withAudienceRating(Optional audienceRating) { - Utils.checkNotNull(audienceRating, "audienceRating"); - this.audienceRating = audienceRating; - return this; - } - - public Metadata withAudienceRatingImage(String audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); - return this; - } - - - public Metadata withAudienceRatingImage(Optional audienceRatingImage) { - Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); - this.audienceRatingImage = audienceRatingImage; - return this; - } - - public Metadata withRatingImage(String ratingImage) { + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Metadata withRatingImage(Object ratingImage) { Utils.checkNotNull(ratingImage, "ratingImage"); this.ratingImage = Optional.ofNullable(ratingImage); return this; } - public Metadata withRatingImage(Optional ratingImage) { + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Metadata withRatingImage(Optional ratingImage) { Utils.checkNotNull(ratingImage, "ratingImage"); this.ratingImage = ratingImage; return this; } - public Metadata withImdbRatingCount(int imdbRatingCount) { - Utils.checkNotNull(imdbRatingCount, "imdbRatingCount"); - this.imdbRatingCount = Optional.ofNullable(imdbRatingCount); + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Metadata withRatingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); return this; } - public Metadata withImdbRatingCount(Optional imdbRatingCount) { - Utils.checkNotNull(imdbRatingCount, "imdbRatingCount"); - this.imdbRatingCount = imdbRatingCount; + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Metadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; return this; } - public Metadata withSubtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); + public Metadata withRole(List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); return this; } - public Metadata withSubtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; + public Metadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; return this; } - public Metadata withTheme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = Optional.ofNullable(theme); + /** + * Indicates this is a search directory + */ + public Metadata withSearch(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); return this; } - public Metadata withTheme(Optional theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; + /** + * Indicates this is a search directory + */ + public Metadata withSearch(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; return this; } - public Metadata withLeafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Metadata withSecondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); return this; } - public Metadata withLeafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - return this; - } - - public Metadata withChildCount(int childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = Optional.ofNullable(childCount); - return this; - } - - - public Metadata withChildCount(Optional childCount) { - Utils.checkNotNull(childCount, "childCount"); - this.childCount = childCount; - return this; - } - - public Metadata withIsContinuingSeries(boolean isContinuingSeries) { - Utils.checkNotNull(isContinuingSeries, "isContinuingSeries"); - this.isContinuingSeries = Optional.ofNullable(isContinuingSeries); - return this; - } - - - public Metadata withIsContinuingSeries(Optional isContinuingSeries) { - Utils.checkNotNull(isContinuingSeries, "isContinuingSeries"); - this.isContinuingSeries = isContinuingSeries; + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Metadata withSecondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; return this; } + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ public Metadata withSkipChildren(boolean skipChildren) { Utils.checkNotNull(skipChildren, "skipChildren"); this.skipChildren = Optional.ofNullable(skipChildren); @@ -911,48 +2297,323 @@ public class Metadata { } + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ public Metadata withSkipChildren(Optional skipChildren) { Utils.checkNotNull(skipChildren, "skipChildren"); this.skipChildren = skipChildren; return this; } - public Metadata withAvailabilityId(String availabilityId) { - Utils.checkNotNull(availabilityId, "availabilityId"); - this.availabilityId = Optional.ofNullable(availabilityId); + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Metadata withSkipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); return this; } - public Metadata withAvailabilityId(Optional availabilityId) { - Utils.checkNotNull(availabilityId, "availabilityId"); - this.availabilityId = availabilityId; + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Metadata withSkipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; return this; } - public Metadata withStreamingMediaId(String streamingMediaId) { - Utils.checkNotNull(streamingMediaId, "streamingMediaId"); - this.streamingMediaId = Optional.ofNullable(streamingMediaId); + /** + * Typically only seen in metadata at a library's top level + */ + public Metadata withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); return this; } - public Metadata withStreamingMediaId(Optional streamingMediaId) { - Utils.checkNotNull(streamingMediaId, "streamingMediaId"); - this.streamingMediaId = streamingMediaId; + /** + * Typically only seen in metadata at a library's top level + */ + public Metadata withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; return this; } - public Metadata withPlayableKey(String playableKey) { - Utils.checkNotNull(playableKey, "playableKey"); - this.playableKey = Optional.ofNullable(playableKey); + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Metadata withStudio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); return this; } - public Metadata withPlayableKey(Optional playableKey) { - Utils.checkNotNull(playableKey, "playableKey"); - this.playableKey = playableKey; + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Metadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Metadata withSubtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Metadata withSubtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Metadata withSummary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Metadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Metadata withTagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Metadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Metadata withTheme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Metadata withTheme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Metadata withThumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Metadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Metadata withTitleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Metadata withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Metadata withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Metadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public Metadata withUserRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public Metadata withUserRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Metadata withViewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Metadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Metadata withViewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Metadata withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Metadata withViewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Metadata withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public Metadata withWriter(List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + + public Metadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Metadata withYear(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Metadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + @JsonAnySetter + public Metadata withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public Metadata withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; return this; } @@ -966,395 +2627,851 @@ public class Metadata { } Metadata other = (Metadata) o; return - Utils.enhancedDeepEquals(this.art, other.art) && - Utils.enhancedDeepEquals(this.guid, other.guid) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.studio, other.studio) && - Utils.enhancedDeepEquals(this.tagline, other.tagline) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.publicPagesURL, other.publicPagesURL) && - Utils.enhancedDeepEquals(this.slug, other.slug) && - Utils.enhancedDeepEquals(this.userState, other.userState) && + Utils.enhancedDeepEquals(this.player, other.player) && + Utils.enhancedDeepEquals(this.session, other.session) && + Utils.enhancedDeepEquals(this.user, other.user) && Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && - Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && - Utils.enhancedDeepEquals(this.year, other.year) && - Utils.enhancedDeepEquals(this.image, other.image) && - Utils.enhancedDeepEquals(this.banner, other.banner) && - Utils.enhancedDeepEquals(this.rating, other.rating) && - Utils.enhancedDeepEquals(this.expiresAt, other.expiresAt) && - Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.absoluteIndex, other.absoluteIndex) && + Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && + Utils.enhancedDeepEquals(this.art, other.art) && Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && - Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && - Utils.enhancedDeepEquals(this.imdbRatingCount, other.imdbRatingCount) && - Utils.enhancedDeepEquals(this.subtype, other.subtype) && - Utils.enhancedDeepEquals(this.theme, other.theme) && + Utils.enhancedDeepEquals(this.autotag, other.autotag) && + Utils.enhancedDeepEquals(this.banner, other.banner) && + Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && + Utils.enhancedDeepEquals(this.composite, other.composite) && + Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && + Utils.enhancedDeepEquals(this.country, other.country) && + Utils.enhancedDeepEquals(this.director, other.director) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.genre, other.genre) && + Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && + Utils.enhancedDeepEquals(this.grandparentHero, other.grandparentHero) && + Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && + Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && + Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && + Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && + Utils.enhancedDeepEquals(this.guid, other.guid) && + Utils.enhancedDeepEquals(this.hero, other.hero) && + Utils.enhancedDeepEquals(this.image, other.image) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && - Utils.enhancedDeepEquals(this.childCount, other.childCount) && - Utils.enhancedDeepEquals(this.isContinuingSeries, other.isContinuingSeries) && + Utils.enhancedDeepEquals(this.media, other.media) && + Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && + Utils.enhancedDeepEquals(this.parentHero, other.parentHero) && + Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && + Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && + Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && + Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && + Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && + Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && + Utils.enhancedDeepEquals(this.prompt, other.prompt) && + Utils.enhancedDeepEquals(this.rating, other.rating) && + Utils.enhancedDeepEquals(this.ratingArray, other.ratingArray) && + Utils.enhancedDeepEquals(this.ratingCount, other.ratingCount) && + Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.role, other.role) && + Utils.enhancedDeepEquals(this.search, other.search) && + Utils.enhancedDeepEquals(this.secondary, other.secondary) && Utils.enhancedDeepEquals(this.skipChildren, other.skipChildren) && - Utils.enhancedDeepEquals(this.availabilityId, other.availabilityId) && - Utils.enhancedDeepEquals(this.streamingMediaId, other.streamingMediaId) && - Utils.enhancedDeepEquals(this.playableKey, other.playableKey); + Utils.enhancedDeepEquals(this.skipParent, other.skipParent) && + Utils.enhancedDeepEquals(this.sort, other.sort) && + Utils.enhancedDeepEquals(this.studio, other.studio) && + Utils.enhancedDeepEquals(this.subtype, other.subtype) && + Utils.enhancedDeepEquals(this.summary, other.summary) && + Utils.enhancedDeepEquals(this.tagline, other.tagline) && + Utils.enhancedDeepEquals(this.theme, other.theme) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.userRating, other.userRating) && + Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && + Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && + Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && + Utils.enhancedDeepEquals(this.writer, other.writer) && + Utils.enhancedDeepEquals(this.year, other.year) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); } @Override public int hashCode() { return Utils.enhancedHash( - art, guid, key, - ratingKey, studio, tagline, - type, thumb, addedAt, - duration, publicPagesURL, slug, - userState, title, contentRating, - originallyAvailableAt, year, image, - banner, rating, expiresAt, - originalTitle, audienceRating, audienceRatingImage, - ratingImage, imdbRatingCount, subtype, - theme, leafCount, childCount, - isContinuingSeries, skipChildren, availabilityId, - streamingMediaId, playableKey); + player, session, user, + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year, additionalProperties); } @Override public String toString() { return Utils.toString(Metadata.class, - "art", art, - "guid", guid, - "key", key, - "ratingKey", ratingKey, - "studio", studio, - "tagline", tagline, - "type", type, - "thumb", thumb, - "addedAt", addedAt, - "duration", duration, - "publicPagesURL", publicPagesURL, - "slug", slug, - "userState", userState, + "player", player, + "session", session, + "user", user, "title", title, - "contentRating", contentRating, - "originallyAvailableAt", originallyAvailableAt, - "year", year, - "image", image, - "banner", banner, - "rating", rating, - "expiresAt", expiresAt, - "originalTitle", originalTitle, + "type", type, + "absoluteIndex", absoluteIndex, + "addedAt", addedAt, + "art", art, "audienceRating", audienceRating, "audienceRatingImage", audienceRatingImage, - "ratingImage", ratingImage, - "imdbRatingCount", imdbRatingCount, - "subtype", subtype, - "theme", theme, + "autotag", autotag, + "banner", banner, + "chapterSource", chapterSource, + "composite", composite, + "contentRating", contentRating, + "country", country, + "director", director, + "duration", duration, + "filter", filter, + "genre", genre, + "grandparentArt", grandparentArt, + "grandparentHero", grandparentHero, + "grandparentKey", grandparentKey, + "grandparentRatingKey", grandparentRatingKey, + "grandparentTheme", grandparentTheme, + "grandparentThumb", grandparentThumb, + "grandparentTitle", grandparentTitle, + "guid", guid, + "hero", hero, + "image", image, + "index", index, + "key", key, + "lastViewedAt", lastViewedAt, "leafCount", leafCount, - "childCount", childCount, - "isContinuingSeries", isContinuingSeries, + "media", media, + "originallyAvailableAt", originallyAvailableAt, + "originalTitle", originalTitle, + "parentHero", parentHero, + "parentIndex", parentIndex, + "parentKey", parentKey, + "parentRatingKey", parentRatingKey, + "parentThumb", parentThumb, + "parentTitle", parentTitle, + "primaryExtraKey", primaryExtraKey, + "prompt", prompt, + "rating", rating, + "ratingArray", ratingArray, + "ratingCount", ratingCount, + "ratingImage", ratingImage, + "ratingKey", ratingKey, + "role", role, + "search", search, + "secondary", secondary, "skipChildren", skipChildren, - "availabilityId", availabilityId, - "streamingMediaId", streamingMediaId, - "playableKey", playableKey); + "skipParent", skipParent, + "sort", sort, + "studio", studio, + "subtype", subtype, + "summary", summary, + "tagline", tagline, + "theme", theme, + "thumb", thumb, + "titleSort", titleSort, + "updatedAt", updatedAt, + "userRating", userRating, + "viewCount", viewCount, + "viewedLeafCount", viewedLeafCount, + "viewOffset", viewOffset, + "writer", writer, + "year", year, + "additionalProperties", additionalProperties); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional art = Optional.empty(); + private Optional player = Optional.empty(); - private Optional guid = Optional.empty(); + private Optional session = Optional.empty(); - private Optional key = Optional.empty(); + private Optional user = Optional.empty(); - private Optional ratingKey = Optional.empty(); + private Optional title = Optional.empty(); - private Optional studio = Optional.empty(); + private Optional type = Optional.empty(); - private Optional tagline = Optional.empty(); + private Optional absoluteIndex = Optional.empty(); - private Optional type = Optional.empty(); + private Optional addedAt = Optional.empty(); - private Optional thumb = Optional.empty(); - - private Optional addedAt = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional publicPagesURL = Optional.empty(); - - private Optional slug = Optional.empty(); - - private Optional userState = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional contentRating = Optional.empty(); - - private Optional originallyAvailableAt = Optional.empty(); - - private Optional year = Optional.empty(); - - private Optional> image = Optional.empty(); - - private Optional banner = Optional.empty(); - - private Optional rating = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - private Optional originalTitle = Optional.empty(); + private Optional art = Optional.empty(); private Optional audienceRating = Optional.empty(); - private Optional audienceRatingImage = Optional.empty(); + private Optional audienceRatingImage = Optional.empty(); - private Optional ratingImage = Optional.empty(); + private Optional> autotag = Optional.empty(); - private Optional imdbRatingCount = Optional.empty(); + private Optional banner = Optional.empty(); - private Optional subtype = Optional.empty(); + private Optional chapterSource = Optional.empty(); - private Optional theme = Optional.empty(); + private Optional composite = Optional.empty(); - private Optional leafCount = Optional.empty(); + private Optional contentRating = Optional.empty(); - private Optional childCount = Optional.empty(); + private Optional> country = Optional.empty(); - private Optional isContinuingSeries = Optional.empty(); + private Optional> director = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional> filter = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentHero = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional grandparentRatingKey = Optional.empty(); + + private Optional grandparentTheme = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional> guid = Optional.empty(); + + private Optional hero = Optional.empty(); + + private Optional> image = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional originalTitle = Optional.empty(); + + private Optional parentHero = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional prompt = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional> ratingArray = Optional.empty(); + + private Optional ratingCount = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Optional search = Optional.empty(); + + private Optional secondary = Optional.empty(); private Optional skipChildren = Optional.empty(); - private Optional availabilityId = Optional.empty(); + private Optional skipParent = Optional.empty(); - private Optional streamingMediaId = Optional.empty(); + private Optional> sort = Optional.empty(); - private Optional playableKey = Optional.empty(); + private Optional studio = Optional.empty(); + + private Optional subtype = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional theme = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional userRating = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional viewedLeafCount = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional year = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); private Builder() { // force use of static builder() method } - public Builder art(String art) { - Utils.checkNotNull(art, "art"); - this.art = Optional.ofNullable(art); + /** + * Information about the player being used for playback + */ + public Builder player(Player player) { + Utils.checkNotNull(player, "player"); + this.player = Optional.ofNullable(player); return this; } - public Builder art(Optional art) { - Utils.checkNotNull(art, "art"); - this.art = art; + /** + * Information about the player being used for playback + */ + public Builder player(Optional player) { + Utils.checkNotNull(player, "player"); + this.player = player; return this; } - public Builder guid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); + /** + * Information about the playback session + */ + public Builder session(Session session) { + Utils.checkNotNull(session, "session"); + this.session = Optional.ofNullable(session); return this; } - public Builder guid(Optional guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = guid; + /** + * Information about the playback session + */ + public Builder session(Optional session) { + Utils.checkNotNull(session, "session"); + this.session = session; return this; } - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); + /** + * The user playing the content + */ + public Builder user(User user) { + Utils.checkNotNull(user, "user"); + this.user = Optional.ofNullable(user); return this; } - public Builder key(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; + /** + * The user playing the content + */ + public Builder user(Optional user) { + Utils.checkNotNull(user, "user"); + this.user = user; return this; } - public Builder ratingKey(String 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 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 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 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 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 addedAt(int 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 duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - public Builder publicPagesURL(String publicPagesURL) { - Utils.checkNotNull(publicPagesURL, "publicPagesURL"); - this.publicPagesURL = Optional.ofNullable(publicPagesURL); - return this; - } - - public Builder publicPagesURL(Optional publicPagesURL) { - Utils.checkNotNull(publicPagesURL, "publicPagesURL"); - this.publicPagesURL = publicPagesURL; - return this; - } - - - 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; - } - - - public Builder userState(boolean userState) { - Utils.checkNotNull(userState, "userState"); - this.userState = Optional.ofNullable(userState); - return this; - } - - public Builder userState(Optional userState) { - Utils.checkNotNull(userState, "userState"); - this.userState = userState; - return this; - } - - - public Builder title(String title) { + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Object title) { Utils.checkNotNull(title, "title"); this.title = Optional.ofNullable(title); return this; } - public Builder title(Optional title) { + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } - public Builder contentRating(String contentRating) { + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + + public Builder autotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + public Builder autotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Object contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = Optional.ofNullable(contentRating); return this; } - public Builder contentRating(Optional contentRating) { + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Optional contentRating) { Utils.checkNotNull(contentRating, "contentRating"); this.contentRating = contentRating; return this; } - public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + public Builder country(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); return this; } - public Builder originallyAvailableAt(Optional originallyAvailableAt) { - Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); - this.originallyAvailableAt = originallyAvailableAt; + public Builder country(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; return this; } - public Builder year(int year) { - Utils.checkNotNull(year, "year"); - this.year = Optional.ofNullable(year); + public Builder director(List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); return this; } - public Builder year(Optional year) { - Utils.checkNotNull(year, "year"); - this.year = year; + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + 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; + } + + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + + public Builder guid(List 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; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; return this; } @@ -1372,25 +3489,297 @@ public class Metadata { } - public Builder banner(String banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = Optional.ofNullable(banner); + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); return this; } - public Builder banner(Optional banner) { - Utils.checkNotNull(banner, "banner"); - this.banner = banner; + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; return this; } + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + 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; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + + /** + * The `hero` of the parent + */ + public Builder parentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + /** + * The `hero` of the parent + */ + public Builder parentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + + /** + * The `index` of the parent + */ + public Builder parentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The `index` of the parent + */ + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + + /** + * The `key` of the parent + */ + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The `key` of the parent + */ + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + + /** + * The `title` of the parent + */ + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The `title` of the parent + */ + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ public Builder rating(double rating) { Utils.checkNotNull(rating, "rating"); this.rating = Optional.ofNullable(rating); return this; } + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ public Builder rating(Optional rating) { Utils.checkNotNull(rating, "rating"); this.rating = rating; @@ -1398,155 +3787,139 @@ public class Metadata { } - public Builder expiresAt(int expiresAt) { - Utils.checkNotNull(expiresAt, "expiresAt"); - this.expiresAt = Optional.ofNullable(expiresAt); + public Builder ratingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); return this; } - public Builder expiresAt(Optional expiresAt) { - Utils.checkNotNull(expiresAt, "expiresAt"); - this.expiresAt = expiresAt; + public Builder ratingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; return this; } - public Builder originalTitle(String originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = Optional.ofNullable(originalTitle); + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); return this; } - public Builder originalTitle(Optional originalTitle) { - Utils.checkNotNull(originalTitle, "originalTitle"); - this.originalTitle = originalTitle; + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; 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 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 ratingImage(String ratingImage) { + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Object ratingImage) { Utils.checkNotNull(ratingImage, "ratingImage"); this.ratingImage = Optional.ofNullable(ratingImage); return this; } - public Builder ratingImage(Optional ratingImage) { + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Optional ratingImage) { Utils.checkNotNull(ratingImage, "ratingImage"); this.ratingImage = ratingImage; return this; } - public Builder imdbRatingCount(int imdbRatingCount) { - Utils.checkNotNull(imdbRatingCount, "imdbRatingCount"); - this.imdbRatingCount = Optional.ofNullable(imdbRatingCount); + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); return this; } - public Builder imdbRatingCount(Optional imdbRatingCount) { - Utils.checkNotNull(imdbRatingCount, "imdbRatingCount"); - this.imdbRatingCount = imdbRatingCount; + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; return this; } - public Builder subtype(String subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = Optional.ofNullable(subtype); + public Builder role(List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); return this; } - public Builder subtype(Optional subtype) { - Utils.checkNotNull(subtype, "subtype"); - this.subtype = subtype; + public Builder role(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; return this; } - public Builder theme(String theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = Optional.ofNullable(theme); + /** + * Indicates this is a search directory + */ + public Builder search(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); return this; } - public Builder theme(Optional theme) { - Utils.checkNotNull(theme, "theme"); - this.theme = theme; + /** + * Indicates this is a search directory + */ + public Builder search(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; return this; } - public Builder leafCount(int leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = Optional.ofNullable(leafCount); + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); return this; } - public Builder leafCount(Optional leafCount) { - Utils.checkNotNull(leafCount, "leafCount"); - this.leafCount = leafCount; - 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 isContinuingSeries(boolean isContinuingSeries) { - Utils.checkNotNull(isContinuingSeries, "isContinuingSeries"); - this.isContinuingSeries = Optional.ofNullable(isContinuingSeries); - return this; - } - - public Builder isContinuingSeries(Optional isContinuingSeries) { - Utils.checkNotNull(isContinuingSeries, "isContinuingSeries"); - this.isContinuingSeries = isContinuingSeries; + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; return this; } + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ public Builder skipChildren(boolean skipChildren) { Utils.checkNotNull(skipChildren, "skipChildren"); this.skipChildren = Optional.ofNullable(skipChildren); return this; } + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ public Builder skipChildren(Optional skipChildren) { Utils.checkNotNull(skipChildren, "skipChildren"); this.skipChildren = skipChildren; @@ -1554,59 +3927,347 @@ public class Metadata { } - public Builder availabilityId(String availabilityId) { - Utils.checkNotNull(availabilityId, "availabilityId"); - this.availabilityId = Optional.ofNullable(availabilityId); + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); return this; } - public Builder availabilityId(Optional availabilityId) { - Utils.checkNotNull(availabilityId, "availabilityId"); - this.availabilityId = availabilityId; + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; return this; } - public Builder streamingMediaId(String streamingMediaId) { - Utils.checkNotNull(streamingMediaId, "streamingMediaId"); - this.streamingMediaId = Optional.ofNullable(streamingMediaId); + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); return this; } - public Builder streamingMediaId(Optional streamingMediaId) { - Utils.checkNotNull(streamingMediaId, "streamingMediaId"); - this.streamingMediaId = streamingMediaId; + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; return this; } - public Builder playableKey(String playableKey) { - Utils.checkNotNull(playableKey, "playableKey"); - this.playableKey = Optional.ofNullable(playableKey); + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); return this; } - public Builder playableKey(Optional playableKey) { - Utils.checkNotNull(playableKey, "playableKey"); - this.playableKey = playableKey; + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + 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; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; return this; } public Metadata build() { return new Metadata( - art, guid, key, - ratingKey, studio, tagline, - type, thumb, addedAt, - duration, publicPagesURL, slug, - userState, title, contentRating, - originallyAvailableAt, year, image, - banner, rating, expiresAt, - originalTitle, audienceRating, audienceRatingImage, - ratingImage, imdbRatingCount, subtype, - theme, leafCount, childCount, - isContinuingSeries, skipChildren, availabilityId, - streamingMediaId, playableKey); + player, session, user, + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year) + .withAdditionalProperties(additionalProperties); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MinSize.java b/src/main/java/dev/plexapi/sdk/models/operations/MinSize.java deleted file mode 100644 index 812b3337..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/MinSize.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * MinSize - * - *

images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. - */ -public enum MinSize { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - MinSize(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (MinSize o: MinSize.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceMediaContainer.java new file mode 100644 index 00000000..e43653df --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceMediaContainer.java @@ -0,0 +1,370 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * ModifyDeviceMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class ModifyDeviceMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public ModifyDeviceMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.message = message; + this.status = status; + } + + public ModifyDeviceMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @JsonIgnore + public Optional message() { + return message; + } + + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + public ModifyDeviceMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public ModifyDeviceMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ModifyDeviceMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public ModifyDeviceMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ModifyDeviceMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public ModifyDeviceMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ModifyDeviceMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public ModifyDeviceMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public ModifyDeviceMediaContainer withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + + public ModifyDeviceMediaContainer withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public ModifyDeviceMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + public ModifyDeviceMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifyDeviceMediaContainer other = (ModifyDeviceMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, message, status); + } + + @Override + public String toString() { + return Utils.toString(ModifyDeviceMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "message", message, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional message = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public Builder message(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public ModifyDeviceMediaContainer build() { + + return new ModifyDeviceMediaContainer( + identifier, offset, size, + totalSize, message, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceRequest.java new file mode 100644 index 00000000..03468808 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceRequest.java @@ -0,0 +1,844 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ModifyDeviceRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the device. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + /** + * Whether to enable the device + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=enabled") + private Optional enabled; + + @JsonCreator + public ModifyDeviceRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long deviceId, + Optional enabled) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceId, "deviceId"); + Utils.checkNotNull(enabled, "enabled"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceId = deviceId; + this.enabled = enabled; + } + + public ModifyDeviceRequest( + long deviceId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the device. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + /** + * Whether to enable the device + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional enabled() { + return (Optional) enabled; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ModifyDeviceRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ModifyDeviceRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ModifyDeviceRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ModifyDeviceRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ModifyDeviceRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ModifyDeviceRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ModifyDeviceRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ModifyDeviceRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ModifyDeviceRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ModifyDeviceRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ModifyDeviceRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ModifyDeviceRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ModifyDeviceRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ModifyDeviceRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ModifyDeviceRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ModifyDeviceRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ModifyDeviceRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ModifyDeviceRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ModifyDeviceRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ModifyDeviceRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ModifyDeviceRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ModifyDeviceRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the device. + */ + public ModifyDeviceRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + /** + * Whether to enable the device + */ + public ModifyDeviceRequest withEnabled(BoolInt enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = Optional.ofNullable(enabled); + return this; + } + + + /** + * Whether to enable the device + */ + public ModifyDeviceRequest withEnabled(Optional enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = enabled; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifyDeviceRequest other = (ModifyDeviceRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId) && + Utils.enhancedDeepEquals(this.enabled, other.enabled); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId, + enabled); + } + + @Override + public String toString() { + return Utils.toString(ModifyDeviceRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceId", deviceId, + "enabled", enabled); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long deviceId; + + private Optional enabled = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the device. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + + /** + * Whether to enable the device + */ + public Builder enabled(BoolInt enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = Optional.ofNullable(enabled); + return this; + } + + /** + * Whether to enable the device + */ + public Builder enabled(Optional enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = enabled; + return this; + } + + public ModifyDeviceRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ModifyDeviceRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId, + enabled); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceRequestBuilder.java new file mode 100644 index 00000000..379c1cfd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ModifyDevice; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ModifyDeviceRequestBuilder { + + private ModifyDeviceRequest request; + private final SDKConfiguration sdkConfiguration; + + public ModifyDeviceRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ModifyDeviceRequestBuilder request(ModifyDeviceRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ModifyDeviceResponse call() throws Exception { + + RequestOperation operation + = new ModifyDevice.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceResponse.java new file mode 100644 index 00000000..dfa72daa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class ModifyDeviceResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ModifyDeviceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ModifyDeviceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ModifyDeviceResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ModifyDeviceResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ModifyDeviceResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ModifyDeviceResponse withObject(ModifyDeviceResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ModifyDeviceResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ModifyDeviceResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifyDeviceResponse other = (ModifyDeviceResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ModifyDeviceResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ModifyDeviceResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ModifyDeviceResponse build() { + + return new ModifyDeviceResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceResponseBody.java new file mode 100644 index 00000000..a941c420 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ModifyDeviceResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ModifyDeviceResponseBody + * + *

OK + */ +public class ModifyDeviceResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ModifyDeviceResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ModifyDeviceResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ModifyDeviceResponseBody withMediaContainer(ModifyDeviceMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ModifyDeviceResponseBody 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; + } + ModifyDeviceResponseBody other = (ModifyDeviceResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ModifyDeviceResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(ModifyDeviceMediaContainer 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 ModifyDeviceResponseBody build() { + + return new ModifyDeviceResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemRequest.java new file mode 100644 index 00000000..1023c6b3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemRequest.java @@ -0,0 +1,883 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class MoveCollectionItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The collection id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=collectionId") + private long collectionId; + + /** + * The item to move + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=itemId") + private long itemId; + + /** + * The item to move this item after. If not provided, this item will be moved to the beginning + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=after") + private Optional after; + + @JsonCreator + public MoveCollectionItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long collectionId, + long itemId, + Optional after) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(collectionId, "collectionId"); + Utils.checkNotNull(itemId, "itemId"); + Utils.checkNotNull(after, "after"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.collectionId = collectionId; + this.itemId = itemId; + this.after = after; + } + + public MoveCollectionItemRequest( + long collectionId, + long itemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), collectionId, + itemId, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The collection id + */ + @JsonIgnore + public long collectionId() { + return collectionId; + } + + /** + * The item to move + */ + @JsonIgnore + public long itemId() { + return itemId; + } + + /** + * The item to move this item after. If not provided, this item will be moved to the beginning + */ + @JsonIgnore + public Optional after() { + return after; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MoveCollectionItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MoveCollectionItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public MoveCollectionItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public MoveCollectionItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public MoveCollectionItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public MoveCollectionItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public MoveCollectionItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public MoveCollectionItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public MoveCollectionItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public MoveCollectionItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public MoveCollectionItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public MoveCollectionItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public MoveCollectionItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public MoveCollectionItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public MoveCollectionItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public MoveCollectionItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public MoveCollectionItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public MoveCollectionItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public MoveCollectionItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public MoveCollectionItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public MoveCollectionItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public MoveCollectionItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The collection id + */ + public MoveCollectionItemRequest withCollectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + /** + * The item to move + */ + public MoveCollectionItemRequest withItemId(long itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + /** + * The item to move this item after. If not provided, this item will be moved to the beginning + */ + public MoveCollectionItemRequest withAfter(long after) { + Utils.checkNotNull(after, "after"); + this.after = Optional.ofNullable(after); + return this; + } + + + /** + * The item to move this item after. If not provided, this item will be moved to the beginning + */ + public MoveCollectionItemRequest withAfter(Optional after) { + Utils.checkNotNull(after, "after"); + this.after = after; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MoveCollectionItemRequest other = (MoveCollectionItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.collectionId, other.collectionId) && + Utils.enhancedDeepEquals(this.itemId, other.itemId) && + Utils.enhancedDeepEquals(this.after, other.after); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, collectionId, + itemId, after); + } + + @Override + public String toString() { + return Utils.toString(MoveCollectionItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "collectionId", collectionId, + "itemId", itemId, + "after", after); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long collectionId; + + private Long itemId; + + private Optional after = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The collection id + */ + public Builder collectionId(long collectionId) { + Utils.checkNotNull(collectionId, "collectionId"); + this.collectionId = collectionId; + return this; + } + + + /** + * The item to move + */ + public Builder itemId(long itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + + /** + * The item to move this item after. If not provided, this item will be moved to the beginning + */ + public Builder after(long after) { + Utils.checkNotNull(after, "after"); + this.after = Optional.ofNullable(after); + return this; + } + + /** + * The item to move this item after. If not provided, this item will be moved to the beginning + */ + public Builder after(Optional after) { + Utils.checkNotNull(after, "after"); + this.after = after; + return this; + } + + public MoveCollectionItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new MoveCollectionItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, collectionId, + itemId, after); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemRequestBuilder.java new file mode 100644 index 00000000..3c2d5ac8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.MoveCollectionItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class MoveCollectionItemRequestBuilder { + + private MoveCollectionItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public MoveCollectionItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MoveCollectionItemRequestBuilder request(MoveCollectionItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public MoveCollectionItemResponse call() throws Exception { + + RequestOperation operation + = new MoveCollectionItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemResponse.java new file mode 100644 index 00000000..ff8504ba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MoveCollectionItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +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.Optional; + + +public class MoveCollectionItemResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public MoveCollectionItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public MoveCollectionItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MoveCollectionItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MoveCollectionItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MoveCollectionItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public MoveCollectionItemResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public MoveCollectionItemResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MoveCollectionItemResponse other = (MoveCollectionItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(MoveCollectionItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public MoveCollectionItemResponse build() { + + return new MoveCollectionItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MoveHubRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/MoveHubRequest.java new file mode 100644 index 00000000..7d1d465d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MoveHubRequest.java @@ -0,0 +1,883 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class MoveHubRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section ID for the hubs to reorder + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * The identifier of the hub to move + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=identifier") + private String identifier; + + /** + * The identifier of the hub to order this hub after (or empty/missing to put this hub first) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=after") + private Optional after; + + @JsonCreator + public MoveHubRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + String identifier, + Optional after) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(after, "after"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.identifier = identifier; + this.after = after; + } + + public MoveHubRequest( + long sectionId, + String identifier) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + identifier, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section ID for the hubs to reorder + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * The identifier of the hub to move + */ + @JsonIgnore + public String identifier() { + return identifier; + } + + /** + * The identifier of the hub to order this hub after (or empty/missing to put this hub first) + */ + @JsonIgnore + public Optional after() { + return after; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MoveHubRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MoveHubRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public MoveHubRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public MoveHubRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public MoveHubRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public MoveHubRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public MoveHubRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public MoveHubRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public MoveHubRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public MoveHubRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public MoveHubRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public MoveHubRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public MoveHubRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public MoveHubRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public MoveHubRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public MoveHubRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public MoveHubRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public MoveHubRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public MoveHubRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public MoveHubRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public MoveHubRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public MoveHubRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section ID for the hubs to reorder + */ + public MoveHubRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The identifier of the hub to move + */ + public MoveHubRequest withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The identifier of the hub to order this hub after (or empty/missing to put this hub first) + */ + public MoveHubRequest withAfter(String after) { + Utils.checkNotNull(after, "after"); + this.after = Optional.ofNullable(after); + return this; + } + + + /** + * The identifier of the hub to order this hub after (or empty/missing to put this hub first) + */ + public MoveHubRequest withAfter(Optional after) { + Utils.checkNotNull(after, "after"); + this.after = after; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MoveHubRequest other = (MoveHubRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.after, other.after); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + identifier, after); + } + + @Override + public String toString() { + return Utils.toString(MoveHubRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "identifier", identifier, + "after", after); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private String identifier; + + private Optional after = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section ID for the hubs to reorder + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The identifier of the hub to move + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + + /** + * The identifier of the hub to order this hub after (or empty/missing to put this hub first) + */ + public Builder after(String after) { + Utils.checkNotNull(after, "after"); + this.after = Optional.ofNullable(after); + return this; + } + + /** + * The identifier of the hub to order this hub after (or empty/missing to put this hub first) + */ + public Builder after(Optional after) { + Utils.checkNotNull(after, "after"); + this.after = after; + return this; + } + + public MoveHubRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new MoveHubRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + identifier, after); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MoveHubRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/MoveHubRequestBuilder.java new file mode 100644 index 00000000..88623357 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MoveHubRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.MoveHub; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class MoveHubRequestBuilder { + + private MoveHubRequest request; + private final SDKConfiguration sdkConfiguration; + + public MoveHubRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MoveHubRequestBuilder request(MoveHubRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public MoveHubResponse call() throws Exception { + + RequestOperation operation + = new MoveHub.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MoveHubResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/MoveHubResponse.java new file mode 100644 index 00000000..8dc159eb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MoveHubResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.GetResponses200; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class MoveHubResponse 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; + + /** + * OK + */ + private Optional getResponses200; + + + private Map> headers; + + @JsonCreator + public MoveHubResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional getResponses200, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(getResponses200, "getResponses200"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.getResponses200 = getResponses200; + this.headers = headers; + } + + public MoveHubResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getResponses200() { + return (Optional) getResponses200; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MoveHubResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MoveHubResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MoveHubResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public MoveHubResponse withGetResponses200(GetResponses200 getResponses200) { + Utils.checkNotNull(getResponses200, "getResponses200"); + this.getResponses200 = Optional.ofNullable(getResponses200); + return this; + } + + + /** + * OK + */ + public MoveHubResponse withGetResponses200(Optional getResponses200) { + Utils.checkNotNull(getResponses200, "getResponses200"); + this.getResponses200 = getResponses200; + return this; + } + + public MoveHubResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MoveHubResponse other = (MoveHubResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getResponses200, other.getResponses200) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getResponses200, headers); + } + + @Override + public String toString() { + return Utils.toString(MoveHubResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getResponses200", getResponses200, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional getResponses200 = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder getResponses200(GetResponses200 getResponses200) { + Utils.checkNotNull(getResponses200, "getResponses200"); + this.getResponses200 = Optional.ofNullable(getResponses200); + return this; + } + + /** + * OK + */ + public Builder getResponses200(Optional getResponses200) { + Utils.checkNotNull(getResponses200, "getResponses200"); + this.getResponses200 = getResponses200; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public MoveHubResponse build() { + + return new MoveHubResponse( + contentType, statusCode, rawResponse, + getResponses200, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemRequest.java new file mode 100644 index 00000000..246c14ab --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemRequest.java @@ -0,0 +1,883 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class MovePlayQueueItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the play queue. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playQueueId") + private long playQueueId; + + /** + * The play queue item ID to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playQueueItemId") + private long playQueueItemId; + + /** + * The play queue item ID to insert the new item after. If not present, moves to the beginning. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=after") + private Optional after; + + @JsonCreator + public MovePlayQueueItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playQueueId, + long playQueueItemId, + Optional after) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playQueueId, "playQueueId"); + Utils.checkNotNull(playQueueItemId, "playQueueItemId"); + Utils.checkNotNull(after, "after"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playQueueId = playQueueId; + this.playQueueItemId = playQueueItemId; + this.after = after; + } + + public MovePlayQueueItemRequest( + long playQueueId, + long playQueueItemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playQueueId, + playQueueItemId, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the play queue. + */ + @JsonIgnore + public long playQueueId() { + return playQueueId; + } + + /** + * The play queue item ID to delete. + */ + @JsonIgnore + public long playQueueItemId() { + return playQueueItemId; + } + + /** + * The play queue item ID to insert the new item after. If not present, moves to the beginning. + */ + @JsonIgnore + public Optional after() { + return after; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MovePlayQueueItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MovePlayQueueItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public MovePlayQueueItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public MovePlayQueueItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public MovePlayQueueItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public MovePlayQueueItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public MovePlayQueueItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public MovePlayQueueItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public MovePlayQueueItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public MovePlayQueueItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public MovePlayQueueItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public MovePlayQueueItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public MovePlayQueueItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public MovePlayQueueItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public MovePlayQueueItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public MovePlayQueueItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public MovePlayQueueItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public MovePlayQueueItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public MovePlayQueueItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public MovePlayQueueItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public MovePlayQueueItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public MovePlayQueueItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the play queue. + */ + public MovePlayQueueItemRequest withPlayQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + /** + * The play queue item ID to delete. + */ + public MovePlayQueueItemRequest withPlayQueueItemId(long playQueueItemId) { + Utils.checkNotNull(playQueueItemId, "playQueueItemId"); + this.playQueueItemId = playQueueItemId; + return this; + } + + /** + * The play queue item ID to insert the new item after. If not present, moves to the beginning. + */ + public MovePlayQueueItemRequest withAfter(long after) { + Utils.checkNotNull(after, "after"); + this.after = Optional.ofNullable(after); + return this; + } + + + /** + * The play queue item ID to insert the new item after. If not present, moves to the beginning. + */ + public MovePlayQueueItemRequest withAfter(Optional after) { + Utils.checkNotNull(after, "after"); + this.after = after; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MovePlayQueueItemRequest other = (MovePlayQueueItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playQueueId, other.playQueueId) && + Utils.enhancedDeepEquals(this.playQueueItemId, other.playQueueItemId) && + Utils.enhancedDeepEquals(this.after, other.after); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId, + playQueueItemId, after); + } + + @Override + public String toString() { + return Utils.toString(MovePlayQueueItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playQueueId", playQueueId, + "playQueueItemId", playQueueItemId, + "after", after); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playQueueId; + + private Long playQueueItemId; + + private Optional after = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the play queue. + */ + public Builder playQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + + /** + * The play queue item ID to delete. + */ + public Builder playQueueItemId(long playQueueItemId) { + Utils.checkNotNull(playQueueItemId, "playQueueItemId"); + this.playQueueItemId = playQueueItemId; + return this; + } + + + /** + * The play queue item ID to insert the new item after. If not present, moves to the beginning. + */ + public Builder after(long after) { + Utils.checkNotNull(after, "after"); + this.after = Optional.ofNullable(after); + return this; + } + + /** + * The play queue item ID to insert the new item after. If not present, moves to the beginning. + */ + public Builder after(Optional after) { + Utils.checkNotNull(after, "after"); + this.after = after; + return this; + } + + public MovePlayQueueItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new MovePlayQueueItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId, + playQueueItemId, after); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemRequestBuilder.java new file mode 100644 index 00000000..c069e4f2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.MovePlayQueueItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class MovePlayQueueItemRequestBuilder { + + private MovePlayQueueItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public MovePlayQueueItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MovePlayQueueItemRequestBuilder request(MovePlayQueueItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public MovePlayQueueItemResponse call() throws Exception { + + RequestOperation operation + = new MovePlayQueueItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemResponse.java new file mode 100644 index 00000000..2572453e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MovePlayQueueItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class MovePlayQueueItemResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public MovePlayQueueItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public MovePlayQueueItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MovePlayQueueItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MovePlayQueueItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MovePlayQueueItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public MovePlayQueueItemResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public MovePlayQueueItemResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MovePlayQueueItemResponse other = (MovePlayQueueItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(MovePlayQueueItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public MovePlayQueueItemResponse build() { + + return new MovePlayQueueItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemRequest.java new file mode 100644 index 00000000..5ba2184a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemRequest.java @@ -0,0 +1,883 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class MovePlaylistItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; + + /** + * The playlist item ID to move. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistItemId") + private long playlistItemId; + + /** + * The playlist item ID to insert the new item after. If not provided, item is moved to beginning of playlist + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=after") + private Optional after; + + @JsonCreator + public MovePlaylistItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId, + long playlistItemId, + Optional after) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + Utils.checkNotNull(playlistItemId, "playlistItemId"); + Utils.checkNotNull(after, "after"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + this.playlistItemId = playlistItemId; + this.after = after; + } + + public MovePlaylistItemRequest( + long playlistId, + long playlistItemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId, + playlistItemId, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; + } + + /** + * The playlist item ID to move. + */ + @JsonIgnore + public long playlistItemId() { + return playlistItemId; + } + + /** + * The playlist item ID to insert the new item after. If not provided, item is moved to beginning of playlist + */ + @JsonIgnore + public Optional after() { + return after; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MovePlaylistItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public MovePlaylistItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public MovePlaylistItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public MovePlaylistItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public MovePlaylistItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public MovePlaylistItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public MovePlaylistItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public MovePlaylistItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public MovePlaylistItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public MovePlaylistItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public MovePlaylistItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public MovePlaylistItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public MovePlaylistItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public MovePlaylistItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public MovePlaylistItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public MovePlaylistItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public MovePlaylistItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public MovePlaylistItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public MovePlaylistItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public MovePlaylistItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public MovePlaylistItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public MovePlaylistItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public MovePlaylistItemRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + /** + * The playlist item ID to move. + */ + public MovePlaylistItemRequest withPlaylistItemId(long playlistItemId) { + Utils.checkNotNull(playlistItemId, "playlistItemId"); + this.playlistItemId = playlistItemId; + return this; + } + + /** + * The playlist item ID to insert the new item after. If not provided, item is moved to beginning of playlist + */ + public MovePlaylistItemRequest withAfter(long after) { + Utils.checkNotNull(after, "after"); + this.after = Optional.ofNullable(after); + return this; + } + + + /** + * The playlist item ID to insert the new item after. If not provided, item is moved to beginning of playlist + */ + public MovePlaylistItemRequest withAfter(Optional after) { + Utils.checkNotNull(after, "after"); + this.after = after; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MovePlaylistItemRequest other = (MovePlaylistItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId) && + Utils.enhancedDeepEquals(this.playlistItemId, other.playlistItemId) && + Utils.enhancedDeepEquals(this.after, other.after); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + playlistItemId, after); + } + + @Override + public String toString() { + return Utils.toString(MovePlaylistItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId, + "playlistItemId", playlistItemId, + "after", after); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; + + private Long playlistItemId; + + private Optional after = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + + /** + * The playlist item ID to move. + */ + public Builder playlistItemId(long playlistItemId) { + Utils.checkNotNull(playlistItemId, "playlistItemId"); + this.playlistItemId = playlistItemId; + return this; + } + + + /** + * The playlist item ID to insert the new item after. If not provided, item is moved to beginning of playlist + */ + public Builder after(long after) { + Utils.checkNotNull(after, "after"); + this.after = Optional.ofNullable(after); + return this; + } + + /** + * The playlist item ID to insert the new item after. If not provided, item is moved to beginning of playlist + */ + public Builder after(Optional after) { + Utils.checkNotNull(after, "after"); + this.after = after; + return this; + } + + public MovePlaylistItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new MovePlaylistItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + playlistItemId, after); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemRequestBuilder.java new file mode 100644 index 00000000..c9ba7d8d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.MovePlaylistItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class MovePlaylistItemRequestBuilder { + + private MovePlaylistItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public MovePlaylistItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MovePlaylistItemRequestBuilder request(MovePlaylistItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public MovePlaylistItemResponse call() throws Exception { + + RequestOperation operation + = new MovePlaylistItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemResponse.java new file mode 100644 index 00000000..d4afc66f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MovePlaylistItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class MovePlaylistItemResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public MovePlaylistItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public MovePlaylistItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MovePlaylistItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MovePlaylistItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MovePlaylistItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public MovePlaylistItemResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public MovePlaylistItemResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MovePlaylistItemResponse other = (MovePlaylistItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(MovePlaylistItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public MovePlaylistItemResponse build() { + + return new MovePlaylistItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/MyPlex.java b/src/main/java/dev/plexapi/sdk/models/operations/MyPlex.java deleted file mode 100644 index da7ac6bf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/MyPlex.java +++ /dev/null @@ -1,595 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class MyPlex { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("authToken") - private Optional authToken; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("username") - private Optional username; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mappingState") - private Optional mappingState; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mappingError") - private Optional mappingError; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("signInState") - private Optional signInState; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("publicAddress") - private Optional publicAddress; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("publicPort") - private Optional publicPort; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("privateAddress") - private Optional privateAddress; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("privatePort") - private Optional privatePort; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subscriptionFeatures") - private Optional subscriptionFeatures; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subscriptionActive") - private Optional subscriptionActive; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subscriptionState") - private Optional subscriptionState; - - @JsonCreator - public MyPlex( - @JsonProperty("authToken") Optional authToken, - @JsonProperty("username") Optional username, - @JsonProperty("mappingState") Optional mappingState, - @JsonProperty("mappingError") Optional mappingError, - @JsonProperty("signInState") Optional signInState, - @JsonProperty("publicAddress") Optional publicAddress, - @JsonProperty("publicPort") Optional publicPort, - @JsonProperty("privateAddress") Optional privateAddress, - @JsonProperty("privatePort") Optional privatePort, - @JsonProperty("subscriptionFeatures") Optional subscriptionFeatures, - @JsonProperty("subscriptionActive") Optional subscriptionActive, - @JsonProperty("subscriptionState") Optional subscriptionState) { - Utils.checkNotNull(authToken, "authToken"); - Utils.checkNotNull(username, "username"); - Utils.checkNotNull(mappingState, "mappingState"); - Utils.checkNotNull(mappingError, "mappingError"); - Utils.checkNotNull(signInState, "signInState"); - Utils.checkNotNull(publicAddress, "publicAddress"); - Utils.checkNotNull(publicPort, "publicPort"); - Utils.checkNotNull(privateAddress, "privateAddress"); - Utils.checkNotNull(privatePort, "privatePort"); - Utils.checkNotNull(subscriptionFeatures, "subscriptionFeatures"); - Utils.checkNotNull(subscriptionActive, "subscriptionActive"); - Utils.checkNotNull(subscriptionState, "subscriptionState"); - this.authToken = authToken; - this.username = username; - this.mappingState = mappingState; - this.mappingError = mappingError; - this.signInState = signInState; - this.publicAddress = publicAddress; - this.publicPort = publicPort; - this.privateAddress = privateAddress; - this.privatePort = privatePort; - this.subscriptionFeatures = subscriptionFeatures; - this.subscriptionActive = subscriptionActive; - this.subscriptionState = subscriptionState; - } - - public MyPlex() { - 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()); - } - - @JsonIgnore - public Optional authToken() { - return authToken; - } - - @JsonIgnore - public Optional username() { - return username; - } - - @JsonIgnore - public Optional mappingState() { - return mappingState; - } - - @JsonIgnore - public Optional mappingError() { - return mappingError; - } - - @JsonIgnore - public Optional signInState() { - return signInState; - } - - @JsonIgnore - public Optional publicAddress() { - return publicAddress; - } - - @JsonIgnore - public Optional publicPort() { - return publicPort; - } - - @JsonIgnore - public Optional privateAddress() { - return privateAddress; - } - - @JsonIgnore - public Optional privatePort() { - return privatePort; - } - - @JsonIgnore - public Optional subscriptionFeatures() { - return subscriptionFeatures; - } - - @JsonIgnore - public Optional subscriptionActive() { - return subscriptionActive; - } - - @JsonIgnore - public Optional subscriptionState() { - return subscriptionState; - } - - public static Builder builder() { - return new Builder(); - } - - - public MyPlex withAuthToken(String authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = Optional.ofNullable(authToken); - return this; - } - - - public MyPlex withAuthToken(Optional authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = authToken; - return this; - } - - public MyPlex withUsername(String username) { - Utils.checkNotNull(username, "username"); - this.username = Optional.ofNullable(username); - return this; - } - - - public MyPlex withUsername(Optional username) { - Utils.checkNotNull(username, "username"); - this.username = username; - return this; - } - - public MyPlex withMappingState(String mappingState) { - Utils.checkNotNull(mappingState, "mappingState"); - this.mappingState = Optional.ofNullable(mappingState); - return this; - } - - - public MyPlex withMappingState(Optional mappingState) { - Utils.checkNotNull(mappingState, "mappingState"); - this.mappingState = mappingState; - return this; - } - - public MyPlex withMappingError(String mappingError) { - Utils.checkNotNull(mappingError, "mappingError"); - this.mappingError = Optional.ofNullable(mappingError); - return this; - } - - - public MyPlex withMappingError(Optional mappingError) { - Utils.checkNotNull(mappingError, "mappingError"); - this.mappingError = mappingError; - return this; - } - - public MyPlex withSignInState(String signInState) { - Utils.checkNotNull(signInState, "signInState"); - this.signInState = Optional.ofNullable(signInState); - return this; - } - - - public MyPlex withSignInState(Optional signInState) { - Utils.checkNotNull(signInState, "signInState"); - this.signInState = signInState; - return this; - } - - public MyPlex withPublicAddress(String publicAddress) { - Utils.checkNotNull(publicAddress, "publicAddress"); - this.publicAddress = Optional.ofNullable(publicAddress); - return this; - } - - - public MyPlex withPublicAddress(Optional publicAddress) { - Utils.checkNotNull(publicAddress, "publicAddress"); - this.publicAddress = publicAddress; - return this; - } - - public MyPlex withPublicPort(double publicPort) { - Utils.checkNotNull(publicPort, "publicPort"); - this.publicPort = Optional.ofNullable(publicPort); - return this; - } - - - public MyPlex withPublicPort(Optional publicPort) { - Utils.checkNotNull(publicPort, "publicPort"); - this.publicPort = publicPort; - return this; - } - - public MyPlex withPrivateAddress(String privateAddress) { - Utils.checkNotNull(privateAddress, "privateAddress"); - this.privateAddress = Optional.ofNullable(privateAddress); - return this; - } - - - public MyPlex withPrivateAddress(Optional privateAddress) { - Utils.checkNotNull(privateAddress, "privateAddress"); - this.privateAddress = privateAddress; - return this; - } - - public MyPlex withPrivatePort(double privatePort) { - Utils.checkNotNull(privatePort, "privatePort"); - this.privatePort = Optional.ofNullable(privatePort); - return this; - } - - - public MyPlex withPrivatePort(Optional privatePort) { - Utils.checkNotNull(privatePort, "privatePort"); - this.privatePort = privatePort; - return this; - } - - public MyPlex withSubscriptionFeatures(String subscriptionFeatures) { - Utils.checkNotNull(subscriptionFeatures, "subscriptionFeatures"); - this.subscriptionFeatures = Optional.ofNullable(subscriptionFeatures); - return this; - } - - - public MyPlex withSubscriptionFeatures(Optional subscriptionFeatures) { - Utils.checkNotNull(subscriptionFeatures, "subscriptionFeatures"); - this.subscriptionFeatures = subscriptionFeatures; - return this; - } - - public MyPlex withSubscriptionActive(boolean subscriptionActive) { - Utils.checkNotNull(subscriptionActive, "subscriptionActive"); - this.subscriptionActive = Optional.ofNullable(subscriptionActive); - return this; - } - - - public MyPlex withSubscriptionActive(Optional subscriptionActive) { - Utils.checkNotNull(subscriptionActive, "subscriptionActive"); - this.subscriptionActive = subscriptionActive; - return this; - } - - public MyPlex withSubscriptionState(String subscriptionState) { - Utils.checkNotNull(subscriptionState, "subscriptionState"); - this.subscriptionState = Optional.ofNullable(subscriptionState); - return this; - } - - - public MyPlex withSubscriptionState(Optional subscriptionState) { - Utils.checkNotNull(subscriptionState, "subscriptionState"); - this.subscriptionState = subscriptionState; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MyPlex other = (MyPlex) o; - return - Utils.enhancedDeepEquals(this.authToken, other.authToken) && - Utils.enhancedDeepEquals(this.username, other.username) && - Utils.enhancedDeepEquals(this.mappingState, other.mappingState) && - Utils.enhancedDeepEquals(this.mappingError, other.mappingError) && - Utils.enhancedDeepEquals(this.signInState, other.signInState) && - Utils.enhancedDeepEquals(this.publicAddress, other.publicAddress) && - Utils.enhancedDeepEquals(this.publicPort, other.publicPort) && - Utils.enhancedDeepEquals(this.privateAddress, other.privateAddress) && - Utils.enhancedDeepEquals(this.privatePort, other.privatePort) && - Utils.enhancedDeepEquals(this.subscriptionFeatures, other.subscriptionFeatures) && - Utils.enhancedDeepEquals(this.subscriptionActive, other.subscriptionActive) && - Utils.enhancedDeepEquals(this.subscriptionState, other.subscriptionState); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - authToken, username, mappingState, - mappingError, signInState, publicAddress, - publicPort, privateAddress, privatePort, - subscriptionFeatures, subscriptionActive, subscriptionState); - } - - @Override - public String toString() { - return Utils.toString(MyPlex.class, - "authToken", authToken, - "username", username, - "mappingState", mappingState, - "mappingError", mappingError, - "signInState", signInState, - "publicAddress", publicAddress, - "publicPort", publicPort, - "privateAddress", privateAddress, - "privatePort", privatePort, - "subscriptionFeatures", subscriptionFeatures, - "subscriptionActive", subscriptionActive, - "subscriptionState", subscriptionState); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional authToken = Optional.empty(); - - private Optional username = Optional.empty(); - - private Optional mappingState = Optional.empty(); - - private Optional mappingError = Optional.empty(); - - private Optional signInState = Optional.empty(); - - private Optional publicAddress = Optional.empty(); - - private Optional publicPort = Optional.empty(); - - private Optional privateAddress = Optional.empty(); - - private Optional privatePort = Optional.empty(); - - private Optional subscriptionFeatures = Optional.empty(); - - private Optional subscriptionActive = Optional.empty(); - - private Optional subscriptionState = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder authToken(String authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = Optional.ofNullable(authToken); - return this; - } - - public Builder authToken(Optional authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = authToken; - return this; - } - - - public Builder username(String username) { - Utils.checkNotNull(username, "username"); - this.username = Optional.ofNullable(username); - return this; - } - - public Builder username(Optional username) { - Utils.checkNotNull(username, "username"); - this.username = username; - return this; - } - - - public Builder mappingState(String mappingState) { - Utils.checkNotNull(mappingState, "mappingState"); - this.mappingState = Optional.ofNullable(mappingState); - return this; - } - - public Builder mappingState(Optional mappingState) { - Utils.checkNotNull(mappingState, "mappingState"); - this.mappingState = mappingState; - return this; - } - - - public Builder mappingError(String mappingError) { - Utils.checkNotNull(mappingError, "mappingError"); - this.mappingError = Optional.ofNullable(mappingError); - return this; - } - - public Builder mappingError(Optional mappingError) { - Utils.checkNotNull(mappingError, "mappingError"); - this.mappingError = mappingError; - return this; - } - - - public Builder signInState(String signInState) { - Utils.checkNotNull(signInState, "signInState"); - this.signInState = Optional.ofNullable(signInState); - return this; - } - - public Builder signInState(Optional signInState) { - Utils.checkNotNull(signInState, "signInState"); - this.signInState = signInState; - return this; - } - - - public Builder publicAddress(String publicAddress) { - Utils.checkNotNull(publicAddress, "publicAddress"); - this.publicAddress = Optional.ofNullable(publicAddress); - return this; - } - - public Builder publicAddress(Optional publicAddress) { - Utils.checkNotNull(publicAddress, "publicAddress"); - this.publicAddress = publicAddress; - return this; - } - - - public Builder publicPort(double publicPort) { - Utils.checkNotNull(publicPort, "publicPort"); - this.publicPort = Optional.ofNullable(publicPort); - return this; - } - - public Builder publicPort(Optional publicPort) { - Utils.checkNotNull(publicPort, "publicPort"); - this.publicPort = publicPort; - return this; - } - - - public Builder privateAddress(String privateAddress) { - Utils.checkNotNull(privateAddress, "privateAddress"); - this.privateAddress = Optional.ofNullable(privateAddress); - return this; - } - - public Builder privateAddress(Optional privateAddress) { - Utils.checkNotNull(privateAddress, "privateAddress"); - this.privateAddress = privateAddress; - return this; - } - - - public Builder privatePort(double privatePort) { - Utils.checkNotNull(privatePort, "privatePort"); - this.privatePort = Optional.ofNullable(privatePort); - return this; - } - - public Builder privatePort(Optional privatePort) { - Utils.checkNotNull(privatePort, "privatePort"); - this.privatePort = privatePort; - return this; - } - - - public Builder subscriptionFeatures(String subscriptionFeatures) { - Utils.checkNotNull(subscriptionFeatures, "subscriptionFeatures"); - this.subscriptionFeatures = Optional.ofNullable(subscriptionFeatures); - return this; - } - - public Builder subscriptionFeatures(Optional subscriptionFeatures) { - Utils.checkNotNull(subscriptionFeatures, "subscriptionFeatures"); - this.subscriptionFeatures = subscriptionFeatures; - return this; - } - - - public Builder subscriptionActive(boolean subscriptionActive) { - Utils.checkNotNull(subscriptionActive, "subscriptionActive"); - this.subscriptionActive = Optional.ofNullable(subscriptionActive); - return this; - } - - public Builder subscriptionActive(Optional subscriptionActive) { - Utils.checkNotNull(subscriptionActive, "subscriptionActive"); - this.subscriptionActive = subscriptionActive; - return this; - } - - - public Builder subscriptionState(String subscriptionState) { - Utils.checkNotNull(subscriptionState, "subscriptionState"); - this.subscriptionState = Optional.ofNullable(subscriptionState); - return this; - } - - public Builder subscriptionState(Optional subscriptionState) { - Utils.checkNotNull(subscriptionState, "subscriptionState"); - this.subscriptionState = subscriptionState; - return this; - } - - public MyPlex build() { - - return new MyPlex( - authToken, username, mappingState, - mappingError, signInState, publicAddress, - publicPort, privateAddress, privatePort, - subscriptionFeatures, subscriptionActive, subscriptionState); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/One.java b/src/main/java/dev/plexapi/sdk/models/operations/One.java deleted file mode 100644 index 46b8e041..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/One.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public enum One { - ZERO(0), - ONE(1); - - @JsonValue - private final int value; - - One(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (One o: One.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/OnlyTransient.java b/src/main/java/dev/plexapi/sdk/models/operations/OnlyTransient.java deleted file mode 100644 index db6318aa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/OnlyTransient.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * OnlyTransient - * - *

Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ -public enum OnlyTransient { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - OnlyTransient(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (OnlyTransient o: OnlyTransient.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Operator.java b/src/main/java/dev/plexapi/sdk/models/operations/Operator.java deleted file mode 100644 index f1bb0e8d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Operator.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class Operator { - - @JsonProperty("key") - private String key; - - - @JsonProperty("title") - private String title; - - @JsonCreator - public Operator( - @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 static Builder builder() { - return new Builder(); - } - - - public Operator withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Operator 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; - } - Operator other = (Operator) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title); - } - - @Override - public String toString() { - return Utils.toString(Operator.class, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Operator build() { - - return new Operator( - key, title); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseRequest.java new file mode 100644 index 00000000..45152959 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseRequest.java @@ -0,0 +1,799 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class OptimizeDatabaseRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * If set, don't wait for completion but return an activity + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=async") + private Optional async; + + @JsonCreator + public OptimizeDatabaseRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional async) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(async, "async"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.async = async; + } + + public OptimizeDatabaseRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * If set, don't wait for completion but return an activity + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional async() { + return (Optional) async; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public OptimizeDatabaseRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public OptimizeDatabaseRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public OptimizeDatabaseRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public OptimizeDatabaseRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public OptimizeDatabaseRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public OptimizeDatabaseRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public OptimizeDatabaseRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public OptimizeDatabaseRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public OptimizeDatabaseRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public OptimizeDatabaseRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public OptimizeDatabaseRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public OptimizeDatabaseRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public OptimizeDatabaseRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public OptimizeDatabaseRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public OptimizeDatabaseRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public OptimizeDatabaseRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public OptimizeDatabaseRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public OptimizeDatabaseRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public OptimizeDatabaseRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public OptimizeDatabaseRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public OptimizeDatabaseRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public OptimizeDatabaseRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * If set, don't wait for completion but return an activity + */ + public OptimizeDatabaseRequest withAsync(BoolInt async) { + Utils.checkNotNull(async, "async"); + this.async = Optional.ofNullable(async); + return this; + } + + + /** + * If set, don't wait for completion but return an activity + */ + public OptimizeDatabaseRequest withAsync(Optional async) { + Utils.checkNotNull(async, "async"); + this.async = async; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OptimizeDatabaseRequest other = (OptimizeDatabaseRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.async, other.async); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, async); + } + + @Override + public String toString() { + return Utils.toString(OptimizeDatabaseRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "async", async); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional async = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * If set, don't wait for completion but return an activity + */ + public Builder async(BoolInt async) { + Utils.checkNotNull(async, "async"); + this.async = Optional.ofNullable(async); + return this; + } + + /** + * If set, don't wait for completion but return an activity + */ + public Builder async(Optional async) { + Utils.checkNotNull(async, "async"); + this.async = async; + return this; + } + + public OptimizeDatabaseRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new OptimizeDatabaseRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, async); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseRequestBuilder.java new file mode 100644 index 00000000..592df8d9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.OptimizeDatabase; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class OptimizeDatabaseRequestBuilder { + + private OptimizeDatabaseRequest request; + private final SDKConfiguration sdkConfiguration; + + public OptimizeDatabaseRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public OptimizeDatabaseRequestBuilder request(OptimizeDatabaseRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public OptimizeDatabaseResponse call() throws Exception { + + RequestOperation operation + = new OptimizeDatabase.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseResponse.java new file mode 100644 index 00000000..c47fbfcd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/OptimizeDatabaseResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class OptimizeDatabaseResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public OptimizeDatabaseResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public OptimizeDatabaseResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public OptimizeDatabaseResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public OptimizeDatabaseResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OptimizeDatabaseResponse other = (OptimizeDatabaseResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(OptimizeDatabaseResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public OptimizeDatabaseResponse build() { + + return new OptimizeDatabaseResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/OptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/OptimizedForStreaming.java deleted file mode 100644 index 5e14a0c1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/OptimizedForStreaming.java +++ /dev/null @@ -1,100 +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.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; - -/** - * OptimizedForStreaming - * - *

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

    - *
  • {@code dev.plexapi.sdk.models.operations.One}
  • - *
  • {@code boolean}
  • - *
- * - *

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

-     * if (obj.value() instanceof String) {
-     *     String answer = (String) obj.value();
-     *     System.out.println("answer=" + answer);
-     * }
-     * 
- * - * @return value of oneOf type - **/ - public java.lang.Object value() { - return value.value(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OptimizedForStreaming other = (OptimizedForStreaming) o; - return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); - } - - @Override - public int hashCode() { - return Utils.enhancedHash(value.value()); - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends OneOfDeserializer { - - public _Deserializer() { - super(OptimizedForStreaming.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); - } - } - - @Override - public String toString() { - return Utils.toString(OptimizedForStreaming.class, - "value", value); - } - -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/OptimizedForStreaming1.java b/src/main/java/dev/plexapi/sdk/models/operations/OptimizedForStreaming1.java deleted file mode 100644 index 00d0fb05..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/OptimizedForStreaming1.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public enum OptimizedForStreaming1 { - ZERO(0), - ONE(1); - - @JsonValue - private final int value; - - OptimizedForStreaming1(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (OptimizedForStreaming1 o: OptimizedForStreaming1.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Owned.java b/src/main/java/dev/plexapi/sdk/models/operations/Owned.java deleted file mode 100644 index 66c4e6cc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Owned.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Owned - * - *

Indicates if the user owns the server. - */ -public enum Owned { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - Owned(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (Owned o: Owned.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Params.java b/src/main/java/dev/plexapi/sdk/models/operations/Params.java new file mode 100644 index 00000000..0a5973af --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Params.java @@ -0,0 +1,64 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * Params + * + *

Subscription parameters. + * - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + * - `source`: Required for downloads to indicate the source of the downloaded content. + */ +public class Params { + @JsonCreator + public Params() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(Params.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public Params build() { + + return new Params( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Part.java b/src/main/java/dev/plexapi/sdk/models/operations/Part.java deleted file mode 100644 index 457ad9bf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Part.java +++ /dev/null @@ -1,918 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; - - -public class Part { - /** - * Indicates if the part is accessible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("accessible") - private Optional accessible; - - /** - * Indicates if the part exists. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("exists") - private Optional exists; - - /** - * Unique part identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Key to access this part. - */ - @JsonProperty("key") - private String key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("indexes") - private Optional indexes; - - /** - * Duration of the part in milliseconds. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - /** - * File path for the part. - */ - @JsonProperty("file") - private String file; - - /** - * File size in bytes. - */ - @JsonProperty("size") - private long size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("packetLength") - private Optional packetLength; - - /** - * Container format of the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - /** - * Video profile for the part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioProfile") - private Optional audioProfile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("has64bitOffsets") - private Optional has64bitOffsets; - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasThumbnail") - private Optional hasThumbnail; - - /** - * An array of streams for this part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Stream") - private Optional> stream; - - @JsonCreator - public Part( - @JsonProperty("accessible") Optional accessible, - @JsonProperty("exists") Optional exists, - @JsonProperty("id") long id, - @JsonProperty("key") String key, - @JsonProperty("indexes") Optional indexes, - @JsonProperty("duration") Optional duration, - @JsonProperty("file") String file, - @JsonProperty("size") long size, - @JsonProperty("packetLength") Optional packetLength, - @JsonProperty("container") Optional container, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("audioProfile") Optional audioProfile, - @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("hasThumbnail") Optional hasThumbnail, - @JsonProperty("Stream") Optional> stream) { - Utils.checkNotNull(accessible, "accessible"); - Utils.checkNotNull(exists, "exists"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(indexes, "indexes"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(file, "file"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(packetLength, "packetLength"); - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(videoProfile, "videoProfile"); - Utils.checkNotNull(audioProfile, "audioProfile"); - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - Utils.checkNotNull(stream, "stream"); - this.accessible = accessible; - this.exists = exists; - this.id = id; - this.key = key; - this.indexes = indexes; - this.duration = duration; - this.file = file; - this.size = size; - this.packetLength = packetLength; - this.container = container; - this.videoProfile = videoProfile; - this.audioProfile = audioProfile; - this.has64bitOffsets = has64bitOffsets; - this.optimizedForStreaming = optimizedForStreaming; - this.hasThumbnail = hasThumbnail; - this.stream = stream; - } - - public Part( - long id, - String key, - String file, - long size) { - this(Optional.empty(), Optional.empty(), id, - key, Optional.empty(), Optional.empty(), - file, size, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Indicates if the part is accessible. - */ - @JsonIgnore - public Optional accessible() { - return accessible; - } - - /** - * Indicates if the part exists. - */ - @JsonIgnore - public Optional exists() { - return exists; - } - - /** - * Unique part identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Key to access this part. - */ - @JsonIgnore - public String key() { - return key; - } - - @JsonIgnore - public Optional indexes() { - return indexes; - } - - /** - * Duration of the part in milliseconds. - */ - @JsonIgnore - public Optional duration() { - return duration; - } - - /** - * File path for the part. - */ - @JsonIgnore - public String file() { - return file; - } - - /** - * File size in bytes. - */ - @JsonIgnore - public long size() { - return size; - } - - @JsonIgnore - public Optional packetLength() { - return packetLength; - } - - /** - * Container format of the part. - */ - @JsonIgnore - public Optional container() { - return container; - } - - /** - * Video profile for the part. - */ - @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - @JsonIgnore - public Optional audioProfile() { - return audioProfile; - } - - @JsonIgnore - public Optional has64bitOffsets() { - return has64bitOffsets; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional optimizedForStreaming() { - return (Optional) optimizedForStreaming; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional hasThumbnail() { - return (Optional) hasThumbnail; - } - - /** - * An array of streams for this part. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> stream() { - return (Optional>) stream; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Indicates if the part is accessible. - */ - public Part withAccessible(boolean accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = Optional.ofNullable(accessible); - return this; - } - - - /** - * Indicates if the part is accessible. - */ - public Part withAccessible(Optional accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = accessible; - return this; - } - - /** - * Indicates if the part exists. - */ - public Part withExists(boolean exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = Optional.ofNullable(exists); - return this; - } - - - /** - * Indicates if the part exists. - */ - public Part withExists(Optional exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = exists; - return this; - } - - /** - * Unique part identifier. - */ - public Part withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Key to access this part. - */ - public Part withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - 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; - } - - /** - * Duration of the part in milliseconds. - */ - public Part withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - /** - * Duration of the part in milliseconds. - */ - public Part withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - /** - * File path for the part. - */ - public Part withFile(String file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - /** - * File size in bytes. - */ - public Part withSize(long size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public Part withPacketLength(int packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = Optional.ofNullable(packetLength); - return this; - } - - - public Part withPacketLength(Optional packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = packetLength; - return this; - } - - /** - * Container format of the part. - */ - public Part withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - /** - * Container format of the part. - */ - public Part withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - /** - * Video profile for the part. - */ - public Part withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - - /** - * Video profile for the part. - */ - public Part withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Part withAudioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Part withAudioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - return this; - } - - public Part withHas64bitOffsets(boolean has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); - return this; - } - - - public Part withHas64bitOffsets(Optional has64bitOffsets) { - Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - this.has64bitOffsets = has64bitOffsets; - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Part withOptimizedForStreaming(GetRecentlyAddedOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Part withOptimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - 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; - } - - /** - * An array of streams for this part. - */ - public Part withStream(List stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = Optional.ofNullable(stream); - return this; - } - - - /** - * An array of streams for this part. - */ - public Part withStream(Optional> stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = stream; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Part other = (Part) o; - return - Utils.enhancedDeepEquals(this.accessible, other.accessible) && - Utils.enhancedDeepEquals(this.exists, other.exists) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.indexes, other.indexes) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.file, other.file) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.packetLength, other.packetLength) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && - Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && - Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Utils.enhancedDeepEquals(this.hasThumbnail, other.hasThumbnail) && - Utils.enhancedDeepEquals(this.stream, other.stream); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - accessible, exists, id, - key, indexes, duration, - file, size, packetLength, - container, videoProfile, audioProfile, - has64bitOffsets, optimizedForStreaming, hasThumbnail, - stream); - } - - @Override - public String toString() { - return Utils.toString(Part.class, - "accessible", accessible, - "exists", exists, - "id", id, - "key", key, - "indexes", indexes, - "duration", duration, - "file", file, - "size", size, - "packetLength", packetLength, - "container", container, - "videoProfile", videoProfile, - "audioProfile", audioProfile, - "has64bitOffsets", has64bitOffsets, - "optimizedForStreaming", optimizedForStreaming, - "hasThumbnail", hasThumbnail, - "stream", stream); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional accessible = Optional.empty(); - - private Optional exists = Optional.empty(); - - private Long id; - - private String key; - - private Optional indexes = Optional.empty(); - - private Optional duration = Optional.empty(); - - private String file; - - private Long size; - - private Optional packetLength = Optional.empty(); - - private Optional container = Optional.empty(); - - private Optional videoProfile = Optional.empty(); - - private Optional audioProfile = Optional.empty(); - - private Optional has64bitOffsets = Optional.empty(); - - private Optional optimizedForStreaming = Optional.empty(); - - private Optional hasThumbnail; - - private Optional> stream = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Indicates if the part is accessible. - */ - public Builder accessible(boolean accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = Optional.ofNullable(accessible); - return this; - } - - /** - * Indicates if the part is accessible. - */ - public Builder accessible(Optional accessible) { - Utils.checkNotNull(accessible, "accessible"); - this.accessible = accessible; - return this; - } - - - /** - * Indicates if the part exists. - */ - public Builder exists(boolean exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = Optional.ofNullable(exists); - return this; - } - - /** - * Indicates if the part exists. - */ - public Builder exists(Optional exists) { - Utils.checkNotNull(exists, "exists"); - this.exists = exists; - return this; - } - - - /** - * Unique part identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Key to access this part. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - public Builder indexes(String indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = Optional.ofNullable(indexes); - return this; - } - - public Builder indexes(Optional indexes) { - Utils.checkNotNull(indexes, "indexes"); - this.indexes = indexes; - return this; - } - - - /** - * Duration of the part in milliseconds. - */ - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - /** - * Duration of the part in milliseconds. - */ - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - /** - * File path for the part. - */ - public Builder file(String file) { - Utils.checkNotNull(file, "file"); - this.file = file; - return this; - } - - - /** - * File size in bytes. - */ - public Builder size(long size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - - public Builder packetLength(int packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = Optional.ofNullable(packetLength); - return this; - } - - public Builder packetLength(Optional packetLength) { - Utils.checkNotNull(packetLength, "packetLength"); - this.packetLength = packetLength; - return this; - } - - - /** - * Container format of the part. - */ - public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - /** - * Container format of the part. - */ - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - - /** - * Video profile for the part. - */ - public Builder videoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - /** - * Video profile for the part. - */ - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(String audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = Optional.ofNullable(audioProfile); - return this; - } - - /** - * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). - */ - public Builder audioProfile(Optional audioProfile) { - Utils.checkNotNull(audioProfile, "audioProfile"); - this.audioProfile = audioProfile; - 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; - } - - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(GetRecentlyAddedOptimizedForStreaming optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); - return this; - } - - /** - * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - */ - public Builder optimizedForStreaming(Optional optimizedForStreaming) { - Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); - this.optimizedForStreaming = optimizedForStreaming; - return this; - } - - - 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; - } - - - /** - * An array of streams for this part. - */ - public Builder stream(List stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = Optional.ofNullable(stream); - return this; - } - - /** - * An array of streams for this part. - */ - public Builder stream(Optional> stream) { - Utils.checkNotNull(stream, "stream"); - this.stream = stream; - return this; - } - - public Part build() { - if (hasThumbnail == null) { - hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value(); - } - - return new Part( - accessible, exists, id, - key, indexes, duration, - file, size, packetLength, - container, videoProfile, audioProfile, - has64bitOffsets, optimizedForStreaming, 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/PastSubscription.java b/src/main/java/dev/plexapi/sdk/models/operations/PastSubscription.java deleted file mode 100644 index 651b41ff..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PastSubscription.java +++ /dev/null @@ -1,753 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PastSubscription { - - @JsonInclude(Include.ALWAYS) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("mode") - private Optional mode; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("renewsAt") - private Optional renewsAt; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("endsAt") - private Optional endsAt; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canceled") - private Optional canceled; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("gracePeriod") - private Optional gracePeriod; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("onHold") - private Optional onHold; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canReactivate") - private Optional canReactivate; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canUpgrade") - private Optional canUpgrade; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canDowngrade") - private Optional canDowngrade; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canConvert") - private Optional canConvert; - - - @JsonProperty("type") - private String type; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("transfer") - private Optional transfer; - - - @JsonProperty("state") - private PostUsersSignInDataState state; - - - @JsonProperty("billing") - private Billing billing; - - @JsonCreator - public PastSubscription( - @JsonProperty("id") Optional id, - @JsonProperty("mode") Optional mode, - @JsonProperty("renewsAt") Optional renewsAt, - @JsonProperty("endsAt") Optional endsAt, - @JsonProperty("canceled") Optional canceled, - @JsonProperty("gracePeriod") Optional gracePeriod, - @JsonProperty("onHold") Optional onHold, - @JsonProperty("canReactivate") Optional canReactivate, - @JsonProperty("canUpgrade") Optional canUpgrade, - @JsonProperty("canDowngrade") Optional canDowngrade, - @JsonProperty("canConvert") Optional canConvert, - @JsonProperty("type") String type, - @JsonProperty("transfer") Optional transfer, - @JsonProperty("state") PostUsersSignInDataState state, - @JsonProperty("billing") Billing billing) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(mode, "mode"); - Utils.checkNotNull(renewsAt, "renewsAt"); - Utils.checkNotNull(endsAt, "endsAt"); - Utils.checkNotNull(canceled, "canceled"); - Utils.checkNotNull(gracePeriod, "gracePeriod"); - Utils.checkNotNull(onHold, "onHold"); - Utils.checkNotNull(canReactivate, "canReactivate"); - Utils.checkNotNull(canUpgrade, "canUpgrade"); - Utils.checkNotNull(canDowngrade, "canDowngrade"); - Utils.checkNotNull(canConvert, "canConvert"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(transfer, "transfer"); - Utils.checkNotNull(state, "state"); - Utils.checkNotNull(billing, "billing"); - this.id = id; - this.mode = mode; - this.renewsAt = renewsAt; - this.endsAt = endsAt; - this.canceled = canceled; - this.gracePeriod = gracePeriod; - this.onHold = onHold; - this.canReactivate = canReactivate; - this.canUpgrade = canUpgrade; - this.canDowngrade = canDowngrade; - this.canConvert = canConvert; - this.type = type; - this.transfer = transfer; - this.state = state; - this.billing = billing; - } - - public PastSubscription( - String type, - PostUsersSignInDataState state, - Billing billing) { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), type, - Optional.empty(), state, billing); - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional mode() { - return mode; - } - - @JsonIgnore - public Optional renewsAt() { - return renewsAt; - } - - @JsonIgnore - public Optional endsAt() { - return endsAt; - } - - @JsonIgnore - public Optional canceled() { - return canceled; - } - - @JsonIgnore - public Optional gracePeriod() { - return gracePeriod; - } - - @JsonIgnore - public Optional onHold() { - return onHold; - } - - @JsonIgnore - public Optional canReactivate() { - return canReactivate; - } - - @JsonIgnore - public Optional canUpgrade() { - return canUpgrade; - } - - @JsonIgnore - public Optional canDowngrade() { - return canDowngrade; - } - - @JsonIgnore - public Optional canConvert() { - return canConvert; - } - - @JsonIgnore - public String type() { - return type; - } - - @JsonIgnore - public Optional transfer() { - return transfer; - } - - @JsonIgnore - public PostUsersSignInDataState state() { - return state; - } - - @JsonIgnore - public Billing billing() { - return billing; - } - - public static Builder builder() { - return new Builder(); - } - - - public PastSubscription withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public PastSubscription withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public PastSubscription withMode(String mode) { - Utils.checkNotNull(mode, "mode"); - this.mode = Optional.ofNullable(mode); - return this; - } - - - public PastSubscription withMode(Optional mode) { - Utils.checkNotNull(mode, "mode"); - this.mode = mode; - return this; - } - - public PastSubscription withRenewsAt(long renewsAt) { - Utils.checkNotNull(renewsAt, "renewsAt"); - this.renewsAt = Optional.ofNullable(renewsAt); - return this; - } - - - public PastSubscription withRenewsAt(Optional renewsAt) { - Utils.checkNotNull(renewsAt, "renewsAt"); - this.renewsAt = renewsAt; - return this; - } - - public PastSubscription withEndsAt(long endsAt) { - Utils.checkNotNull(endsAt, "endsAt"); - this.endsAt = Optional.ofNullable(endsAt); - return this; - } - - - public PastSubscription withEndsAt(Optional endsAt) { - Utils.checkNotNull(endsAt, "endsAt"); - this.endsAt = endsAt; - return this; - } - - public PastSubscription withCanceled(boolean canceled) { - Utils.checkNotNull(canceled, "canceled"); - this.canceled = Optional.ofNullable(canceled); - return this; - } - - - public PastSubscription withCanceled(Optional canceled) { - Utils.checkNotNull(canceled, "canceled"); - this.canceled = canceled; - return this; - } - - public PastSubscription withGracePeriod(boolean gracePeriod) { - Utils.checkNotNull(gracePeriod, "gracePeriod"); - this.gracePeriod = Optional.ofNullable(gracePeriod); - return this; - } - - - public PastSubscription withGracePeriod(Optional gracePeriod) { - Utils.checkNotNull(gracePeriod, "gracePeriod"); - this.gracePeriod = gracePeriod; - return this; - } - - public PastSubscription withOnHold(boolean onHold) { - Utils.checkNotNull(onHold, "onHold"); - this.onHold = Optional.ofNullable(onHold); - return this; - } - - - public PastSubscription withOnHold(Optional onHold) { - Utils.checkNotNull(onHold, "onHold"); - this.onHold = onHold; - return this; - } - - public PastSubscription withCanReactivate(boolean canReactivate) { - Utils.checkNotNull(canReactivate, "canReactivate"); - this.canReactivate = Optional.ofNullable(canReactivate); - return this; - } - - - public PastSubscription withCanReactivate(Optional canReactivate) { - Utils.checkNotNull(canReactivate, "canReactivate"); - this.canReactivate = canReactivate; - return this; - } - - public PastSubscription withCanUpgrade(boolean canUpgrade) { - Utils.checkNotNull(canUpgrade, "canUpgrade"); - this.canUpgrade = Optional.ofNullable(canUpgrade); - return this; - } - - - public PastSubscription withCanUpgrade(Optional canUpgrade) { - Utils.checkNotNull(canUpgrade, "canUpgrade"); - this.canUpgrade = canUpgrade; - return this; - } - - public PastSubscription withCanDowngrade(boolean canDowngrade) { - Utils.checkNotNull(canDowngrade, "canDowngrade"); - this.canDowngrade = Optional.ofNullable(canDowngrade); - return this; - } - - - public PastSubscription withCanDowngrade(Optional canDowngrade) { - Utils.checkNotNull(canDowngrade, "canDowngrade"); - this.canDowngrade = canDowngrade; - return this; - } - - public PastSubscription withCanConvert(boolean canConvert) { - Utils.checkNotNull(canConvert, "canConvert"); - this.canConvert = Optional.ofNullable(canConvert); - return this; - } - - - public PastSubscription withCanConvert(Optional canConvert) { - Utils.checkNotNull(canConvert, "canConvert"); - this.canConvert = canConvert; - return this; - } - - public PastSubscription withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public PastSubscription withTransfer(String transfer) { - Utils.checkNotNull(transfer, "transfer"); - this.transfer = Optional.ofNullable(transfer); - return this; - } - - - public PastSubscription withTransfer(Optional transfer) { - Utils.checkNotNull(transfer, "transfer"); - this.transfer = transfer; - return this; - } - - public PastSubscription withState(PostUsersSignInDataState state) { - Utils.checkNotNull(state, "state"); - this.state = state; - return this; - } - - public PastSubscription withBilling(Billing billing) { - Utils.checkNotNull(billing, "billing"); - this.billing = billing; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PastSubscription other = (PastSubscription) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.mode, other.mode) && - Utils.enhancedDeepEquals(this.renewsAt, other.renewsAt) && - Utils.enhancedDeepEquals(this.endsAt, other.endsAt) && - Utils.enhancedDeepEquals(this.canceled, other.canceled) && - Utils.enhancedDeepEquals(this.gracePeriod, other.gracePeriod) && - Utils.enhancedDeepEquals(this.onHold, other.onHold) && - Utils.enhancedDeepEquals(this.canReactivate, other.canReactivate) && - Utils.enhancedDeepEquals(this.canUpgrade, other.canUpgrade) && - Utils.enhancedDeepEquals(this.canDowngrade, other.canDowngrade) && - Utils.enhancedDeepEquals(this.canConvert, other.canConvert) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.transfer, other.transfer) && - Utils.enhancedDeepEquals(this.state, other.state) && - Utils.enhancedDeepEquals(this.billing, other.billing); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, mode, renewsAt, - endsAt, canceled, gracePeriod, - onHold, canReactivate, canUpgrade, - canDowngrade, canConvert, type, - transfer, state, billing); - } - - @Override - public String toString() { - return Utils.toString(PastSubscription.class, - "id", id, - "mode", mode, - "renewsAt", renewsAt, - "endsAt", endsAt, - "canceled", canceled, - "gracePeriod", gracePeriod, - "onHold", onHold, - "canReactivate", canReactivate, - "canUpgrade", canUpgrade, - "canDowngrade", canDowngrade, - "canConvert", canConvert, - "type", type, - "transfer", transfer, - "state", state, - "billing", billing); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional mode = Optional.empty(); - - private Optional renewsAt = Optional.empty(); - - private Optional endsAt = Optional.empty(); - - private Optional canceled; - - private Optional gracePeriod; - - private Optional onHold; - - private Optional canReactivate; - - private Optional canUpgrade; - - private Optional canDowngrade; - - private Optional canConvert; - - private String type; - - private Optional transfer = Optional.empty(); - - private PostUsersSignInDataState state; - - private Billing billing; - - private Builder() { - // force use of static builder() method - } - - - public Builder id(String 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 mode(String mode) { - Utils.checkNotNull(mode, "mode"); - this.mode = Optional.ofNullable(mode); - return this; - } - - public Builder mode(Optional mode) { - Utils.checkNotNull(mode, "mode"); - this.mode = mode; - return this; - } - - - public Builder renewsAt(long renewsAt) { - Utils.checkNotNull(renewsAt, "renewsAt"); - this.renewsAt = Optional.ofNullable(renewsAt); - return this; - } - - public Builder renewsAt(Optional renewsAt) { - Utils.checkNotNull(renewsAt, "renewsAt"); - this.renewsAt = renewsAt; - return this; - } - - - public Builder endsAt(long endsAt) { - Utils.checkNotNull(endsAt, "endsAt"); - this.endsAt = Optional.ofNullable(endsAt); - return this; - } - - public Builder endsAt(Optional endsAt) { - Utils.checkNotNull(endsAt, "endsAt"); - this.endsAt = endsAt; - return this; - } - - - public Builder canceled(boolean canceled) { - Utils.checkNotNull(canceled, "canceled"); - this.canceled = Optional.ofNullable(canceled); - return this; - } - - public Builder canceled(Optional canceled) { - Utils.checkNotNull(canceled, "canceled"); - this.canceled = canceled; - return this; - } - - - public Builder gracePeriod(boolean gracePeriod) { - Utils.checkNotNull(gracePeriod, "gracePeriod"); - this.gracePeriod = Optional.ofNullable(gracePeriod); - return this; - } - - public Builder gracePeriod(Optional gracePeriod) { - Utils.checkNotNull(gracePeriod, "gracePeriod"); - this.gracePeriod = gracePeriod; - return this; - } - - - public Builder onHold(boolean onHold) { - Utils.checkNotNull(onHold, "onHold"); - this.onHold = Optional.ofNullable(onHold); - return this; - } - - public Builder onHold(Optional onHold) { - Utils.checkNotNull(onHold, "onHold"); - this.onHold = onHold; - return this; - } - - - public Builder canReactivate(boolean canReactivate) { - Utils.checkNotNull(canReactivate, "canReactivate"); - this.canReactivate = Optional.ofNullable(canReactivate); - return this; - } - - public Builder canReactivate(Optional canReactivate) { - Utils.checkNotNull(canReactivate, "canReactivate"); - this.canReactivate = canReactivate; - return this; - } - - - public Builder canUpgrade(boolean canUpgrade) { - Utils.checkNotNull(canUpgrade, "canUpgrade"); - this.canUpgrade = Optional.ofNullable(canUpgrade); - return this; - } - - public Builder canUpgrade(Optional canUpgrade) { - Utils.checkNotNull(canUpgrade, "canUpgrade"); - this.canUpgrade = canUpgrade; - return this; - } - - - public Builder canDowngrade(boolean canDowngrade) { - Utils.checkNotNull(canDowngrade, "canDowngrade"); - this.canDowngrade = Optional.ofNullable(canDowngrade); - return this; - } - - public Builder canDowngrade(Optional canDowngrade) { - Utils.checkNotNull(canDowngrade, "canDowngrade"); - this.canDowngrade = canDowngrade; - return this; - } - - - public Builder canConvert(boolean canConvert) { - Utils.checkNotNull(canConvert, "canConvert"); - this.canConvert = Optional.ofNullable(canConvert); - return this; - } - - public Builder canConvert(Optional canConvert) { - Utils.checkNotNull(canConvert, "canConvert"); - this.canConvert = canConvert; - return this; - } - - - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - public Builder transfer(String transfer) { - Utils.checkNotNull(transfer, "transfer"); - this.transfer = Optional.ofNullable(transfer); - return this; - } - - public Builder transfer(Optional transfer) { - Utils.checkNotNull(transfer, "transfer"); - this.transfer = transfer; - return this; - } - - - public Builder state(PostUsersSignInDataState state) { - Utils.checkNotNull(state, "state"); - this.state = state; - return this; - } - - - public Builder billing(Billing billing) { - Utils.checkNotNull(billing, "billing"); - this.billing = billing; - return this; - } - - public PastSubscription build() { - if (canceled == null) { - canceled = _SINGLETON_VALUE_Canceled.value(); - } - if (gracePeriod == null) { - gracePeriod = _SINGLETON_VALUE_GracePeriod.value(); - } - if (onHold == null) { - onHold = _SINGLETON_VALUE_OnHold.value(); - } - if (canReactivate == null) { - canReactivate = _SINGLETON_VALUE_CanReactivate.value(); - } - if (canUpgrade == null) { - canUpgrade = _SINGLETON_VALUE_CanUpgrade.value(); - } - if (canDowngrade == null) { - canDowngrade = _SINGLETON_VALUE_CanDowngrade.value(); - } - if (canConvert == null) { - canConvert = _SINGLETON_VALUE_CanConvert.value(); - } - - return new PastSubscription( - id, mode, renewsAt, - endsAt, canceled, gracePeriod, - onHold, canReactivate, canUpgrade, - canDowngrade, canConvert, type, - transfer, state, billing); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_Canceled = - new LazySingletonValue<>( - "canceled", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_GracePeriod = - new LazySingletonValue<>( - "gracePeriod", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_OnHold = - new LazySingletonValue<>( - "onHold", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_CanReactivate = - new LazySingletonValue<>( - "canReactivate", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_CanUpgrade = - new LazySingletonValue<>( - "canUpgrade", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_CanDowngrade = - new LazySingletonValue<>( - "canDowngrade", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_CanConvert = - new LazySingletonValue<>( - "canConvert", - "false", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PathParamElement.java b/src/main/java/dev/plexapi/sdk/models/operations/PathParamElement.java new file mode 100644 index 00000000..d300cb40 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PathParamElement.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * PathParamElement + */ +public enum PathParamElement { + THUMB("thumb"), + ART("art"), + CLEAR_LOGO("clearLogo"), + BANNER("banner"), + POSTER("poster"), + THEME("theme"); + + @JsonValue + private final String value; + + PathParamElement(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (PathParamElement o: PathParamElement.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PathParamIndex.java b/src/main/java/dev/plexapi/sdk/models/operations/PathParamIndex.java new file mode 100644 index 00000000..289886b8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PathParamIndex.java @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * PathParamIndex + * + *

The type of index to grab. + */ +public enum PathParamIndex { + SD("sd"); + + @JsonValue + private final String value; + + PathParamIndex(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (PathParamIndex o: PathParamIndex.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PathParamTask.java b/src/main/java/dev/plexapi/sdk/models/operations/PathParamTask.java new file mode 100644 index 00000000..41d0ac47 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PathParamTask.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * PathParamTask + * + *

The task name + */ +public enum PathParamTask { + AUTOMATIC_UPDATES("AutomaticUpdates"), + BACKUP_DATABASE("BackupDatabase"), + BUTLER_TASK_GENERATE_AD_MARKERS("ButlerTaskGenerateAdMarkers"), + BUTLER_TASK_GENERATE_CREDITS_MARKERS("ButlerTaskGenerateCreditsMarkers"), + BUTLER_TASK_GENERATE_INTRO_MARKERS("ButlerTaskGenerateIntroMarkers"), + BUTLER_TASK_GENERATE_VOICE_ACTIVITY("ButlerTaskGenerateVoiceActivity"), + CLEAN_OLD_BUNDLES("CleanOldBundles"), + CLEAN_OLD_CACHE_FILES("CleanOldCacheFiles"), + DEEP_MEDIA_ANALYSIS("DeepMediaAnalysis"), + GARBAGE_COLLECT_BLOBS("GarbageCollectBlobs"), + GARBAGE_COLLECT_LIBRARY_MEDIA("GarbageCollectLibraryMedia"), + GENERATE_BLUR_HASHES("GenerateBlurHashes"), + GENERATE_CHAPTER_THUMBS("GenerateChapterThumbs"), + GENERATE_MEDIA_INDEX_FILES("GenerateMediaIndexFiles"), + LOUDNESS_ANALYSIS("LoudnessAnalysis"), + MUSIC_ANALYSIS("MusicAnalysis"), + OPTIMIZE_DATABASE("OptimizeDatabase"), + REFRESH_EPG_GUIDES("RefreshEpgGuides"), + REFRESH_LIBRARIES("RefreshLibraries"), + REFRESH_LOCAL_MEDIA("RefreshLocalMedia"), + REFRESH_PERIODIC_METADATA("RefreshPeriodicMetadata"), + UPGRADE_MEDIA_ANALYSIS("UpgradeMediaAnalysis"); + + @JsonValue + private final String value; + + PathParamTask(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (PathParamTask o: PathParamTask.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PathParamTaskName.java b/src/main/java/dev/plexapi/sdk/models/operations/PathParamTaskName.java deleted file mode 100644 index 414b0840..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PathParamTaskName.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

The name of the task to be started. - */ -@JsonDeserialize(using = PathParamTaskName._Deserializer.class) -@JsonSerialize(using = PathParamTaskName._Serializer.class) -public class PathParamTaskName { - - public static final PathParamTaskName BACKUP_DATABASE = new PathParamTaskName("BackupDatabase"); - public static final PathParamTaskName BUILD_GRACENOTE_COLLECTIONS = new PathParamTaskName("BuildGracenoteCollections"); - public static final PathParamTaskName CHECK_FOR_UPDATES = new PathParamTaskName("CheckForUpdates"); - public static final PathParamTaskName CLEAN_OLD_BUNDLES = new PathParamTaskName("CleanOldBundles"); - public static final PathParamTaskName CLEAN_OLD_CACHE_FILES = new PathParamTaskName("CleanOldCacheFiles"); - public static final PathParamTaskName DEEP_MEDIA_ANALYSIS = new PathParamTaskName("DeepMediaAnalysis"); - public static final PathParamTaskName GENERATE_AUTO_TAGS = new PathParamTaskName("GenerateAutoTags"); - public static final PathParamTaskName GENERATE_CHAPTER_THUMBS = new PathParamTaskName("GenerateChapterThumbs"); - public static final PathParamTaskName GENERATE_MEDIA_INDEX_FILES = new PathParamTaskName("GenerateMediaIndexFiles"); - public static final PathParamTaskName OPTIMIZE_DATABASE = new PathParamTaskName("OptimizeDatabase"); - public static final PathParamTaskName REFRESH_LIBRARIES = new PathParamTaskName("RefreshLibraries"); - public static final PathParamTaskName REFRESH_LOCAL_MEDIA = new PathParamTaskName("RefreshLocalMedia"); - public static final PathParamTaskName REFRESH_PERIODIC_METADATA = new PathParamTaskName("RefreshPeriodicMetadata"); - public static final PathParamTaskName UPGRADE_MEDIA_ANALYSIS = new PathParamTaskName("UpgradeMediaAnalysis"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private PathParamTaskName(String value) { - this.value = value; - } - - /** - * Returns a PathParamTaskName with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as PathParamTaskName - */ - public static PathParamTaskName of(String value) { - synchronized (PathParamTaskName.class) { - return values.computeIfAbsent(value, v -> new PathParamTaskName(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - PathParamTaskName other = (PathParamTaskName) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "PathParamTaskName [value=" + value + "]"; - } - - // return an array just like an enum - public static PathParamTaskName[] values() { - synchronized (PathParamTaskName.class) { - return values.values().toArray(new PathParamTaskName[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("BackupDatabase", BACKUP_DATABASE); - map.put("BuildGracenoteCollections", BUILD_GRACENOTE_COLLECTIONS); - map.put("CheckForUpdates", CHECK_FOR_UPDATES); - map.put("CleanOldBundles", CLEAN_OLD_BUNDLES); - map.put("CleanOldCacheFiles", CLEAN_OLD_CACHE_FILES); - map.put("DeepMediaAnalysis", DEEP_MEDIA_ANALYSIS); - map.put("GenerateAutoTags", GENERATE_AUTO_TAGS); - map.put("GenerateChapterThumbs", GENERATE_CHAPTER_THUMBS); - map.put("GenerateMediaIndexFiles", GENERATE_MEDIA_INDEX_FILES); - map.put("OptimizeDatabase", OPTIMIZE_DATABASE); - map.put("RefreshLibraries", REFRESH_LIBRARIES); - map.put("RefreshLocalMedia", REFRESH_LOCAL_MEDIA); - map.put("RefreshPeriodicMetadata", REFRESH_PERIODIC_METADATA); - map.put("UpgradeMediaAnalysis", UPGRADE_MEDIA_ANALYSIS); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("BackupDatabase", PathParamTaskNameEnum.BACKUP_DATABASE); - map.put("BuildGracenoteCollections", PathParamTaskNameEnum.BUILD_GRACENOTE_COLLECTIONS); - map.put("CheckForUpdates", PathParamTaskNameEnum.CHECK_FOR_UPDATES); - map.put("CleanOldBundles", PathParamTaskNameEnum.CLEAN_OLD_BUNDLES); - map.put("CleanOldCacheFiles", PathParamTaskNameEnum.CLEAN_OLD_CACHE_FILES); - map.put("DeepMediaAnalysis", PathParamTaskNameEnum.DEEP_MEDIA_ANALYSIS); - map.put("GenerateAutoTags", PathParamTaskNameEnum.GENERATE_AUTO_TAGS); - map.put("GenerateChapterThumbs", PathParamTaskNameEnum.GENERATE_CHAPTER_THUMBS); - map.put("GenerateMediaIndexFiles", PathParamTaskNameEnum.GENERATE_MEDIA_INDEX_FILES); - map.put("OptimizeDatabase", PathParamTaskNameEnum.OPTIMIZE_DATABASE); - map.put("RefreshLibraries", PathParamTaskNameEnum.REFRESH_LIBRARIES); - map.put("RefreshLocalMedia", PathParamTaskNameEnum.REFRESH_LOCAL_MEDIA); - map.put("RefreshPeriodicMetadata", PathParamTaskNameEnum.REFRESH_PERIODIC_METADATA); - map.put("UpgradeMediaAnalysis", PathParamTaskNameEnum.UPGRADE_MEDIA_ANALYSIS); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(PathParamTaskName.class); - } - - @Override - public void serialize(PathParamTaskName value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(PathParamTaskName.class); - } - - @Override - public PathParamTaskName deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return PathParamTaskName.of(v); - } - } - - public enum PathParamTaskNameEnum { - - BACKUP_DATABASE("BackupDatabase"), - BUILD_GRACENOTE_COLLECTIONS("BuildGracenoteCollections"), - CHECK_FOR_UPDATES("CheckForUpdates"), - CLEAN_OLD_BUNDLES("CleanOldBundles"), - CLEAN_OLD_CACHE_FILES("CleanOldCacheFiles"), - DEEP_MEDIA_ANALYSIS("DeepMediaAnalysis"), - GENERATE_AUTO_TAGS("GenerateAutoTags"), - GENERATE_CHAPTER_THUMBS("GenerateChapterThumbs"), - GENERATE_MEDIA_INDEX_FILES("GenerateMediaIndexFiles"), - OPTIMIZE_DATABASE("OptimizeDatabase"), - REFRESH_LIBRARIES("RefreshLibraries"), - REFRESH_LOCAL_MEDIA("RefreshLocalMedia"), - REFRESH_PERIODIC_METADATA("RefreshPeriodicMetadata"), - UPGRADE_MEDIA_ANALYSIS("UpgradeMediaAnalysis"),; - - private final String value; - - private PathParamTaskNameEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Pending.java b/src/main/java/dev/plexapi/sdk/models/operations/Pending.java deleted file mode 100644 index 3f06258d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Pending.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Pending - * - *

Indicates if the server is pending approval. - */ -public enum Pending { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - Pending(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (Pending o: Pending.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PerformSearchRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/PerformSearchRequest.java deleted file mode 100644 index f837f298..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PerformSearchRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PerformSearchRequest { - /** - * The query term - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") - private String query; - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionId") - private Optional sectionId; - - /** - * The number of items to return per hub - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") - private Optional limit; - - @JsonCreator - public PerformSearchRequest( - String query, - Optional sectionId, - Optional limit) { - Utils.checkNotNull(query, "query"); - Utils.checkNotNull(sectionId, "sectionId"); - Utils.checkNotNull(limit, "limit"); - this.query = query; - this.sectionId = sectionId; - this.limit = limit; - } - - public PerformSearchRequest( - String query) { - this(query, Optional.empty(), Optional.empty()); - } - - /** - * The query term - */ - @JsonIgnore - public String query() { - return query; - } - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - @JsonIgnore - public Optional sectionId() { - return sectionId; - } - - /** - * The number of items to return per hub - */ - @JsonIgnore - public Optional limit() { - return limit; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The query term - */ - public PerformSearchRequest withQuery(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - public PerformSearchRequest withSectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = Optional.ofNullable(sectionId); - return this; - } - - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - public PerformSearchRequest withSectionId(Optional sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - /** - * The number of items to return per hub - */ - public PerformSearchRequest withLimit(double limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.ofNullable(limit); - return this; - } - - - /** - * The number of items to return per hub - */ - public PerformSearchRequest withLimit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformSearchRequest other = (PerformSearchRequest) o; - return - Utils.enhancedDeepEquals(this.query, other.query) && - Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && - Utils.enhancedDeepEquals(this.limit, other.limit); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - query, sectionId, limit); - } - - @Override - public String toString() { - return Utils.toString(PerformSearchRequest.class, - "query", query, - "sectionId", sectionId, - "limit", limit); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String query; - - private Optional sectionId = Optional.empty(); - - private Optional limit; - - private Builder() { - // force use of static builder() method - } - - - /** - * The query term - */ - public Builder query(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - public Builder sectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = Optional.ofNullable(sectionId); - return this; - } - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - public Builder sectionId(Optional sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - - /** - * The number of items to return per hub - */ - public Builder limit(double limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.ofNullable(limit); - return this; - } - - /** - * The number of items to return per hub - */ - public Builder limit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - public PerformSearchRequest build() { - if (limit == null) { - limit = _SINGLETON_VALUE_Limit.value(); - } - - return new PerformSearchRequest( - query, sectionId, limit); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_Limit = - new LazySingletonValue<>( - "limit", - "3", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PerformSearchRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/PerformSearchRequestBuilder.java deleted file mode 100644 index c4d3677b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PerformSearchRequestBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.PerformSearch; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class PerformSearchRequestBuilder { - - private String query; - private Optional sectionId = Optional.empty(); - private Optional limit = Utils.readDefaultOrConstValue( - "limit", - "3", - new TypeReference>() {}); - private final SDKConfiguration sdkConfiguration; - - public PerformSearchRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public PerformSearchRequestBuilder query(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - public PerformSearchRequestBuilder sectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = Optional.of(sectionId); - return this; - } - - public PerformSearchRequestBuilder sectionId(Optional sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - public PerformSearchRequestBuilder limit(double limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.of(limit); - return this; - } - - public PerformSearchRequestBuilder limit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - - private PerformSearchRequest buildRequest() { - if (limit == null) { - limit = _SINGLETON_VALUE_Limit.value(); - } - - PerformSearchRequest request = new PerformSearchRequest(query, - sectionId, - limit); - - return request; - } - - public PerformSearchResponse call() throws Exception { - - RequestOperation operation - = new PerformSearch.Sync(sdkConfiguration); - PerformSearchRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } - - private static final LazySingletonValue> _SINGLETON_VALUE_Limit = - new LazySingletonValue<>( - "limit", - "3", - new TypeReference>() {}); -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PerformSearchResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/PerformSearchResponse.java deleted file mode 100644 index eec030bd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PerformSearchResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class PerformSearchResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public PerformSearchResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public PerformSearchResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public PerformSearchResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformSearchResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformSearchResponse other = (PerformSearchResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformSearchResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformSearchResponse build() { - - return new PerformSearchResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchRequest.java deleted file mode 100644 index 25c29e69..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PerformVoiceSearchRequest { - /** - * The query term - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") - private String query; - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionId") - private Optional sectionId; - - /** - * The number of items to return per hub - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") - private Optional limit; - - @JsonCreator - public PerformVoiceSearchRequest( - String query, - Optional sectionId, - Optional limit) { - Utils.checkNotNull(query, "query"); - Utils.checkNotNull(sectionId, "sectionId"); - Utils.checkNotNull(limit, "limit"); - this.query = query; - this.sectionId = sectionId; - this.limit = limit; - } - - public PerformVoiceSearchRequest( - String query) { - this(query, Optional.empty(), Optional.empty()); - } - - /** - * The query term - */ - @JsonIgnore - public String query() { - return query; - } - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - @JsonIgnore - public Optional sectionId() { - return sectionId; - } - - /** - * The number of items to return per hub - */ - @JsonIgnore - public Optional limit() { - return limit; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The query term - */ - public PerformVoiceSearchRequest withQuery(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - public PerformVoiceSearchRequest withSectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = Optional.ofNullable(sectionId); - return this; - } - - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - public PerformVoiceSearchRequest withSectionId(Optional sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - /** - * The number of items to return per hub - */ - public PerformVoiceSearchRequest withLimit(double limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.ofNullable(limit); - return this; - } - - - /** - * The number of items to return per hub - */ - public PerformVoiceSearchRequest withLimit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformVoiceSearchRequest other = (PerformVoiceSearchRequest) o; - return - Utils.enhancedDeepEquals(this.query, other.query) && - Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && - Utils.enhancedDeepEquals(this.limit, other.limit); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - query, sectionId, limit); - } - - @Override - public String toString() { - return Utils.toString(PerformVoiceSearchRequest.class, - "query", query, - "sectionId", sectionId, - "limit", limit); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String query; - - private Optional sectionId = Optional.empty(); - - private Optional limit; - - private Builder() { - // force use of static builder() method - } - - - /** - * The query term - */ - public Builder query(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - public Builder sectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = Optional.ofNullable(sectionId); - return this; - } - - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - public Builder sectionId(Optional sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - - /** - * The number of items to return per hub - */ - public Builder limit(double limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.ofNullable(limit); - return this; - } - - /** - * The number of items to return per hub - */ - public Builder limit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - public PerformVoiceSearchRequest build() { - if (limit == null) { - limit = _SINGLETON_VALUE_Limit.value(); - } - - return new PerformVoiceSearchRequest( - query, sectionId, limit); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_Limit = - new LazySingletonValue<>( - "limit", - "3", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchRequestBuilder.java deleted file mode 100644 index 1e415b0c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchRequestBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.PerformVoiceSearch; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class PerformVoiceSearchRequestBuilder { - - private String query; - private Optional sectionId = Optional.empty(); - private Optional limit = Utils.readDefaultOrConstValue( - "limit", - "3", - new TypeReference>() {}); - private final SDKConfiguration sdkConfiguration; - - public PerformVoiceSearchRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public PerformVoiceSearchRequestBuilder query(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - public PerformVoiceSearchRequestBuilder sectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = Optional.of(sectionId); - return this; - } - - public PerformVoiceSearchRequestBuilder sectionId(Optional sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - public PerformVoiceSearchRequestBuilder limit(double limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.of(limit); - return this; - } - - public PerformVoiceSearchRequestBuilder limit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - - private PerformVoiceSearchRequest buildRequest() { - if (limit == null) { - limit = _SINGLETON_VALUE_Limit.value(); - } - - PerformVoiceSearchRequest request = new PerformVoiceSearchRequest(query, - sectionId, - limit); - - return request; - } - - public PerformVoiceSearchResponse call() throws Exception { - - RequestOperation operation - = new PerformVoiceSearch.Sync(sdkConfiguration); - PerformVoiceSearchRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } - - private static final LazySingletonValue> _SINGLETON_VALUE_Limit = - new LazySingletonValue<>( - "limit", - "3", - new TypeReference>() {}); -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchResponse.java deleted file mode 100644 index 5fa99cdf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PerformVoiceSearchResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class PerformVoiceSearchResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public PerformVoiceSearchResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public PerformVoiceSearchResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public PerformVoiceSearchResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformVoiceSearchResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformVoiceSearchResponse other = (PerformVoiceSearchResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformVoiceSearchResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformVoiceSearchResponse build() { - - return new PerformVoiceSearchResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PlayQueueGenerator.java b/src/main/java/dev/plexapi/sdk/models/operations/PlayQueueGenerator.java new file mode 100644 index 00000000..0b27e163 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PlayQueueGenerator.java @@ -0,0 +1,430 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class PlayQueueGenerator { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("changedAt") + private Optional changedAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAt") + private Optional createdAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playlistID") + private Optional playlistID; + + /** + * The type of playlist generator. + * + *

- -1: A smart playlist generator + * - 42: A optimized version generator + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + /** + * The URI indicating the search for this generator + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uri") + private Optional uri; + + @JsonCreator + public PlayQueueGenerator( + @JsonProperty("changedAt") Optional changedAt, + @JsonProperty("createdAt") Optional createdAt, + @JsonProperty("id") Optional id, + @JsonProperty("playlistID") Optional playlistID, + @JsonProperty("type") Optional type, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("uri") Optional uri) { + Utils.checkNotNull(changedAt, "changedAt"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(playlistID, "playlistID"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(uri, "uri"); + this.changedAt = changedAt; + this.createdAt = createdAt; + this.id = id; + this.playlistID = playlistID; + this.type = type; + this.updatedAt = updatedAt; + this.uri = uri; + } + + public PlayQueueGenerator() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + @JsonIgnore + public Optional changedAt() { + return changedAt; + } + + @JsonIgnore + public Optional createdAt() { + return createdAt; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional playlistID() { + return playlistID; + } + + /** + * The type of playlist generator. + * + *

- -1: A smart playlist generator + * - 42: A optimized version generator + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + /** + * The URI indicating the search for this generator + */ + @JsonIgnore + public Optional uri() { + return uri; + } + + public static Builder builder() { + return new Builder(); + } + + + public PlayQueueGenerator withChangedAt(long changedAt) { + Utils.checkNotNull(changedAt, "changedAt"); + this.changedAt = Optional.ofNullable(changedAt); + return this; + } + + + public PlayQueueGenerator withChangedAt(Optional changedAt) { + Utils.checkNotNull(changedAt, "changedAt"); + this.changedAt = changedAt; + return this; + } + + public PlayQueueGenerator withCreatedAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + + public PlayQueueGenerator withCreatedAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public PlayQueueGenerator withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public PlayQueueGenerator withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public PlayQueueGenerator withPlaylistID(long playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = Optional.ofNullable(playlistID); + return this; + } + + + public PlayQueueGenerator withPlaylistID(Optional playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + /** + * The type of playlist generator. + * + *

- -1: A smart playlist generator + * - 42: A optimized version generator + */ + public PlayQueueGenerator withType(GetPlaylistGeneratorsType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of playlist generator. + * + *

- -1: A smart playlist generator + * - 42: A optimized version generator + */ + public PlayQueueGenerator withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public PlayQueueGenerator withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + public PlayQueueGenerator withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * The URI indicating the search for this generator + */ + public PlayQueueGenerator withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + /** + * The URI indicating the search for this generator + */ + public PlayQueueGenerator withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlayQueueGenerator other = (PlayQueueGenerator) o; + return + Utils.enhancedDeepEquals(this.changedAt, other.changedAt) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.playlistID, other.playlistID) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.uri, other.uri); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + changedAt, createdAt, id, + playlistID, type, updatedAt, + uri); + } + + @Override + public String toString() { + return Utils.toString(PlayQueueGenerator.class, + "changedAt", changedAt, + "createdAt", createdAt, + "id", id, + "playlistID", playlistID, + "type", type, + "updatedAt", updatedAt, + "uri", uri); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional changedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional playlistID = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional uri = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder changedAt(long changedAt) { + Utils.checkNotNull(changedAt, "changedAt"); + this.changedAt = Optional.ofNullable(changedAt); + return this; + } + + public Builder changedAt(Optional changedAt) { + Utils.checkNotNull(changedAt, "changedAt"); + this.changedAt = changedAt; + return this; + } + + + public Builder createdAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + public Builder id(long 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 playlistID(long playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = Optional.ofNullable(playlistID); + return this; + } + + public Builder playlistID(Optional playlistID) { + Utils.checkNotNull(playlistID, "playlistID"); + this.playlistID = playlistID; + return this; + } + + + /** + * The type of playlist generator. + * + *

- -1: A smart playlist generator + * - 42: A optimized version generator + */ + public Builder type(GetPlaylistGeneratorsType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of playlist generator. + * + *

- -1: A smart playlist generator + * - 42: A optimized version generator + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + public Builder updatedAt(long 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; + } + + + /** + * The URI indicating the search for this generator + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + /** + * The URI indicating the search for this generator + */ + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + public PlayQueueGenerator build() { + + return new PlayQueueGenerator( + changedAt, createdAt, id, + playlistID, type, updatedAt, + uri); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Player.java b/src/main/java/dev/plexapi/sdk/models/operations/Player.java deleted file mode 100644 index eb9ec590..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Player.java +++ /dev/null @@ -1,727 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Player { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("address") - private Optional address; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("machineIdentifier") - private Optional machineIdentifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("model") - private Optional model; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("platform") - private Optional platform; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("platformVersion") - private Optional platformVersion; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("product") - private Optional product; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("profile") - private Optional profile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("remotePublicAddress") - private Optional remotePublicAddress; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("state") - private Optional state; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("version") - private Optional version; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("local") - private Optional local; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("relayed") - private Optional relayed; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("secure") - private Optional secure; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("userID") - private Optional userID; - - @JsonCreator - public Player( - @JsonProperty("address") Optional address, - @JsonProperty("machineIdentifier") Optional machineIdentifier, - @JsonProperty("model") Optional model, - @JsonProperty("platform") Optional platform, - @JsonProperty("platformVersion") Optional platformVersion, - @JsonProperty("product") Optional product, - @JsonProperty("profile") Optional profile, - @JsonProperty("remotePublicAddress") Optional remotePublicAddress, - @JsonProperty("state") Optional state, - @JsonProperty("title") Optional title, - @JsonProperty("version") Optional version, - @JsonProperty("local") Optional local, - @JsonProperty("relayed") Optional relayed, - @JsonProperty("secure") Optional secure, - @JsonProperty("userID") Optional userID) { - Utils.checkNotNull(address, "address"); - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - Utils.checkNotNull(model, "model"); - Utils.checkNotNull(platform, "platform"); - Utils.checkNotNull(platformVersion, "platformVersion"); - Utils.checkNotNull(product, "product"); - Utils.checkNotNull(profile, "profile"); - Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); - Utils.checkNotNull(state, "state"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(version, "version"); - Utils.checkNotNull(local, "local"); - Utils.checkNotNull(relayed, "relayed"); - Utils.checkNotNull(secure, "secure"); - Utils.checkNotNull(userID, "userID"); - this.address = address; - this.machineIdentifier = machineIdentifier; - this.model = model; - this.platform = platform; - this.platformVersion = platformVersion; - this.product = product; - this.profile = profile; - this.remotePublicAddress = remotePublicAddress; - this.state = state; - this.title = title; - this.version = version; - this.local = local; - this.relayed = relayed; - this.secure = secure; - this.userID = userID; - } - - public Player() { - 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()); - } - - @JsonIgnore - public Optional address() { - return address; - } - - @JsonIgnore - public Optional machineIdentifier() { - return machineIdentifier; - } - - @JsonIgnore - public Optional model() { - return model; - } - - @JsonIgnore - public Optional platform() { - return platform; - } - - @JsonIgnore - public Optional platformVersion() { - return platformVersion; - } - - @JsonIgnore - public Optional product() { - return product; - } - - @JsonIgnore - public Optional profile() { - return profile; - } - - @JsonIgnore - public Optional remotePublicAddress() { - return remotePublicAddress; - } - - @JsonIgnore - public Optional state() { - return state; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional version() { - return version; - } - - @JsonIgnore - public Optional local() { - return local; - } - - @JsonIgnore - public Optional relayed() { - return relayed; - } - - @JsonIgnore - public Optional secure() { - return secure; - } - - @JsonIgnore - public Optional userID() { - return userID; - } - - public static Builder builder() { - return new Builder(); - } - - - public Player withAddress(String address) { - Utils.checkNotNull(address, "address"); - this.address = Optional.ofNullable(address); - return this; - } - - - public Player withAddress(Optional address) { - Utils.checkNotNull(address, "address"); - this.address = address; - return this; - } - - public Player withMachineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = Optional.ofNullable(machineIdentifier); - return this; - } - - - public Player withMachineIdentifier(Optional machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - public Player withModel(String model) { - Utils.checkNotNull(model, "model"); - this.model = Optional.ofNullable(model); - return this; - } - - - public Player withModel(Optional model) { - Utils.checkNotNull(model, "model"); - this.model = model; - return this; - } - - public Player withPlatform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - - public Player withPlatform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - public Player withPlatformVersion(String platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = Optional.ofNullable(platformVersion); - return this; - } - - - public Player withPlatformVersion(Optional platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = platformVersion; - return this; - } - - public Player withProduct(String product) { - Utils.checkNotNull(product, "product"); - this.product = Optional.ofNullable(product); - return this; - } - - - public Player withProduct(Optional product) { - Utils.checkNotNull(product, "product"); - this.product = product; - return this; - } - - public Player withProfile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - - public Player withProfile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - public Player withRemotePublicAddress(String remotePublicAddress) { - Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); - this.remotePublicAddress = Optional.ofNullable(remotePublicAddress); - return this; - } - - - public Player withRemotePublicAddress(Optional remotePublicAddress) { - Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); - this.remotePublicAddress = remotePublicAddress; - return this; - } - - public Player withState(String state) { - Utils.checkNotNull(state, "state"); - this.state = Optional.ofNullable(state); - return this; - } - - - public Player withState(Optional state) { - Utils.checkNotNull(state, "state"); - this.state = state; - return this; - } - - public Player withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public Player withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public Player withVersion(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - - public Player withVersion(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - public Player withLocal(boolean local) { - Utils.checkNotNull(local, "local"); - this.local = Optional.ofNullable(local); - return this; - } - - - public Player withLocal(Optional local) { - Utils.checkNotNull(local, "local"); - this.local = local; - return this; - } - - public Player withRelayed(boolean relayed) { - Utils.checkNotNull(relayed, "relayed"); - this.relayed = Optional.ofNullable(relayed); - return this; - } - - - public Player withRelayed(Optional relayed) { - Utils.checkNotNull(relayed, "relayed"); - this.relayed = relayed; - return this; - } - - public Player withSecure(boolean secure) { - Utils.checkNotNull(secure, "secure"); - this.secure = Optional.ofNullable(secure); - return this; - } - - - public Player withSecure(Optional secure) { - Utils.checkNotNull(secure, "secure"); - this.secure = secure; - return this; - } - - public Player withUserID(int userID) { - Utils.checkNotNull(userID, "userID"); - this.userID = Optional.ofNullable(userID); - return this; - } - - - public Player withUserID(Optional userID) { - Utils.checkNotNull(userID, "userID"); - this.userID = userID; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Player other = (Player) o; - return - Utils.enhancedDeepEquals(this.address, other.address) && - Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && - Utils.enhancedDeepEquals(this.model, other.model) && - Utils.enhancedDeepEquals(this.platform, other.platform) && - Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && - Utils.enhancedDeepEquals(this.product, other.product) && - Utils.enhancedDeepEquals(this.profile, other.profile) && - Utils.enhancedDeepEquals(this.remotePublicAddress, other.remotePublicAddress) && - Utils.enhancedDeepEquals(this.state, other.state) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.version, other.version) && - Utils.enhancedDeepEquals(this.local, other.local) && - Utils.enhancedDeepEquals(this.relayed, other.relayed) && - Utils.enhancedDeepEquals(this.secure, other.secure) && - Utils.enhancedDeepEquals(this.userID, other.userID); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - address, machineIdentifier, model, - platform, platformVersion, product, - profile, remotePublicAddress, state, - title, version, local, - relayed, secure, userID); - } - - @Override - public String toString() { - return Utils.toString(Player.class, - "address", address, - "machineIdentifier", machineIdentifier, - "model", model, - "platform", platform, - "platformVersion", platformVersion, - "product", product, - "profile", profile, - "remotePublicAddress", remotePublicAddress, - "state", state, - "title", title, - "version", version, - "local", local, - "relayed", relayed, - "secure", secure, - "userID", userID); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional address = Optional.empty(); - - private Optional machineIdentifier = Optional.empty(); - - private Optional model = Optional.empty(); - - private Optional platform = Optional.empty(); - - private Optional platformVersion = Optional.empty(); - - private Optional product = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional remotePublicAddress = Optional.empty(); - - private Optional state = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional version = Optional.empty(); - - private Optional local = Optional.empty(); - - private Optional relayed = Optional.empty(); - - private Optional secure = Optional.empty(); - - private Optional userID = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder address(String address) { - Utils.checkNotNull(address, "address"); - this.address = Optional.ofNullable(address); - return this; - } - - public Builder address(Optional address) { - Utils.checkNotNull(address, "address"); - this.address = address; - return this; - } - - - public Builder machineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = Optional.ofNullable(machineIdentifier); - return this; - } - - public Builder machineIdentifier(Optional machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - - public Builder model(String model) { - Utils.checkNotNull(model, "model"); - this.model = Optional.ofNullable(model); - return this; - } - - public Builder model(Optional model) { - Utils.checkNotNull(model, "model"); - this.model = model; - return this; - } - - - public Builder platform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - public Builder platform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - - public Builder platformVersion(String platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = Optional.ofNullable(platformVersion); - return this; - } - - public Builder platformVersion(Optional platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = platformVersion; - return this; - } - - - public Builder product(String product) { - Utils.checkNotNull(product, "product"); - this.product = Optional.ofNullable(product); - return this; - } - - public Builder product(Optional product) { - Utils.checkNotNull(product, "product"); - this.product = product; - 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 remotePublicAddress(String remotePublicAddress) { - Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); - this.remotePublicAddress = Optional.ofNullable(remotePublicAddress); - return this; - } - - public Builder remotePublicAddress(Optional remotePublicAddress) { - Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); - this.remotePublicAddress = remotePublicAddress; - return this; - } - - - public Builder state(String state) { - Utils.checkNotNull(state, "state"); - this.state = Optional.ofNullable(state); - return this; - } - - public Builder state(Optional state) { - Utils.checkNotNull(state, "state"); - this.state = state; - 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 version(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - public Builder version(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - - public Builder local(boolean local) { - Utils.checkNotNull(local, "local"); - this.local = Optional.ofNullable(local); - return this; - } - - public Builder local(Optional local) { - Utils.checkNotNull(local, "local"); - this.local = local; - return this; - } - - - public Builder relayed(boolean relayed) { - Utils.checkNotNull(relayed, "relayed"); - this.relayed = Optional.ofNullable(relayed); - return this; - } - - public Builder relayed(Optional relayed) { - Utils.checkNotNull(relayed, "relayed"); - this.relayed = relayed; - return this; - } - - - public Builder secure(boolean secure) { - Utils.checkNotNull(secure, "secure"); - this.secure = Optional.ofNullable(secure); - return this; - } - - public Builder secure(Optional secure) { - Utils.checkNotNull(secure, "secure"); - this.secure = secure; - return this; - } - - - public Builder userID(int userID) { - Utils.checkNotNull(userID, "userID"); - this.userID = Optional.ofNullable(userID); - return this; - } - - public Builder userID(Optional userID) { - Utils.checkNotNull(userID, "userID"); - this.userID = userID; - return this; - } - - public Player build() { - - return new Player( - address, machineIdentifier, model, - platform, platformVersion, product, - profile, remotePublicAddress, state, - title, version, local, - relayed, secure, userID); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PlaylistType.java b/src/main/java/dev/plexapi/sdk/models/operations/PlaylistType.java index 567067ea..75ea9d0e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/PlaylistType.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/PlaylistType.java @@ -3,186 +3,39 @@ */ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; +import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; import java.util.Objects; import java.util.Optional; -/** - *

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

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

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

limit to a type of playlist. + *

Limit to a type of playlist */ -@JsonDeserialize(using = PlaylistType._Deserializer.class) -@JsonSerialize(using = PlaylistType._Serializer.class) -public class PlaylistType { - - public static final PlaylistType AUDIO = new PlaylistType("audio"); - public static final PlaylistType VIDEO = new PlaylistType("video"); - public static final PlaylistType PHOTO = new PlaylistType("photo"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); +public enum PlaylistType { + AUDIO("audio"), + VIDEO("video"), + PHOTO("photo"); + @JsonValue private final String value; - private PlaylistType(String value) { + PlaylistType(String value) { this.value = value; } - - /** - * Returns a PlaylistType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as PlaylistType - */ - public static PlaylistType of(String value) { - synchronized (PlaylistType.class) { - return values.computeIfAbsent(value, v -> new PlaylistType(v)); - } - } - + public String value() { return value; } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - PlaylistType other = (PlaylistType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "PlaylistType [value=" + value + "]"; - } - - // return an array just like an enum - public static PlaylistType[] values() { - synchronized (PlaylistType.class) { - return values.values().toArray(new PlaylistType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("audio", AUDIO); - map.put("video", VIDEO); - map.put("photo", PHOTO); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("audio", PlaylistTypeEnum.AUDIO); - map.put("video", PlaylistTypeEnum.VIDEO); - map.put("photo", PlaylistTypeEnum.PHOTO); - return map; - } - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(PlaylistType.class); - } - - @Override - public void serialize(PlaylistType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(PlaylistType.class); - } - - @Override - public PlaylistType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return PlaylistType.of(v); - } - } - - public enum PlaylistTypeEnum { - - AUDIO("audio"), - VIDEO("video"), - PHOTO("photo"),; - - private final String value; - - private PlaylistTypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; + public static Optional fromValue(String value) { + for (PlaylistType o: PlaylistType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } } + return Optional.empty(); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PlexDevice.java b/src/main/java/dev/plexapi/sdk/models/operations/PlexDevice.java deleted file mode 100644 index e49d424b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PlexDevice.java +++ /dev/null @@ -1,895 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Optional; - - -public class PlexDevice { - - @JsonProperty("name") - private String name; - - - @JsonProperty("product") - private String product; - - - @JsonProperty("productVersion") - private String productVersion; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("platform") - private Optional platform; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("platformVersion") - private Optional platformVersion; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("device") - private Optional device; - - - @JsonProperty("clientIdentifier") - private String clientIdentifier; - - - @JsonProperty("createdAt") - private OffsetDateTime createdAt; - - - @JsonProperty("lastSeenAt") - private OffsetDateTime lastSeenAt; - - - @JsonProperty("provides") - private String provides; - - /** - * ownerId is null when the device is owned by the token used to send the request - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("ownerId") - private Optional ownerId; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("sourceTitle") - private Optional sourceTitle; - - - @JsonProperty("publicAddress") - private String publicAddress; - - - @JsonProperty("accessToken") - private String accessToken; - - - @JsonProperty("owned") - private boolean owned; - - - @JsonProperty("home") - private boolean home; - - - @JsonProperty("synced") - private boolean synced; - - - @JsonProperty("relay") - private boolean relay; - - - @JsonProperty("presence") - private boolean presence; - - - @JsonProperty("httpsRequired") - private boolean httpsRequired; - - - @JsonProperty("publicAddressMatches") - private boolean publicAddressMatches; - - - @JsonProperty("dnsRebindingProtection") - private boolean dnsRebindingProtection; - - - @JsonProperty("natLoopbackSupported") - private boolean natLoopbackSupported; - - - @JsonProperty("connections") - private List connections; - - @JsonCreator - public PlexDevice( - @JsonProperty("name") String name, - @JsonProperty("product") String product, - @JsonProperty("productVersion") String productVersion, - @JsonProperty("platform") Optional platform, - @JsonProperty("platformVersion") Optional platformVersion, - @JsonProperty("device") Optional device, - @JsonProperty("clientIdentifier") String clientIdentifier, - @JsonProperty("createdAt") OffsetDateTime createdAt, - @JsonProperty("lastSeenAt") OffsetDateTime lastSeenAt, - @JsonProperty("provides") String provides, - @JsonProperty("ownerId") Optional ownerId, - @JsonProperty("sourceTitle") Optional sourceTitle, - @JsonProperty("publicAddress") String publicAddress, - @JsonProperty("accessToken") String accessToken, - @JsonProperty("owned") boolean owned, - @JsonProperty("home") boolean home, - @JsonProperty("synced") boolean synced, - @JsonProperty("relay") boolean relay, - @JsonProperty("presence") boolean presence, - @JsonProperty("httpsRequired") boolean httpsRequired, - @JsonProperty("publicAddressMatches") boolean publicAddressMatches, - @JsonProperty("dnsRebindingProtection") boolean dnsRebindingProtection, - @JsonProperty("natLoopbackSupported") boolean natLoopbackSupported, - @JsonProperty("connections") List connections) { - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(product, "product"); - Utils.checkNotNull(productVersion, "productVersion"); - Utils.checkNotNull(platform, "platform"); - Utils.checkNotNull(platformVersion, "platformVersion"); - Utils.checkNotNull(device, "device"); - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - Utils.checkNotNull(createdAt, "createdAt"); - Utils.checkNotNull(lastSeenAt, "lastSeenAt"); - Utils.checkNotNull(provides, "provides"); - Utils.checkNotNull(ownerId, "ownerId"); - Utils.checkNotNull(sourceTitle, "sourceTitle"); - Utils.checkNotNull(publicAddress, "publicAddress"); - Utils.checkNotNull(accessToken, "accessToken"); - Utils.checkNotNull(owned, "owned"); - Utils.checkNotNull(home, "home"); - Utils.checkNotNull(synced, "synced"); - Utils.checkNotNull(relay, "relay"); - Utils.checkNotNull(presence, "presence"); - Utils.checkNotNull(httpsRequired, "httpsRequired"); - Utils.checkNotNull(publicAddressMatches, "publicAddressMatches"); - Utils.checkNotNull(dnsRebindingProtection, "dnsRebindingProtection"); - Utils.checkNotNull(natLoopbackSupported, "natLoopbackSupported"); - Utils.checkNotNull(connections, "connections"); - this.name = name; - this.product = product; - this.productVersion = productVersion; - this.platform = platform; - this.platformVersion = platformVersion; - this.device = device; - this.clientIdentifier = clientIdentifier; - this.createdAt = createdAt; - this.lastSeenAt = lastSeenAt; - this.provides = provides; - this.ownerId = ownerId; - this.sourceTitle = sourceTitle; - this.publicAddress = publicAddress; - this.accessToken = accessToken; - this.owned = owned; - this.home = home; - this.synced = synced; - this.relay = relay; - this.presence = presence; - this.httpsRequired = httpsRequired; - this.publicAddressMatches = publicAddressMatches; - this.dnsRebindingProtection = dnsRebindingProtection; - this.natLoopbackSupported = natLoopbackSupported; - this.connections = connections; - } - - public PlexDevice( - String name, - String product, - String productVersion, - String clientIdentifier, - OffsetDateTime createdAt, - OffsetDateTime lastSeenAt, - String provides, - String publicAddress, - String accessToken, - boolean owned, - boolean home, - boolean synced, - boolean relay, - boolean presence, - boolean httpsRequired, - boolean publicAddressMatches, - boolean dnsRebindingProtection, - boolean natLoopbackSupported, - List connections) { - this(name, product, productVersion, - Optional.empty(), Optional.empty(), Optional.empty(), - clientIdentifier, createdAt, lastSeenAt, - provides, Optional.empty(), Optional.empty(), - publicAddress, accessToken, owned, - home, synced, relay, - presence, httpsRequired, publicAddressMatches, - dnsRebindingProtection, natLoopbackSupported, connections); - } - - @JsonIgnore - public String name() { - return name; - } - - @JsonIgnore - public String product() { - return product; - } - - @JsonIgnore - public String productVersion() { - return productVersion; - } - - @JsonIgnore - public Optional platform() { - return platform; - } - - @JsonIgnore - public Optional platformVersion() { - return platformVersion; - } - - @JsonIgnore - public Optional device() { - return device; - } - - @JsonIgnore - public String clientIdentifier() { - return clientIdentifier; - } - - @JsonIgnore - public OffsetDateTime createdAt() { - return createdAt; - } - - @JsonIgnore - public OffsetDateTime lastSeenAt() { - return lastSeenAt; - } - - @JsonIgnore - public String provides() { - return provides; - } - - /** - * ownerId is null when the device is owned by the token used to send the request - */ - @JsonIgnore - public Optional ownerId() { - return ownerId; - } - - @JsonIgnore - public Optional sourceTitle() { - return sourceTitle; - } - - @JsonIgnore - public String publicAddress() { - return publicAddress; - } - - @JsonIgnore - public String accessToken() { - return accessToken; - } - - @JsonIgnore - public boolean owned() { - return owned; - } - - @JsonIgnore - public boolean home() { - return home; - } - - @JsonIgnore - public boolean synced() { - return synced; - } - - @JsonIgnore - public boolean relay() { - return relay; - } - - @JsonIgnore - public boolean presence() { - return presence; - } - - @JsonIgnore - public boolean httpsRequired() { - return httpsRequired; - } - - @JsonIgnore - public boolean publicAddressMatches() { - return publicAddressMatches; - } - - @JsonIgnore - public boolean dnsRebindingProtection() { - return dnsRebindingProtection; - } - - @JsonIgnore - public boolean natLoopbackSupported() { - return natLoopbackSupported; - } - - @JsonIgnore - public List connections() { - return connections; - } - - public static Builder builder() { - return new Builder(); - } - - - public PlexDevice withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public PlexDevice withProduct(String product) { - Utils.checkNotNull(product, "product"); - this.product = product; - return this; - } - - public PlexDevice withProductVersion(String productVersion) { - Utils.checkNotNull(productVersion, "productVersion"); - this.productVersion = productVersion; - return this; - } - - public PlexDevice withPlatform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - - public PlexDevice withPlatform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - public PlexDevice withPlatformVersion(String platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = Optional.ofNullable(platformVersion); - return this; - } - - - public PlexDevice withPlatformVersion(Optional platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = platformVersion; - return this; - } - - public PlexDevice withDevice(String device) { - Utils.checkNotNull(device, "device"); - this.device = Optional.ofNullable(device); - return this; - } - - - public PlexDevice withDevice(Optional device) { - Utils.checkNotNull(device, "device"); - this.device = device; - return this; - } - - public PlexDevice withClientIdentifier(String clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = clientIdentifier; - return this; - } - - public PlexDevice withCreatedAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - public PlexDevice withLastSeenAt(OffsetDateTime lastSeenAt) { - Utils.checkNotNull(lastSeenAt, "lastSeenAt"); - this.lastSeenAt = lastSeenAt; - return this; - } - - public PlexDevice withProvides(String provides) { - Utils.checkNotNull(provides, "provides"); - this.provides = provides; - return this; - } - - /** - * ownerId is null when the device is owned by the token used to send the request - */ - public PlexDevice withOwnerId(long ownerId) { - Utils.checkNotNull(ownerId, "ownerId"); - this.ownerId = Optional.ofNullable(ownerId); - return this; - } - - - /** - * ownerId is null when the device is owned by the token used to send the request - */ - public PlexDevice withOwnerId(Optional ownerId) { - Utils.checkNotNull(ownerId, "ownerId"); - this.ownerId = ownerId; - return this; - } - - public PlexDevice withSourceTitle(String sourceTitle) { - Utils.checkNotNull(sourceTitle, "sourceTitle"); - this.sourceTitle = Optional.ofNullable(sourceTitle); - return this; - } - - - public PlexDevice withSourceTitle(Optional sourceTitle) { - Utils.checkNotNull(sourceTitle, "sourceTitle"); - this.sourceTitle = sourceTitle; - return this; - } - - public PlexDevice withPublicAddress(String publicAddress) { - Utils.checkNotNull(publicAddress, "publicAddress"); - this.publicAddress = publicAddress; - return this; - } - - public PlexDevice withAccessToken(String accessToken) { - Utils.checkNotNull(accessToken, "accessToken"); - this.accessToken = accessToken; - return this; - } - - public PlexDevice withOwned(boolean owned) { - Utils.checkNotNull(owned, "owned"); - this.owned = owned; - return this; - } - - public PlexDevice withHome(boolean home) { - Utils.checkNotNull(home, "home"); - this.home = home; - return this; - } - - public PlexDevice withSynced(boolean synced) { - Utils.checkNotNull(synced, "synced"); - this.synced = synced; - return this; - } - - public PlexDevice withRelay(boolean relay) { - Utils.checkNotNull(relay, "relay"); - this.relay = relay; - return this; - } - - public PlexDevice withPresence(boolean presence) { - Utils.checkNotNull(presence, "presence"); - this.presence = presence; - return this; - } - - public PlexDevice withHttpsRequired(boolean httpsRequired) { - Utils.checkNotNull(httpsRequired, "httpsRequired"); - this.httpsRequired = httpsRequired; - return this; - } - - public PlexDevice withPublicAddressMatches(boolean publicAddressMatches) { - Utils.checkNotNull(publicAddressMatches, "publicAddressMatches"); - this.publicAddressMatches = publicAddressMatches; - return this; - } - - public PlexDevice withDnsRebindingProtection(boolean dnsRebindingProtection) { - Utils.checkNotNull(dnsRebindingProtection, "dnsRebindingProtection"); - this.dnsRebindingProtection = dnsRebindingProtection; - return this; - } - - public PlexDevice withNatLoopbackSupported(boolean natLoopbackSupported) { - Utils.checkNotNull(natLoopbackSupported, "natLoopbackSupported"); - this.natLoopbackSupported = natLoopbackSupported; - return this; - } - - public PlexDevice withConnections(List connections) { - Utils.checkNotNull(connections, "connections"); - this.connections = connections; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlexDevice other = (PlexDevice) o; - return - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.product, other.product) && - Utils.enhancedDeepEquals(this.productVersion, other.productVersion) && - Utils.enhancedDeepEquals(this.platform, other.platform) && - Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && - Utils.enhancedDeepEquals(this.device, other.device) && - Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && - Utils.enhancedDeepEquals(this.lastSeenAt, other.lastSeenAt) && - Utils.enhancedDeepEquals(this.provides, other.provides) && - Utils.enhancedDeepEquals(this.ownerId, other.ownerId) && - Utils.enhancedDeepEquals(this.sourceTitle, other.sourceTitle) && - Utils.enhancedDeepEquals(this.publicAddress, other.publicAddress) && - Utils.enhancedDeepEquals(this.accessToken, other.accessToken) && - Utils.enhancedDeepEquals(this.owned, other.owned) && - Utils.enhancedDeepEquals(this.home, other.home) && - Utils.enhancedDeepEquals(this.synced, other.synced) && - Utils.enhancedDeepEquals(this.relay, other.relay) && - Utils.enhancedDeepEquals(this.presence, other.presence) && - Utils.enhancedDeepEquals(this.httpsRequired, other.httpsRequired) && - Utils.enhancedDeepEquals(this.publicAddressMatches, other.publicAddressMatches) && - Utils.enhancedDeepEquals(this.dnsRebindingProtection, other.dnsRebindingProtection) && - Utils.enhancedDeepEquals(this.natLoopbackSupported, other.natLoopbackSupported) && - Utils.enhancedDeepEquals(this.connections, other.connections); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - name, product, productVersion, - platform, platformVersion, device, - clientIdentifier, createdAt, lastSeenAt, - provides, ownerId, sourceTitle, - publicAddress, accessToken, owned, - home, synced, relay, - presence, httpsRequired, publicAddressMatches, - dnsRebindingProtection, natLoopbackSupported, connections); - } - - @Override - public String toString() { - return Utils.toString(PlexDevice.class, - "name", name, - "product", product, - "productVersion", productVersion, - "platform", platform, - "platformVersion", platformVersion, - "device", device, - "clientIdentifier", clientIdentifier, - "createdAt", createdAt, - "lastSeenAt", lastSeenAt, - "provides", provides, - "ownerId", ownerId, - "sourceTitle", sourceTitle, - "publicAddress", publicAddress, - "accessToken", accessToken, - "owned", owned, - "home", home, - "synced", synced, - "relay", relay, - "presence", presence, - "httpsRequired", httpsRequired, - "publicAddressMatches", publicAddressMatches, - "dnsRebindingProtection", dnsRebindingProtection, - "natLoopbackSupported", natLoopbackSupported, - "connections", connections); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String name; - - private String product; - - private String productVersion; - - private Optional platform = Optional.empty(); - - private Optional platformVersion = Optional.empty(); - - private Optional device = Optional.empty(); - - private String clientIdentifier; - - private OffsetDateTime createdAt; - - private OffsetDateTime lastSeenAt; - - private String provides; - - private Optional ownerId = Optional.empty(); - - private Optional sourceTitle = Optional.empty(); - - private String publicAddress; - - private String accessToken; - - private Boolean owned; - - private Boolean home; - - private Boolean synced; - - private Boolean relay; - - private Boolean presence; - - private Boolean httpsRequired; - - private Boolean publicAddressMatches; - - private Boolean dnsRebindingProtection; - - private Boolean natLoopbackSupported; - - private List connections; - - private Builder() { - // force use of static builder() method - } - - - public Builder name(String name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder product(String product) { - Utils.checkNotNull(product, "product"); - this.product = product; - return this; - } - - - public Builder productVersion(String productVersion) { - Utils.checkNotNull(productVersion, "productVersion"); - this.productVersion = productVersion; - return this; - } - - - public Builder platform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - public Builder platform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - return this; - } - - - public Builder platformVersion(String platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = Optional.ofNullable(platformVersion); - return this; - } - - public Builder platformVersion(Optional platformVersion) { - Utils.checkNotNull(platformVersion, "platformVersion"); - this.platformVersion = platformVersion; - return this; - } - - - public Builder device(String device) { - Utils.checkNotNull(device, "device"); - this.device = Optional.ofNullable(device); - return this; - } - - public Builder device(Optional device) { - Utils.checkNotNull(device, "device"); - this.device = device; - return this; - } - - - public Builder clientIdentifier(String clientIdentifier) { - Utils.checkNotNull(clientIdentifier, "clientIdentifier"); - this.clientIdentifier = clientIdentifier; - return this; - } - - - public Builder createdAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - - public Builder lastSeenAt(OffsetDateTime lastSeenAt) { - Utils.checkNotNull(lastSeenAt, "lastSeenAt"); - this.lastSeenAt = lastSeenAt; - return this; - } - - - public Builder provides(String provides) { - Utils.checkNotNull(provides, "provides"); - this.provides = provides; - return this; - } - - - /** - * ownerId is null when the device is owned by the token used to send the request - */ - public Builder ownerId(long ownerId) { - Utils.checkNotNull(ownerId, "ownerId"); - this.ownerId = Optional.ofNullable(ownerId); - return this; - } - - /** - * ownerId is null when the device is owned by the token used to send the request - */ - public Builder ownerId(Optional ownerId) { - Utils.checkNotNull(ownerId, "ownerId"); - this.ownerId = ownerId; - return this; - } - - - public Builder sourceTitle(String sourceTitle) { - Utils.checkNotNull(sourceTitle, "sourceTitle"); - this.sourceTitle = Optional.ofNullable(sourceTitle); - return this; - } - - public Builder sourceTitle(Optional sourceTitle) { - Utils.checkNotNull(sourceTitle, "sourceTitle"); - this.sourceTitle = sourceTitle; - return this; - } - - - public Builder publicAddress(String publicAddress) { - Utils.checkNotNull(publicAddress, "publicAddress"); - this.publicAddress = publicAddress; - return this; - } - - - public Builder accessToken(String accessToken) { - Utils.checkNotNull(accessToken, "accessToken"); - this.accessToken = accessToken; - return this; - } - - - public Builder owned(boolean owned) { - Utils.checkNotNull(owned, "owned"); - this.owned = owned; - return this; - } - - - public Builder home(boolean home) { - Utils.checkNotNull(home, "home"); - this.home = home; - return this; - } - - - public Builder synced(boolean synced) { - Utils.checkNotNull(synced, "synced"); - this.synced = synced; - return this; - } - - - public Builder relay(boolean relay) { - Utils.checkNotNull(relay, "relay"); - this.relay = relay; - return this; - } - - - public Builder presence(boolean presence) { - Utils.checkNotNull(presence, "presence"); - this.presence = presence; - return this; - } - - - public Builder httpsRequired(boolean httpsRequired) { - Utils.checkNotNull(httpsRequired, "httpsRequired"); - this.httpsRequired = httpsRequired; - return this; - } - - - public Builder publicAddressMatches(boolean publicAddressMatches) { - Utils.checkNotNull(publicAddressMatches, "publicAddressMatches"); - this.publicAddressMatches = publicAddressMatches; - return this; - } - - - public Builder dnsRebindingProtection(boolean dnsRebindingProtection) { - Utils.checkNotNull(dnsRebindingProtection, "dnsRebindingProtection"); - this.dnsRebindingProtection = dnsRebindingProtection; - return this; - } - - - public Builder natLoopbackSupported(boolean natLoopbackSupported) { - Utils.checkNotNull(natLoopbackSupported, "natLoopbackSupported"); - this.natLoopbackSupported = natLoopbackSupported; - return this; - } - - - public Builder connections(List connections) { - Utils.checkNotNull(connections, "connections"); - this.connections = connections; - return this; - } - - public PlexDevice build() { - - return new PlexDevice( - name, product, productVersion, - platform, platformVersion, device, - clientIdentifier, createdAt, lastSeenAt, - provides, ownerId, sourceTitle, - publicAddress, accessToken, owned, - home, synced, relay, - presence, httpsRequired, publicAddressMatches, - dnsRebindingProtection, natLoopbackSupported, connections); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Policy.java b/src/main/java/dev/plexapi/sdk/models/operations/Policy.java new file mode 100644 index 00000000..35d52a01 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Policy.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.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class Policy { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scope") + private Optional scope; + + /** + * True if only unwatched items are optimized + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("unwatched") + private Optional unwatched; + + /** + * If the scope is count, the number of items to optimize + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("value") + private Optional value; + + @JsonCreator + public Policy( + @JsonProperty("scope") Optional scope, + @JsonProperty("unwatched") Optional unwatched, + @JsonProperty("value") Optional value) { + Utils.checkNotNull(scope, "scope"); + Utils.checkNotNull(unwatched, "unwatched"); + Utils.checkNotNull(value, "value"); + this.scope = scope; + this.unwatched = unwatched; + this.value = value; + } + + public Policy() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional scope() { + return (Optional) scope; + } + + /** + * True if only unwatched items are optimized + */ + @JsonIgnore + public Optional unwatched() { + return unwatched; + } + + /** + * If the scope is count, the number of items to optimize + */ + @JsonIgnore + public Optional value() { + return value; + } + + public static Builder builder() { + return new Builder(); + } + + + public Policy withScope(GetPlaylistGeneratorScope scope) { + Utils.checkNotNull(scope, "scope"); + this.scope = Optional.ofNullable(scope); + return this; + } + + + public Policy withScope(Optional scope) { + Utils.checkNotNull(scope, "scope"); + this.scope = scope; + return this; + } + + /** + * True if only unwatched items are optimized + */ + public Policy withUnwatched(boolean unwatched) { + Utils.checkNotNull(unwatched, "unwatched"); + this.unwatched = Optional.ofNullable(unwatched); + return this; + } + + + /** + * True if only unwatched items are optimized + */ + public Policy withUnwatched(Optional unwatched) { + Utils.checkNotNull(unwatched, "unwatched"); + this.unwatched = unwatched; + return this; + } + + /** + * If the scope is count, the number of items to optimize + */ + public Policy withValue(long value) { + Utils.checkNotNull(value, "value"); + this.value = Optional.ofNullable(value); + return this; + } + + + /** + * If the scope is count, the number of items to optimize + */ + public Policy withValue(Optional value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Policy other = (Policy) o; + return + Utils.enhancedDeepEquals(this.scope, other.scope) && + Utils.enhancedDeepEquals(this.unwatched, other.unwatched) && + Utils.enhancedDeepEquals(this.value, other.value); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + scope, unwatched, value); + } + + @Override + public String toString() { + return Utils.toString(Policy.class, + "scope", scope, + "unwatched", unwatched, + "value", value); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional scope = Optional.empty(); + + private Optional unwatched = Optional.empty(); + + private Optional value = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder scope(GetPlaylistGeneratorScope scope) { + Utils.checkNotNull(scope, "scope"); + this.scope = Optional.ofNullable(scope); + return this; + } + + public Builder scope(Optional scope) { + Utils.checkNotNull(scope, "scope"); + this.scope = scope; + return this; + } + + + /** + * True if only unwatched items are optimized + */ + public Builder unwatched(boolean unwatched) { + Utils.checkNotNull(unwatched, "unwatched"); + this.unwatched = Optional.ofNullable(unwatched); + return this; + } + + /** + * True if only unwatched items are optimized + */ + public Builder unwatched(Optional unwatched) { + Utils.checkNotNull(unwatched, "unwatched"); + this.unwatched = unwatched; + return this; + } + + + /** + * If the scope is count, the number of items to optimize + */ + public Builder value(long value) { + Utils.checkNotNull(value, "value"); + this.value = Optional.ofNullable(value); + return this; + } + + /** + * If the scope is count, the number of items to optimize + */ + public Builder value(Optional value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + public Policy build() { + + return new Policy( + scope, unwatched, value); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequest.java deleted file mode 100644 index e109367c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequest.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PostMediaArtsRequest { - /** - * the id of the library item to return the posters of. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") - private long ratingKey; - - /** - * The URL of the image, if uploading a remote image - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") - private Optional url; - - /** - * The contents of the image, if uploading a local file - */ - @SpeakeasyMetadata("request:mediaType=image/*") - private Optional requestBody; - - @JsonCreator - public PostMediaArtsRequest( - long ratingKey, - Optional url, - Optional requestBody) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(url, "url"); - Utils.checkNotNull(requestBody, "requestBody"); - this.ratingKey = ratingKey; - this.url = url; - this.requestBody = requestBody; - } - - public PostMediaArtsRequest( - long ratingKey) { - this(ratingKey, Optional.empty(), Optional.empty()); - } - - /** - * the id of the library item to return the posters of. - */ - @JsonIgnore - public long ratingKey() { - return ratingKey; - } - - /** - * The URL of the image, if uploading a remote image - */ - @JsonIgnore - public Optional url() { - return url; - } - - /** - * The contents of the image, if uploading a local file - */ - @JsonIgnore - public Optional requestBody() { - return requestBody; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the id of the library item to return the posters of. - */ - public PostMediaArtsRequest withRatingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * The URL of the image, if uploading a remote image - */ - public PostMediaArtsRequest withUrl(String url) { - Utils.checkNotNull(url, "url"); - this.url = Optional.ofNullable(url); - return this; - } - - - /** - * The URL of the image, if uploading a remote image - */ - public PostMediaArtsRequest withUrl(Optional url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - /** - * The contents of the image, if uploading a local file - */ - public PostMediaArtsRequest withRequestBody(byte[] requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = Optional.ofNullable(requestBody); - return this; - } - - - /** - * The contents of the image, if uploading a local file - */ - public PostMediaArtsRequest withRequestBody(Optional requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = requestBody; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostMediaArtsRequest other = (PostMediaArtsRequest) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.url, other.url) && - Utils.enhancedDeepEquals(this.requestBody, other.requestBody); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, url, requestBody); - } - - @Override - public String toString() { - return Utils.toString(PostMediaArtsRequest.class, - "ratingKey", ratingKey, - "url", url, - "requestBody", requestBody); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long ratingKey; - - private Optional url = Optional.empty(); - - private Optional requestBody = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * the id of the library item to return the posters of. - */ - public Builder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * The URL of the image, if uploading a remote image - */ - public Builder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = Optional.ofNullable(url); - return this; - } - - /** - * The URL of the image, if uploading a remote image - */ - public Builder url(Optional url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - - /** - * The contents of the image, if uploading a local file - */ - public Builder requestBody(byte[] requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = Optional.ofNullable(requestBody); - return this; - } - - /** - * The contents of the image, if uploading a local file - */ - public Builder requestBody(Optional requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = requestBody; - return this; - } - - public PostMediaArtsRequest build() { - - return new PostMediaArtsRequest( - ratingKey, url, requestBody); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequestBuilder.java deleted file mode 100644 index daec007b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsRequestBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.PostMediaArts; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.lang.String; -import java.util.Optional; - -public class PostMediaArtsRequestBuilder { - - private Long ratingKey; - private Optional url = Optional.empty(); - private Optional requestBody = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public PostMediaArtsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public PostMediaArtsRequestBuilder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public PostMediaArtsRequestBuilder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = Optional.of(url); - return this; - } - - public PostMediaArtsRequestBuilder url(Optional url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - public PostMediaArtsRequestBuilder requestBody(byte[] requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = Optional.of(requestBody); - return this; - } - - public PostMediaArtsRequestBuilder requestBody(Optional requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = requestBody; - return this; - } - - - private PostMediaArtsRequest buildRequest() { - - PostMediaArtsRequest request = new PostMediaArtsRequest(ratingKey, - url, - requestBody); - - return request; - } - - public PostMediaArtsResponse call() throws Exception { - - RequestOperation operation - = new PostMediaArts.Sync(sdkConfiguration); - PostMediaArtsRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsResponse.java deleted file mode 100644 index 8428eb26..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaArtsResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class PostMediaArtsResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public PostMediaArtsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public PostMediaArtsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public PostMediaArtsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostMediaArtsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostMediaArtsResponse other = (PostMediaArtsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PostMediaArtsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PostMediaArtsResponse build() { - - return new PostMediaArtsResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequest.java deleted file mode 100644 index 478e8909..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequest.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PostMediaPosterRequest { - /** - * the id of the library item to return the posters of. - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") - private long ratingKey; - - /** - * The URL of the image, if uploading a remote image - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") - private Optional url; - - /** - * The contents of the image, if uploading a local file - */ - @SpeakeasyMetadata("request:mediaType=image/*") - private Optional requestBody; - - @JsonCreator - public PostMediaPosterRequest( - long ratingKey, - Optional url, - Optional requestBody) { - Utils.checkNotNull(ratingKey, "ratingKey"); - Utils.checkNotNull(url, "url"); - Utils.checkNotNull(requestBody, "requestBody"); - this.ratingKey = ratingKey; - this.url = url; - this.requestBody = requestBody; - } - - public PostMediaPosterRequest( - long ratingKey) { - this(ratingKey, Optional.empty(), Optional.empty()); - } - - /** - * the id of the library item to return the posters of. - */ - @JsonIgnore - public long ratingKey() { - return ratingKey; - } - - /** - * The URL of the image, if uploading a remote image - */ - @JsonIgnore - public Optional url() { - return url; - } - - /** - * The contents of the image, if uploading a local file - */ - @JsonIgnore - public Optional requestBody() { - return requestBody; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the id of the library item to return the posters of. - */ - public PostMediaPosterRequest withRatingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - /** - * The URL of the image, if uploading a remote image - */ - public PostMediaPosterRequest withUrl(String url) { - Utils.checkNotNull(url, "url"); - this.url = Optional.ofNullable(url); - return this; - } - - - /** - * The URL of the image, if uploading a remote image - */ - public PostMediaPosterRequest withUrl(Optional url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - /** - * The contents of the image, if uploading a local file - */ - public PostMediaPosterRequest withRequestBody(byte[] requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = Optional.ofNullable(requestBody); - return this; - } - - - /** - * The contents of the image, if uploading a local file - */ - public PostMediaPosterRequest withRequestBody(Optional requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = requestBody; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostMediaPosterRequest other = (PostMediaPosterRequest) o; - return - Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && - Utils.enhancedDeepEquals(this.url, other.url) && - Utils.enhancedDeepEquals(this.requestBody, other.requestBody); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ratingKey, url, requestBody); - } - - @Override - public String toString() { - return Utils.toString(PostMediaPosterRequest.class, - "ratingKey", ratingKey, - "url", url, - "requestBody", requestBody); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long ratingKey; - - private Optional url = Optional.empty(); - - private Optional requestBody = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * the id of the library item to return the posters of. - */ - public Builder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - /** - * The URL of the image, if uploading a remote image - */ - public Builder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = Optional.ofNullable(url); - return this; - } - - /** - * The URL of the image, if uploading a remote image - */ - public Builder url(Optional url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - - /** - * The contents of the image, if uploading a local file - */ - public Builder requestBody(byte[] requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = Optional.ofNullable(requestBody); - return this; - } - - /** - * The contents of the image, if uploading a local file - */ - public Builder requestBody(Optional requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = requestBody; - return this; - } - - public PostMediaPosterRequest build() { - - return new PostMediaPosterRequest( - ratingKey, url, requestBody); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequestBuilder.java deleted file mode 100644 index 79028a82..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterRequestBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.PostMediaPoster; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.lang.String; -import java.util.Optional; - -public class PostMediaPosterRequestBuilder { - - private Long ratingKey; - private Optional url = Optional.empty(); - private Optional requestBody = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public PostMediaPosterRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public PostMediaPosterRequestBuilder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public PostMediaPosterRequestBuilder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = Optional.of(url); - return this; - } - - public PostMediaPosterRequestBuilder url(Optional url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - public PostMediaPosterRequestBuilder requestBody(byte[] requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = Optional.of(requestBody); - return this; - } - - public PostMediaPosterRequestBuilder requestBody(Optional requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = requestBody; - return this; - } - - - private PostMediaPosterRequest buildRequest() { - - PostMediaPosterRequest request = new PostMediaPosterRequest(ratingKey, - url, - requestBody); - - return request; - } - - public PostMediaPosterResponse call() throws Exception { - - RequestOperation operation - = new PostMediaPoster.Sync(sdkConfiguration); - PostMediaPosterRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterResponse.java deleted file mode 100644 index 7fa649ef..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostMediaPosterResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class PostMediaPosterResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public PostMediaPosterResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public PostMediaPosterResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public PostMediaPosterResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostMediaPosterResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostMediaPosterResponse other = (PostMediaPosterResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PostMediaPosterResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PostMediaPosterResponse build() { - - return new PostMediaPosterResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationResponseStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationResponseStatus.java deleted file mode 100644 index 426f9fda..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationResponseStatus.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

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

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

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

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

String representation of subscriptionActive - */ -@JsonDeserialize(using = PostUsersSignInDataAuthenticationStatus._Deserializer.class) -@JsonSerialize(using = PostUsersSignInDataAuthenticationStatus._Serializer.class) -public class PostUsersSignInDataAuthenticationStatus { - - public static final PostUsersSignInDataAuthenticationStatus INACTIVE = new PostUsersSignInDataAuthenticationStatus("Inactive"); - public static final PostUsersSignInDataAuthenticationStatus ACTIVE = new PostUsersSignInDataAuthenticationStatus("Active"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private PostUsersSignInDataAuthenticationStatus(String value) { - this.value = value; - } - - /** - * Returns a PostUsersSignInDataAuthenticationStatus with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as PostUsersSignInDataAuthenticationStatus - */ - public static PostUsersSignInDataAuthenticationStatus of(String value) { - synchronized (PostUsersSignInDataAuthenticationStatus.class) { - return values.computeIfAbsent(value, v -> new PostUsersSignInDataAuthenticationStatus(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - PostUsersSignInDataAuthenticationStatus other = (PostUsersSignInDataAuthenticationStatus) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "PostUsersSignInDataAuthenticationStatus [value=" + value + "]"; - } - - // return an array just like an enum - public static PostUsersSignInDataAuthenticationStatus[] values() { - synchronized (PostUsersSignInDataAuthenticationStatus.class) { - return values.values().toArray(new PostUsersSignInDataAuthenticationStatus[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("Inactive", INACTIVE); - map.put("Active", ACTIVE); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("Inactive", PostUsersSignInDataAuthenticationStatusEnum.INACTIVE); - map.put("Active", PostUsersSignInDataAuthenticationStatusEnum.ACTIVE); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(PostUsersSignInDataAuthenticationStatus.class); - } - - @Override - public void serialize(PostUsersSignInDataAuthenticationStatus value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(PostUsersSignInDataAuthenticationStatus.class); - } - - @Override - public PostUsersSignInDataAuthenticationStatus deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return PostUsersSignInDataAuthenticationStatus.of(v); - } - } - - public enum PostUsersSignInDataAuthenticationStatusEnum { - - INACTIVE("Inactive"), - ACTIVE("Active"),; - - private final String value; - - private PostUsersSignInDataAuthenticationStatusEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationSubscription.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationSubscription.java deleted file mode 100644 index d297afaa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAuthenticationSubscription.java +++ /dev/null @@ -1,434 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class PostUsersSignInDataAuthenticationSubscription { - /** - * List of features allowed on your Plex Pass subscription - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("features") - private Optional> features; - - /** - * If the account's Plex Pass subscription is active - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("active") - private Optional active; - - /** - * Date the account subscribed to Plex Pass - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subscribedAt") - private JsonNullable subscribedAt; - - /** - * String representation of subscriptionActive - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - /** - * Payment service used for your Plex Pass subscription - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("paymentService") - private JsonNullable paymentService; - - /** - * Name of Plex Pass subscription plan - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("plan") - private JsonNullable plan; - - @JsonCreator - public PostUsersSignInDataAuthenticationSubscription( - @JsonProperty("features") Optional> features, - @JsonProperty("active") Optional active, - @JsonProperty("subscribedAt") JsonNullable subscribedAt, - @JsonProperty("status") Optional status, - @JsonProperty("paymentService") JsonNullable paymentService, - @JsonProperty("plan") JsonNullable plan) { - Utils.checkNotNull(features, "features"); - Utils.checkNotNull(active, "active"); - Utils.checkNotNull(subscribedAt, "subscribedAt"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(paymentService, "paymentService"); - Utils.checkNotNull(plan, "plan"); - this.features = features; - this.active = active; - this.subscribedAt = subscribedAt; - this.status = status; - this.paymentService = paymentService; - this.plan = plan; - } - - public PostUsersSignInDataAuthenticationSubscription() { - this(Optional.empty(), Optional.empty(), JsonNullable.undefined(), - Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); - } - - /** - * List of features allowed on your Plex Pass subscription - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> features() { - return (Optional>) features; - } - - /** - * If the account's Plex Pass subscription is active - */ - @JsonIgnore - public Optional active() { - return active; - } - - /** - * Date the account subscribed to Plex Pass - */ - @JsonIgnore - public JsonNullable subscribedAt() { - return subscribedAt; - } - - /** - * String representation of subscriptionActive - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional status() { - return (Optional) status; - } - - /** - * Payment service used for your Plex Pass subscription - */ - @JsonIgnore - public JsonNullable paymentService() { - return paymentService; - } - - /** - * Name of Plex Pass subscription plan - */ - @JsonIgnore - public JsonNullable plan() { - return plan; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public PostUsersSignInDataAuthenticationSubscription withFeatures(List features) { - Utils.checkNotNull(features, "features"); - this.features = Optional.ofNullable(features); - return this; - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public PostUsersSignInDataAuthenticationSubscription withFeatures(Optional> features) { - Utils.checkNotNull(features, "features"); - this.features = features; - return this; - } - - /** - * If the account's Plex Pass subscription is active - */ - public PostUsersSignInDataAuthenticationSubscription withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - - /** - * If the account's Plex Pass subscription is active - */ - public PostUsersSignInDataAuthenticationSubscription withActive(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public PostUsersSignInDataAuthenticationSubscription withSubscribedAt(String subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = JsonNullable.of(subscribedAt); - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public PostUsersSignInDataAuthenticationSubscription withSubscribedAt(JsonNullable subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = subscribedAt; - return this; - } - - /** - * String representation of subscriptionActive - */ - public PostUsersSignInDataAuthenticationSubscription withStatus(PostUsersSignInDataAuthenticationResponseStatus status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - /** - * String representation of subscriptionActive - */ - public PostUsersSignInDataAuthenticationSubscription withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public PostUsersSignInDataAuthenticationSubscription withPaymentService(String paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = JsonNullable.of(paymentService); - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public PostUsersSignInDataAuthenticationSubscription withPaymentService(JsonNullable paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = paymentService; - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public PostUsersSignInDataAuthenticationSubscription withPlan(String plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = JsonNullable.of(plan); - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public PostUsersSignInDataAuthenticationSubscription withPlan(JsonNullable plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = plan; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataAuthenticationSubscription other = (PostUsersSignInDataAuthenticationSubscription) o; - return - Utils.enhancedDeepEquals(this.features, other.features) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.subscribedAt, other.subscribedAt) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.paymentService, other.paymentService) && - Utils.enhancedDeepEquals(this.plan, other.plan); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - features, active, subscribedAt, - status, paymentService, plan); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataAuthenticationSubscription.class, - "features", features, - "active", active, - "subscribedAt", subscribedAt, - "status", status, - "paymentService", paymentService, - "plan", plan); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> features = Optional.empty(); - - private Optional active = Optional.empty(); - - private JsonNullable subscribedAt = JsonNullable.undefined(); - - private Optional status = Optional.empty(); - - private JsonNullable paymentService = JsonNullable.undefined(); - - private JsonNullable plan = JsonNullable.undefined(); - - private Builder() { - // force use of static builder() method - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public Builder features(List features) { - Utils.checkNotNull(features, "features"); - this.features = Optional.ofNullable(features); - return this; - } - - /** - * List of features allowed on your Plex Pass subscription - */ - public Builder features(Optional> features) { - Utils.checkNotNull(features, "features"); - this.features = features; - return this; - } - - - /** - * If the account's Plex Pass subscription is active - */ - public Builder active(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - /** - * If the account's Plex Pass subscription is active - */ - public Builder active(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - - /** - * Date the account subscribed to Plex Pass - */ - public Builder subscribedAt(String subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = JsonNullable.of(subscribedAt); - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public Builder subscribedAt(JsonNullable subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = subscribedAt; - return this; - } - - - /** - * String representation of subscriptionActive - */ - public Builder status(PostUsersSignInDataAuthenticationResponseStatus status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - /** - * String representation of subscriptionActive - */ - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * Payment service used for your Plex Pass subscription - */ - public Builder paymentService(String paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = JsonNullable.of(paymentService); - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public Builder paymentService(JsonNullable paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = paymentService; - return this; - } - - - /** - * Name of Plex Pass subscription plan - */ - public Builder plan(String plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = JsonNullable.of(plan); - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public Builder plan(JsonNullable plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = plan; - return this; - } - - public PostUsersSignInDataAuthenticationSubscription build() { - - return new PostUsersSignInDataAuthenticationSubscription( - features, active, subscribedAt, - status, paymentService, plan); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAutoSelectSubtitle.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAutoSelectSubtitle.java deleted file mode 100644 index 587d2965..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataAutoSelectSubtitle.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * PostUsersSignInDataAutoSelectSubtitle - * - *

The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - */ -public enum PostUsersSignInDataAutoSelectSubtitle { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - PostUsersSignInDataAutoSelectSubtitle(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (PostUsersSignInDataAutoSelectSubtitle o: PostUsersSignInDataAutoSelectSubtitle.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.java deleted file mode 100644 index 7c166525..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * PostUsersSignInDataDefaultSubtitleAccessibility - * - *

The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles) - */ -public enum PostUsersSignInDataDefaultSubtitleAccessibility { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - PostUsersSignInDataDefaultSubtitleAccessibility(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (PostUsersSignInDataDefaultSubtitleAccessibility o: PostUsersSignInDataDefaultSubtitleAccessibility.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataDefaultSubtitleForced.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataDefaultSubtitleForced.java deleted file mode 100644 index d9476cbb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataDefaultSubtitleForced.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * PostUsersSignInDataDefaultSubtitleForced - * - *

The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) - */ -public enum PostUsersSignInDataDefaultSubtitleForced { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - PostUsersSignInDataDefaultSubtitleForced(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (PostUsersSignInDataDefaultSubtitleForced o: PostUsersSignInDataDefaultSubtitleForced.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataMailingListStatus.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataMailingListStatus.java deleted file mode 100644 index 21a926d5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataMailingListStatus.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

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

Whether or not the account has media reviews visibility enabled - */ -public enum PostUsersSignInDataMediaReviewsVisibility { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - PostUsersSignInDataMediaReviewsVisibility(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (PostUsersSignInDataMediaReviewsVisibility o: PostUsersSignInDataMediaReviewsVisibility.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java deleted file mode 100644 index 5d7f4017..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class PostUsersSignInDataRequest { - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") - private String clientID; - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") - private Optional clientName; - - /** - * A relatively friendly name for the client device - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") - private Optional deviceNickname; - - /** - * The version of the client application. - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") - private Optional clientVersion; - - /** - * The platform of the client application. - */ - @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") - private Optional platform; - - /** - * Login credentials - */ - @SpeakeasyMetadata("request:mediaType=application/x-www-form-urlencoded") - private Optional requestBody; - - @JsonCreator - public PostUsersSignInDataRequest( - String clientID, - Optional clientName, - Optional deviceNickname, - Optional clientVersion, - Optional platform, - Optional requestBody) { - Utils.checkNotNull(clientID, "clientID"); - Utils.checkNotNull(clientName, "clientName"); - Utils.checkNotNull(deviceNickname, "deviceNickname"); - Utils.checkNotNull(clientVersion, "clientVersion"); - Utils.checkNotNull(platform, "platform"); - Utils.checkNotNull(requestBody, "requestBody"); - this.clientID = clientID; - this.clientName = clientName; - this.deviceNickname = deviceNickname; - this.clientVersion = clientVersion; - this.platform = platform; - this.requestBody = requestBody; - } - - public PostUsersSignInDataRequest( - String clientID) { - this(clientID, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - @JsonIgnore - public String clientID() { - return clientID; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - @JsonIgnore - public Optional clientName() { - return clientName; - } - - /** - * A relatively friendly name for the client device - */ - @JsonIgnore - public Optional deviceNickname() { - return deviceNickname; - } - - /** - * The version of the client application. - */ - @JsonIgnore - public Optional clientVersion() { - return clientVersion; - } - - /** - * The platform of the client application. - */ - @JsonIgnore - public Optional platform() { - return platform; - } - - /** - * Login credentials - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional requestBody() { - return (Optional) requestBody; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public PostUsersSignInDataRequest withClientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public PostUsersSignInDataRequest withClientName(String clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = Optional.ofNullable(clientName); - return this; - } - - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public PostUsersSignInDataRequest withClientName(Optional clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = clientName; - return this; - } - - /** - * A relatively friendly name for the client device - */ - public PostUsersSignInDataRequest withDeviceNickname(String deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = Optional.ofNullable(deviceNickname); - return this; - } - - - /** - * A relatively friendly name for the client device - */ - public PostUsersSignInDataRequest withDeviceNickname(Optional deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = deviceNickname; - return this; - } - - /** - * The version of the client application. - */ - public PostUsersSignInDataRequest withClientVersion(String clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = Optional.ofNullable(clientVersion); - return this; - } - - - /** - * The version of the client application. - */ - public PostUsersSignInDataRequest withClientVersion(Optional clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = clientVersion; - return this; - } - - /** - * The platform of the client application. - */ - public PostUsersSignInDataRequest withPlatform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - - /** - * The platform of the client application. - */ - public PostUsersSignInDataRequest withPlatform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - 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 - Utils.enhancedDeepEquals(this.clientID, other.clientID) && - Utils.enhancedDeepEquals(this.clientName, other.clientName) && - Utils.enhancedDeepEquals(this.deviceNickname, other.deviceNickname) && - Utils.enhancedDeepEquals(this.clientVersion, other.clientVersion) && - Utils.enhancedDeepEquals(this.platform, other.platform) && - Utils.enhancedDeepEquals(this.requestBody, other.requestBody); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - clientID, clientName, deviceNickname, - clientVersion, platform, requestBody); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataRequest.class, - "clientID", clientID, - "clientName", clientName, - "deviceNickname", deviceNickname, - "clientVersion", clientVersion, - "platform", platform, - "requestBody", requestBody); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String clientID; - - private Optional clientName = Optional.empty(); - - private Optional deviceNickname = Optional.empty(); - - private Optional clientVersion = Optional.empty(); - - private Optional platform = Optional.empty(); - - private Optional requestBody = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * An opaque identifier unique to the client (UUID, serial number, or other unique device ID) - */ - public Builder clientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public Builder clientName(String clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = Optional.ofNullable(clientName); - return this; - } - - /** - * The name of the client application. (Plex Web, Plex Media Server, etc.) - */ - public Builder clientName(Optional clientName) { - Utils.checkNotNull(clientName, "clientName"); - this.clientName = clientName; - return this; - } - - - /** - * A relatively friendly name for the client device - */ - public Builder deviceNickname(String deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = Optional.ofNullable(deviceNickname); - return this; - } - - /** - * A relatively friendly name for the client device - */ - public Builder deviceNickname(Optional deviceNickname) { - Utils.checkNotNull(deviceNickname, "deviceNickname"); - this.deviceNickname = deviceNickname; - return this; - } - - - /** - * The version of the client application. - */ - public Builder clientVersion(String clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = Optional.ofNullable(clientVersion); - return this; - } - - /** - * The version of the client application. - */ - public Builder clientVersion(Optional clientVersion) { - Utils.checkNotNull(clientVersion, "clientVersion"); - this.clientVersion = clientVersion; - return this; - } - - - /** - * The platform of the client application. - */ - public Builder platform(String platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = Optional.ofNullable(platform); - return this; - } - - /** - * The platform of the client application. - */ - public Builder platform(Optional platform) { - Utils.checkNotNull(platform, "platform"); - this.platform = platform; - 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, deviceNickname, - clientVersion, platform, requestBody); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBody.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBody.java deleted file mode 100644 index 8b5ea1a4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBody.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - -/** - * PostUsersSignInDataRequestBody - * - *

Login credentials - */ -public class PostUsersSignInDataRequestBody { - - @SpeakeasyMetadata("form:name=login") - private String login; - - - @SpeakeasyMetadata("form:name=password") - private String password; - - - @SpeakeasyMetadata("form:name=rememberMe") - private Optional rememberMe; - - - @SpeakeasyMetadata("form:name=verificationCode") - private Optional verificationCode; - - @JsonCreator - public PostUsersSignInDataRequestBody( - String login, - String password, - Optional rememberMe, - Optional verificationCode) { - Utils.checkNotNull(login, "login"); - Utils.checkNotNull(password, "password"); - Utils.checkNotNull(rememberMe, "rememberMe"); - Utils.checkNotNull(verificationCode, "verificationCode"); - this.login = login; - this.password = password; - this.rememberMe = rememberMe; - this.verificationCode = verificationCode; - } - - public PostUsersSignInDataRequestBody( - String login, - String password) { - this(login, password, Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public String login() { - return login; - } - - @JsonIgnore - public String password() { - return password; - } - - @JsonIgnore - public Optional rememberMe() { - return rememberMe; - } - - @JsonIgnore - public Optional verificationCode() { - return verificationCode; - } - - public static Builder builder() { - return new Builder(); - } - - - public PostUsersSignInDataRequestBody withLogin(String login) { - Utils.checkNotNull(login, "login"); - this.login = login; - return this; - } - - public PostUsersSignInDataRequestBody withPassword(String password) { - Utils.checkNotNull(password, "password"); - this.password = password; - return this; - } - - public PostUsersSignInDataRequestBody withRememberMe(boolean rememberMe) { - Utils.checkNotNull(rememberMe, "rememberMe"); - this.rememberMe = Optional.ofNullable(rememberMe); - return this; - } - - - public PostUsersSignInDataRequestBody withRememberMe(Optional rememberMe) { - Utils.checkNotNull(rememberMe, "rememberMe"); - this.rememberMe = rememberMe; - return this; - } - - public PostUsersSignInDataRequestBody withVerificationCode(String verificationCode) { - Utils.checkNotNull(verificationCode, "verificationCode"); - this.verificationCode = Optional.ofNullable(verificationCode); - return this; - } - - - public PostUsersSignInDataRequestBody withVerificationCode(Optional verificationCode) { - Utils.checkNotNull(verificationCode, "verificationCode"); - this.verificationCode = verificationCode; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataRequestBody other = (PostUsersSignInDataRequestBody) o; - return - Utils.enhancedDeepEquals(this.login, other.login) && - Utils.enhancedDeepEquals(this.password, other.password) && - Utils.enhancedDeepEquals(this.rememberMe, other.rememberMe) && - Utils.enhancedDeepEquals(this.verificationCode, other.verificationCode); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - login, password, rememberMe, - verificationCode); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataRequestBody.class, - "login", login, - "password", password, - "rememberMe", rememberMe, - "verificationCode", verificationCode); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String login; - - private String password; - - private Optional rememberMe; - - private Optional verificationCode = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder login(String login) { - Utils.checkNotNull(login, "login"); - this.login = login; - return this; - } - - - public Builder password(String password) { - Utils.checkNotNull(password, "password"); - this.password = password; - return this; - } - - - public Builder rememberMe(boolean rememberMe) { - Utils.checkNotNull(rememberMe, "rememberMe"); - this.rememberMe = Optional.ofNullable(rememberMe); - return this; - } - - public Builder rememberMe(Optional rememberMe) { - Utils.checkNotNull(rememberMe, "rememberMe"); - this.rememberMe = rememberMe; - return this; - } - - - public Builder verificationCode(String verificationCode) { - Utils.checkNotNull(verificationCode, "verificationCode"); - this.verificationCode = Optional.ofNullable(verificationCode); - return this; - } - - public Builder verificationCode(Optional verificationCode) { - Utils.checkNotNull(verificationCode, "verificationCode"); - this.verificationCode = verificationCode; - return this; - } - - public PostUsersSignInDataRequestBody build() { - if (rememberMe == null) { - rememberMe = _SINGLETON_VALUE_RememberMe.value(); - } - - return new PostUsersSignInDataRequestBody( - login, password, rememberMe, - verificationCode); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_RememberMe = - new LazySingletonValue<>( - "rememberMe", - "false", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java deleted file mode 100644 index 2ad65bb5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.PostUsersSignInData; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; - -public class PostUsersSignInDataRequestBuilder { - - private PostUsersSignInDataRequest request; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public PostUsersSignInDataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public PostUsersSignInDataRequestBuilder request(PostUsersSignInDataRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public PostUsersSignInDataRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public PostUsersSignInDataRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public PostUsersSignInDataResponse call() throws Exception { - - RequestOperation operation - = new PostUsersSignInData.Sync(sdkConfiguration, serverURL); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataResponse.java deleted file mode 100644 index 11ea9b5c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataResponse.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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.Optional; - - -public class PostUsersSignInDataResponse 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; - - /** - * Returns the user account data with a valid auth token - */ - private Optional userPlexAccount; - - @JsonCreator - public PostUsersSignInDataResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional userPlexAccount) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.userPlexAccount = userPlexAccount; - } - - public PostUsersSignInDataResponse( - 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; - } - - /** - * Returns the user account data with a valid auth token - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional userPlexAccount() { - return (Optional) userPlexAccount; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public PostUsersSignInDataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public PostUsersSignInDataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostUsersSignInDataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Returns the user account data with a valid auth token - */ - public PostUsersSignInDataResponse withUserPlexAccount(PostUsersSignInDataUserPlexAccount userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = Optional.ofNullable(userPlexAccount); - return this; - } - - - /** - * Returns the user account data with a valid auth token - */ - public PostUsersSignInDataResponse withUserPlexAccount(Optional userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = userPlexAccount; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataResponse other = (PostUsersSignInDataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.userPlexAccount, other.userPlexAccount); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - userPlexAccount); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "userPlexAccount", userPlexAccount); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional userPlexAccount = 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; - } - - - /** - * Returns the user account data with a valid auth token - */ - public Builder userPlexAccount(PostUsersSignInDataUserPlexAccount userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = Optional.ofNullable(userPlexAccount); - return this; - } - - /** - * Returns the user account data with a valid auth token - */ - public Builder userPlexAccount(Optional userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = userPlexAccount; - return this; - } - - public PostUsersSignInDataResponse build() { - - return new PostUsersSignInDataResponse( - contentType, statusCode, rawResponse, - userPlexAccount); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataServices.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataServices.java deleted file mode 100644 index c20df565..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataServices.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class PostUsersSignInDataServices { - - @JsonProperty("identifier") - private String identifier; - - - @JsonProperty("endpoint") - private String endpoint; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("token") - private Optional token; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("secret") - private Optional secret; - - - @JsonProperty("status") - private PostUsersSignInDataStatus status; - - @JsonCreator - public PostUsersSignInDataServices( - @JsonProperty("identifier") String identifier, - @JsonProperty("endpoint") String endpoint, - @JsonProperty("token") Optional token, - @JsonProperty("secret") Optional secret, - @JsonProperty("status") PostUsersSignInDataStatus status) { - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(endpoint, "endpoint"); - Utils.checkNotNull(token, "token"); - Utils.checkNotNull(secret, "secret"); - Utils.checkNotNull(status, "status"); - this.identifier = identifier; - this.endpoint = endpoint; - this.token = token; - this.secret = secret; - this.status = status; - } - - public PostUsersSignInDataServices( - String identifier, - String endpoint, - PostUsersSignInDataStatus status) { - this(identifier, endpoint, Optional.empty(), - Optional.empty(), status); - } - - @JsonIgnore - public String identifier() { - return identifier; - } - - @JsonIgnore - public String endpoint() { - return endpoint; - } - - @JsonIgnore - public Optional token() { - return token; - } - - @JsonIgnore - public Optional secret() { - return secret; - } - - @JsonIgnore - public PostUsersSignInDataStatus status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public PostUsersSignInDataServices withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public PostUsersSignInDataServices withEndpoint(String endpoint) { - Utils.checkNotNull(endpoint, "endpoint"); - this.endpoint = endpoint; - return this; - } - - public PostUsersSignInDataServices withToken(String token) { - Utils.checkNotNull(token, "token"); - this.token = Optional.ofNullable(token); - return this; - } - - - public PostUsersSignInDataServices withToken(Optional token) { - Utils.checkNotNull(token, "token"); - this.token = token; - return this; - } - - public PostUsersSignInDataServices withSecret(String secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = Optional.ofNullable(secret); - return this; - } - - - public PostUsersSignInDataServices withSecret(Optional secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = secret; - return this; - } - - public PostUsersSignInDataServices withStatus(PostUsersSignInDataStatus status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataServices other = (PostUsersSignInDataServices) o; - return - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.endpoint, other.endpoint) && - Utils.enhancedDeepEquals(this.token, other.token) && - Utils.enhancedDeepEquals(this.secret, other.secret) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - identifier, endpoint, token, - secret, status); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataServices.class, - "identifier", identifier, - "endpoint", endpoint, - "token", token, - "secret", secret, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String identifier; - - private String endpoint; - - private Optional token = Optional.empty(); - - private Optional secret = Optional.empty(); - - private PostUsersSignInDataStatus status; - - private Builder() { - // force use of static builder() method - } - - - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - public Builder endpoint(String endpoint) { - Utils.checkNotNull(endpoint, "endpoint"); - this.endpoint = endpoint; - return this; - } - - - public Builder token(String token) { - Utils.checkNotNull(token, "token"); - this.token = Optional.ofNullable(token); - return this; - } - - public Builder token(Optional token) { - Utils.checkNotNull(token, "token"); - this.token = token; - return this; - } - - - public Builder secret(String secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = Optional.ofNullable(secret); - return this; - } - - public Builder secret(Optional secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = secret; - return this; - } - - - public Builder status(PostUsersSignInDataStatus status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public PostUsersSignInDataServices build() { - - return new PostUsersSignInDataServices( - identifier, endpoint, token, - secret, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataState.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataState.java deleted file mode 100644 index c71a69ad..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataState.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

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

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

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -@JsonDeserialize(using = PostUsersSignInDataStatus._Deserializer.class) -@JsonSerialize(using = PostUsersSignInDataStatus._Serializer.class) -public class PostUsersSignInDataStatus { - - public static final PostUsersSignInDataStatus ONLINE = new PostUsersSignInDataStatus("online"); - public static final PostUsersSignInDataStatus OFFLINE = new PostUsersSignInDataStatus("offline"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private PostUsersSignInDataStatus(String value) { - this.value = value; - } - - /** - * Returns a PostUsersSignInDataStatus with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as PostUsersSignInDataStatus - */ - public static PostUsersSignInDataStatus of(String value) { - synchronized (PostUsersSignInDataStatus.class) { - return values.computeIfAbsent(value, v -> new PostUsersSignInDataStatus(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - PostUsersSignInDataStatus other = (PostUsersSignInDataStatus) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "PostUsersSignInDataStatus [value=" + value + "]"; - } - - // return an array just like an enum - public static PostUsersSignInDataStatus[] values() { - synchronized (PostUsersSignInDataStatus.class) { - return values.values().toArray(new PostUsersSignInDataStatus[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("online", ONLINE); - map.put("offline", OFFLINE); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("online", PostUsersSignInDataStatusEnum.ONLINE); - map.put("offline", PostUsersSignInDataStatusEnum.OFFLINE); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(PostUsersSignInDataStatus.class); - } - - @Override - public void serialize(PostUsersSignInDataStatus value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(PostUsersSignInDataStatus.class); - } - - @Override - public PostUsersSignInDataStatus deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return PostUsersSignInDataStatus.of(v); - } - } - - public enum PostUsersSignInDataStatusEnum { - - ONLINE("online"), - OFFLINE("offline"),; - - private final String value; - - private PostUsersSignInDataStatusEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataSubscription.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataSubscription.java deleted file mode 100644 index 12193d35..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataSubscription.java +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * PostUsersSignInDataSubscription - * - *

If the account’s Plex Pass subscription is active - */ -public class PostUsersSignInDataSubscription { - /** - * List of features allowed on your Plex Pass subscription - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("features") - private Optional> features; - - /** - * If the account's Plex Pass subscription is active - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("active") - private Optional active; - - /** - * Date the account subscribed to Plex Pass - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subscribedAt") - private JsonNullable subscribedAt; - - /** - * String representation of subscriptionActive - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - /** - * Payment service used for your Plex Pass subscription - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("paymentService") - private JsonNullable paymentService; - - /** - * Name of Plex Pass subscription plan - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("plan") - private JsonNullable plan; - - @JsonCreator - public PostUsersSignInDataSubscription( - @JsonProperty("features") Optional> features, - @JsonProperty("active") Optional active, - @JsonProperty("subscribedAt") JsonNullable subscribedAt, - @JsonProperty("status") Optional status, - @JsonProperty("paymentService") JsonNullable paymentService, - @JsonProperty("plan") JsonNullable plan) { - Utils.checkNotNull(features, "features"); - Utils.checkNotNull(active, "active"); - Utils.checkNotNull(subscribedAt, "subscribedAt"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(paymentService, "paymentService"); - Utils.checkNotNull(plan, "plan"); - this.features = features; - this.active = active; - this.subscribedAt = subscribedAt; - this.status = status; - this.paymentService = paymentService; - this.plan = plan; - } - - public PostUsersSignInDataSubscription() { - this(Optional.empty(), Optional.empty(), JsonNullable.undefined(), - Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); - } - - /** - * List of features allowed on your Plex Pass subscription - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> features() { - return (Optional>) features; - } - - /** - * If the account's Plex Pass subscription is active - */ - @JsonIgnore - public Optional active() { - return active; - } - - /** - * Date the account subscribed to Plex Pass - */ - @JsonIgnore - public JsonNullable subscribedAt() { - return subscribedAt; - } - - /** - * String representation of subscriptionActive - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional status() { - return (Optional) status; - } - - /** - * Payment service used for your Plex Pass subscription - */ - @JsonIgnore - public JsonNullable paymentService() { - return paymentService; - } - - /** - * Name of Plex Pass subscription plan - */ - @JsonIgnore - public JsonNullable plan() { - return plan; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public PostUsersSignInDataSubscription withFeatures(List features) { - Utils.checkNotNull(features, "features"); - this.features = Optional.ofNullable(features); - return this; - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public PostUsersSignInDataSubscription withFeatures(Optional> features) { - Utils.checkNotNull(features, "features"); - this.features = features; - return this; - } - - /** - * If the account's Plex Pass subscription is active - */ - public PostUsersSignInDataSubscription withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - - /** - * If the account's Plex Pass subscription is active - */ - public PostUsersSignInDataSubscription withActive(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public PostUsersSignInDataSubscription withSubscribedAt(String subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = JsonNullable.of(subscribedAt); - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public PostUsersSignInDataSubscription withSubscribedAt(JsonNullable subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = subscribedAt; - return this; - } - - /** - * String representation of subscriptionActive - */ - public PostUsersSignInDataSubscription withStatus(PostUsersSignInDataAuthenticationStatus status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - /** - * String representation of subscriptionActive - */ - public PostUsersSignInDataSubscription withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public PostUsersSignInDataSubscription withPaymentService(String paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = JsonNullable.of(paymentService); - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public PostUsersSignInDataSubscription withPaymentService(JsonNullable paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = paymentService; - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public PostUsersSignInDataSubscription withPlan(String plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = JsonNullable.of(plan); - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public PostUsersSignInDataSubscription withPlan(JsonNullable plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = plan; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataSubscription other = (PostUsersSignInDataSubscription) o; - return - Utils.enhancedDeepEquals(this.features, other.features) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.subscribedAt, other.subscribedAt) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.paymentService, other.paymentService) && - Utils.enhancedDeepEquals(this.plan, other.plan); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - features, active, subscribedAt, - status, paymentService, plan); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataSubscription.class, - "features", features, - "active", active, - "subscribedAt", subscribedAt, - "status", status, - "paymentService", paymentService, - "plan", plan); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> features = Optional.empty(); - - private Optional active = Optional.empty(); - - private JsonNullable subscribedAt = JsonNullable.undefined(); - - private Optional status = Optional.empty(); - - private JsonNullable paymentService = JsonNullable.undefined(); - - private JsonNullable plan = JsonNullable.undefined(); - - private Builder() { - // force use of static builder() method - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public Builder features(List features) { - Utils.checkNotNull(features, "features"); - this.features = Optional.ofNullable(features); - return this; - } - - /** - * List of features allowed on your Plex Pass subscription - */ - public Builder features(Optional> features) { - Utils.checkNotNull(features, "features"); - this.features = features; - return this; - } - - - /** - * If the account's Plex Pass subscription is active - */ - public Builder active(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - /** - * If the account's Plex Pass subscription is active - */ - public Builder active(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - - /** - * Date the account subscribed to Plex Pass - */ - public Builder subscribedAt(String subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = JsonNullable.of(subscribedAt); - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public Builder subscribedAt(JsonNullable subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = subscribedAt; - return this; - } - - - /** - * String representation of subscriptionActive - */ - public Builder status(PostUsersSignInDataAuthenticationStatus status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - /** - * String representation of subscriptionActive - */ - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * Payment service used for your Plex Pass subscription - */ - public Builder paymentService(String paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = JsonNullable.of(paymentService); - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public Builder paymentService(JsonNullable paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = paymentService; - return this; - } - - - /** - * Name of Plex Pass subscription plan - */ - public Builder plan(String plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = JsonNullable.of(plan); - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public Builder plan(JsonNullable plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = plan; - return this; - } - - public PostUsersSignInDataSubscription build() { - - return new PostUsersSignInDataSubscription( - features, active, subscribedAt, - status, paymentService, plan); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserPlexAccount.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserPlexAccount.java deleted file mode 100644 index a4e286f1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserPlexAccount.java +++ /dev/null @@ -1,2329 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Deprecated; -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.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * PostUsersSignInDataUserPlexAccount - * - *

Returns the user account data with a valid auth token - */ -public class PostUsersSignInDataUserPlexAccount { - /** - * Unknown - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("adsConsent") - private Optional adsConsent; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("adsConsentReminderAt") - private Optional adsConsentReminderAt; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("adsConsentSetAt") - private Optional adsConsentSetAt; - - /** - * Unknown - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("anonymous") - private JsonNullable anonymous; - - /** - * The account token - */ - @JsonProperty("authToken") - private String authToken; - - /** - * If the two-factor authentication backup codes have been created - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("backupCodesCreated") - private Optional backupCodesCreated; - - /** - * If the account has been confirmed - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("confirmed") - private Optional confirmed; - - /** - * The account country - */ - @JsonProperty("country") - private String country; - - /** - * The account email address - */ - @JsonProperty("email") - private String email; - - /** - * If login with email only is enabled - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("emailOnlyAuth") - private Optional emailOnlyAuth; - - /** - * If experimental features are enabled - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("experimentalFeatures") - private Optional experimentalFeatures; - - /** - * Your account full name - */ - @JsonProperty("friendlyName") - private String friendlyName; - - /** - * List of devices your allowed to use with this account - */ - @JsonProperty("entitlements") - private List entitlements; - - /** - * If the account is a Plex Home guest user - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("guest") - private Optional guest; - - /** - * If the account has a password - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasPassword") - private Optional hasPassword; - - /** - * If the account is a Plex Home user - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("home") - private Optional home; - - /** - * If the account is the Plex Home admin - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("homeAdmin") - private Optional homeAdmin; - - /** - * The number of accounts in the Plex Home - */ - @JsonProperty("homeSize") - private int homeSize; - - /** - * The Plex account ID - */ - @JsonProperty("id") - private int id; - - /** - * Unix epoch datetime in seconds - */ - @JsonProperty("joinedAt") - private long joinedAt; - - /** - * The account locale - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("locale") - private Optional locale; - - /** - * If you are subscribed to the Plex newsletter - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mailingListActive") - private Optional mailingListActive; - - /** - * Your current mailing list status (active or unsubscribed) - */ - @JsonProperty("mailingListStatus") - private PostUsersSignInDataMailingListStatus mailingListStatus; - - /** - * The maximum number of accounts allowed in the Plex Home - */ - @JsonProperty("maxHomeSize") - private int maxHomeSize; - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("pin") - @Deprecated - private Optional pin; - - - @JsonProperty("profile") - private PostUsersSignInDataUserProfile profile; - - /** - * If the account has a Plex Home PIN enabled - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("protected") - private Optional protected_; - - /** - * Unix epoch datetime in seconds - */ - @JsonProperty("rememberExpiresAt") - private long rememberExpiresAt; - - /** - * If the account is a Plex Home managed user - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("restricted") - private Optional restricted; - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("roles") - private Optional> roles; - - /** - * Unknown - */ - @JsonProperty("scrobbleTypes") - private String scrobbleTypes; - - - @JsonProperty("services") - private List services; - - /** - * If the account’s Plex Pass subscription is active - */ - @JsonProperty("subscription") - private PostUsersSignInDataSubscription subscription; - - /** - * Description of the Plex Pass subscription - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("subscriptionDescription") - private Optional subscriptionDescription; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subscriptions") - private Optional> subscriptions; - - /** - * URL of the account thumbnail - */ - @JsonProperty("thumb") - private String thumb; - - /** - * The title of the account (username or friendly name) - */ - @JsonProperty("title") - private String title; - - /** - * If two-factor authentication is enabled - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("twoFactorEnabled") - private Optional twoFactorEnabled; - - /** - * The account username - */ - @JsonProperty("username") - private String username; - - /** - * The account UUID - */ - @JsonProperty("uuid") - private String uuid; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("attributionPartner") - private Optional attributionPartner; - - - @JsonProperty("pastSubscriptions") - private List pastSubscriptions; - - - @JsonProperty("trials") - private List trials; - - @JsonCreator - public PostUsersSignInDataUserPlexAccount( - @JsonProperty("adsConsent") Optional adsConsent, - @JsonProperty("adsConsentReminderAt") Optional adsConsentReminderAt, - @JsonProperty("adsConsentSetAt") Optional adsConsentSetAt, - @JsonProperty("anonymous") JsonNullable anonymous, - @JsonProperty("authToken") String authToken, - @JsonProperty("backupCodesCreated") Optional backupCodesCreated, - @JsonProperty("confirmed") Optional confirmed, - @JsonProperty("country") String country, - @JsonProperty("email") String email, - @JsonProperty("emailOnlyAuth") Optional emailOnlyAuth, - @JsonProperty("experimentalFeatures") Optional experimentalFeatures, - @JsonProperty("friendlyName") String friendlyName, - @JsonProperty("entitlements") List entitlements, - @JsonProperty("guest") Optional guest, - @JsonProperty("hasPassword") Optional hasPassword, - @JsonProperty("home") Optional home, - @JsonProperty("homeAdmin") Optional homeAdmin, - @JsonProperty("homeSize") int homeSize, - @JsonProperty("id") int id, - @JsonProperty("joinedAt") long joinedAt, - @JsonProperty("locale") Optional locale, - @JsonProperty("mailingListActive") Optional mailingListActive, - @JsonProperty("mailingListStatus") PostUsersSignInDataMailingListStatus mailingListStatus, - @JsonProperty("maxHomeSize") int maxHomeSize, - @JsonProperty("pin") Optional pin, - @JsonProperty("profile") PostUsersSignInDataUserProfile profile, - @JsonProperty("protected") Optional protected_, - @JsonProperty("rememberExpiresAt") long rememberExpiresAt, - @JsonProperty("restricted") Optional restricted, - @JsonProperty("roles") Optional> roles, - @JsonProperty("scrobbleTypes") String scrobbleTypes, - @JsonProperty("services") List services, - @JsonProperty("subscription") PostUsersSignInDataSubscription subscription, - @JsonProperty("subscriptionDescription") Optional subscriptionDescription, - @JsonProperty("subscriptions") Optional> subscriptions, - @JsonProperty("thumb") String thumb, - @JsonProperty("title") String title, - @JsonProperty("twoFactorEnabled") Optional twoFactorEnabled, - @JsonProperty("username") String username, - @JsonProperty("uuid") String uuid, - @JsonProperty("attributionPartner") Optional attributionPartner, - @JsonProperty("pastSubscriptions") List pastSubscriptions, - @JsonProperty("trials") List trials) { - Utils.checkNotNull(adsConsent, "adsConsent"); - Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); - Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); - Utils.checkNotNull(anonymous, "anonymous"); - Utils.checkNotNull(authToken, "authToken"); - Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); - Utils.checkNotNull(confirmed, "confirmed"); - Utils.checkNotNull(country, "country"); - Utils.checkNotNull(email, "email"); - Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); - Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); - Utils.checkNotNull(friendlyName, "friendlyName"); - Utils.checkNotNull(entitlements, "entitlements"); - Utils.checkNotNull(guest, "guest"); - Utils.checkNotNull(hasPassword, "hasPassword"); - Utils.checkNotNull(home, "home"); - Utils.checkNotNull(homeAdmin, "homeAdmin"); - Utils.checkNotNull(homeSize, "homeSize"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(joinedAt, "joinedAt"); - Utils.checkNotNull(locale, "locale"); - Utils.checkNotNull(mailingListActive, "mailingListActive"); - Utils.checkNotNull(mailingListStatus, "mailingListStatus"); - Utils.checkNotNull(maxHomeSize, "maxHomeSize"); - Utils.checkNotNull(pin, "pin"); - Utils.checkNotNull(profile, "profile"); - Utils.checkNotNull(protected_, "protected_"); - Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt"); - Utils.checkNotNull(restricted, "restricted"); - Utils.checkNotNull(roles, "roles"); - Utils.checkNotNull(scrobbleTypes, "scrobbleTypes"); - Utils.checkNotNull(services, "services"); - Utils.checkNotNull(subscription, "subscription"); - Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); - Utils.checkNotNull(subscriptions, "subscriptions"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); - Utils.checkNotNull(username, "username"); - Utils.checkNotNull(uuid, "uuid"); - Utils.checkNotNull(attributionPartner, "attributionPartner"); - Utils.checkNotNull(pastSubscriptions, "pastSubscriptions"); - Utils.checkNotNull(trials, "trials"); - this.adsConsent = adsConsent; - this.adsConsentReminderAt = adsConsentReminderAt; - this.adsConsentSetAt = adsConsentSetAt; - this.anonymous = anonymous; - this.authToken = authToken; - this.backupCodesCreated = backupCodesCreated; - this.confirmed = confirmed; - this.country = country; - this.email = email; - this.emailOnlyAuth = emailOnlyAuth; - this.experimentalFeatures = experimentalFeatures; - this.friendlyName = friendlyName; - this.entitlements = entitlements; - this.guest = guest; - this.hasPassword = hasPassword; - this.home = home; - this.homeAdmin = homeAdmin; - this.homeSize = homeSize; - this.id = id; - this.joinedAt = joinedAt; - this.locale = locale; - this.mailingListActive = mailingListActive; - this.mailingListStatus = mailingListStatus; - this.maxHomeSize = maxHomeSize; - this.pin = pin; - this.profile = profile; - this.protected_ = protected_; - this.rememberExpiresAt = rememberExpiresAt; - this.restricted = restricted; - this.roles = roles; - this.scrobbleTypes = scrobbleTypes; - this.services = services; - this.subscription = subscription; - this.subscriptionDescription = subscriptionDescription; - this.subscriptions = subscriptions; - this.thumb = thumb; - this.title = title; - this.twoFactorEnabled = twoFactorEnabled; - this.username = username; - this.uuid = uuid; - this.attributionPartner = attributionPartner; - this.pastSubscriptions = pastSubscriptions; - this.trials = trials; - } - - public PostUsersSignInDataUserPlexAccount( - String authToken, - String country, - String email, - String friendlyName, - List entitlements, - int homeSize, - int id, - long joinedAt, - PostUsersSignInDataMailingListStatus mailingListStatus, - int maxHomeSize, - PostUsersSignInDataUserProfile profile, - long rememberExpiresAt, - String scrobbleTypes, - List services, - PostUsersSignInDataSubscription subscription, - String thumb, - String title, - String username, - String uuid, - List pastSubscriptions, - List trials) { - this(Optional.empty(), Optional.empty(), Optional.empty(), - JsonNullable.undefined(), authToken, Optional.empty(), - Optional.empty(), country, email, - Optional.empty(), Optional.empty(), friendlyName, - entitlements, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), homeSize, - id, joinedAt, Optional.empty(), - Optional.empty(), mailingListStatus, maxHomeSize, - Optional.empty(), profile, Optional.empty(), - rememberExpiresAt, Optional.empty(), Optional.empty(), - scrobbleTypes, services, subscription, - Optional.empty(), Optional.empty(), thumb, - title, Optional.empty(), username, - uuid, Optional.empty(), pastSubscriptions, - trials); - } - - /** - * Unknown - */ - @JsonIgnore - public Optional adsConsent() { - return adsConsent; - } - - @JsonIgnore - public Optional adsConsentReminderAt() { - return adsConsentReminderAt; - } - - @JsonIgnore - public Optional adsConsentSetAt() { - return adsConsentSetAt; - } - - /** - * Unknown - */ - @JsonIgnore - public JsonNullable anonymous() { - return anonymous; - } - - /** - * The account token - */ - @JsonIgnore - public String authToken() { - return authToken; - } - - /** - * If the two-factor authentication backup codes have been created - */ - @JsonIgnore - public Optional backupCodesCreated() { - return backupCodesCreated; - } - - /** - * If the account has been confirmed - */ - @JsonIgnore - public Optional confirmed() { - return confirmed; - } - - /** - * The account country - */ - @JsonIgnore - public String country() { - return country; - } - - /** - * The account email address - */ - @JsonIgnore - public String email() { - return email; - } - - /** - * If login with email only is enabled - */ - @JsonIgnore - public Optional emailOnlyAuth() { - return emailOnlyAuth; - } - - /** - * If experimental features are enabled - */ - @JsonIgnore - public Optional experimentalFeatures() { - return experimentalFeatures; - } - - /** - * Your account full name - */ - @JsonIgnore - public String friendlyName() { - return friendlyName; - } - - /** - * List of devices your allowed to use with this account - */ - @JsonIgnore - public List entitlements() { - return entitlements; - } - - /** - * If the account is a Plex Home guest user - */ - @JsonIgnore - public Optional guest() { - return guest; - } - - /** - * If the account has a password - */ - @JsonIgnore - public Optional hasPassword() { - return hasPassword; - } - - /** - * If the account is a Plex Home user - */ - @JsonIgnore - public Optional home() { - return home; - } - - /** - * If the account is the Plex Home admin - */ - @JsonIgnore - public Optional homeAdmin() { - return homeAdmin; - } - - /** - * The number of accounts in the Plex Home - */ - @JsonIgnore - public int homeSize() { - return homeSize; - } - - /** - * The Plex account ID - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public long joinedAt() { - return joinedAt; - } - - /** - * The account locale - */ - @JsonIgnore - public Optional locale() { - return locale; - } - - /** - * If you are subscribed to the Plex newsletter - */ - @JsonIgnore - public Optional mailingListActive() { - return mailingListActive; - } - - /** - * Your current mailing list status (active or unsubscribed) - */ - @JsonIgnore - public PostUsersSignInDataMailingListStatus mailingListStatus() { - return mailingListStatus; - } - - /** - * The maximum number of accounts allowed in the Plex Home - */ - @JsonIgnore - public int maxHomeSize() { - return maxHomeSize; - } - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - @JsonIgnore - public Optional pin() { - return pin; - } - - @JsonIgnore - public PostUsersSignInDataUserProfile profile() { - return profile; - } - - /** - * If the account has a Plex Home PIN enabled - */ - @JsonIgnore - public Optional protected_() { - return protected_; - } - - /** - * Unix epoch datetime in seconds - */ - @JsonIgnore - public long rememberExpiresAt() { - return rememberExpiresAt; - } - - /** - * If the account is a Plex Home managed user - */ - @JsonIgnore - public Optional restricted() { - return restricted; - } - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> roles() { - return (Optional>) roles; - } - - /** - * Unknown - */ - @JsonIgnore - public String scrobbleTypes() { - return scrobbleTypes; - } - - @JsonIgnore - public List services() { - return services; - } - - /** - * If the account’s Plex Pass subscription is active - */ - @JsonIgnore - public PostUsersSignInDataSubscription subscription() { - return subscription; - } - - /** - * Description of the Plex Pass subscription - */ - @JsonIgnore - public Optional subscriptionDescription() { - return subscriptionDescription; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> subscriptions() { - return (Optional>) subscriptions; - } - - /** - * URL of the account thumbnail - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - /** - * The title of the account (username or friendly name) - */ - @JsonIgnore - public String title() { - return title; - } - - /** - * If two-factor authentication is enabled - */ - @JsonIgnore - public Optional twoFactorEnabled() { - return twoFactorEnabled; - } - - /** - * The account username - */ - @JsonIgnore - public String username() { - return username; - } - - /** - * The account UUID - */ - @JsonIgnore - public String uuid() { - return uuid; - } - - @JsonIgnore - public Optional attributionPartner() { - return attributionPartner; - } - - @JsonIgnore - public List pastSubscriptions() { - return pastSubscriptions; - } - - @JsonIgnore - public List trials() { - return trials; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unknown - */ - public PostUsersSignInDataUserPlexAccount withAdsConsent(boolean adsConsent) { - Utils.checkNotNull(adsConsent, "adsConsent"); - this.adsConsent = Optional.ofNullable(adsConsent); - return this; - } - - - /** - * Unknown - */ - public PostUsersSignInDataUserPlexAccount withAdsConsent(Optional adsConsent) { - Utils.checkNotNull(adsConsent, "adsConsent"); - this.adsConsent = adsConsent; - return this; - } - - public PostUsersSignInDataUserPlexAccount withAdsConsentReminderAt(long adsConsentReminderAt) { - Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); - this.adsConsentReminderAt = Optional.ofNullable(adsConsentReminderAt); - return this; - } - - - public PostUsersSignInDataUserPlexAccount withAdsConsentReminderAt(Optional adsConsentReminderAt) { - Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); - this.adsConsentReminderAt = adsConsentReminderAt; - return this; - } - - public PostUsersSignInDataUserPlexAccount withAdsConsentSetAt(long adsConsentSetAt) { - Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); - this.adsConsentSetAt = Optional.ofNullable(adsConsentSetAt); - return this; - } - - - public PostUsersSignInDataUserPlexAccount withAdsConsentSetAt(Optional adsConsentSetAt) { - Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); - this.adsConsentSetAt = adsConsentSetAt; - return this; - } - - /** - * Unknown - */ - public PostUsersSignInDataUserPlexAccount withAnonymous(boolean anonymous) { - Utils.checkNotNull(anonymous, "anonymous"); - this.anonymous = JsonNullable.of(anonymous); - return this; - } - - /** - * Unknown - */ - public PostUsersSignInDataUserPlexAccount withAnonymous(JsonNullable anonymous) { - Utils.checkNotNull(anonymous, "anonymous"); - this.anonymous = anonymous; - return this; - } - - /** - * The account token - */ - public PostUsersSignInDataUserPlexAccount withAuthToken(String authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = authToken; - return this; - } - - /** - * If the two-factor authentication backup codes have been created - */ - public PostUsersSignInDataUserPlexAccount withBackupCodesCreated(boolean backupCodesCreated) { - Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); - this.backupCodesCreated = Optional.ofNullable(backupCodesCreated); - return this; - } - - - /** - * If the two-factor authentication backup codes have been created - */ - public PostUsersSignInDataUserPlexAccount withBackupCodesCreated(Optional backupCodesCreated) { - Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); - this.backupCodesCreated = backupCodesCreated; - return this; - } - - /** - * If the account has been confirmed - */ - public PostUsersSignInDataUserPlexAccount withConfirmed(boolean confirmed) { - Utils.checkNotNull(confirmed, "confirmed"); - this.confirmed = Optional.ofNullable(confirmed); - return this; - } - - - /** - * If the account has been confirmed - */ - public PostUsersSignInDataUserPlexAccount withConfirmed(Optional confirmed) { - Utils.checkNotNull(confirmed, "confirmed"); - this.confirmed = confirmed; - return this; - } - - /** - * The account country - */ - public PostUsersSignInDataUserPlexAccount withCountry(String country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - /** - * The account email address - */ - public PostUsersSignInDataUserPlexAccount withEmail(String email) { - Utils.checkNotNull(email, "email"); - this.email = email; - return this; - } - - /** - * If login with email only is enabled - */ - public PostUsersSignInDataUserPlexAccount withEmailOnlyAuth(boolean emailOnlyAuth) { - Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); - this.emailOnlyAuth = Optional.ofNullable(emailOnlyAuth); - return this; - } - - - /** - * If login with email only is enabled - */ - public PostUsersSignInDataUserPlexAccount withEmailOnlyAuth(Optional emailOnlyAuth) { - Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); - this.emailOnlyAuth = emailOnlyAuth; - return this; - } - - /** - * If experimental features are enabled - */ - public PostUsersSignInDataUserPlexAccount withExperimentalFeatures(boolean experimentalFeatures) { - Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); - this.experimentalFeatures = Optional.ofNullable(experimentalFeatures); - return this; - } - - - /** - * If experimental features are enabled - */ - public PostUsersSignInDataUserPlexAccount withExperimentalFeatures(Optional experimentalFeatures) { - Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); - this.experimentalFeatures = experimentalFeatures; - return this; - } - - /** - * Your account full name - */ - public PostUsersSignInDataUserPlexAccount withFriendlyName(String friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = friendlyName; - return this; - } - - /** - * List of devices your allowed to use with this account - */ - public PostUsersSignInDataUserPlexAccount withEntitlements(List entitlements) { - Utils.checkNotNull(entitlements, "entitlements"); - this.entitlements = entitlements; - return this; - } - - /** - * If the account is a Plex Home guest user - */ - public PostUsersSignInDataUserPlexAccount withGuest(boolean guest) { - Utils.checkNotNull(guest, "guest"); - this.guest = Optional.ofNullable(guest); - return this; - } - - - /** - * If the account is a Plex Home guest user - */ - public PostUsersSignInDataUserPlexAccount withGuest(Optional guest) { - Utils.checkNotNull(guest, "guest"); - this.guest = guest; - return this; - } - - /** - * If the account has a password - */ - public PostUsersSignInDataUserPlexAccount withHasPassword(boolean hasPassword) { - Utils.checkNotNull(hasPassword, "hasPassword"); - this.hasPassword = Optional.ofNullable(hasPassword); - return this; - } - - - /** - * If the account has a password - */ - public PostUsersSignInDataUserPlexAccount withHasPassword(Optional hasPassword) { - Utils.checkNotNull(hasPassword, "hasPassword"); - this.hasPassword = hasPassword; - return this; - } - - /** - * If the account is a Plex Home user - */ - public PostUsersSignInDataUserPlexAccount withHome(boolean home) { - Utils.checkNotNull(home, "home"); - this.home = Optional.ofNullable(home); - return this; - } - - - /** - * If the account is a Plex Home user - */ - public PostUsersSignInDataUserPlexAccount withHome(Optional home) { - Utils.checkNotNull(home, "home"); - this.home = home; - return this; - } - - /** - * If the account is the Plex Home admin - */ - public PostUsersSignInDataUserPlexAccount withHomeAdmin(boolean homeAdmin) { - Utils.checkNotNull(homeAdmin, "homeAdmin"); - this.homeAdmin = Optional.ofNullable(homeAdmin); - return this; - } - - - /** - * If the account is the Plex Home admin - */ - public PostUsersSignInDataUserPlexAccount withHomeAdmin(Optional homeAdmin) { - Utils.checkNotNull(homeAdmin, "homeAdmin"); - this.homeAdmin = homeAdmin; - return this; - } - - /** - * The number of accounts in the Plex Home - */ - public PostUsersSignInDataUserPlexAccount withHomeSize(int homeSize) { - Utils.checkNotNull(homeSize, "homeSize"); - this.homeSize = homeSize; - return this; - } - - /** - * The Plex account ID - */ - public PostUsersSignInDataUserPlexAccount withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public PostUsersSignInDataUserPlexAccount withJoinedAt(long joinedAt) { - Utils.checkNotNull(joinedAt, "joinedAt"); - this.joinedAt = joinedAt; - return this; - } - - /** - * The account locale - */ - public PostUsersSignInDataUserPlexAccount withLocale(String locale) { - Utils.checkNotNull(locale, "locale"); - this.locale = Optional.ofNullable(locale); - return this; - } - - - /** - * The account locale - */ - public PostUsersSignInDataUserPlexAccount withLocale(Optional locale) { - Utils.checkNotNull(locale, "locale"); - this.locale = locale; - return this; - } - - /** - * If you are subscribed to the Plex newsletter - */ - public PostUsersSignInDataUserPlexAccount withMailingListActive(boolean mailingListActive) { - Utils.checkNotNull(mailingListActive, "mailingListActive"); - this.mailingListActive = Optional.ofNullable(mailingListActive); - return this; - } - - - /** - * If you are subscribed to the Plex newsletter - */ - public PostUsersSignInDataUserPlexAccount withMailingListActive(Optional mailingListActive) { - Utils.checkNotNull(mailingListActive, "mailingListActive"); - this.mailingListActive = mailingListActive; - return this; - } - - /** - * Your current mailing list status (active or unsubscribed) - */ - public PostUsersSignInDataUserPlexAccount withMailingListStatus(PostUsersSignInDataMailingListStatus mailingListStatus) { - Utils.checkNotNull(mailingListStatus, "mailingListStatus"); - this.mailingListStatus = mailingListStatus; - return this; - } - - /** - * The maximum number of accounts allowed in the Plex Home - */ - public PostUsersSignInDataUserPlexAccount withMaxHomeSize(int maxHomeSize) { - Utils.checkNotNull(maxHomeSize, "maxHomeSize"); - this.maxHomeSize = maxHomeSize; - return this; - } - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public PostUsersSignInDataUserPlexAccount withPin(String pin) { - Utils.checkNotNull(pin, "pin"); - this.pin = Optional.ofNullable(pin); - return this; - } - - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public PostUsersSignInDataUserPlexAccount withPin(Optional pin) { - Utils.checkNotNull(pin, "pin"); - this.pin = pin; - return this; - } - - public PostUsersSignInDataUserPlexAccount withProfile(PostUsersSignInDataUserProfile profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - /** - * If the account has a Plex Home PIN enabled - */ - public PostUsersSignInDataUserPlexAccount withProtected(boolean protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = Optional.ofNullable(protected_); - return this; - } - - - /** - * If the account has a Plex Home PIN enabled - */ - public PostUsersSignInDataUserPlexAccount withProtected(Optional protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = protected_; - return this; - } - - /** - * Unix epoch datetime in seconds - */ - public PostUsersSignInDataUserPlexAccount withRememberExpiresAt(long rememberExpiresAt) { - Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt"); - this.rememberExpiresAt = rememberExpiresAt; - return this; - } - - /** - * If the account is a Plex Home managed user - */ - public PostUsersSignInDataUserPlexAccount withRestricted(boolean restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = Optional.ofNullable(restricted); - return this; - } - - - /** - * If the account is a Plex Home managed user - */ - public PostUsersSignInDataUserPlexAccount withRestricted(Optional restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = restricted; - return this; - } - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - public PostUsersSignInDataUserPlexAccount withRoles(List roles) { - Utils.checkNotNull(roles, "roles"); - this.roles = Optional.ofNullable(roles); - return this; - } - - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - public PostUsersSignInDataUserPlexAccount withRoles(Optional> roles) { - Utils.checkNotNull(roles, "roles"); - this.roles = roles; - return this; - } - - /** - * Unknown - */ - public PostUsersSignInDataUserPlexAccount withScrobbleTypes(String scrobbleTypes) { - Utils.checkNotNull(scrobbleTypes, "scrobbleTypes"); - this.scrobbleTypes = scrobbleTypes; - return this; - } - - public PostUsersSignInDataUserPlexAccount withServices(List services) { - Utils.checkNotNull(services, "services"); - this.services = services; - return this; - } - - /** - * If the account’s Plex Pass subscription is active - */ - public PostUsersSignInDataUserPlexAccount withSubscription(PostUsersSignInDataSubscription subscription) { - Utils.checkNotNull(subscription, "subscription"); - this.subscription = subscription; - return this; - } - - /** - * Description of the Plex Pass subscription - */ - public PostUsersSignInDataUserPlexAccount withSubscriptionDescription(String subscriptionDescription) { - Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); - this.subscriptionDescription = Optional.ofNullable(subscriptionDescription); - return this; - } - - - /** - * Description of the Plex Pass subscription - */ - public PostUsersSignInDataUserPlexAccount withSubscriptionDescription(Optional subscriptionDescription) { - Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); - this.subscriptionDescription = subscriptionDescription; - return this; - } - - public PostUsersSignInDataUserPlexAccount withSubscriptions(List subscriptions) { - Utils.checkNotNull(subscriptions, "subscriptions"); - this.subscriptions = Optional.ofNullable(subscriptions); - return this; - } - - - public PostUsersSignInDataUserPlexAccount withSubscriptions(Optional> subscriptions) { - Utils.checkNotNull(subscriptions, "subscriptions"); - this.subscriptions = subscriptions; - return this; - } - - /** - * URL of the account thumbnail - */ - public PostUsersSignInDataUserPlexAccount withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - /** - * The title of the account (username or friendly name) - */ - public PostUsersSignInDataUserPlexAccount withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * If two-factor authentication is enabled - */ - public PostUsersSignInDataUserPlexAccount withTwoFactorEnabled(boolean twoFactorEnabled) { - Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); - this.twoFactorEnabled = Optional.ofNullable(twoFactorEnabled); - return this; - } - - - /** - * If two-factor authentication is enabled - */ - public PostUsersSignInDataUserPlexAccount withTwoFactorEnabled(Optional twoFactorEnabled) { - Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); - this.twoFactorEnabled = twoFactorEnabled; - return this; - } - - /** - * The account username - */ - public PostUsersSignInDataUserPlexAccount withUsername(String username) { - Utils.checkNotNull(username, "username"); - this.username = username; - return this; - } - - /** - * The account UUID - */ - public PostUsersSignInDataUserPlexAccount withUuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - public PostUsersSignInDataUserPlexAccount withAttributionPartner(String attributionPartner) { - Utils.checkNotNull(attributionPartner, "attributionPartner"); - this.attributionPartner = Optional.ofNullable(attributionPartner); - return this; - } - - - public PostUsersSignInDataUserPlexAccount withAttributionPartner(Optional attributionPartner) { - Utils.checkNotNull(attributionPartner, "attributionPartner"); - this.attributionPartner = attributionPartner; - return this; - } - - public PostUsersSignInDataUserPlexAccount withPastSubscriptions(List pastSubscriptions) { - Utils.checkNotNull(pastSubscriptions, "pastSubscriptions"); - this.pastSubscriptions = pastSubscriptions; - return this; - } - - public PostUsersSignInDataUserPlexAccount withTrials(List trials) { - Utils.checkNotNull(trials, "trials"); - this.trials = trials; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataUserPlexAccount other = (PostUsersSignInDataUserPlexAccount) o; - return - Utils.enhancedDeepEquals(this.adsConsent, other.adsConsent) && - Utils.enhancedDeepEquals(this.adsConsentReminderAt, other.adsConsentReminderAt) && - Utils.enhancedDeepEquals(this.adsConsentSetAt, other.adsConsentSetAt) && - Utils.enhancedDeepEquals(this.anonymous, other.anonymous) && - Utils.enhancedDeepEquals(this.authToken, other.authToken) && - Utils.enhancedDeepEquals(this.backupCodesCreated, other.backupCodesCreated) && - Utils.enhancedDeepEquals(this.confirmed, other.confirmed) && - Utils.enhancedDeepEquals(this.country, other.country) && - Utils.enhancedDeepEquals(this.email, other.email) && - Utils.enhancedDeepEquals(this.emailOnlyAuth, other.emailOnlyAuth) && - Utils.enhancedDeepEquals(this.experimentalFeatures, other.experimentalFeatures) && - Utils.enhancedDeepEquals(this.friendlyName, other.friendlyName) && - Utils.enhancedDeepEquals(this.entitlements, other.entitlements) && - Utils.enhancedDeepEquals(this.guest, other.guest) && - Utils.enhancedDeepEquals(this.hasPassword, other.hasPassword) && - Utils.enhancedDeepEquals(this.home, other.home) && - Utils.enhancedDeepEquals(this.homeAdmin, other.homeAdmin) && - Utils.enhancedDeepEquals(this.homeSize, other.homeSize) && - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.joinedAt, other.joinedAt) && - Utils.enhancedDeepEquals(this.locale, other.locale) && - Utils.enhancedDeepEquals(this.mailingListActive, other.mailingListActive) && - Utils.enhancedDeepEquals(this.mailingListStatus, other.mailingListStatus) && - Utils.enhancedDeepEquals(this.maxHomeSize, other.maxHomeSize) && - Utils.enhancedDeepEquals(this.pin, other.pin) && - Utils.enhancedDeepEquals(this.profile, other.profile) && - Utils.enhancedDeepEquals(this.protected_, other.protected_) && - Utils.enhancedDeepEquals(this.rememberExpiresAt, other.rememberExpiresAt) && - Utils.enhancedDeepEquals(this.restricted, other.restricted) && - Utils.enhancedDeepEquals(this.roles, other.roles) && - Utils.enhancedDeepEquals(this.scrobbleTypes, other.scrobbleTypes) && - Utils.enhancedDeepEquals(this.services, other.services) && - Utils.enhancedDeepEquals(this.subscription, other.subscription) && - Utils.enhancedDeepEquals(this.subscriptionDescription, other.subscriptionDescription) && - Utils.enhancedDeepEquals(this.subscriptions, other.subscriptions) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.twoFactorEnabled, other.twoFactorEnabled) && - Utils.enhancedDeepEquals(this.username, other.username) && - Utils.enhancedDeepEquals(this.uuid, other.uuid) && - Utils.enhancedDeepEquals(this.attributionPartner, other.attributionPartner) && - Utils.enhancedDeepEquals(this.pastSubscriptions, other.pastSubscriptions) && - Utils.enhancedDeepEquals(this.trials, other.trials); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - adsConsent, adsConsentReminderAt, adsConsentSetAt, - anonymous, authToken, backupCodesCreated, - confirmed, country, email, - emailOnlyAuth, experimentalFeatures, friendlyName, - entitlements, guest, hasPassword, - home, homeAdmin, homeSize, - id, joinedAt, locale, - mailingListActive, mailingListStatus, maxHomeSize, - pin, profile, protected_, - rememberExpiresAt, restricted, roles, - scrobbleTypes, services, subscription, - subscriptionDescription, subscriptions, thumb, - title, twoFactorEnabled, username, - uuid, attributionPartner, pastSubscriptions, - trials); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataUserPlexAccount.class, - "adsConsent", adsConsent, - "adsConsentReminderAt", adsConsentReminderAt, - "adsConsentSetAt", adsConsentSetAt, - "anonymous", anonymous, - "authToken", authToken, - "backupCodesCreated", backupCodesCreated, - "confirmed", confirmed, - "country", country, - "email", email, - "emailOnlyAuth", emailOnlyAuth, - "experimentalFeatures", experimentalFeatures, - "friendlyName", friendlyName, - "entitlements", entitlements, - "guest", guest, - "hasPassword", hasPassword, - "home", home, - "homeAdmin", homeAdmin, - "homeSize", homeSize, - "id", id, - "joinedAt", joinedAt, - "locale", locale, - "mailingListActive", mailingListActive, - "mailingListStatus", mailingListStatus, - "maxHomeSize", maxHomeSize, - "pin", pin, - "profile", profile, - "protected_", protected_, - "rememberExpiresAt", rememberExpiresAt, - "restricted", restricted, - "roles", roles, - "scrobbleTypes", scrobbleTypes, - "services", services, - "subscription", subscription, - "subscriptionDescription", subscriptionDescription, - "subscriptions", subscriptions, - "thumb", thumb, - "title", title, - "twoFactorEnabled", twoFactorEnabled, - "username", username, - "uuid", uuid, - "attributionPartner", attributionPartner, - "pastSubscriptions", pastSubscriptions, - "trials", trials); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional adsConsent = Optional.empty(); - - private Optional adsConsentReminderAt = Optional.empty(); - - private Optional adsConsentSetAt = Optional.empty(); - - private JsonNullable anonymous; - - private String authToken; - - private Optional backupCodesCreated; - - private Optional confirmed; - - private String country; - - private String email; - - private Optional emailOnlyAuth; - - private Optional experimentalFeatures; - - private String friendlyName; - - private List entitlements; - - private Optional guest; - - private Optional hasPassword; - - private Optional home; - - private Optional homeAdmin; - - private Integer homeSize; - - private Integer id; - - private Long joinedAt; - - private Optional locale = Optional.empty(); - - private Optional mailingListActive; - - private PostUsersSignInDataMailingListStatus mailingListStatus; - - private Integer maxHomeSize; - - @Deprecated - private Optional pin = Optional.empty(); - - private PostUsersSignInDataUserProfile profile; - - private Optional protected_; - - private Long rememberExpiresAt; - - private Optional restricted; - - private Optional> roles = Optional.empty(); - - private String scrobbleTypes; - - private List services; - - private PostUsersSignInDataSubscription subscription; - - private Optional subscriptionDescription = Optional.empty(); - - private Optional> subscriptions = Optional.empty(); - - private String thumb; - - private String title; - - private Optional twoFactorEnabled; - - private String username; - - private String uuid; - - private Optional attributionPartner = Optional.empty(); - - private List pastSubscriptions; - - private List trials; - - private Builder() { - // force use of static builder() method - } - - - /** - * Unknown - */ - public Builder adsConsent(boolean adsConsent) { - Utils.checkNotNull(adsConsent, "adsConsent"); - this.adsConsent = Optional.ofNullable(adsConsent); - return this; - } - - /** - * Unknown - */ - public Builder adsConsent(Optional adsConsent) { - Utils.checkNotNull(adsConsent, "adsConsent"); - this.adsConsent = adsConsent; - return this; - } - - - public Builder adsConsentReminderAt(long adsConsentReminderAt) { - Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); - this.adsConsentReminderAt = Optional.ofNullable(adsConsentReminderAt); - return this; - } - - public Builder adsConsentReminderAt(Optional adsConsentReminderAt) { - Utils.checkNotNull(adsConsentReminderAt, "adsConsentReminderAt"); - this.adsConsentReminderAt = adsConsentReminderAt; - return this; - } - - - public Builder adsConsentSetAt(long adsConsentSetAt) { - Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); - this.adsConsentSetAt = Optional.ofNullable(adsConsentSetAt); - return this; - } - - public Builder adsConsentSetAt(Optional adsConsentSetAt) { - Utils.checkNotNull(adsConsentSetAt, "adsConsentSetAt"); - this.adsConsentSetAt = adsConsentSetAt; - return this; - } - - - /** - * Unknown - */ - public Builder anonymous(boolean anonymous) { - Utils.checkNotNull(anonymous, "anonymous"); - this.anonymous = JsonNullable.of(anonymous); - return this; - } - - /** - * Unknown - */ - public Builder anonymous(JsonNullable anonymous) { - Utils.checkNotNull(anonymous, "anonymous"); - this.anonymous = anonymous; - return this; - } - - - /** - * The account token - */ - public Builder authToken(String authToken) { - Utils.checkNotNull(authToken, "authToken"); - this.authToken = authToken; - return this; - } - - - /** - * If the two-factor authentication backup codes have been created - */ - public Builder backupCodesCreated(boolean backupCodesCreated) { - Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); - this.backupCodesCreated = Optional.ofNullable(backupCodesCreated); - return this; - } - - /** - * If the two-factor authentication backup codes have been created - */ - public Builder backupCodesCreated(Optional backupCodesCreated) { - Utils.checkNotNull(backupCodesCreated, "backupCodesCreated"); - this.backupCodesCreated = backupCodesCreated; - return this; - } - - - /** - * If the account has been confirmed - */ - public Builder confirmed(boolean confirmed) { - Utils.checkNotNull(confirmed, "confirmed"); - this.confirmed = Optional.ofNullable(confirmed); - return this; - } - - /** - * If the account has been confirmed - */ - public Builder confirmed(Optional confirmed) { - Utils.checkNotNull(confirmed, "confirmed"); - this.confirmed = confirmed; - return this; - } - - - /** - * The account country - */ - public Builder country(String country) { - Utils.checkNotNull(country, "country"); - this.country = country; - return this; - } - - - /** - * The account email address - */ - public Builder email(String email) { - Utils.checkNotNull(email, "email"); - this.email = email; - return this; - } - - - /** - * If login with email only is enabled - */ - public Builder emailOnlyAuth(boolean emailOnlyAuth) { - Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); - this.emailOnlyAuth = Optional.ofNullable(emailOnlyAuth); - return this; - } - - /** - * If login with email only is enabled - */ - public Builder emailOnlyAuth(Optional emailOnlyAuth) { - Utils.checkNotNull(emailOnlyAuth, "emailOnlyAuth"); - this.emailOnlyAuth = emailOnlyAuth; - return this; - } - - - /** - * If experimental features are enabled - */ - public Builder experimentalFeatures(boolean experimentalFeatures) { - Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); - this.experimentalFeatures = Optional.ofNullable(experimentalFeatures); - return this; - } - - /** - * If experimental features are enabled - */ - public Builder experimentalFeatures(Optional experimentalFeatures) { - Utils.checkNotNull(experimentalFeatures, "experimentalFeatures"); - this.experimentalFeatures = experimentalFeatures; - return this; - } - - - /** - * Your account full name - */ - public Builder friendlyName(String friendlyName) { - Utils.checkNotNull(friendlyName, "friendlyName"); - this.friendlyName = friendlyName; - return this; - } - - - /** - * List of devices your allowed to use with this account - */ - public Builder entitlements(List entitlements) { - Utils.checkNotNull(entitlements, "entitlements"); - this.entitlements = entitlements; - return this; - } - - - /** - * If the account is a Plex Home guest user - */ - public Builder guest(boolean guest) { - Utils.checkNotNull(guest, "guest"); - this.guest = Optional.ofNullable(guest); - return this; - } - - /** - * If the account is a Plex Home guest user - */ - public Builder guest(Optional guest) { - Utils.checkNotNull(guest, "guest"); - this.guest = guest; - return this; - } - - - /** - * If the account has a password - */ - public Builder hasPassword(boolean hasPassword) { - Utils.checkNotNull(hasPassword, "hasPassword"); - this.hasPassword = Optional.ofNullable(hasPassword); - return this; - } - - /** - * If the account has a password - */ - public Builder hasPassword(Optional hasPassword) { - Utils.checkNotNull(hasPassword, "hasPassword"); - this.hasPassword = hasPassword; - return this; - } - - - /** - * If the account is a Plex Home user - */ - public Builder home(boolean home) { - Utils.checkNotNull(home, "home"); - this.home = Optional.ofNullable(home); - return this; - } - - /** - * If the account is a Plex Home user - */ - public Builder home(Optional home) { - Utils.checkNotNull(home, "home"); - this.home = home; - return this; - } - - - /** - * If the account is the Plex Home admin - */ - public Builder homeAdmin(boolean homeAdmin) { - Utils.checkNotNull(homeAdmin, "homeAdmin"); - this.homeAdmin = Optional.ofNullable(homeAdmin); - return this; - } - - /** - * If the account is the Plex Home admin - */ - public Builder homeAdmin(Optional homeAdmin) { - Utils.checkNotNull(homeAdmin, "homeAdmin"); - this.homeAdmin = homeAdmin; - return this; - } - - - /** - * The number of accounts in the Plex Home - */ - public Builder homeSize(int homeSize) { - Utils.checkNotNull(homeSize, "homeSize"); - this.homeSize = homeSize; - return this; - } - - - /** - * The Plex account ID - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder joinedAt(long joinedAt) { - Utils.checkNotNull(joinedAt, "joinedAt"); - this.joinedAt = joinedAt; - return this; - } - - - /** - * The account locale - */ - public Builder locale(String locale) { - Utils.checkNotNull(locale, "locale"); - this.locale = Optional.ofNullable(locale); - return this; - } - - /** - * The account locale - */ - public Builder locale(Optional locale) { - Utils.checkNotNull(locale, "locale"); - this.locale = locale; - return this; - } - - - /** - * If you are subscribed to the Plex newsletter - */ - public Builder mailingListActive(boolean mailingListActive) { - Utils.checkNotNull(mailingListActive, "mailingListActive"); - this.mailingListActive = Optional.ofNullable(mailingListActive); - return this; - } - - /** - * If you are subscribed to the Plex newsletter - */ - public Builder mailingListActive(Optional mailingListActive) { - Utils.checkNotNull(mailingListActive, "mailingListActive"); - this.mailingListActive = mailingListActive; - return this; - } - - - /** - * Your current mailing list status (active or unsubscribed) - */ - public Builder mailingListStatus(PostUsersSignInDataMailingListStatus mailingListStatus) { - Utils.checkNotNull(mailingListStatus, "mailingListStatus"); - this.mailingListStatus = mailingListStatus; - return this; - } - - - /** - * The maximum number of accounts allowed in the Plex Home - */ - public Builder maxHomeSize(int maxHomeSize) { - Utils.checkNotNull(maxHomeSize, "maxHomeSize"); - this.maxHomeSize = maxHomeSize; - return this; - } - - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder pin(String pin) { - Utils.checkNotNull(pin, "pin"); - this.pin = Optional.ofNullable(pin); - return this; - } - - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder pin(Optional pin) { - Utils.checkNotNull(pin, "pin"); - this.pin = pin; - return this; - } - - - public Builder profile(PostUsersSignInDataUserProfile profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - - /** - * If the account has a Plex Home PIN enabled - */ - public Builder protected_(boolean protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = Optional.ofNullable(protected_); - return this; - } - - /** - * If the account has a Plex Home PIN enabled - */ - public Builder protected_(Optional protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = protected_; - return this; - } - - - /** - * Unix epoch datetime in seconds - */ - public Builder rememberExpiresAt(long rememberExpiresAt) { - Utils.checkNotNull(rememberExpiresAt, "rememberExpiresAt"); - this.rememberExpiresAt = rememberExpiresAt; - return this; - } - - - /** - * If the account is a Plex Home managed user - */ - public Builder restricted(boolean restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = Optional.ofNullable(restricted); - return this; - } - - /** - * If the account is a Plex Home managed user - */ - public Builder restricted(Optional restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = restricted; - return this; - } - - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - public Builder roles(List roles) { - Utils.checkNotNull(roles, "roles"); - this.roles = Optional.ofNullable(roles); - return this; - } - - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - public Builder roles(Optional> roles) { - Utils.checkNotNull(roles, "roles"); - this.roles = roles; - return this; - } - - - /** - * Unknown - */ - public Builder scrobbleTypes(String scrobbleTypes) { - Utils.checkNotNull(scrobbleTypes, "scrobbleTypes"); - this.scrobbleTypes = scrobbleTypes; - return this; - } - - - public Builder services(List services) { - Utils.checkNotNull(services, "services"); - this.services = services; - return this; - } - - - /** - * If the account’s Plex Pass subscription is active - */ - public Builder subscription(PostUsersSignInDataSubscription subscription) { - Utils.checkNotNull(subscription, "subscription"); - this.subscription = subscription; - return this; - } - - - /** - * Description of the Plex Pass subscription - */ - public Builder subscriptionDescription(String subscriptionDescription) { - Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); - this.subscriptionDescription = Optional.ofNullable(subscriptionDescription); - return this; - } - - /** - * Description of the Plex Pass subscription - */ - public Builder subscriptionDescription(Optional subscriptionDescription) { - Utils.checkNotNull(subscriptionDescription, "subscriptionDescription"); - this.subscriptionDescription = subscriptionDescription; - return this; - } - - - public Builder subscriptions(List subscriptions) { - Utils.checkNotNull(subscriptions, "subscriptions"); - this.subscriptions = Optional.ofNullable(subscriptions); - return this; - } - - public Builder subscriptions(Optional> subscriptions) { - Utils.checkNotNull(subscriptions, "subscriptions"); - this.subscriptions = subscriptions; - return this; - } - - - /** - * URL of the account thumbnail - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - /** - * The title of the account (username or friendly name) - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - /** - * If two-factor authentication is enabled - */ - public Builder twoFactorEnabled(boolean twoFactorEnabled) { - Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); - this.twoFactorEnabled = Optional.ofNullable(twoFactorEnabled); - return this; - } - - /** - * If two-factor authentication is enabled - */ - public Builder twoFactorEnabled(Optional twoFactorEnabled) { - Utils.checkNotNull(twoFactorEnabled, "twoFactorEnabled"); - this.twoFactorEnabled = twoFactorEnabled; - return this; - } - - - /** - * The account username - */ - public Builder username(String username) { - Utils.checkNotNull(username, "username"); - this.username = username; - return this; - } - - - /** - * The account UUID - */ - public Builder uuid(String uuid) { - Utils.checkNotNull(uuid, "uuid"); - this.uuid = uuid; - return this; - } - - - public Builder attributionPartner(String attributionPartner) { - Utils.checkNotNull(attributionPartner, "attributionPartner"); - this.attributionPartner = Optional.ofNullable(attributionPartner); - return this; - } - - public Builder attributionPartner(Optional attributionPartner) { - Utils.checkNotNull(attributionPartner, "attributionPartner"); - this.attributionPartner = attributionPartner; - return this; - } - - - public Builder pastSubscriptions(List pastSubscriptions) { - Utils.checkNotNull(pastSubscriptions, "pastSubscriptions"); - this.pastSubscriptions = pastSubscriptions; - return this; - } - - - public Builder trials(List trials) { - Utils.checkNotNull(trials, "trials"); - this.trials = trials; - return this; - } - - public PostUsersSignInDataUserPlexAccount build() { - if (anonymous == null) { - anonymous = _SINGLETON_VALUE_Anonymous.value(); - } - if (backupCodesCreated == null) { - backupCodesCreated = _SINGLETON_VALUE_BackupCodesCreated.value(); - } - if (confirmed == null) { - confirmed = _SINGLETON_VALUE_Confirmed.value(); - } - if (emailOnlyAuth == null) { - emailOnlyAuth = _SINGLETON_VALUE_EmailOnlyAuth.value(); - } - if (experimentalFeatures == null) { - experimentalFeatures = _SINGLETON_VALUE_ExperimentalFeatures.value(); - } - if (guest == null) { - guest = _SINGLETON_VALUE_Guest.value(); - } - if (hasPassword == null) { - hasPassword = _SINGLETON_VALUE_HasPassword.value(); - } - if (home == null) { - home = _SINGLETON_VALUE_Home.value(); - } - if (homeAdmin == null) { - homeAdmin = _SINGLETON_VALUE_HomeAdmin.value(); - } - if (mailingListActive == null) { - mailingListActive = _SINGLETON_VALUE_MailingListActive.value(); - } - if (protected_ == null) { - protected_ = _SINGLETON_VALUE_Protected.value(); - } - if (restricted == null) { - restricted = _SINGLETON_VALUE_Restricted.value(); - } - if (twoFactorEnabled == null) { - twoFactorEnabled = _SINGLETON_VALUE_TwoFactorEnabled.value(); - } - - return new PostUsersSignInDataUserPlexAccount( - adsConsent, adsConsentReminderAt, adsConsentSetAt, - anonymous, authToken, backupCodesCreated, - confirmed, country, email, - emailOnlyAuth, experimentalFeatures, friendlyName, - entitlements, guest, hasPassword, - home, homeAdmin, homeSize, - id, joinedAt, locale, - mailingListActive, mailingListStatus, maxHomeSize, - pin, profile, protected_, - rememberExpiresAt, restricted, roles, - scrobbleTypes, services, subscription, - subscriptionDescription, subscriptions, thumb, - title, twoFactorEnabled, username, - uuid, attributionPartner, pastSubscriptions, - trials); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_Anonymous = - new LazySingletonValue<>( - "anonymous", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_BackupCodesCreated = - new LazySingletonValue<>( - "backupCodesCreated", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Confirmed = - new LazySingletonValue<>( - "confirmed", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_EmailOnlyAuth = - new LazySingletonValue<>( - "emailOnlyAuth", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_ExperimentalFeatures = - new LazySingletonValue<>( - "experimentalFeatures", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Guest = - new LazySingletonValue<>( - "guest", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_HasPassword = - new LazySingletonValue<>( - "hasPassword", - "true", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Home = - new LazySingletonValue<>( - "home", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_HomeAdmin = - new LazySingletonValue<>( - "homeAdmin", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_MailingListActive = - new LazySingletonValue<>( - "mailingListActive", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Protected = - new LazySingletonValue<>( - "protected", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Restricted = - new LazySingletonValue<>( - "restricted", - "false", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_TwoFactorEnabled = - new LazySingletonValue<>( - "twoFactorEnabled", - "false", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserProfile.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserProfile.java deleted file mode 100644 index cdfd3fe9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataUserProfile.java +++ /dev/null @@ -1,532 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class PostUsersSignInDataUserProfile { - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("autoSelectAudio") - private Optional autoSelectAudio; - - /** - * The preferred audio language for the account - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("defaultAudioLanguage") - private Optional defaultAudioLanguage; - - /** - * The preferred subtitle language for the account - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("defaultSubtitleLanguage") - private Optional defaultSubtitleLanguage; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("autoSelectSubtitle") - private Optional autoSelectSubtitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("defaultSubtitleAccessibility") - private Optional defaultSubtitleAccessibility; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("defaultSubtitleForced") - private Optional defaultSubtitleForced; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("watchedIndicator") - private Optional watchedIndicator; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mediaReviewsVisibility") - private Optional mediaReviewsVisibility; - - @JsonCreator - public PostUsersSignInDataUserProfile( - @JsonProperty("autoSelectAudio") Optional autoSelectAudio, - @JsonProperty("defaultAudioLanguage") Optional defaultAudioLanguage, - @JsonProperty("defaultSubtitleLanguage") Optional defaultSubtitleLanguage, - @JsonProperty("autoSelectSubtitle") Optional autoSelectSubtitle, - @JsonProperty("defaultSubtitleAccessibility") Optional defaultSubtitleAccessibility, - @JsonProperty("defaultSubtitleForced") Optional defaultSubtitleForced, - @JsonProperty("watchedIndicator") Optional watchedIndicator, - @JsonProperty("mediaReviewsVisibility") Optional mediaReviewsVisibility) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle"); - Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility"); - Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced"); - Utils.checkNotNull(watchedIndicator, "watchedIndicator"); - Utils.checkNotNull(mediaReviewsVisibility, "mediaReviewsVisibility"); - this.autoSelectAudio = autoSelectAudio; - this.defaultAudioLanguage = defaultAudioLanguage; - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - this.autoSelectSubtitle = autoSelectSubtitle; - this.defaultSubtitleAccessibility = defaultSubtitleAccessibility; - this.defaultSubtitleForced = defaultSubtitleForced; - this.watchedIndicator = watchedIndicator; - this.mediaReviewsVisibility = mediaReviewsVisibility; - } - - public PostUsersSignInDataUserProfile() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - @JsonIgnore - public Optional autoSelectAudio() { - return autoSelectAudio; - } - - /** - * The preferred audio language for the account - */ - @JsonIgnore - public Optional defaultAudioLanguage() { - return defaultAudioLanguage; - } - - /** - * The preferred subtitle language for the account - */ - @JsonIgnore - public Optional defaultSubtitleLanguage() { - return defaultSubtitleLanguage; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional autoSelectSubtitle() { - return (Optional) autoSelectSubtitle; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional defaultSubtitleAccessibility() { - return (Optional) defaultSubtitleAccessibility; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional defaultSubtitleForced() { - return (Optional) defaultSubtitleForced; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional watchedIndicator() { - return (Optional) watchedIndicator; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaReviewsVisibility() { - return (Optional) mediaReviewsVisibility; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - public PostUsersSignInDataUserProfile withAutoSelectAudio(boolean autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = Optional.ofNullable(autoSelectAudio); - return this; - } - - - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - public PostUsersSignInDataUserProfile withAutoSelectAudio(Optional autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = autoSelectAudio; - return this; - } - - /** - * The preferred audio language for the account - */ - public PostUsersSignInDataUserProfile withDefaultAudioLanguage(String defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage); - return this; - } - - - /** - * The preferred audio language for the account - */ - public PostUsersSignInDataUserProfile withDefaultAudioLanguage(Optional defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = defaultAudioLanguage; - return this; - } - - /** - * The preferred subtitle language for the account - */ - public PostUsersSignInDataUserProfile withDefaultSubtitleLanguage(String defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage); - return this; - } - - - /** - * The preferred subtitle language for the account - */ - public PostUsersSignInDataUserProfile withDefaultSubtitleLanguage(Optional defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - return this; - } - - public PostUsersSignInDataUserProfile withAutoSelectSubtitle(PostUsersSignInDataAutoSelectSubtitle autoSelectSubtitle) { - Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle"); - this.autoSelectSubtitle = Optional.ofNullable(autoSelectSubtitle); - return this; - } - - - public PostUsersSignInDataUserProfile withAutoSelectSubtitle(Optional autoSelectSubtitle) { - Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle"); - this.autoSelectSubtitle = autoSelectSubtitle; - return this; - } - - public PostUsersSignInDataUserProfile withDefaultSubtitleAccessibility(PostUsersSignInDataDefaultSubtitleAccessibility defaultSubtitleAccessibility) { - Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility"); - this.defaultSubtitleAccessibility = Optional.ofNullable(defaultSubtitleAccessibility); - return this; - } - - - public PostUsersSignInDataUserProfile withDefaultSubtitleAccessibility(Optional defaultSubtitleAccessibility) { - Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility"); - this.defaultSubtitleAccessibility = defaultSubtitleAccessibility; - return this; - } - - public PostUsersSignInDataUserProfile withDefaultSubtitleForced(PostUsersSignInDataDefaultSubtitleForced defaultSubtitleForced) { - Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced"); - this.defaultSubtitleForced = Optional.ofNullable(defaultSubtitleForced); - return this; - } - - - public PostUsersSignInDataUserProfile withDefaultSubtitleForced(Optional defaultSubtitleForced) { - Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced"); - this.defaultSubtitleForced = defaultSubtitleForced; - return this; - } - - public PostUsersSignInDataUserProfile withWatchedIndicator(PostUsersSignInDataWatchedIndicator watchedIndicator) { - Utils.checkNotNull(watchedIndicator, "watchedIndicator"); - this.watchedIndicator = Optional.ofNullable(watchedIndicator); - return this; - } - - - public PostUsersSignInDataUserProfile withWatchedIndicator(Optional watchedIndicator) { - Utils.checkNotNull(watchedIndicator, "watchedIndicator"); - this.watchedIndicator = watchedIndicator; - return this; - } - - public PostUsersSignInDataUserProfile withMediaReviewsVisibility(PostUsersSignInDataMediaReviewsVisibility mediaReviewsVisibility) { - Utils.checkNotNull(mediaReviewsVisibility, "mediaReviewsVisibility"); - this.mediaReviewsVisibility = Optional.ofNullable(mediaReviewsVisibility); - return this; - } - - - public PostUsersSignInDataUserProfile withMediaReviewsVisibility(Optional mediaReviewsVisibility) { - Utils.checkNotNull(mediaReviewsVisibility, "mediaReviewsVisibility"); - this.mediaReviewsVisibility = mediaReviewsVisibility; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataUserProfile other = (PostUsersSignInDataUserProfile) o; - return - Utils.enhancedDeepEquals(this.autoSelectAudio, other.autoSelectAudio) && - Utils.enhancedDeepEquals(this.defaultAudioLanguage, other.defaultAudioLanguage) && - Utils.enhancedDeepEquals(this.defaultSubtitleLanguage, other.defaultSubtitleLanguage) && - Utils.enhancedDeepEquals(this.autoSelectSubtitle, other.autoSelectSubtitle) && - Utils.enhancedDeepEquals(this.defaultSubtitleAccessibility, other.defaultSubtitleAccessibility) && - Utils.enhancedDeepEquals(this.defaultSubtitleForced, other.defaultSubtitleForced) && - Utils.enhancedDeepEquals(this.watchedIndicator, other.watchedIndicator) && - Utils.enhancedDeepEquals(this.mediaReviewsVisibility, other.mediaReviewsVisibility); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - autoSelectAudio, defaultAudioLanguage, defaultSubtitleLanguage, - autoSelectSubtitle, defaultSubtitleAccessibility, defaultSubtitleForced, - watchedIndicator, mediaReviewsVisibility); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataUserProfile.class, - "autoSelectAudio", autoSelectAudio, - "defaultAudioLanguage", defaultAudioLanguage, - "defaultSubtitleLanguage", defaultSubtitleLanguage, - "autoSelectSubtitle", autoSelectSubtitle, - "defaultSubtitleAccessibility", defaultSubtitleAccessibility, - "defaultSubtitleForced", defaultSubtitleForced, - "watchedIndicator", watchedIndicator, - "mediaReviewsVisibility", mediaReviewsVisibility); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional autoSelectAudio; - - private Optional defaultAudioLanguage = Optional.empty(); - - private Optional defaultSubtitleLanguage = Optional.empty(); - - private Optional autoSelectSubtitle; - - private Optional defaultSubtitleAccessibility; - - private Optional defaultSubtitleForced; - - private Optional watchedIndicator; - - private Optional mediaReviewsVisibility; - - private Builder() { - // force use of static builder() method - } - - - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - public Builder autoSelectAudio(boolean autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = Optional.ofNullable(autoSelectAudio); - return this; - } - - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - public Builder autoSelectAudio(Optional autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = autoSelectAudio; - return this; - } - - - /** - * The preferred audio language for the account - */ - public Builder defaultAudioLanguage(String defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage); - return this; - } - - /** - * The preferred audio language for the account - */ - public Builder defaultAudioLanguage(Optional defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = defaultAudioLanguage; - return this; - } - - - /** - * The preferred subtitle language for the account - */ - public Builder defaultSubtitleLanguage(String defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage); - return this; - } - - /** - * The preferred subtitle language for the account - */ - public Builder defaultSubtitleLanguage(Optional defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - return this; - } - - - public Builder autoSelectSubtitle(PostUsersSignInDataAutoSelectSubtitle autoSelectSubtitle) { - Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle"); - this.autoSelectSubtitle = Optional.ofNullable(autoSelectSubtitle); - return this; - } - - public Builder autoSelectSubtitle(Optional autoSelectSubtitle) { - Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle"); - this.autoSelectSubtitle = autoSelectSubtitle; - return this; - } - - - public Builder defaultSubtitleAccessibility(PostUsersSignInDataDefaultSubtitleAccessibility defaultSubtitleAccessibility) { - Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility"); - this.defaultSubtitleAccessibility = Optional.ofNullable(defaultSubtitleAccessibility); - return this; - } - - public Builder defaultSubtitleAccessibility(Optional defaultSubtitleAccessibility) { - Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility"); - this.defaultSubtitleAccessibility = defaultSubtitleAccessibility; - return this; - } - - - public Builder defaultSubtitleForced(PostUsersSignInDataDefaultSubtitleForced defaultSubtitleForced) { - Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced"); - this.defaultSubtitleForced = Optional.ofNullable(defaultSubtitleForced); - return this; - } - - public Builder defaultSubtitleForced(Optional defaultSubtitleForced) { - Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced"); - this.defaultSubtitleForced = defaultSubtitleForced; - return this; - } - - - public Builder watchedIndicator(PostUsersSignInDataWatchedIndicator watchedIndicator) { - Utils.checkNotNull(watchedIndicator, "watchedIndicator"); - this.watchedIndicator = Optional.ofNullable(watchedIndicator); - return this; - } - - public Builder watchedIndicator(Optional watchedIndicator) { - Utils.checkNotNull(watchedIndicator, "watchedIndicator"); - this.watchedIndicator = watchedIndicator; - return this; - } - - - public Builder mediaReviewsVisibility(PostUsersSignInDataMediaReviewsVisibility mediaReviewsVisibility) { - Utils.checkNotNull(mediaReviewsVisibility, "mediaReviewsVisibility"); - this.mediaReviewsVisibility = Optional.ofNullable(mediaReviewsVisibility); - return this; - } - - public Builder mediaReviewsVisibility(Optional mediaReviewsVisibility) { - Utils.checkNotNull(mediaReviewsVisibility, "mediaReviewsVisibility"); - this.mediaReviewsVisibility = mediaReviewsVisibility; - return this; - } - - public PostUsersSignInDataUserProfile build() { - if (autoSelectAudio == null) { - autoSelectAudio = _SINGLETON_VALUE_AutoSelectAudio.value(); - } - if (autoSelectSubtitle == null) { - autoSelectSubtitle = _SINGLETON_VALUE_AutoSelectSubtitle.value(); - } - if (defaultSubtitleAccessibility == null) { - defaultSubtitleAccessibility = _SINGLETON_VALUE_DefaultSubtitleAccessibility.value(); - } - if (defaultSubtitleForced == null) { - defaultSubtitleForced = _SINGLETON_VALUE_DefaultSubtitleForced.value(); - } - if (watchedIndicator == null) { - watchedIndicator = _SINGLETON_VALUE_WatchedIndicator.value(); - } - if (mediaReviewsVisibility == null) { - mediaReviewsVisibility = _SINGLETON_VALUE_MediaReviewsVisibility.value(); - } - - return new PostUsersSignInDataUserProfile( - autoSelectAudio, defaultAudioLanguage, defaultSubtitleLanguage, - autoSelectSubtitle, defaultSubtitleAccessibility, defaultSubtitleForced, - watchedIndicator, mediaReviewsVisibility); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_AutoSelectAudio = - new LazySingletonValue<>( - "autoSelectAudio", - "true", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_AutoSelectSubtitle = - new LazySingletonValue<>( - "autoSelectSubtitle", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_DefaultSubtitleAccessibility = - new LazySingletonValue<>( - "defaultSubtitleAccessibility", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_DefaultSubtitleForced = - new LazySingletonValue<>( - "defaultSubtitleForced", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_WatchedIndicator = - new LazySingletonValue<>( - "watchedIndicator", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_MediaReviewsVisibility = - new LazySingletonValue<>( - "mediaReviewsVisibility", - "0", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataWatchedIndicator.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataWatchedIndicator.java deleted file mode 100644 index a0dd4033..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataWatchedIndicator.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * PostUsersSignInDataWatchedIndicator - * - *

Whether or not media watched indicators are enabled (little orange dot on media) - */ -public enum PostUsersSignInDataWatchedIndicator { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - PostUsersSignInDataWatchedIndicator(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (PostUsersSignInDataWatchedIndicator o: PostUsersSignInDataWatchedIndicator.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Prefs.java b/src/main/java/dev/plexapi/sdk/models/operations/Prefs.java new file mode 100644 index 00000000..cbbee8fe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Prefs.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * Prefs + */ +public class Prefs { + @JsonCreator + public Prefs() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(Prefs.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public Prefs build() { + + return new Prefs( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ProcessSubscriptionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ProcessSubscriptionsRequestBuilder.java new file mode 100644 index 00000000..79b14cb8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ProcessSubscriptionsRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ProcessSubscriptions; +import java.lang.Exception; + +public class ProcessSubscriptionsRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ProcessSubscriptionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ProcessSubscriptionsResponse call() throws Exception { + + RequestlessOperation operation + = new ProcessSubscriptions.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ProcessSubscriptionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ProcessSubscriptionsResponse.java new file mode 100644 index 00000000..2d683947 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ProcessSubscriptionsResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; + + +public class ProcessSubscriptionsResponse 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; + + + private Map> headers; + + @JsonCreator + public ProcessSubscriptionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.headers = headers; + } + + /** + * 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; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ProcessSubscriptionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ProcessSubscriptionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ProcessSubscriptionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ProcessSubscriptionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProcessSubscriptionsResponse other = (ProcessSubscriptionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(ProcessSubscriptionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ProcessSubscriptionsResponse build() { + + return new ProcessSubscriptionsResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ProcessingState.java b/src/main/java/dev/plexapi/sdk/models/operations/ProcessingState.java new file mode 100644 index 00000000..34ae3de9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ProcessingState.java @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * ProcessingState + * + *

The state of processing if this generator is part of an optimizer playlist + */ +public enum ProcessingState { + PROCESSED("processed"), + COMPLETED("completed"), + TOMBSTONED("tombstoned"), + DISABLED("disabled"), + ERROR("error"), + PENDING("pending"); + + @JsonValue + private final String value; + + ProcessingState(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (ProcessingState o: ProcessingState.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ProcessingStateContext.java b/src/main/java/dev/plexapi/sdk/models/operations/ProcessingStateContext.java new file mode 100644 index 00000000..508ff615 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ProcessingStateContext.java @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * ProcessingStateContext + * + *

The error which could have occurred (or `good`) + */ +public enum ProcessingStateContext { + GOOD("good"), + SOURCE_FILE_UNAVAILABLE("sourceFileUnavailable"), + SOURCE_FILE_METADATA_ERROR("sourceFileMetadataError"), + CLIENT_PROFILE_ERROR("clientProfileError"), + IO_ERROR("ioError"), + TRANSCODER_ERROR("transcoderError"), + UNKNOWN_ERROR("unknownError"), + MEDIA_ANALYSIS_ERROR("mediaAnalysisError"), + DOWNLOAD_FAILED("downloadFailed"), + ACCESS_DENIED("accessDenied"), + CANNOT_TRANSCODE("cannotTranscode"), + CODEC_INSTALL_ERROR("codecInstallError"); + + @JsonValue + private final String value; + + ProcessingStateContext(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (ProcessingStateContext o: ProcessingStateContext.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Producer.java b/src/main/java/dev/plexapi/sdk/models/operations/Producer.java deleted file mode 100644 index 94639d63..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Producer.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Producer { - /** - * Unique identifier for the producer. - */ - @JsonProperty("id") - private int id; - - /** - * The filter string used to query this producer. - */ - @JsonProperty("filter") - private String filter; - - /** - * The name of the producer - */ - @JsonProperty("tag") - private String tag; - - /** - * A 24-character hexadecimal unique key associated with the producer's tag, used for internal identification. - */ - @JsonProperty("tagKey") - private String tagKey; - - /** - * The absolute URL of the thumbnail image for the producer. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public Producer( - @JsonProperty("id") int id, - @JsonProperty("filter") String filter, - @JsonProperty("tag") String tag, - @JsonProperty("tagKey") String tagKey, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(tagKey, "tagKey"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.filter = filter; - this.tag = tag; - this.tagKey = tagKey; - this.thumb = thumb; - } - - public Producer( - int id, - String filter, - String tag, - String tagKey) { - this(id, filter, tag, - tagKey, Optional.empty()); - } - - /** - * Unique identifier for the producer. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The filter string used to query this producer. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * The name of the producer - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * A 24-character hexadecimal unique key associated with the producer's tag, used for internal identification. - */ - @JsonIgnore - public String tagKey() { - return tagKey; - } - - /** - * The absolute URL of the thumbnail image for the producer. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique identifier for the producer. - */ - public Producer withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The filter string used to query this producer. - */ - public Producer withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The name of the producer - */ - public Producer withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * A 24-character hexadecimal unique key associated with the producer's tag, used for internal identification. - */ - public Producer withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The absolute URL of the thumbnail image for the producer. - */ - public Producer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the producer. - */ - public Producer withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Producer other = (Producer) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag, - tagKey, thumb); - } - - @Override - public String toString() { - return Utils.toString(Producer.class, - "id", id, - "filter", filter, - "tag", tag, - "tagKey", tagKey, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String filter; - - private String tag; - - private String tagKey; - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique identifier for the producer. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The filter string used to query this producer. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * The name of the producer - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * A 24-character hexadecimal unique key associated with the producer's tag, used for internal identification. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the producer. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the producer. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public Producer build() { - - return new Producer( - id, filter, tag, - tagKey, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Protected.java b/src/main/java/dev/plexapi/sdk/models/operations/Protected.java deleted file mode 100644 index fa67680e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Protected.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Protected - * - *

Indicates whether the account is protected. - */ -public enum Protected { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - Protected(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (Protected o: Protected.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Protocol.java b/src/main/java/dev/plexapi/sdk/models/operations/Protocol.java index ef481641..f259d351 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Protocol.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Protocol.java @@ -11,11 +11,12 @@ import java.util.Optional; /** * Protocol * - *

The protocol used for the connection (http, https, etc) + *

Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) */ public enum Protocol { HTTP("http"), - HTTPS("https"); + HLS("hls"), + DASH("dash"); @JsonValue private final String value; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Provider.java b/src/main/java/dev/plexapi/sdk/models/operations/Provider.java deleted file mode 100644 index 6f0c5981..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Provider.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Provider { - - @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; - - @JsonCreator - public Provider( - @JsonProperty("key") Optional key, - @JsonProperty("title") Optional title, - @JsonProperty("type") Optional type) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(type, "type"); - this.key = key; - this.title = title; - this.type = type; - } - - public Provider() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - public Provider withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public Provider withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Provider withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public Provider withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public Provider withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public Provider withType(Optional 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; - } - Provider other = (Provider) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, title, type); - } - - @Override - public String toString() { - return Utils.toString(Provider.class, - "key", key, - "title", title, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional key = Optional.empty(); - - private Optional title = Optional.empty(); - - private Optional type = 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 Provider build() { - - return new Provider( - key, title, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamArgs.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamArgs.java new file mode 100644 index 00000000..9412c7c4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamArgs.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * QueryParamArgs + */ +public class QueryParamArgs { + @JsonCreator + public QueryParamArgs() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(QueryParamArgs.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public QueryParamArgs build() { + + return new QueryParamArgs( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamAttributes.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamAttributes.java new file mode 100644 index 00000000..ea823659 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamAttributes.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * QueryParamAttributes + * + *

The attributes to assign to this marker + */ +public class QueryParamAttributes { + @JsonCreator + public QueryParamAttributes() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(QueryParamAttributes.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public QueryParamAttributes build() { + + return new QueryParamAttributes( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamFilter.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamFilter.java deleted file mode 100644 index 30df8159..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamFilter.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - -/** - * QueryParamFilter - * - *

Filters content by field and direction/equality - * (Unknown if viewedAt is the only supported column) - */ -public class QueryParamFilter { - @JsonCreator - public QueryParamFilter() { - } - - public static Builder builder() { - return new Builder(); - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ); - } - - @Override - public String toString() { - return Utils.toString(QueryParamFilter.class); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public QueryParamFilter build() { - - return new QueryParamFilter( - ); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamForce.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamForce.java deleted file mode 100644 index 7de25ba4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamForce.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * QueryParamForce - * - *

Force overwriting of duplicate playlists. - * By default, a playlist file uploaded with the same path will overwrite the existing playlist. - * The `force` argument is used to disable overwriting. - * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. - */ -public enum QueryParamForce { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - QueryParamForce(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (QueryParamForce o: QueryParamForce.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeCollections.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeCollections.java deleted file mode 100644 index 57f9b384..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeCollections.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * QueryParamIncludeCollections - */ -public enum QueryParamIncludeCollections { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - QueryParamIncludeCollections(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (QueryParamIncludeCollections o: QueryParamIncludeCollections.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeExternalMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeExternalMedia.java deleted file mode 100644 index 9d2f5daa..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeExternalMedia.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * QueryParamIncludeExternalMedia - */ -public enum QueryParamIncludeExternalMedia { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - QueryParamIncludeExternalMedia(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (QueryParamIncludeExternalMedia o: QueryParamIncludeExternalMedia.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeGuids.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeGuids.java deleted file mode 100644 index 88275ee5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeGuids.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * QueryParamIncludeGuids - * - *

Adds the Guid object to the response - */ -public enum QueryParamIncludeGuids { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - QueryParamIncludeGuids(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (QueryParamIncludeGuids o: QueryParamIncludeGuids.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeMeta.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeMeta.java deleted file mode 100644 index 9a08a119..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeMeta.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * QueryParamIncludeMeta - * - *

Adds the Meta object to the response - */ -public enum QueryParamIncludeMeta { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - QueryParamIncludeMeta(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (QueryParamIncludeMeta o: QueryParamIncludeMeta.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamLocation.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamLocation.java new file mode 100644 index 00000000..f3f30562 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamLocation.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * QueryParamLocation + * + *

Network type of the client, can be used to help determine target bitrate. + */ +public enum QueryParamLocation { + LAN("lan"), + WAN("wan"), + CELLULAR("cellular"); + + @JsonValue + private final String value; + + QueryParamLocation(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (QueryParamLocation o: QueryParamLocation.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamOnlyTransient.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamOnlyTransient.java deleted file mode 100644 index 97839b86..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamOnlyTransient.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * QueryParamOnlyTransient - * - *

Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ -public enum QueryParamOnlyTransient { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - QueryParamOnlyTransient(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (QueryParamOnlyTransient o: QueryParamOnlyTransient.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamPrefs.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamPrefs.java new file mode 100644 index 00000000..fdca4299 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamPrefs.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * QueryParamPrefs + * + *

The preferences for this section + */ +public class QueryParamPrefs { + @JsonCreator + public QueryParamPrefs() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(QueryParamPrefs.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public QueryParamPrefs build() { + + return new QueryParamPrefs( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamProtocol.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamProtocol.java new file mode 100644 index 00000000..4339b743 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamProtocol.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * QueryParamProtocol + * + *

Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ +public enum QueryParamProtocol { + HTTP("http"), + HLS("hls"), + DASH("dash"); + + @JsonValue + private final String value; + + QueryParamProtocol(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (QueryParamProtocol o: QueryParamProtocol.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamSmart.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamSmart.java deleted file mode 100644 index 8661c6eb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamSmart.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

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

Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ +public enum QueryParamSubtitles { + AUTO("auto"), + BURN("burn"), + NONE("none"), + SIDECAR("sidecar"), + EMBEDDED("embedded"), + SEGMENTED("segmented"), + UNKNOWN("unknown"); + + @JsonValue + private final String value; + + QueryParamSubtitles(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (QueryParamSubtitles o: QueryParamSubtitles.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamType.java index 1654c588..21d80576 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamType.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamType.java @@ -3,216 +3,37 @@ */ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; +import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; import java.util.Objects; import java.util.Optional; -/** - *

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

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

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

The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + *

The value `delegation` is the only supported `type` parameter. */ -@JsonDeserialize(using = QueryParamType._Deserializer.class) -@JsonSerialize(using = QueryParamType._Serializer.class) -public class QueryParamType { +public enum QueryParamType { + DELEGATION("delegation"); - public static final QueryParamType Movie = new QueryParamType(1L); - public static final QueryParamType TvShow = new QueryParamType(2L); - public static final QueryParamType Season = new QueryParamType(3L); - public static final QueryParamType Episode = new QueryParamType(4L); - public static final QueryParamType Artist = new QueryParamType(5L); - public static final QueryParamType Album = new QueryParamType(6L); - public static final QueryParamType Track = new QueryParamType(7L); - public static final QueryParamType PhotoAlbum = new QueryParamType(8L); - public static final QueryParamType Photo = new QueryParamType(9L); + @JsonValue + private final String value; - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final long value; - - private QueryParamType(long value) { + QueryParamType(String value) { this.value = value; } - - /** - * Returns a QueryParamType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as QueryParamType - */ - public static QueryParamType of(long value) { - synchronized (QueryParamType.class) { - return values.computeIfAbsent(value, v -> new QueryParamType(v)); - } - } - - public long value() { + + public String value() { return value; } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - QueryParamType other = (QueryParamType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "QueryParamType [value=" + value + "]"; - } - - // return an array just like an enum - public static QueryParamType[] values() { - synchronized (QueryParamType.class) { - return values.values().toArray(new QueryParamType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1L, Movie); - map.put(2L, TvShow); - map.put(3L, Season); - map.put(4L, Episode); - map.put(5L, Artist); - map.put(6L, Album); - map.put(7L, Track); - map.put(8L, PhotoAlbum); - map.put(9L, Photo); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1L, QueryParamTypeEnum.Movie); - map.put(2L, QueryParamTypeEnum.TvShow); - map.put(3L, QueryParamTypeEnum.Season); - map.put(4L, QueryParamTypeEnum.Episode); - map.put(5L, QueryParamTypeEnum.Artist); - map.put(6L, QueryParamTypeEnum.Album); - map.put(7L, QueryParamTypeEnum.Track); - map.put(8L, QueryParamTypeEnum.PhotoAlbum); - map.put(9L, QueryParamTypeEnum.Photo); - return map; - } - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(QueryParamType.class); - } - - @Override - public void serialize(QueryParamType value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(QueryParamType.class); - } - - @Override - public QueryParamType deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - long v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return QueryParamType.of(v); - } - } - - public enum QueryParamTypeEnum { - - Movie(1L), - TvShow(2L), - Season(3L), - Episode(4L), - Artist(5L), - Album(6L), - Track(7L), - PhotoAlbum(8L), - Photo(9L),; - - private final long value; - - private QueryParamTypeEnum(long value) { - this.value = value; - } - - public long value() { - return value; + public static Optional fromValue(String value) { + for (QueryParamType o: QueryParamType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } } + return Optional.empty(); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Rating.java b/src/main/java/dev/plexapi/sdk/models/operations/Rating.java deleted file mode 100644 index a4fd263d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Rating.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Float; -import java.lang.Override; -import java.lang.String; - -/** - * Rating - * - *

The type of rating, for example 'audience' or 'critic'. - */ -public class Rating { - /** - * The URL for the rating image, for example from IMDb. - */ - @JsonProperty("image") - private String image; - - - @JsonProperty("value") - private float value; - - - @JsonProperty("type") - private String type; - - @JsonCreator - public Rating( - @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; - } - - /** - * The URL for the rating image, for example from IMDb. - */ - @JsonIgnore - public String image() { - return image; - } - - @JsonIgnore - public float value() { - return value; - } - - @JsonIgnore - public String type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The URL for the rating image, for example from IMDb. - */ - public Rating withImage(String image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - public Rating withValue(float value) { - Utils.checkNotNull(value, "value"); - this.value = value; - return this; - } - - public Rating 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; - } - Rating other = (Rating) o; - return - Utils.enhancedDeepEquals(this.image, other.image) && - Utils.enhancedDeepEquals(this.value, other.value) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - image, value, type); - } - - @Override - public String toString() { - return Utils.toString(Rating.class, - "image", image, - "value", value, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String image; - - private Float value; - - private String type; - - private Builder() { - // force use of static builder() method - } - - - /** - * The URL for the rating image, for example from IMDb. - */ - public Builder image(String image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - - public Builder value(float value) { - Utils.checkNotNull(value, "value"); - this.value = value; - return this; - } - - - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Rating build() { - - return new Rating( - image, value, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Ratings.java b/src/main/java/dev/plexapi/sdk/models/operations/Ratings.java deleted file mode 100644 index a05160fc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Ratings.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Float; -import java.lang.Override; -import java.lang.String; - - -public class Ratings { - /** - * The image or reference for the rating. - */ - @JsonProperty("image") - private String image; - - /** - * The rating value. - */ - @JsonProperty("value") - private float value; - - /** - * The type of rating (e.g., audience, critic). - */ - @JsonProperty("type") - private String type; - - @JsonCreator - public Ratings( - @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; - } - - /** - * The image or reference for the rating. - */ - @JsonIgnore - public String image() { - return image; - } - - /** - * The rating value. - */ - @JsonIgnore - public float value() { - return value; - } - - /** - * The type of rating (e.g., audience, critic). - */ - @JsonIgnore - public String type() { - return type; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The image or reference for the rating. - */ - public Ratings withImage(String image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - /** - * The rating value. - */ - public Ratings withValue(float value) { - Utils.checkNotNull(value, "value"); - this.value = value; - return this; - } - - /** - * The type of rating (e.g., audience, critic). - */ - public Ratings 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; - } - Ratings other = (Ratings) o; - return - Utils.enhancedDeepEquals(this.image, other.image) && - Utils.enhancedDeepEquals(this.value, other.value) && - Utils.enhancedDeepEquals(this.type, other.type); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - image, value, type); - } - - @Override - public String toString() { - return Utils.toString(Ratings.class, - "image", image, - "value", value, - "type", type); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String image; - - private Float value; - - private String type; - - private Builder() { - // force use of static builder() method - } - - - /** - * The image or reference for the rating. - */ - public Builder image(String image) { - Utils.checkNotNull(image, "image"); - this.image = image; - return this; - } - - - /** - * The rating value. - */ - 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 Ratings build() { - - return new Ratings( - image, value, type); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RecommendationsVisibility.java b/src/main/java/dev/plexapi/sdk/models/operations/RecommendationsVisibility.java new file mode 100644 index 00000000..178e8168 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RecommendationsVisibility.java @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * RecommendationsVisibility + * + *

The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ +public enum RecommendationsVisibility { + ALL("all"), + NONE("none"), + ADMIN("admin"), + SHARED("shared"); + + @JsonValue + private final String value; + + RecommendationsVisibility(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (RecommendationsVisibility o: RecommendationsVisibility.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataRequest.java new file mode 100644 index 00000000..b781395d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataRequest.java @@ -0,0 +1,857 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class RefreshItemsMetadataRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=agent") + private Optional agent; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=markUpdated") + private Optional markUpdated; + + @JsonCreator + public RefreshItemsMetadataRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional agent, + Optional markUpdated) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(agent, "agent"); + Utils.checkNotNull(markUpdated, "markUpdated"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.agent = agent; + this.markUpdated = markUpdated; + } + + public RefreshItemsMetadataRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @JsonIgnore + public Optional agent() { + return agent; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional markUpdated() { + return (Optional) markUpdated; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RefreshItemsMetadataRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RefreshItemsMetadataRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public RefreshItemsMetadataRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public RefreshItemsMetadataRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public RefreshItemsMetadataRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public RefreshItemsMetadataRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public RefreshItemsMetadataRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public RefreshItemsMetadataRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public RefreshItemsMetadataRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public RefreshItemsMetadataRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public RefreshItemsMetadataRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public RefreshItemsMetadataRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public RefreshItemsMetadataRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public RefreshItemsMetadataRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public RefreshItemsMetadataRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public RefreshItemsMetadataRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public RefreshItemsMetadataRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public RefreshItemsMetadataRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public RefreshItemsMetadataRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public RefreshItemsMetadataRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public RefreshItemsMetadataRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public RefreshItemsMetadataRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public RefreshItemsMetadataRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public RefreshItemsMetadataRequest withAgent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + + public RefreshItemsMetadataRequest withAgent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + public RefreshItemsMetadataRequest withMarkUpdated(BoolInt markUpdated) { + Utils.checkNotNull(markUpdated, "markUpdated"); + this.markUpdated = Optional.ofNullable(markUpdated); + return this; + } + + + public RefreshItemsMetadataRequest withMarkUpdated(Optional markUpdated) { + Utils.checkNotNull(markUpdated, "markUpdated"); + this.markUpdated = markUpdated; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshItemsMetadataRequest other = (RefreshItemsMetadataRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.agent, other.agent) && + Utils.enhancedDeepEquals(this.markUpdated, other.markUpdated); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + agent, markUpdated); + } + + @Override + public String toString() { + return Utils.toString(RefreshItemsMetadataRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "agent", agent, + "markUpdated", markUpdated); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional agent = Optional.empty(); + + private Optional markUpdated = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder agent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + public Builder agent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + + public Builder markUpdated(BoolInt markUpdated) { + Utils.checkNotNull(markUpdated, "markUpdated"); + this.markUpdated = Optional.ofNullable(markUpdated); + return this; + } + + public Builder markUpdated(Optional markUpdated) { + Utils.checkNotNull(markUpdated, "markUpdated"); + this.markUpdated = markUpdated; + return this; + } + + public RefreshItemsMetadataRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new RefreshItemsMetadataRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + agent, markUpdated); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataRequestBuilder.java new file mode 100644 index 00000000..dcfdd089 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.RefreshItemsMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class RefreshItemsMetadataRequestBuilder { + + private RefreshItemsMetadataRequest request; + private final SDKConfiguration sdkConfiguration; + + public RefreshItemsMetadataRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RefreshItemsMetadataRequestBuilder request(RefreshItemsMetadataRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public RefreshItemsMetadataResponse call() throws Exception { + + RequestOperation operation + = new RefreshItemsMetadata.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataResponse.java new file mode 100644 index 00000000..d6c01b3d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshItemsMetadataResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RefreshItemsMetadataResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RefreshItemsMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RefreshItemsMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshItemsMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshItemsMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshItemsMetadataResponse other = (RefreshItemsMetadataResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RefreshItemsMetadataResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RefreshItemsMetadataResponse build() { + + return new RefreshItemsMetadataResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistRequest.java new file mode 100644 index 00000000..de828b8b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistRequest.java @@ -0,0 +1,906 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class RefreshPlaylistRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; + + /** + * The generator item ID to act on + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=generatorId") + private long generatorId; + + /** + * The metadata item ID to act on + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=metadataId") + private long metadataId; + + /** + * The action to perform for this item on this optimizer queue + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=action") + private Action action; + + @JsonCreator + public RefreshPlaylistRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId, + long generatorId, + long metadataId, + Action action) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + Utils.checkNotNull(generatorId, "generatorId"); + Utils.checkNotNull(metadataId, "metadataId"); + Utils.checkNotNull(action, "action"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; + this.generatorId = generatorId; + this.metadataId = metadataId; + this.action = action; + } + + public RefreshPlaylistRequest( + long playlistId, + long generatorId, + long metadataId, + Action action) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId, + generatorId, metadataId, action); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; + } + + /** + * The generator item ID to act on + */ + @JsonIgnore + public long generatorId() { + return generatorId; + } + + /** + * The metadata item ID to act on + */ + @JsonIgnore + public long metadataId() { + return metadataId; + } + + /** + * The action to perform for this item on this optimizer queue + */ + @JsonIgnore + public Action action() { + return action; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RefreshPlaylistRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RefreshPlaylistRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public RefreshPlaylistRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public RefreshPlaylistRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public RefreshPlaylistRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public RefreshPlaylistRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public RefreshPlaylistRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public RefreshPlaylistRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public RefreshPlaylistRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public RefreshPlaylistRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public RefreshPlaylistRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public RefreshPlaylistRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public RefreshPlaylistRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public RefreshPlaylistRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public RefreshPlaylistRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public RefreshPlaylistRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public RefreshPlaylistRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public RefreshPlaylistRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public RefreshPlaylistRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public RefreshPlaylistRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public RefreshPlaylistRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public RefreshPlaylistRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public RefreshPlaylistRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + /** + * The generator item ID to act on + */ + public RefreshPlaylistRequest withGeneratorId(long generatorId) { + Utils.checkNotNull(generatorId, "generatorId"); + this.generatorId = generatorId; + return this; + } + + /** + * The metadata item ID to act on + */ + public RefreshPlaylistRequest withMetadataId(long metadataId) { + Utils.checkNotNull(metadataId, "metadataId"); + this.metadataId = metadataId; + return this; + } + + /** + * The action to perform for this item on this optimizer queue + */ + public RefreshPlaylistRequest withAction(Action action) { + Utils.checkNotNull(action, "action"); + this.action = action; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshPlaylistRequest other = (RefreshPlaylistRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId) && + Utils.enhancedDeepEquals(this.generatorId, other.generatorId) && + Utils.enhancedDeepEquals(this.metadataId, other.metadataId) && + Utils.enhancedDeepEquals(this.action, other.action); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + generatorId, metadataId, action); + } + + @Override + public String toString() { + return Utils.toString(RefreshPlaylistRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId, + "generatorId", generatorId, + "metadataId", metadataId, + "action", action); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; + + private Long generatorId; + + private Long metadataId; + + private Action action; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; + return this; + } + + + /** + * The generator item ID to act on + */ + public Builder generatorId(long generatorId) { + Utils.checkNotNull(generatorId, "generatorId"); + this.generatorId = generatorId; + return this; + } + + + /** + * The metadata item ID to act on + */ + public Builder metadataId(long metadataId) { + Utils.checkNotNull(metadataId, "metadataId"); + this.metadataId = metadataId; + return this; + } + + + /** + * The action to perform for this item on this optimizer queue + */ + public Builder action(Action action) { + Utils.checkNotNull(action, "action"); + this.action = action; + return this; + } + + public RefreshPlaylistRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new RefreshPlaylistRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId, + generatorId, metadataId, action); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistRequestBuilder.java new file mode 100644 index 00000000..8d137da9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.RefreshPlaylist; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class RefreshPlaylistRequestBuilder { + + private RefreshPlaylistRequest request; + private final SDKConfiguration sdkConfiguration; + + public RefreshPlaylistRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RefreshPlaylistRequestBuilder request(RefreshPlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public RefreshPlaylistResponse call() throws Exception { + + RequestOperation operation + = new RefreshPlaylist.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistResponse.java new file mode 100644 index 00000000..b04c322e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshPlaylistResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RefreshPlaylistResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RefreshPlaylistResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RefreshPlaylistResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshPlaylistResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshPlaylistResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshPlaylistResponse other = (RefreshPlaylistResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RefreshPlaylistResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RefreshPlaylistResponse build() { + + return new RefreshPlaylistResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshProvidersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshProvidersRequestBuilder.java new file mode 100644 index 00000000..2d114450 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshProvidersRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.RefreshProviders; +import java.lang.Exception; + +public class RefreshProvidersRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public RefreshProvidersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RefreshProvidersResponse call() throws Exception { + + RequestlessOperation operation + = new RefreshProviders.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshProvidersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshProvidersResponse.java new file mode 100644 index 00000000..30f6a2e9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshProvidersResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RefreshProvidersResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RefreshProvidersResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RefreshProvidersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshProvidersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshProvidersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshProvidersResponse other = (RefreshProvidersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RefreshProvidersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RefreshProvidersResponse build() { + + return new RefreshProvidersResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionRequest.java new file mode 100644 index 00000000..58aafb5c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionRequest.java @@ -0,0 +1,903 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class RefreshSectionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * Whether the update of metadata and items should be performed even if modification dates indicate the items have not change + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=force") + private Optional force; + + /** + * Restrict refresh to the specified path + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=path") + private Optional path; + + @JsonCreator + public RefreshSectionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + Optional force, + Optional path) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(force, "force"); + Utils.checkNotNull(path, "path"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.force = force; + this.path = path; + } + + public RefreshSectionRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * Whether the update of metadata and items should be performed even if modification dates indicate the items have not change + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional force() { + return (Optional) force; + } + + /** + * Restrict refresh to the specified path + */ + @JsonIgnore + public Optional path() { + return path; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RefreshSectionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RefreshSectionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public RefreshSectionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public RefreshSectionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public RefreshSectionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public RefreshSectionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public RefreshSectionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public RefreshSectionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public RefreshSectionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public RefreshSectionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public RefreshSectionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public RefreshSectionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public RefreshSectionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public RefreshSectionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public RefreshSectionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public RefreshSectionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public RefreshSectionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public RefreshSectionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public RefreshSectionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public RefreshSectionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public RefreshSectionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public RefreshSectionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public RefreshSectionRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * Whether the update of metadata and items should be performed even if modification dates indicate the items have not change + */ + public RefreshSectionRequest withForce(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + + /** + * Whether the update of metadata and items should be performed even if modification dates indicate the items have not change + */ + public RefreshSectionRequest withForce(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + /** + * Restrict refresh to the specified path + */ + public RefreshSectionRequest withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + + /** + * Restrict refresh to the specified path + */ + public RefreshSectionRequest withPath(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshSectionRequest other = (RefreshSectionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.force, other.force) && + Utils.enhancedDeepEquals(this.path, other.path); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + force, path); + } + + @Override + public String toString() { + return Utils.toString(RefreshSectionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "force", force, + "path", path); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Optional force = Optional.empty(); + + private Optional path = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * Whether the update of metadata and items should be performed even if modification dates indicate the items have not change + */ + public Builder force(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + /** + * Whether the update of metadata and items should be performed even if modification dates indicate the items have not change + */ + public Builder force(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + + /** + * Restrict refresh to the specified path + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + /** + * Restrict refresh to the specified path + */ + public Builder path(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + public RefreshSectionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new RefreshSectionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + force, path); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionRequestBuilder.java new file mode 100644 index 00000000..d246e7e2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.RefreshSection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class RefreshSectionRequestBuilder { + + private RefreshSectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public RefreshSectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RefreshSectionRequestBuilder request(RefreshSectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public RefreshSectionResponse call() throws Exception { + + RequestOperation operation + = new RefreshSection.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionResponse.java new file mode 100644 index 00000000..08569a83 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RefreshSectionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RefreshSectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RefreshSectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshSectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshSectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshSectionResponse other = (RefreshSectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RefreshSectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RefreshSectionResponse build() { + + return new RefreshSectionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataRequest.java new file mode 100644 index 00000000..67fe052f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataRequest.java @@ -0,0 +1,798 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +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.Optional; + + +public class RefreshSectionsMetadataRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Force refresh of metadata + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=force") + private Optional force; + + @JsonCreator + public RefreshSectionsMetadataRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional force) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(force, "force"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.force = force; + } + + public RefreshSectionsMetadataRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Force refresh of metadata + */ + @JsonIgnore + public Optional force() { + return force; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RefreshSectionsMetadataRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RefreshSectionsMetadataRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public RefreshSectionsMetadataRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public RefreshSectionsMetadataRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public RefreshSectionsMetadataRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public RefreshSectionsMetadataRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public RefreshSectionsMetadataRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public RefreshSectionsMetadataRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public RefreshSectionsMetadataRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public RefreshSectionsMetadataRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public RefreshSectionsMetadataRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public RefreshSectionsMetadataRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public RefreshSectionsMetadataRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public RefreshSectionsMetadataRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public RefreshSectionsMetadataRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public RefreshSectionsMetadataRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public RefreshSectionsMetadataRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public RefreshSectionsMetadataRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public RefreshSectionsMetadataRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public RefreshSectionsMetadataRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public RefreshSectionsMetadataRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public RefreshSectionsMetadataRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Force refresh of metadata + */ + public RefreshSectionsMetadataRequest withForce(boolean force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + + /** + * Force refresh of metadata + */ + public RefreshSectionsMetadataRequest withForce(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshSectionsMetadataRequest other = (RefreshSectionsMetadataRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.force, other.force); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, force); + } + + @Override + public String toString() { + return Utils.toString(RefreshSectionsMetadataRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "force", force); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional force = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Force refresh of metadata + */ + public Builder force(boolean force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + /** + * Force refresh of metadata + */ + public Builder force(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + public RefreshSectionsMetadataRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new RefreshSectionsMetadataRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, force); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataRequestBuilder.java new file mode 100644 index 00000000..9827005c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.RefreshSectionsMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class RefreshSectionsMetadataRequestBuilder { + + private RefreshSectionsMetadataRequest request; + private final SDKConfiguration sdkConfiguration; + + public RefreshSectionsMetadataRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RefreshSectionsMetadataRequestBuilder request(RefreshSectionsMetadataRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public RefreshSectionsMetadataResponse call() throws Exception { + + RequestOperation operation + = new RefreshSectionsMetadata.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataResponse.java new file mode 100644 index 00000000..2b1e9523 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RefreshSectionsMetadataResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RefreshSectionsMetadataResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RefreshSectionsMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RefreshSectionsMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshSectionsMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshSectionsMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshSectionsMetadataResponse other = (RefreshSectionsMetadataResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RefreshSectionsMetadataResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RefreshSectionsMetadataResponse build() { + + return new RefreshSectionsMetadataResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Release.java b/src/main/java/dev/plexapi/sdk/models/operations/Release.java index 02710fe5..e37f2f48 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Release.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Release.java @@ -11,60 +11,83 @@ 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.Optional; public class Release { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("version") - private Optional version; - - + /** + * A list of what has been added in this version + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("added") private Optional added; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("fixed") - private Optional fixed; - - + /** + * The URL of where this update is available + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("downloadURL") private Optional downloadURL; + /** + * A list of what has been fixed in this version + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("fixed") + private Optional fixed; + /** + * The URL key of the update + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * The status of this update. + * + *

- available - This release is available + * - downloading - This release is downloading + * - downloaded - This release has been downloaded + * - installing - This release is installing + * - tonight - This release will be installed tonight + * - skipped - This release has been skipped + * - error - This release has an error + * - notify - This release is only notifying it is available (typically because it cannot be installed on this setup) + * - done - This release is complete + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("state") - private Optional state; + private Optional state; + + /** + * The version available + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; @JsonCreator public Release( - @JsonProperty("key") Optional key, - @JsonProperty("version") Optional version, @JsonProperty("added") Optional added, - @JsonProperty("fixed") Optional fixed, @JsonProperty("downloadURL") Optional downloadURL, - @JsonProperty("state") Optional state) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(version, "version"); + @JsonProperty("fixed") Optional fixed, + @JsonProperty("key") Optional key, + @JsonProperty("state") Optional state, + @JsonProperty("version") Optional version) { Utils.checkNotNull(added, "added"); - Utils.checkNotNull(fixed, "fixed"); Utils.checkNotNull(downloadURL, "downloadURL"); + Utils.checkNotNull(fixed, "fixed"); + Utils.checkNotNull(key, "key"); Utils.checkNotNull(state, "state"); - this.key = key; - this.version = version; + Utils.checkNotNull(version, "version"); this.added = added; - this.fixed = fixed; this.downloadURL = downloadURL; + this.fixed = fixed; + this.key = key; this.state = state; + this.version = version; } public Release() { @@ -72,34 +95,63 @@ public class Release { Optional.empty(), Optional.empty(), Optional.empty()); } - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional version() { - return version; - } - + /** + * A list of what has been added in this version + */ @JsonIgnore public Optional added() { return added; } - @JsonIgnore - public Optional fixed() { - return fixed; - } - + /** + * The URL of where this update is available + */ @JsonIgnore public Optional downloadURL() { return downloadURL; } + /** + * A list of what has been fixed in this version + */ @JsonIgnore - public Optional state() { - return state; + public Optional fixed() { + return fixed; + } + + /** + * The URL key of the update + */ + @JsonIgnore + public Optional key() { + return key; + } + + /** + * The status of this update. + * + *

- available - This release is available + * - downloading - This release is downloading + * - downloaded - This release has been downloaded + * - installing - This release is installing + * - tonight - This release will be installed tonight + * - skipped - This release has been skipped + * - error - This release has an error + * - notify - This release is only notifying it is available (typically because it cannot be installed on this setup) + * - done - This release is complete + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional state() { + return (Optional) state; + } + + /** + * The version available + */ + @JsonIgnore + public Optional version() { + return version; } public static Builder builder() { @@ -107,32 +159,9 @@ public class Release { } - public Release withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public Release withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Release withVersion(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - - public Release withVersion(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - + /** + * A list of what has been added in this version + */ public Release withAdded(String added) { Utils.checkNotNull(added, "added"); this.added = Optional.ofNullable(added); @@ -140,25 +169,18 @@ public class Release { } + /** + * A list of what has been added in this version + */ public Release withAdded(Optional added) { Utils.checkNotNull(added, "added"); this.added = added; return this; } - public Release withFixed(String fixed) { - Utils.checkNotNull(fixed, "fixed"); - this.fixed = Optional.ofNullable(fixed); - return this; - } - - - public Release withFixed(Optional fixed) { - Utils.checkNotNull(fixed, "fixed"); - this.fixed = fixed; - return this; - } - + /** + * The URL of where this update is available + */ public Release withDownloadURL(String downloadURL) { Utils.checkNotNull(downloadURL, "downloadURL"); this.downloadURL = Optional.ofNullable(downloadURL); @@ -166,25 +188,111 @@ public class Release { } + /** + * The URL of where this update is available + */ public Release withDownloadURL(Optional downloadURL) { Utils.checkNotNull(downloadURL, "downloadURL"); this.downloadURL = downloadURL; return this; } - public Release withState(String state) { + /** + * A list of what has been fixed in this version + */ + public Release withFixed(String fixed) { + Utils.checkNotNull(fixed, "fixed"); + this.fixed = Optional.ofNullable(fixed); + return this; + } + + + /** + * A list of what has been fixed in this version + */ + public Release withFixed(Optional fixed) { + Utils.checkNotNull(fixed, "fixed"); + this.fixed = fixed; + return this; + } + + /** + * The URL key of the update + */ + public Release withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The URL key of the update + */ + public Release withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The status of this update. + * + *

- available - This release is available + * - downloading - This release is downloading + * - downloaded - This release has been downloaded + * - installing - This release is installing + * - tonight - This release will be installed tonight + * - skipped - This release has been skipped + * - error - This release has an error + * - notify - This release is only notifying it is available (typically because it cannot be installed on this setup) + * - done - This release is complete + */ + public Release withState(GetUpdatesStatusState state) { Utils.checkNotNull(state, "state"); this.state = Optional.ofNullable(state); return this; } - public Release withState(Optional state) { + /** + * The status of this update. + * + *

- available - This release is available + * - downloading - This release is downloading + * - downloaded - This release has been downloaded + * - installing - This release is installing + * - tonight - This release will be installed tonight + * - skipped - This release has been skipped + * - error - This release has an error + * - notify - This release is only notifying it is available (typically because it cannot be installed on this setup) + * - done - This release is complete + */ + public Release withState(Optional state) { Utils.checkNotNull(state, "state"); this.state = state; return this; } + /** + * The version available + */ + public Release withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version available + */ + public Release withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -195,84 +303,64 @@ public class Release { } Release other = (Release) o; return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.version, other.version) && Utils.enhancedDeepEquals(this.added, other.added) && - Utils.enhancedDeepEquals(this.fixed, other.fixed) && Utils.enhancedDeepEquals(this.downloadURL, other.downloadURL) && - Utils.enhancedDeepEquals(this.state, other.state); + Utils.enhancedDeepEquals(this.fixed, other.fixed) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.state, other.state) && + Utils.enhancedDeepEquals(this.version, other.version); } @Override public int hashCode() { return Utils.enhancedHash( - key, version, added, - fixed, downloadURL, state); + added, downloadURL, fixed, + key, state, version); } @Override public String toString() { return Utils.toString(Release.class, - "key", key, - "version", version, "added", added, - "fixed", fixed, "downloadURL", downloadURL, - "state", state); + "fixed", fixed, + "key", key, + "state", state, + "version", version); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional key = Optional.empty(); - - private Optional version = Optional.empty(); - private Optional added = Optional.empty(); - private Optional fixed = Optional.empty(); - private Optional downloadURL = Optional.empty(); - private Optional state = Optional.empty(); + private Optional fixed = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional state = Optional.empty(); + + private Optional version = 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 version(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - public Builder version(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - + /** + * A list of what has been added in this version + */ public Builder added(String added) { Utils.checkNotNull(added, "added"); this.added = Optional.ofNullable(added); return this; } + /** + * A list of what has been added in this version + */ public Builder added(Optional added) { Utils.checkNotNull(added, "added"); this.added = added; @@ -280,25 +368,18 @@ public class Release { } - public Builder fixed(String fixed) { - Utils.checkNotNull(fixed, "fixed"); - this.fixed = Optional.ofNullable(fixed); - return this; - } - - public Builder fixed(Optional fixed) { - Utils.checkNotNull(fixed, "fixed"); - this.fixed = fixed; - return this; - } - - + /** + * The URL of where this update is available + */ public Builder downloadURL(String downloadURL) { Utils.checkNotNull(downloadURL, "downloadURL"); this.downloadURL = Optional.ofNullable(downloadURL); return this; } + /** + * The URL of where this update is available + */ public Builder downloadURL(Optional downloadURL) { Utils.checkNotNull(downloadURL, "downloadURL"); this.downloadURL = downloadURL; @@ -306,23 +387,106 @@ public class Release { } - public Builder state(String state) { + /** + * A list of what has been fixed in this version + */ + public Builder fixed(String fixed) { + Utils.checkNotNull(fixed, "fixed"); + this.fixed = Optional.ofNullable(fixed); + return this; + } + + /** + * A list of what has been fixed in this version + */ + public Builder fixed(Optional fixed) { + Utils.checkNotNull(fixed, "fixed"); + this.fixed = fixed; + return this; + } + + + /** + * The URL key of the update + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The URL key of the update + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * The status of this update. + * + *

- available - This release is available + * - downloading - This release is downloading + * - downloaded - This release has been downloaded + * - installing - This release is installing + * - tonight - This release will be installed tonight + * - skipped - This release has been skipped + * - error - This release has an error + * - notify - This release is only notifying it is available (typically because it cannot be installed on this setup) + * - done - This release is complete + */ + public Builder state(GetUpdatesStatusState state) { Utils.checkNotNull(state, "state"); this.state = Optional.ofNullable(state); return this; } - public Builder state(Optional state) { + /** + * The status of this update. + * + *

- available - This release is available + * - downloading - This release is downloading + * - downloaded - This release has been downloaded + * - installing - This release is installing + * - tonight - This release will be installed tonight + * - skipped - This release has been skipped + * - error - This release has an error + * - notify - This release is only notifying it is available (typically because it cannot be installed on this setup) + * - done - This release is complete + */ + public Builder state(Optional state) { Utils.checkNotNull(state, "state"); this.state = state; return this; } + + /** + * The version available + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version available + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + public Release build() { return new Release( - key, version, added, - fixed, downloadURL, state); + added, downloadURL, fixed, + key, state, version); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideRequest.java new file mode 100644 index 00000000..c60024d2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ReloadGuideRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the DVR. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dvrId") + private long dvrId; + + @JsonCreator + public ReloadGuideRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long dvrId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(dvrId, "dvrId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.dvrId = dvrId; + } + + public ReloadGuideRequest( + long dvrId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), dvrId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the DVR. + */ + @JsonIgnore + public long dvrId() { + return dvrId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ReloadGuideRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ReloadGuideRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ReloadGuideRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ReloadGuideRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ReloadGuideRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ReloadGuideRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ReloadGuideRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ReloadGuideRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ReloadGuideRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ReloadGuideRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ReloadGuideRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ReloadGuideRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ReloadGuideRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ReloadGuideRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ReloadGuideRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ReloadGuideRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ReloadGuideRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ReloadGuideRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ReloadGuideRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ReloadGuideRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ReloadGuideRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ReloadGuideRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the DVR. + */ + public ReloadGuideRequest withDvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReloadGuideRequest other = (ReloadGuideRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.dvrId, other.dvrId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId); + } + + @Override + public String toString() { + return Utils.toString(ReloadGuideRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "dvrId", dvrId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long dvrId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the DVR. + */ + public Builder dvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + public ReloadGuideRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ReloadGuideRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideRequestBuilder.java new file mode 100644 index 00000000..602973b1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ReloadGuide; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ReloadGuideRequestBuilder { + + private ReloadGuideRequest request; + private final SDKConfiguration sdkConfiguration; + + public ReloadGuideRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ReloadGuideRequestBuilder request(ReloadGuideRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ReloadGuideResponse call() throws Exception { + + RequestOperation operation + = new ReloadGuide.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideResponse.java new file mode 100644 index 00000000..8f01fe50 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ReloadGuideResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; + + +public class ReloadGuideResponse 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; + + + private Map> headers; + + @JsonCreator + public ReloadGuideResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.headers = headers; + } + + /** + * 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; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ReloadGuideResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ReloadGuideResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ReloadGuideResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ReloadGuideResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReloadGuideResponse other = (ReloadGuideResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(ReloadGuideResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ReloadGuideResponse build() { + + return new ReloadGuideResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRDVR.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRDVR.java new file mode 100644 index 00000000..098e4c0f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRDVR.java @@ -0,0 +1,290 @@ +/* + * 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.models.shared.Device; +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.Optional; + + +public class RemoveDeviceFromDVRDVR { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineup") + private Optional lineup; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public RemoveDeviceFromDVRDVR( + @JsonProperty("Device") Optional> device, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("lineup") Optional lineup, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(lineup, "lineup"); + Utils.checkNotNull(uuid, "uuid"); + this.device = device; + this.key = key; + this.language = language; + this.lineup = lineup; + this.uuid = uuid; + } + + public RemoveDeviceFromDVRDVR() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> device() { + return (Optional>) device; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional lineup() { + return lineup; + } + + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public RemoveDeviceFromDVRDVR withDevice(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public RemoveDeviceFromDVRDVR withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public RemoveDeviceFromDVRDVR withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public RemoveDeviceFromDVRDVR withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public RemoveDeviceFromDVRDVR withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public RemoveDeviceFromDVRDVR withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public RemoveDeviceFromDVRDVR withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + public RemoveDeviceFromDVRDVR withLineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public RemoveDeviceFromDVRDVR withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + public RemoveDeviceFromDVRDVR withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDeviceFromDVRDVR other = (RemoveDeviceFromDVRDVR) o; + return + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.lineup, other.lineup) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + device, key, language, + lineup, uuid); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceFromDVRDVR.class, + "device", device, + "key", key, + "language", language, + "lineup", lineup, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> device = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional lineup = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder device(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + 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 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 lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + public Builder lineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public RemoveDeviceFromDVRDVR build() { + + return new RemoveDeviceFromDVRDVR( + device, key, language, + lineup, uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRDVRsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRDVRsMediaContainer.java new file mode 100644 index 00000000..f5999d61 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRDVRsMediaContainer.java @@ -0,0 +1,344 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * RemoveDeviceFromDVRDVRsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class RemoveDeviceFromDVRDVRsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public RemoveDeviceFromDVRDVRsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(status, "status"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.status = status; + } + + public RemoveDeviceFromDVRDVRsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + public RemoveDeviceFromDVRDVRsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public RemoveDeviceFromDVRDVRsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public RemoveDeviceFromDVRDVRsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public RemoveDeviceFromDVRDVRsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public RemoveDeviceFromDVRDVRsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public RemoveDeviceFromDVRDVRsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public RemoveDeviceFromDVRDVRsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public RemoveDeviceFromDVRDVRsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public RemoveDeviceFromDVRDVRsMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public RemoveDeviceFromDVRDVRsMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDeviceFromDVRDVRsMediaContainer other = (RemoveDeviceFromDVRDVRsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, status); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceFromDVRDVRsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public RemoveDeviceFromDVRDVRsMediaContainer build() { + + return new RemoveDeviceFromDVRDVRsMediaContainer( + identifier, offset, size, + totalSize, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRMediaContainer.java new file mode 100644 index 00000000..eca5d597 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRMediaContainer.java @@ -0,0 +1,158 @@ +/* + * 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.Optional; + + +public class RemoveDeviceFromDVRMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DVR") + private Optional> dvr; + + @JsonCreator + public RemoveDeviceFromDVRMediaContainer( + @JsonProperty("MediaContainer") Optional mediaContainer, + @JsonProperty("DVR") Optional> dvr) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + Utils.checkNotNull(dvr, "dvr"); + this.mediaContainer = mediaContainer; + this.dvr = dvr; + } + + public RemoveDeviceFromDVRMediaContainer() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> dvr() { + return (Optional>) dvr; + } + + public static Builder builder() { + return new Builder(); + } + + + public RemoveDeviceFromDVRMediaContainer withMediaContainer(RemoveDeviceFromDVRDVRsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public RemoveDeviceFromDVRMediaContainer withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public RemoveDeviceFromDVRMediaContainer withDvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + + public RemoveDeviceFromDVRMediaContainer withDvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDeviceFromDVRMediaContainer other = (RemoveDeviceFromDVRMediaContainer) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer) && + Utils.enhancedDeepEquals(this.dvr, other.dvr); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer, dvr); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceFromDVRMediaContainer.class, + "mediaContainer", mediaContainer, + "dvr", dvr); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Optional> dvr = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(RemoveDeviceFromDVRDVRsMediaContainer 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 Builder dvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + public Builder dvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + public RemoveDeviceFromDVRMediaContainer build() { + + return new RemoveDeviceFromDVRMediaContainer( + mediaContainer, dvr); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRRequest.java new file mode 100644 index 00000000..35a76018 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class RemoveDeviceFromDVRRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the DVR. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dvrId") + private long dvrId; + + /** + * The ID of the device to add. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + @JsonCreator + public RemoveDeviceFromDVRRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long dvrId, + long deviceId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(dvrId, "dvrId"); + Utils.checkNotNull(deviceId, "deviceId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.dvrId = dvrId; + this.deviceId = deviceId; + } + + public RemoveDeviceFromDVRRequest( + long dvrId, + long deviceId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), dvrId, + deviceId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the DVR. + */ + @JsonIgnore + public long dvrId() { + return dvrId; + } + + /** + * The ID of the device to add. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RemoveDeviceFromDVRRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RemoveDeviceFromDVRRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public RemoveDeviceFromDVRRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public RemoveDeviceFromDVRRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public RemoveDeviceFromDVRRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public RemoveDeviceFromDVRRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public RemoveDeviceFromDVRRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public RemoveDeviceFromDVRRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public RemoveDeviceFromDVRRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public RemoveDeviceFromDVRRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public RemoveDeviceFromDVRRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public RemoveDeviceFromDVRRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public RemoveDeviceFromDVRRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public RemoveDeviceFromDVRRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public RemoveDeviceFromDVRRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public RemoveDeviceFromDVRRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public RemoveDeviceFromDVRRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public RemoveDeviceFromDVRRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public RemoveDeviceFromDVRRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public RemoveDeviceFromDVRRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public RemoveDeviceFromDVRRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public RemoveDeviceFromDVRRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the DVR. + */ + public RemoveDeviceFromDVRRequest withDvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + /** + * The ID of the device to add. + */ + public RemoveDeviceFromDVRRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDeviceFromDVRRequest other = (RemoveDeviceFromDVRRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.dvrId, other.dvrId) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + deviceId); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceFromDVRRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "dvrId", dvrId, + "deviceId", deviceId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long dvrId; + + private Long deviceId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the DVR. + */ + public Builder dvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + + /** + * The ID of the device to add. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + public RemoveDeviceFromDVRRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new RemoveDeviceFromDVRRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + deviceId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRRequestBuilder.java new file mode 100644 index 00000000..d8b9ffa2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.RemoveDeviceFromDVR; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class RemoveDeviceFromDVRRequestBuilder { + + private RemoveDeviceFromDVRRequest request; + private final SDKConfiguration sdkConfiguration; + + public RemoveDeviceFromDVRRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RemoveDeviceFromDVRRequestBuilder request(RemoveDeviceFromDVRRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public RemoveDeviceFromDVRResponse call() throws Exception { + + RequestOperation operation + = new RemoveDeviceFromDVR.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRResponse.java new file mode 100644 index 00000000..1598d411 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class RemoveDeviceFromDVRResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public RemoveDeviceFromDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public RemoveDeviceFromDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RemoveDeviceFromDVRResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RemoveDeviceFromDVRResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RemoveDeviceFromDVRResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public RemoveDeviceFromDVRResponse withObject(RemoveDeviceFromDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public RemoveDeviceFromDVRResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public RemoveDeviceFromDVRResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDeviceFromDVRResponse other = (RemoveDeviceFromDVRResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceFromDVRResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(RemoveDeviceFromDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public RemoveDeviceFromDVRResponse build() { + + return new RemoveDeviceFromDVRResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRResponseBody.java new file mode 100644 index 00000000..b2c39c78 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceFromDVRResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * RemoveDeviceFromDVRResponseBody + * + *

OK + */ +public class RemoveDeviceFromDVRResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public RemoveDeviceFromDVRResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public RemoveDeviceFromDVRResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public RemoveDeviceFromDVRResponseBody withMediaContainer(RemoveDeviceFromDVRMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public RemoveDeviceFromDVRResponseBody 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; + } + RemoveDeviceFromDVRResponseBody other = (RemoveDeviceFromDVRResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceFromDVRResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(RemoveDeviceFromDVRMediaContainer 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 RemoveDeviceFromDVRResponseBody build() { + + return new RemoveDeviceFromDVRResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceMediaContainer.java new file mode 100644 index 00000000..ffcd987c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceMediaContainer.java @@ -0,0 +1,370 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * RemoveDeviceMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class RemoveDeviceMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public RemoveDeviceMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("message") Optional message, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(status, "status"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.message = message; + this.status = status; + } + + public RemoveDeviceMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @JsonIgnore + public Optional message() { + return message; + } + + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + public RemoveDeviceMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public RemoveDeviceMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public RemoveDeviceMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public RemoveDeviceMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public RemoveDeviceMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public RemoveDeviceMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public RemoveDeviceMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public RemoveDeviceMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public RemoveDeviceMediaContainer withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + + public RemoveDeviceMediaContainer withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public RemoveDeviceMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + public RemoveDeviceMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDeviceMediaContainer other = (RemoveDeviceMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, message, status); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "message", message, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional message = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + public Builder message(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public RemoveDeviceMediaContainer build() { + + return new RemoveDeviceMediaContainer( + identifier, offset, size, + totalSize, message, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceRequest.java new file mode 100644 index 00000000..066934b7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class RemoveDeviceRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the device. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + @JsonCreator + public RemoveDeviceRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long deviceId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceId, "deviceId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceId = deviceId; + } + + public RemoveDeviceRequest( + long deviceId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the device. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RemoveDeviceRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RemoveDeviceRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public RemoveDeviceRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public RemoveDeviceRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public RemoveDeviceRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public RemoveDeviceRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public RemoveDeviceRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public RemoveDeviceRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public RemoveDeviceRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public RemoveDeviceRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public RemoveDeviceRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public RemoveDeviceRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public RemoveDeviceRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public RemoveDeviceRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public RemoveDeviceRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public RemoveDeviceRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public RemoveDeviceRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public RemoveDeviceRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public RemoveDeviceRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public RemoveDeviceRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public RemoveDeviceRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public RemoveDeviceRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the device. + */ + public RemoveDeviceRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDeviceRequest other = (RemoveDeviceRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceId", deviceId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long deviceId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the device. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + public RemoveDeviceRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new RemoveDeviceRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceRequestBuilder.java new file mode 100644 index 00000000..4c5bbd03 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.RemoveDevice; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class RemoveDeviceRequestBuilder { + + private RemoveDeviceRequest request; + private final SDKConfiguration sdkConfiguration; + + public RemoveDeviceRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RemoveDeviceRequestBuilder request(RemoveDeviceRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public RemoveDeviceResponse call() throws Exception { + + RequestOperation operation + = new RemoveDevice.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceResponse.java new file mode 100644 index 00000000..5ad4c9d3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class RemoveDeviceResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public RemoveDeviceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public RemoveDeviceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RemoveDeviceResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RemoveDeviceResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RemoveDeviceResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public RemoveDeviceResponse withObject(RemoveDeviceResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public RemoveDeviceResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public RemoveDeviceResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDeviceResponse other = (RemoveDeviceResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(RemoveDeviceResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public RemoveDeviceResponse build() { + + return new RemoveDeviceResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceResponseBody.java new file mode 100644 index 00000000..5a2b731c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDeviceResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * RemoveDeviceResponseBody + * + *

OK + */ +public class RemoveDeviceResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public RemoveDeviceResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public RemoveDeviceResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public RemoveDeviceResponseBody withMediaContainer(RemoveDeviceMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public RemoveDeviceResponseBody 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; + } + RemoveDeviceResponseBody other = (RemoveDeviceResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(RemoveDeviceMediaContainer 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 RemoveDeviceResponseBody build() { + + return new RemoveDeviceResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsRequest.java new file mode 100644 index 00000000..ff5f5e12 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsRequest.java @@ -0,0 +1,825 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class RemoveDownloadQueueItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The queue id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=queueId") + private long queueId; + + /** + * The item id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=itemId") + private List itemId; + + @JsonCreator + public RemoveDownloadQueueItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long queueId, + List itemId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(queueId, "queueId"); + Utils.checkNotNull(itemId, "itemId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.queueId = queueId; + this.itemId = itemId; + } + + public RemoveDownloadQueueItemsRequest( + long queueId, + List itemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), queueId, + itemId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The queue id + */ + @JsonIgnore + public long queueId() { + return queueId; + } + + /** + * The item id + */ + @JsonIgnore + public List itemId() { + return itemId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RemoveDownloadQueueItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RemoveDownloadQueueItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public RemoveDownloadQueueItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public RemoveDownloadQueueItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public RemoveDownloadQueueItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public RemoveDownloadQueueItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public RemoveDownloadQueueItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public RemoveDownloadQueueItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public RemoveDownloadQueueItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public RemoveDownloadQueueItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public RemoveDownloadQueueItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public RemoveDownloadQueueItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public RemoveDownloadQueueItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public RemoveDownloadQueueItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public RemoveDownloadQueueItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public RemoveDownloadQueueItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public RemoveDownloadQueueItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public RemoveDownloadQueueItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public RemoveDownloadQueueItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public RemoveDownloadQueueItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public RemoveDownloadQueueItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public RemoveDownloadQueueItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The queue id + */ + public RemoveDownloadQueueItemsRequest withQueueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + /** + * The item id + */ + public RemoveDownloadQueueItemsRequest withItemId(List itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDownloadQueueItemsRequest other = (RemoveDownloadQueueItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.queueId, other.queueId) && + Utils.enhancedDeepEquals(this.itemId, other.itemId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + itemId); + } + + @Override + public String toString() { + return Utils.toString(RemoveDownloadQueueItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "queueId", queueId, + "itemId", itemId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long queueId; + + private List itemId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The queue id + */ + public Builder queueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + + /** + * The item id + */ + public Builder itemId(List itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + public RemoveDownloadQueueItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new RemoveDownloadQueueItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + itemId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsRequestBuilder.java new file mode 100644 index 00000000..84ff2a12 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.RemoveDownloadQueueItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class RemoveDownloadQueueItemsRequestBuilder { + + private RemoveDownloadQueueItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public RemoveDownloadQueueItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RemoveDownloadQueueItemsRequestBuilder request(RemoveDownloadQueueItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public RemoveDownloadQueueItemsResponse call() throws Exception { + + RequestOperation operation + = new RemoveDownloadQueueItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsResponse.java new file mode 100644 index 00000000..7264b8ce --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RemoveDownloadQueueItemsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RemoveDownloadQueueItemsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RemoveDownloadQueueItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RemoveDownloadQueueItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RemoveDownloadQueueItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RemoveDownloadQueueItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDownloadQueueItemsResponse other = (RemoveDownloadQueueItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RemoveDownloadQueueItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RemoveDownloadQueueItemsResponse build() { + + return new RemoveDownloadQueueItemsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionRequest.java new file mode 100644 index 00000000..95e2c2be --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionRequest.java @@ -0,0 +1,831 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ReorderSubscriptionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriptionId") + private long subscriptionId; + + /** + * The subscription to move this sub after. If missing will insert at the beginning of the list + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=after") + private Optional after; + + @JsonCreator + public ReorderSubscriptionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long subscriptionId, + Optional after) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(subscriptionId, "subscriptionId"); + Utils.checkNotNull(after, "after"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.subscriptionId = subscriptionId; + this.after = after; + } + + public ReorderSubscriptionRequest( + long subscriptionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), subscriptionId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public long subscriptionId() { + return subscriptionId; + } + + /** + * The subscription to move this sub after. If missing will insert at the beginning of the list + */ + @JsonIgnore + public Optional after() { + return after; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ReorderSubscriptionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ReorderSubscriptionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ReorderSubscriptionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ReorderSubscriptionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ReorderSubscriptionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ReorderSubscriptionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ReorderSubscriptionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ReorderSubscriptionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ReorderSubscriptionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ReorderSubscriptionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ReorderSubscriptionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ReorderSubscriptionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ReorderSubscriptionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ReorderSubscriptionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ReorderSubscriptionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ReorderSubscriptionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ReorderSubscriptionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ReorderSubscriptionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ReorderSubscriptionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ReorderSubscriptionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ReorderSubscriptionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ReorderSubscriptionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public ReorderSubscriptionRequest withSubscriptionId(long subscriptionId) { + Utils.checkNotNull(subscriptionId, "subscriptionId"); + this.subscriptionId = subscriptionId; + return this; + } + + /** + * The subscription to move this sub after. If missing will insert at the beginning of the list + */ + public ReorderSubscriptionRequest withAfter(long after) { + Utils.checkNotNull(after, "after"); + this.after = Optional.ofNullable(after); + return this; + } + + + /** + * The subscription to move this sub after. If missing will insert at the beginning of the list + */ + public ReorderSubscriptionRequest withAfter(Optional after) { + Utils.checkNotNull(after, "after"); + this.after = after; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReorderSubscriptionRequest other = (ReorderSubscriptionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.subscriptionId, other.subscriptionId) && + Utils.enhancedDeepEquals(this.after, other.after); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, subscriptionId, + after); + } + + @Override + public String toString() { + return Utils.toString(ReorderSubscriptionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "subscriptionId", subscriptionId, + "after", after); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long subscriptionId; + + private Optional after = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder subscriptionId(long subscriptionId) { + Utils.checkNotNull(subscriptionId, "subscriptionId"); + this.subscriptionId = subscriptionId; + return this; + } + + + /** + * The subscription to move this sub after. If missing will insert at the beginning of the list + */ + public Builder after(long after) { + Utils.checkNotNull(after, "after"); + this.after = Optional.ofNullable(after); + return this; + } + + /** + * The subscription to move this sub after. If missing will insert at the beginning of the list + */ + public Builder after(Optional after) { + Utils.checkNotNull(after, "after"); + this.after = after; + return this; + } + + public ReorderSubscriptionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ReorderSubscriptionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, subscriptionId, + after); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionRequestBuilder.java new file mode 100644 index 00000000..be18e740 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ReorderSubscription; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ReorderSubscriptionRequestBuilder { + + private ReorderSubscriptionRequest request; + private final SDKConfiguration sdkConfiguration; + + public ReorderSubscriptionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ReorderSubscriptionRequestBuilder request(ReorderSubscriptionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ReorderSubscriptionResponse call() throws Exception { + + RequestOperation operation + = new ReorderSubscription.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionResponse.java new file mode 100644 index 00000000..2edd4b8f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ReorderSubscriptionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +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.Optional; + + +public class ReorderSubscriptionResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithSubscription; + + @JsonCreator + public ReorderSubscriptionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSubscription) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + } + + public ReorderSubscriptionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSubscription() { + return (Optional) mediaContainerWithSubscription; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ReorderSubscriptionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ReorderSubscriptionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ReorderSubscriptionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ReorderSubscriptionResponse withMediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + + /** + * OK + */ + public ReorderSubscriptionResponse withMediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReorderSubscriptionResponse other = (ReorderSubscriptionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSubscription, other.mediaContainerWithSubscription); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + @Override + public String toString() { + return Utils.toString(ReorderSubscriptionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSubscription", mediaContainerWithSubscription); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSubscription = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + public ReorderSubscriptionResponse build() { + + return new ReorderSubscriptionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ReportRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ReportRequest.java new file mode 100644 index 00000000..2e308cc0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ReportRequest.java @@ -0,0 +1,1643 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ReportRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The details key for the item. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") + private Optional key; + + /** + * The rating key attribute for the item. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=ratingKey") + private Optional ratingKey; + + /** + * The current state of the media. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=state") + private Optional state; + + /** + * If playing media from a play queue, the play queue's ID. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueItemID") + private Optional playQueueItemID; + + /** + * The current time offset of playback in ms. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=time") + private Optional time; + + /** + * The total duration of the item in ms. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=duration") + private Optional duration; + + /** + * When state is `stopped`, a flag indicating whether or not the client is going to continue playing anothe item. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=continuing") + private Optional continuing; + + /** + * Used when a sync client comes online and is syncing media timelines, holds the time at which the playback state was last updated. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=updated") + private Optional updated; + + /** + * Also used by sync clients, used to indicate that a timeline is being synced from being offline, as opposed to being "live". + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=offline") + private Optional offline; + + /** + * Time in seconds till first frame is displayed. Sent only on the first playing timeline request. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timeToFirstFrame") + private Optional timeToFirstFrame; + + /** + * Time in seconds spent buffering since last request. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timeStalled") + private Optional timeStalled; + + /** + * Bandwidth in kbps as estimated by the client. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=bandwidth") + private Optional bandwidth; + + /** + * Amount of time in seconds buffered by client. Omit if computed by `bufferedSize` below. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=bufferedTime") + private Optional bufferedTime; + + /** + * Size in kilobytes of data buffered by client. Omit if computed by `bufferedTime` above + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=bufferedSize") + private Optional bufferedSize; + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Session-Identifier") + private Optional xPlexSessionIdentifier; + + @JsonCreator + public ReportRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional key, + Optional ratingKey, + Optional state, + Optional playQueueItemID, + Optional time, + Optional duration, + Optional continuing, + Optional updated, + Optional offline, + Optional timeToFirstFrame, + Optional timeStalled, + Optional bandwidth, + Optional bufferedTime, + Optional bufferedSize, + Optional xPlexSessionIdentifier) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(state, "state"); + Utils.checkNotNull(playQueueItemID, "playQueueItemID"); + Utils.checkNotNull(time, "time"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(continuing, "continuing"); + Utils.checkNotNull(updated, "updated"); + Utils.checkNotNull(offline, "offline"); + Utils.checkNotNull(timeToFirstFrame, "timeToFirstFrame"); + Utils.checkNotNull(timeStalled, "timeStalled"); + Utils.checkNotNull(bandwidth, "bandwidth"); + Utils.checkNotNull(bufferedTime, "bufferedTime"); + Utils.checkNotNull(bufferedSize, "bufferedSize"); + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.key = key; + this.ratingKey = ratingKey; + this.state = state; + this.playQueueItemID = playQueueItemID; + this.time = time; + this.duration = duration; + this.continuing = continuing; + this.updated = updated; + this.offline = offline; + this.timeToFirstFrame = timeToFirstFrame; + this.timeStalled = timeStalled; + this.bandwidth = bandwidth; + this.bufferedTime = bufferedTime; + this.bufferedSize = bufferedSize; + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + } + + public ReportRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The details key for the item. + */ + @JsonIgnore + public Optional key() { + return key; + } + + /** + * The rating key attribute for the item. + */ + @JsonIgnore + public Optional ratingKey() { + return ratingKey; + } + + /** + * The current state of the media. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional state() { + return (Optional) state; + } + + /** + * If playing media from a play queue, the play queue's ID. + */ + @JsonIgnore + public Optional playQueueItemID() { + return playQueueItemID; + } + + /** + * The current time offset of playback in ms. + */ + @JsonIgnore + public Optional time() { + return time; + } + + /** + * The total duration of the item in ms. + */ + @JsonIgnore + public Optional duration() { + return duration; + } + + /** + * When state is `stopped`, a flag indicating whether or not the client is going to continue playing anothe item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional continuing() { + return (Optional) continuing; + } + + /** + * Used when a sync client comes online and is syncing media timelines, holds the time at which the playback state was last updated. + */ + @JsonIgnore + public Optional updated() { + return updated; + } + + /** + * Also used by sync clients, used to indicate that a timeline is being synced from being offline, as opposed to being "live". + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional offline() { + return (Optional) offline; + } + + /** + * Time in seconds till first frame is displayed. Sent only on the first playing timeline request. + */ + @JsonIgnore + public Optional timeToFirstFrame() { + return timeToFirstFrame; + } + + /** + * Time in seconds spent buffering since last request. + */ + @JsonIgnore + public Optional timeStalled() { + return timeStalled; + } + + /** + * Bandwidth in kbps as estimated by the client. + */ + @JsonIgnore + public Optional bandwidth() { + return bandwidth; + } + + /** + * Amount of time in seconds buffered by client. Omit if computed by `bufferedSize` below. + */ + @JsonIgnore + public Optional bufferedTime() { + return bufferedTime; + } + + /** + * Size in kilobytes of data buffered by client. Omit if computed by `bufferedTime` above + */ + @JsonIgnore + public Optional bufferedSize() { + return bufferedSize; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + @JsonIgnore + public Optional xPlexSessionIdentifier() { + return xPlexSessionIdentifier; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ReportRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ReportRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ReportRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ReportRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ReportRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ReportRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ReportRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ReportRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ReportRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ReportRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ReportRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ReportRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ReportRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ReportRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ReportRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ReportRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ReportRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ReportRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ReportRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ReportRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ReportRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ReportRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The details key for the item. + */ + public ReportRequest withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The details key for the item. + */ + public ReportRequest withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The rating key attribute for the item. + */ + public ReportRequest withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + /** + * The rating key attribute for the item. + */ + public ReportRequest withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The current state of the media. + */ + public ReportRequest withState(State state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + + /** + * The current state of the media. + */ + public ReportRequest withState(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + /** + * If playing media from a play queue, the play queue's ID. + */ + public ReportRequest withPlayQueueItemID(String playQueueItemID) { + Utils.checkNotNull(playQueueItemID, "playQueueItemID"); + this.playQueueItemID = Optional.ofNullable(playQueueItemID); + return this; + } + + + /** + * If playing media from a play queue, the play queue's ID. + */ + public ReportRequest withPlayQueueItemID(Optional playQueueItemID) { + Utils.checkNotNull(playQueueItemID, "playQueueItemID"); + this.playQueueItemID = playQueueItemID; + return this; + } + + /** + * The current time offset of playback in ms. + */ + public ReportRequest withTime(long time) { + Utils.checkNotNull(time, "time"); + this.time = Optional.ofNullable(time); + return this; + } + + + /** + * The current time offset of playback in ms. + */ + public ReportRequest withTime(Optional time) { + Utils.checkNotNull(time, "time"); + this.time = time; + return this; + } + + /** + * The total duration of the item in ms. + */ + public ReportRequest withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + /** + * The total duration of the item in ms. + */ + public ReportRequest withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * When state is `stopped`, a flag indicating whether or not the client is going to continue playing anothe item. + */ + public ReportRequest withContinuing(BoolInt continuing) { + Utils.checkNotNull(continuing, "continuing"); + this.continuing = Optional.ofNullable(continuing); + return this; + } + + + /** + * When state is `stopped`, a flag indicating whether or not the client is going to continue playing anothe item. + */ + public ReportRequest withContinuing(Optional continuing) { + Utils.checkNotNull(continuing, "continuing"); + this.continuing = continuing; + return this; + } + + /** + * Used when a sync client comes online and is syncing media timelines, holds the time at which the playback state was last updated. + */ + public ReportRequest withUpdated(long updated) { + Utils.checkNotNull(updated, "updated"); + this.updated = Optional.ofNullable(updated); + return this; + } + + + /** + * Used when a sync client comes online and is syncing media timelines, holds the time at which the playback state was last updated. + */ + public ReportRequest withUpdated(Optional updated) { + Utils.checkNotNull(updated, "updated"); + this.updated = updated; + return this; + } + + /** + * Also used by sync clients, used to indicate that a timeline is being synced from being offline, as opposed to being "live". + */ + public ReportRequest withOffline(BoolInt offline) { + Utils.checkNotNull(offline, "offline"); + this.offline = Optional.ofNullable(offline); + return this; + } + + + /** + * Also used by sync clients, used to indicate that a timeline is being synced from being offline, as opposed to being "live". + */ + public ReportRequest withOffline(Optional offline) { + Utils.checkNotNull(offline, "offline"); + this.offline = offline; + return this; + } + + /** + * Time in seconds till first frame is displayed. Sent only on the first playing timeline request. + */ + public ReportRequest withTimeToFirstFrame(long timeToFirstFrame) { + Utils.checkNotNull(timeToFirstFrame, "timeToFirstFrame"); + this.timeToFirstFrame = Optional.ofNullable(timeToFirstFrame); + return this; + } + + + /** + * Time in seconds till first frame is displayed. Sent only on the first playing timeline request. + */ + public ReportRequest withTimeToFirstFrame(Optional timeToFirstFrame) { + Utils.checkNotNull(timeToFirstFrame, "timeToFirstFrame"); + this.timeToFirstFrame = timeToFirstFrame; + return this; + } + + /** + * Time in seconds spent buffering since last request. + */ + public ReportRequest withTimeStalled(long timeStalled) { + Utils.checkNotNull(timeStalled, "timeStalled"); + this.timeStalled = Optional.ofNullable(timeStalled); + return this; + } + + + /** + * Time in seconds spent buffering since last request. + */ + public ReportRequest withTimeStalled(Optional timeStalled) { + Utils.checkNotNull(timeStalled, "timeStalled"); + this.timeStalled = timeStalled; + return this; + } + + /** + * Bandwidth in kbps as estimated by the client. + */ + public ReportRequest withBandwidth(long bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = Optional.ofNullable(bandwidth); + return this; + } + + + /** + * Bandwidth in kbps as estimated by the client. + */ + public ReportRequest withBandwidth(Optional bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + return this; + } + + /** + * Amount of time in seconds buffered by client. Omit if computed by `bufferedSize` below. + */ + public ReportRequest withBufferedTime(long bufferedTime) { + Utils.checkNotNull(bufferedTime, "bufferedTime"); + this.bufferedTime = Optional.ofNullable(bufferedTime); + return this; + } + + + /** + * Amount of time in seconds buffered by client. Omit if computed by `bufferedSize` below. + */ + public ReportRequest withBufferedTime(Optional bufferedTime) { + Utils.checkNotNull(bufferedTime, "bufferedTime"); + this.bufferedTime = bufferedTime; + return this; + } + + /** + * Size in kilobytes of data buffered by client. Omit if computed by `bufferedTime` above + */ + public ReportRequest withBufferedSize(long bufferedSize) { + Utils.checkNotNull(bufferedSize, "bufferedSize"); + this.bufferedSize = Optional.ofNullable(bufferedSize); + return this; + } + + + /** + * Size in kilobytes of data buffered by client. Omit if computed by `bufferedTime` above + */ + public ReportRequest withBufferedSize(Optional bufferedSize) { + Utils.checkNotNull(bufferedSize, "bufferedSize"); + this.bufferedSize = bufferedSize; + return this; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public ReportRequest withXPlexSessionIdentifier(String xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = Optional.ofNullable(xPlexSessionIdentifier); + return this; + } + + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public ReportRequest withXPlexSessionIdentifier(Optional xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportRequest other = (ReportRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.state, other.state) && + Utils.enhancedDeepEquals(this.playQueueItemID, other.playQueueItemID) && + Utils.enhancedDeepEquals(this.time, other.time) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.continuing, other.continuing) && + Utils.enhancedDeepEquals(this.updated, other.updated) && + Utils.enhancedDeepEquals(this.offline, other.offline) && + Utils.enhancedDeepEquals(this.timeToFirstFrame, other.timeToFirstFrame) && + Utils.enhancedDeepEquals(this.timeStalled, other.timeStalled) && + Utils.enhancedDeepEquals(this.bandwidth, other.bandwidth) && + Utils.enhancedDeepEquals(this.bufferedTime, other.bufferedTime) && + Utils.enhancedDeepEquals(this.bufferedSize, other.bufferedSize) && + Utils.enhancedDeepEquals(this.xPlexSessionIdentifier, other.xPlexSessionIdentifier); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, key, + ratingKey, state, playQueueItemID, + time, duration, continuing, + updated, offline, timeToFirstFrame, + timeStalled, bandwidth, bufferedTime, + bufferedSize, xPlexSessionIdentifier); + } + + @Override + public String toString() { + return Utils.toString(ReportRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "key", key, + "ratingKey", ratingKey, + "state", state, + "playQueueItemID", playQueueItemID, + "time", time, + "duration", duration, + "continuing", continuing, + "updated", updated, + "offline", offline, + "timeToFirstFrame", timeToFirstFrame, + "timeStalled", timeStalled, + "bandwidth", bandwidth, + "bufferedTime", bufferedTime, + "bufferedSize", bufferedSize, + "xPlexSessionIdentifier", xPlexSessionIdentifier); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional state = Optional.empty(); + + private Optional playQueueItemID = Optional.empty(); + + private Optional time = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional continuing = Optional.empty(); + + private Optional updated = Optional.empty(); + + private Optional offline = Optional.empty(); + + private Optional timeToFirstFrame = Optional.empty(); + + private Optional timeStalled = Optional.empty(); + + private Optional bandwidth = Optional.empty(); + + private Optional bufferedTime = Optional.empty(); + + private Optional bufferedSize = Optional.empty(); + + private Optional xPlexSessionIdentifier = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The details key for the item. + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The details key for the item. + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * The rating key attribute for the item. + */ + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + /** + * The rating key attribute for the item. + */ + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + + /** + * The current state of the media. + */ + public Builder state(State state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + /** + * The current state of the media. + */ + public Builder state(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + + /** + * If playing media from a play queue, the play queue's ID. + */ + public Builder playQueueItemID(String playQueueItemID) { + Utils.checkNotNull(playQueueItemID, "playQueueItemID"); + this.playQueueItemID = Optional.ofNullable(playQueueItemID); + return this; + } + + /** + * If playing media from a play queue, the play queue's ID. + */ + public Builder playQueueItemID(Optional playQueueItemID) { + Utils.checkNotNull(playQueueItemID, "playQueueItemID"); + this.playQueueItemID = playQueueItemID; + return this; + } + + + /** + * The current time offset of playback in ms. + */ + public Builder time(long time) { + Utils.checkNotNull(time, "time"); + this.time = Optional.ofNullable(time); + return this; + } + + /** + * The current time offset of playback in ms. + */ + public Builder time(Optional time) { + Utils.checkNotNull(time, "time"); + this.time = time; + return this; + } + + + /** + * The total duration of the item in ms. + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * The total duration of the item in ms. + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + + /** + * When state is `stopped`, a flag indicating whether or not the client is going to continue playing anothe item. + */ + public Builder continuing(BoolInt continuing) { + Utils.checkNotNull(continuing, "continuing"); + this.continuing = Optional.ofNullable(continuing); + return this; + } + + /** + * When state is `stopped`, a flag indicating whether or not the client is going to continue playing anothe item. + */ + public Builder continuing(Optional continuing) { + Utils.checkNotNull(continuing, "continuing"); + this.continuing = continuing; + return this; + } + + + /** + * Used when a sync client comes online and is syncing media timelines, holds the time at which the playback state was last updated. + */ + public Builder updated(long updated) { + Utils.checkNotNull(updated, "updated"); + this.updated = Optional.ofNullable(updated); + return this; + } + + /** + * Used when a sync client comes online and is syncing media timelines, holds the time at which the playback state was last updated. + */ + public Builder updated(Optional updated) { + Utils.checkNotNull(updated, "updated"); + this.updated = updated; + return this; + } + + + /** + * Also used by sync clients, used to indicate that a timeline is being synced from being offline, as opposed to being "live". + */ + public Builder offline(BoolInt offline) { + Utils.checkNotNull(offline, "offline"); + this.offline = Optional.ofNullable(offline); + return this; + } + + /** + * Also used by sync clients, used to indicate that a timeline is being synced from being offline, as opposed to being "live". + */ + public Builder offline(Optional offline) { + Utils.checkNotNull(offline, "offline"); + this.offline = offline; + return this; + } + + + /** + * Time in seconds till first frame is displayed. Sent only on the first playing timeline request. + */ + public Builder timeToFirstFrame(long timeToFirstFrame) { + Utils.checkNotNull(timeToFirstFrame, "timeToFirstFrame"); + this.timeToFirstFrame = Optional.ofNullable(timeToFirstFrame); + return this; + } + + /** + * Time in seconds till first frame is displayed. Sent only on the first playing timeline request. + */ + public Builder timeToFirstFrame(Optional timeToFirstFrame) { + Utils.checkNotNull(timeToFirstFrame, "timeToFirstFrame"); + this.timeToFirstFrame = timeToFirstFrame; + return this; + } + + + /** + * Time in seconds spent buffering since last request. + */ + public Builder timeStalled(long timeStalled) { + Utils.checkNotNull(timeStalled, "timeStalled"); + this.timeStalled = Optional.ofNullable(timeStalled); + return this; + } + + /** + * Time in seconds spent buffering since last request. + */ + public Builder timeStalled(Optional timeStalled) { + Utils.checkNotNull(timeStalled, "timeStalled"); + this.timeStalled = timeStalled; + return this; + } + + + /** + * Bandwidth in kbps as estimated by the client. + */ + public Builder bandwidth(long bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = Optional.ofNullable(bandwidth); + return this; + } + + /** + * Bandwidth in kbps as estimated by the client. + */ + public Builder bandwidth(Optional bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + return this; + } + + + /** + * Amount of time in seconds buffered by client. Omit if computed by `bufferedSize` below. + */ + public Builder bufferedTime(long bufferedTime) { + Utils.checkNotNull(bufferedTime, "bufferedTime"); + this.bufferedTime = Optional.ofNullable(bufferedTime); + return this; + } + + /** + * Amount of time in seconds buffered by client. Omit if computed by `bufferedSize` below. + */ + public Builder bufferedTime(Optional bufferedTime) { + Utils.checkNotNull(bufferedTime, "bufferedTime"); + this.bufferedTime = bufferedTime; + return this; + } + + + /** + * Size in kilobytes of data buffered by client. Omit if computed by `bufferedTime` above + */ + public Builder bufferedSize(long bufferedSize) { + Utils.checkNotNull(bufferedSize, "bufferedSize"); + this.bufferedSize = Optional.ofNullable(bufferedSize); + return this; + } + + /** + * Size in kilobytes of data buffered by client. Omit if computed by `bufferedTime` above + */ + public Builder bufferedSize(Optional bufferedSize) { + Utils.checkNotNull(bufferedSize, "bufferedSize"); + this.bufferedSize = bufferedSize; + return this; + } + + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public Builder xPlexSessionIdentifier(String xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = Optional.ofNullable(xPlexSessionIdentifier); + return this; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public Builder xPlexSessionIdentifier(Optional xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + return this; + } + + public ReportRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ReportRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, key, + ratingKey, state, playQueueItemID, + time, duration, continuing, + updated, offline, timeToFirstFrame, + timeStalled, bandwidth, bufferedTime, + bufferedSize, xPlexSessionIdentifier); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ReportRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ReportRequestBuilder.java new file mode 100644 index 00000000..540f05cb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ReportRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.Report; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ReportRequestBuilder { + + private ReportRequest request; + private final SDKConfiguration sdkConfiguration; + + public ReportRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ReportRequestBuilder request(ReportRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ReportResponse call() throws Exception { + + RequestOperation operation + = new Report.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ReportResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ReportResponse.java new file mode 100644 index 00000000..6e1deb04 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ReportResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class ReportResponse 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public ReportResponse( + 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 ReportResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ReportResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ReportResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ReportResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ReportResponse withObject(ReportResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ReportResponse 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; + } + ReportResponse other = (ReportResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ReportResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(ReportResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ReportResponse build() { + + return new ReportResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ReportResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ReportResponseBody.java new file mode 100644 index 00000000..6e328f24 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ReportResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * ReportResponseBody + * + *

OK + */ +public class ReportResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public ReportResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public ReportResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public ReportResponseBody withMediaContainer(MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public ReportResponseBody 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; + } + ReportResponseBody other = (ReportResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(ReportResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainer 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 ReportResponseBody build() { + + return new ReportResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueRequest.java new file mode 100644 index 00000000..5cc93caf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ResetPlayQueueRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the play queue. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playQueueId") + private long playQueueId; + + @JsonCreator + public ResetPlayQueueRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playQueueId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playQueueId, "playQueueId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playQueueId = playQueueId; + } + + public ResetPlayQueueRequest( + long playQueueId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playQueueId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the play queue. + */ + @JsonIgnore + public long playQueueId() { + return playQueueId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ResetPlayQueueRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ResetPlayQueueRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ResetPlayQueueRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ResetPlayQueueRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ResetPlayQueueRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ResetPlayQueueRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ResetPlayQueueRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ResetPlayQueueRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ResetPlayQueueRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ResetPlayQueueRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ResetPlayQueueRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ResetPlayQueueRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ResetPlayQueueRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ResetPlayQueueRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ResetPlayQueueRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ResetPlayQueueRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ResetPlayQueueRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ResetPlayQueueRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ResetPlayQueueRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ResetPlayQueueRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ResetPlayQueueRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ResetPlayQueueRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the play queue. + */ + public ResetPlayQueueRequest withPlayQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResetPlayQueueRequest other = (ResetPlayQueueRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playQueueId, other.playQueueId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId); + } + + @Override + public String toString() { + return Utils.toString(ResetPlayQueueRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playQueueId", playQueueId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playQueueId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the play queue. + */ + public Builder playQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + public ResetPlayQueueRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ResetPlayQueueRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueRequestBuilder.java new file mode 100644 index 00000000..f5d63ab6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ResetPlayQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ResetPlayQueueRequestBuilder { + + private ResetPlayQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public ResetPlayQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ResetPlayQueueRequestBuilder request(ResetPlayQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ResetPlayQueueResponse call() throws Exception { + + RequestOperation operation + = new ResetPlayQueue.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueResponse.java new file mode 100644 index 00000000..a05c0526 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ResetPlayQueueResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class ResetPlayQueueResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public ResetPlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public ResetPlayQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ResetPlayQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ResetPlayQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ResetPlayQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ResetPlayQueueResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public ResetPlayQueueResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResetPlayQueueResponse other = (ResetPlayQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(ResetPlayQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public ResetPlayQueueResponse build() { + + return new ResetPlayQueueResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsRequest.java new file mode 100644 index 00000000..039380f4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ResetSectionDefaultsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section ID for the hubs to reorder + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public ResetSectionDefaultsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public ResetSectionDefaultsRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section ID for the hubs to reorder + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ResetSectionDefaultsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ResetSectionDefaultsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ResetSectionDefaultsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ResetSectionDefaultsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ResetSectionDefaultsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ResetSectionDefaultsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ResetSectionDefaultsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ResetSectionDefaultsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ResetSectionDefaultsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ResetSectionDefaultsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ResetSectionDefaultsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ResetSectionDefaultsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ResetSectionDefaultsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ResetSectionDefaultsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ResetSectionDefaultsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ResetSectionDefaultsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ResetSectionDefaultsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ResetSectionDefaultsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ResetSectionDefaultsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ResetSectionDefaultsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ResetSectionDefaultsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ResetSectionDefaultsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section ID for the hubs to reorder + */ + public ResetSectionDefaultsRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResetSectionDefaultsRequest other = (ResetSectionDefaultsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(ResetSectionDefaultsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section ID for the hubs to reorder + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public ResetSectionDefaultsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ResetSectionDefaultsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsRequestBuilder.java new file mode 100644 index 00000000..11da509b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ResetSectionDefaults; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ResetSectionDefaultsRequestBuilder { + + private ResetSectionDefaultsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ResetSectionDefaultsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ResetSectionDefaultsRequestBuilder request(ResetSectionDefaultsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ResetSectionDefaultsResponse call() throws Exception { + + RequestOperation operation + = new ResetSectionDefaults.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsResponse.java new file mode 100644 index 00000000..44e8869b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ResetSectionDefaultsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class ResetSectionDefaultsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public ResetSectionDefaultsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ResetSectionDefaultsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ResetSectionDefaultsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ResetSectionDefaultsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResetSectionDefaultsResponse other = (ResetSectionDefaultsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ResetSectionDefaultsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ResetSectionDefaultsResponse build() { + + return new ResetSectionDefaultsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/ResponseBody.java deleted file mode 100644 index f1d89757..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/ResponseBody.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class ResponseBody { - - @JsonProperty("identifier") - private String identifier; - - - @JsonProperty("baseURL") - private String baseURL; - - - @JsonProperty("title") - private String title; - - - @JsonProperty("linkURL") - private String linkURL; - - - @JsonProperty("provides") - private String provides; - - /** - * The plex authtoken used to identify with - */ - @JsonProperty("token") - private String token; - - @JsonCreator - public ResponseBody( - @JsonProperty("identifier") String identifier, - @JsonProperty("baseURL") String baseURL, - @JsonProperty("title") String title, - @JsonProperty("linkURL") String linkURL, - @JsonProperty("provides") String provides, - @JsonProperty("token") String token) { - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(baseURL, "baseURL"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(linkURL, "linkURL"); - Utils.checkNotNull(provides, "provides"); - Utils.checkNotNull(token, "token"); - this.identifier = identifier; - this.baseURL = baseURL; - this.title = title; - this.linkURL = linkURL; - this.provides = provides; - this.token = token; - } - - @JsonIgnore - public String identifier() { - return identifier; - } - - @JsonIgnore - public String baseURL() { - return baseURL; - } - - @JsonIgnore - public String title() { - return title; - } - - @JsonIgnore - public String linkURL() { - return linkURL; - } - - @JsonIgnore - public String provides() { - return provides; - } - - /** - * The plex authtoken used to identify with - */ - @JsonIgnore - public String token() { - return token; - } - - public static Builder builder() { - return new Builder(); - } - - - public ResponseBody withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public ResponseBody withBaseURL(String baseURL) { - Utils.checkNotNull(baseURL, "baseURL"); - this.baseURL = baseURL; - return this; - } - - public ResponseBody withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public ResponseBody withLinkURL(String linkURL) { - Utils.checkNotNull(linkURL, "linkURL"); - this.linkURL = linkURL; - return this; - } - - public ResponseBody withProvides(String provides) { - Utils.checkNotNull(provides, "provides"); - this.provides = provides; - return this; - } - - /** - * The plex authtoken used to identify with - */ - public ResponseBody withToken(String token) { - Utils.checkNotNull(token, "token"); - this.token = token; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseBody other = (ResponseBody) o; - return - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.baseURL, other.baseURL) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.linkURL, other.linkURL) && - Utils.enhancedDeepEquals(this.provides, other.provides) && - Utils.enhancedDeepEquals(this.token, other.token); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - identifier, baseURL, title, - linkURL, provides, token); - } - - @Override - public String toString() { - return Utils.toString(ResponseBody.class, - "identifier", identifier, - "baseURL", baseURL, - "title", title, - "linkURL", linkURL, - "provides", provides, - "token", token); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String identifier; - - private String baseURL; - - private String title; - - private String linkURL; - - private String provides; - - private String token; - - private Builder() { - // force use of static builder() method - } - - - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - public Builder baseURL(String baseURL) { - Utils.checkNotNull(baseURL, "baseURL"); - this.baseURL = baseURL; - return this; - } - - - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - public Builder linkURL(String linkURL) { - Utils.checkNotNull(linkURL, "linkURL"); - this.linkURL = linkURL; - return this; - } - - - public Builder provides(String provides) { - Utils.checkNotNull(provides, "provides"); - this.provides = provides; - return this; - } - - - /** - * The plex authtoken used to identify with - */ - public Builder token(String token) { - Utils.checkNotNull(token, "token"); - this.token = token; - return this; - } - - public ResponseBody build() { - - return new ResponseBody( - identifier, baseURL, title, - linkURL, provides, token); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsRequest.java new file mode 100644 index 00000000..19106ec7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsRequest.java @@ -0,0 +1,825 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class RestartProcessingDownloadQueueItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The queue id + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=queueId") + private long queueId; + + /** + * The item ids + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=itemId") + private List itemId; + + @JsonCreator + public RestartProcessingDownloadQueueItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long queueId, + List itemId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(queueId, "queueId"); + Utils.checkNotNull(itemId, "itemId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.queueId = queueId; + this.itemId = itemId; + } + + public RestartProcessingDownloadQueueItemsRequest( + long queueId, + List itemId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), queueId, + itemId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The queue id + */ + @JsonIgnore + public long queueId() { + return queueId; + } + + /** + * The item ids + */ + @JsonIgnore + public List itemId() { + return itemId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RestartProcessingDownloadQueueItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public RestartProcessingDownloadQueueItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public RestartProcessingDownloadQueueItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public RestartProcessingDownloadQueueItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public RestartProcessingDownloadQueueItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public RestartProcessingDownloadQueueItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public RestartProcessingDownloadQueueItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public RestartProcessingDownloadQueueItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public RestartProcessingDownloadQueueItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public RestartProcessingDownloadQueueItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public RestartProcessingDownloadQueueItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public RestartProcessingDownloadQueueItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public RestartProcessingDownloadQueueItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public RestartProcessingDownloadQueueItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public RestartProcessingDownloadQueueItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public RestartProcessingDownloadQueueItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public RestartProcessingDownloadQueueItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public RestartProcessingDownloadQueueItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public RestartProcessingDownloadQueueItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public RestartProcessingDownloadQueueItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public RestartProcessingDownloadQueueItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public RestartProcessingDownloadQueueItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The queue id + */ + public RestartProcessingDownloadQueueItemsRequest withQueueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + /** + * The item ids + */ + public RestartProcessingDownloadQueueItemsRequest withItemId(List itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RestartProcessingDownloadQueueItemsRequest other = (RestartProcessingDownloadQueueItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.queueId, other.queueId) && + Utils.enhancedDeepEquals(this.itemId, other.itemId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + itemId); + } + + @Override + public String toString() { + return Utils.toString(RestartProcessingDownloadQueueItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "queueId", queueId, + "itemId", itemId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long queueId; + + private List itemId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The queue id + */ + public Builder queueId(long queueId) { + Utils.checkNotNull(queueId, "queueId"); + this.queueId = queueId; + return this; + } + + + /** + * The item ids + */ + public Builder itemId(List itemId) { + Utils.checkNotNull(itemId, "itemId"); + this.itemId = itemId; + return this; + } + + public RestartProcessingDownloadQueueItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new RestartProcessingDownloadQueueItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, queueId, + itemId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsRequestBuilder.java new file mode 100644 index 00000000..9960dcb5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.RestartProcessingDownloadQueueItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class RestartProcessingDownloadQueueItemsRequestBuilder { + + private RestartProcessingDownloadQueueItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public RestartProcessingDownloadQueueItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RestartProcessingDownloadQueueItemsRequestBuilder request(RestartProcessingDownloadQueueItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public RestartProcessingDownloadQueueItemsResponse call() throws Exception { + + RequestOperation operation + = new RestartProcessingDownloadQueueItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsResponse.java new file mode 100644 index 00000000..ae89a633 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/RestartProcessingDownloadQueueItemsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RestartProcessingDownloadQueueItemsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RestartProcessingDownloadQueueItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RestartProcessingDownloadQueueItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RestartProcessingDownloadQueueItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RestartProcessingDownloadQueueItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RestartProcessingDownloadQueueItemsResponse other = (RestartProcessingDownloadQueueItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RestartProcessingDownloadQueueItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RestartProcessingDownloadQueueItemsResponse build() { + + return new RestartProcessingDownloadQueueItemsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Restricted.java b/src/main/java/dev/plexapi/sdk/models/operations/Restricted.java deleted file mode 100644 index 38a741fd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Restricted.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Restricted - * - *

Indicates if the user has restricted access. - */ -public enum Restricted { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - Restricted(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (Restricted o: Restricted.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Role.java b/src/main/java/dev/plexapi/sdk/models/operations/Role.java deleted file mode 100644 index 6e3fd6ad..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Role.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Role { - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonProperty("id") - private int id; - - /** - * The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. - */ - @JsonProperty("filter") - private String filter; - - /** - * The display tag for the actor (typically the actor's name). - */ - @JsonProperty("tag") - private String tag; - - /** - * A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification. - * NOTE: This is globally unique across all Plex Servers. - */ - @JsonProperty("tagKey") - private String tagKey; - - /** - * The role played by the actor in the media item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("role") - private Optional role; - - /** - * The absolute URL of the thumbnail image for the actor. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public Role( - @JsonProperty("id") int id, - @JsonProperty("filter") String filter, - @JsonProperty("tag") String tag, - @JsonProperty("tagKey") String tagKey, - @JsonProperty("role") Optional role, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(tagKey, "tagKey"); - Utils.checkNotNull(role, "role"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.filter = filter; - this.tag = tag; - this.tagKey = tagKey; - this.role = role; - this.thumb = thumb; - } - - public Role( - int id, - String filter, - String tag, - String tagKey) { - this(id, filter, tag, - tagKey, Optional.empty(), Optional.empty()); - } - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * The display tag for the actor (typically the actor's name). - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification. - * NOTE: This is globally unique across all Plex Servers. - */ - @JsonIgnore - public String tagKey() { - return tagKey; - } - - /** - * The role played by the actor in the media item. - */ - @JsonIgnore - public Optional role() { - return role; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Role withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. - */ - public Role withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The display tag for the actor (typically the actor's name). - */ - public Role withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification. - * NOTE: This is globally unique across all Plex Servers. - */ - public Role withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The role played by the actor in the media item. - */ - public Role withRole(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - - /** - * The role played by the actor in the media item. - */ - public Role withRole(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public Role withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public Role withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Role other = (Role) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && - Utils.enhancedDeepEquals(this.role, other.role) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag, - tagKey, role, thumb); - } - - @Override - public String toString() { - return Utils.toString(Role.class, - "id", id, - "filter", filter, - "tag", tag, - "tagKey", tagKey, - "role", role, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String filter; - - private String tag; - - private String tagKey; - - private Optional role = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the role. - * NOTE: This is different for each Plex server and is not globally unique. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * The display tag for the actor (typically the actor's name). - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification. - * NOTE: This is globally unique across all Plex Servers. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - - /** - * The role played by the actor in the media item. - */ - public Builder role(String role) { - Utils.checkNotNull(role, "role"); - this.role = Optional.ofNullable(role); - return this; - } - - /** - * The role played by the actor in the media item. - */ - public Builder role(Optional role) { - Utils.checkNotNull(role, "role"); - this.role = role; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the actor. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public Role build() { - - return new Role( - id, filter, tag, - tagKey, role, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ScanRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ScanRequest.java new file mode 100644 index 00000000..1bacb76a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ScanRequest.java @@ -0,0 +1,842 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ScanRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the device. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + /** + * A valid source for the scan + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=source") + private Optional source; + + @JsonCreator + public ScanRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long deviceId, + Optional source) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceId, "deviceId"); + Utils.checkNotNull(source, "source"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceId = deviceId; + this.source = source; + } + + public ScanRequest( + long deviceId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the device. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + /** + * A valid source for the scan + */ + @JsonIgnore + public Optional source() { + return source; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ScanRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ScanRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ScanRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ScanRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ScanRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ScanRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ScanRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ScanRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ScanRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ScanRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ScanRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ScanRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ScanRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ScanRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ScanRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ScanRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ScanRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ScanRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ScanRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ScanRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ScanRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ScanRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the device. + */ + public ScanRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + /** + * A valid source for the scan + */ + public ScanRequest withSource(String source) { + Utils.checkNotNull(source, "source"); + this.source = Optional.ofNullable(source); + return this; + } + + + /** + * A valid source for the scan + */ + public ScanRequest withSource(Optional source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScanRequest other = (ScanRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId) && + Utils.enhancedDeepEquals(this.source, other.source); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId, + source); + } + + @Override + public String toString() { + return Utils.toString(ScanRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceId", deviceId, + "source", source); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long deviceId; + + private Optional source = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the device. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + + /** + * A valid source for the scan + */ + public Builder source(String source) { + Utils.checkNotNull(source, "source"); + this.source = Optional.ofNullable(source); + return this; + } + + /** + * A valid source for the scan + */ + public Builder source(Optional source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + public ScanRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ScanRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId, + source); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ScanRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ScanRequestBuilder.java new file mode 100644 index 00000000..12c4259b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ScanRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.Scan; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ScanRequestBuilder { + + private ScanRequest request; + private final SDKConfiguration sdkConfiguration; + + public ScanRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ScanRequestBuilder request(ScanRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ScanResponse call() throws Exception { + + RequestOperation operation + = new Scan.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ScanResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ScanResponse.java new file mode 100644 index 00000000..79cc8e7f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ScanResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithDevice; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class ScanResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + + private Map> headers; + + @JsonCreator + public ScanResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + this.headers = headers; + } + + public ScanResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ScanResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ScanResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ScanResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ScanResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public ScanResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public ScanResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScanResponse other = (ScanResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice, headers); + } + + @Override + public String toString() { + return Utils.toString(ScanResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ScanResponse build() { + + return new ScanResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Scope.java b/src/main/java/dev/plexapi/sdk/models/operations/Scope.java index 293951aa..be40ec47 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Scope.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Scope.java @@ -11,7 +11,7 @@ import java.util.Optional; /** * Scope * - *

`all` - This is the only supported `scope` parameter. + *

The value `all` is the only supported `scope` parameter. */ public enum Scope { ALL("all"); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsMediaContainer.java new file mode 100644 index 00000000..00e39b7a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Hub; +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.List; +import java.util.Optional; + +/** + * SearchHubsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class SearchHubsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + @JsonCreator + public SearchHubsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(hub, "hub"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.hub = hub; + } + + public SearchHubsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hub() { + return (Optional>) hub; + } + + public static Builder builder() { + return new Builder(); + } + + + public SearchHubsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public SearchHubsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public SearchHubsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public SearchHubsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public SearchHubsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public SearchHubsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public SearchHubsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public SearchHubsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public SearchHubsMediaContainer withHub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + + public SearchHubsMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchHubsMediaContainer other = (SearchHubsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, hub); + } + + @Override + public String toString() { + return Utils.toString(SearchHubsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "hub", hub); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder hub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public SearchHubsMediaContainer build() { + + return new SearchHubsMediaContainer( + identifier, offset, size, + totalSize, hub); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsRequest.java new file mode 100644 index 00000000..e40b0da8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsRequest.java @@ -0,0 +1,901 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SearchHubsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The query term + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") + private String query; + + /** + * This gives context to the search, and can result in re-ordering of search result hubs. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionId") + private Optional sectionId; + + /** + * The number of items to return per hub. 3 if not specified + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + @JsonCreator + public SearchHubsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String query, + Optional sectionId, + Optional limit) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(query, "query"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(limit, "limit"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.query = query; + this.sectionId = sectionId; + this.limit = limit; + } + + public SearchHubsRequest( + String query) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), query, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The query term + */ + @JsonIgnore + public String query() { + return query; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs. + */ + @JsonIgnore + public Optional sectionId() { + return sectionId; + } + + /** + * The number of items to return per hub. 3 if not specified + */ + @JsonIgnore + public Optional limit() { + return limit; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SearchHubsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SearchHubsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SearchHubsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SearchHubsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SearchHubsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SearchHubsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SearchHubsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SearchHubsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SearchHubsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SearchHubsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SearchHubsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SearchHubsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SearchHubsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SearchHubsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SearchHubsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SearchHubsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SearchHubsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SearchHubsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SearchHubsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SearchHubsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SearchHubsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SearchHubsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The query term + */ + public SearchHubsRequest withQuery(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs. + */ + public SearchHubsRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = Optional.ofNullable(sectionId); + return this; + } + + + /** + * This gives context to the search, and can result in re-ordering of search result hubs. + */ + public SearchHubsRequest withSectionId(Optional sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The number of items to return per hub. 3 if not specified + */ + public SearchHubsRequest withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + + /** + * The number of items to return per hub. 3 if not specified + */ + public SearchHubsRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchHubsRequest other = (SearchHubsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.query, other.query) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.limit, other.limit); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, query, + sectionId, limit); + } + + @Override + public String toString() { + return Utils.toString(SearchHubsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "query", query, + "sectionId", sectionId, + "limit", limit); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String query; + + private Optional sectionId = Optional.empty(); + + private Optional limit = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The query term + */ + public Builder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + + /** + * This gives context to the search, and can result in re-ordering of search result hubs. + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = Optional.ofNullable(sectionId); + return this; + } + + /** + * This gives context to the search, and can result in re-ordering of search result hubs. + */ + public Builder sectionId(Optional sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The number of items to return per hub. 3 if not specified + */ + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * The number of items to return per hub. 3 if not specified + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public SearchHubsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SearchHubsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, query, + sectionId, limit); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsRequestBuilder.java new file mode 100644 index 00000000..de4cdad3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SearchHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SearchHubsRequestBuilder { + + private SearchHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public SearchHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SearchHubsRequestBuilder request(SearchHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SearchHubsResponse call() throws Exception { + + RequestOperation operation + = new SearchHubs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsResponse.java new file mode 100644 index 00000000..c6a0aff3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class SearchHubsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public SearchHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public SearchHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SearchHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SearchHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SearchHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public SearchHubsResponse withObject(SearchHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public SearchHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public SearchHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchHubsResponse other = (SearchHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(SearchHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(SearchHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public SearchHubsResponse build() { + + return new SearchHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsResponseBody.java new file mode 100644 index 00000000..152f8967 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SearchHubsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * SearchHubsResponseBody + * + *

OK + */ +public class SearchHubsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public SearchHubsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public SearchHubsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public SearchHubsResponseBody withMediaContainer(SearchHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public SearchHubsResponseBody 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; + } + SearchHubsResponseBody other = (SearchHubsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(SearchHubsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(SearchHubsMediaContainer 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 SearchHubsResponseBody build() { + + return new SearchHubsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SearchResult.java b/src/main/java/dev/plexapi/sdk/models/operations/SearchResult.java deleted file mode 100644 index c38ea833..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/SearchResult.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Float; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class SearchResult { - /** - * The score of the search result, typically a float value between 0 and 1. - */ - @JsonProperty("score") - private float score; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Directory") - private Optional directory; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Metadata") - private Optional metadata; - - @JsonCreator - public SearchResult( - @JsonProperty("score") float score, - @JsonProperty("Directory") Optional directory, - @JsonProperty("Metadata") Optional metadata) { - Utils.checkNotNull(score, "score"); - Utils.checkNotNull(directory, "directory"); - Utils.checkNotNull(metadata, "metadata"); - this.score = score; - this.directory = directory; - this.metadata = metadata; - } - - public SearchResult( - float score) { - this(score, Optional.empty(), Optional.empty()); - } - - /** - * The score of the search result, typically a float value between 0 and 1. - */ - @JsonIgnore - public float score() { - return score; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional directory() { - return (Optional) directory; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional metadata() { - return (Optional) metadata; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The score of the search result, typically a float value between 0 and 1. - */ - public SearchResult withScore(float score) { - Utils.checkNotNull(score, "score"); - this.score = score; - return this; - } - - public SearchResult withDirectory(GetSearchAllLibrariesDirectory directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - - public SearchResult withDirectory(Optional directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - public SearchResult withMetadata(GetSearchAllLibrariesMetadata metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - - public SearchResult withMetadata(Optional metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchResult other = (SearchResult) o; - return - Utils.enhancedDeepEquals(this.score, other.score) && - Utils.enhancedDeepEquals(this.directory, other.directory) && - Utils.enhancedDeepEquals(this.metadata, other.metadata); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - score, directory, metadata); - } - - @Override - public String toString() { - return Utils.toString(SearchResult.class, - "score", score, - "directory", directory, - "metadata", metadata); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Float score; - - private Optional directory = Optional.empty(); - - private Optional metadata = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The score of the search result, typically a float value between 0 and 1. - */ - public Builder score(float score) { - Utils.checkNotNull(score, "score"); - this.score = score; - return this; - } - - - public Builder directory(GetSearchAllLibrariesDirectory directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = Optional.ofNullable(directory); - return this; - } - - public Builder directory(Optional directory) { - Utils.checkNotNull(directory, "directory"); - this.directory = directory; - return this; - } - - - public Builder metadata(GetSearchAllLibrariesMetadata metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = Optional.ofNullable(metadata); - return this; - } - - public Builder metadata(Optional metadata) { - Utils.checkNotNull(metadata, "metadata"); - this.metadata = metadata; - return this; - } - - public SearchResult build() { - - return new SearchResult( - score, directory, metadata); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SearchTypes.java b/src/main/java/dev/plexapi/sdk/models/operations/SearchTypes.java deleted file mode 100644 index 13c33aa6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/SearchTypes.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

This class is intended to emulate an enum (in terms of common usage and with - * reference equality) but with the ability to carry unknown values. Unfortunately - * Java does not permit the use of an instance in a switch expression but you can - * use the {@code asEnum()} method (after dealing with the `Optional` appropriately). - * - */ -@JsonDeserialize(using = SearchTypes._Deserializer.class) -@JsonSerialize(using = SearchTypes._Serializer.class) -public class SearchTypes { - - public static final SearchTypes MOVIES = new SearchTypes("movies"); - public static final SearchTypes MUSIC = new SearchTypes("music"); - public static final SearchTypes OTHER_VIDEOS = new SearchTypes("otherVideos"); - public static final SearchTypes PEOPLE = new SearchTypes("people"); - public static final SearchTypes TV = new SearchTypes("tv"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private SearchTypes(String value) { - this.value = value; - } - - /** - * Returns a SearchTypes with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as SearchTypes - */ - public static SearchTypes of(String value) { - synchronized (SearchTypes.class) { - return values.computeIfAbsent(value, v -> new SearchTypes(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - SearchTypes other = (SearchTypes) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "SearchTypes [value=" + value + "]"; - } - - // return an array just like an enum - public static SearchTypes[] values() { - synchronized (SearchTypes.class) { - return values.values().toArray(new SearchTypes[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("movies", MOVIES); - map.put("music", MUSIC); - map.put("otherVideos", OTHER_VIDEOS); - map.put("people", PEOPLE); - map.put("tv", TV); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("movies", SearchTypesEnum.MOVIES); - map.put("music", SearchTypesEnum.MUSIC); - map.put("otherVideos", SearchTypesEnum.OTHER_VIDEOS); - map.put("people", SearchTypesEnum.PEOPLE); - map.put("tv", SearchTypesEnum.TV); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(SearchTypes.class); - } - - @Override - public void serialize(SearchTypes value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(SearchTypes.class); - } - - @Override - public SearchTypes deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return SearchTypes.of(v); - } - } - - public enum SearchTypesEnum { - - MOVIES("movies"), - MUSIC("music"), - OTHER_VIDEOS("otherVideos"), - PEOPLE("people"), - TV("tv"),; - - private final String value; - - private SearchTypesEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Server.java b/src/main/java/dev/plexapi/sdk/models/operations/Server.java deleted file mode 100644 index d74e9420..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Server.java +++ /dev/null @@ -1,551 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Server { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("name") - private Optional name; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("host") - private Optional host; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("address") - private Optional address; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("port") - private Optional port; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("machineIdentifier") - private Optional machineIdentifier; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("version") - private Optional version; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("protocol") - private Optional protocol; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("product") - private Optional product; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("deviceClass") - private Optional deviceClass; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("protocolVersion") - private Optional protocolVersion; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("protocolCapabilities") - private Optional protocolCapabilities; - - @JsonCreator - public Server( - @JsonProperty("name") Optional name, - @JsonProperty("host") Optional host, - @JsonProperty("address") Optional address, - @JsonProperty("port") Optional port, - @JsonProperty("machineIdentifier") Optional machineIdentifier, - @JsonProperty("version") Optional version, - @JsonProperty("protocol") Optional protocol, - @JsonProperty("product") Optional product, - @JsonProperty("deviceClass") Optional deviceClass, - @JsonProperty("protocolVersion") Optional protocolVersion, - @JsonProperty("protocolCapabilities") Optional protocolCapabilities) { - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(host, "host"); - Utils.checkNotNull(address, "address"); - Utils.checkNotNull(port, "port"); - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - Utils.checkNotNull(version, "version"); - Utils.checkNotNull(protocol, "protocol"); - Utils.checkNotNull(product, "product"); - Utils.checkNotNull(deviceClass, "deviceClass"); - Utils.checkNotNull(protocolVersion, "protocolVersion"); - Utils.checkNotNull(protocolCapabilities, "protocolCapabilities"); - this.name = name; - this.host = host; - this.address = address; - this.port = port; - this.machineIdentifier = machineIdentifier; - this.version = version; - this.protocol = protocol; - this.product = product; - this.deviceClass = deviceClass; - this.protocolVersion = protocolVersion; - this.protocolCapabilities = protocolCapabilities; - } - - public Server() { - this(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 name() { - return name; - } - - @JsonIgnore - public Optional host() { - return host; - } - - @JsonIgnore - public Optional address() { - return address; - } - - @JsonIgnore - public Optional port() { - return port; - } - - @JsonIgnore - public Optional machineIdentifier() { - return machineIdentifier; - } - - @JsonIgnore - public Optional version() { - return version; - } - - @JsonIgnore - public Optional protocol() { - return protocol; - } - - @JsonIgnore - public Optional product() { - return product; - } - - @JsonIgnore - public Optional deviceClass() { - return deviceClass; - } - - @JsonIgnore - public Optional protocolVersion() { - return protocolVersion; - } - - @JsonIgnore - public Optional protocolCapabilities() { - return protocolCapabilities; - } - - public static Builder builder() { - return new Builder(); - } - - - public Server withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - - public Server withName(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - public Server withHost(String host) { - Utils.checkNotNull(host, "host"); - this.host = Optional.ofNullable(host); - return this; - } - - - public Server withHost(Optional host) { - Utils.checkNotNull(host, "host"); - this.host = host; - return this; - } - - public Server withAddress(String address) { - Utils.checkNotNull(address, "address"); - this.address = Optional.ofNullable(address); - return this; - } - - - public Server withAddress(Optional address) { - Utils.checkNotNull(address, "address"); - this.address = address; - return this; - } - - public Server withPort(double port) { - Utils.checkNotNull(port, "port"); - this.port = Optional.ofNullable(port); - return this; - } - - - public Server withPort(Optional port) { - Utils.checkNotNull(port, "port"); - this.port = port; - return this; - } - - public Server withMachineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = Optional.ofNullable(machineIdentifier); - return this; - } - - - public Server withMachineIdentifier(Optional machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - public Server withVersion(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - - public Server withVersion(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - public Server withProtocol(String protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = Optional.ofNullable(protocol); - return this; - } - - - public Server withProtocol(Optional protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = protocol; - return this; - } - - public Server withProduct(String product) { - Utils.checkNotNull(product, "product"); - this.product = Optional.ofNullable(product); - return this; - } - - - public Server withProduct(Optional product) { - Utils.checkNotNull(product, "product"); - this.product = product; - return this; - } - - public Server withDeviceClass(String deviceClass) { - Utils.checkNotNull(deviceClass, "deviceClass"); - this.deviceClass = Optional.ofNullable(deviceClass); - return this; - } - - - public Server withDeviceClass(Optional deviceClass) { - Utils.checkNotNull(deviceClass, "deviceClass"); - this.deviceClass = deviceClass; - return this; - } - - public Server withProtocolVersion(double protocolVersion) { - Utils.checkNotNull(protocolVersion, "protocolVersion"); - this.protocolVersion = Optional.ofNullable(protocolVersion); - return this; - } - - - public Server withProtocolVersion(Optional protocolVersion) { - Utils.checkNotNull(protocolVersion, "protocolVersion"); - this.protocolVersion = protocolVersion; - return this; - } - - public Server withProtocolCapabilities(String protocolCapabilities) { - Utils.checkNotNull(protocolCapabilities, "protocolCapabilities"); - this.protocolCapabilities = Optional.ofNullable(protocolCapabilities); - return this; - } - - - public Server withProtocolCapabilities(Optional protocolCapabilities) { - Utils.checkNotNull(protocolCapabilities, "protocolCapabilities"); - this.protocolCapabilities = protocolCapabilities; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Server other = (Server) o; - return - Utils.enhancedDeepEquals(this.name, other.name) && - Utils.enhancedDeepEquals(this.host, other.host) && - Utils.enhancedDeepEquals(this.address, other.address) && - Utils.enhancedDeepEquals(this.port, other.port) && - Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && - Utils.enhancedDeepEquals(this.version, other.version) && - Utils.enhancedDeepEquals(this.protocol, other.protocol) && - Utils.enhancedDeepEquals(this.product, other.product) && - Utils.enhancedDeepEquals(this.deviceClass, other.deviceClass) && - Utils.enhancedDeepEquals(this.protocolVersion, other.protocolVersion) && - Utils.enhancedDeepEquals(this.protocolCapabilities, other.protocolCapabilities); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - name, host, address, - port, machineIdentifier, version, - protocol, product, deviceClass, - protocolVersion, protocolCapabilities); - } - - @Override - public String toString() { - return Utils.toString(Server.class, - "name", name, - "host", host, - "address", address, - "port", port, - "machineIdentifier", machineIdentifier, - "version", version, - "protocol", protocol, - "product", product, - "deviceClass", deviceClass, - "protocolVersion", protocolVersion, - "protocolCapabilities", protocolCapabilities); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional name = Optional.empty(); - - private Optional host = Optional.empty(); - - private Optional address = Optional.empty(); - - private Optional port = Optional.empty(); - - private Optional machineIdentifier = Optional.empty(); - - private Optional version = Optional.empty(); - - private Optional protocol = Optional.empty(); - - private Optional product = Optional.empty(); - - private Optional deviceClass = Optional.empty(); - - private Optional protocolVersion = Optional.empty(); - - private Optional protocolCapabilities = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder name(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - public Builder name(Optional name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - - public Builder host(String host) { - Utils.checkNotNull(host, "host"); - this.host = Optional.ofNullable(host); - return this; - } - - public Builder host(Optional host) { - Utils.checkNotNull(host, "host"); - this.host = host; - return this; - } - - - public Builder address(String address) { - Utils.checkNotNull(address, "address"); - this.address = Optional.ofNullable(address); - return this; - } - - public Builder address(Optional address) { - Utils.checkNotNull(address, "address"); - this.address = address; - return this; - } - - - public Builder port(double port) { - Utils.checkNotNull(port, "port"); - this.port = Optional.ofNullable(port); - return this; - } - - public Builder port(Optional port) { - Utils.checkNotNull(port, "port"); - this.port = port; - return this; - } - - - public Builder machineIdentifier(String machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = Optional.ofNullable(machineIdentifier); - return this; - } - - public Builder machineIdentifier(Optional machineIdentifier) { - Utils.checkNotNull(machineIdentifier, "machineIdentifier"); - this.machineIdentifier = machineIdentifier; - return this; - } - - - public Builder version(String version) { - Utils.checkNotNull(version, "version"); - this.version = Optional.ofNullable(version); - return this; - } - - public Builder version(Optional version) { - Utils.checkNotNull(version, "version"); - this.version = version; - return this; - } - - - public Builder protocol(String protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = Optional.ofNullable(protocol); - return this; - } - - public Builder protocol(Optional protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = protocol; - return this; - } - - - public Builder product(String product) { - Utils.checkNotNull(product, "product"); - this.product = Optional.ofNullable(product); - return this; - } - - public Builder product(Optional product) { - Utils.checkNotNull(product, "product"); - this.product = product; - return this; - } - - - public Builder deviceClass(String deviceClass) { - Utils.checkNotNull(deviceClass, "deviceClass"); - this.deviceClass = Optional.ofNullable(deviceClass); - return this; - } - - public Builder deviceClass(Optional deviceClass) { - Utils.checkNotNull(deviceClass, "deviceClass"); - this.deviceClass = deviceClass; - return this; - } - - - public Builder protocolVersion(double protocolVersion) { - Utils.checkNotNull(protocolVersion, "protocolVersion"); - this.protocolVersion = Optional.ofNullable(protocolVersion); - return this; - } - - public Builder protocolVersion(Optional protocolVersion) { - Utils.checkNotNull(protocolVersion, "protocolVersion"); - this.protocolVersion = protocolVersion; - return this; - } - - - public Builder protocolCapabilities(String protocolCapabilities) { - Utils.checkNotNull(protocolCapabilities, "protocolCapabilities"); - this.protocolCapabilities = Optional.ofNullable(protocolCapabilities); - return this; - } - - public Builder protocolCapabilities(Optional protocolCapabilities) { - Utils.checkNotNull(protocolCapabilities, "protocolCapabilities"); - this.protocolCapabilities = protocolCapabilities; - return this; - } - - public Server build() { - - return new Server( - name, host, address, - port, machineIdentifier, version, - protocol, product, deviceClass, - protocolVersion, protocolCapabilities); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Services.java b/src/main/java/dev/plexapi/sdk/models/operations/Services.java deleted file mode 100644 index e3d3818c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Services.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Services { - - @JsonProperty("identifier") - private String identifier; - - - @JsonProperty("endpoint") - private String endpoint; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("token") - private Optional token; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("secret") - private Optional secret; - - - @JsonProperty("status") - private GetTokenDetailsStatus status; - - @JsonCreator - public Services( - @JsonProperty("identifier") String identifier, - @JsonProperty("endpoint") String endpoint, - @JsonProperty("token") Optional token, - @JsonProperty("secret") Optional secret, - @JsonProperty("status") GetTokenDetailsStatus status) { - Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(endpoint, "endpoint"); - Utils.checkNotNull(token, "token"); - Utils.checkNotNull(secret, "secret"); - Utils.checkNotNull(status, "status"); - this.identifier = identifier; - this.endpoint = endpoint; - this.token = token; - this.secret = secret; - this.status = status; - } - - public Services( - String identifier, - String endpoint, - GetTokenDetailsStatus status) { - this(identifier, endpoint, Optional.empty(), - Optional.empty(), status); - } - - @JsonIgnore - public String identifier() { - return identifier; - } - - @JsonIgnore - public String endpoint() { - return endpoint; - } - - @JsonIgnore - public Optional token() { - return token; - } - - @JsonIgnore - public Optional secret() { - return secret; - } - - @JsonIgnore - public GetTokenDetailsStatus status() { - return status; - } - - public static Builder builder() { - return new Builder(); - } - - - public Services withIdentifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - public Services withEndpoint(String endpoint) { - Utils.checkNotNull(endpoint, "endpoint"); - this.endpoint = endpoint; - return this; - } - - public Services withToken(String token) { - Utils.checkNotNull(token, "token"); - this.token = Optional.ofNullable(token); - return this; - } - - - public Services withToken(Optional token) { - Utils.checkNotNull(token, "token"); - this.token = token; - return this; - } - - public Services withSecret(String secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = Optional.ofNullable(secret); - return this; - } - - - public Services withSecret(Optional secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = secret; - return this; - } - - public Services withStatus(GetTokenDetailsStatus status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Services other = (Services) o; - return - Utils.enhancedDeepEquals(this.identifier, other.identifier) && - Utils.enhancedDeepEquals(this.endpoint, other.endpoint) && - Utils.enhancedDeepEquals(this.token, other.token) && - Utils.enhancedDeepEquals(this.secret, other.secret) && - Utils.enhancedDeepEquals(this.status, other.status); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - identifier, endpoint, token, - secret, status); - } - - @Override - public String toString() { - return Utils.toString(Services.class, - "identifier", identifier, - "endpoint", endpoint, - "token", token, - "secret", secret, - "status", status); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String identifier; - - private String endpoint; - - private Optional token = Optional.empty(); - - private Optional secret = Optional.empty(); - - private GetTokenDetailsStatus status; - - private Builder() { - // force use of static builder() method - } - - - public Builder identifier(String identifier) { - Utils.checkNotNull(identifier, "identifier"); - this.identifier = identifier; - return this; - } - - - public Builder endpoint(String endpoint) { - Utils.checkNotNull(endpoint, "endpoint"); - this.endpoint = endpoint; - return this; - } - - - public Builder token(String token) { - Utils.checkNotNull(token, "token"); - this.token = Optional.ofNullable(token); - return this; - } - - public Builder token(Optional token) { - Utils.checkNotNull(token, "token"); - this.token = token; - return this; - } - - - public Builder secret(String secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = Optional.ofNullable(secret); - return this; - } - - public Builder secret(Optional secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = secret; - return this; - } - - - public Builder status(GetTokenDetailsStatus status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public Services build() { - - return new Services( - identifier, endpoint, token, - secret, status); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Session.java b/src/main/java/dev/plexapi/sdk/models/operations/Session.java deleted file mode 100644 index 822f0f2c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Session.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Session { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bandwidth") - private Optional bandwidth; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("location") - private Optional location; - - @JsonCreator - public Session( - @JsonProperty("id") Optional id, - @JsonProperty("bandwidth") Optional bandwidth, - @JsonProperty("location") Optional location) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(bandwidth, "bandwidth"); - Utils.checkNotNull(location, "location"); - this.id = id; - this.bandwidth = bandwidth; - this.location = location; - } - - public Session() { - this(Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional id() { - return id; - } - - @JsonIgnore - public Optional bandwidth() { - return bandwidth; - } - - @JsonIgnore - public Optional location() { - return location; - } - - public static Builder builder() { - return new Builder(); - } - - - public Session withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public Session withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Session withBandwidth(int bandwidth) { - Utils.checkNotNull(bandwidth, "bandwidth"); - this.bandwidth = Optional.ofNullable(bandwidth); - return this; - } - - - public Session withBandwidth(Optional bandwidth) { - Utils.checkNotNull(bandwidth, "bandwidth"); - this.bandwidth = bandwidth; - return this; - } - - public Session withLocation(String location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - - public Session withLocation(Optional location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Session other = (Session) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.bandwidth, other.bandwidth) && - Utils.enhancedDeepEquals(this.location, other.location); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, bandwidth, location); - } - - @Override - public String toString() { - return Utils.toString(Session.class, - "id", id, - "bandwidth", bandwidth, - "location", location); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional bandwidth = Optional.empty(); - - private Optional location = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder id(String 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 bandwidth(int bandwidth) { - Utils.checkNotNull(bandwidth, "bandwidth"); - this.bandwidth = Optional.ofNullable(bandwidth); - return this; - } - - public Builder bandwidth(Optional bandwidth) { - Utils.checkNotNull(bandwidth, "bandwidth"); - this.bandwidth = bandwidth; - return this; - } - - - public Builder location(String location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - public Builder location(Optional location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - public Session build() { - - return new Session( - id, bandwidth, location); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapRequest.java new file mode 100644 index 00000000..7c7b39f5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapRequest.java @@ -0,0 +1,964 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class SetChannelmapRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the device. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + /** + * The mapping of changes, passed as a map of device channel to lineup VCN. + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=channelMapping") + private Optional channelMapping; + + /** + * The mapping of changes, passed as a map of device channel to lineup key. + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=channelMappingByKey") + private Optional channelMappingByKey; + + /** + * The channels which are enabled. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=channelsEnabled") + private Optional> channelsEnabled; + + @JsonCreator + public SetChannelmapRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long deviceId, + Optional channelMapping, + Optional channelMappingByKey, + Optional> channelsEnabled) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceId, "deviceId"); + Utils.checkNotNull(channelMapping, "channelMapping"); + Utils.checkNotNull(channelMappingByKey, "channelMappingByKey"); + Utils.checkNotNull(channelsEnabled, "channelsEnabled"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceId = deviceId; + this.channelMapping = channelMapping; + this.channelMappingByKey = channelMappingByKey; + this.channelsEnabled = channelsEnabled; + } + + public SetChannelmapRequest( + long deviceId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceId, + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the device. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + /** + * The mapping of changes, passed as a map of device channel to lineup VCN. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional channelMapping() { + return (Optional) channelMapping; + } + + /** + * The mapping of changes, passed as a map of device channel to lineup key. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional channelMappingByKey() { + return (Optional) channelMappingByKey; + } + + /** + * The channels which are enabled. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> channelsEnabled() { + return (Optional>) channelsEnabled; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetChannelmapRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetChannelmapRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SetChannelmapRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SetChannelmapRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SetChannelmapRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SetChannelmapRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SetChannelmapRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SetChannelmapRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SetChannelmapRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SetChannelmapRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SetChannelmapRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SetChannelmapRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SetChannelmapRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SetChannelmapRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SetChannelmapRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SetChannelmapRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SetChannelmapRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SetChannelmapRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SetChannelmapRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SetChannelmapRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SetChannelmapRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SetChannelmapRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the device. + */ + public SetChannelmapRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + /** + * The mapping of changes, passed as a map of device channel to lineup VCN. + */ + public SetChannelmapRequest withChannelMapping(ChannelMapping channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = Optional.ofNullable(channelMapping); + return this; + } + + + /** + * The mapping of changes, passed as a map of device channel to lineup VCN. + */ + public SetChannelmapRequest withChannelMapping(Optional channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = channelMapping; + return this; + } + + /** + * The mapping of changes, passed as a map of device channel to lineup key. + */ + public SetChannelmapRequest withChannelMappingByKey(ChannelMappingByKey channelMappingByKey) { + Utils.checkNotNull(channelMappingByKey, "channelMappingByKey"); + this.channelMappingByKey = Optional.ofNullable(channelMappingByKey); + return this; + } + + + /** + * The mapping of changes, passed as a map of device channel to lineup key. + */ + public SetChannelmapRequest withChannelMappingByKey(Optional channelMappingByKey) { + Utils.checkNotNull(channelMappingByKey, "channelMappingByKey"); + this.channelMappingByKey = channelMappingByKey; + return this; + } + + /** + * The channels which are enabled. + */ + public SetChannelmapRequest withChannelsEnabled(List channelsEnabled) { + Utils.checkNotNull(channelsEnabled, "channelsEnabled"); + this.channelsEnabled = Optional.ofNullable(channelsEnabled); + return this; + } + + + /** + * The channels which are enabled. + */ + public SetChannelmapRequest withChannelsEnabled(Optional> channelsEnabled) { + Utils.checkNotNull(channelsEnabled, "channelsEnabled"); + this.channelsEnabled = channelsEnabled; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetChannelmapRequest other = (SetChannelmapRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId) && + Utils.enhancedDeepEquals(this.channelMapping, other.channelMapping) && + Utils.enhancedDeepEquals(this.channelMappingByKey, other.channelMappingByKey) && + Utils.enhancedDeepEquals(this.channelsEnabled, other.channelsEnabled); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId, + channelMapping, channelMappingByKey, channelsEnabled); + } + + @Override + public String toString() { + return Utils.toString(SetChannelmapRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceId", deviceId, + "channelMapping", channelMapping, + "channelMappingByKey", channelMappingByKey, + "channelsEnabled", channelsEnabled); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long deviceId; + + private Optional channelMapping = Optional.empty(); + + private Optional channelMappingByKey = Optional.empty(); + + private Optional> channelsEnabled = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the device. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + + /** + * The mapping of changes, passed as a map of device channel to lineup VCN. + */ + public Builder channelMapping(ChannelMapping channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = Optional.ofNullable(channelMapping); + return this; + } + + /** + * The mapping of changes, passed as a map of device channel to lineup VCN. + */ + public Builder channelMapping(Optional channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = channelMapping; + return this; + } + + + /** + * The mapping of changes, passed as a map of device channel to lineup key. + */ + public Builder channelMappingByKey(ChannelMappingByKey channelMappingByKey) { + Utils.checkNotNull(channelMappingByKey, "channelMappingByKey"); + this.channelMappingByKey = Optional.ofNullable(channelMappingByKey); + return this; + } + + /** + * The mapping of changes, passed as a map of device channel to lineup key. + */ + public Builder channelMappingByKey(Optional channelMappingByKey) { + Utils.checkNotNull(channelMappingByKey, "channelMappingByKey"); + this.channelMappingByKey = channelMappingByKey; + return this; + } + + + /** + * The channels which are enabled. + */ + public Builder channelsEnabled(List channelsEnabled) { + Utils.checkNotNull(channelsEnabled, "channelsEnabled"); + this.channelsEnabled = Optional.ofNullable(channelsEnabled); + return this; + } + + /** + * The channels which are enabled. + */ + public Builder channelsEnabled(Optional> channelsEnabled) { + Utils.checkNotNull(channelsEnabled, "channelsEnabled"); + this.channelsEnabled = channelsEnabled; + return this; + } + + public SetChannelmapRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SetChannelmapRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId, + channelMapping, channelMappingByKey, channelsEnabled); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapRequestBuilder.java new file mode 100644 index 00000000..e243c90e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SetChannelmap; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SetChannelmapRequestBuilder { + + private SetChannelmapRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetChannelmapRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetChannelmapRequestBuilder request(SetChannelmapRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SetChannelmapResponse call() throws Exception { + + RequestOperation operation + = new SetChannelmap.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapResponse.java new file mode 100644 index 00000000..6459ecfe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetChannelmapResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +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.Optional; + + +public class SetChannelmapResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + @JsonCreator + public SetChannelmapResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + } + + public SetChannelmapResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetChannelmapResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetChannelmapResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetChannelmapResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public SetChannelmapResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public SetChannelmapResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetChannelmapResponse other = (SetChannelmapResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + @Override + public String toString() { + return Utils.toString(SetChannelmapResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public SetChannelmapResponse build() { + + return new SetChannelmapResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesDVR.java b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesDVR.java new file mode 100644 index 00000000..484ee63c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesDVR.java @@ -0,0 +1,290 @@ +/* + * 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.models.shared.Device; +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.Optional; + + +public class SetDVRPreferencesDVR { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineup") + private Optional lineup; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public SetDVRPreferencesDVR( + @JsonProperty("Device") Optional> device, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("lineup") Optional lineup, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(lineup, "lineup"); + Utils.checkNotNull(uuid, "uuid"); + this.device = device; + this.key = key; + this.language = language; + this.lineup = lineup; + this.uuid = uuid; + } + + public SetDVRPreferencesDVR() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> device() { + return (Optional>) device; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional lineup() { + return lineup; + } + + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public SetDVRPreferencesDVR withDevice(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public SetDVRPreferencesDVR withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public SetDVRPreferencesDVR withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public SetDVRPreferencesDVR withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public SetDVRPreferencesDVR withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public SetDVRPreferencesDVR withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public SetDVRPreferencesDVR withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + public SetDVRPreferencesDVR withLineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public SetDVRPreferencesDVR withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + public SetDVRPreferencesDVR withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetDVRPreferencesDVR other = (SetDVRPreferencesDVR) o; + return + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.lineup, other.lineup) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + device, key, language, + lineup, uuid); + } + + @Override + public String toString() { + return Utils.toString(SetDVRPreferencesDVR.class, + "device", device, + "key", key, + "language", language, + "lineup", lineup, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> device = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional lineup = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder device(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + 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 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 lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + public Builder lineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public SetDVRPreferencesDVR build() { + + return new SetDVRPreferencesDVR( + device, key, language, + lineup, uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesDVRsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesDVRsMediaContainer.java new file mode 100644 index 00000000..064fa08d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesDVRsMediaContainer.java @@ -0,0 +1,344 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * SetDVRPreferencesDVRsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class SetDVRPreferencesDVRsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public SetDVRPreferencesDVRsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(status, "status"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.status = status; + } + + public SetDVRPreferencesDVRsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + public SetDVRPreferencesDVRsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public SetDVRPreferencesDVRsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public SetDVRPreferencesDVRsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public SetDVRPreferencesDVRsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public SetDVRPreferencesDVRsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public SetDVRPreferencesDVRsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public SetDVRPreferencesDVRsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public SetDVRPreferencesDVRsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public SetDVRPreferencesDVRsMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public SetDVRPreferencesDVRsMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetDVRPreferencesDVRsMediaContainer other = (SetDVRPreferencesDVRsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, status); + } + + @Override + public String toString() { + return Utils.toString(SetDVRPreferencesDVRsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public SetDVRPreferencesDVRsMediaContainer build() { + + return new SetDVRPreferencesDVRsMediaContainer( + identifier, offset, size, + totalSize, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesMediaContainer.java new file mode 100644 index 00000000..88421180 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesMediaContainer.java @@ -0,0 +1,158 @@ +/* + * 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.Optional; + + +public class SetDVRPreferencesMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DVR") + private Optional> dvr; + + @JsonCreator + public SetDVRPreferencesMediaContainer( + @JsonProperty("MediaContainer") Optional mediaContainer, + @JsonProperty("DVR") Optional> dvr) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + Utils.checkNotNull(dvr, "dvr"); + this.mediaContainer = mediaContainer; + this.dvr = dvr; + } + + public SetDVRPreferencesMediaContainer() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> dvr() { + return (Optional>) dvr; + } + + public static Builder builder() { + return new Builder(); + } + + + public SetDVRPreferencesMediaContainer withMediaContainer(SetDVRPreferencesDVRsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public SetDVRPreferencesMediaContainer withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public SetDVRPreferencesMediaContainer withDvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + + public SetDVRPreferencesMediaContainer withDvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetDVRPreferencesMediaContainer other = (SetDVRPreferencesMediaContainer) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer) && + Utils.enhancedDeepEquals(this.dvr, other.dvr); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer, dvr); + } + + @Override + public String toString() { + return Utils.toString(SetDVRPreferencesMediaContainer.class, + "mediaContainer", mediaContainer, + "dvr", dvr); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Optional> dvr = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(SetDVRPreferencesDVRsMediaContainer 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 Builder dvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + public Builder dvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + public SetDVRPreferencesMediaContainer build() { + + return new SetDVRPreferencesMediaContainer( + mediaContainer, dvr); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesRequest.java new file mode 100644 index 00000000..59dde101 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesRequest.java @@ -0,0 +1,842 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SetDVRPreferencesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the DVR. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dvrId") + private long dvrId; + + /** + * Set the `name` preference to the provided value + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=name") + private Optional name; + + @JsonCreator + public SetDVRPreferencesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long dvrId, + Optional name) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(dvrId, "dvrId"); + Utils.checkNotNull(name, "name"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.dvrId = dvrId; + this.name = name; + } + + public SetDVRPreferencesRequest( + long dvrId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), dvrId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the DVR. + */ + @JsonIgnore + public long dvrId() { + return dvrId; + } + + /** + * Set the `name` preference to the provided value + */ + @JsonIgnore + public Optional name() { + return name; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetDVRPreferencesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetDVRPreferencesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SetDVRPreferencesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SetDVRPreferencesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SetDVRPreferencesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SetDVRPreferencesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SetDVRPreferencesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SetDVRPreferencesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SetDVRPreferencesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SetDVRPreferencesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SetDVRPreferencesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SetDVRPreferencesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SetDVRPreferencesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SetDVRPreferencesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SetDVRPreferencesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SetDVRPreferencesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SetDVRPreferencesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SetDVRPreferencesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SetDVRPreferencesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SetDVRPreferencesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SetDVRPreferencesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SetDVRPreferencesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the DVR. + */ + public SetDVRPreferencesRequest withDvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + /** + * Set the `name` preference to the provided value + */ + public SetDVRPreferencesRequest withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * Set the `name` preference to the provided value + */ + public SetDVRPreferencesRequest withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetDVRPreferencesRequest other = (SetDVRPreferencesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.dvrId, other.dvrId) && + Utils.enhancedDeepEquals(this.name, other.name); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + name); + } + + @Override + public String toString() { + return Utils.toString(SetDVRPreferencesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "dvrId", dvrId, + "name", name); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long dvrId; + + private Optional name = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the DVR. + */ + public Builder dvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + + /** + * Set the `name` preference to the provided value + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * Set the `name` preference to the provided value + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public SetDVRPreferencesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SetDVRPreferencesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + name); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesRequestBuilder.java new file mode 100644 index 00000000..4b0ba094 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SetDVRPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SetDVRPreferencesRequestBuilder { + + private SetDVRPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetDVRPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetDVRPreferencesRequestBuilder request(SetDVRPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SetDVRPreferencesResponse call() throws Exception { + + RequestOperation operation + = new SetDVRPreferences.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesResponse.java new file mode 100644 index 00000000..b47982ae --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class SetDVRPreferencesResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public SetDVRPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public SetDVRPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetDVRPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetDVRPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetDVRPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public SetDVRPreferencesResponse withObject(SetDVRPreferencesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public SetDVRPreferencesResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public SetDVRPreferencesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetDVRPreferencesResponse other = (SetDVRPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(SetDVRPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(SetDVRPreferencesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public SetDVRPreferencesResponse build() { + + return new SetDVRPreferencesResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesResponseBody.java new file mode 100644 index 00000000..aa6f9cb0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetDVRPreferencesResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * SetDVRPreferencesResponseBody + * + *

OK + */ +public class SetDVRPreferencesResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public SetDVRPreferencesResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public SetDVRPreferencesResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public SetDVRPreferencesResponseBody withMediaContainer(SetDVRPreferencesMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public SetDVRPreferencesResponseBody 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; + } + SetDVRPreferencesResponseBody other = (SetDVRPreferencesResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(SetDVRPreferencesResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(SetDVRPreferencesMediaContainer 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 SetDVRPreferencesResponseBody build() { + + return new SetDVRPreferencesResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesRequest.java new file mode 100644 index 00000000..1db0a3d3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesRequest.java @@ -0,0 +1,842 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SetDevicePreferencesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the device. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + /** + * The preference names and values. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=name") + private Optional name; + + @JsonCreator + public SetDevicePreferencesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long deviceId, + Optional name) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceId, "deviceId"); + Utils.checkNotNull(name, "name"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceId = deviceId; + this.name = name; + } + + public SetDevicePreferencesRequest( + long deviceId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the device. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + /** + * The preference names and values. + */ + @JsonIgnore + public Optional name() { + return name; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetDevicePreferencesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetDevicePreferencesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SetDevicePreferencesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SetDevicePreferencesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SetDevicePreferencesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SetDevicePreferencesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SetDevicePreferencesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SetDevicePreferencesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SetDevicePreferencesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SetDevicePreferencesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SetDevicePreferencesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SetDevicePreferencesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SetDevicePreferencesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SetDevicePreferencesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SetDevicePreferencesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SetDevicePreferencesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SetDevicePreferencesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SetDevicePreferencesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SetDevicePreferencesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SetDevicePreferencesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SetDevicePreferencesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SetDevicePreferencesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the device. + */ + public SetDevicePreferencesRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + /** + * The preference names and values. + */ + public SetDevicePreferencesRequest withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * The preference names and values. + */ + public SetDevicePreferencesRequest withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetDevicePreferencesRequest other = (SetDevicePreferencesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId) && + Utils.enhancedDeepEquals(this.name, other.name); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId, + name); + } + + @Override + public String toString() { + return Utils.toString(SetDevicePreferencesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceId", deviceId, + "name", name); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long deviceId; + + private Optional name = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the device. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + + /** + * The preference names and values. + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * The preference names and values. + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public SetDevicePreferencesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SetDevicePreferencesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId, + name); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesRequestBuilder.java new file mode 100644 index 00000000..cda1f694 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SetDevicePreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SetDevicePreferencesRequestBuilder { + + private SetDevicePreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetDevicePreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetDevicePreferencesRequestBuilder request(SetDevicePreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SetDevicePreferencesResponse call() throws Exception { + + RequestOperation operation + = new SetDevicePreferences.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesResponse.java new file mode 100644 index 00000000..9d624934 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetDevicePreferencesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetDevicePreferencesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetDevicePreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetDevicePreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetDevicePreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetDevicePreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetDevicePreferencesResponse other = (SetDevicePreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetDevicePreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetDevicePreferencesResponse build() { + + return new SetDevicePreferencesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkRequest.java new file mode 100644 index 00000000..ac897116 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkRequest.java @@ -0,0 +1,860 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class SetItemArtworkRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=element") + private Element element; + + /** + * The url of the new asset. If not provided, the binary of the asset must be provided in the post body. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private Optional url; + + @JsonCreator + public SetItemArtworkRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Element element, + Optional url) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(element, "element"); + Utils.checkNotNull(url, "url"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.element = element; + this.url = url; + } + + public SetItemArtworkRequest( + String ids, + Element element) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + element, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @JsonIgnore + public Element element() { + return element; + } + + /** + * The url of the new asset. If not provided, the binary of the asset must be provided in the post body. + */ + @JsonIgnore + public Optional url() { + return url; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetItemArtworkRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetItemArtworkRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SetItemArtworkRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SetItemArtworkRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SetItemArtworkRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SetItemArtworkRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SetItemArtworkRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SetItemArtworkRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SetItemArtworkRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SetItemArtworkRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SetItemArtworkRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SetItemArtworkRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SetItemArtworkRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SetItemArtworkRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SetItemArtworkRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SetItemArtworkRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SetItemArtworkRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SetItemArtworkRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SetItemArtworkRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SetItemArtworkRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SetItemArtworkRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SetItemArtworkRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public SetItemArtworkRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public SetItemArtworkRequest withElement(Element element) { + Utils.checkNotNull(element, "element"); + this.element = element; + return this; + } + + /** + * The url of the new asset. If not provided, the binary of the asset must be provided in the post body. + */ + public SetItemArtworkRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + + /** + * The url of the new asset. If not provided, the binary of the asset must be provided in the post body. + */ + public SetItemArtworkRequest withUrl(Optional 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; + } + SetItemArtworkRequest other = (SetItemArtworkRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.element, other.element) && + Utils.enhancedDeepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + element, url); + } + + @Override + public String toString() { + return Utils.toString(SetItemArtworkRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "element", element, + "url", url); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Element element; + + private Optional url = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder element(Element element) { + Utils.checkNotNull(element, "element"); + this.element = element; + return this; + } + + + /** + * The url of the new asset. If not provided, the binary of the asset must be provided in the post body. + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The url of the new asset. If not provided, the binary of the asset must be provided in the post body. + */ + public Builder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public SetItemArtworkRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SetItemArtworkRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + element, url); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkRequestBuilder.java new file mode 100644 index 00000000..0b8d774a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SetItemArtwork; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SetItemArtworkRequestBuilder { + + private SetItemArtworkRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetItemArtworkRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetItemArtworkRequestBuilder request(SetItemArtworkRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SetItemArtworkResponse call() throws Exception { + + RequestOperation operation + = new SetItemArtwork.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkResponse.java new file mode 100644 index 00000000..5fc8fecb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetItemArtworkResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetItemArtworkResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetItemArtworkResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetItemArtworkResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetItemArtworkResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetItemArtworkResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetItemArtworkResponse other = (SetItemArtworkResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetItemArtworkResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetItemArtworkResponse build() { + + return new SetItemArtworkResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesRequest.java new file mode 100644 index 00000000..212f6a25 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesRequest.java @@ -0,0 +1,814 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class SetItemPreferencesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=args") + private Optional args; + + @JsonCreator + public SetItemPreferencesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional args) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(args, "args"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.args = args; + } + + public SetItemPreferencesRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional args() { + return (Optional) args; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetItemPreferencesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetItemPreferencesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SetItemPreferencesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SetItemPreferencesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SetItemPreferencesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SetItemPreferencesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SetItemPreferencesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SetItemPreferencesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SetItemPreferencesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SetItemPreferencesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SetItemPreferencesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SetItemPreferencesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SetItemPreferencesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SetItemPreferencesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SetItemPreferencesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SetItemPreferencesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SetItemPreferencesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SetItemPreferencesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SetItemPreferencesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SetItemPreferencesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SetItemPreferencesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SetItemPreferencesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public SetItemPreferencesRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public SetItemPreferencesRequest withArgs(QueryParamArgs args) { + Utils.checkNotNull(args, "args"); + this.args = Optional.ofNullable(args); + return this; + } + + + public SetItemPreferencesRequest withArgs(Optional args) { + Utils.checkNotNull(args, "args"); + this.args = args; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetItemPreferencesRequest other = (SetItemPreferencesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.args, other.args); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + args); + } + + @Override + public String toString() { + return Utils.toString(SetItemPreferencesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "args", args); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional args = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder args(QueryParamArgs args) { + Utils.checkNotNull(args, "args"); + this.args = Optional.ofNullable(args); + return this; + } + + public Builder args(Optional args) { + Utils.checkNotNull(args, "args"); + this.args = args; + return this; + } + + public SetItemPreferencesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SetItemPreferencesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + args); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesRequestBuilder.java new file mode 100644 index 00000000..54a2632c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SetItemPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SetItemPreferencesRequestBuilder { + + private SetItemPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetItemPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetItemPreferencesRequestBuilder request(SetItemPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SetItemPreferencesResponse call() throws Exception { + + RequestOperation operation + = new SetItemPreferences.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesResponse.java new file mode 100644 index 00000000..3a39cfbc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetItemPreferencesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetItemPreferencesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetItemPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetItemPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetItemPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetItemPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetItemPreferencesResponse other = (SetItemPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetItemPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetItemPreferencesResponse build() { + + return new SetItemPreferencesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesRequest.java new file mode 100644 index 00000000..8fbd97fd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesRequest.java @@ -0,0 +1,768 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class SetPreferencesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=prefs") + private Prefs prefs; + + @JsonCreator + public SetPreferencesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Prefs prefs) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(prefs, "prefs"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.prefs = prefs; + } + + public SetPreferencesRequest( + Prefs prefs) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), prefs); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public Prefs prefs() { + return prefs; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetPreferencesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetPreferencesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SetPreferencesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SetPreferencesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SetPreferencesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SetPreferencesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SetPreferencesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SetPreferencesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SetPreferencesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SetPreferencesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SetPreferencesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SetPreferencesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SetPreferencesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SetPreferencesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SetPreferencesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SetPreferencesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SetPreferencesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SetPreferencesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SetPreferencesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SetPreferencesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SetPreferencesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SetPreferencesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public SetPreferencesRequest withPrefs(Prefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetPreferencesRequest other = (SetPreferencesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.prefs, other.prefs); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, prefs); + } + + @Override + public String toString() { + return Utils.toString(SetPreferencesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "prefs", prefs); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Prefs prefs; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder prefs(Prefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + public SetPreferencesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SetPreferencesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, prefs); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesRequestBuilder.java new file mode 100644 index 00000000..9d819f2e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SetPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SetPreferencesRequestBuilder { + + private SetPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetPreferencesRequestBuilder request(SetPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SetPreferencesResponse call() throws Exception { + + RequestOperation operation + = new SetPreferences.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesResponse.java new file mode 100644 index 00000000..11cdbc31 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetPreferencesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetPreferencesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetPreferencesResponse other = (SetPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetPreferencesResponse build() { + + return new SetPreferencesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetRatingRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SetRatingRequest.java new file mode 100644 index 00000000..ab46e849 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetRatingRequest.java @@ -0,0 +1,925 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SetRatingRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=identifier") + private String identifier; + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") + private String key; + + /** + * The rating to give the item. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=rating") + private double rating; + + /** + * The time when the rating occurred. If not present, interpreted as now. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=ratedAt") + private Optional ratedAt; + + @JsonCreator + public SetRatingRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String identifier, + String key, + double rating, + Optional ratedAt) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(ratedAt, "ratedAt"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.identifier = identifier; + this.key = key; + this.rating = rating; + this.ratedAt = ratedAt; + } + + public SetRatingRequest( + String identifier, + String key, + double rating) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), identifier, + key, rating, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + @JsonIgnore + public String identifier() { + return identifier; + } + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + @JsonIgnore + public String key() { + return key; + } + + /** + * The rating to give the item. + */ + @JsonIgnore + public double rating() { + return rating; + } + + /** + * The time when the rating occurred. If not present, interpreted as now. + */ + @JsonIgnore + public Optional ratedAt() { + return ratedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetRatingRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetRatingRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SetRatingRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SetRatingRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SetRatingRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SetRatingRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SetRatingRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SetRatingRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SetRatingRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SetRatingRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SetRatingRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SetRatingRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SetRatingRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SetRatingRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SetRatingRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SetRatingRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SetRatingRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SetRatingRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SetRatingRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SetRatingRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SetRatingRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SetRatingRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + public SetRatingRequest withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + public SetRatingRequest withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The rating to give the item. + */ + public SetRatingRequest withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + /** + * The time when the rating occurred. If not present, interpreted as now. + */ + public SetRatingRequest withRatedAt(long ratedAt) { + Utils.checkNotNull(ratedAt, "ratedAt"); + this.ratedAt = Optional.ofNullable(ratedAt); + return this; + } + + + /** + * The time when the rating occurred. If not present, interpreted as now. + */ + public SetRatingRequest withRatedAt(Optional ratedAt) { + Utils.checkNotNull(ratedAt, "ratedAt"); + this.ratedAt = ratedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetRatingRequest other = (SetRatingRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.rating, other.rating) && + Utils.enhancedDeepEquals(this.ratedAt, other.ratedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, identifier, + key, rating, ratedAt); + } + + @Override + public String toString() { + return Utils.toString(SetRatingRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "identifier", identifier, + "key", key, + "rating", rating, + "ratedAt", ratedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String identifier; + + private String key; + + private Double rating; + + private Optional ratedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * The rating to give the item. + */ + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + + /** + * The time when the rating occurred. If not present, interpreted as now. + */ + public Builder ratedAt(long ratedAt) { + Utils.checkNotNull(ratedAt, "ratedAt"); + this.ratedAt = Optional.ofNullable(ratedAt); + return this; + } + + /** + * The time when the rating occurred. If not present, interpreted as now. + */ + public Builder ratedAt(Optional ratedAt) { + Utils.checkNotNull(ratedAt, "ratedAt"); + this.ratedAt = ratedAt; + return this; + } + + public SetRatingRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SetRatingRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, identifier, + key, rating, ratedAt); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetRatingRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SetRatingRequestBuilder.java new file mode 100644 index 00000000..00be211c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetRatingRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SetRating; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SetRatingRequestBuilder { + + private SetRatingRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetRatingRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetRatingRequestBuilder request(SetRatingRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SetRatingResponse call() throws Exception { + + RequestOperation operation + = new SetRating.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetRatingResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SetRatingResponse.java new file mode 100644 index 00000000..fdbcfbb3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetRatingResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetRatingResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetRatingResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetRatingResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetRatingResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetRatingResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetRatingResponse other = (SetRatingResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetRatingResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetRatingResponse build() { + + return new SetRatingResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesQueryParamPrefs.java b/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesQueryParamPrefs.java new file mode 100644 index 00000000..db0ddf68 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesQueryParamPrefs.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * SetSectionPreferencesQueryParamPrefs + */ +public class SetSectionPreferencesQueryParamPrefs { + @JsonCreator + public SetSectionPreferencesQueryParamPrefs() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(SetSectionPreferencesQueryParamPrefs.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public SetSectionPreferencesQueryParamPrefs build() { + + return new SetSectionPreferencesQueryParamPrefs( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesRequest.java new file mode 100644 index 00000000..d972652e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesRequest.java @@ -0,0 +1,813 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SetSectionPreferencesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=prefs") + private SetSectionPreferencesQueryParamPrefs prefs; + + @JsonCreator + public SetSectionPreferencesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + SetSectionPreferencesQueryParamPrefs prefs) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(prefs, "prefs"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.prefs = prefs; + } + + public SetSectionPreferencesRequest( + long sectionId, + SetSectionPreferencesQueryParamPrefs prefs) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + prefs); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + @JsonIgnore + public SetSectionPreferencesQueryParamPrefs prefs() { + return prefs; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetSectionPreferencesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetSectionPreferencesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SetSectionPreferencesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SetSectionPreferencesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SetSectionPreferencesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SetSectionPreferencesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SetSectionPreferencesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SetSectionPreferencesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SetSectionPreferencesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SetSectionPreferencesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SetSectionPreferencesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SetSectionPreferencesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SetSectionPreferencesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SetSectionPreferencesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SetSectionPreferencesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SetSectionPreferencesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SetSectionPreferencesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SetSectionPreferencesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SetSectionPreferencesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SetSectionPreferencesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SetSectionPreferencesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SetSectionPreferencesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public SetSectionPreferencesRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public SetSectionPreferencesRequest withPrefs(SetSectionPreferencesQueryParamPrefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetSectionPreferencesRequest other = (SetSectionPreferencesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.prefs, other.prefs); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + prefs); + } + + @Override + public String toString() { + return Utils.toString(SetSectionPreferencesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "prefs", prefs); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private SetSectionPreferencesQueryParamPrefs prefs; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + public Builder prefs(SetSectionPreferencesQueryParamPrefs prefs) { + Utils.checkNotNull(prefs, "prefs"); + this.prefs = prefs; + return this; + } + + public SetSectionPreferencesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SetSectionPreferencesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + prefs); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesRequestBuilder.java new file mode 100644 index 00000000..3f1ff868 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SetSectionPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SetSectionPreferencesRequestBuilder { + + private SetSectionPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetSectionPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetSectionPreferencesRequestBuilder request(SetSectionPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SetSectionPreferencesResponse call() throws Exception { + + RequestOperation operation + = new SetSectionPreferences.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesResponse.java new file mode 100644 index 00000000..1c9224f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetSectionPreferencesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetSectionPreferencesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetSectionPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetSectionPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetSectionPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetSectionPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetSectionPreferencesResponse other = (SetSectionPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetSectionPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetSectionPreferencesResponse build() { + + return new SetSectionPreferencesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetRequest.java new file mode 100644 index 00000000..80012415 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetRequest.java @@ -0,0 +1,883 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SetStreamOffsetRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the stream + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=streamId") + private long streamId; + + /** + * This is not a part of this endpoint but documented here to satisfy OpenAPI + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ext") + private String ext; + + /** + * The offest in ms + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset") + private Optional offset; + + @JsonCreator + public SetStreamOffsetRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long streamId, + String ext, + Optional offset) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(streamId, "streamId"); + Utils.checkNotNull(ext, "ext"); + Utils.checkNotNull(offset, "offset"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.streamId = streamId; + this.ext = ext; + this.offset = offset; + } + + public SetStreamOffsetRequest( + long streamId, + String ext) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), streamId, + ext, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the stream + */ + @JsonIgnore + public long streamId() { + return streamId; + } + + /** + * This is not a part of this endpoint but documented here to satisfy OpenAPI + */ + @JsonIgnore + public String ext() { + return ext; + } + + /** + * The offest in ms + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetStreamOffsetRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetStreamOffsetRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SetStreamOffsetRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SetStreamOffsetRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SetStreamOffsetRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SetStreamOffsetRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SetStreamOffsetRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SetStreamOffsetRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SetStreamOffsetRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SetStreamOffsetRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SetStreamOffsetRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SetStreamOffsetRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SetStreamOffsetRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SetStreamOffsetRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SetStreamOffsetRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SetStreamOffsetRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SetStreamOffsetRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SetStreamOffsetRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SetStreamOffsetRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SetStreamOffsetRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SetStreamOffsetRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SetStreamOffsetRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the stream + */ + public SetStreamOffsetRequest withStreamId(long streamId) { + Utils.checkNotNull(streamId, "streamId"); + this.streamId = streamId; + return this; + } + + /** + * This is not a part of this endpoint but documented here to satisfy OpenAPI + */ + public SetStreamOffsetRequest withExt(String ext) { + Utils.checkNotNull(ext, "ext"); + this.ext = ext; + return this; + } + + /** + * The offest in ms + */ + public SetStreamOffsetRequest withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offest in ms + */ + public SetStreamOffsetRequest withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetStreamOffsetRequest other = (SetStreamOffsetRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.streamId, other.streamId) && + Utils.enhancedDeepEquals(this.ext, other.ext) && + Utils.enhancedDeepEquals(this.offset, other.offset); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, streamId, + ext, offset); + } + + @Override + public String toString() { + return Utils.toString(SetStreamOffsetRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "streamId", streamId, + "ext", ext, + "offset", offset); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long streamId; + + private String ext; + + private Optional offset = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the stream + */ + public Builder streamId(long streamId) { + Utils.checkNotNull(streamId, "streamId"); + this.streamId = streamId; + return this; + } + + + /** + * This is not a part of this endpoint but documented here to satisfy OpenAPI + */ + public Builder ext(String ext) { + Utils.checkNotNull(ext, "ext"); + this.ext = ext; + return this; + } + + + /** + * The offest in ms + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offest in ms + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public SetStreamOffsetRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SetStreamOffsetRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, streamId, + ext, offset); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetRequestBuilder.java new file mode 100644 index 00000000..a12b59cb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SetStreamOffset; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SetStreamOffsetRequestBuilder { + + private SetStreamOffsetRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetStreamOffsetRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetStreamOffsetRequestBuilder request(SetStreamOffsetRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SetStreamOffsetResponse call() throws Exception { + + RequestOperation operation + = new SetStreamOffset.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetResponse.java new file mode 100644 index 00000000..00212e76 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamOffsetResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetStreamOffsetResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetStreamOffsetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetStreamOffsetResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetStreamOffsetResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetStreamOffsetResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetStreamOffsetResponse other = (SetStreamOffsetResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetStreamOffsetResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetStreamOffsetResponse build() { + + return new SetStreamOffsetResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionRequest.java new file mode 100644 index 00000000..6be77a7b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionRequest.java @@ -0,0 +1,962 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SetStreamSelectionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the part to select streams on + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=partId") + private long partId; + + /** + * The id of the audio stream to select in this part + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioStreamID") + private Optional audioStreamID; + + /** + * The id of the subtitle stream to select in this part. Specify 0 to select no subtitle + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitleStreamID") + private Optional subtitleStreamID; + + /** + * Perform the same for all parts of this media selecting similar streams in each + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=allParts") + private Optional allParts; + + @JsonCreator + public SetStreamSelectionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long partId, + Optional audioStreamID, + Optional subtitleStreamID, + Optional allParts) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(partId, "partId"); + Utils.checkNotNull(audioStreamID, "audioStreamID"); + Utils.checkNotNull(subtitleStreamID, "subtitleStreamID"); + Utils.checkNotNull(allParts, "allParts"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.partId = partId; + this.audioStreamID = audioStreamID; + this.subtitleStreamID = subtitleStreamID; + this.allParts = allParts; + } + + public SetStreamSelectionRequest( + long partId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), partId, + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the part to select streams on + */ + @JsonIgnore + public long partId() { + return partId; + } + + /** + * The id of the audio stream to select in this part + */ + @JsonIgnore + public Optional audioStreamID() { + return audioStreamID; + } + + /** + * The id of the subtitle stream to select in this part. Specify 0 to select no subtitle + */ + @JsonIgnore + public Optional subtitleStreamID() { + return subtitleStreamID; + } + + /** + * Perform the same for all parts of this media selecting similar streams in each + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional allParts() { + return (Optional) allParts; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetStreamSelectionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SetStreamSelectionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SetStreamSelectionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SetStreamSelectionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SetStreamSelectionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SetStreamSelectionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SetStreamSelectionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SetStreamSelectionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SetStreamSelectionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SetStreamSelectionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SetStreamSelectionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SetStreamSelectionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SetStreamSelectionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SetStreamSelectionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SetStreamSelectionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SetStreamSelectionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SetStreamSelectionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SetStreamSelectionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SetStreamSelectionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SetStreamSelectionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SetStreamSelectionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SetStreamSelectionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the part to select streams on + */ + public SetStreamSelectionRequest withPartId(long partId) { + Utils.checkNotNull(partId, "partId"); + this.partId = partId; + return this; + } + + /** + * The id of the audio stream to select in this part + */ + public SetStreamSelectionRequest withAudioStreamID(long audioStreamID) { + Utils.checkNotNull(audioStreamID, "audioStreamID"); + this.audioStreamID = Optional.ofNullable(audioStreamID); + return this; + } + + + /** + * The id of the audio stream to select in this part + */ + public SetStreamSelectionRequest withAudioStreamID(Optional audioStreamID) { + Utils.checkNotNull(audioStreamID, "audioStreamID"); + this.audioStreamID = audioStreamID; + return this; + } + + /** + * The id of the subtitle stream to select in this part. Specify 0 to select no subtitle + */ + public SetStreamSelectionRequest withSubtitleStreamID(long subtitleStreamID) { + Utils.checkNotNull(subtitleStreamID, "subtitleStreamID"); + this.subtitleStreamID = Optional.ofNullable(subtitleStreamID); + return this; + } + + + /** + * The id of the subtitle stream to select in this part. Specify 0 to select no subtitle + */ + public SetStreamSelectionRequest withSubtitleStreamID(Optional subtitleStreamID) { + Utils.checkNotNull(subtitleStreamID, "subtitleStreamID"); + this.subtitleStreamID = subtitleStreamID; + return this; + } + + /** + * Perform the same for all parts of this media selecting similar streams in each + */ + public SetStreamSelectionRequest withAllParts(BoolInt allParts) { + Utils.checkNotNull(allParts, "allParts"); + this.allParts = Optional.ofNullable(allParts); + return this; + } + + + /** + * Perform the same for all parts of this media selecting similar streams in each + */ + public SetStreamSelectionRequest withAllParts(Optional allParts) { + Utils.checkNotNull(allParts, "allParts"); + this.allParts = allParts; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetStreamSelectionRequest other = (SetStreamSelectionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.partId, other.partId) && + Utils.enhancedDeepEquals(this.audioStreamID, other.audioStreamID) && + Utils.enhancedDeepEquals(this.subtitleStreamID, other.subtitleStreamID) && + Utils.enhancedDeepEquals(this.allParts, other.allParts); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, partId, + audioStreamID, subtitleStreamID, allParts); + } + + @Override + public String toString() { + return Utils.toString(SetStreamSelectionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "partId", partId, + "audioStreamID", audioStreamID, + "subtitleStreamID", subtitleStreamID, + "allParts", allParts); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long partId; + + private Optional audioStreamID = Optional.empty(); + + private Optional subtitleStreamID = Optional.empty(); + + private Optional allParts = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the part to select streams on + */ + public Builder partId(long partId) { + Utils.checkNotNull(partId, "partId"); + this.partId = partId; + return this; + } + + + /** + * The id of the audio stream to select in this part + */ + public Builder audioStreamID(long audioStreamID) { + Utils.checkNotNull(audioStreamID, "audioStreamID"); + this.audioStreamID = Optional.ofNullable(audioStreamID); + return this; + } + + /** + * The id of the audio stream to select in this part + */ + public Builder audioStreamID(Optional audioStreamID) { + Utils.checkNotNull(audioStreamID, "audioStreamID"); + this.audioStreamID = audioStreamID; + return this; + } + + + /** + * The id of the subtitle stream to select in this part. Specify 0 to select no subtitle + */ + public Builder subtitleStreamID(long subtitleStreamID) { + Utils.checkNotNull(subtitleStreamID, "subtitleStreamID"); + this.subtitleStreamID = Optional.ofNullable(subtitleStreamID); + return this; + } + + /** + * The id of the subtitle stream to select in this part. Specify 0 to select no subtitle + */ + public Builder subtitleStreamID(Optional subtitleStreamID) { + Utils.checkNotNull(subtitleStreamID, "subtitleStreamID"); + this.subtitleStreamID = subtitleStreamID; + return this; + } + + + /** + * Perform the same for all parts of this media selecting similar streams in each + */ + public Builder allParts(BoolInt allParts) { + Utils.checkNotNull(allParts, "allParts"); + this.allParts = Optional.ofNullable(allParts); + return this; + } + + /** + * Perform the same for all parts of this media selecting similar streams in each + */ + public Builder allParts(Optional allParts) { + Utils.checkNotNull(allParts, "allParts"); + this.allParts = allParts; + return this; + } + + public SetStreamSelectionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SetStreamSelectionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, partId, + audioStreamID, subtitleStreamID, allParts); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionRequestBuilder.java new file mode 100644 index 00000000..ae1ea59f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SetStreamSelection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SetStreamSelectionRequestBuilder { + + private SetStreamSelectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetStreamSelectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetStreamSelectionRequestBuilder request(SetStreamSelectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SetStreamSelectionResponse call() throws Exception { + + RequestOperation operation + = new SetStreamSelection.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionResponse.java new file mode 100644 index 00000000..9d75a187 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SetStreamSelectionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetStreamSelectionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetStreamSelectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetStreamSelectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetStreamSelectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetStreamSelectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetStreamSelectionResponse other = (SetStreamSelectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetStreamSelectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetStreamSelectionResponse build() { + + return new SetStreamSelectionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Setting.java b/src/main/java/dev/plexapi/sdk/models/operations/Setting.java deleted file mode 100644 index ab970974..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Setting.java +++ /dev/null @@ -1,508 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Setting { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("label") - private Optional label; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("summary") - private Optional summary; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("default") - private Optional default_; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("value") - private Optional value; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hidden") - private Optional hidden; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("advanced") - private Optional advanced; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("group") - private Optional group; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("enumValues") - private Optional enumValues; - - @JsonCreator - public Setting( - @JsonProperty("id") Optional id, - @JsonProperty("label") Optional label, - @JsonProperty("summary") Optional summary, - @JsonProperty("type") Optional type, - @JsonProperty("default") Optional default_, - @JsonProperty("value") Optional value, - @JsonProperty("hidden") Optional hidden, - @JsonProperty("advanced") Optional advanced, - @JsonProperty("group") Optional group, - @JsonProperty("enumValues") Optional enumValues) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(label, "label"); - Utils.checkNotNull(summary, "summary"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(default_, "default_"); - Utils.checkNotNull(value, "value"); - Utils.checkNotNull(hidden, "hidden"); - Utils.checkNotNull(advanced, "advanced"); - Utils.checkNotNull(group, "group"); - Utils.checkNotNull(enumValues, "enumValues"); - this.id = id; - this.label = label; - this.summary = summary; - this.type = type; - this.default_ = default_; - this.value = value; - this.hidden = hidden; - this.advanced = advanced; - this.group = group; - this.enumValues = enumValues; - } - - public Setting() { - 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 label() { - return label; - } - - @JsonIgnore - public Optional summary() { - return summary; - } - - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional default_() { - return default_; - } - - @JsonIgnore - public Optional value() { - return value; - } - - @JsonIgnore - public Optional hidden() { - return hidden; - } - - @JsonIgnore - public Optional advanced() { - return advanced; - } - - @JsonIgnore - public Optional group() { - return group; - } - - @JsonIgnore - public Optional enumValues() { - return enumValues; - } - - public static Builder builder() { - return new Builder(); - } - - - public Setting withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - public Setting withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Setting withLabel(String label) { - Utils.checkNotNull(label, "label"); - this.label = Optional.ofNullable(label); - return this; - } - - - public Setting withLabel(Optional label) { - Utils.checkNotNull(label, "label"); - this.label = label; - return this; - } - - public Setting withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - - public Setting withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - public Setting withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public Setting withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Setting withDefault(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - - public Setting withDefault(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - public Setting withValue(boolean value) { - Utils.checkNotNull(value, "value"); - this.value = Optional.ofNullable(value); - return this; - } - - - public Setting withValue(Optional value) { - Utils.checkNotNull(value, "value"); - this.value = value; - return this; - } - - public Setting withHidden(boolean hidden) { - Utils.checkNotNull(hidden, "hidden"); - this.hidden = Optional.ofNullable(hidden); - return this; - } - - - public Setting withHidden(Optional hidden) { - Utils.checkNotNull(hidden, "hidden"); - this.hidden = hidden; - return this; - } - - public Setting withAdvanced(boolean advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = Optional.ofNullable(advanced); - return this; - } - - - public Setting withAdvanced(Optional advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = advanced; - return this; - } - - public Setting withGroup(String group) { - Utils.checkNotNull(group, "group"); - this.group = Optional.ofNullable(group); - return this; - } - - - public Setting withGroup(Optional group) { - Utils.checkNotNull(group, "group"); - this.group = group; - return this; - } - - public Setting withEnumValues(String enumValues) { - Utils.checkNotNull(enumValues, "enumValues"); - this.enumValues = Optional.ofNullable(enumValues); - return this; - } - - - public Setting withEnumValues(Optional enumValues) { - Utils.checkNotNull(enumValues, "enumValues"); - this.enumValues = enumValues; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Setting other = (Setting) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.label, other.label) && - Utils.enhancedDeepEquals(this.summary, other.summary) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.default_, other.default_) && - Utils.enhancedDeepEquals(this.value, other.value) && - Utils.enhancedDeepEquals(this.hidden, other.hidden) && - Utils.enhancedDeepEquals(this.advanced, other.advanced) && - Utils.enhancedDeepEquals(this.group, other.group) && - Utils.enhancedDeepEquals(this.enumValues, other.enumValues); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, label, summary, - type, default_, value, - hidden, advanced, group, - enumValues); - } - - @Override - public String toString() { - return Utils.toString(Setting.class, - "id", id, - "label", label, - "summary", summary, - "type", type, - "default_", default_, - "value", value, - "hidden", hidden, - "advanced", advanced, - "group", group, - "enumValues", enumValues); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional summary = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional default_ = Optional.empty(); - - private Optional value = Optional.empty(); - - private Optional hidden = Optional.empty(); - - private Optional advanced = Optional.empty(); - - private Optional group = Optional.empty(); - - private Optional enumValues = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder id(String 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 label(String label) { - Utils.checkNotNull(label, "label"); - this.label = Optional.ofNullable(label); - return this; - } - - public Builder label(Optional label) { - Utils.checkNotNull(label, "label"); - this.label = label; - 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 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 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 value(boolean value) { - Utils.checkNotNull(value, "value"); - this.value = Optional.ofNullable(value); - return this; - } - - public Builder value(Optional value) { - Utils.checkNotNull(value, "value"); - this.value = value; - return this; - } - - - public Builder hidden(boolean hidden) { - Utils.checkNotNull(hidden, "hidden"); - this.hidden = Optional.ofNullable(hidden); - return this; - } - - public Builder hidden(Optional hidden) { - Utils.checkNotNull(hidden, "hidden"); - this.hidden = hidden; - return this; - } - - - public Builder advanced(boolean advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = Optional.ofNullable(advanced); - return this; - } - - public Builder advanced(Optional advanced) { - Utils.checkNotNull(advanced, "advanced"); - this.advanced = advanced; - return this; - } - - - public Builder group(String group) { - Utils.checkNotNull(group, "group"); - this.group = Optional.ofNullable(group); - return this; - } - - public Builder group(Optional group) { - Utils.checkNotNull(group, "group"); - this.group = group; - return this; - } - - - public Builder enumValues(String enumValues) { - Utils.checkNotNull(enumValues, "enumValues"); - this.enumValues = Optional.ofNullable(enumValues); - return this; - } - - public Builder enumValues(Optional enumValues) { - Utils.checkNotNull(enumValues, "enumValues"); - this.enumValues = enumValues; - return this; - } - - public Setting build() { - - return new Setting( - id, label, summary, - type, default_, value, - hidden, advanced, group, - enumValues); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SharedServers.java b/src/main/java/dev/plexapi/sdk/models/operations/SharedServers.java deleted file mode 100644 index 442fd0b2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/SharedServers.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class SharedServers { - @JsonCreator - public SharedServers() { - } - - public static Builder builder() { - return new Builder(); - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ); - } - - @Override - public String toString() { - return Utils.toString(SharedServers.class); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public SharedServers build() { - - return new SharedServers( - ); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SharedSources.java b/src/main/java/dev/plexapi/sdk/models/operations/SharedSources.java deleted file mode 100644 index b2735add..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/SharedSources.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class SharedSources { - @JsonCreator - public SharedSources() { - } - - public static Builder builder() { - return new Builder(); - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ); - } - - @Override - public String toString() { - return Utils.toString(SharedSources.class); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public SharedSources build() { - - return new SharedSources( - ); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ShowOrdering.java b/src/main/java/dev/plexapi/sdk/models/operations/ShowOrdering.java deleted file mode 100644 index 0badc258..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/ShowOrdering.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

Setting that indicates the episode ordering for the show. - * Options: - * - None = Library default - * - tmdbAiring = The Movie Database (Aired) - * - aired = TheTVDB (Aired) - * - dvd = TheTVDB (DVD) - * - absolute = TheTVDB (Absolute) - */ -@JsonDeserialize(using = ShowOrdering._Deserializer.class) -@JsonSerialize(using = ShowOrdering._Serializer.class) -public class ShowOrdering { - - public static final ShowOrdering None = new ShowOrdering("None"); - public static final ShowOrdering TmdbAiring = new ShowOrdering("tmdbAiring"); - public static final ShowOrdering TvdbAired = new ShowOrdering("aired"); - public static final ShowOrdering TvdbDvd = new ShowOrdering("dvd"); - public static final ShowOrdering TvdbAbsolute = new ShowOrdering("absolute"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private ShowOrdering(String value) { - this.value = value; - } - - /** - * Returns a ShowOrdering with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as ShowOrdering - */ - public static ShowOrdering of(String value) { - synchronized (ShowOrdering.class) { - return values.computeIfAbsent(value, v -> new ShowOrdering(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - ShowOrdering other = (ShowOrdering) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "ShowOrdering [value=" + value + "]"; - } - - // return an array just like an enum - public static ShowOrdering[] values() { - synchronized (ShowOrdering.class) { - return values.values().toArray(new ShowOrdering[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("None", None); - map.put("tmdbAiring", TmdbAiring); - map.put("aired", TvdbAired); - map.put("dvd", TvdbDvd); - map.put("absolute", TvdbAbsolute); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("None", ShowOrderingEnum.None); - map.put("tmdbAiring", ShowOrderingEnum.TmdbAiring); - map.put("aired", ShowOrderingEnum.TvdbAired); - map.put("dvd", ShowOrderingEnum.TvdbDvd); - map.put("absolute", ShowOrderingEnum.TvdbAbsolute); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(ShowOrdering.class); - } - - @Override - public void serialize(ShowOrdering value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(ShowOrdering.class); - } - - @Override - public ShowOrdering deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return ShowOrdering.of(v); - } - } - - public enum ShowOrderingEnum { - - None("None"), - TmdbAiring("tmdbAiring"), - TvdbAired("aired"), - TvdbDvd("dvd"), - TvdbAbsolute("absolute"),; - - private final String value; - - private ShowOrderingEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ShuffleRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/ShuffleRequest.java new file mode 100644 index 00000000..6d50bc08 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ShuffleRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ShuffleRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the play queue. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playQueueId") + private long playQueueId; + + @JsonCreator + public ShuffleRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playQueueId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playQueueId, "playQueueId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playQueueId = playQueueId; + } + + public ShuffleRequest( + long playQueueId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playQueueId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the play queue. + */ + @JsonIgnore + public long playQueueId() { + return playQueueId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ShuffleRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public ShuffleRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public ShuffleRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public ShuffleRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public ShuffleRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public ShuffleRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public ShuffleRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public ShuffleRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public ShuffleRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public ShuffleRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public ShuffleRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public ShuffleRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public ShuffleRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public ShuffleRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public ShuffleRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public ShuffleRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public ShuffleRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public ShuffleRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public ShuffleRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public ShuffleRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public ShuffleRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public ShuffleRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the play queue. + */ + public ShuffleRequest withPlayQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuffleRequest other = (ShuffleRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playQueueId, other.playQueueId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId); + } + + @Override + public String toString() { + return Utils.toString(ShuffleRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playQueueId", playQueueId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playQueueId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the play queue. + */ + public Builder playQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + public ShuffleRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new ShuffleRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ShuffleRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/ShuffleRequestBuilder.java new file mode 100644 index 00000000..8aabf3fe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ShuffleRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.Shuffle; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class ShuffleRequestBuilder { + + private ShuffleRequest request; + private final SDKConfiguration sdkConfiguration; + + public ShuffleRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ShuffleRequestBuilder request(ShuffleRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ShuffleResponse call() throws Exception { + + RequestOperation operation + = new Shuffle.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/ShuffleResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/ShuffleResponse.java new file mode 100644 index 00000000..0f751c03 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/ShuffleResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class ShuffleResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public ShuffleResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public ShuffleResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ShuffleResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ShuffleResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ShuffleResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ShuffleResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public ShuffleResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuffleResponse other = (ShuffleResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(ShuffleResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public ShuffleResponse build() { + + return new ShuffleResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Similar.java b/src/main/java/dev/plexapi/sdk/models/operations/Similar.java deleted file mode 100644 index 7941a442..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Similar.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; - -/** - * Similar - * - *

The display tag for the similar item, typically the title. - */ -public class Similar { - - @JsonProperty("id") - private int id; - - - @JsonProperty("filter") - private String filter; - - - @JsonProperty("tag") - private String tag; - - @JsonCreator - public Similar( - @JsonProperty("id") int id, - @JsonProperty("filter") String filter, - @JsonProperty("tag") String tag) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - this.id = id; - this.filter = filter; - this.tag = tag; - } - - @JsonIgnore - public int id() { - return id; - } - - @JsonIgnore - public String filter() { - return filter; - } - - @JsonIgnore - public String tag() { - return tag; - } - - public static Builder builder() { - return new Builder(); - } - - - public Similar withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Similar withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public Similar withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Similar other = (Similar) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag); - } - - @Override - public String toString() { - return Utils.toString(Similar.class, - "id", id, - "filter", filter, - "tag", tag); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String filter; - - private String tag; - - private Builder() { - // force use of static builder() method - } - - - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - public Similar build() { - - return new Similar( - id, filter, tag); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Skip.java b/src/main/java/dev/plexapi/sdk/models/operations/Skip.java deleted file mode 100644 index 9fc6abcb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Skip.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Skip - * - *

Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. - */ -public enum Skip { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - Skip(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (Skip o: Skip.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Smart.java b/src/main/java/dev/plexapi/sdk/models/operations/Smart.java deleted file mode 100644 index 5af8ca07..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Smart.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Smart - * - *

whether the playlist is smart or not - */ -public enum Smart { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - Smart(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (Smart o: Smart.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Sort.java b/src/main/java/dev/plexapi/sdk/models/operations/Sort.java deleted file mode 100644 index 8f0a184e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Sort.java +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class Sort { - - @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 Sort( - @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 Sort( - 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 static Builder builder() { - return new Builder(); - } - - - public Sort withDefault(String default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - - public Sort withDefault(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - 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; - } - - - /** - * 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; - } - - public Sort withDescKey(String descKey) { - Utils.checkNotNull(descKey, "descKey"); - this.descKey = Optional.ofNullable(descKey); - return this; - } - - - public Sort withDescKey(Optional descKey) { - Utils.checkNotNull(descKey, "descKey"); - this.descKey = descKey; - return this; - } - - public Sort withFirstCharacterKey(String firstCharacterKey) { - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); - return this; - } - - - public Sort withFirstCharacterKey(Optional firstCharacterKey) { - Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); - this.firstCharacterKey = firstCharacterKey; - return this; - } - - public Sort withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Sort 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; - } - Sort other = (Sort) o; - return - Utils.enhancedDeepEquals(this.default_, other.default_) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.activeDirection, other.activeDirection) && - Utils.enhancedDeepEquals(this.defaultDirection, other.defaultDirection) && - Utils.enhancedDeepEquals(this.descKey, other.descKey) && - Utils.enhancedDeepEquals(this.firstCharacterKey, other.firstCharacterKey) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - default_, active, activeDirection, - defaultDirection, descKey, firstCharacterKey, - key, title); - } - - @Override - public String toString() { - return Utils.toString(Sort.class, - "default_", default_, - "active", active, - "activeDirection", activeDirection, - "defaultDirection", defaultDirection, - "descKey", descKey, - "firstCharacterKey", firstCharacterKey, - "key", key, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - 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(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; - } - - /** - * 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 Sort build() { - 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/SplitItemRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/SplitItemRequest.java new file mode 100644 index 00000000..4591dffb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SplitItemRequest.java @@ -0,0 +1,768 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class SplitItemRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + @JsonCreator + public SplitItemRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + } + + public SplitItemRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SplitItemRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public SplitItemRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public SplitItemRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public SplitItemRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public SplitItemRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public SplitItemRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public SplitItemRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public SplitItemRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public SplitItemRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public SplitItemRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public SplitItemRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public SplitItemRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public SplitItemRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public SplitItemRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public SplitItemRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public SplitItemRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public SplitItemRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public SplitItemRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public SplitItemRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public SplitItemRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public SplitItemRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public SplitItemRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public SplitItemRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SplitItemRequest other = (SplitItemRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + @Override + public String toString() { + return Utils.toString(SplitItemRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public SplitItemRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new SplitItemRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SplitItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/SplitItemRequestBuilder.java new file mode 100644 index 00000000..db132504 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SplitItemRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.SplitItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class SplitItemRequestBuilder { + + private SplitItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public SplitItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SplitItemRequestBuilder request(SplitItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SplitItemResponse call() throws Exception { + + RequestOperation operation + = new SplitItem.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SplitItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/SplitItemResponse.java new file mode 100644 index 00000000..0859d09c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SplitItemResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SplitItemResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SplitItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SplitItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SplitItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SplitItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SplitItemResponse other = (SplitItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SplitItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SplitItemResponse build() { + + return new SplitItemResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartAllTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StartAllTasksRequestBuilder.java deleted file mode 100644 index d6b06b6a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StartAllTasksRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.StartAllTasks; -import java.lang.Exception; - -public class StartAllTasksRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public StartAllTasksRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public StartAllTasksResponse call() throws Exception { - - RequestlessOperation operation - = new StartAllTasks.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartAllTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StartAllTasksResponse.java deleted file mode 100644 index b16d7792..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StartAllTasksResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class StartAllTasksResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public StartAllTasksResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public StartAllTasksResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public StartAllTasksResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartAllTasksResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartAllTasksResponse other = (StartAllTasksResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartAllTasksResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartAllTasksResponse build() { - - return new StartAllTasksResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisRequest.java new file mode 100644 index 00000000..3b0b9ca5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class StartAnalysisRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Section identifier + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + @JsonCreator + public StartAnalysisRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + } + + public StartAnalysisRequest( + long sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Section identifier + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StartAnalysisRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StartAnalysisRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public StartAnalysisRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public StartAnalysisRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public StartAnalysisRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public StartAnalysisRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public StartAnalysisRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public StartAnalysisRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public StartAnalysisRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public StartAnalysisRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public StartAnalysisRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public StartAnalysisRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public StartAnalysisRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public StartAnalysisRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public StartAnalysisRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public StartAnalysisRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public StartAnalysisRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public StartAnalysisRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public StartAnalysisRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public StartAnalysisRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public StartAnalysisRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public StartAnalysisRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Section identifier + */ + public StartAnalysisRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartAnalysisRequest other = (StartAnalysisRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + @Override + public String toString() { + return Utils.toString(StartAnalysisRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Section identifier + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public StartAnalysisRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new StartAnalysisRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisRequestBuilder.java new file mode 100644 index 00000000..2078de80 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StartAnalysis; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class StartAnalysisRequestBuilder { + + private StartAnalysisRequest request; + private final SDKConfiguration sdkConfiguration; + + public StartAnalysisRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StartAnalysisRequestBuilder request(StartAnalysisRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public StartAnalysisResponse call() throws Exception { + + RequestOperation operation + = new StartAnalysis.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisResponse.java new file mode 100644 index 00000000..50ecb8aa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartAnalysisResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class StartAnalysisResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public StartAnalysisResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StartAnalysisResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartAnalysisResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartAnalysisResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartAnalysisResponse other = (StartAnalysisResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StartAnalysisResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public StartAnalysisResponse build() { + + return new StartAnalysisResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationRequest.java new file mode 100644 index 00000000..23903552 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationRequest.java @@ -0,0 +1,815 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class StartBifGenerationRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=force") + private Optional force; + + @JsonCreator + public StartBifGenerationRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + Optional force) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(force, "force"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.force = force; + } + + public StartBifGenerationRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional force() { + return (Optional) force; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StartBifGenerationRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StartBifGenerationRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public StartBifGenerationRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public StartBifGenerationRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public StartBifGenerationRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public StartBifGenerationRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public StartBifGenerationRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public StartBifGenerationRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public StartBifGenerationRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public StartBifGenerationRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public StartBifGenerationRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public StartBifGenerationRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public StartBifGenerationRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public StartBifGenerationRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public StartBifGenerationRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public StartBifGenerationRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public StartBifGenerationRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public StartBifGenerationRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public StartBifGenerationRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public StartBifGenerationRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public StartBifGenerationRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public StartBifGenerationRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public StartBifGenerationRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public StartBifGenerationRequest withForce(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + + public StartBifGenerationRequest withForce(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartBifGenerationRequest other = (StartBifGenerationRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.force, other.force); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + force); + } + + @Override + public String toString() { + return Utils.toString(StartBifGenerationRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "force", force); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Optional force = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder force(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + public Builder force(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + public StartBifGenerationRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new StartBifGenerationRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + force); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationRequestBuilder.java new file mode 100644 index 00000000..a582164a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StartBifGeneration; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class StartBifGenerationRequestBuilder { + + private StartBifGenerationRequest request; + private final SDKConfiguration sdkConfiguration; + + public StartBifGenerationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StartBifGenerationRequestBuilder request(StartBifGenerationRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public StartBifGenerationResponse call() throws Exception { + + RequestOperation operation + = new StartBifGeneration.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationResponse.java new file mode 100644 index 00000000..590917d4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartBifGenerationResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class StartBifGenerationResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public StartBifGenerationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StartBifGenerationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartBifGenerationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartBifGenerationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartBifGenerationResponse other = (StartBifGenerationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StartBifGenerationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public StartBifGenerationResponse build() { + + return new StartBifGenerationResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartTaskRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/StartTaskRequest.java index 01e01def..a173682b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/StartTaskRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartTaskRequest.java @@ -5,32 +5,233 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; 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.Optional; public class StartTaskRequest { /** - * the name of the task to be started. + * Indicates the client accepts the indicated media types */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=taskName") - private TaskName taskName; + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The task name + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=task") + private PathParamTask task; @JsonCreator public StartTaskRequest( - TaskName taskName) { - Utils.checkNotNull(taskName, "taskName"); - this.taskName = taskName; + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + PathParamTask task) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(task, "task"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.task = task; + } + + public StartTaskRequest( + PathParamTask task) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), task); } /** - * the name of the task to be started. + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client */ @JsonIgnore - public TaskName taskName() { - return taskName; + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The task name + */ + @JsonIgnore + public PathParamTask task() { + return task; } public static Builder builder() { @@ -39,11 +240,220 @@ public class StartTaskRequest { /** - * the name of the task to be started. + * Indicates the client accepts the indicated media types */ - public StartTaskRequest withTaskName(TaskName taskName) { - Utils.checkNotNull(taskName, "taskName"); - this.taskName = taskName; + public StartTaskRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StartTaskRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public StartTaskRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public StartTaskRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public StartTaskRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public StartTaskRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public StartTaskRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public StartTaskRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public StartTaskRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public StartTaskRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public StartTaskRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public StartTaskRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public StartTaskRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public StartTaskRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public StartTaskRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public StartTaskRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public StartTaskRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public StartTaskRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public StartTaskRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public StartTaskRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public StartTaskRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public StartTaskRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The task name + */ + public StartTaskRequest withTask(PathParamTask task) { + Utils.checkNotNull(task, "task"); + this.task = task; return this; } @@ -57,25 +467,72 @@ public class StartTaskRequest { } StartTaskRequest other = (StartTaskRequest) o; return - Utils.enhancedDeepEquals(this.taskName, other.taskName); + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.task, other.task); } @Override public int hashCode() { return Utils.enhancedHash( - taskName); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, task); } @Override public String toString() { return Utils.toString(StartTaskRequest.class, - "taskName", taskName); + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "task", task); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private TaskName taskName; + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private PathParamTask task; private Builder() { // force use of static builder() method @@ -83,19 +540,240 @@ public class StartTaskRequest { /** - * the name of the task to be started. + * Indicates the client accepts the indicated media types */ - public Builder taskName(TaskName taskName) { - Utils.checkNotNull(taskName, "taskName"); - this.taskName = taskName; + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The task name + */ + public Builder task(PathParamTask task) { + Utils.checkNotNull(task, "task"); + this.task = task; return this; } public StartTaskRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } return new StartTaskRequest( - taskName); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, task); } + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartTaskRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StartTaskRequestBuilder.java index 64aecbdd..356af301 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/StartTaskRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartTaskRequestBuilder.java @@ -12,32 +12,23 @@ import java.lang.Exception; public class StartTaskRequestBuilder { - private TaskName taskName; + private StartTaskRequest request; private final SDKConfiguration sdkConfiguration; public StartTaskRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public StartTaskRequestBuilder taskName(TaskName taskName) { - Utils.checkNotNull(taskName, "taskName"); - this.taskName = taskName; + public StartTaskRequestBuilder request(StartTaskRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private StartTaskRequest buildRequest() { - - StartTaskRequest request = new StartTaskRequest(taskName); - - return request; - } - public StartTaskResponse call() throws Exception { RequestOperation operation = new StartTask.Sync(sdkConfiguration); - StartTaskRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StartTasksRequestBuilder.java new file mode 100644 index 00000000..8f76be0d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartTasksRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StartTasks; +import java.lang.Exception; + +public class StartTasksRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public StartTasksRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StartTasksResponse call() throws Exception { + + RequestlessOperation operation + = new StartTasks.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StartTasksResponse.java new file mode 100644 index 00000000..6a4467d5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartTasksResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class StartTasksResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public StartTasksResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StartTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartTasksResponse other = (StartTasksResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StartTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public StartTasksResponse build() { + + return new StartTasksResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamLocation.java b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamLocation.java new file mode 100644 index 00000000..146893ba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamLocation.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * StartTranscodeSessionQueryParamLocation + * + *

Network type of the client, can be used to help determine target bitrate. + */ +public enum StartTranscodeSessionQueryParamLocation { + LAN("lan"), + WAN("wan"), + CELLULAR("cellular"); + + @JsonValue + private final String value; + + StartTranscodeSessionQueryParamLocation(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (StartTranscodeSessionQueryParamLocation o: StartTranscodeSessionQueryParamLocation.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamProtocol.java b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamProtocol.java new file mode 100644 index 00000000..9d51ae65 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamProtocol.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * StartTranscodeSessionQueryParamProtocol + * + *

Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ +public enum StartTranscodeSessionQueryParamProtocol { + HTTP("http"), + HLS("hls"), + DASH("dash"); + + @JsonValue + private final String value; + + StartTranscodeSessionQueryParamProtocol(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (StartTranscodeSessionQueryParamProtocol o: StartTranscodeSessionQueryParamProtocol.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamSubtitles.java b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamSubtitles.java new file mode 100644 index 00000000..45e4d1ea --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionQueryParamSubtitles.java @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * StartTranscodeSessionQueryParamSubtitles + * + *

Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ +public enum StartTranscodeSessionQueryParamSubtitles { + AUTO("auto"), + BURN("burn"), + NONE("none"), + SIDECAR("sidecar"), + EMBEDDED("embedded"), + SEGMENTED("segmented"), + UNKNOWN("unknown"); + + @JsonValue + private final String value; + + StartTranscodeSessionQueryParamSubtitles(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (StartTranscodeSessionQueryParamSubtitles o: StartTranscodeSessionQueryParamSubtitles.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionRequest.java new file mode 100644 index 00000000..6b2a4808 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionRequest.java @@ -0,0 +1,2639 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.AdvancedSubtitles; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.models.shared.TranscodeType; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class StartTranscodeSessionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Type of transcode media + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transcodeType") + private TranscodeType transcodeType; + + /** + * Transcode session UUID + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=transcodeSessionId") + private Optional transcodeSessionId; + + /** + * Extension + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=extension") + private Extension extension; + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=advancedSubtitles") + private Optional advancedSubtitles; + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioBoost") + private Optional audioBoost; + + /** + * Target video number of audio channels. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioChannelCount") + private Optional audioChannelCount; + + /** + * Indicates the client supports ABR. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustQuality") + private Optional autoAdjustQuality; + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustSubtitle") + private Optional autoAdjustSubtitle; + + /** + * Indicates the client supports direct playing the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directPlay") + private Optional directPlay; + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directStream") + private Optional directStream; + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directStreamAudio") + private Optional directStreamAudio; + + /** + * Indicates if resolution should be adjusted for orientation. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=disableResolutionRotation") + private Optional disableResolutionRotation; + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=hasMDE") + private Optional hasMDE; + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=location") + private Optional location; + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaBufferSize") + private Optional mediaBufferSize; + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaIndex") + private Optional mediaIndex; + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=musicBitrate") + private Optional musicBitrate; + + /** + * Offset from the start of the media (in seconds). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset") + private Optional offset; + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=partIndex") + private Optional partIndex; + + /** + * Internal PMS path of the media to transcode. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=path") + private Optional path; + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=peakBitrate") + private Optional peakBitrate; + + /** + * Target photo resolution. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=photoResolution") + private Optional photoResolution; + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=protocol") + private Optional protocol; + + /** + * Number of seconds to include in each transcoded segment + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=secondsPerSegment") + private Optional secondsPerSegment; + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitleSize") + private Optional subtitleSize; + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitles") + private Optional subtitles; + + /** + * Target video bitrate (in kbps). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoBitrate") + private Optional videoBitrate; + + /** + * Target photo quality. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoQuality") + private Optional videoQuality; + + /** + * Target maximum video resolution. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoResolution") + private Optional videoResolution; + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Profile-Extra") + private Optional xPlexClientProfileExtra; + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Profile-Name") + private Optional xPlexClientProfileName; + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Session-Identifier") + private Optional xPlexSessionIdentifier; + + @JsonCreator + public StartTranscodeSessionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + TranscodeType transcodeType, + Optional transcodeSessionId, + Extension extension, + Optional advancedSubtitles, + Optional audioBoost, + Optional audioChannelCount, + Optional autoAdjustQuality, + Optional autoAdjustSubtitle, + Optional directPlay, + Optional directStream, + Optional directStreamAudio, + Optional disableResolutionRotation, + Optional hasMDE, + Optional location, + Optional mediaBufferSize, + Optional mediaIndex, + Optional musicBitrate, + Optional offset, + Optional partIndex, + Optional path, + Optional peakBitrate, + Optional photoResolution, + Optional protocol, + Optional secondsPerSegment, + Optional subtitleSize, + Optional subtitles, + Optional videoBitrate, + Optional videoQuality, + Optional videoResolution, + Optional xPlexClientProfileExtra, + Optional xPlexClientProfileName, + Optional xPlexSessionIdentifier) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(transcodeType, "transcodeType"); + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + Utils.checkNotNull(extension, "extension"); + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + Utils.checkNotNull(audioBoost, "audioBoost"); + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + Utils.checkNotNull(directPlay, "directPlay"); + Utils.checkNotNull(directStream, "directStream"); + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + Utils.checkNotNull(hasMDE, "hasMDE"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + Utils.checkNotNull(mediaIndex, "mediaIndex"); + Utils.checkNotNull(musicBitrate, "musicBitrate"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(partIndex, "partIndex"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(peakBitrate, "peakBitrate"); + Utils.checkNotNull(photoResolution, "photoResolution"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + Utils.checkNotNull(subtitleSize, "subtitleSize"); + Utils.checkNotNull(subtitles, "subtitles"); + Utils.checkNotNull(videoBitrate, "videoBitrate"); + Utils.checkNotNull(videoQuality, "videoQuality"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.transcodeType = transcodeType; + this.transcodeSessionId = transcodeSessionId; + this.extension = extension; + this.advancedSubtitles = advancedSubtitles; + this.audioBoost = audioBoost; + this.audioChannelCount = audioChannelCount; + this.autoAdjustQuality = autoAdjustQuality; + this.autoAdjustSubtitle = autoAdjustSubtitle; + this.directPlay = directPlay; + this.directStream = directStream; + this.directStreamAudio = directStreamAudio; + this.disableResolutionRotation = disableResolutionRotation; + this.hasMDE = hasMDE; + this.location = location; + this.mediaBufferSize = mediaBufferSize; + this.mediaIndex = mediaIndex; + this.musicBitrate = musicBitrate; + this.offset = offset; + this.partIndex = partIndex; + this.path = path; + this.peakBitrate = peakBitrate; + this.photoResolution = photoResolution; + this.protocol = protocol; + this.secondsPerSegment = secondsPerSegment; + this.subtitleSize = subtitleSize; + this.subtitles = subtitles; + this.videoBitrate = videoBitrate; + this.videoQuality = videoQuality; + this.videoResolution = videoResolution; + this.xPlexClientProfileExtra = xPlexClientProfileExtra; + this.xPlexClientProfileName = xPlexClientProfileName; + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + } + + public StartTranscodeSessionRequest( + TranscodeType transcodeType, + Extension extension) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), transcodeType, + Optional.empty(), extension, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Type of transcode media + */ + @JsonIgnore + public TranscodeType transcodeType() { + return transcodeType; + } + + /** + * Transcode session UUID + */ + @JsonIgnore + public Optional transcodeSessionId() { + return transcodeSessionId; + } + + /** + * Extension + */ + @JsonIgnore + public Extension extension() { + return extension; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional advancedSubtitles() { + return (Optional) advancedSubtitles; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + @JsonIgnore + public Optional audioBoost() { + return audioBoost; + } + + /** + * Target video number of audio channels. + */ + @JsonIgnore + public Optional audioChannelCount() { + return audioChannelCount; + } + + /** + * Indicates the client supports ABR. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional autoAdjustQuality() { + return (Optional) autoAdjustQuality; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional autoAdjustSubtitle() { + return (Optional) autoAdjustSubtitle; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directPlay() { + return (Optional) directPlay; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directStream() { + return (Optional) directStream; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directStreamAudio() { + return (Optional) directStreamAudio; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional disableResolutionRotation() { + return (Optional) disableResolutionRotation; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hasMDE() { + return (Optional) hasMDE; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional location() { + return (Optional) location; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + @JsonIgnore + public Optional mediaBufferSize() { + return mediaBufferSize; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + @JsonIgnore + public Optional mediaIndex() { + return mediaIndex; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + @JsonIgnore + public Optional musicBitrate() { + return musicBitrate; + } + + /** + * Offset from the start of the media (in seconds). + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + @JsonIgnore + public Optional partIndex() { + return partIndex; + } + + /** + * Internal PMS path of the media to transcode. + */ + @JsonIgnore + public Optional path() { + return path; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + @JsonIgnore + public Optional peakBitrate() { + return peakBitrate; + } + + /** + * Target photo resolution. + */ + @JsonIgnore + public Optional photoResolution() { + return photoResolution; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional protocol() { + return (Optional) protocol; + } + + /** + * Number of seconds to include in each transcoded segment + */ + @JsonIgnore + public Optional secondsPerSegment() { + return secondsPerSegment; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + @JsonIgnore + public Optional subtitleSize() { + return subtitleSize; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtitles() { + return (Optional) subtitles; + } + + /** + * Target video bitrate (in kbps). + */ + @JsonIgnore + public Optional videoBitrate() { + return videoBitrate; + } + + /** + * Target photo quality. + */ + @JsonIgnore + public Optional videoQuality() { + return videoQuality; + } + + /** + * Target maximum video resolution. + */ + @JsonIgnore + public Optional videoResolution() { + return videoResolution; + } + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + @JsonIgnore + public Optional xPlexClientProfileExtra() { + return xPlexClientProfileExtra; + } + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + @JsonIgnore + public Optional xPlexClientProfileName() { + return xPlexClientProfileName; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + @JsonIgnore + public Optional xPlexSessionIdentifier() { + return xPlexSessionIdentifier; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StartTranscodeSessionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StartTranscodeSessionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public StartTranscodeSessionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public StartTranscodeSessionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public StartTranscodeSessionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public StartTranscodeSessionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public StartTranscodeSessionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public StartTranscodeSessionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public StartTranscodeSessionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public StartTranscodeSessionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public StartTranscodeSessionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public StartTranscodeSessionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public StartTranscodeSessionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public StartTranscodeSessionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public StartTranscodeSessionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public StartTranscodeSessionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public StartTranscodeSessionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public StartTranscodeSessionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public StartTranscodeSessionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public StartTranscodeSessionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public StartTranscodeSessionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public StartTranscodeSessionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Type of transcode media + */ + public StartTranscodeSessionRequest withTranscodeType(TranscodeType transcodeType) { + Utils.checkNotNull(transcodeType, "transcodeType"); + this.transcodeType = transcodeType; + return this; + } + + /** + * Transcode session UUID + */ + public StartTranscodeSessionRequest withTranscodeSessionId(String transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = Optional.ofNullable(transcodeSessionId); + return this; + } + + + /** + * Transcode session UUID + */ + public StartTranscodeSessionRequest withTranscodeSessionId(Optional transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = transcodeSessionId; + return this; + } + + /** + * Extension + */ + public StartTranscodeSessionRequest withExtension(Extension extension) { + Utils.checkNotNull(extension, "extension"); + this.extension = extension; + return this; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public StartTranscodeSessionRequest withAdvancedSubtitles(AdvancedSubtitles advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = Optional.ofNullable(advancedSubtitles); + return this; + } + + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public StartTranscodeSessionRequest withAdvancedSubtitles(Optional advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = advancedSubtitles; + return this; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public StartTranscodeSessionRequest withAudioBoost(long audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public StartTranscodeSessionRequest withAudioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + /** + * Target video number of audio channels. + */ + public StartTranscodeSessionRequest withAudioChannelCount(long audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = Optional.ofNullable(audioChannelCount); + return this; + } + + + /** + * Target video number of audio channels. + */ + public StartTranscodeSessionRequest withAudioChannelCount(Optional audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = audioChannelCount; + return this; + } + + /** + * Indicates the client supports ABR. + */ + public StartTranscodeSessionRequest withAutoAdjustQuality(BoolInt autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + + /** + * Indicates the client supports ABR. + */ + public StartTranscodeSessionRequest withAutoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public StartTranscodeSessionRequest withAutoAdjustSubtitle(BoolInt autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public StartTranscodeSessionRequest withAutoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + public StartTranscodeSessionRequest withDirectPlay(BoolInt directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + + /** + * Indicates the client supports direct playing the indicated content. + */ + public StartTranscodeSessionRequest withDirectPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public StartTranscodeSessionRequest withDirectStream(BoolInt directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public StartTranscodeSessionRequest withDirectStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public StartTranscodeSessionRequest withDirectStreamAudio(BoolInt directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = Optional.ofNullable(directStreamAudio); + return this; + } + + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public StartTranscodeSessionRequest withDirectStreamAudio(Optional directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = directStreamAudio; + return this; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public StartTranscodeSessionRequest withDisableResolutionRotation(BoolInt disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = Optional.ofNullable(disableResolutionRotation); + return this; + } + + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public StartTranscodeSessionRequest withDisableResolutionRotation(Optional disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = disableResolutionRotation; + return this; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public StartTranscodeSessionRequest withHasMDE(BoolInt hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = Optional.ofNullable(hasMDE); + return this; + } + + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public StartTranscodeSessionRequest withHasMDE(Optional hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public StartTranscodeSessionRequest withLocation(StartTranscodeSessionQueryParamLocation location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public StartTranscodeSessionRequest withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public StartTranscodeSessionRequest withMediaBufferSize(long mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); + return this; + } + + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public StartTranscodeSessionRequest withMediaBufferSize(Optional mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = mediaBufferSize; + return this; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public StartTranscodeSessionRequest withMediaIndex(long mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = Optional.ofNullable(mediaIndex); + return this; + } + + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public StartTranscodeSessionRequest withMediaIndex(Optional mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public StartTranscodeSessionRequest withMusicBitrate(long musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = Optional.ofNullable(musicBitrate); + return this; + } + + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public StartTranscodeSessionRequest withMusicBitrate(Optional musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = musicBitrate; + return this; + } + + /** + * Offset from the start of the media (in seconds). + */ + public StartTranscodeSessionRequest withOffset(double offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * Offset from the start of the media (in seconds). + */ + public StartTranscodeSessionRequest withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public StartTranscodeSessionRequest withPartIndex(long partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = Optional.ofNullable(partIndex); + return this; + } + + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public StartTranscodeSessionRequest withPartIndex(Optional partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = partIndex; + return this; + } + + /** + * Internal PMS path of the media to transcode. + */ + public StartTranscodeSessionRequest withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + + /** + * Internal PMS path of the media to transcode. + */ + public StartTranscodeSessionRequest withPath(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public StartTranscodeSessionRequest withPeakBitrate(long peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = Optional.ofNullable(peakBitrate); + return this; + } + + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public StartTranscodeSessionRequest withPeakBitrate(Optional peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = peakBitrate; + return this; + } + + /** + * Target photo resolution. + */ + public StartTranscodeSessionRequest withPhotoResolution(String photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = Optional.ofNullable(photoResolution); + return this; + } + + + /** + * Target photo resolution. + */ + public StartTranscodeSessionRequest withPhotoResolution(Optional photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = photoResolution; + return this; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public StartTranscodeSessionRequest withProtocol(StartTranscodeSessionQueryParamProtocol protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public StartTranscodeSessionRequest withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + /** + * Number of seconds to include in each transcoded segment + */ + public StartTranscodeSessionRequest withSecondsPerSegment(long secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = Optional.ofNullable(secondsPerSegment); + return this; + } + + + /** + * Number of seconds to include in each transcoded segment + */ + public StartTranscodeSessionRequest withSecondsPerSegment(Optional secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = secondsPerSegment; + return this; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public StartTranscodeSessionRequest withSubtitleSize(long subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public StartTranscodeSessionRequest withSubtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public StartTranscodeSessionRequest withSubtitles(StartTranscodeSessionQueryParamSubtitles subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = Optional.ofNullable(subtitles); + return this; + } + + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public StartTranscodeSessionRequest withSubtitles(Optional subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = subtitles; + return this; + } + + /** + * Target video bitrate (in kbps). + */ + public StartTranscodeSessionRequest withVideoBitrate(long videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = Optional.ofNullable(videoBitrate); + return this; + } + + + /** + * Target video bitrate (in kbps). + */ + public StartTranscodeSessionRequest withVideoBitrate(Optional videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = videoBitrate; + return this; + } + + /** + * Target photo quality. + */ + public StartTranscodeSessionRequest withVideoQuality(long videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = Optional.ofNullable(videoQuality); + return this; + } + + + /** + * Target photo quality. + */ + public StartTranscodeSessionRequest withVideoQuality(Optional videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = videoQuality; + return this; + } + + /** + * Target maximum video resolution. + */ + public StartTranscodeSessionRequest withVideoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + + /** + * Target maximum video resolution. + */ + public StartTranscodeSessionRequest withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public StartTranscodeSessionRequest withXPlexClientProfileExtra(String xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = Optional.ofNullable(xPlexClientProfileExtra); + return this; + } + + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public StartTranscodeSessionRequest withXPlexClientProfileExtra(Optional xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = xPlexClientProfileExtra; + return this; + } + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public StartTranscodeSessionRequest withXPlexClientProfileName(String xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = Optional.ofNullable(xPlexClientProfileName); + return this; + } + + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public StartTranscodeSessionRequest withXPlexClientProfileName(Optional xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = xPlexClientProfileName; + return this; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public StartTranscodeSessionRequest withXPlexSessionIdentifier(String xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = Optional.ofNullable(xPlexSessionIdentifier); + return this; + } + + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public StartTranscodeSessionRequest withXPlexSessionIdentifier(Optional xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartTranscodeSessionRequest other = (StartTranscodeSessionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.transcodeType, other.transcodeType) && + Utils.enhancedDeepEquals(this.transcodeSessionId, other.transcodeSessionId) && + Utils.enhancedDeepEquals(this.extension, other.extension) && + Utils.enhancedDeepEquals(this.advancedSubtitles, other.advancedSubtitles) && + Utils.enhancedDeepEquals(this.audioBoost, other.audioBoost) && + Utils.enhancedDeepEquals(this.audioChannelCount, other.audioChannelCount) && + Utils.enhancedDeepEquals(this.autoAdjustQuality, other.autoAdjustQuality) && + Utils.enhancedDeepEquals(this.autoAdjustSubtitle, other.autoAdjustSubtitle) && + Utils.enhancedDeepEquals(this.directPlay, other.directPlay) && + Utils.enhancedDeepEquals(this.directStream, other.directStream) && + Utils.enhancedDeepEquals(this.directStreamAudio, other.directStreamAudio) && + Utils.enhancedDeepEquals(this.disableResolutionRotation, other.disableResolutionRotation) && + Utils.enhancedDeepEquals(this.hasMDE, other.hasMDE) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.mediaBufferSize, other.mediaBufferSize) && + Utils.enhancedDeepEquals(this.mediaIndex, other.mediaIndex) && + Utils.enhancedDeepEquals(this.musicBitrate, other.musicBitrate) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.partIndex, other.partIndex) && + Utils.enhancedDeepEquals(this.path, other.path) && + Utils.enhancedDeepEquals(this.peakBitrate, other.peakBitrate) && + Utils.enhancedDeepEquals(this.photoResolution, other.photoResolution) && + Utils.enhancedDeepEquals(this.protocol, other.protocol) && + Utils.enhancedDeepEquals(this.secondsPerSegment, other.secondsPerSegment) && + Utils.enhancedDeepEquals(this.subtitleSize, other.subtitleSize) && + Utils.enhancedDeepEquals(this.subtitles, other.subtitles) && + Utils.enhancedDeepEquals(this.videoBitrate, other.videoBitrate) && + Utils.enhancedDeepEquals(this.videoQuality, other.videoQuality) && + Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && + Utils.enhancedDeepEquals(this.xPlexClientProfileExtra, other.xPlexClientProfileExtra) && + Utils.enhancedDeepEquals(this.xPlexClientProfileName, other.xPlexClientProfileName) && + Utils.enhancedDeepEquals(this.xPlexSessionIdentifier, other.xPlexSessionIdentifier); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, transcodeType, + transcodeSessionId, extension, advancedSubtitles, + audioBoost, audioChannelCount, autoAdjustQuality, + autoAdjustSubtitle, directPlay, directStream, + directStreamAudio, disableResolutionRotation, hasMDE, + location, mediaBufferSize, mediaIndex, + musicBitrate, offset, partIndex, + path, peakBitrate, photoResolution, + protocol, secondsPerSegment, subtitleSize, + subtitles, videoBitrate, videoQuality, + videoResolution, xPlexClientProfileExtra, xPlexClientProfileName, + xPlexSessionIdentifier); + } + + @Override + public String toString() { + return Utils.toString(StartTranscodeSessionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "transcodeType", transcodeType, + "transcodeSessionId", transcodeSessionId, + "extension", extension, + "advancedSubtitles", advancedSubtitles, + "audioBoost", audioBoost, + "audioChannelCount", audioChannelCount, + "autoAdjustQuality", autoAdjustQuality, + "autoAdjustSubtitle", autoAdjustSubtitle, + "directPlay", directPlay, + "directStream", directStream, + "directStreamAudio", directStreamAudio, + "disableResolutionRotation", disableResolutionRotation, + "hasMDE", hasMDE, + "location", location, + "mediaBufferSize", mediaBufferSize, + "mediaIndex", mediaIndex, + "musicBitrate", musicBitrate, + "offset", offset, + "partIndex", partIndex, + "path", path, + "peakBitrate", peakBitrate, + "photoResolution", photoResolution, + "protocol", protocol, + "secondsPerSegment", secondsPerSegment, + "subtitleSize", subtitleSize, + "subtitles", subtitles, + "videoBitrate", videoBitrate, + "videoQuality", videoQuality, + "videoResolution", videoResolution, + "xPlexClientProfileExtra", xPlexClientProfileExtra, + "xPlexClientProfileName", xPlexClientProfileName, + "xPlexSessionIdentifier", xPlexSessionIdentifier); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private TranscodeType transcodeType; + + private Optional transcodeSessionId = Optional.empty(); + + private Extension extension; + + private Optional advancedSubtitles = Optional.empty(); + + private Optional audioBoost = Optional.empty(); + + private Optional audioChannelCount = Optional.empty(); + + private Optional autoAdjustQuality = Optional.empty(); + + private Optional autoAdjustSubtitle = Optional.empty(); + + private Optional directPlay = Optional.empty(); + + private Optional directStream = Optional.empty(); + + private Optional directStreamAudio = Optional.empty(); + + private Optional disableResolutionRotation = Optional.empty(); + + private Optional hasMDE = Optional.empty(); + + private Optional location = Optional.empty(); + + private Optional mediaBufferSize = Optional.empty(); + + private Optional mediaIndex = Optional.empty(); + + private Optional musicBitrate = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional partIndex = Optional.empty(); + + private Optional path = Optional.empty(); + + private Optional peakBitrate = Optional.empty(); + + private Optional photoResolution = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional secondsPerSegment = Optional.empty(); + + private Optional subtitleSize = Optional.empty(); + + private Optional subtitles = Optional.empty(); + + private Optional videoBitrate = Optional.empty(); + + private Optional videoQuality = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional xPlexClientProfileExtra = Optional.empty(); + + private Optional xPlexClientProfileName = Optional.empty(); + + private Optional xPlexSessionIdentifier = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Type of transcode media + */ + public Builder transcodeType(TranscodeType transcodeType) { + Utils.checkNotNull(transcodeType, "transcodeType"); + this.transcodeType = transcodeType; + return this; + } + + + /** + * Transcode session UUID + */ + public Builder transcodeSessionId(String transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = Optional.ofNullable(transcodeSessionId); + return this; + } + + /** + * Transcode session UUID + */ + public Builder transcodeSessionId(Optional transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = transcodeSessionId; + return this; + } + + + /** + * Extension + */ + public Builder extension(Extension extension) { + Utils.checkNotNull(extension, "extension"); + this.extension = extension; + return this; + } + + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public Builder advancedSubtitles(AdvancedSubtitles advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = Optional.ofNullable(advancedSubtitles); + return this; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public Builder advancedSubtitles(Optional advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = advancedSubtitles; + return this; + } + + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public Builder audioBoost(long audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public Builder audioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + + /** + * Target video number of audio channels. + */ + public Builder audioChannelCount(long audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = Optional.ofNullable(audioChannelCount); + return this; + } + + /** + * Target video number of audio channels. + */ + public Builder audioChannelCount(Optional audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = audioChannelCount; + return this; + } + + + /** + * Indicates the client supports ABR. + */ + public Builder autoAdjustQuality(BoolInt autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + /** + * Indicates the client supports ABR. + */ + public Builder autoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public Builder autoAdjustSubtitle(BoolInt autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public Builder autoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + + /** + * Indicates the client supports direct playing the indicated content. + */ + public Builder directPlay(BoolInt directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + public Builder directPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public Builder directStream(BoolInt directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public Builder directStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public Builder directStreamAudio(BoolInt directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = Optional.ofNullable(directStreamAudio); + return this; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public Builder directStreamAudio(Optional directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = directStreamAudio; + return this; + } + + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public Builder disableResolutionRotation(BoolInt disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = Optional.ofNullable(disableResolutionRotation); + return this; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public Builder disableResolutionRotation(Optional disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = disableResolutionRotation; + return this; + } + + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public Builder hasMDE(BoolInt hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = Optional.ofNullable(hasMDE); + return this; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public Builder hasMDE(Optional hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public Builder location(StartTranscodeSessionQueryParamLocation location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public Builder mediaBufferSize(long mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); + return this; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public Builder mediaBufferSize(Optional mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = mediaBufferSize; + return this; + } + + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public Builder mediaIndex(long mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = Optional.ofNullable(mediaIndex); + return this; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public Builder mediaIndex(Optional mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public Builder musicBitrate(long musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = Optional.ofNullable(musicBitrate); + return this; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public Builder musicBitrate(Optional musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = musicBitrate; + return this; + } + + + /** + * Offset from the start of the media (in seconds). + */ + public Builder offset(double offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * Offset from the start of the media (in seconds). + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public Builder partIndex(long partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = Optional.ofNullable(partIndex); + return this; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public Builder partIndex(Optional partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = partIndex; + return this; + } + + + /** + * Internal PMS path of the media to transcode. + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + /** + * Internal PMS path of the media to transcode. + */ + public Builder path(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public Builder peakBitrate(long peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = Optional.ofNullable(peakBitrate); + return this; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public Builder peakBitrate(Optional peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = peakBitrate; + return this; + } + + + /** + * Target photo resolution. + */ + public Builder photoResolution(String photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = Optional.ofNullable(photoResolution); + return this; + } + + /** + * Target photo resolution. + */ + public Builder photoResolution(Optional photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = photoResolution; + return this; + } + + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public Builder protocol(StartTranscodeSessionQueryParamProtocol protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + + /** + * Number of seconds to include in each transcoded segment + */ + public Builder secondsPerSegment(long secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = Optional.ofNullable(secondsPerSegment); + return this; + } + + /** + * Number of seconds to include in each transcoded segment + */ + public Builder secondsPerSegment(Optional secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = secondsPerSegment; + return this; + } + + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public Builder subtitleSize(long subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public Builder subtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public Builder subtitles(StartTranscodeSessionQueryParamSubtitles subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = Optional.ofNullable(subtitles); + return this; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public Builder subtitles(Optional subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = subtitles; + return this; + } + + + /** + * Target video bitrate (in kbps). + */ + public Builder videoBitrate(long videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = Optional.ofNullable(videoBitrate); + return this; + } + + /** + * Target video bitrate (in kbps). + */ + public Builder videoBitrate(Optional videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = videoBitrate; + return this; + } + + + /** + * Target photo quality. + */ + public Builder videoQuality(long videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = Optional.ofNullable(videoQuality); + return this; + } + + /** + * Target photo quality. + */ + public Builder videoQuality(Optional videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = videoQuality; + return this; + } + + + /** + * Target maximum video resolution. + */ + public Builder videoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + /** + * Target maximum video resolution. + */ + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public Builder xPlexClientProfileExtra(String xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = Optional.ofNullable(xPlexClientProfileExtra); + return this; + } + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public Builder xPlexClientProfileExtra(Optional xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = xPlexClientProfileExtra; + return this; + } + + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public Builder xPlexClientProfileName(String xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = Optional.ofNullable(xPlexClientProfileName); + return this; + } + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public Builder xPlexClientProfileName(Optional xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = xPlexClientProfileName; + return this; + } + + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public Builder xPlexSessionIdentifier(String xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = Optional.ofNullable(xPlexSessionIdentifier); + return this; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public Builder xPlexSessionIdentifier(Optional xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + return this; + } + + public StartTranscodeSessionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new StartTranscodeSessionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, transcodeType, + transcodeSessionId, extension, advancedSubtitles, + audioBoost, audioChannelCount, autoAdjustQuality, + autoAdjustSubtitle, directPlay, directStream, + directStreamAudio, disableResolutionRotation, hasMDE, + location, mediaBufferSize, mediaIndex, + musicBitrate, offset, partIndex, + path, peakBitrate, photoResolution, + protocol, secondsPerSegment, subtitleSize, + subtitles, videoBitrate, videoQuality, + videoResolution, xPlexClientProfileExtra, xPlexClientProfileName, + xPlexSessionIdentifier); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionRequestBuilder.java new file mode 100644 index 00000000..b4a0eaee --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StartTranscodeSession; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class StartTranscodeSessionRequestBuilder { + + private StartTranscodeSessionRequest request; + private final SDKConfiguration sdkConfiguration; + + public StartTranscodeSessionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StartTranscodeSessionRequestBuilder request(StartTranscodeSessionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public StartTranscodeSessionResponse call() throws Exception { + + RequestOperation operation + = new StartTranscodeSession.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionResponse.java new file mode 100644 index 00000000..20930095 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StartTranscodeSessionResponse.java @@ -0,0 +1,252 @@ +/* + * 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.Optional; + + +public class StartTranscodeSessionResponse 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; + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + private Optional responseStream; + + @JsonCreator + public StartTranscodeSessionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public StartTranscodeSessionResponse( + 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; + } + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StartTranscodeSessionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartTranscodeSessionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartTranscodeSessionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + public StartTranscodeSessionResponse withResponseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + public StartTranscodeSessionResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartTranscodeSessionResponse other = (StartTranscodeSessionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(StartTranscodeSessionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + public Builder responseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public StartTranscodeSessionResponse build() { + + return new StartTranscodeSessionResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeRequest.java deleted file mode 100644 index 55469e31..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeRequest.java +++ /dev/null @@ -1,936 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StartUniversalTranscodeRequest { - /** - * Whether the media item has MDE - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=hasMDE") - private double hasMDE; - - /** - * The path to the media item to transcode - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=path") - private String path; - - /** - * The index of the media item to transcode - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaIndex") - private double mediaIndex; - - /** - * The index of the part to transcode - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=partIndex") - private double partIndex; - - /** - * The protocol to use for the transcode session - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=protocol") - private String protocol; - - /** - * Whether to use fast seek or not - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=fastSeek") - private Optional fastSeek; - - /** - * Whether to use direct play or not - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directPlay") - private Optional directPlay; - - /** - * Whether to use direct stream or not - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directStream") - private Optional directStream; - - /** - * The size of the subtitles - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitleSize") - private Optional subtitleSize; - - /** - * The subtitles - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtites") - private Optional subtites; - - /** - * The audio boost - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioBoost") - private Optional audioBoost; - - /** - * The location of the transcode session - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=location") - private Optional location; - - /** - * The size of the media buffer - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaBufferSize") - private Optional mediaBufferSize; - - /** - * The session ID - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=session") - private Optional session; - - /** - * Whether to add a debug overlay or not - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=addDebugOverlay") - private Optional addDebugOverlay; - - /** - * Whether to auto adjust quality or not - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustQuality") - private Optional autoAdjustQuality; - - @JsonCreator - public StartUniversalTranscodeRequest( - double hasMDE, - String path, - double mediaIndex, - double partIndex, - String protocol, - Optional fastSeek, - Optional directPlay, - Optional directStream, - Optional subtitleSize, - Optional subtites, - Optional audioBoost, - Optional location, - Optional mediaBufferSize, - Optional session, - Optional addDebugOverlay, - Optional autoAdjustQuality) { - Utils.checkNotNull(hasMDE, "hasMDE"); - Utils.checkNotNull(path, "path"); - Utils.checkNotNull(mediaIndex, "mediaIndex"); - Utils.checkNotNull(partIndex, "partIndex"); - Utils.checkNotNull(protocol, "protocol"); - Utils.checkNotNull(fastSeek, "fastSeek"); - Utils.checkNotNull(directPlay, "directPlay"); - Utils.checkNotNull(directStream, "directStream"); - Utils.checkNotNull(subtitleSize, "subtitleSize"); - Utils.checkNotNull(subtites, "subtites"); - Utils.checkNotNull(audioBoost, "audioBoost"); - Utils.checkNotNull(location, "location"); - Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); - Utils.checkNotNull(session, "session"); - Utils.checkNotNull(addDebugOverlay, "addDebugOverlay"); - Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); - this.hasMDE = hasMDE; - this.path = path; - this.mediaIndex = mediaIndex; - this.partIndex = partIndex; - this.protocol = protocol; - this.fastSeek = fastSeek; - this.directPlay = directPlay; - this.directStream = directStream; - this.subtitleSize = subtitleSize; - this.subtites = subtites; - this.audioBoost = audioBoost; - this.location = location; - this.mediaBufferSize = mediaBufferSize; - this.session = session; - this.addDebugOverlay = addDebugOverlay; - this.autoAdjustQuality = autoAdjustQuality; - } - - public StartUniversalTranscodeRequest( - double hasMDE, - String path, - double mediaIndex, - double partIndex, - String protocol) { - this(hasMDE, path, mediaIndex, - partIndex, protocol, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - /** - * Whether the media item has MDE - */ - @JsonIgnore - public double hasMDE() { - return hasMDE; - } - - /** - * The path to the media item to transcode - */ - @JsonIgnore - public String path() { - return path; - } - - /** - * The index of the media item to transcode - */ - @JsonIgnore - public double mediaIndex() { - return mediaIndex; - } - - /** - * The index of the part to transcode - */ - @JsonIgnore - public double partIndex() { - return partIndex; - } - - /** - * The protocol to use for the transcode session - */ - @JsonIgnore - public String protocol() { - return protocol; - } - - /** - * Whether to use fast seek or not - */ - @JsonIgnore - public Optional fastSeek() { - return fastSeek; - } - - /** - * Whether to use direct play or not - */ - @JsonIgnore - public Optional directPlay() { - return directPlay; - } - - /** - * Whether to use direct stream or not - */ - @JsonIgnore - public Optional directStream() { - return directStream; - } - - /** - * The size of the subtitles - */ - @JsonIgnore - public Optional subtitleSize() { - return subtitleSize; - } - - /** - * The subtitles - */ - @JsonIgnore - public Optional subtites() { - return subtites; - } - - /** - * The audio boost - */ - @JsonIgnore - public Optional audioBoost() { - return audioBoost; - } - - /** - * The location of the transcode session - */ - @JsonIgnore - public Optional location() { - return location; - } - - /** - * The size of the media buffer - */ - @JsonIgnore - public Optional mediaBufferSize() { - return mediaBufferSize; - } - - /** - * The session ID - */ - @JsonIgnore - public Optional session() { - return session; - } - - /** - * Whether to add a debug overlay or not - */ - @JsonIgnore - public Optional addDebugOverlay() { - return addDebugOverlay; - } - - /** - * Whether to auto adjust quality or not - */ - @JsonIgnore - public Optional autoAdjustQuality() { - return autoAdjustQuality; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Whether the media item has MDE - */ - public StartUniversalTranscodeRequest withHasMDE(double hasMDE) { - Utils.checkNotNull(hasMDE, "hasMDE"); - this.hasMDE = hasMDE; - return this; - } - - /** - * The path to the media item to transcode - */ - public StartUniversalTranscodeRequest withPath(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - return this; - } - - /** - * The index of the media item to transcode - */ - public StartUniversalTranscodeRequest withMediaIndex(double mediaIndex) { - Utils.checkNotNull(mediaIndex, "mediaIndex"); - this.mediaIndex = mediaIndex; - return this; - } - - /** - * The index of the part to transcode - */ - public StartUniversalTranscodeRequest withPartIndex(double partIndex) { - Utils.checkNotNull(partIndex, "partIndex"); - this.partIndex = partIndex; - return this; - } - - /** - * The protocol to use for the transcode session - */ - public StartUniversalTranscodeRequest withProtocol(String protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = protocol; - return this; - } - - /** - * Whether to use fast seek or not - */ - public StartUniversalTranscodeRequest withFastSeek(double fastSeek) { - Utils.checkNotNull(fastSeek, "fastSeek"); - this.fastSeek = Optional.ofNullable(fastSeek); - return this; - } - - - /** - * Whether to use fast seek or not - */ - public StartUniversalTranscodeRequest withFastSeek(Optional fastSeek) { - Utils.checkNotNull(fastSeek, "fastSeek"); - this.fastSeek = fastSeek; - return this; - } - - /** - * Whether to use direct play or not - */ - public StartUniversalTranscodeRequest withDirectPlay(double directPlay) { - Utils.checkNotNull(directPlay, "directPlay"); - this.directPlay = Optional.ofNullable(directPlay); - return this; - } - - - /** - * Whether to use direct play or not - */ - public StartUniversalTranscodeRequest withDirectPlay(Optional directPlay) { - Utils.checkNotNull(directPlay, "directPlay"); - this.directPlay = directPlay; - return this; - } - - /** - * Whether to use direct stream or not - */ - public StartUniversalTranscodeRequest withDirectStream(double directStream) { - Utils.checkNotNull(directStream, "directStream"); - this.directStream = Optional.ofNullable(directStream); - return this; - } - - - /** - * Whether to use direct stream or not - */ - public StartUniversalTranscodeRequest withDirectStream(Optional directStream) { - Utils.checkNotNull(directStream, "directStream"); - this.directStream = directStream; - return this; - } - - /** - * The size of the subtitles - */ - public StartUniversalTranscodeRequest withSubtitleSize(double subtitleSize) { - Utils.checkNotNull(subtitleSize, "subtitleSize"); - this.subtitleSize = Optional.ofNullable(subtitleSize); - return this; - } - - - /** - * The size of the subtitles - */ - public StartUniversalTranscodeRequest withSubtitleSize(Optional subtitleSize) { - Utils.checkNotNull(subtitleSize, "subtitleSize"); - this.subtitleSize = subtitleSize; - return this; - } - - /** - * The subtitles - */ - public StartUniversalTranscodeRequest withSubtites(String subtites) { - Utils.checkNotNull(subtites, "subtites"); - this.subtites = Optional.ofNullable(subtites); - return this; - } - - - /** - * The subtitles - */ - public StartUniversalTranscodeRequest withSubtites(Optional subtites) { - Utils.checkNotNull(subtites, "subtites"); - this.subtites = subtites; - return this; - } - - /** - * The audio boost - */ - public StartUniversalTranscodeRequest withAudioBoost(double audioBoost) { - Utils.checkNotNull(audioBoost, "audioBoost"); - this.audioBoost = Optional.ofNullable(audioBoost); - return this; - } - - - /** - * The audio boost - */ - public StartUniversalTranscodeRequest withAudioBoost(Optional audioBoost) { - Utils.checkNotNull(audioBoost, "audioBoost"); - this.audioBoost = audioBoost; - return this; - } - - /** - * The location of the transcode session - */ - public StartUniversalTranscodeRequest withLocation(String location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - - /** - * The location of the transcode session - */ - public StartUniversalTranscodeRequest withLocation(Optional location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - /** - * The size of the media buffer - */ - public StartUniversalTranscodeRequest withMediaBufferSize(double mediaBufferSize) { - Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); - this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); - return this; - } - - - /** - * The size of the media buffer - */ - public StartUniversalTranscodeRequest withMediaBufferSize(Optional mediaBufferSize) { - Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); - this.mediaBufferSize = mediaBufferSize; - return this; - } - - /** - * The session ID - */ - public StartUniversalTranscodeRequest withSession(String session) { - Utils.checkNotNull(session, "session"); - this.session = Optional.ofNullable(session); - return this; - } - - - /** - * The session ID - */ - public StartUniversalTranscodeRequest withSession(Optional session) { - Utils.checkNotNull(session, "session"); - this.session = session; - return this; - } - - /** - * Whether to add a debug overlay or not - */ - public StartUniversalTranscodeRequest withAddDebugOverlay(double addDebugOverlay) { - Utils.checkNotNull(addDebugOverlay, "addDebugOverlay"); - this.addDebugOverlay = Optional.ofNullable(addDebugOverlay); - return this; - } - - - /** - * Whether to add a debug overlay or not - */ - public StartUniversalTranscodeRequest withAddDebugOverlay(Optional addDebugOverlay) { - Utils.checkNotNull(addDebugOverlay, "addDebugOverlay"); - this.addDebugOverlay = addDebugOverlay; - return this; - } - - /** - * Whether to auto adjust quality or not - */ - public StartUniversalTranscodeRequest withAutoAdjustQuality(double autoAdjustQuality) { - Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); - this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); - return this; - } - - - /** - * Whether to auto adjust quality or not - */ - public StartUniversalTranscodeRequest withAutoAdjustQuality(Optional autoAdjustQuality) { - Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); - this.autoAdjustQuality = autoAdjustQuality; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartUniversalTranscodeRequest other = (StartUniversalTranscodeRequest) o; - return - Utils.enhancedDeepEquals(this.hasMDE, other.hasMDE) && - Utils.enhancedDeepEquals(this.path, other.path) && - Utils.enhancedDeepEquals(this.mediaIndex, other.mediaIndex) && - Utils.enhancedDeepEquals(this.partIndex, other.partIndex) && - Utils.enhancedDeepEquals(this.protocol, other.protocol) && - Utils.enhancedDeepEquals(this.fastSeek, other.fastSeek) && - Utils.enhancedDeepEquals(this.directPlay, other.directPlay) && - Utils.enhancedDeepEquals(this.directStream, other.directStream) && - Utils.enhancedDeepEquals(this.subtitleSize, other.subtitleSize) && - Utils.enhancedDeepEquals(this.subtites, other.subtites) && - Utils.enhancedDeepEquals(this.audioBoost, other.audioBoost) && - Utils.enhancedDeepEquals(this.location, other.location) && - Utils.enhancedDeepEquals(this.mediaBufferSize, other.mediaBufferSize) && - Utils.enhancedDeepEquals(this.session, other.session) && - Utils.enhancedDeepEquals(this.addDebugOverlay, other.addDebugOverlay) && - Utils.enhancedDeepEquals(this.autoAdjustQuality, other.autoAdjustQuality); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - hasMDE, path, mediaIndex, - partIndex, protocol, fastSeek, - directPlay, directStream, subtitleSize, - subtites, audioBoost, location, - mediaBufferSize, session, addDebugOverlay, - autoAdjustQuality); - } - - @Override - public String toString() { - return Utils.toString(StartUniversalTranscodeRequest.class, - "hasMDE", hasMDE, - "path", path, - "mediaIndex", mediaIndex, - "partIndex", partIndex, - "protocol", protocol, - "fastSeek", fastSeek, - "directPlay", directPlay, - "directStream", directStream, - "subtitleSize", subtitleSize, - "subtites", subtites, - "audioBoost", audioBoost, - "location", location, - "mediaBufferSize", mediaBufferSize, - "session", session, - "addDebugOverlay", addDebugOverlay, - "autoAdjustQuality", autoAdjustQuality); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Double hasMDE; - - private String path; - - private Double mediaIndex; - - private Double partIndex; - - private String protocol; - - private Optional fastSeek = Optional.empty(); - - private Optional directPlay = Optional.empty(); - - private Optional directStream = Optional.empty(); - - private Optional subtitleSize = Optional.empty(); - - private Optional subtites = Optional.empty(); - - private Optional audioBoost = Optional.empty(); - - private Optional location = Optional.empty(); - - private Optional mediaBufferSize = Optional.empty(); - - private Optional session = Optional.empty(); - - private Optional addDebugOverlay = Optional.empty(); - - private Optional autoAdjustQuality = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Whether the media item has MDE - */ - public Builder hasMDE(double hasMDE) { - Utils.checkNotNull(hasMDE, "hasMDE"); - this.hasMDE = hasMDE; - return this; - } - - - /** - * The path to the media item to transcode - */ - public Builder path(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; - return this; - } - - - /** - * The index of the media item to transcode - */ - public Builder mediaIndex(double mediaIndex) { - Utils.checkNotNull(mediaIndex, "mediaIndex"); - this.mediaIndex = mediaIndex; - return this; - } - - - /** - * The index of the part to transcode - */ - public Builder partIndex(double partIndex) { - Utils.checkNotNull(partIndex, "partIndex"); - this.partIndex = partIndex; - return this; - } - - - /** - * The protocol to use for the transcode session - */ - public Builder protocol(String protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = protocol; - return this; - } - - - /** - * Whether to use fast seek or not - */ - public Builder fastSeek(double fastSeek) { - Utils.checkNotNull(fastSeek, "fastSeek"); - this.fastSeek = Optional.ofNullable(fastSeek); - return this; - } - - /** - * Whether to use fast seek or not - */ - public Builder fastSeek(Optional fastSeek) { - Utils.checkNotNull(fastSeek, "fastSeek"); - this.fastSeek = fastSeek; - return this; - } - - - /** - * Whether to use direct play or not - */ - public Builder directPlay(double directPlay) { - Utils.checkNotNull(directPlay, "directPlay"); - this.directPlay = Optional.ofNullable(directPlay); - return this; - } - - /** - * Whether to use direct play or not - */ - public Builder directPlay(Optional directPlay) { - Utils.checkNotNull(directPlay, "directPlay"); - this.directPlay = directPlay; - return this; - } - - - /** - * Whether to use direct stream or not - */ - public Builder directStream(double directStream) { - Utils.checkNotNull(directStream, "directStream"); - this.directStream = Optional.ofNullable(directStream); - return this; - } - - /** - * Whether to use direct stream or not - */ - public Builder directStream(Optional directStream) { - Utils.checkNotNull(directStream, "directStream"); - this.directStream = directStream; - return this; - } - - - /** - * The size of the subtitles - */ - public Builder subtitleSize(double subtitleSize) { - Utils.checkNotNull(subtitleSize, "subtitleSize"); - this.subtitleSize = Optional.ofNullable(subtitleSize); - return this; - } - - /** - * The size of the subtitles - */ - public Builder subtitleSize(Optional subtitleSize) { - Utils.checkNotNull(subtitleSize, "subtitleSize"); - this.subtitleSize = subtitleSize; - return this; - } - - - /** - * The subtitles - */ - public Builder subtites(String subtites) { - Utils.checkNotNull(subtites, "subtites"); - this.subtites = Optional.ofNullable(subtites); - return this; - } - - /** - * The subtitles - */ - public Builder subtites(Optional subtites) { - Utils.checkNotNull(subtites, "subtites"); - this.subtites = subtites; - return this; - } - - - /** - * The audio boost - */ - public Builder audioBoost(double audioBoost) { - Utils.checkNotNull(audioBoost, "audioBoost"); - this.audioBoost = Optional.ofNullable(audioBoost); - return this; - } - - /** - * The audio boost - */ - public Builder audioBoost(Optional audioBoost) { - Utils.checkNotNull(audioBoost, "audioBoost"); - this.audioBoost = audioBoost; - return this; - } - - - /** - * The location of the transcode session - */ - public Builder location(String location) { - Utils.checkNotNull(location, "location"); - this.location = Optional.ofNullable(location); - return this; - } - - /** - * The location of the transcode session - */ - public Builder location(Optional location) { - Utils.checkNotNull(location, "location"); - this.location = location; - return this; - } - - - /** - * The size of the media buffer - */ - public Builder mediaBufferSize(double mediaBufferSize) { - Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); - this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); - return this; - } - - /** - * The size of the media buffer - */ - public Builder mediaBufferSize(Optional mediaBufferSize) { - Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); - this.mediaBufferSize = mediaBufferSize; - return this; - } - - - /** - * The session ID - */ - public Builder session(String session) { - Utils.checkNotNull(session, "session"); - this.session = Optional.ofNullable(session); - return this; - } - - /** - * The session ID - */ - public Builder session(Optional session) { - Utils.checkNotNull(session, "session"); - this.session = session; - return this; - } - - - /** - * Whether to add a debug overlay or not - */ - public Builder addDebugOverlay(double addDebugOverlay) { - Utils.checkNotNull(addDebugOverlay, "addDebugOverlay"); - this.addDebugOverlay = Optional.ofNullable(addDebugOverlay); - return this; - } - - /** - * Whether to add a debug overlay or not - */ - public Builder addDebugOverlay(Optional addDebugOverlay) { - Utils.checkNotNull(addDebugOverlay, "addDebugOverlay"); - this.addDebugOverlay = addDebugOverlay; - return this; - } - - - /** - * Whether to auto adjust quality or not - */ - public Builder autoAdjustQuality(double autoAdjustQuality) { - Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); - this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); - return this; - } - - /** - * Whether to auto adjust quality or not - */ - public Builder autoAdjustQuality(Optional autoAdjustQuality) { - Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); - this.autoAdjustQuality = autoAdjustQuality; - return this; - } - - public StartUniversalTranscodeRequest build() { - - return new StartUniversalTranscodeRequest( - hasMDE, path, mediaIndex, - partIndex, protocol, fastSeek, - directPlay, directStream, subtitleSize, - subtites, audioBoost, location, - mediaBufferSize, session, addDebugOverlay, - autoAdjustQuality); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeRequestBuilder.java deleted file mode 100644 index cc7484ed..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeRequestBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.StartUniversalTranscode; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; - -public class StartUniversalTranscodeRequestBuilder { - - private StartUniversalTranscodeRequest request; - private final SDKConfiguration sdkConfiguration; - - public StartUniversalTranscodeRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public StartUniversalTranscodeRequestBuilder request(StartUniversalTranscodeRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public StartUniversalTranscodeResponse call() throws Exception { - - RequestOperation operation - = new StartUniversalTranscode.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeResponse.java deleted file mode 100644 index 210555f4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StartUniversalTranscodeResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class StartUniversalTranscodeResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public StartUniversalTranscodeResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public StartUniversalTranscodeResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public StartUniversalTranscodeResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartUniversalTranscodeResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartUniversalTranscodeResponse other = (StartUniversalTranscodeResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartUniversalTranscodeResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartUniversalTranscodeResponse build() { - - return new StartUniversalTranscodeResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/State.java b/src/main/java/dev/plexapi/sdk/models/operations/State.java index f1b35615..4f4d4f1d 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/State.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/State.java @@ -3,186 +3,40 @@ */ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; +import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; import java.util.Objects; import java.util.Optional; -/** - *

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

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

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

The state of the media item + *

The current state of the media. */ -@JsonDeserialize(using = State._Deserializer.class) -@JsonSerialize(using = State._Serializer.class) -public class State { - - public static final State PLAYING = new State("playing"); - public static final State PAUSED = new State("paused"); - public static final State STOPPED = new State("stopped"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); +public enum State { + STOPPED("stopped"), + BUFFERING("buffering"), + PLAYING("playing"), + PAUSED("paused"); + @JsonValue private final String value; - private State(String value) { + State(String value) { this.value = value; } - - /** - * Returns a State with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as State - */ - public static State of(String value) { - synchronized (State.class) { - return values.computeIfAbsent(value, v -> new State(v)); - } - } - + public String value() { return value; } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - State other = (State) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "State [value=" + value + "]"; - } - - // return an array just like an enum - public static State[] values() { - synchronized (State.class) { - return values.values().toArray(new State[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("playing", PLAYING); - map.put("paused", PAUSED); - map.put("stopped", STOPPED); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("playing", StateEnum.PLAYING); - map.put("paused", StateEnum.PAUSED); - map.put("stopped", StateEnum.STOPPED); - return map; - } - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(State.class); - } - - @Override - public void serialize(State value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(State.class); - } - - @Override - public State deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return State.of(v); - } - } - - public enum StateEnum { - - PLAYING("playing"), - PAUSED("paused"), - STOPPED("stopped"),; - - private final String value; - - private StateEnum(String value) { - this.value = value; - } - - public String value() { - return value; + public static Optional fromValue(String value) { + for (State o: State.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } } + return Optional.empty(); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StatisticsBandwidth.java b/src/main/java/dev/plexapi/sdk/models/operations/StatisticsBandwidth.java deleted file mode 100644 index 445de0b8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StatisticsBandwidth.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StatisticsBandwidth { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("accountID") - private Optional accountID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("deviceID") - private Optional deviceID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("timespan") - private Optional timespan; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("at") - private Optional at; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("lan") - private Optional lan; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bytes") - private Optional bytes; - - @JsonCreator - public StatisticsBandwidth( - @JsonProperty("accountID") Optional accountID, - @JsonProperty("deviceID") Optional deviceID, - @JsonProperty("timespan") Optional timespan, - @JsonProperty("at") Optional at, - @JsonProperty("lan") Optional lan, - @JsonProperty("bytes") Optional bytes) { - Utils.checkNotNull(accountID, "accountID"); - Utils.checkNotNull(deviceID, "deviceID"); - Utils.checkNotNull(timespan, "timespan"); - Utils.checkNotNull(at, "at"); - Utils.checkNotNull(lan, "lan"); - Utils.checkNotNull(bytes, "bytes"); - this.accountID = accountID; - this.deviceID = deviceID; - this.timespan = timespan; - this.at = at; - this.lan = lan; - this.bytes = bytes; - } - - public StatisticsBandwidth() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional accountID() { - return accountID; - } - - @JsonIgnore - public Optional deviceID() { - return deviceID; - } - - @JsonIgnore - public Optional timespan() { - return timespan; - } - - @JsonIgnore - public Optional at() { - return at; - } - - @JsonIgnore - public Optional lan() { - return lan; - } - - @JsonIgnore - public Optional bytes() { - return bytes; - } - - public static Builder builder() { - return new Builder(); - } - - - public StatisticsBandwidth withAccountID(int accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = Optional.ofNullable(accountID); - return this; - } - - - public StatisticsBandwidth withAccountID(Optional accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = accountID; - return this; - } - - public StatisticsBandwidth withDeviceID(int deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = Optional.ofNullable(deviceID); - return this; - } - - - public StatisticsBandwidth withDeviceID(Optional deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = deviceID; - return this; - } - - public StatisticsBandwidth withTimespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - - public StatisticsBandwidth withTimespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - public StatisticsBandwidth withAt(int at) { - Utils.checkNotNull(at, "at"); - this.at = Optional.ofNullable(at); - return this; - } - - - public StatisticsBandwidth withAt(Optional at) { - Utils.checkNotNull(at, "at"); - this.at = at; - return this; - } - - public StatisticsBandwidth withLan(boolean lan) { - Utils.checkNotNull(lan, "lan"); - this.lan = Optional.ofNullable(lan); - return this; - } - - - public StatisticsBandwidth withLan(Optional lan) { - Utils.checkNotNull(lan, "lan"); - this.lan = lan; - return this; - } - - public StatisticsBandwidth withBytes(long bytes) { - Utils.checkNotNull(bytes, "bytes"); - this.bytes = Optional.ofNullable(bytes); - return this; - } - - - public StatisticsBandwidth withBytes(Optional bytes) { - Utils.checkNotNull(bytes, "bytes"); - this.bytes = bytes; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StatisticsBandwidth other = (StatisticsBandwidth) o; - return - Utils.enhancedDeepEquals(this.accountID, other.accountID) && - Utils.enhancedDeepEquals(this.deviceID, other.deviceID) && - Utils.enhancedDeepEquals(this.timespan, other.timespan) && - Utils.enhancedDeepEquals(this.at, other.at) && - Utils.enhancedDeepEquals(this.lan, other.lan) && - Utils.enhancedDeepEquals(this.bytes, other.bytes); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - accountID, deviceID, timespan, - at, lan, bytes); - } - - @Override - public String toString() { - return Utils.toString(StatisticsBandwidth.class, - "accountID", accountID, - "deviceID", deviceID, - "timespan", timespan, - "at", at, - "lan", lan, - "bytes", bytes); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional accountID = Optional.empty(); - - private Optional deviceID = Optional.empty(); - - private Optional timespan = Optional.empty(); - - private Optional at = Optional.empty(); - - private Optional lan = Optional.empty(); - - private Optional bytes = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder accountID(int accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = Optional.ofNullable(accountID); - return this; - } - - public Builder accountID(Optional accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = accountID; - return this; - } - - - public Builder deviceID(int deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = Optional.ofNullable(deviceID); - return this; - } - - public Builder deviceID(Optional deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = deviceID; - return this; - } - - - public Builder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - public Builder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - - public Builder at(int at) { - Utils.checkNotNull(at, "at"); - this.at = Optional.ofNullable(at); - return this; - } - - public Builder at(Optional at) { - Utils.checkNotNull(at, "at"); - this.at = at; - return this; - } - - - public Builder lan(boolean lan) { - Utils.checkNotNull(lan, "lan"); - this.lan = Optional.ofNullable(lan); - return this; - } - - public Builder lan(Optional lan) { - Utils.checkNotNull(lan, "lan"); - this.lan = lan; - return this; - } - - - public Builder bytes(long bytes) { - Utils.checkNotNull(bytes, "bytes"); - this.bytes = Optional.ofNullable(bytes); - return this; - } - - public Builder bytes(Optional bytes) { - Utils.checkNotNull(bytes, "bytes"); - this.bytes = bytes; - return this; - } - - public StatisticsBandwidth build() { - - return new StatisticsBandwidth( - accountID, deviceID, timespan, - at, lan, bytes); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StatisticsMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/StatisticsMedia.java deleted file mode 100644 index 7807e891..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StatisticsMedia.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StatisticsMedia { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("accountID") - private Optional accountID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("deviceID") - private Optional deviceID; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("timespan") - private Optional timespan; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("at") - private Optional at; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("metadataType") - private Optional metadataType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("count") - private Optional count; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - @JsonCreator - public StatisticsMedia( - @JsonProperty("accountID") Optional accountID, - @JsonProperty("deviceID") Optional deviceID, - @JsonProperty("timespan") Optional timespan, - @JsonProperty("at") Optional at, - @JsonProperty("metadataType") Optional metadataType, - @JsonProperty("count") Optional count, - @JsonProperty("duration") Optional duration) { - Utils.checkNotNull(accountID, "accountID"); - Utils.checkNotNull(deviceID, "deviceID"); - Utils.checkNotNull(timespan, "timespan"); - Utils.checkNotNull(at, "at"); - Utils.checkNotNull(metadataType, "metadataType"); - Utils.checkNotNull(count, "count"); - Utils.checkNotNull(duration, "duration"); - this.accountID = accountID; - this.deviceID = deviceID; - this.timespan = timespan; - this.at = at; - this.metadataType = metadataType; - this.count = count; - this.duration = duration; - } - - public StatisticsMedia() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); - } - - @JsonIgnore - public Optional accountID() { - return accountID; - } - - @JsonIgnore - public Optional deviceID() { - return deviceID; - } - - @JsonIgnore - public Optional timespan() { - return timespan; - } - - @JsonIgnore - public Optional at() { - return at; - } - - @JsonIgnore - public Optional metadataType() { - return metadataType; - } - - @JsonIgnore - public Optional count() { - return count; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - public static Builder builder() { - return new Builder(); - } - - - public StatisticsMedia withAccountID(int accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = Optional.ofNullable(accountID); - return this; - } - - - public StatisticsMedia withAccountID(Optional accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = accountID; - return this; - } - - public StatisticsMedia withDeviceID(int deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = Optional.ofNullable(deviceID); - return this; - } - - - public StatisticsMedia withDeviceID(Optional deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = deviceID; - return this; - } - - public StatisticsMedia withTimespan(int timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - - public StatisticsMedia withTimespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - public StatisticsMedia withAt(int at) { - Utils.checkNotNull(at, "at"); - this.at = Optional.ofNullable(at); - return this; - } - - - public StatisticsMedia withAt(Optional at) { - Utils.checkNotNull(at, "at"); - this.at = at; - return this; - } - - public StatisticsMedia withMetadataType(int metadataType) { - Utils.checkNotNull(metadataType, "metadataType"); - this.metadataType = Optional.ofNullable(metadataType); - return this; - } - - - public StatisticsMedia withMetadataType(Optional metadataType) { - Utils.checkNotNull(metadataType, "metadataType"); - this.metadataType = metadataType; - return this; - } - - public StatisticsMedia withCount(int count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.ofNullable(count); - return this; - } - - - public StatisticsMedia withCount(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - public StatisticsMedia withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public StatisticsMedia withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StatisticsMedia other = (StatisticsMedia) o; - return - Utils.enhancedDeepEquals(this.accountID, other.accountID) && - Utils.enhancedDeepEquals(this.deviceID, other.deviceID) && - Utils.enhancedDeepEquals(this.timespan, other.timespan) && - Utils.enhancedDeepEquals(this.at, other.at) && - Utils.enhancedDeepEquals(this.metadataType, other.metadataType) && - Utils.enhancedDeepEquals(this.count, other.count) && - Utils.enhancedDeepEquals(this.duration, other.duration); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - accountID, deviceID, timespan, - at, metadataType, count, - duration); - } - - @Override - public String toString() { - return Utils.toString(StatisticsMedia.class, - "accountID", accountID, - "deviceID", deviceID, - "timespan", timespan, - "at", at, - "metadataType", metadataType, - "count", count, - "duration", duration); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional accountID = Optional.empty(); - - private Optional deviceID = Optional.empty(); - - private Optional timespan = Optional.empty(); - - private Optional at = Optional.empty(); - - private Optional metadataType = Optional.empty(); - - private Optional count = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder accountID(int accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = Optional.ofNullable(accountID); - return this; - } - - public Builder accountID(Optional accountID) { - Utils.checkNotNull(accountID, "accountID"); - this.accountID = accountID; - return this; - } - - - public Builder deviceID(int deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = Optional.ofNullable(deviceID); - return this; - } - - public Builder deviceID(Optional deviceID) { - Utils.checkNotNull(deviceID, "deviceID"); - this.deviceID = deviceID; - return this; - } - - - public Builder timespan(int timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - public Builder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - - public Builder at(int at) { - Utils.checkNotNull(at, "at"); - this.at = Optional.ofNullable(at); - return this; - } - - public Builder at(Optional at) { - Utils.checkNotNull(at, "at"); - this.at = at; - return this; - } - - - public Builder metadataType(int metadataType) { - Utils.checkNotNull(metadataType, "metadataType"); - this.metadataType = Optional.ofNullable(metadataType); - return this; - } - - public Builder metadataType(Optional metadataType) { - Utils.checkNotNull(metadataType, "metadataType"); - this.metadataType = metadataType; - return this; - } - - - public Builder count(int count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.ofNullable(count); - return this; - } - - public Builder count(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public StatisticsMedia build() { - - return new StatisticsMedia( - accountID, deviceID, timespan, - at, metadataType, count, - duration); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StatisticsResources.java b/src/main/java/dev/plexapi/sdk/models/operations/StatisticsResources.java deleted file mode 100644 index 48205619..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StatisticsResources.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Float; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class StatisticsResources { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("timespan") - private Optional timespan; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("at") - private Optional at; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hostCpuUtilization") - private Optional hostCpuUtilization; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("processCpuUtilization") - private Optional processCpuUtilization; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hostMemoryUtilization") - private Optional hostMemoryUtilization; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("processMemoryUtilization") - private Optional processMemoryUtilization; - - @JsonCreator - public StatisticsResources( - @JsonProperty("timespan") Optional timespan, - @JsonProperty("at") Optional at, - @JsonProperty("hostCpuUtilization") Optional hostCpuUtilization, - @JsonProperty("processCpuUtilization") Optional processCpuUtilization, - @JsonProperty("hostMemoryUtilization") Optional hostMemoryUtilization, - @JsonProperty("processMemoryUtilization") Optional processMemoryUtilization) { - Utils.checkNotNull(timespan, "timespan"); - Utils.checkNotNull(at, "at"); - Utils.checkNotNull(hostCpuUtilization, "hostCpuUtilization"); - Utils.checkNotNull(processCpuUtilization, "processCpuUtilization"); - Utils.checkNotNull(hostMemoryUtilization, "hostMemoryUtilization"); - Utils.checkNotNull(processMemoryUtilization, "processMemoryUtilization"); - this.timespan = timespan; - this.at = at; - this.hostCpuUtilization = hostCpuUtilization; - this.processCpuUtilization = processCpuUtilization; - this.hostMemoryUtilization = hostMemoryUtilization; - this.processMemoryUtilization = processMemoryUtilization; - } - - public StatisticsResources() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); - } - - @JsonIgnore - public Optional timespan() { - return timespan; - } - - @JsonIgnore - public Optional at() { - return at; - } - - @JsonIgnore - public Optional hostCpuUtilization() { - return hostCpuUtilization; - } - - @JsonIgnore - public Optional processCpuUtilization() { - return processCpuUtilization; - } - - @JsonIgnore - public Optional hostMemoryUtilization() { - return hostMemoryUtilization; - } - - @JsonIgnore - public Optional processMemoryUtilization() { - return processMemoryUtilization; - } - - public static Builder builder() { - return new Builder(); - } - - - public StatisticsResources withTimespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - - public StatisticsResources withTimespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - public StatisticsResources withAt(long at) { - Utils.checkNotNull(at, "at"); - this.at = Optional.ofNullable(at); - return this; - } - - - public StatisticsResources withAt(Optional at) { - Utils.checkNotNull(at, "at"); - this.at = at; - return this; - } - - public StatisticsResources withHostCpuUtilization(float hostCpuUtilization) { - Utils.checkNotNull(hostCpuUtilization, "hostCpuUtilization"); - this.hostCpuUtilization = Optional.ofNullable(hostCpuUtilization); - return this; - } - - - public StatisticsResources withHostCpuUtilization(Optional hostCpuUtilization) { - Utils.checkNotNull(hostCpuUtilization, "hostCpuUtilization"); - this.hostCpuUtilization = hostCpuUtilization; - return this; - } - - public StatisticsResources withProcessCpuUtilization(float processCpuUtilization) { - Utils.checkNotNull(processCpuUtilization, "processCpuUtilization"); - this.processCpuUtilization = Optional.ofNullable(processCpuUtilization); - return this; - } - - - public StatisticsResources withProcessCpuUtilization(Optional processCpuUtilization) { - Utils.checkNotNull(processCpuUtilization, "processCpuUtilization"); - this.processCpuUtilization = processCpuUtilization; - return this; - } - - public StatisticsResources withHostMemoryUtilization(float hostMemoryUtilization) { - Utils.checkNotNull(hostMemoryUtilization, "hostMemoryUtilization"); - this.hostMemoryUtilization = Optional.ofNullable(hostMemoryUtilization); - return this; - } - - - public StatisticsResources withHostMemoryUtilization(Optional hostMemoryUtilization) { - Utils.checkNotNull(hostMemoryUtilization, "hostMemoryUtilization"); - this.hostMemoryUtilization = hostMemoryUtilization; - return this; - } - - public StatisticsResources withProcessMemoryUtilization(float processMemoryUtilization) { - Utils.checkNotNull(processMemoryUtilization, "processMemoryUtilization"); - this.processMemoryUtilization = Optional.ofNullable(processMemoryUtilization); - return this; - } - - - public StatisticsResources withProcessMemoryUtilization(Optional processMemoryUtilization) { - Utils.checkNotNull(processMemoryUtilization, "processMemoryUtilization"); - this.processMemoryUtilization = processMemoryUtilization; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StatisticsResources other = (StatisticsResources) o; - return - Utils.enhancedDeepEquals(this.timespan, other.timespan) && - Utils.enhancedDeepEquals(this.at, other.at) && - Utils.enhancedDeepEquals(this.hostCpuUtilization, other.hostCpuUtilization) && - Utils.enhancedDeepEquals(this.processCpuUtilization, other.processCpuUtilization) && - Utils.enhancedDeepEquals(this.hostMemoryUtilization, other.hostMemoryUtilization) && - Utils.enhancedDeepEquals(this.processMemoryUtilization, other.processMemoryUtilization); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - timespan, at, hostCpuUtilization, - processCpuUtilization, hostMemoryUtilization, processMemoryUtilization); - } - - @Override - public String toString() { - return Utils.toString(StatisticsResources.class, - "timespan", timespan, - "at", at, - "hostCpuUtilization", hostCpuUtilization, - "processCpuUtilization", processCpuUtilization, - "hostMemoryUtilization", hostMemoryUtilization, - "processMemoryUtilization", processMemoryUtilization); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional timespan = Optional.empty(); - - private Optional at = Optional.empty(); - - private Optional hostCpuUtilization = Optional.empty(); - - private Optional processCpuUtilization = Optional.empty(); - - private Optional hostMemoryUtilization = Optional.empty(); - - private Optional processMemoryUtilization = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - public Builder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.ofNullable(timespan); - return this; - } - - public Builder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - - public Builder at(long at) { - Utils.checkNotNull(at, "at"); - this.at = Optional.ofNullable(at); - return this; - } - - public Builder at(Optional at) { - Utils.checkNotNull(at, "at"); - this.at = at; - return this; - } - - - public Builder hostCpuUtilization(float hostCpuUtilization) { - Utils.checkNotNull(hostCpuUtilization, "hostCpuUtilization"); - this.hostCpuUtilization = Optional.ofNullable(hostCpuUtilization); - return this; - } - - public Builder hostCpuUtilization(Optional hostCpuUtilization) { - Utils.checkNotNull(hostCpuUtilization, "hostCpuUtilization"); - this.hostCpuUtilization = hostCpuUtilization; - return this; - } - - - public Builder processCpuUtilization(float processCpuUtilization) { - Utils.checkNotNull(processCpuUtilization, "processCpuUtilization"); - this.processCpuUtilization = Optional.ofNullable(processCpuUtilization); - return this; - } - - public Builder processCpuUtilization(Optional processCpuUtilization) { - Utils.checkNotNull(processCpuUtilization, "processCpuUtilization"); - this.processCpuUtilization = processCpuUtilization; - return this; - } - - - public Builder hostMemoryUtilization(float hostMemoryUtilization) { - Utils.checkNotNull(hostMemoryUtilization, "hostMemoryUtilization"); - this.hostMemoryUtilization = Optional.ofNullable(hostMemoryUtilization); - return this; - } - - public Builder hostMemoryUtilization(Optional hostMemoryUtilization) { - Utils.checkNotNull(hostMemoryUtilization, "hostMemoryUtilization"); - this.hostMemoryUtilization = hostMemoryUtilization; - return this; - } - - - public Builder processMemoryUtilization(float processMemoryUtilization) { - Utils.checkNotNull(processMemoryUtilization, "processMemoryUtilization"); - this.processMemoryUtilization = Optional.ofNullable(processMemoryUtilization); - return this; - } - - public Builder processMemoryUtilization(Optional processMemoryUtilization) { - Utils.checkNotNull(processMemoryUtilization, "processMemoryUtilization"); - this.processMemoryUtilization = processMemoryUtilization; - return this; - } - - public StatisticsResources build() { - - return new StatisticsResources( - timespan, at, hostCpuUtilization, - processCpuUtilization, hostMemoryUtilization, processMemoryUtilization); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Status.java b/src/main/java/dev/plexapi/sdk/models/operations/Status.java index 844b2b3f..f0ceb30c 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Status.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Status.java @@ -3,178 +3,46 @@ */ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; +import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; import java.util.Objects; import java.util.Optional; -/** - *

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

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

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

Current friend request status + *

The state of this queue + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error */ -@JsonDeserialize(using = Status._Deserializer.class) -@JsonSerialize(using = Status._Serializer.class) -public class Status { - - public static final Status ACCEPTED = new Status("accepted"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); +public enum Status { + DECIDING("deciding"), + WAITING("waiting"), + PROCESSING("processing"), + DONE("done"), + ERROR("error"); + @JsonValue private final String value; - private Status(String value) { + Status(String value) { this.value = value; } - - /** - * Returns a Status with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as Status - */ - public static Status of(String value) { - synchronized (Status.class) { - return values.computeIfAbsent(value, v -> new Status(v)); - } - } - + public String value() { return value; } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Status other = (Status) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "Status [value=" + value + "]"; - } - - // return an array just like an enum - public static Status[] values() { - synchronized (Status.class) { - return values.values().toArray(new Status[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("accepted", ACCEPTED); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("accepted", StatusEnum.ACCEPTED); - return map; - } - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(Status.class); - } - - @Override - public void serialize(Status value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(Status.class); - } - - @Override - public Status deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return Status.of(v); - } - } - - public enum StatusEnum { - - ACCEPTED("accepted"),; - - private final String value; - - private StatusEnum(String value) { - this.value = value; - } - - public String value() { - return value; + public static Optional fromValue(String value) { + for (Status o: Status.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } } + return Optional.empty(); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopAllRefreshesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StopAllRefreshesRequestBuilder.java new file mode 100644 index 00000000..07bac4c5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopAllRefreshesRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StopAllRefreshes; +import java.lang.Exception; + +public class StopAllRefreshesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public StopAllRefreshesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StopAllRefreshesResponse call() throws Exception { + + RequestlessOperation operation + = new StopAllRefreshes.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopAllRefreshesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StopAllRefreshesResponse.java new file mode 100644 index 00000000..53b1f7b9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopAllRefreshesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.RequestHandlerSlashGetResponses200; +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.Optional; + + +public class StopAllRefreshesResponse 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; + + /** + * OK + */ + private Optional requestHandlerSlashGetResponses200; + + @JsonCreator + public StopAllRefreshesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + } + + public StopAllRefreshesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional requestHandlerSlashGetResponses200() { + return (Optional) requestHandlerSlashGetResponses200; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StopAllRefreshesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopAllRefreshesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopAllRefreshesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public StopAllRefreshesResponse withRequestHandlerSlashGetResponses200(RequestHandlerSlashGetResponses200 requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = Optional.ofNullable(requestHandlerSlashGetResponses200); + return this; + } + + + /** + * OK + */ + public StopAllRefreshesResponse withRequestHandlerSlashGetResponses200(Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopAllRefreshesResponse other = (StopAllRefreshesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.requestHandlerSlashGetResponses200, other.requestHandlerSlashGetResponses200); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + requestHandlerSlashGetResponses200); + } + + @Override + public String toString() { + return Utils.toString(StopAllRefreshesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "requestHandlerSlashGetResponses200", requestHandlerSlashGetResponses200); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional requestHandlerSlashGetResponses200 = 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; + } + + + /** + * OK + */ + public Builder requestHandlerSlashGetResponses200(RequestHandlerSlashGetResponses200 requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = Optional.ofNullable(requestHandlerSlashGetResponses200); + return this; + } + + /** + * OK + */ + public Builder requestHandlerSlashGetResponses200(Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + return this; + } + + public StopAllRefreshesResponse build() { + + return new StopAllRefreshesResponse( + contentType, statusCode, rawResponse, + requestHandlerSlashGetResponses200); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopAllTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StopAllTasksRequestBuilder.java deleted file mode 100644 index 8c5dce40..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StopAllTasksRequestBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.StopAllTasks; -import java.lang.Exception; - -public class StopAllTasksRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public StopAllTasksRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public StopAllTasksResponse call() throws Exception { - - RequestlessOperation operation - = new StopAllTasks.Sync(sdkConfiguration); - - return operation.handleResponse(operation.doRequest()); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopAllTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StopAllTasksResponse.java deleted file mode 100644 index ca057fdc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StopAllTasksResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class StopAllTasksResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public StopAllTasksResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public StopAllTasksResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public StopAllTasksResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopAllTasksResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopAllTasksResponse other = (StopAllTasksResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopAllTasksResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopAllTasksResponse build() { - - return new StopAllTasksResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadRequest.java new file mode 100644 index 00000000..338fe305 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class StopDVRReloadRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the DVR. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dvrId") + private long dvrId; + + @JsonCreator + public StopDVRReloadRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long dvrId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(dvrId, "dvrId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.dvrId = dvrId; + } + + public StopDVRReloadRequest( + long dvrId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), dvrId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the DVR. + */ + @JsonIgnore + public long dvrId() { + return dvrId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StopDVRReloadRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StopDVRReloadRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public StopDVRReloadRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public StopDVRReloadRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public StopDVRReloadRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public StopDVRReloadRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public StopDVRReloadRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public StopDVRReloadRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public StopDVRReloadRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public StopDVRReloadRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public StopDVRReloadRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public StopDVRReloadRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public StopDVRReloadRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public StopDVRReloadRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public StopDVRReloadRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public StopDVRReloadRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public StopDVRReloadRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public StopDVRReloadRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public StopDVRReloadRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public StopDVRReloadRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public StopDVRReloadRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public StopDVRReloadRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the DVR. + */ + public StopDVRReloadRequest withDvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopDVRReloadRequest other = (StopDVRReloadRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.dvrId, other.dvrId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId); + } + + @Override + public String toString() { + return Utils.toString(StopDVRReloadRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "dvrId", dvrId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long dvrId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the DVR. + */ + public Builder dvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + public StopDVRReloadRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new StopDVRReloadRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadRequestBuilder.java new file mode 100644 index 00000000..cac5eecc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StopDVRReload; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class StopDVRReloadRequestBuilder { + + private StopDVRReloadRequest request; + private final SDKConfiguration sdkConfiguration; + + public StopDVRReloadRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StopDVRReloadRequestBuilder request(StopDVRReloadRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public StopDVRReloadResponse call() throws Exception { + + RequestOperation operation + = new StopDVRReload.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadResponse.java new file mode 100644 index 00000000..dcf76316 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopDVRReloadResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class StopDVRReloadResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public StopDVRReloadResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StopDVRReloadResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopDVRReloadResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopDVRReloadResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopDVRReloadResponse other = (StopDVRReloadResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StopDVRReloadResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public StopDVRReloadResponse build() { + + return new StopDVRReloadResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopScanRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/StopScanRequest.java new file mode 100644 index 00000000..f315e835 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopScanRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class StopScanRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the device. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=deviceId") + private long deviceId; + + @JsonCreator + public StopScanRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long deviceId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(deviceId, "deviceId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.deviceId = deviceId; + } + + public StopScanRequest( + long deviceId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), deviceId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the device. + */ + @JsonIgnore + public long deviceId() { + return deviceId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StopScanRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StopScanRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public StopScanRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public StopScanRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public StopScanRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public StopScanRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public StopScanRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public StopScanRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public StopScanRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public StopScanRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public StopScanRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public StopScanRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public StopScanRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public StopScanRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public StopScanRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public StopScanRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public StopScanRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public StopScanRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public StopScanRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public StopScanRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public StopScanRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public StopScanRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the device. + */ + public StopScanRequest withDeviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopScanRequest other = (StopScanRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.deviceId, other.deviceId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId); + } + + @Override + public String toString() { + return Utils.toString(StopScanRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "deviceId", deviceId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long deviceId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the device. + */ + public Builder deviceId(long deviceId) { + Utils.checkNotNull(deviceId, "deviceId"); + this.deviceId = deviceId; + return this; + } + + public StopScanRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new StopScanRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, deviceId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopScanRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StopScanRequestBuilder.java new file mode 100644 index 00000000..00296d74 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopScanRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StopScan; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class StopScanRequestBuilder { + + private StopScanRequest request; + private final SDKConfiguration sdkConfiguration; + + public StopScanRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StopScanRequestBuilder request(StopScanRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public StopScanResponse call() throws Exception { + + RequestOperation operation + = new StopScan.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopScanResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StopScanResponse.java new file mode 100644 index 00000000..7a537eb5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopScanResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +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.Optional; + + +public class StopScanResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + @JsonCreator + public StopScanResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + } + + public StopScanResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StopScanResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopScanResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopScanResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public StopScanResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public StopScanResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopScanResponse other = (StopScanResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + @Override + public String toString() { + return Utils.toString(StopScanResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public StopScanResponse build() { + + return new StopScanResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopTaskRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/StopTaskRequest.java index 696fe9fb..15d45059 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/StopTaskRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopTaskRequest.java @@ -5,32 +5,233 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; 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.Optional; public class StopTaskRequest { /** - * The name of the task to be started. + * Indicates the client accepts the indicated media types */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=taskName") - private PathParamTaskName taskName; + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The task name + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=task") + private Task task; @JsonCreator public StopTaskRequest( - PathParamTaskName taskName) { - Utils.checkNotNull(taskName, "taskName"); - this.taskName = taskName; + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Task task) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(task, "task"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.task = task; + } + + public StopTaskRequest( + Task task) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), task); } /** - * The name of the task to be started. + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client */ @JsonIgnore - public PathParamTaskName taskName() { - return taskName; + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The task name + */ + @JsonIgnore + public Task task() { + return task; } public static Builder builder() { @@ -39,11 +240,220 @@ public class StopTaskRequest { /** - * The name of the task to be started. + * Indicates the client accepts the indicated media types */ - public StopTaskRequest withTaskName(PathParamTaskName taskName) { - Utils.checkNotNull(taskName, "taskName"); - this.taskName = taskName; + public StopTaskRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public StopTaskRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public StopTaskRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public StopTaskRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public StopTaskRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public StopTaskRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public StopTaskRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public StopTaskRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public StopTaskRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public StopTaskRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public StopTaskRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public StopTaskRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public StopTaskRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public StopTaskRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public StopTaskRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public StopTaskRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public StopTaskRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public StopTaskRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public StopTaskRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public StopTaskRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public StopTaskRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public StopTaskRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The task name + */ + public StopTaskRequest withTask(Task task) { + Utils.checkNotNull(task, "task"); + this.task = task; return this; } @@ -57,25 +467,72 @@ public class StopTaskRequest { } StopTaskRequest other = (StopTaskRequest) o; return - Utils.enhancedDeepEquals(this.taskName, other.taskName); + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.task, other.task); } @Override public int hashCode() { return Utils.enhancedHash( - taskName); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, task); } @Override public String toString() { return Utils.toString(StopTaskRequest.class, - "taskName", taskName); + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "task", task); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private PathParamTaskName taskName; + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Task task; private Builder() { // force use of static builder() method @@ -83,19 +540,240 @@ public class StopTaskRequest { /** - * The name of the task to be started. + * Indicates the client accepts the indicated media types */ - public Builder taskName(PathParamTaskName taskName) { - Utils.checkNotNull(taskName, "taskName"); - this.taskName = taskName; + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The task name + */ + public Builder task(Task task) { + Utils.checkNotNull(task, "task"); + this.task = task; return this; } public StopTaskRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } return new StopTaskRequest( - taskName); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, task); } + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopTaskRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StopTaskRequestBuilder.java index 5114e0d6..78f0b297 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/StopTaskRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopTaskRequestBuilder.java @@ -12,32 +12,23 @@ import java.lang.Exception; public class StopTaskRequestBuilder { - private PathParamTaskName taskName; + private StopTaskRequest request; private final SDKConfiguration sdkConfiguration; public StopTaskRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public StopTaskRequestBuilder taskName(PathParamTaskName taskName) { - Utils.checkNotNull(taskName, "taskName"); - this.taskName = taskName; + public StopTaskRequestBuilder request(StopTaskRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private StopTaskRequest buildRequest() { - - StopTaskRequest request = new StopTaskRequest(taskName); - - return request; - } - public StopTaskResponse call() throws Exception { RequestOperation operation = new StopTask.Sync(sdkConfiguration); - StopTaskRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StopTasksRequestBuilder.java new file mode 100644 index 00000000..cb65fd01 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopTasksRequestBuilder.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StopTasks; +import java.lang.Exception; + +public class StopTasksRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public StopTasksRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StopTasksResponse call() throws Exception { + + RequestlessOperation operation + = new StopTasks.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StopTasksResponse.java new file mode 100644 index 00000000..39176bf0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/StopTasksResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class StopTasksResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public StopTasksResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StopTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopTasksResponse other = (StopTasksResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StopTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public StopTasksResponse build() { + + return new StopTasksResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionRequest.java deleted file mode 100644 index 7174ce92..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionRequest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class StopTranscodeSessionRequest { - /** - * the Key of the transcode session to stop - */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sessionKey") - private String sessionKey; - - @JsonCreator - public StopTranscodeSessionRequest( - String sessionKey) { - Utils.checkNotNull(sessionKey, "sessionKey"); - this.sessionKey = sessionKey; - } - - /** - * the Key of the transcode session to stop - */ - @JsonIgnore - public String sessionKey() { - return sessionKey; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the Key of the transcode session to stop - */ - public StopTranscodeSessionRequest withSessionKey(String sessionKey) { - Utils.checkNotNull(sessionKey, "sessionKey"); - this.sessionKey = sessionKey; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTranscodeSessionRequest other = (StopTranscodeSessionRequest) o; - return - Utils.enhancedDeepEquals(this.sessionKey, other.sessionKey); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - sessionKey); - } - - @Override - public String toString() { - return Utils.toString(StopTranscodeSessionRequest.class, - "sessionKey", sessionKey); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String sessionKey; - - private Builder() { - // force use of static builder() method - } - - - /** - * the Key of the transcode session to stop - */ - public Builder sessionKey(String sessionKey) { - Utils.checkNotNull(sessionKey, "sessionKey"); - this.sessionKey = sessionKey; - return this; - } - - public StopTranscodeSessionRequest build() { - - return new StopTranscodeSessionRequest( - sessionKey); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionRequestBuilder.java deleted file mode 100644 index 9c2a80f2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.StopTranscodeSession; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; - -public class StopTranscodeSessionRequestBuilder { - - private String sessionKey; - private final SDKConfiguration sdkConfiguration; - - public StopTranscodeSessionRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public StopTranscodeSessionRequestBuilder sessionKey(String sessionKey) { - Utils.checkNotNull(sessionKey, "sessionKey"); - this.sessionKey = sessionKey; - return this; - } - - - private StopTranscodeSessionRequest buildRequest() { - - StopTranscodeSessionRequest request = new StopTranscodeSessionRequest(sessionKey); - - return request; - } - - public StopTranscodeSessionResponse call() throws Exception { - - RequestOperation operation - = new StopTranscodeSession.Sync(sdkConfiguration); - StopTranscodeSessionRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionResponse.java deleted file mode 100644 index 3fcc6cab..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/StopTranscodeSessionResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class StopTranscodeSessionResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public StopTranscodeSessionResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public StopTranscodeSessionResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public StopTranscodeSessionResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTranscodeSessionResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTranscodeSessionResponse other = (StopTranscodeSessionResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopTranscodeSessionResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopTranscodeSessionResponse build() { - - return new StopTranscodeSessionResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Stream.java b/src/main/java/dev/plexapi/sdk/models/operations/Stream.java deleted file mode 100644 index a5bc45a9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Stream.java +++ /dev/null @@ -1,2990 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Float; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Stream { - /** - * Unique stream identifier. - */ - @JsonProperty("id") - private long id; - - /** - * Stream type: - * - VIDEO = 1 - * - AUDIO = 2 - * - SUBTITLE = 3 - */ - @JsonProperty("streamType") - private long streamType; - - /** - * Format of the stream (e.g., srt). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("format") - private Optional format; - - /** - * Indicates if this stream is default. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("default") - private Optional default_; - - /** - * Codec used by the stream. - */ - @JsonProperty("codec") - private String codec; - - /** - * Index of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("index") - private Optional index; - - /** - * Bitrate of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitrate") - private Optional bitrate; - - /** - * Language of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("language") - private Optional language; - - /** - * Language tag (e.g., en). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("languageTag") - private Optional languageTag; - - /** - * ISO language code. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("languageCode") - private Optional languageCode; - - /** - * Indicates whether header compression is enabled. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("headerCompression") - private Optional headerCompression; - - /** - * Dolby Vision BL compatibility ID. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIBLCompatID") - private Optional doviblCompatID; - - /** - * Indicates if Dolby Vision BL is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIBLPresent") - private Optional doviblPresent; - - /** - * Indicates if Dolby Vision EL is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIELPresent") - private Optional dovielPresent; - - /** - * Dolby Vision level. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVILevel") - private Optional doviLevel; - - /** - * Indicates if Dolby Vision is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIPresent") - private Optional doviPresent; - - /** - * Dolby Vision profile. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIProfile") - private Optional doviProfile; - - /** - * Indicates if Dolby Vision RPU is present. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIRPUPresent") - private Optional dovirpuPresent; - - /** - * Dolby Vision version. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("DOVIVersion") - private Optional doviVersion; - - /** - * Bit depth of the video stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitDepth") - private Optional bitDepth; - - /** - * Chroma sample location. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaLocation") - private Optional chromaLocation; - - /** - * Chroma subsampling format. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaSubsampling") - private Optional chromaSubsampling; - - /** - * Coded video height. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedHeight") - private Optional codedHeight; - - /** - * Coded video width. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedWidth") - private Optional codedWidth; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("closedCaptions") - private Optional closedCaptions; - - /** - * Color primaries used. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorPrimaries") - private Optional colorPrimaries; - - /** - * Color range (e.g., tv). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorRange") - private Optional colorRange; - - /** - * Color space. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorSpace") - private Optional colorSpace; - - /** - * Color transfer characteristics. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("colorTrc") - private Optional colorTrc; - - /** - * Frame rate of the stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("frameRate") - private Optional frameRate; - - /** - * Key to access this stream part. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - /** - * Height of the video stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("height") - private Optional height; - - /** - * Video level. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("level") - private Optional level; - - /** - * Indicates if this is the original stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("original") - private Optional original; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasScalingMatrix") - private Optional hasScalingMatrix; - - /** - * Video profile. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("profile") - private Optional profile; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("scanType") - private Optional scanType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("embeddedInVideo") - private Optional embeddedInVideo; - - /** - * Number of reference frames. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("refFrames") - private Optional refFrames; - - /** - * Width of the video stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("width") - private Optional width; - - /** - * Display title for the stream. - */ - @JsonProperty("displayTitle") - private String displayTitle; - - /** - * Extended display title for the stream. - */ - @JsonProperty("extendedDisplayTitle") - private String extendedDisplayTitle; - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("selected") - private Optional selected; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("forced") - private Optional forced; - - /** - * Number of audio channels (for audio streams). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("channels") - private Optional channels; - - /** - * Audio channel layout. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannelLayout") - private Optional audioChannelLayout; - - /** - * Sampling rate for the audio stream. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("samplingRate") - private Optional samplingRate; - - /** - * Indicates if the stream can auto-sync. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("canAutoSync") - private Optional canAutoSync; - - /** - * Indicates if the stream is for the hearing impaired. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hearingImpaired") - private Optional hearingImpaired; - - /** - * Indicates if the stream is a dub. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("dub") - private Optional dub; - - /** - * Optional title for the stream (e.g., language variant). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - @JsonCreator - public Stream( - @JsonProperty("id") long id, - @JsonProperty("format") Optional format, - @JsonProperty("default") Optional default_, - @JsonProperty("codec") String codec, - @JsonProperty("index") Optional index, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("language") Optional language, - @JsonProperty("languageTag") Optional languageTag, - @JsonProperty("languageCode") Optional languageCode, - @JsonProperty("headerCompression") Optional headerCompression, - @JsonProperty("DOVIBLCompatID") Optional doviblCompatID, - @JsonProperty("DOVIBLPresent") Optional doviblPresent, - @JsonProperty("DOVIELPresent") Optional dovielPresent, - @JsonProperty("DOVILevel") Optional doviLevel, - @JsonProperty("DOVIPresent") Optional doviPresent, - @JsonProperty("DOVIProfile") Optional doviProfile, - @JsonProperty("DOVIRPUPresent") Optional dovirpuPresent, - @JsonProperty("DOVIVersion") Optional doviVersion, - @JsonProperty("bitDepth") Optional bitDepth, - @JsonProperty("chromaLocation") Optional chromaLocation, - @JsonProperty("chromaSubsampling") Optional chromaSubsampling, - @JsonProperty("codedHeight") Optional codedHeight, - @JsonProperty("codedWidth") Optional codedWidth, - @JsonProperty("closedCaptions") Optional closedCaptions, - @JsonProperty("colorPrimaries") Optional colorPrimaries, - @JsonProperty("colorRange") Optional colorRange, - @JsonProperty("colorSpace") Optional colorSpace, - @JsonProperty("colorTrc") Optional colorTrc, - @JsonProperty("frameRate") Optional frameRate, - @JsonProperty("key") Optional key, - @JsonProperty("height") Optional height, - @JsonProperty("level") Optional level, - @JsonProperty("original") Optional original, - @JsonProperty("hasScalingMatrix") Optional hasScalingMatrix, - @JsonProperty("profile") Optional profile, - @JsonProperty("scanType") Optional scanType, - @JsonProperty("embeddedInVideo") Optional embeddedInVideo, - @JsonProperty("refFrames") Optional refFrames, - @JsonProperty("width") Optional width, - @JsonProperty("displayTitle") String displayTitle, - @JsonProperty("extendedDisplayTitle") String extendedDisplayTitle, - @JsonProperty("selected") Optional selected, - @JsonProperty("forced") Optional forced, - @JsonProperty("channels") Optional channels, - @JsonProperty("audioChannelLayout") Optional audioChannelLayout, - @JsonProperty("samplingRate") Optional samplingRate, - @JsonProperty("canAutoSync") Optional canAutoSync, - @JsonProperty("hearingImpaired") Optional hearingImpaired, - @JsonProperty("dub") Optional dub, - @JsonProperty("title") Optional title) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(format, "format"); - Utils.checkNotNull(default_, "default_"); - Utils.checkNotNull(codec, "codec"); - Utils.checkNotNull(index, "index"); - Utils.checkNotNull(bitrate, "bitrate"); - Utils.checkNotNull(language, "language"); - Utils.checkNotNull(languageTag, "languageTag"); - Utils.checkNotNull(languageCode, "languageCode"); - Utils.checkNotNull(headerCompression, "headerCompression"); - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - Utils.checkNotNull(doviblPresent, "doviblPresent"); - Utils.checkNotNull(dovielPresent, "dovielPresent"); - Utils.checkNotNull(doviLevel, "doviLevel"); - Utils.checkNotNull(doviPresent, "doviPresent"); - Utils.checkNotNull(doviProfile, "doviProfile"); - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - Utils.checkNotNull(doviVersion, "doviVersion"); - Utils.checkNotNull(bitDepth, "bitDepth"); - Utils.checkNotNull(chromaLocation, "chromaLocation"); - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - Utils.checkNotNull(codedHeight, "codedHeight"); - Utils.checkNotNull(codedWidth, "codedWidth"); - Utils.checkNotNull(closedCaptions, "closedCaptions"); - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - Utils.checkNotNull(colorRange, "colorRange"); - Utils.checkNotNull(colorSpace, "colorSpace"); - Utils.checkNotNull(colorTrc, "colorTrc"); - Utils.checkNotNull(frameRate, "frameRate"); - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(height, "height"); - Utils.checkNotNull(level, "level"); - Utils.checkNotNull(original, "original"); - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - Utils.checkNotNull(profile, "profile"); - Utils.checkNotNull(scanType, "scanType"); - Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); - Utils.checkNotNull(refFrames, "refFrames"); - Utils.checkNotNull(width, "width"); - Utils.checkNotNull(displayTitle, "displayTitle"); - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - Utils.checkNotNull(selected, "selected"); - Utils.checkNotNull(forced, "forced"); - Utils.checkNotNull(channels, "channels"); - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - Utils.checkNotNull(samplingRate, "samplingRate"); - Utils.checkNotNull(canAutoSync, "canAutoSync"); - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - Utils.checkNotNull(dub, "dub"); - Utils.checkNotNull(title, "title"); - this.id = id; - this.streamType = Builder._SINGLETON_VALUE_StreamType.value(); - this.format = format; - this.default_ = default_; - this.codec = codec; - this.index = index; - this.bitrate = bitrate; - this.language = language; - this.languageTag = languageTag; - this.languageCode = languageCode; - this.headerCompression = headerCompression; - this.doviblCompatID = doviblCompatID; - this.doviblPresent = doviblPresent; - this.dovielPresent = dovielPresent; - this.doviLevel = doviLevel; - this.doviPresent = doviPresent; - this.doviProfile = doviProfile; - this.dovirpuPresent = dovirpuPresent; - this.doviVersion = doviVersion; - this.bitDepth = bitDepth; - this.chromaLocation = chromaLocation; - this.chromaSubsampling = chromaSubsampling; - this.codedHeight = codedHeight; - this.codedWidth = codedWidth; - this.closedCaptions = closedCaptions; - this.colorPrimaries = colorPrimaries; - this.colorRange = colorRange; - this.colorSpace = colorSpace; - this.colorTrc = colorTrc; - this.frameRate = frameRate; - this.key = key; - this.height = height; - this.level = level; - this.original = original; - this.hasScalingMatrix = hasScalingMatrix; - this.profile = profile; - this.scanType = scanType; - this.embeddedInVideo = embeddedInVideo; - this.refFrames = refFrames; - this.width = width; - this.displayTitle = displayTitle; - this.extendedDisplayTitle = extendedDisplayTitle; - this.selected = selected; - this.forced = forced; - this.channels = channels; - this.audioChannelLayout = audioChannelLayout; - this.samplingRate = samplingRate; - this.canAutoSync = canAutoSync; - this.hearingImpaired = hearingImpaired; - this.dub = dub; - this.title = title; - } - - public Stream( - long id, - String codec, - String displayTitle, - String extendedDisplayTitle) { - this(id, Optional.empty(), Optional.empty(), - codec, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - displayTitle, extendedDisplayTitle, Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - /** - * Unique stream identifier. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * Stream type: - * - VIDEO = 1 - * - AUDIO = 2 - * - SUBTITLE = 3 - */ - @JsonIgnore - public long streamType() { - return streamType; - } - - /** - * Format of the stream (e.g., srt). - */ - @JsonIgnore - public Optional format() { - return format; - } - - /** - * Indicates if this stream is default. - */ - @JsonIgnore - public Optional default_() { - return default_; - } - - /** - * Codec used by the stream. - */ - @JsonIgnore - public String codec() { - return codec; - } - - /** - * Index of the stream. - */ - @JsonIgnore - public Optional index() { - return index; - } - - /** - * Bitrate of the stream. - */ - @JsonIgnore - public Optional bitrate() { - return bitrate; - } - - /** - * Language of the stream. - */ - @JsonIgnore - public Optional language() { - return language; - } - - /** - * Language tag (e.g., en). - */ - @JsonIgnore - public Optional languageTag() { - return languageTag; - } - - /** - * ISO language code. - */ - @JsonIgnore - public Optional languageCode() { - return languageCode; - } - - /** - * Indicates whether header compression is enabled. - */ - @JsonIgnore - public Optional headerCompression() { - return headerCompression; - } - - /** - * Dolby Vision BL compatibility ID. - */ - @JsonIgnore - public Optional doviblCompatID() { - return doviblCompatID; - } - - /** - * Indicates if Dolby Vision BL is present. - */ - @JsonIgnore - public Optional doviblPresent() { - return doviblPresent; - } - - /** - * Indicates if Dolby Vision EL is present. - */ - @JsonIgnore - public Optional dovielPresent() { - return dovielPresent; - } - - /** - * Dolby Vision level. - */ - @JsonIgnore - public Optional doviLevel() { - return doviLevel; - } - - /** - * Indicates if Dolby Vision is present. - */ - @JsonIgnore - public Optional doviPresent() { - return doviPresent; - } - - /** - * Dolby Vision profile. - */ - @JsonIgnore - public Optional doviProfile() { - return doviProfile; - } - - /** - * Indicates if Dolby Vision RPU is present. - */ - @JsonIgnore - public Optional dovirpuPresent() { - return dovirpuPresent; - } - - /** - * Dolby Vision version. - */ - @JsonIgnore - public Optional doviVersion() { - return doviVersion; - } - - /** - * Bit depth of the video stream. - */ - @JsonIgnore - public Optional bitDepth() { - return bitDepth; - } - - /** - * Chroma sample location. - */ - @JsonIgnore - public Optional chromaLocation() { - return chromaLocation; - } - - /** - * Chroma subsampling format. - */ - @JsonIgnore - public Optional chromaSubsampling() { - return chromaSubsampling; - } - - /** - * Coded video height. - */ - @JsonIgnore - public Optional codedHeight() { - return codedHeight; - } - - /** - * Coded video width. - */ - @JsonIgnore - public Optional codedWidth() { - return codedWidth; - } - - @JsonIgnore - public Optional closedCaptions() { - return closedCaptions; - } - - /** - * Color primaries used. - */ - @JsonIgnore - public Optional colorPrimaries() { - return colorPrimaries; - } - - /** - * Color range (e.g., tv). - */ - @JsonIgnore - public Optional colorRange() { - return colorRange; - } - - /** - * Color space. - */ - @JsonIgnore - public Optional colorSpace() { - return colorSpace; - } - - /** - * Color transfer characteristics. - */ - @JsonIgnore - public Optional colorTrc() { - return colorTrc; - } - - /** - * Frame rate of the stream. - */ - @JsonIgnore - public Optional frameRate() { - return frameRate; - } - - /** - * Key to access this stream part. - */ - @JsonIgnore - public Optional key() { - return key; - } - - /** - * Height of the video stream. - */ - @JsonIgnore - public Optional height() { - return height; - } - - /** - * Video level. - */ - @JsonIgnore - public Optional level() { - return level; - } - - /** - * Indicates if this is the original stream. - */ - @JsonIgnore - public Optional original() { - return original; - } - - @JsonIgnore - public Optional hasScalingMatrix() { - return hasScalingMatrix; - } - - /** - * Video profile. - */ - @JsonIgnore - public Optional profile() { - return profile; - } - - @JsonIgnore - public Optional scanType() { - return scanType; - } - - @JsonIgnore - public Optional embeddedInVideo() { - return embeddedInVideo; - } - - /** - * Number of reference frames. - */ - @JsonIgnore - public Optional refFrames() { - return refFrames; - } - - /** - * Width of the video stream. - */ - @JsonIgnore - public Optional width() { - return width; - } - - /** - * Display title for the stream. - */ - @JsonIgnore - public String displayTitle() { - return displayTitle; - } - - /** - * Extended display title for the stream. - */ - @JsonIgnore - public String extendedDisplayTitle() { - return extendedDisplayTitle; - } - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - @JsonIgnore - public Optional selected() { - return selected; - } - - @JsonIgnore - public Optional forced() { - return forced; - } - - /** - * Number of audio channels (for audio streams). - */ - @JsonIgnore - public Optional channels() { - return channels; - } - - /** - * Audio channel layout. - */ - @JsonIgnore - public Optional audioChannelLayout() { - return audioChannelLayout; - } - - /** - * Sampling rate for the audio stream. - */ - @JsonIgnore - public Optional samplingRate() { - return samplingRate; - } - - /** - * Indicates if the stream can auto-sync. - */ - @JsonIgnore - public Optional canAutoSync() { - return canAutoSync; - } - - /** - * Indicates if the stream is for the hearing impaired. - */ - @JsonIgnore - public Optional hearingImpaired() { - return hearingImpaired; - } - - /** - * Indicates if the stream is a dub. - */ - @JsonIgnore - public Optional dub() { - return dub; - } - - /** - * Optional title for the stream (e.g., language variant). - */ - @JsonIgnore - public Optional title() { - return title; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique stream identifier. - */ - public Stream withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Format of the stream (e.g., srt). - */ - public Stream withFormat(String format) { - Utils.checkNotNull(format, "format"); - this.format = Optional.ofNullable(format); - return this; - } - - - /** - * Format of the stream (e.g., srt). - */ - public Stream withFormat(Optional format) { - Utils.checkNotNull(format, "format"); - this.format = format; - return this; - } - - /** - * Indicates if this stream is default. - */ - public Stream withDefault(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - - /** - * Indicates if this stream is default. - */ - public Stream withDefault(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - /** - * Codec used by the stream. - */ - public Stream withCodec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - /** - * Index of the stream. - */ - public Stream withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - - /** - * Index of the stream. - */ - public Stream withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - /** - * Bitrate of the stream. - */ - public Stream withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - - /** - * Bitrate of the stream. - */ - public Stream withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - /** - * Language of the stream. - */ - public Stream withLanguage(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - - /** - * Language of the stream. - */ - public Stream withLanguage(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - /** - * Language tag (e.g., en). - */ - public Stream withLanguageTag(String languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = Optional.ofNullable(languageTag); - return this; - } - - - /** - * Language tag (e.g., en). - */ - public Stream withLanguageTag(Optional languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = languageTag; - return this; - } - - /** - * ISO language code. - */ - public Stream withLanguageCode(String languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = Optional.ofNullable(languageCode); - return this; - } - - - /** - * ISO language code. - */ - public Stream withLanguageCode(Optional languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = languageCode; - return this; - } - - /** - * Indicates whether header compression is enabled. - */ - public Stream withHeaderCompression(boolean headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = Optional.ofNullable(headerCompression); - return this; - } - - - /** - * Indicates whether header compression is enabled. - */ - public Stream withHeaderCompression(Optional headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = headerCompression; - return this; - } - - /** - * Dolby Vision BL compatibility ID. - */ - public Stream withDOVIBLCompatID(int doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = Optional.ofNullable(doviblCompatID); - return this; - } - - - /** - * Dolby Vision BL compatibility ID. - */ - public Stream withDOVIBLCompatID(Optional doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = doviblCompatID; - return this; - } - - /** - * Indicates if Dolby Vision BL is present. - */ - public Stream withDOVIBLPresent(boolean doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = Optional.ofNullable(doviblPresent); - return this; - } - - - /** - * Indicates if Dolby Vision BL is present. - */ - public Stream withDOVIBLPresent(Optional doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = doviblPresent; - return this; - } - - /** - * Indicates if Dolby Vision EL is present. - */ - public Stream withDOVIELPresent(boolean dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = Optional.ofNullable(dovielPresent); - return this; - } - - - /** - * Indicates if Dolby Vision EL is present. - */ - public Stream withDOVIELPresent(Optional dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = dovielPresent; - return this; - } - - /** - * Dolby Vision level. - */ - public Stream withDOVILevel(int doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = Optional.ofNullable(doviLevel); - return this; - } - - - /** - * Dolby Vision level. - */ - public Stream withDOVILevel(Optional doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = doviLevel; - return this; - } - - /** - * Indicates if Dolby Vision is present. - */ - public Stream withDOVIPresent(boolean doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = Optional.ofNullable(doviPresent); - return this; - } - - - /** - * Indicates if Dolby Vision is present. - */ - public Stream withDOVIPresent(Optional doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = doviPresent; - return this; - } - - /** - * Dolby Vision profile. - */ - public Stream withDOVIProfile(int doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = Optional.ofNullable(doviProfile); - return this; - } - - - /** - * Dolby Vision profile. - */ - public Stream withDOVIProfile(Optional doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = doviProfile; - return this; - } - - /** - * Indicates if Dolby Vision RPU is present. - */ - public Stream withDOVIRPUPresent(boolean dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = Optional.ofNullable(dovirpuPresent); - return this; - } - - - /** - * Indicates if Dolby Vision RPU is present. - */ - public Stream withDOVIRPUPresent(Optional dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = dovirpuPresent; - return this; - } - - /** - * Dolby Vision version. - */ - public Stream withDOVIVersion(String doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = Optional.ofNullable(doviVersion); - return this; - } - - - /** - * Dolby Vision version. - */ - public Stream withDOVIVersion(Optional doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = doviVersion; - return this; - } - - /** - * Bit depth of the video stream. - */ - public Stream withBitDepth(int bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - - /** - * Bit depth of the video stream. - */ - public Stream withBitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - /** - * Chroma sample location. - */ - public Stream withChromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - - /** - * Chroma sample location. - */ - public Stream withChromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - /** - * Chroma subsampling format. - */ - public Stream withChromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - - /** - * Chroma subsampling format. - */ - public Stream withChromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - /** - * Coded video height. - */ - public Stream withCodedHeight(int codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - - /** - * Coded video height. - */ - public Stream withCodedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - /** - * Coded video width. - */ - public Stream withCodedWidth(int codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - - /** - * Coded video width. - */ - public Stream withCodedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - 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; - } - - /** - * Color primaries used. - */ - public Stream withColorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - - /** - * Color primaries used. - */ - public Stream withColorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - /** - * Color range (e.g., tv). - */ - public Stream withColorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - - /** - * Color range (e.g., tv). - */ - public Stream withColorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - /** - * Color space. - */ - public Stream withColorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - - /** - * Color space. - */ - public Stream withColorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - /** - * Color transfer characteristics. - */ - public Stream withColorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - - /** - * Color transfer characteristics. - */ - public Stream withColorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - /** - * Frame rate of the stream. - */ - public Stream withFrameRate(float frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - - /** - * Frame rate of the stream. - */ - public Stream withFrameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - /** - * Key to access this stream part. - */ - public Stream withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - /** - * Key to access this stream part. - */ - public Stream withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * Height of the video stream. - */ - public Stream withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - - /** - * Height of the video stream. - */ - public Stream withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - /** - * Video level. - */ - public Stream withLevel(int level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - - /** - * Video level. - */ - public Stream withLevel(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - /** - * Indicates if this is the original stream. - */ - public Stream withOriginal(boolean original) { - Utils.checkNotNull(original, "original"); - this.original = Optional.ofNullable(original); - return this; - } - - - /** - * Indicates if this is the original stream. - */ - public Stream withOriginal(Optional original) { - Utils.checkNotNull(original, "original"); - this.original = original; - 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; - } - - /** - * Video profile. - */ - public Stream withProfile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - - /** - * Video profile. - */ - public Stream withProfile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - 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 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; - } - - /** - * Number of reference frames. - */ - public Stream withRefFrames(int 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; - } - - /** - * Width of the video stream. - */ - public Stream withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - - /** - * Width of the video stream. - */ - public Stream withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - /** - * Display title for the stream. - */ - public Stream withDisplayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - /** - * Extended display title for the stream. - */ - public Stream withExtendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public Stream withSelected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public Stream withSelected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - public Stream withForced(boolean forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = Optional.ofNullable(forced); - return this; - } - - - public Stream withForced(Optional forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = forced; - return this; - } - - /** - * Number of audio channels (for audio streams). - */ - public Stream withChannels(int channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = Optional.ofNullable(channels); - return this; - } - - - /** - * Number of audio channels (for audio streams). - */ - public Stream withChannels(Optional channels) { - Utils.checkNotNull(channels, "channels"); - this.channels = channels; - return this; - } - - /** - * Audio channel layout. - */ - public Stream withAudioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - - /** - * Audio channel layout. - */ - public Stream withAudioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - /** - * Sampling rate for the audio stream. - */ - public Stream withSamplingRate(int samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - - /** - * Sampling rate for the audio stream. - */ - public Stream withSamplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - /** - * Indicates if the stream can auto-sync. - */ - public Stream withCanAutoSync(boolean canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = Optional.ofNullable(canAutoSync); - return this; - } - - - /** - * Indicates if the stream can auto-sync. - */ - public Stream withCanAutoSync(Optional canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = canAutoSync; - return this; - } - - /** - * Indicates if the stream is for the hearing impaired. - */ - public Stream withHearingImpaired(boolean hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = Optional.ofNullable(hearingImpaired); - return this; - } - - - /** - * Indicates if the stream is for the hearing impaired. - */ - public Stream withHearingImpaired(Optional hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = hearingImpaired; - return this; - } - - /** - * Indicates if the stream is a dub. - */ - public Stream withDub(boolean dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = Optional.ofNullable(dub); - return this; - } - - - /** - * Indicates if the stream is a dub. - */ - public Stream withDub(Optional dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = dub; - return this; - } - - /** - * Optional title for the stream (e.g., language variant). - */ - public Stream withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - /** - * Optional title for the stream (e.g., language variant). - */ - public Stream 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; - } - Stream other = (Stream) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.streamType, other.streamType) && - Utils.enhancedDeepEquals(this.format, other.format) && - Utils.enhancedDeepEquals(this.default_, other.default_) && - Utils.enhancedDeepEquals(this.codec, other.codec) && - Utils.enhancedDeepEquals(this.index, other.index) && - Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && - Utils.enhancedDeepEquals(this.language, other.language) && - Utils.enhancedDeepEquals(this.languageTag, other.languageTag) && - Utils.enhancedDeepEquals(this.languageCode, other.languageCode) && - Utils.enhancedDeepEquals(this.headerCompression, other.headerCompression) && - Utils.enhancedDeepEquals(this.doviblCompatID, other.doviblCompatID) && - Utils.enhancedDeepEquals(this.doviblPresent, other.doviblPresent) && - Utils.enhancedDeepEquals(this.dovielPresent, other.dovielPresent) && - Utils.enhancedDeepEquals(this.doviLevel, other.doviLevel) && - Utils.enhancedDeepEquals(this.doviPresent, other.doviPresent) && - Utils.enhancedDeepEquals(this.doviProfile, other.doviProfile) && - Utils.enhancedDeepEquals(this.dovirpuPresent, other.dovirpuPresent) && - Utils.enhancedDeepEquals(this.doviVersion, other.doviVersion) && - Utils.enhancedDeepEquals(this.bitDepth, other.bitDepth) && - Utils.enhancedDeepEquals(this.chromaLocation, other.chromaLocation) && - Utils.enhancedDeepEquals(this.chromaSubsampling, other.chromaSubsampling) && - Utils.enhancedDeepEquals(this.codedHeight, other.codedHeight) && - Utils.enhancedDeepEquals(this.codedWidth, other.codedWidth) && - Utils.enhancedDeepEquals(this.closedCaptions, other.closedCaptions) && - Utils.enhancedDeepEquals(this.colorPrimaries, other.colorPrimaries) && - Utils.enhancedDeepEquals(this.colorRange, other.colorRange) && - Utils.enhancedDeepEquals(this.colorSpace, other.colorSpace) && - Utils.enhancedDeepEquals(this.colorTrc, other.colorTrc) && - Utils.enhancedDeepEquals(this.frameRate, other.frameRate) && - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.height, other.height) && - Utils.enhancedDeepEquals(this.level, other.level) && - Utils.enhancedDeepEquals(this.original, other.original) && - Utils.enhancedDeepEquals(this.hasScalingMatrix, other.hasScalingMatrix) && - Utils.enhancedDeepEquals(this.profile, other.profile) && - Utils.enhancedDeepEquals(this.scanType, other.scanType) && - Utils.enhancedDeepEquals(this.embeddedInVideo, other.embeddedInVideo) && - Utils.enhancedDeepEquals(this.refFrames, other.refFrames) && - Utils.enhancedDeepEquals(this.width, other.width) && - Utils.enhancedDeepEquals(this.displayTitle, other.displayTitle) && - Utils.enhancedDeepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) && - Utils.enhancedDeepEquals(this.selected, other.selected) && - Utils.enhancedDeepEquals(this.forced, other.forced) && - Utils.enhancedDeepEquals(this.channels, other.channels) && - Utils.enhancedDeepEquals(this.audioChannelLayout, other.audioChannelLayout) && - Utils.enhancedDeepEquals(this.samplingRate, other.samplingRate) && - Utils.enhancedDeepEquals(this.canAutoSync, other.canAutoSync) && - Utils.enhancedDeepEquals(this.hearingImpaired, other.hearingImpaired) && - Utils.enhancedDeepEquals(this.dub, other.dub) && - Utils.enhancedDeepEquals(this.title, other.title); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, streamType, format, - default_, codec, index, - bitrate, language, languageTag, - languageCode, headerCompression, doviblCompatID, - doviblPresent, dovielPresent, doviLevel, - doviPresent, doviProfile, dovirpuPresent, - doviVersion, bitDepth, chromaLocation, - chromaSubsampling, codedHeight, codedWidth, - closedCaptions, colorPrimaries, colorRange, - colorSpace, colorTrc, frameRate, - key, height, level, - original, hasScalingMatrix, profile, - scanType, embeddedInVideo, refFrames, - width, displayTitle, extendedDisplayTitle, - selected, forced, channels, - audioChannelLayout, samplingRate, canAutoSync, - hearingImpaired, dub, title); - } - - @Override - public String toString() { - return Utils.toString(Stream.class, - "id", id, - "streamType", streamType, - "format", format, - "default_", default_, - "codec", codec, - "index", index, - "bitrate", bitrate, - "language", language, - "languageTag", languageTag, - "languageCode", languageCode, - "headerCompression", headerCompression, - "doviblCompatID", doviblCompatID, - "doviblPresent", doviblPresent, - "dovielPresent", dovielPresent, - "doviLevel", doviLevel, - "doviPresent", doviPresent, - "doviProfile", doviProfile, - "dovirpuPresent", dovirpuPresent, - "doviVersion", doviVersion, - "bitDepth", bitDepth, - "chromaLocation", chromaLocation, - "chromaSubsampling", chromaSubsampling, - "codedHeight", codedHeight, - "codedWidth", codedWidth, - "closedCaptions", closedCaptions, - "colorPrimaries", colorPrimaries, - "colorRange", colorRange, - "colorSpace", colorSpace, - "colorTrc", colorTrc, - "frameRate", frameRate, - "key", key, - "height", height, - "level", level, - "original", original, - "hasScalingMatrix", hasScalingMatrix, - "profile", profile, - "scanType", scanType, - "embeddedInVideo", embeddedInVideo, - "refFrames", refFrames, - "width", width, - "displayTitle", displayTitle, - "extendedDisplayTitle", extendedDisplayTitle, - "selected", selected, - "forced", forced, - "channels", channels, - "audioChannelLayout", audioChannelLayout, - "samplingRate", samplingRate, - "canAutoSync", canAutoSync, - "hearingImpaired", hearingImpaired, - "dub", dub, - "title", title); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private Optional format = Optional.empty(); - - private Optional default_ = Optional.empty(); - - private String codec; - - private Optional index = Optional.empty(); - - private Optional bitrate = Optional.empty(); - - private Optional language = Optional.empty(); - - private Optional languageTag = Optional.empty(); - - private Optional languageCode = Optional.empty(); - - private Optional headerCompression = Optional.empty(); - - private Optional doviblCompatID = Optional.empty(); - - private Optional doviblPresent = Optional.empty(); - - private Optional dovielPresent = Optional.empty(); - - private Optional doviLevel = Optional.empty(); - - private Optional doviPresent = Optional.empty(); - - private Optional doviProfile = Optional.empty(); - - private Optional dovirpuPresent = Optional.empty(); - - private Optional doviVersion = 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 closedCaptions = 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 key = Optional.empty(); - - private Optional height = Optional.empty(); - - private Optional level = Optional.empty(); - - private Optional original = Optional.empty(); - - private Optional hasScalingMatrix = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional scanType = Optional.empty(); - - private Optional embeddedInVideo = Optional.empty(); - - private Optional refFrames = Optional.empty(); - - private Optional width = Optional.empty(); - - private String displayTitle; - - private String extendedDisplayTitle; - - private Optional selected = Optional.empty(); - - private Optional forced = Optional.empty(); - - private Optional channels = Optional.empty(); - - private Optional audioChannelLayout = Optional.empty(); - - private Optional samplingRate = Optional.empty(); - - private Optional canAutoSync = Optional.empty(); - - private Optional hearingImpaired = Optional.empty(); - - private Optional dub = Optional.empty(); - - private Optional title = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique stream identifier. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Format of the stream (e.g., srt). - */ - public Builder format(String format) { - Utils.checkNotNull(format, "format"); - this.format = Optional.ofNullable(format); - return this; - } - - /** - * Format of the stream (e.g., srt). - */ - public Builder format(Optional format) { - Utils.checkNotNull(format, "format"); - this.format = format; - return this; - } - - - /** - * Indicates if this stream is default. - */ - public Builder default_(boolean default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = Optional.ofNullable(default_); - return this; - } - - /** - * Indicates if this stream is default. - */ - public Builder default_(Optional default_) { - Utils.checkNotNull(default_, "default_"); - this.default_ = default_; - return this; - } - - - /** - * Codec used by the stream. - */ - public Builder codec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - - /** - * Index of the stream. - */ - public Builder index(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - /** - * Index of the stream. - */ - public Builder index(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - - /** - * Bitrate of the stream. - */ - public Builder bitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - /** - * Bitrate of the stream. - */ - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - - /** - * Language of the stream. - */ - public Builder language(String language) { - Utils.checkNotNull(language, "language"); - this.language = Optional.ofNullable(language); - return this; - } - - /** - * Language of the stream. - */ - public Builder language(Optional language) { - Utils.checkNotNull(language, "language"); - this.language = language; - return this; - } - - - /** - * Language tag (e.g., en). - */ - public Builder languageTag(String languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = Optional.ofNullable(languageTag); - return this; - } - - /** - * Language tag (e.g., en). - */ - public Builder languageTag(Optional languageTag) { - Utils.checkNotNull(languageTag, "languageTag"); - this.languageTag = languageTag; - return this; - } - - - /** - * ISO language code. - */ - public Builder languageCode(String languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = Optional.ofNullable(languageCode); - return this; - } - - /** - * ISO language code. - */ - public Builder languageCode(Optional languageCode) { - Utils.checkNotNull(languageCode, "languageCode"); - this.languageCode = languageCode; - return this; - } - - - /** - * Indicates whether header compression is enabled. - */ - public Builder headerCompression(boolean headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = Optional.ofNullable(headerCompression); - return this; - } - - /** - * Indicates whether header compression is enabled. - */ - public Builder headerCompression(Optional headerCompression) { - Utils.checkNotNull(headerCompression, "headerCompression"); - this.headerCompression = headerCompression; - return this; - } - - - /** - * Dolby Vision BL compatibility ID. - */ - public Builder doviblCompatID(int doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = Optional.ofNullable(doviblCompatID); - return this; - } - - /** - * Dolby Vision BL compatibility ID. - */ - public Builder doviblCompatID(Optional doviblCompatID) { - Utils.checkNotNull(doviblCompatID, "doviblCompatID"); - this.doviblCompatID = doviblCompatID; - return this; - } - - - /** - * Indicates if Dolby Vision BL is present. - */ - public Builder doviblPresent(boolean doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = Optional.ofNullable(doviblPresent); - return this; - } - - /** - * Indicates if Dolby Vision BL is present. - */ - public Builder doviblPresent(Optional doviblPresent) { - Utils.checkNotNull(doviblPresent, "doviblPresent"); - this.doviblPresent = doviblPresent; - return this; - } - - - /** - * Indicates if Dolby Vision EL is present. - */ - public Builder dovielPresent(boolean dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = Optional.ofNullable(dovielPresent); - return this; - } - - /** - * Indicates if Dolby Vision EL is present. - */ - public Builder dovielPresent(Optional dovielPresent) { - Utils.checkNotNull(dovielPresent, "dovielPresent"); - this.dovielPresent = dovielPresent; - return this; - } - - - /** - * Dolby Vision level. - */ - public Builder doviLevel(int doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = Optional.ofNullable(doviLevel); - return this; - } - - /** - * Dolby Vision level. - */ - public Builder doviLevel(Optional doviLevel) { - Utils.checkNotNull(doviLevel, "doviLevel"); - this.doviLevel = doviLevel; - return this; - } - - - /** - * Indicates if Dolby Vision is present. - */ - public Builder doviPresent(boolean doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = Optional.ofNullable(doviPresent); - return this; - } - - /** - * Indicates if Dolby Vision is present. - */ - public Builder doviPresent(Optional doviPresent) { - Utils.checkNotNull(doviPresent, "doviPresent"); - this.doviPresent = doviPresent; - return this; - } - - - /** - * Dolby Vision profile. - */ - public Builder doviProfile(int doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = Optional.ofNullable(doviProfile); - return this; - } - - /** - * Dolby Vision profile. - */ - public Builder doviProfile(Optional doviProfile) { - Utils.checkNotNull(doviProfile, "doviProfile"); - this.doviProfile = doviProfile; - return this; - } - - - /** - * Indicates if Dolby Vision RPU is present. - */ - public Builder dovirpuPresent(boolean dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = Optional.ofNullable(dovirpuPresent); - return this; - } - - /** - * Indicates if Dolby Vision RPU is present. - */ - public Builder dovirpuPresent(Optional dovirpuPresent) { - Utils.checkNotNull(dovirpuPresent, "dovirpuPresent"); - this.dovirpuPresent = dovirpuPresent; - return this; - } - - - /** - * Dolby Vision version. - */ - public Builder doviVersion(String doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = Optional.ofNullable(doviVersion); - return this; - } - - /** - * Dolby Vision version. - */ - public Builder doviVersion(Optional doviVersion) { - Utils.checkNotNull(doviVersion, "doviVersion"); - this.doviVersion = doviVersion; - return this; - } - - - /** - * Bit depth of the video stream. - */ - public Builder bitDepth(int bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - /** - * Bit depth of the video stream. - */ - public Builder bitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - - /** - * Chroma sample location. - */ - public Builder chromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - /** - * Chroma sample location. - */ - public Builder chromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - - /** - * Chroma subsampling format. - */ - public Builder chromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - /** - * Chroma subsampling format. - */ - public Builder chromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - - /** - * Coded video height. - */ - public Builder codedHeight(int codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - /** - * Coded video height. - */ - public Builder codedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - - /** - * Coded video width. - */ - public Builder codedWidth(int codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - /** - * Coded video width. - */ - public Builder codedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - 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; - } - - - /** - * Color primaries used. - */ - public Builder colorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - /** - * Color primaries used. - */ - public Builder colorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - - /** - * Color range (e.g., tv). - */ - public Builder colorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - /** - * Color range (e.g., tv). - */ - public Builder colorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - - /** - * Color space. - */ - public Builder colorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - /** - * Color space. - */ - public Builder colorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - - /** - * Color transfer characteristics. - */ - public Builder colorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - /** - * Color transfer characteristics. - */ - public Builder colorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - - /** - * Frame rate of the stream. - */ - public Builder frameRate(float frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - /** - * Frame rate of the stream. - */ - public Builder frameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - - /** - * Key to access this stream part. - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - /** - * Key to access this stream part. - */ - public Builder key(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * Height of the video stream. - */ - public Builder height(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - /** - * Height of the video stream. - */ - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - - /** - * Video level. - */ - public Builder level(int level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - /** - * Video level. - */ - public Builder level(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - - /** - * Indicates if this is the original stream. - */ - public Builder original(boolean original) { - Utils.checkNotNull(original, "original"); - this.original = Optional.ofNullable(original); - return this; - } - - /** - * Indicates if this is the original stream. - */ - public Builder original(Optional original) { - Utils.checkNotNull(original, "original"); - this.original = original; - 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; - } - - - /** - * Video profile. - */ - public Builder profile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - /** - * Video profile. - */ - public Builder profile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - 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 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; - } - - - /** - * Number of reference frames. - */ - public Builder refFrames(int 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; - } - - - /** - * Width of the video stream. - */ - public Builder width(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - /** - * Width of the video stream. - */ - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - - /** - * Display title for the stream. - */ - public Builder displayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - - /** - * Extended display title for the stream. - */ - public Builder extendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public Builder selected(boolean selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = Optional.ofNullable(selected); - return this; - } - - /** - * Indicates if this stream is selected (applicable for audio streams). - */ - public Builder selected(Optional selected) { - Utils.checkNotNull(selected, "selected"); - this.selected = selected; - return this; - } - - - public Builder forced(boolean forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = Optional.ofNullable(forced); - return this; - } - - public Builder forced(Optional forced) { - Utils.checkNotNull(forced, "forced"); - this.forced = forced; - return this; - } - - - /** - * Number of audio channels (for audio streams). - */ - public Builder channels(int 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; - } - - - /** - * Audio channel layout. - */ - public Builder audioChannelLayout(String audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); - return this; - } - - /** - * Audio channel layout. - */ - public Builder audioChannelLayout(Optional audioChannelLayout) { - Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); - this.audioChannelLayout = audioChannelLayout; - return this; - } - - - /** - * Sampling rate for the audio stream. - */ - public Builder samplingRate(int samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = Optional.ofNullable(samplingRate); - return this; - } - - /** - * Sampling rate for the audio stream. - */ - public Builder samplingRate(Optional samplingRate) { - Utils.checkNotNull(samplingRate, "samplingRate"); - this.samplingRate = samplingRate; - return this; - } - - - /** - * Indicates if the stream can auto-sync. - */ - public Builder canAutoSync(boolean canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = Optional.ofNullable(canAutoSync); - return this; - } - - /** - * Indicates if the stream can auto-sync. - */ - public Builder canAutoSync(Optional canAutoSync) { - Utils.checkNotNull(canAutoSync, "canAutoSync"); - this.canAutoSync = canAutoSync; - return this; - } - - - /** - * Indicates if the stream is for the hearing impaired. - */ - public Builder hearingImpaired(boolean hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = Optional.ofNullable(hearingImpaired); - return this; - } - - /** - * Indicates if the stream is for the hearing impaired. - */ - public Builder hearingImpaired(Optional hearingImpaired) { - Utils.checkNotNull(hearingImpaired, "hearingImpaired"); - this.hearingImpaired = hearingImpaired; - return this; - } - - - /** - * Indicates if the stream is a dub. - */ - public Builder dub(boolean dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = Optional.ofNullable(dub); - return this; - } - - /** - * Indicates if the stream is a dub. - */ - public Builder dub(Optional dub) { - Utils.checkNotNull(dub, "dub"); - this.dub = dub; - return this; - } - - - /** - * Optional title for the stream (e.g., language variant). - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - /** - * Optional title for the stream (e.g., language variant). - */ - public Builder title(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public Stream build() { - - return new Stream( - id, format, default_, - codec, index, bitrate, - language, languageTag, languageCode, - headerCompression, doviblCompatID, doviblPresent, - dovielPresent, doviLevel, doviPresent, - doviProfile, dovirpuPresent, doviVersion, - bitDepth, chromaLocation, chromaSubsampling, - codedHeight, codedWidth, closedCaptions, - colorPrimaries, colorRange, colorSpace, - colorTrc, frameRate, key, - height, level, original, - hasScalingMatrix, profile, scanType, - embeddedInVideo, refFrames, width, - displayTitle, extendedDisplayTitle, selected, - forced, channels, audioChannelLayout, - samplingRate, canAutoSync, hearingImpaired, - dub, title); - } - - - private static final LazySingletonValue _SINGLETON_VALUE_StreamType = - new LazySingletonValue<>( - "streamType", - "1", - new TypeReference() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Subscription.java b/src/main/java/dev/plexapi/sdk/models/operations/Subscription.java deleted file mode 100644 index 559d9c36..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Subscription.java +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Subscription - * - *

If the account’s Plex Pass subscription is active - */ -public class Subscription { - /** - * List of features allowed on your Plex Pass subscription - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("features") - private Optional> features; - - /** - * If the account's Plex Pass subscription is active - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("active") - private Optional active; - - /** - * Date the account subscribed to Plex Pass - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subscribedAt") - private JsonNullable subscribedAt; - - /** - * String representation of subscriptionActive - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private Optional status; - - /** - * Payment service used for your Plex Pass subscription - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("paymentService") - private JsonNullable paymentService; - - /** - * Name of Plex Pass subscription plan - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("plan") - private JsonNullable plan; - - @JsonCreator - public Subscription( - @JsonProperty("features") Optional> features, - @JsonProperty("active") Optional active, - @JsonProperty("subscribedAt") JsonNullable subscribedAt, - @JsonProperty("status") Optional status, - @JsonProperty("paymentService") JsonNullable paymentService, - @JsonProperty("plan") JsonNullable plan) { - Utils.checkNotNull(features, "features"); - Utils.checkNotNull(active, "active"); - Utils.checkNotNull(subscribedAt, "subscribedAt"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(paymentService, "paymentService"); - Utils.checkNotNull(plan, "plan"); - this.features = features; - this.active = active; - this.subscribedAt = subscribedAt; - this.status = status; - this.paymentService = paymentService; - this.plan = plan; - } - - public Subscription() { - this(Optional.empty(), Optional.empty(), JsonNullable.undefined(), - Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); - } - - /** - * List of features allowed on your Plex Pass subscription - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> features() { - return (Optional>) features; - } - - /** - * If the account's Plex Pass subscription is active - */ - @JsonIgnore - public Optional active() { - return active; - } - - /** - * Date the account subscribed to Plex Pass - */ - @JsonIgnore - public JsonNullable subscribedAt() { - return subscribedAt; - } - - /** - * String representation of subscriptionActive - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional status() { - return (Optional) status; - } - - /** - * Payment service used for your Plex Pass subscription - */ - @JsonIgnore - public JsonNullable paymentService() { - return paymentService; - } - - /** - * Name of Plex Pass subscription plan - */ - @JsonIgnore - public JsonNullable plan() { - return plan; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public Subscription withFeatures(List features) { - Utils.checkNotNull(features, "features"); - this.features = Optional.ofNullable(features); - return this; - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public Subscription withFeatures(Optional> features) { - Utils.checkNotNull(features, "features"); - this.features = features; - return this; - } - - /** - * If the account's Plex Pass subscription is active - */ - public Subscription withActive(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - - /** - * If the account's Plex Pass subscription is active - */ - public Subscription withActive(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public Subscription withSubscribedAt(String subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = JsonNullable.of(subscribedAt); - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public Subscription withSubscribedAt(JsonNullable subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = subscribedAt; - return this; - } - - /** - * String representation of subscriptionActive - */ - public Subscription withStatus(GetTokenDetailsAuthenticationStatus status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - - /** - * String representation of subscriptionActive - */ - public Subscription withStatus(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public Subscription withPaymentService(String paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = JsonNullable.of(paymentService); - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public Subscription withPaymentService(JsonNullable paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = paymentService; - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public Subscription withPlan(String plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = JsonNullable.of(plan); - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public Subscription withPlan(JsonNullable plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = plan; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Subscription other = (Subscription) o; - return - Utils.enhancedDeepEquals(this.features, other.features) && - Utils.enhancedDeepEquals(this.active, other.active) && - Utils.enhancedDeepEquals(this.subscribedAt, other.subscribedAt) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.paymentService, other.paymentService) && - Utils.enhancedDeepEquals(this.plan, other.plan); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - features, active, subscribedAt, - status, paymentService, plan); - } - - @Override - public String toString() { - return Utils.toString(Subscription.class, - "features", features, - "active", active, - "subscribedAt", subscribedAt, - "status", status, - "paymentService", paymentService, - "plan", plan); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional> features = Optional.empty(); - - private Optional active = Optional.empty(); - - private JsonNullable subscribedAt = JsonNullable.undefined(); - - private Optional status = Optional.empty(); - - private JsonNullable paymentService = JsonNullable.undefined(); - - private JsonNullable plan = JsonNullable.undefined(); - - private Builder() { - // force use of static builder() method - } - - - /** - * List of features allowed on your Plex Pass subscription - */ - public Builder features(List features) { - Utils.checkNotNull(features, "features"); - this.features = Optional.ofNullable(features); - return this; - } - - /** - * List of features allowed on your Plex Pass subscription - */ - public Builder features(Optional> features) { - Utils.checkNotNull(features, "features"); - this.features = features; - return this; - } - - - /** - * If the account's Plex Pass subscription is active - */ - public Builder active(boolean active) { - Utils.checkNotNull(active, "active"); - this.active = Optional.ofNullable(active); - return this; - } - - /** - * If the account's Plex Pass subscription is active - */ - public Builder active(Optional active) { - Utils.checkNotNull(active, "active"); - this.active = active; - return this; - } - - - /** - * Date the account subscribed to Plex Pass - */ - public Builder subscribedAt(String subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = JsonNullable.of(subscribedAt); - return this; - } - - /** - * Date the account subscribed to Plex Pass - */ - public Builder subscribedAt(JsonNullable subscribedAt) { - Utils.checkNotNull(subscribedAt, "subscribedAt"); - this.subscribedAt = subscribedAt; - return this; - } - - - /** - * String representation of subscriptionActive - */ - public Builder status(GetTokenDetailsAuthenticationStatus status) { - Utils.checkNotNull(status, "status"); - this.status = Optional.ofNullable(status); - return this; - } - - /** - * String representation of subscriptionActive - */ - public Builder status(Optional status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * Payment service used for your Plex Pass subscription - */ - public Builder paymentService(String paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = JsonNullable.of(paymentService); - return this; - } - - /** - * Payment service used for your Plex Pass subscription - */ - public Builder paymentService(JsonNullable paymentService) { - Utils.checkNotNull(paymentService, "paymentService"); - this.paymentService = paymentService; - return this; - } - - - /** - * Name of Plex Pass subscription plan - */ - public Builder plan(String plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = JsonNullable.of(plan); - return this; - } - - /** - * Name of Plex Pass subscription plan - */ - public Builder plan(JsonNullable plan) { - Utils.checkNotNull(plan, "plan"); - this.plan = plan; - return this; - } - - public Subscription build() { - - return new Subscription( - features, active, subscribedAt, - status, paymentService, plan); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SubscriptionTemplate.java b/src/main/java/dev/plexapi/sdk/models/operations/SubscriptionTemplate.java new file mode 100644 index 00000000..2d194c05 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/SubscriptionTemplate.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.List; +import java.util.Optional; + + +public class SubscriptionTemplate { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaSubscription") + private Optional> mediaSubscription; + + @JsonCreator + public SubscriptionTemplate( + @JsonProperty("MediaSubscription") Optional> mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = mediaSubscription; + } + + public SubscriptionTemplate() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> mediaSubscription() { + return (Optional>) mediaSubscription; + } + + public static Builder builder() { + return new Builder(); + } + + + public SubscriptionTemplate withMediaSubscription(List mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = Optional.ofNullable(mediaSubscription); + return this; + } + + + public SubscriptionTemplate withMediaSubscription(Optional> mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = mediaSubscription; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscriptionTemplate other = (SubscriptionTemplate) o; + return + Utils.enhancedDeepEquals(this.mediaSubscription, other.mediaSubscription); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaSubscription); + } + + @Override + public String toString() { + return Utils.toString(SubscriptionTemplate.class, + "mediaSubscription", mediaSubscription); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> mediaSubscription = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaSubscription(List mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = Optional.ofNullable(mediaSubscription); + return this; + } + + public Builder mediaSubscription(Optional> mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = mediaSubscription; + return this; + } + + public SubscriptionTemplate build() { + + return new SubscriptionTemplate( + mediaSubscription); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Subtitles.java b/src/main/java/dev/plexapi/sdk/models/operations/Subtitles.java new file mode 100644 index 00000000..96a36977 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Subtitles.java @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * Subtitles + * + *

Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ +public enum Subtitles { + AUTO("auto"), + BURN("burn"), + NONE("none"), + SIDECAR("sidecar"), + EMBEDDED("embedded"), + SEGMENTED("segmented"), + UNKNOWN("unknown"); + + @JsonValue + private final String value; + + Subtitles(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Subtitles o: Subtitles.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Tag.java b/src/main/java/dev/plexapi/sdk/models/operations/Tag.java deleted file mode 100644 index 81484ee8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Tag.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

A key representing a specific tag within the section. - */ -@JsonDeserialize(using = Tag._Deserializer.class) -@JsonSerialize(using = Tag._Serializer.class) -public class Tag { - - public static final Tag UNWATCHED = new Tag("unwatched"); - public static final Tag NEWEST = new Tag("newest"); - public static final Tag RECENTLY_ADDED = new Tag("recentlyAdded"); - public static final Tag RECENTLY_VIEWED = new Tag("recentlyViewed"); - public static final Tag ON_DECK = new Tag("onDeck"); - public static final Tag COLLECTION = new Tag("collection"); - public static final Tag EDITION = new Tag("edition"); - public static final Tag YEAR = new Tag("year"); - public static final Tag DECADE = new Tag("decade"); - public static final Tag DIRECTOR = new Tag("director"); - public static final Tag CONTENT_RATING = new Tag("contentRating"); - public static final Tag RATING = new Tag("rating"); - public static final Tag RESOLUTION = new Tag("resolution"); - public static final Tag FIRST_CHARACTER = new Tag("firstCharacter"); - public static final Tag FOLDER = new Tag("folder"); - public static final Tag ALBUMS = new Tag("albums"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private Tag(String value) { - this.value = value; - } - - /** - * Returns a Tag with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as Tag - */ - public static Tag of(String value) { - synchronized (Tag.class) { - return values.computeIfAbsent(value, v -> new Tag(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Tag other = (Tag) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "Tag [value=" + value + "]"; - } - - // return an array just like an enum - public static Tag[] values() { - synchronized (Tag.class) { - return values.values().toArray(new Tag[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("unwatched", UNWATCHED); - map.put("newest", NEWEST); - map.put("recentlyAdded", RECENTLY_ADDED); - map.put("recentlyViewed", RECENTLY_VIEWED); - map.put("onDeck", ON_DECK); - map.put("collection", COLLECTION); - map.put("edition", EDITION); - map.put("year", YEAR); - map.put("decade", DECADE); - map.put("director", DIRECTOR); - map.put("contentRating", CONTENT_RATING); - map.put("rating", RATING); - map.put("resolution", RESOLUTION); - map.put("firstCharacter", FIRST_CHARACTER); - map.put("folder", FOLDER); - map.put("albums", ALBUMS); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("unwatched", TagEnum.UNWATCHED); - map.put("newest", TagEnum.NEWEST); - map.put("recentlyAdded", TagEnum.RECENTLY_ADDED); - map.put("recentlyViewed", TagEnum.RECENTLY_VIEWED); - map.put("onDeck", TagEnum.ON_DECK); - map.put("collection", TagEnum.COLLECTION); - map.put("edition", TagEnum.EDITION); - map.put("year", TagEnum.YEAR); - map.put("decade", TagEnum.DECADE); - map.put("director", TagEnum.DIRECTOR); - map.put("contentRating", TagEnum.CONTENT_RATING); - map.put("rating", TagEnum.RATING); - map.put("resolution", TagEnum.RESOLUTION); - map.put("firstCharacter", TagEnum.FIRST_CHARACTER); - map.put("folder", TagEnum.FOLDER); - map.put("albums", TagEnum.ALBUMS); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(Tag.class); - } - - @Override - public void serialize(Tag value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(Tag.class); - } - - @Override - public Tag deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return Tag.of(v); - } - } - - public enum TagEnum { - - UNWATCHED("unwatched"), - NEWEST("newest"), - RECENTLY_ADDED("recentlyAdded"), - RECENTLY_VIEWED("recentlyViewed"), - ON_DECK("onDeck"), - COLLECTION("collection"), - EDITION("edition"), - YEAR("year"), - DECADE("decade"), - DIRECTOR("director"), - CONTENT_RATING("contentRating"), - RATING("rating"), - RESOLUTION("resolution"), - FIRST_CHARACTER("firstCharacter"), - FOLDER("folder"), - ALBUMS("albums"),; - - private final String value; - - private TagEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Task.java b/src/main/java/dev/plexapi/sdk/models/operations/Task.java new file mode 100644 index 00000000..221b8e0c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Task.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * Task + * + *

The task name + */ +public enum Task { + AUTOMATIC_UPDATES("AutomaticUpdates"), + BACKUP_DATABASE("BackupDatabase"), + BUTLER_TASK_GENERATE_AD_MARKERS("ButlerTaskGenerateAdMarkers"), + BUTLER_TASK_GENERATE_CREDITS_MARKERS("ButlerTaskGenerateCreditsMarkers"), + BUTLER_TASK_GENERATE_INTRO_MARKERS("ButlerTaskGenerateIntroMarkers"), + BUTLER_TASK_GENERATE_VOICE_ACTIVITY("ButlerTaskGenerateVoiceActivity"), + CLEAN_OLD_BUNDLES("CleanOldBundles"), + CLEAN_OLD_CACHE_FILES("CleanOldCacheFiles"), + DEEP_MEDIA_ANALYSIS("DeepMediaAnalysis"), + GARBAGE_COLLECT_BLOBS("GarbageCollectBlobs"), + GARBAGE_COLLECT_LIBRARY_MEDIA("GarbageCollectLibraryMedia"), + GENERATE_BLUR_HASHES("GenerateBlurHashes"), + GENERATE_CHAPTER_THUMBS("GenerateChapterThumbs"), + GENERATE_MEDIA_INDEX_FILES("GenerateMediaIndexFiles"), + LOUDNESS_ANALYSIS("LoudnessAnalysis"), + MUSIC_ANALYSIS("MusicAnalysis"), + OPTIMIZE_DATABASE("OptimizeDatabase"), + REFRESH_EPG_GUIDES("RefreshEpgGuides"), + REFRESH_LIBRARIES("RefreshLibraries"), + REFRESH_LOCAL_MEDIA("RefreshLocalMedia"), + REFRESH_PERIODIC_METADATA("RefreshPeriodicMetadata"), + UPGRADE_MEDIA_ANALYSIS("UpgradeMediaAnalysis"); + + @JsonValue + private final String value; + + Task(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Task o: Task.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TaskName.java b/src/main/java/dev/plexapi/sdk/models/operations/TaskName.java deleted file mode 100644 index db881e7d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/TaskName.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - *

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

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

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

the name of the task to be started. - */ -@JsonDeserialize(using = TaskName._Deserializer.class) -@JsonSerialize(using = TaskName._Serializer.class) -public class TaskName { - - public static final TaskName BACKUP_DATABASE = new TaskName("BackupDatabase"); - public static final TaskName BUILD_GRACENOTE_COLLECTIONS = new TaskName("BuildGracenoteCollections"); - public static final TaskName CHECK_FOR_UPDATES = new TaskName("CheckForUpdates"); - public static final TaskName CLEAN_OLD_BUNDLES = new TaskName("CleanOldBundles"); - public static final TaskName CLEAN_OLD_CACHE_FILES = new TaskName("CleanOldCacheFiles"); - public static final TaskName DEEP_MEDIA_ANALYSIS = new TaskName("DeepMediaAnalysis"); - public static final TaskName GENERATE_AUTO_TAGS = new TaskName("GenerateAutoTags"); - public static final TaskName GENERATE_CHAPTER_THUMBS = new TaskName("GenerateChapterThumbs"); - public static final TaskName GENERATE_MEDIA_INDEX_FILES = new TaskName("GenerateMediaIndexFiles"); - public static final TaskName OPTIMIZE_DATABASE = new TaskName("OptimizeDatabase"); - public static final TaskName REFRESH_LIBRARIES = new TaskName("RefreshLibraries"); - public static final TaskName REFRESH_LOCAL_MEDIA = new TaskName("RefreshLocalMedia"); - public static final TaskName REFRESH_PERIODIC_METADATA = new TaskName("RefreshPeriodicMetadata"); - public static final TaskName UPGRADE_MEDIA_ANALYSIS = new TaskName("UpgradeMediaAnalysis"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private TaskName(String value) { - this.value = value; - } - - /** - * Returns a TaskName with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as TaskName - */ - public static TaskName of(String value) { - synchronized (TaskName.class) { - return values.computeIfAbsent(value, v -> new TaskName(v)); - } - } - - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - TaskName other = (TaskName) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "TaskName [value=" + value + "]"; - } - - // return an array just like an enum - public static TaskName[] values() { - synchronized (TaskName.class) { - return values.values().toArray(new TaskName[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("BackupDatabase", BACKUP_DATABASE); - map.put("BuildGracenoteCollections", BUILD_GRACENOTE_COLLECTIONS); - map.put("CheckForUpdates", CHECK_FOR_UPDATES); - map.put("CleanOldBundles", CLEAN_OLD_BUNDLES); - map.put("CleanOldCacheFiles", CLEAN_OLD_CACHE_FILES); - map.put("DeepMediaAnalysis", DEEP_MEDIA_ANALYSIS); - map.put("GenerateAutoTags", GENERATE_AUTO_TAGS); - map.put("GenerateChapterThumbs", GENERATE_CHAPTER_THUMBS); - map.put("GenerateMediaIndexFiles", GENERATE_MEDIA_INDEX_FILES); - map.put("OptimizeDatabase", OPTIMIZE_DATABASE); - map.put("RefreshLibraries", REFRESH_LIBRARIES); - map.put("RefreshLocalMedia", REFRESH_LOCAL_MEDIA); - map.put("RefreshPeriodicMetadata", REFRESH_PERIODIC_METADATA); - map.put("UpgradeMediaAnalysis", UPGRADE_MEDIA_ANALYSIS); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("BackupDatabase", TaskNameEnum.BACKUP_DATABASE); - map.put("BuildGracenoteCollections", TaskNameEnum.BUILD_GRACENOTE_COLLECTIONS); - map.put("CheckForUpdates", TaskNameEnum.CHECK_FOR_UPDATES); - map.put("CleanOldBundles", TaskNameEnum.CLEAN_OLD_BUNDLES); - map.put("CleanOldCacheFiles", TaskNameEnum.CLEAN_OLD_CACHE_FILES); - map.put("DeepMediaAnalysis", TaskNameEnum.DEEP_MEDIA_ANALYSIS); - map.put("GenerateAutoTags", TaskNameEnum.GENERATE_AUTO_TAGS); - map.put("GenerateChapterThumbs", TaskNameEnum.GENERATE_CHAPTER_THUMBS); - map.put("GenerateMediaIndexFiles", TaskNameEnum.GENERATE_MEDIA_INDEX_FILES); - map.put("OptimizeDatabase", TaskNameEnum.OPTIMIZE_DATABASE); - map.put("RefreshLibraries", TaskNameEnum.REFRESH_LIBRARIES); - map.put("RefreshLocalMedia", TaskNameEnum.REFRESH_LOCAL_MEDIA); - map.put("RefreshPeriodicMetadata", TaskNameEnum.REFRESH_PERIODIC_METADATA); - map.put("UpgradeMediaAnalysis", TaskNameEnum.UPGRADE_MEDIA_ANALYSIS); - return map; - } - - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(TaskName.class); - } - - @Override - public void serialize(TaskName value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(TaskName.class); - } - - @Override - public TaskName deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - String v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return TaskName.of(v); - } - } - - public enum TaskNameEnum { - - BACKUP_DATABASE("BackupDatabase"), - BUILD_GRACENOTE_COLLECTIONS("BuildGracenoteCollections"), - CHECK_FOR_UPDATES("CheckForUpdates"), - CLEAN_OLD_BUNDLES("CleanOldBundles"), - CLEAN_OLD_CACHE_FILES("CleanOldCacheFiles"), - DEEP_MEDIA_ANALYSIS("DeepMediaAnalysis"), - GENERATE_AUTO_TAGS("GenerateAutoTags"), - GENERATE_CHAPTER_THUMBS("GenerateChapterThumbs"), - GENERATE_MEDIA_INDEX_FILES("GenerateMediaIndexFiles"), - OPTIMIZE_DATABASE("OptimizeDatabase"), - REFRESH_LIBRARIES("RefreshLibraries"), - REFRESH_LOCAL_MEDIA("RefreshLocalMedia"), - REFRESH_PERIODIC_METADATA("RefreshPeriodicMetadata"), - UPGRADE_MEDIA_ANALYSIS("UpgradeMediaAnalysis"),; - - private final String value; - - private TaskNameEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionRequest.java new file mode 100644 index 00000000..069fbae0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionRequest.java @@ -0,0 +1,841 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class TerminateSessionRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The session id (found in the `Session` element in [/status/sessions](#tag/Status/operation/statusGetSlash)) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sessionId") + private String sessionId; + + /** + * The reason to give to the user (typically displayed in the client) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=reason") + private Optional reason; + + @JsonCreator + public TerminateSessionRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String sessionId, + Optional reason) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sessionId, "sessionId"); + Utils.checkNotNull(reason, "reason"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sessionId = sessionId; + this.reason = reason; + } + + public TerminateSessionRequest( + String sessionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sessionId, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The session id (found in the `Session` element in [/status/sessions](#tag/Status/operation/statusGetSlash)) + */ + @JsonIgnore + public String sessionId() { + return sessionId; + } + + /** + * The reason to give to the user (typically displayed in the client) + */ + @JsonIgnore + public Optional reason() { + return reason; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public TerminateSessionRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public TerminateSessionRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public TerminateSessionRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public TerminateSessionRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public TerminateSessionRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public TerminateSessionRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public TerminateSessionRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public TerminateSessionRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public TerminateSessionRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public TerminateSessionRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public TerminateSessionRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public TerminateSessionRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public TerminateSessionRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public TerminateSessionRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public TerminateSessionRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public TerminateSessionRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public TerminateSessionRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public TerminateSessionRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public TerminateSessionRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public TerminateSessionRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public TerminateSessionRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public TerminateSessionRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The session id (found in the `Session` element in [/status/sessions](#tag/Status/operation/statusGetSlash)) + */ + public TerminateSessionRequest withSessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + /** + * The reason to give to the user (typically displayed in the client) + */ + public TerminateSessionRequest withReason(String reason) { + Utils.checkNotNull(reason, "reason"); + this.reason = Optional.ofNullable(reason); + return this; + } + + + /** + * The reason to give to the user (typically displayed in the client) + */ + public TerminateSessionRequest withReason(Optional reason) { + Utils.checkNotNull(reason, "reason"); + this.reason = reason; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminateSessionRequest other = (TerminateSessionRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sessionId, other.sessionId) && + Utils.enhancedDeepEquals(this.reason, other.reason); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sessionId, + reason); + } + + @Override + public String toString() { + return Utils.toString(TerminateSessionRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sessionId", sessionId, + "reason", reason); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String sessionId; + + private Optional reason = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The session id (found in the `Session` element in [/status/sessions](#tag/Status/operation/statusGetSlash)) + */ + public Builder sessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + + /** + * The reason to give to the user (typically displayed in the client) + */ + public Builder reason(String reason) { + Utils.checkNotNull(reason, "reason"); + this.reason = Optional.ofNullable(reason); + return this; + } + + /** + * The reason to give to the user (typically displayed in the client) + */ + public Builder reason(Optional reason) { + Utils.checkNotNull(reason, "reason"); + this.reason = reason; + return this; + } + + public TerminateSessionRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new TerminateSessionRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sessionId, + reason); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionRequestBuilder.java new file mode 100644 index 00000000..e79fe820 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.TerminateSession; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class TerminateSessionRequestBuilder { + + private TerminateSessionRequest request; + private final SDKConfiguration sdkConfiguration; + + public TerminateSessionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public TerminateSessionRequestBuilder request(TerminateSessionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public TerminateSessionResponse call() throws Exception { + + RequestOperation operation + = new TerminateSession.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionResponse.java new file mode 100644 index 00000000..e12912ad --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TerminateSessionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class TerminateSessionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public TerminateSessionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public TerminateSessionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TerminateSessionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TerminateSessionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminateSessionResponse other = (TerminateSessionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(TerminateSessionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public TerminateSessionResponse build() { + + return new TerminateSessionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Tonight.java b/src/main/java/dev/plexapi/sdk/models/operations/Tonight.java deleted file mode 100644 index 988dbbf6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Tonight.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Tonight - * - *

Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install - */ -public enum Tonight { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - Tonight(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (Tonight o: Tonight.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Transcode.java b/src/main/java/dev/plexapi/sdk/models/operations/Transcode.java new file mode 100644 index 00000000..7469e43d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/Transcode.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * Transcode + * + *

The transcode session object which is not yet documented otherwise it'd be a $ref here. + */ +public class Transcode { + @JsonCreator + public Transcode() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(Transcode.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public Transcode build() { + + return new Transcode( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageRequest.java new file mode 100644 index 00000000..df1aed41 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageRequest.java @@ -0,0 +1,1616 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class TranscodeImageRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The source URL for the image to transcode. Note, if this URL requires a token such as `X-Plex-Token`, it should be given as a query parameter to this url. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private Optional url; + + /** + * The output format for the image; defaults to jpg + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=format") + private Optional format; + + /** + * The desired width of the output image + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=width") + private Optional width; + + /** + * The desired height of the output image + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=height") + private Optional height; + + /** + * The desired quality of the output. -1 means the highest quality. Defaults to -1 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=quality") + private Optional quality; + + /** + * The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=background") + private Optional background; + + /** + * Indicates if image should be upscaled to the desired width/height. Defaults to false + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale") + private Optional upscale; + + /** + * Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize") + private Optional minSize; + + /** + * Obey the rotation values specified in EXIF data. Defaults to true. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=rotate") + private Optional rotate; + + /** + * Apply a blur to the image, Defaults to 0 (none) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=blur") + private Optional blur; + + /** + * Scale the image saturation by the specified percentage. Defaults to 100 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=saturation") + private Optional saturation; + + /** + * Render the image at the specified opacity percentage. Defaults to 100 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=opacity") + private Optional opacity; + + /** + * Use the specified chroma subsambling. + * - 0: 411 + * - 1: 420 + * - 2: 422 + * - 3: 444 + * Defaults to 3 (444) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=chromaSubsampling") + private Optional chromaSubsampling; + + /** + * The color to blend with the image. Defaults to none + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=blendColor") + private Optional blendColor; + + @JsonCreator + public TranscodeImageRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional url, + Optional format, + Optional width, + Optional height, + Optional quality, + Optional background, + Optional upscale, + Optional minSize, + Optional rotate, + Optional blur, + Optional saturation, + Optional opacity, + Optional chromaSubsampling, + Optional blendColor) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(url, "url"); + Utils.checkNotNull(format, "format"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(quality, "quality"); + Utils.checkNotNull(background, "background"); + Utils.checkNotNull(upscale, "upscale"); + Utils.checkNotNull(minSize, "minSize"); + Utils.checkNotNull(rotate, "rotate"); + Utils.checkNotNull(blur, "blur"); + Utils.checkNotNull(saturation, "saturation"); + Utils.checkNotNull(opacity, "opacity"); + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + Utils.checkNotNull(blendColor, "blendColor"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.url = url; + this.format = format; + this.width = width; + this.height = height; + this.quality = quality; + this.background = background; + this.upscale = upscale; + this.minSize = minSize; + this.rotate = rotate; + this.blur = blur; + this.saturation = saturation; + this.opacity = opacity; + this.chromaSubsampling = chromaSubsampling; + this.blendColor = blendColor; + } + + public TranscodeImageRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The source URL for the image to transcode. Note, if this URL requires a token such as `X-Plex-Token`, it should be given as a query parameter to this url. + */ + @JsonIgnore + public Optional url() { + return url; + } + + /** + * The output format for the image; defaults to jpg + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional format() { + return (Optional) format; + } + + /** + * The desired width of the output image + */ + @JsonIgnore + public Optional width() { + return width; + } + + /** + * The desired height of the output image + */ + @JsonIgnore + public Optional height() { + return height; + } + + /** + * The desired quality of the output. -1 means the highest quality. Defaults to -1 + */ + @JsonIgnore + public Optional quality() { + return quality; + } + + /** + * The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none + */ + @JsonIgnore + public Optional background() { + return background; + } + + /** + * Indicates if image should be upscaled to the desired width/height. Defaults to false + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional upscale() { + return (Optional) upscale; + } + + /** + * Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional minSize() { + return (Optional) minSize; + } + + /** + * Obey the rotation values specified in EXIF data. Defaults to true. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional rotate() { + return (Optional) rotate; + } + + /** + * Apply a blur to the image, Defaults to 0 (none) + */ + @JsonIgnore + public Optional blur() { + return blur; + } + + /** + * Scale the image saturation by the specified percentage. Defaults to 100 + */ + @JsonIgnore + public Optional saturation() { + return saturation; + } + + /** + * Render the image at the specified opacity percentage. Defaults to 100 + */ + @JsonIgnore + public Optional opacity() { + return opacity; + } + + /** + * Use the specified chroma subsambling. + * - 0: 411 + * - 1: 420 + * - 2: 422 + * - 3: 444 + * Defaults to 3 (444) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chromaSubsampling() { + return (Optional) chromaSubsampling; + } + + /** + * The color to blend with the image. Defaults to none + */ + @JsonIgnore + public Optional blendColor() { + return blendColor; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public TranscodeImageRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public TranscodeImageRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public TranscodeImageRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public TranscodeImageRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public TranscodeImageRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public TranscodeImageRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public TranscodeImageRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public TranscodeImageRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public TranscodeImageRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public TranscodeImageRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public TranscodeImageRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public TranscodeImageRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public TranscodeImageRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public TranscodeImageRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public TranscodeImageRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public TranscodeImageRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public TranscodeImageRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public TranscodeImageRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public TranscodeImageRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public TranscodeImageRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public TranscodeImageRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public TranscodeImageRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The source URL for the image to transcode. Note, if this URL requires a token such as `X-Plex-Token`, it should be given as a query parameter to this url. + */ + public TranscodeImageRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + + /** + * The source URL for the image to transcode. Note, if this URL requires a token such as `X-Plex-Token`, it should be given as a query parameter to this url. + */ + public TranscodeImageRequest withUrl(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * The output format for the image; defaults to jpg + */ + public TranscodeImageRequest withFormat(Format format) { + Utils.checkNotNull(format, "format"); + this.format = Optional.ofNullable(format); + return this; + } + + + /** + * The output format for the image; defaults to jpg + */ + public TranscodeImageRequest withFormat(Optional format) { + Utils.checkNotNull(format, "format"); + this.format = format; + return this; + } + + /** + * The desired width of the output image + */ + public TranscodeImageRequest withWidth(long width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + + /** + * The desired width of the output image + */ + public TranscodeImageRequest withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + /** + * The desired height of the output image + */ + public TranscodeImageRequest withHeight(long height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + + /** + * The desired height of the output image + */ + public TranscodeImageRequest withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + /** + * The desired quality of the output. -1 means the highest quality. Defaults to -1 + */ + public TranscodeImageRequest withQuality(long quality) { + Utils.checkNotNull(quality, "quality"); + this.quality = Optional.ofNullable(quality); + return this; + } + + + /** + * The desired quality of the output. -1 means the highest quality. Defaults to -1 + */ + public TranscodeImageRequest withQuality(Optional quality) { + Utils.checkNotNull(quality, "quality"); + this.quality = quality; + return this; + } + + /** + * The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none + */ + public TranscodeImageRequest withBackground(String background) { + Utils.checkNotNull(background, "background"); + this.background = Optional.ofNullable(background); + return this; + } + + + /** + * The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none + */ + public TranscodeImageRequest withBackground(Optional background) { + Utils.checkNotNull(background, "background"); + this.background = background; + return this; + } + + /** + * Indicates if image should be upscaled to the desired width/height. Defaults to false + */ + public TranscodeImageRequest withUpscale(BoolInt upscale) { + Utils.checkNotNull(upscale, "upscale"); + this.upscale = Optional.ofNullable(upscale); + return this; + } + + + /** + * Indicates if image should be upscaled to the desired width/height. Defaults to false + */ + public TranscodeImageRequest withUpscale(Optional upscale) { + Utils.checkNotNull(upscale, "upscale"); + this.upscale = upscale; + return this; + } + + /** + * Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension. + */ + public TranscodeImageRequest withMinSize(BoolInt minSize) { + Utils.checkNotNull(minSize, "minSize"); + this.minSize = Optional.ofNullable(minSize); + return this; + } + + + /** + * Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension. + */ + public TranscodeImageRequest withMinSize(Optional minSize) { + Utils.checkNotNull(minSize, "minSize"); + this.minSize = minSize; + return this; + } + + /** + * Obey the rotation values specified in EXIF data. Defaults to true. + */ + public TranscodeImageRequest withRotate(BoolInt rotate) { + Utils.checkNotNull(rotate, "rotate"); + this.rotate = Optional.ofNullable(rotate); + return this; + } + + + /** + * Obey the rotation values specified in EXIF data. Defaults to true. + */ + public TranscodeImageRequest withRotate(Optional rotate) { + Utils.checkNotNull(rotate, "rotate"); + this.rotate = rotate; + return this; + } + + /** + * Apply a blur to the image, Defaults to 0 (none) + */ + public TranscodeImageRequest withBlur(long blur) { + Utils.checkNotNull(blur, "blur"); + this.blur = Optional.ofNullable(blur); + return this; + } + + + /** + * Apply a blur to the image, Defaults to 0 (none) + */ + public TranscodeImageRequest withBlur(Optional blur) { + Utils.checkNotNull(blur, "blur"); + this.blur = blur; + return this; + } + + /** + * Scale the image saturation by the specified percentage. Defaults to 100 + */ + public TranscodeImageRequest withSaturation(long saturation) { + Utils.checkNotNull(saturation, "saturation"); + this.saturation = Optional.ofNullable(saturation); + return this; + } + + + /** + * Scale the image saturation by the specified percentage. Defaults to 100 + */ + public TranscodeImageRequest withSaturation(Optional saturation) { + Utils.checkNotNull(saturation, "saturation"); + this.saturation = saturation; + return this; + } + + /** + * Render the image at the specified opacity percentage. Defaults to 100 + */ + public TranscodeImageRequest withOpacity(long opacity) { + Utils.checkNotNull(opacity, "opacity"); + this.opacity = Optional.ofNullable(opacity); + return this; + } + + + /** + * Render the image at the specified opacity percentage. Defaults to 100 + */ + public TranscodeImageRequest withOpacity(Optional opacity) { + Utils.checkNotNull(opacity, "opacity"); + this.opacity = opacity; + return this; + } + + /** + * Use the specified chroma subsambling. + * - 0: 411 + * - 1: 420 + * - 2: 422 + * - 3: 444 + * Defaults to 3 (444) + */ + public TranscodeImageRequest withChromaSubsampling(ChromaSubsampling chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); + return this; + } + + + /** + * Use the specified chroma subsambling. + * - 0: 411 + * - 1: 420 + * - 2: 422 + * - 3: 444 + * Defaults to 3 (444) + */ + public TranscodeImageRequest withChromaSubsampling(Optional chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = chromaSubsampling; + return this; + } + + /** + * The color to blend with the image. Defaults to none + */ + public TranscodeImageRequest withBlendColor(String blendColor) { + Utils.checkNotNull(blendColor, "blendColor"); + this.blendColor = Optional.ofNullable(blendColor); + return this; + } + + + /** + * The color to blend with the image. Defaults to none + */ + public TranscodeImageRequest withBlendColor(Optional blendColor) { + Utils.checkNotNull(blendColor, "blendColor"); + this.blendColor = blendColor; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranscodeImageRequest other = (TranscodeImageRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.url, other.url) && + Utils.enhancedDeepEquals(this.format, other.format) && + Utils.enhancedDeepEquals(this.width, other.width) && + Utils.enhancedDeepEquals(this.height, other.height) && + Utils.enhancedDeepEquals(this.quality, other.quality) && + Utils.enhancedDeepEquals(this.background, other.background) && + Utils.enhancedDeepEquals(this.upscale, other.upscale) && + Utils.enhancedDeepEquals(this.minSize, other.minSize) && + Utils.enhancedDeepEquals(this.rotate, other.rotate) && + Utils.enhancedDeepEquals(this.blur, other.blur) && + Utils.enhancedDeepEquals(this.saturation, other.saturation) && + Utils.enhancedDeepEquals(this.opacity, other.opacity) && + Utils.enhancedDeepEquals(this.chromaSubsampling, other.chromaSubsampling) && + Utils.enhancedDeepEquals(this.blendColor, other.blendColor); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, url, + format, width, height, + quality, background, upscale, + minSize, rotate, blur, + saturation, opacity, chromaSubsampling, + blendColor); + } + + @Override + public String toString() { + return Utils.toString(TranscodeImageRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "url", url, + "format", format, + "width", width, + "height", height, + "quality", quality, + "background", background, + "upscale", upscale, + "minSize", minSize, + "rotate", rotate, + "blur", blur, + "saturation", saturation, + "opacity", opacity, + "chromaSubsampling", chromaSubsampling, + "blendColor", blendColor); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional url = Optional.empty(); + + private Optional format = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional quality = Optional.empty(); + + private Optional background = Optional.empty(); + + private Optional upscale = Optional.empty(); + + private Optional minSize = Optional.empty(); + + private Optional rotate = Optional.empty(); + + private Optional blur = Optional.empty(); + + private Optional saturation = Optional.empty(); + + private Optional opacity = Optional.empty(); + + private Optional chromaSubsampling = Optional.empty(); + + private Optional blendColor = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The source URL for the image to transcode. Note, if this URL requires a token such as `X-Plex-Token`, it should be given as a query parameter to this url. + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The source URL for the image to transcode. Note, if this URL requires a token such as `X-Plex-Token`, it should be given as a query parameter to this url. + */ + public Builder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + + /** + * The output format for the image; defaults to jpg + */ + public Builder format(Format format) { + Utils.checkNotNull(format, "format"); + this.format = Optional.ofNullable(format); + return this; + } + + /** + * The output format for the image; defaults to jpg + */ + public Builder format(Optional format) { + Utils.checkNotNull(format, "format"); + this.format = format; + return this; + } + + + /** + * The desired width of the output image + */ + public Builder width(long width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + /** + * The desired width of the output image + */ + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + + /** + * The desired height of the output image + */ + public Builder height(long height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + /** + * The desired height of the output image + */ + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + + /** + * The desired quality of the output. -1 means the highest quality. Defaults to -1 + */ + public Builder quality(long quality) { + Utils.checkNotNull(quality, "quality"); + this.quality = Optional.ofNullable(quality); + return this; + } + + /** + * The desired quality of the output. -1 means the highest quality. Defaults to -1 + */ + public Builder quality(Optional quality) { + Utils.checkNotNull(quality, "quality"); + this.quality = quality; + return this; + } + + + /** + * The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none + */ + public Builder background(String background) { + Utils.checkNotNull(background, "background"); + this.background = Optional.ofNullable(background); + return this; + } + + /** + * The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none + */ + public Builder background(Optional background) { + Utils.checkNotNull(background, "background"); + this.background = background; + return this; + } + + + /** + * Indicates if image should be upscaled to the desired width/height. Defaults to false + */ + public Builder upscale(BoolInt upscale) { + Utils.checkNotNull(upscale, "upscale"); + this.upscale = Optional.ofNullable(upscale); + return this; + } + + /** + * Indicates if image should be upscaled to the desired width/height. Defaults to false + */ + public Builder upscale(Optional upscale) { + Utils.checkNotNull(upscale, "upscale"); + this.upscale = upscale; + return this; + } + + + /** + * Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension. + */ + public Builder minSize(BoolInt minSize) { + Utils.checkNotNull(minSize, "minSize"); + this.minSize = Optional.ofNullable(minSize); + return this; + } + + /** + * Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension. + */ + public Builder minSize(Optional minSize) { + Utils.checkNotNull(minSize, "minSize"); + this.minSize = minSize; + return this; + } + + + /** + * Obey the rotation values specified in EXIF data. Defaults to true. + */ + public Builder rotate(BoolInt rotate) { + Utils.checkNotNull(rotate, "rotate"); + this.rotate = Optional.ofNullable(rotate); + return this; + } + + /** + * Obey the rotation values specified in EXIF data. Defaults to true. + */ + public Builder rotate(Optional rotate) { + Utils.checkNotNull(rotate, "rotate"); + this.rotate = rotate; + return this; + } + + + /** + * Apply a blur to the image, Defaults to 0 (none) + */ + public Builder blur(long blur) { + Utils.checkNotNull(blur, "blur"); + this.blur = Optional.ofNullable(blur); + return this; + } + + /** + * Apply a blur to the image, Defaults to 0 (none) + */ + public Builder blur(Optional blur) { + Utils.checkNotNull(blur, "blur"); + this.blur = blur; + return this; + } + + + /** + * Scale the image saturation by the specified percentage. Defaults to 100 + */ + public Builder saturation(long saturation) { + Utils.checkNotNull(saturation, "saturation"); + this.saturation = Optional.ofNullable(saturation); + return this; + } + + /** + * Scale the image saturation by the specified percentage. Defaults to 100 + */ + public Builder saturation(Optional saturation) { + Utils.checkNotNull(saturation, "saturation"); + this.saturation = saturation; + return this; + } + + + /** + * Render the image at the specified opacity percentage. Defaults to 100 + */ + public Builder opacity(long opacity) { + Utils.checkNotNull(opacity, "opacity"); + this.opacity = Optional.ofNullable(opacity); + return this; + } + + /** + * Render the image at the specified opacity percentage. Defaults to 100 + */ + public Builder opacity(Optional opacity) { + Utils.checkNotNull(opacity, "opacity"); + this.opacity = opacity; + return this; + } + + + /** + * Use the specified chroma subsambling. + * - 0: 411 + * - 1: 420 + * - 2: 422 + * - 3: 444 + * Defaults to 3 (444) + */ + public Builder chromaSubsampling(ChromaSubsampling chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); + return this; + } + + /** + * Use the specified chroma subsambling. + * - 0: 411 + * - 1: 420 + * - 2: 422 + * - 3: 444 + * Defaults to 3 (444) + */ + public Builder chromaSubsampling(Optional chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = chromaSubsampling; + return this; + } + + + /** + * The color to blend with the image. Defaults to none + */ + public Builder blendColor(String blendColor) { + Utils.checkNotNull(blendColor, "blendColor"); + this.blendColor = Optional.ofNullable(blendColor); + return this; + } + + /** + * The color to blend with the image. Defaults to none + */ + public Builder blendColor(Optional blendColor) { + Utils.checkNotNull(blendColor, "blendColor"); + this.blendColor = blendColor; + return this; + } + + public TranscodeImageRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new TranscodeImageRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, url, + format, width, height, + quality, background, upscale, + minSize, rotate, blur, + saturation, opacity, chromaSubsampling, + blendColor); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageRequestBuilder.java new file mode 100644 index 00000000..ad6d1b2d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.TranscodeImage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class TranscodeImageRequestBuilder { + + private TranscodeImageRequest request; + private final SDKConfiguration sdkConfiguration; + + public TranscodeImageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public TranscodeImageRequestBuilder request(TranscodeImageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public TranscodeImageResponse call() throws Exception { + + RequestOperation operation + = new TranscodeImage.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageResponse.java new file mode 100644 index 00000000..a5896188 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeImageResponse.java @@ -0,0 +1,370 @@ +/* + * 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.Optional; + + +public class TranscodeImageResponse 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 resulting image + */ + private Optional twoHundredImageJpegResponseStream; + + /** + * The resulting image + */ + private Optional twoHundredImagePngResponseStream; + + /** + * The resulting image + */ + private Optional twoHundredImageXPortablePixmapResponseStream; + + @JsonCreator + public TranscodeImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredImageJpegResponseStream, + Optional twoHundredImagePngResponseStream, + Optional twoHundredImageXPortablePixmapResponseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + Utils.checkNotNull(twoHundredImagePngResponseStream, "twoHundredImagePngResponseStream"); + Utils.checkNotNull(twoHundredImageXPortablePixmapResponseStream, "twoHundredImageXPortablePixmapResponseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + this.twoHundredImagePngResponseStream = twoHundredImagePngResponseStream; + this.twoHundredImageXPortablePixmapResponseStream = twoHundredImageXPortablePixmapResponseStream; + } + + public TranscodeImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), Optional.empty(), 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 resulting image + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredImageJpegResponseStream() { + return (Optional) twoHundredImageJpegResponseStream; + } + + /** + * The resulting image + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredImagePngResponseStream() { + return (Optional) twoHundredImagePngResponseStream; + } + + /** + * The resulting image + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredImageXPortablePixmapResponseStream() { + return (Optional) twoHundredImageXPortablePixmapResponseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public TranscodeImageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TranscodeImageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TranscodeImageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImageJpegResponseStream(InputStream twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImagePngResponseStream(InputStream twoHundredImagePngResponseStream) { + Utils.checkNotNull(twoHundredImagePngResponseStream, "twoHundredImagePngResponseStream"); + this.twoHundredImagePngResponseStream = Optional.ofNullable(twoHundredImagePngResponseStream); + return this; + } + + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImagePngResponseStream(Optional twoHundredImagePngResponseStream) { + Utils.checkNotNull(twoHundredImagePngResponseStream, "twoHundredImagePngResponseStream"); + this.twoHundredImagePngResponseStream = twoHundredImagePngResponseStream; + return this; + } + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImageXPortablePixmapResponseStream(InputStream twoHundredImageXPortablePixmapResponseStream) { + Utils.checkNotNull(twoHundredImageXPortablePixmapResponseStream, "twoHundredImageXPortablePixmapResponseStream"); + this.twoHundredImageXPortablePixmapResponseStream = Optional.ofNullable(twoHundredImageXPortablePixmapResponseStream); + return this; + } + + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImageXPortablePixmapResponseStream(Optional twoHundredImageXPortablePixmapResponseStream) { + Utils.checkNotNull(twoHundredImageXPortablePixmapResponseStream, "twoHundredImageXPortablePixmapResponseStream"); + this.twoHundredImageXPortablePixmapResponseStream = twoHundredImageXPortablePixmapResponseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranscodeImageResponse other = (TranscodeImageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.twoHundredImageJpegResponseStream, other.twoHundredImageJpegResponseStream) && + Utils.enhancedDeepEquals(this.twoHundredImagePngResponseStream, other.twoHundredImagePngResponseStream) && + Utils.enhancedDeepEquals(this.twoHundredImageXPortablePixmapResponseStream, other.twoHundredImageXPortablePixmapResponseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + twoHundredImageJpegResponseStream, twoHundredImagePngResponseStream, twoHundredImageXPortablePixmapResponseStream); + } + + @Override + public String toString() { + return Utils.toString(TranscodeImageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredImageJpegResponseStream", twoHundredImageJpegResponseStream, + "twoHundredImagePngResponseStream", twoHundredImagePngResponseStream, + "twoHundredImageXPortablePixmapResponseStream", twoHundredImageXPortablePixmapResponseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredImageJpegResponseStream = Optional.empty(); + + private Optional twoHundredImagePngResponseStream = Optional.empty(); + + private Optional twoHundredImageXPortablePixmapResponseStream = 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 resulting image + */ + public Builder twoHundredImageJpegResponseStream(InputStream twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + /** + * The resulting image + */ + public Builder twoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + + /** + * The resulting image + */ + public Builder twoHundredImagePngResponseStream(InputStream twoHundredImagePngResponseStream) { + Utils.checkNotNull(twoHundredImagePngResponseStream, "twoHundredImagePngResponseStream"); + this.twoHundredImagePngResponseStream = Optional.ofNullable(twoHundredImagePngResponseStream); + return this; + } + + /** + * The resulting image + */ + public Builder twoHundredImagePngResponseStream(Optional twoHundredImagePngResponseStream) { + Utils.checkNotNull(twoHundredImagePngResponseStream, "twoHundredImagePngResponseStream"); + this.twoHundredImagePngResponseStream = twoHundredImagePngResponseStream; + return this; + } + + + /** + * The resulting image + */ + public Builder twoHundredImageXPortablePixmapResponseStream(InputStream twoHundredImageXPortablePixmapResponseStream) { + Utils.checkNotNull(twoHundredImageXPortablePixmapResponseStream, "twoHundredImageXPortablePixmapResponseStream"); + this.twoHundredImageXPortablePixmapResponseStream = Optional.ofNullable(twoHundredImageXPortablePixmapResponseStream); + return this; + } + + /** + * The resulting image + */ + public Builder twoHundredImageXPortablePixmapResponseStream(Optional twoHundredImageXPortablePixmapResponseStream) { + Utils.checkNotNull(twoHundredImageXPortablePixmapResponseStream, "twoHundredImageXPortablePixmapResponseStream"); + this.twoHundredImageXPortablePixmapResponseStream = twoHundredImageXPortablePixmapResponseStream; + return this; + } + + public TranscodeImageResponse build() { + + return new TranscodeImageResponse( + contentType, statusCode, rawResponse, + twoHundredImageJpegResponseStream, twoHundredImagePngResponseStream, twoHundredImageXPortablePixmapResponseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TranscodeJob.java b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeJob.java new file mode 100644 index 00000000..8c2a2941 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeJob.java @@ -0,0 +1,622 @@ +/* + * 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.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class TranscodeJob { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generatorID") + private Optional generatorID; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("progress") + private Optional progress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + /** + * The number of seconds remaining in this job + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("remaining") + private Optional remaining; + + /** + * The size of the result so far + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The speed of the transcode; 1.0 means real-time + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("speed") + private Optional speed; + + /** + * The tag associated with the job. This could be the tag containing the optimizer settings. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("targetTagID") + private Optional targetTagID; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonCreator + public TranscodeJob( + @JsonProperty("generatorID") Optional generatorID, + @JsonProperty("key") Optional key, + @JsonProperty("progress") Optional progress, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("remaining") Optional remaining, + @JsonProperty("size") Optional size, + @JsonProperty("speed") Optional speed, + @JsonProperty("targetTagID") Optional targetTagID, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type) { + Utils.checkNotNull(generatorID, "generatorID"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(progress, "progress"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(remaining, "remaining"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(speed, "speed"); + Utils.checkNotNull(targetTagID, "targetTagID"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + this.generatorID = generatorID; + this.key = key; + this.progress = progress; + this.ratingKey = ratingKey; + this.remaining = remaining; + this.size = size; + this.speed = speed; + this.targetTagID = targetTagID; + this.thumb = thumb; + this.title = title; + this.type = type; + } + + public TranscodeJob() { + this(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 generatorID() { + return generatorID; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional progress() { + return progress; + } + + @JsonIgnore + public Optional ratingKey() { + return ratingKey; + } + + /** + * The number of seconds remaining in this job + */ + @JsonIgnore + public Optional remaining() { + return remaining; + } + + /** + * The size of the result so far + */ + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The speed of the transcode; 1.0 means real-time + */ + @JsonIgnore + public Optional speed() { + return speed; + } + + /** + * The tag associated with the job. This could be the tag containing the optimizer settings. + */ + @JsonIgnore + public Optional targetTagID() { + return targetTagID; + } + + @JsonIgnore + public Optional thumb() { + return thumb; + } + + @JsonIgnore + public Optional title() { + return title; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + public static Builder builder() { + return new Builder(); + } + + + public TranscodeJob withGeneratorID(long generatorID) { + Utils.checkNotNull(generatorID, "generatorID"); + this.generatorID = Optional.ofNullable(generatorID); + return this; + } + + + public TranscodeJob withGeneratorID(Optional generatorID) { + Utils.checkNotNull(generatorID, "generatorID"); + this.generatorID = generatorID; + return this; + } + + public TranscodeJob withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public TranscodeJob withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public TranscodeJob withProgress(double progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = Optional.ofNullable(progress); + return this; + } + + + public TranscodeJob withProgress(Optional progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = progress; + return this; + } + + public TranscodeJob withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + public TranscodeJob withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The number of seconds remaining in this job + */ + public TranscodeJob withRemaining(long remaining) { + Utils.checkNotNull(remaining, "remaining"); + this.remaining = Optional.ofNullable(remaining); + return this; + } + + + /** + * The number of seconds remaining in this job + */ + public TranscodeJob withRemaining(Optional remaining) { + Utils.checkNotNull(remaining, "remaining"); + this.remaining = remaining; + return this; + } + + /** + * The size of the result so far + */ + public TranscodeJob withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + /** + * The size of the result so far + */ + public TranscodeJob withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The speed of the transcode; 1.0 means real-time + */ + public TranscodeJob withSpeed(double speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = Optional.ofNullable(speed); + return this; + } + + + /** + * The speed of the transcode; 1.0 means real-time + */ + public TranscodeJob withSpeed(Optional speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = speed; + return this; + } + + /** + * The tag associated with the job. This could be the tag containing the optimizer settings. + */ + public TranscodeJob withTargetTagID(long targetTagID) { + Utils.checkNotNull(targetTagID, "targetTagID"); + this.targetTagID = Optional.ofNullable(targetTagID); + return this; + } + + + /** + * The tag associated with the job. This could be the tag containing the optimizer settings. + */ + public TranscodeJob withTargetTagID(Optional targetTagID) { + Utils.checkNotNull(targetTagID, "targetTagID"); + this.targetTagID = targetTagID; + return this; + } + + public TranscodeJob withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + public TranscodeJob withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public TranscodeJob withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public TranscodeJob withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public TranscodeJob withType(GetBackgroundTasksType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public TranscodeJob withType(Optional 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; + } + TranscodeJob other = (TranscodeJob) o; + return + Utils.enhancedDeepEquals(this.generatorID, other.generatorID) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.progress, other.progress) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.remaining, other.remaining) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.speed, other.speed) && + Utils.enhancedDeepEquals(this.targetTagID, other.targetTagID) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + generatorID, key, progress, + ratingKey, remaining, size, + speed, targetTagID, thumb, + title, type); + } + + @Override + public String toString() { + return Utils.toString(TranscodeJob.class, + "generatorID", generatorID, + "key", key, + "progress", progress, + "ratingKey", ratingKey, + "remaining", remaining, + "size", size, + "speed", speed, + "targetTagID", targetTagID, + "thumb", thumb, + "title", title, + "type", type); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional generatorID = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional progress = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional remaining = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional speed = Optional.empty(); + + private Optional targetTagID = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder generatorID(long generatorID) { + Utils.checkNotNull(generatorID, "generatorID"); + this.generatorID = Optional.ofNullable(generatorID); + return this; + } + + public Builder generatorID(Optional generatorID) { + Utils.checkNotNull(generatorID, "generatorID"); + this.generatorID = generatorID; + 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 progress(double progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = Optional.ofNullable(progress); + return this; + } + + public Builder progress(Optional progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = progress; + return this; + } + + + public Builder ratingKey(String 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; + } + + + /** + * The number of seconds remaining in this job + */ + public Builder remaining(long remaining) { + Utils.checkNotNull(remaining, "remaining"); + this.remaining = Optional.ofNullable(remaining); + return this; + } + + /** + * The number of seconds remaining in this job + */ + public Builder remaining(Optional remaining) { + Utils.checkNotNull(remaining, "remaining"); + this.remaining = remaining; + return this; + } + + + /** + * The size of the result so far + */ + public Builder size(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * The size of the result so far + */ + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + + /** + * The speed of the transcode; 1.0 means real-time + */ + public Builder speed(double speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = Optional.ofNullable(speed); + return this; + } + + /** + * The speed of the transcode; 1.0 means real-time + */ + public Builder speed(Optional speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = speed; + return this; + } + + + /** + * The tag associated with the job. This could be the tag containing the optimizer settings. + */ + public Builder targetTagID(long targetTagID) { + Utils.checkNotNull(targetTagID, "targetTagID"); + this.targetTagID = Optional.ofNullable(targetTagID); + return this; + } + + /** + * The tag associated with the job. This could be the tag containing the optimizer settings. + */ + public Builder targetTagID(Optional targetTagID) { + Utils.checkNotNull(targetTagID, "targetTagID"); + this.targetTagID = targetTagID; + 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 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(GetBackgroundTasksType 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 TranscodeJob build() { + + return new TranscodeJob( + generatorID, key, progress, + ratingKey, remaining, size, + speed, targetTagID, thumb, + title, type); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSession.java b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSession.java deleted file mode 100644 index ce4eb770..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSession.java +++ /dev/null @@ -1,1124 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class TranscodeSession { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("key") - private Optional key; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("throttled") - private Optional throttled; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("complete") - private Optional complete; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("progress") - private Optional progress; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("size") - private Optional size; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("speed") - private Optional speed; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("error") - private Optional error; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("duration") - private Optional duration; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("remaining") - private Optional remaining; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("context") - private Optional context; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("sourceVideoCodec") - private Optional sourceVideoCodec; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("sourceAudioCodec") - private Optional sourceAudioCodec; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoDecision") - private Optional videoDecision; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioDecision") - private Optional audioDecision; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("subtitleDecision") - private Optional subtitleDecision; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("protocol") - private Optional protocol; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoCodec") - private Optional videoCodec; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioCodec") - private Optional audioCodec; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("audioChannels") - private Optional audioChannels; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("transcodeHwRequested") - private Optional transcodeHwRequested; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("timeStamp") - private Optional timeStamp; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("maxOffsetAvailable") - private Optional maxOffsetAvailable; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("minOffsetAvailable") - private Optional minOffsetAvailable; - - @JsonCreator - public TranscodeSession( - @JsonProperty("key") Optional key, - @JsonProperty("throttled") Optional throttled, - @JsonProperty("complete") Optional complete, - @JsonProperty("progress") Optional progress, - @JsonProperty("size") Optional size, - @JsonProperty("speed") Optional speed, - @JsonProperty("error") Optional error, - @JsonProperty("duration") Optional duration, - @JsonProperty("remaining") Optional remaining, - @JsonProperty("context") Optional context, - @JsonProperty("sourceVideoCodec") Optional sourceVideoCodec, - @JsonProperty("sourceAudioCodec") Optional sourceAudioCodec, - @JsonProperty("videoDecision") Optional videoDecision, - @JsonProperty("audioDecision") Optional audioDecision, - @JsonProperty("subtitleDecision") Optional subtitleDecision, - @JsonProperty("protocol") Optional protocol, - @JsonProperty("container") Optional container, - @JsonProperty("videoCodec") Optional videoCodec, - @JsonProperty("audioCodec") Optional audioCodec, - @JsonProperty("audioChannels") Optional audioChannels, - @JsonProperty("transcodeHwRequested") Optional transcodeHwRequested, - @JsonProperty("timeStamp") Optional timeStamp, - @JsonProperty("maxOffsetAvailable") Optional maxOffsetAvailable, - @JsonProperty("minOffsetAvailable") Optional minOffsetAvailable) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(throttled, "throttled"); - Utils.checkNotNull(complete, "complete"); - Utils.checkNotNull(progress, "progress"); - Utils.checkNotNull(size, "size"); - Utils.checkNotNull(speed, "speed"); - Utils.checkNotNull(error, "error"); - Utils.checkNotNull(duration, "duration"); - Utils.checkNotNull(remaining, "remaining"); - Utils.checkNotNull(context, "context"); - Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); - Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); - Utils.checkNotNull(videoDecision, "videoDecision"); - Utils.checkNotNull(audioDecision, "audioDecision"); - Utils.checkNotNull(subtitleDecision, "subtitleDecision"); - Utils.checkNotNull(protocol, "protocol"); - Utils.checkNotNull(container, "container"); - Utils.checkNotNull(videoCodec, "videoCodec"); - Utils.checkNotNull(audioCodec, "audioCodec"); - Utils.checkNotNull(audioChannels, "audioChannels"); - Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); - Utils.checkNotNull(timeStamp, "timeStamp"); - Utils.checkNotNull(maxOffsetAvailable, "maxOffsetAvailable"); - Utils.checkNotNull(minOffsetAvailable, "minOffsetAvailable"); - this.key = key; - this.throttled = throttled; - this.complete = complete; - this.progress = progress; - this.size = size; - this.speed = speed; - this.error = error; - this.duration = duration; - this.remaining = remaining; - this.context = context; - this.sourceVideoCodec = sourceVideoCodec; - this.sourceAudioCodec = sourceAudioCodec; - this.videoDecision = videoDecision; - this.audioDecision = audioDecision; - this.subtitleDecision = subtitleDecision; - this.protocol = protocol; - this.container = container; - this.videoCodec = videoCodec; - this.audioCodec = audioCodec; - this.audioChannels = audioChannels; - this.transcodeHwRequested = transcodeHwRequested; - this.timeStamp = timeStamp; - this.maxOffsetAvailable = maxOffsetAvailable; - this.minOffsetAvailable = minOffsetAvailable; - } - - public TranscodeSession() { - 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()); - } - - @JsonIgnore - public Optional key() { - return key; - } - - @JsonIgnore - public Optional throttled() { - return throttled; - } - - @JsonIgnore - public Optional complete() { - return complete; - } - - @JsonIgnore - public Optional progress() { - return progress; - } - - @JsonIgnore - public Optional size() { - return size; - } - - @JsonIgnore - public Optional speed() { - return speed; - } - - @JsonIgnore - public Optional error() { - return error; - } - - @JsonIgnore - public Optional duration() { - return duration; - } - - @JsonIgnore - public Optional remaining() { - return remaining; - } - - @JsonIgnore - public Optional context() { - return context; - } - - @JsonIgnore - public Optional sourceVideoCodec() { - return sourceVideoCodec; - } - - @JsonIgnore - public Optional sourceAudioCodec() { - return sourceAudioCodec; - } - - @JsonIgnore - public Optional videoDecision() { - return videoDecision; - } - - @JsonIgnore - public Optional audioDecision() { - return audioDecision; - } - - @JsonIgnore - public Optional subtitleDecision() { - return subtitleDecision; - } - - @JsonIgnore - public Optional protocol() { - return protocol; - } - - @JsonIgnore - public Optional container() { - return container; - } - - @JsonIgnore - public Optional videoCodec() { - return videoCodec; - } - - @JsonIgnore - public Optional audioCodec() { - return audioCodec; - } - - @JsonIgnore - public Optional audioChannels() { - return audioChannels; - } - - @JsonIgnore - public Optional transcodeHwRequested() { - return transcodeHwRequested; - } - - @JsonIgnore - public Optional timeStamp() { - return timeStamp; - } - - @JsonIgnore - public Optional maxOffsetAvailable() { - return maxOffsetAvailable; - } - - @JsonIgnore - public Optional minOffsetAvailable() { - return minOffsetAvailable; - } - - public static Builder builder() { - return new Builder(); - } - - - public TranscodeSession withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - - public TranscodeSession withKey(Optional key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public TranscodeSession withThrottled(boolean throttled) { - Utils.checkNotNull(throttled, "throttled"); - this.throttled = Optional.ofNullable(throttled); - return this; - } - - - public TranscodeSession withThrottled(Optional throttled) { - Utils.checkNotNull(throttled, "throttled"); - this.throttled = throttled; - return this; - } - - public TranscodeSession withComplete(boolean complete) { - Utils.checkNotNull(complete, "complete"); - this.complete = Optional.ofNullable(complete); - return this; - } - - - public TranscodeSession withComplete(Optional complete) { - Utils.checkNotNull(complete, "complete"); - this.complete = complete; - return this; - } - - public TranscodeSession withProgress(double progress) { - Utils.checkNotNull(progress, "progress"); - this.progress = Optional.ofNullable(progress); - return this; - } - - - public TranscodeSession withProgress(Optional progress) { - Utils.checkNotNull(progress, "progress"); - this.progress = progress; - return this; - } - - public TranscodeSession withSize(int size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - - public TranscodeSession withSize(Optional size) { - Utils.checkNotNull(size, "size"); - this.size = size; - return this; - } - - public TranscodeSession withSpeed(double speed) { - Utils.checkNotNull(speed, "speed"); - this.speed = Optional.ofNullable(speed); - return this; - } - - - public TranscodeSession withSpeed(Optional speed) { - Utils.checkNotNull(speed, "speed"); - this.speed = speed; - return this; - } - - public TranscodeSession withError(boolean error) { - Utils.checkNotNull(error, "error"); - this.error = Optional.ofNullable(error); - return this; - } - - - public TranscodeSession withError(Optional error) { - Utils.checkNotNull(error, "error"); - this.error = error; - return this; - } - - public TranscodeSession withDuration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - - public TranscodeSession withDuration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - public TranscodeSession withRemaining(int remaining) { - Utils.checkNotNull(remaining, "remaining"); - this.remaining = Optional.ofNullable(remaining); - return this; - } - - - public TranscodeSession withRemaining(Optional remaining) { - Utils.checkNotNull(remaining, "remaining"); - this.remaining = remaining; - return this; - } - - public TranscodeSession withContext(String context) { - Utils.checkNotNull(context, "context"); - this.context = Optional.ofNullable(context); - return this; - } - - - public TranscodeSession withContext(Optional context) { - Utils.checkNotNull(context, "context"); - this.context = context; - return this; - } - - public TranscodeSession withSourceVideoCodec(String sourceVideoCodec) { - Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); - this.sourceVideoCodec = Optional.ofNullable(sourceVideoCodec); - return this; - } - - - public TranscodeSession withSourceVideoCodec(Optional sourceVideoCodec) { - Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); - this.sourceVideoCodec = sourceVideoCodec; - return this; - } - - public TranscodeSession withSourceAudioCodec(String sourceAudioCodec) { - Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); - this.sourceAudioCodec = Optional.ofNullable(sourceAudioCodec); - return this; - } - - - public TranscodeSession withSourceAudioCodec(Optional sourceAudioCodec) { - Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); - this.sourceAudioCodec = sourceAudioCodec; - return this; - } - - public TranscodeSession withVideoDecision(String videoDecision) { - Utils.checkNotNull(videoDecision, "videoDecision"); - this.videoDecision = Optional.ofNullable(videoDecision); - return this; - } - - - public TranscodeSession withVideoDecision(Optional videoDecision) { - Utils.checkNotNull(videoDecision, "videoDecision"); - this.videoDecision = videoDecision; - return this; - } - - public TranscodeSession withAudioDecision(String audioDecision) { - Utils.checkNotNull(audioDecision, "audioDecision"); - this.audioDecision = Optional.ofNullable(audioDecision); - return this; - } - - - public TranscodeSession withAudioDecision(Optional audioDecision) { - Utils.checkNotNull(audioDecision, "audioDecision"); - this.audioDecision = audioDecision; - return this; - } - - public TranscodeSession withSubtitleDecision(String subtitleDecision) { - Utils.checkNotNull(subtitleDecision, "subtitleDecision"); - this.subtitleDecision = Optional.ofNullable(subtitleDecision); - return this; - } - - - public TranscodeSession withSubtitleDecision(Optional subtitleDecision) { - Utils.checkNotNull(subtitleDecision, "subtitleDecision"); - this.subtitleDecision = subtitleDecision; - return this; - } - - public TranscodeSession withProtocol(String protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = Optional.ofNullable(protocol); - return this; - } - - - public TranscodeSession withProtocol(Optional protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = protocol; - return this; - } - - public TranscodeSession withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - - public TranscodeSession withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; - return this; - } - - public TranscodeSession withVideoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - - public TranscodeSession withVideoCodec(Optional videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = videoCodec; - return this; - } - - public TranscodeSession withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - - public TranscodeSession withAudioCodec(Optional audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = audioCodec; - return this; - } - - public TranscodeSession withAudioChannels(int audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); - return this; - } - - - public TranscodeSession withAudioChannels(Optional audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = audioChannels; - return this; - } - - public TranscodeSession withTranscodeHwRequested(boolean transcodeHwRequested) { - Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); - this.transcodeHwRequested = Optional.ofNullable(transcodeHwRequested); - return this; - } - - - public TranscodeSession withTranscodeHwRequested(Optional transcodeHwRequested) { - Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); - this.transcodeHwRequested = transcodeHwRequested; - return this; - } - - public TranscodeSession withTimeStamp(double timeStamp) { - Utils.checkNotNull(timeStamp, "timeStamp"); - this.timeStamp = Optional.ofNullable(timeStamp); - return this; - } - - - public TranscodeSession withTimeStamp(Optional timeStamp) { - Utils.checkNotNull(timeStamp, "timeStamp"); - this.timeStamp = timeStamp; - return this; - } - - public TranscodeSession withMaxOffsetAvailable(double maxOffsetAvailable) { - Utils.checkNotNull(maxOffsetAvailable, "maxOffsetAvailable"); - this.maxOffsetAvailable = Optional.ofNullable(maxOffsetAvailable); - return this; - } - - - public TranscodeSession withMaxOffsetAvailable(Optional maxOffsetAvailable) { - Utils.checkNotNull(maxOffsetAvailable, "maxOffsetAvailable"); - this.maxOffsetAvailable = maxOffsetAvailable; - return this; - } - - public TranscodeSession withMinOffsetAvailable(double minOffsetAvailable) { - Utils.checkNotNull(minOffsetAvailable, "minOffsetAvailable"); - this.minOffsetAvailable = Optional.ofNullable(minOffsetAvailable); - return this; - } - - - public TranscodeSession withMinOffsetAvailable(Optional minOffsetAvailable) { - Utils.checkNotNull(minOffsetAvailable, "minOffsetAvailable"); - this.minOffsetAvailable = minOffsetAvailable; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TranscodeSession other = (TranscodeSession) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.throttled, other.throttled) && - Utils.enhancedDeepEquals(this.complete, other.complete) && - Utils.enhancedDeepEquals(this.progress, other.progress) && - Utils.enhancedDeepEquals(this.size, other.size) && - Utils.enhancedDeepEquals(this.speed, other.speed) && - Utils.enhancedDeepEquals(this.error, other.error) && - Utils.enhancedDeepEquals(this.duration, other.duration) && - Utils.enhancedDeepEquals(this.remaining, other.remaining) && - Utils.enhancedDeepEquals(this.context, other.context) && - Utils.enhancedDeepEquals(this.sourceVideoCodec, other.sourceVideoCodec) && - Utils.enhancedDeepEquals(this.sourceAudioCodec, other.sourceAudioCodec) && - Utils.enhancedDeepEquals(this.videoDecision, other.videoDecision) && - Utils.enhancedDeepEquals(this.audioDecision, other.audioDecision) && - Utils.enhancedDeepEquals(this.subtitleDecision, other.subtitleDecision) && - Utils.enhancedDeepEquals(this.protocol, other.protocol) && - Utils.enhancedDeepEquals(this.container, other.container) && - Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && - Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && - Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && - Utils.enhancedDeepEquals(this.transcodeHwRequested, other.transcodeHwRequested) && - Utils.enhancedDeepEquals(this.timeStamp, other.timeStamp) && - Utils.enhancedDeepEquals(this.maxOffsetAvailable, other.maxOffsetAvailable) && - Utils.enhancedDeepEquals(this.minOffsetAvailable, other.minOffsetAvailable); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, throttled, complete, - progress, size, speed, - error, duration, remaining, - context, sourceVideoCodec, sourceAudioCodec, - videoDecision, audioDecision, subtitleDecision, - protocol, container, videoCodec, - audioCodec, audioChannels, transcodeHwRequested, - timeStamp, maxOffsetAvailable, minOffsetAvailable); - } - - @Override - public String toString() { - return Utils.toString(TranscodeSession.class, - "key", key, - "throttled", throttled, - "complete", complete, - "progress", progress, - "size", size, - "speed", speed, - "error", error, - "duration", duration, - "remaining", remaining, - "context", context, - "sourceVideoCodec", sourceVideoCodec, - "sourceAudioCodec", sourceAudioCodec, - "videoDecision", videoDecision, - "audioDecision", audioDecision, - "subtitleDecision", subtitleDecision, - "protocol", protocol, - "container", container, - "videoCodec", videoCodec, - "audioCodec", audioCodec, - "audioChannels", audioChannels, - "transcodeHwRequested", transcodeHwRequested, - "timeStamp", timeStamp, - "maxOffsetAvailable", maxOffsetAvailable, - "minOffsetAvailable", minOffsetAvailable); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional key = Optional.empty(); - - private Optional throttled = Optional.empty(); - - private Optional complete = Optional.empty(); - - private Optional progress = Optional.empty(); - - private Optional size = Optional.empty(); - - private Optional speed = Optional.empty(); - - private Optional error = Optional.empty(); - - private Optional duration = Optional.empty(); - - private Optional remaining = Optional.empty(); - - private Optional context = Optional.empty(); - - private Optional sourceVideoCodec = Optional.empty(); - - private Optional sourceAudioCodec = Optional.empty(); - - private Optional videoDecision = Optional.empty(); - - private Optional audioDecision = Optional.empty(); - - private Optional subtitleDecision = Optional.empty(); - - private Optional protocol = Optional.empty(); - - private Optional container = Optional.empty(); - - private Optional videoCodec = Optional.empty(); - - private Optional audioCodec = Optional.empty(); - - private Optional audioChannels = Optional.empty(); - - private Optional transcodeHwRequested = Optional.empty(); - - private Optional timeStamp = Optional.empty(); - - private Optional maxOffsetAvailable = Optional.empty(); - - private Optional minOffsetAvailable = 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 throttled(boolean throttled) { - Utils.checkNotNull(throttled, "throttled"); - this.throttled = Optional.ofNullable(throttled); - return this; - } - - public Builder throttled(Optional throttled) { - Utils.checkNotNull(throttled, "throttled"); - this.throttled = throttled; - return this; - } - - - public Builder complete(boolean complete) { - Utils.checkNotNull(complete, "complete"); - this.complete = Optional.ofNullable(complete); - return this; - } - - public Builder complete(Optional complete) { - Utils.checkNotNull(complete, "complete"); - this.complete = complete; - return this; - } - - - public Builder progress(double progress) { - Utils.checkNotNull(progress, "progress"); - this.progress = Optional.ofNullable(progress); - return this; - } - - public Builder progress(Optional progress) { - Utils.checkNotNull(progress, "progress"); - this.progress = progress; - return this; - } - - - public Builder size(int 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 speed(double speed) { - Utils.checkNotNull(speed, "speed"); - this.speed = Optional.ofNullable(speed); - return this; - } - - public Builder speed(Optional speed) { - Utils.checkNotNull(speed, "speed"); - this.speed = speed; - return this; - } - - - public Builder error(boolean error) { - Utils.checkNotNull(error, "error"); - this.error = Optional.ofNullable(error); - return this; - } - - public Builder error(Optional error) { - Utils.checkNotNull(error, "error"); - this.error = error; - return this; - } - - - public Builder duration(int duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = duration; - return this; - } - - - public Builder remaining(int remaining) { - Utils.checkNotNull(remaining, "remaining"); - this.remaining = Optional.ofNullable(remaining); - return this; - } - - public Builder remaining(Optional remaining) { - Utils.checkNotNull(remaining, "remaining"); - this.remaining = remaining; - return this; - } - - - public Builder context(String context) { - Utils.checkNotNull(context, "context"); - this.context = Optional.ofNullable(context); - return this; - } - - public Builder context(Optional context) { - Utils.checkNotNull(context, "context"); - this.context = context; - return this; - } - - - public Builder sourceVideoCodec(String sourceVideoCodec) { - Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); - this.sourceVideoCodec = Optional.ofNullable(sourceVideoCodec); - return this; - } - - public Builder sourceVideoCodec(Optional sourceVideoCodec) { - Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); - this.sourceVideoCodec = sourceVideoCodec; - return this; - } - - - public Builder sourceAudioCodec(String sourceAudioCodec) { - Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); - this.sourceAudioCodec = Optional.ofNullable(sourceAudioCodec); - return this; - } - - public Builder sourceAudioCodec(Optional sourceAudioCodec) { - Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); - this.sourceAudioCodec = sourceAudioCodec; - return this; - } - - - public Builder videoDecision(String videoDecision) { - Utils.checkNotNull(videoDecision, "videoDecision"); - this.videoDecision = Optional.ofNullable(videoDecision); - return this; - } - - public Builder videoDecision(Optional videoDecision) { - Utils.checkNotNull(videoDecision, "videoDecision"); - this.videoDecision = videoDecision; - return this; - } - - - public Builder audioDecision(String audioDecision) { - Utils.checkNotNull(audioDecision, "audioDecision"); - this.audioDecision = Optional.ofNullable(audioDecision); - return this; - } - - public Builder audioDecision(Optional audioDecision) { - Utils.checkNotNull(audioDecision, "audioDecision"); - this.audioDecision = audioDecision; - return this; - } - - - public Builder subtitleDecision(String subtitleDecision) { - Utils.checkNotNull(subtitleDecision, "subtitleDecision"); - this.subtitleDecision = Optional.ofNullable(subtitleDecision); - return this; - } - - public Builder subtitleDecision(Optional subtitleDecision) { - Utils.checkNotNull(subtitleDecision, "subtitleDecision"); - this.subtitleDecision = subtitleDecision; - return this; - } - - - public Builder protocol(String protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = Optional.ofNullable(protocol); - return this; - } - - public Builder protocol(Optional protocol) { - Utils.checkNotNull(protocol, "protocol"); - this.protocol = protocol; - 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 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 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 audioChannels(int 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 transcodeHwRequested(boolean transcodeHwRequested) { - Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); - this.transcodeHwRequested = Optional.ofNullable(transcodeHwRequested); - return this; - } - - public Builder transcodeHwRequested(Optional transcodeHwRequested) { - Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); - this.transcodeHwRequested = transcodeHwRequested; - return this; - } - - - public Builder timeStamp(double timeStamp) { - Utils.checkNotNull(timeStamp, "timeStamp"); - this.timeStamp = Optional.ofNullable(timeStamp); - return this; - } - - public Builder timeStamp(Optional timeStamp) { - Utils.checkNotNull(timeStamp, "timeStamp"); - this.timeStamp = timeStamp; - return this; - } - - - public Builder maxOffsetAvailable(double maxOffsetAvailable) { - Utils.checkNotNull(maxOffsetAvailable, "maxOffsetAvailable"); - this.maxOffsetAvailable = Optional.ofNullable(maxOffsetAvailable); - return this; - } - - public Builder maxOffsetAvailable(Optional maxOffsetAvailable) { - Utils.checkNotNull(maxOffsetAvailable, "maxOffsetAvailable"); - this.maxOffsetAvailable = maxOffsetAvailable; - return this; - } - - - public Builder minOffsetAvailable(double minOffsetAvailable) { - Utils.checkNotNull(minOffsetAvailable, "minOffsetAvailable"); - this.minOffsetAvailable = Optional.ofNullable(minOffsetAvailable); - return this; - } - - public Builder minOffsetAvailable(Optional minOffsetAvailable) { - Utils.checkNotNull(minOffsetAvailable, "minOffsetAvailable"); - this.minOffsetAvailable = minOffsetAvailable; - return this; - } - - public TranscodeSession build() { - - return new TranscodeSession( - key, throttled, complete, - progress, size, speed, - error, duration, remaining, - context, sourceVideoCodec, sourceAudioCodec, - videoDecision, audioDecision, subtitleDecision, - protocol, container, videoCodec, - audioCodec, audioChannels, transcodeHwRequested, - timeStamp, maxOffsetAvailable, minOffsetAvailable); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesRequest.java new file mode 100644 index 00000000..d5498add --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesRequest.java @@ -0,0 +1,2595 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.AdvancedSubtitles; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.models.shared.TranscodeType; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class TranscodeSubtitlesRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Type of transcode media + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transcodeType") + private TranscodeType transcodeType; + + /** + * Transcode session UUID + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=transcodeSessionId") + private Optional transcodeSessionId; + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=advancedSubtitles") + private Optional advancedSubtitles; + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioBoost") + private Optional audioBoost; + + /** + * Target video number of audio channels. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=audioChannelCount") + private Optional audioChannelCount; + + /** + * Indicates the client supports ABR. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustQuality") + private Optional autoAdjustQuality; + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=autoAdjustSubtitle") + private Optional autoAdjustSubtitle; + + /** + * Indicates the client supports direct playing the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directPlay") + private Optional directPlay; + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directStream") + private Optional directStream; + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=directStreamAudio") + private Optional directStreamAudio; + + /** + * Indicates if resolution should be adjusted for orientation. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=disableResolutionRotation") + private Optional disableResolutionRotation; + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=hasMDE") + private Optional hasMDE; + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=location") + private Optional location; + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaBufferSize") + private Optional mediaBufferSize; + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=mediaIndex") + private Optional mediaIndex; + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=musicBitrate") + private Optional musicBitrate; + + /** + * Offset from the start of the media (in seconds). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset") + private Optional offset; + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=partIndex") + private Optional partIndex; + + /** + * Internal PMS path of the media to transcode. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=path") + private Optional path; + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=peakBitrate") + private Optional peakBitrate; + + /** + * Target photo resolution. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=photoResolution") + private Optional photoResolution; + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=protocol") + private Optional protocol; + + /** + * Number of seconds to include in each transcoded segment + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=secondsPerSegment") + private Optional secondsPerSegment; + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitleSize") + private Optional subtitleSize; + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=subtitles") + private Optional subtitles; + + /** + * Target video bitrate (in kbps). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoBitrate") + private Optional videoBitrate; + + /** + * Target photo quality. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoQuality") + private Optional videoQuality; + + /** + * Target maximum video resolution. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=videoResolution") + private Optional videoResolution; + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Profile-Extra") + private Optional xPlexClientProfileExtra; + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Profile-Name") + private Optional xPlexClientProfileName; + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Session-Identifier") + private Optional xPlexSessionIdentifier; + + @JsonCreator + public TranscodeSubtitlesRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + TranscodeType transcodeType, + Optional transcodeSessionId, + Optional advancedSubtitles, + Optional audioBoost, + Optional audioChannelCount, + Optional autoAdjustQuality, + Optional autoAdjustSubtitle, + Optional directPlay, + Optional directStream, + Optional directStreamAudio, + Optional disableResolutionRotation, + Optional hasMDE, + Optional location, + Optional mediaBufferSize, + Optional mediaIndex, + Optional musicBitrate, + Optional offset, + Optional partIndex, + Optional path, + Optional peakBitrate, + Optional photoResolution, + Optional protocol, + Optional secondsPerSegment, + Optional subtitleSize, + Optional subtitles, + Optional videoBitrate, + Optional videoQuality, + Optional videoResolution, + Optional xPlexClientProfileExtra, + Optional xPlexClientProfileName, + Optional xPlexSessionIdentifier) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(transcodeType, "transcodeType"); + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + Utils.checkNotNull(audioBoost, "audioBoost"); + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + Utils.checkNotNull(directPlay, "directPlay"); + Utils.checkNotNull(directStream, "directStream"); + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + Utils.checkNotNull(hasMDE, "hasMDE"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + Utils.checkNotNull(mediaIndex, "mediaIndex"); + Utils.checkNotNull(musicBitrate, "musicBitrate"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(partIndex, "partIndex"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(peakBitrate, "peakBitrate"); + Utils.checkNotNull(photoResolution, "photoResolution"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + Utils.checkNotNull(subtitleSize, "subtitleSize"); + Utils.checkNotNull(subtitles, "subtitles"); + Utils.checkNotNull(videoBitrate, "videoBitrate"); + Utils.checkNotNull(videoQuality, "videoQuality"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.transcodeType = transcodeType; + this.transcodeSessionId = transcodeSessionId; + this.advancedSubtitles = advancedSubtitles; + this.audioBoost = audioBoost; + this.audioChannelCount = audioChannelCount; + this.autoAdjustQuality = autoAdjustQuality; + this.autoAdjustSubtitle = autoAdjustSubtitle; + this.directPlay = directPlay; + this.directStream = directStream; + this.directStreamAudio = directStreamAudio; + this.disableResolutionRotation = disableResolutionRotation; + this.hasMDE = hasMDE; + this.location = location; + this.mediaBufferSize = mediaBufferSize; + this.mediaIndex = mediaIndex; + this.musicBitrate = musicBitrate; + this.offset = offset; + this.partIndex = partIndex; + this.path = path; + this.peakBitrate = peakBitrate; + this.photoResolution = photoResolution; + this.protocol = protocol; + this.secondsPerSegment = secondsPerSegment; + this.subtitleSize = subtitleSize; + this.subtitles = subtitles; + this.videoBitrate = videoBitrate; + this.videoQuality = videoQuality; + this.videoResolution = videoResolution; + this.xPlexClientProfileExtra = xPlexClientProfileExtra; + this.xPlexClientProfileName = xPlexClientProfileName; + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + } + + public TranscodeSubtitlesRequest( + TranscodeType transcodeType) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), transcodeType, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Type of transcode media + */ + @JsonIgnore + public TranscodeType transcodeType() { + return transcodeType; + } + + /** + * Transcode session UUID + */ + @JsonIgnore + public Optional transcodeSessionId() { + return transcodeSessionId; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional advancedSubtitles() { + return (Optional) advancedSubtitles; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + @JsonIgnore + public Optional audioBoost() { + return audioBoost; + } + + /** + * Target video number of audio channels. + */ + @JsonIgnore + public Optional audioChannelCount() { + return audioChannelCount; + } + + /** + * Indicates the client supports ABR. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional autoAdjustQuality() { + return (Optional) autoAdjustQuality; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional autoAdjustSubtitle() { + return (Optional) autoAdjustSubtitle; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directPlay() { + return (Optional) directPlay; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directStream() { + return (Optional) directStream; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional directStreamAudio() { + return (Optional) directStreamAudio; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional disableResolutionRotation() { + return (Optional) disableResolutionRotation; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hasMDE() { + return (Optional) hasMDE; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional location() { + return (Optional) location; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + @JsonIgnore + public Optional mediaBufferSize() { + return mediaBufferSize; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + @JsonIgnore + public Optional mediaIndex() { + return mediaIndex; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + @JsonIgnore + public Optional musicBitrate() { + return musicBitrate; + } + + /** + * Offset from the start of the media (in seconds). + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + @JsonIgnore + public Optional partIndex() { + return partIndex; + } + + /** + * Internal PMS path of the media to transcode. + */ + @JsonIgnore + public Optional path() { + return path; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + @JsonIgnore + public Optional peakBitrate() { + return peakBitrate; + } + + /** + * Target photo resolution. + */ + @JsonIgnore + public Optional photoResolution() { + return photoResolution; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional protocol() { + return (Optional) protocol; + } + + /** + * Number of seconds to include in each transcoded segment + */ + @JsonIgnore + public Optional secondsPerSegment() { + return secondsPerSegment; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + @JsonIgnore + public Optional subtitleSize() { + return subtitleSize; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtitles() { + return (Optional) subtitles; + } + + /** + * Target video bitrate (in kbps). + */ + @JsonIgnore + public Optional videoBitrate() { + return videoBitrate; + } + + /** + * Target photo quality. + */ + @JsonIgnore + public Optional videoQuality() { + return videoQuality; + } + + /** + * Target maximum video resolution. + */ + @JsonIgnore + public Optional videoResolution() { + return videoResolution; + } + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + @JsonIgnore + public Optional xPlexClientProfileExtra() { + return xPlexClientProfileExtra; + } + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + @JsonIgnore + public Optional xPlexClientProfileName() { + return xPlexClientProfileName; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + @JsonIgnore + public Optional xPlexSessionIdentifier() { + return xPlexSessionIdentifier; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public TranscodeSubtitlesRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public TranscodeSubtitlesRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public TranscodeSubtitlesRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public TranscodeSubtitlesRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public TranscodeSubtitlesRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public TranscodeSubtitlesRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public TranscodeSubtitlesRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public TranscodeSubtitlesRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public TranscodeSubtitlesRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public TranscodeSubtitlesRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public TranscodeSubtitlesRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public TranscodeSubtitlesRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public TranscodeSubtitlesRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public TranscodeSubtitlesRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public TranscodeSubtitlesRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public TranscodeSubtitlesRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public TranscodeSubtitlesRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public TranscodeSubtitlesRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public TranscodeSubtitlesRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public TranscodeSubtitlesRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public TranscodeSubtitlesRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public TranscodeSubtitlesRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Type of transcode media + */ + public TranscodeSubtitlesRequest withTranscodeType(TranscodeType transcodeType) { + Utils.checkNotNull(transcodeType, "transcodeType"); + this.transcodeType = transcodeType; + return this; + } + + /** + * Transcode session UUID + */ + public TranscodeSubtitlesRequest withTranscodeSessionId(String transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = Optional.ofNullable(transcodeSessionId); + return this; + } + + + /** + * Transcode session UUID + */ + public TranscodeSubtitlesRequest withTranscodeSessionId(Optional transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = transcodeSessionId; + return this; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public TranscodeSubtitlesRequest withAdvancedSubtitles(AdvancedSubtitles advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = Optional.ofNullable(advancedSubtitles); + return this; + } + + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public TranscodeSubtitlesRequest withAdvancedSubtitles(Optional advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = advancedSubtitles; + return this; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public TranscodeSubtitlesRequest withAudioBoost(long audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public TranscodeSubtitlesRequest withAudioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + /** + * Target video number of audio channels. + */ + public TranscodeSubtitlesRequest withAudioChannelCount(long audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = Optional.ofNullable(audioChannelCount); + return this; + } + + + /** + * Target video number of audio channels. + */ + public TranscodeSubtitlesRequest withAudioChannelCount(Optional audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = audioChannelCount; + return this; + } + + /** + * Indicates the client supports ABR. + */ + public TranscodeSubtitlesRequest withAutoAdjustQuality(BoolInt autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + + /** + * Indicates the client supports ABR. + */ + public TranscodeSubtitlesRequest withAutoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public TranscodeSubtitlesRequest withAutoAdjustSubtitle(BoolInt autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public TranscodeSubtitlesRequest withAutoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + public TranscodeSubtitlesRequest withDirectPlay(BoolInt directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + + /** + * Indicates the client supports direct playing the indicated content. + */ + public TranscodeSubtitlesRequest withDirectPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public TranscodeSubtitlesRequest withDirectStream(BoolInt directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public TranscodeSubtitlesRequest withDirectStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public TranscodeSubtitlesRequest withDirectStreamAudio(BoolInt directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = Optional.ofNullable(directStreamAudio); + return this; + } + + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public TranscodeSubtitlesRequest withDirectStreamAudio(Optional directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = directStreamAudio; + return this; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public TranscodeSubtitlesRequest withDisableResolutionRotation(BoolInt disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = Optional.ofNullable(disableResolutionRotation); + return this; + } + + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public TranscodeSubtitlesRequest withDisableResolutionRotation(Optional disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = disableResolutionRotation; + return this; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public TranscodeSubtitlesRequest withHasMDE(BoolInt hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = Optional.ofNullable(hasMDE); + return this; + } + + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public TranscodeSubtitlesRequest withHasMDE(Optional hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public TranscodeSubtitlesRequest withLocation(QueryParamLocation location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public TranscodeSubtitlesRequest withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public TranscodeSubtitlesRequest withMediaBufferSize(long mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); + return this; + } + + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public TranscodeSubtitlesRequest withMediaBufferSize(Optional mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = mediaBufferSize; + return this; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public TranscodeSubtitlesRequest withMediaIndex(long mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = Optional.ofNullable(mediaIndex); + return this; + } + + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public TranscodeSubtitlesRequest withMediaIndex(Optional mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public TranscodeSubtitlesRequest withMusicBitrate(long musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = Optional.ofNullable(musicBitrate); + return this; + } + + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public TranscodeSubtitlesRequest withMusicBitrate(Optional musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = musicBitrate; + return this; + } + + /** + * Offset from the start of the media (in seconds). + */ + public TranscodeSubtitlesRequest withOffset(double offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * Offset from the start of the media (in seconds). + */ + public TranscodeSubtitlesRequest withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public TranscodeSubtitlesRequest withPartIndex(long partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = Optional.ofNullable(partIndex); + return this; + } + + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public TranscodeSubtitlesRequest withPartIndex(Optional partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = partIndex; + return this; + } + + /** + * Internal PMS path of the media to transcode. + */ + public TranscodeSubtitlesRequest withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + + /** + * Internal PMS path of the media to transcode. + */ + public TranscodeSubtitlesRequest withPath(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public TranscodeSubtitlesRequest withPeakBitrate(long peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = Optional.ofNullable(peakBitrate); + return this; + } + + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public TranscodeSubtitlesRequest withPeakBitrate(Optional peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = peakBitrate; + return this; + } + + /** + * Target photo resolution. + */ + public TranscodeSubtitlesRequest withPhotoResolution(String photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = Optional.ofNullable(photoResolution); + return this; + } + + + /** + * Target photo resolution. + */ + public TranscodeSubtitlesRequest withPhotoResolution(Optional photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = photoResolution; + return this; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public TranscodeSubtitlesRequest withProtocol(QueryParamProtocol protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public TranscodeSubtitlesRequest withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + /** + * Number of seconds to include in each transcoded segment + */ + public TranscodeSubtitlesRequest withSecondsPerSegment(long secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = Optional.ofNullable(secondsPerSegment); + return this; + } + + + /** + * Number of seconds to include in each transcoded segment + */ + public TranscodeSubtitlesRequest withSecondsPerSegment(Optional secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = secondsPerSegment; + return this; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public TranscodeSubtitlesRequest withSubtitleSize(long subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public TranscodeSubtitlesRequest withSubtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public TranscodeSubtitlesRequest withSubtitles(QueryParamSubtitles subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = Optional.ofNullable(subtitles); + return this; + } + + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public TranscodeSubtitlesRequest withSubtitles(Optional subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = subtitles; + return this; + } + + /** + * Target video bitrate (in kbps). + */ + public TranscodeSubtitlesRequest withVideoBitrate(long videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = Optional.ofNullable(videoBitrate); + return this; + } + + + /** + * Target video bitrate (in kbps). + */ + public TranscodeSubtitlesRequest withVideoBitrate(Optional videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = videoBitrate; + return this; + } + + /** + * Target photo quality. + */ + public TranscodeSubtitlesRequest withVideoQuality(long videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = Optional.ofNullable(videoQuality); + return this; + } + + + /** + * Target photo quality. + */ + public TranscodeSubtitlesRequest withVideoQuality(Optional videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = videoQuality; + return this; + } + + /** + * Target maximum video resolution. + */ + public TranscodeSubtitlesRequest withVideoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + + /** + * Target maximum video resolution. + */ + public TranscodeSubtitlesRequest withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public TranscodeSubtitlesRequest withXPlexClientProfileExtra(String xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = Optional.ofNullable(xPlexClientProfileExtra); + return this; + } + + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public TranscodeSubtitlesRequest withXPlexClientProfileExtra(Optional xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = xPlexClientProfileExtra; + return this; + } + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public TranscodeSubtitlesRequest withXPlexClientProfileName(String xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = Optional.ofNullable(xPlexClientProfileName); + return this; + } + + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public TranscodeSubtitlesRequest withXPlexClientProfileName(Optional xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = xPlexClientProfileName; + return this; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public TranscodeSubtitlesRequest withXPlexSessionIdentifier(String xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = Optional.ofNullable(xPlexSessionIdentifier); + return this; + } + + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public TranscodeSubtitlesRequest withXPlexSessionIdentifier(Optional xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranscodeSubtitlesRequest other = (TranscodeSubtitlesRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.transcodeType, other.transcodeType) && + Utils.enhancedDeepEquals(this.transcodeSessionId, other.transcodeSessionId) && + Utils.enhancedDeepEquals(this.advancedSubtitles, other.advancedSubtitles) && + Utils.enhancedDeepEquals(this.audioBoost, other.audioBoost) && + Utils.enhancedDeepEquals(this.audioChannelCount, other.audioChannelCount) && + Utils.enhancedDeepEquals(this.autoAdjustQuality, other.autoAdjustQuality) && + Utils.enhancedDeepEquals(this.autoAdjustSubtitle, other.autoAdjustSubtitle) && + Utils.enhancedDeepEquals(this.directPlay, other.directPlay) && + Utils.enhancedDeepEquals(this.directStream, other.directStream) && + Utils.enhancedDeepEquals(this.directStreamAudio, other.directStreamAudio) && + Utils.enhancedDeepEquals(this.disableResolutionRotation, other.disableResolutionRotation) && + Utils.enhancedDeepEquals(this.hasMDE, other.hasMDE) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.mediaBufferSize, other.mediaBufferSize) && + Utils.enhancedDeepEquals(this.mediaIndex, other.mediaIndex) && + Utils.enhancedDeepEquals(this.musicBitrate, other.musicBitrate) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.partIndex, other.partIndex) && + Utils.enhancedDeepEquals(this.path, other.path) && + Utils.enhancedDeepEquals(this.peakBitrate, other.peakBitrate) && + Utils.enhancedDeepEquals(this.photoResolution, other.photoResolution) && + Utils.enhancedDeepEquals(this.protocol, other.protocol) && + Utils.enhancedDeepEquals(this.secondsPerSegment, other.secondsPerSegment) && + Utils.enhancedDeepEquals(this.subtitleSize, other.subtitleSize) && + Utils.enhancedDeepEquals(this.subtitles, other.subtitles) && + Utils.enhancedDeepEquals(this.videoBitrate, other.videoBitrate) && + Utils.enhancedDeepEquals(this.videoQuality, other.videoQuality) && + Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && + Utils.enhancedDeepEquals(this.xPlexClientProfileExtra, other.xPlexClientProfileExtra) && + Utils.enhancedDeepEquals(this.xPlexClientProfileName, other.xPlexClientProfileName) && + Utils.enhancedDeepEquals(this.xPlexSessionIdentifier, other.xPlexSessionIdentifier); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, transcodeType, + transcodeSessionId, advancedSubtitles, audioBoost, + audioChannelCount, autoAdjustQuality, autoAdjustSubtitle, + directPlay, directStream, directStreamAudio, + disableResolutionRotation, hasMDE, location, + mediaBufferSize, mediaIndex, musicBitrate, + offset, partIndex, path, + peakBitrate, photoResolution, protocol, + secondsPerSegment, subtitleSize, subtitles, + videoBitrate, videoQuality, videoResolution, + xPlexClientProfileExtra, xPlexClientProfileName, xPlexSessionIdentifier); + } + + @Override + public String toString() { + return Utils.toString(TranscodeSubtitlesRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "transcodeType", transcodeType, + "transcodeSessionId", transcodeSessionId, + "advancedSubtitles", advancedSubtitles, + "audioBoost", audioBoost, + "audioChannelCount", audioChannelCount, + "autoAdjustQuality", autoAdjustQuality, + "autoAdjustSubtitle", autoAdjustSubtitle, + "directPlay", directPlay, + "directStream", directStream, + "directStreamAudio", directStreamAudio, + "disableResolutionRotation", disableResolutionRotation, + "hasMDE", hasMDE, + "location", location, + "mediaBufferSize", mediaBufferSize, + "mediaIndex", mediaIndex, + "musicBitrate", musicBitrate, + "offset", offset, + "partIndex", partIndex, + "path", path, + "peakBitrate", peakBitrate, + "photoResolution", photoResolution, + "protocol", protocol, + "secondsPerSegment", secondsPerSegment, + "subtitleSize", subtitleSize, + "subtitles", subtitles, + "videoBitrate", videoBitrate, + "videoQuality", videoQuality, + "videoResolution", videoResolution, + "xPlexClientProfileExtra", xPlexClientProfileExtra, + "xPlexClientProfileName", xPlexClientProfileName, + "xPlexSessionIdentifier", xPlexSessionIdentifier); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private TranscodeType transcodeType; + + private Optional transcodeSessionId = Optional.empty(); + + private Optional advancedSubtitles = Optional.empty(); + + private Optional audioBoost = Optional.empty(); + + private Optional audioChannelCount = Optional.empty(); + + private Optional autoAdjustQuality = Optional.empty(); + + private Optional autoAdjustSubtitle = Optional.empty(); + + private Optional directPlay = Optional.empty(); + + private Optional directStream = Optional.empty(); + + private Optional directStreamAudio = Optional.empty(); + + private Optional disableResolutionRotation = Optional.empty(); + + private Optional hasMDE = Optional.empty(); + + private Optional location = Optional.empty(); + + private Optional mediaBufferSize = Optional.empty(); + + private Optional mediaIndex = Optional.empty(); + + private Optional musicBitrate = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional partIndex = Optional.empty(); + + private Optional path = Optional.empty(); + + private Optional peakBitrate = Optional.empty(); + + private Optional photoResolution = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional secondsPerSegment = Optional.empty(); + + private Optional subtitleSize = Optional.empty(); + + private Optional subtitles = Optional.empty(); + + private Optional videoBitrate = Optional.empty(); + + private Optional videoQuality = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional xPlexClientProfileExtra = Optional.empty(); + + private Optional xPlexClientProfileName = Optional.empty(); + + private Optional xPlexSessionIdentifier = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Type of transcode media + */ + public Builder transcodeType(TranscodeType transcodeType) { + Utils.checkNotNull(transcodeType, "transcodeType"); + this.transcodeType = transcodeType; + return this; + } + + + /** + * Transcode session UUID + */ + public Builder transcodeSessionId(String transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = Optional.ofNullable(transcodeSessionId); + return this; + } + + /** + * Transcode session UUID + */ + public Builder transcodeSessionId(Optional transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = transcodeSessionId; + return this; + } + + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public Builder advancedSubtitles(AdvancedSubtitles advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = Optional.ofNullable(advancedSubtitles); + return this; + } + + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + */ + public Builder advancedSubtitles(Optional advancedSubtitles) { + Utils.checkNotNull(advancedSubtitles, "advancedSubtitles"); + this.advancedSubtitles = advancedSubtitles; + return this; + } + + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public Builder audioBoost(long audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = Optional.ofNullable(audioBoost); + return this; + } + + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + public Builder audioBoost(Optional audioBoost) { + Utils.checkNotNull(audioBoost, "audioBoost"); + this.audioBoost = audioBoost; + return this; + } + + + /** + * Target video number of audio channels. + */ + public Builder audioChannelCount(long audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = Optional.ofNullable(audioChannelCount); + return this; + } + + /** + * Target video number of audio channels. + */ + public Builder audioChannelCount(Optional audioChannelCount) { + Utils.checkNotNull(audioChannelCount, "audioChannelCount"); + this.audioChannelCount = audioChannelCount; + return this; + } + + + /** + * Indicates the client supports ABR. + */ + public Builder autoAdjustQuality(BoolInt autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = Optional.ofNullable(autoAdjustQuality); + return this; + } + + /** + * Indicates the client supports ABR. + */ + public Builder autoAdjustQuality(Optional autoAdjustQuality) { + Utils.checkNotNull(autoAdjustQuality, "autoAdjustQuality"); + this.autoAdjustQuality = autoAdjustQuality; + return this; + } + + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public Builder autoAdjustSubtitle(BoolInt autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = Optional.ofNullable(autoAdjustSubtitle); + return this; + } + + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + public Builder autoAdjustSubtitle(Optional autoAdjustSubtitle) { + Utils.checkNotNull(autoAdjustSubtitle, "autoAdjustSubtitle"); + this.autoAdjustSubtitle = autoAdjustSubtitle; + return this; + } + + + /** + * Indicates the client supports direct playing the indicated content. + */ + public Builder directPlay(BoolInt directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = Optional.ofNullable(directPlay); + return this; + } + + /** + * Indicates the client supports direct playing the indicated content. + */ + public Builder directPlay(Optional directPlay) { + Utils.checkNotNull(directPlay, "directPlay"); + this.directPlay = directPlay; + return this; + } + + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public Builder directStream(BoolInt directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = Optional.ofNullable(directStream); + return this; + } + + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + public Builder directStream(Optional directStream) { + Utils.checkNotNull(directStream, "directStream"); + this.directStream = directStream; + return this; + } + + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public Builder directStreamAudio(BoolInt directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = Optional.ofNullable(directStreamAudio); + return this; + } + + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + public Builder directStreamAudio(Optional directStreamAudio) { + Utils.checkNotNull(directStreamAudio, "directStreamAudio"); + this.directStreamAudio = directStreamAudio; + return this; + } + + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public Builder disableResolutionRotation(BoolInt disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = Optional.ofNullable(disableResolutionRotation); + return this; + } + + /** + * Indicates if resolution should be adjusted for orientation. + */ + public Builder disableResolutionRotation(Optional disableResolutionRotation) { + Utils.checkNotNull(disableResolutionRotation, "disableResolutionRotation"); + this.disableResolutionRotation = disableResolutionRotation; + return this; + } + + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public Builder hasMDE(BoolInt hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = Optional.ofNullable(hasMDE); + return this; + } + + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + public Builder hasMDE(Optional hasMDE) { + Utils.checkNotNull(hasMDE, "hasMDE"); + this.hasMDE = hasMDE; + return this; + } + + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public Builder location(QueryParamLocation location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + /** + * Network type of the client, can be used to help determine target bitrate. + */ + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public Builder mediaBufferSize(long mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = Optional.ofNullable(mediaBufferSize); + return this; + } + + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + public Builder mediaBufferSize(Optional mediaBufferSize) { + Utils.checkNotNull(mediaBufferSize, "mediaBufferSize"); + this.mediaBufferSize = mediaBufferSize; + return this; + } + + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public Builder mediaIndex(long mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = Optional.ofNullable(mediaIndex); + return this; + } + + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + public Builder mediaIndex(Optional mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public Builder musicBitrate(long musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = Optional.ofNullable(musicBitrate); + return this; + } + + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + public Builder musicBitrate(Optional musicBitrate) { + Utils.checkNotNull(musicBitrate, "musicBitrate"); + this.musicBitrate = musicBitrate; + return this; + } + + + /** + * Offset from the start of the media (in seconds). + */ + public Builder offset(double offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * Offset from the start of the media (in seconds). + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public Builder partIndex(long partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = Optional.ofNullable(partIndex); + return this; + } + + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + public Builder partIndex(Optional partIndex) { + Utils.checkNotNull(partIndex, "partIndex"); + this.partIndex = partIndex; + return this; + } + + + /** + * Internal PMS path of the media to transcode. + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + /** + * Internal PMS path of the media to transcode. + */ + public Builder path(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public Builder peakBitrate(long peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = Optional.ofNullable(peakBitrate); + return this; + } + + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + public Builder peakBitrate(Optional peakBitrate) { + Utils.checkNotNull(peakBitrate, "peakBitrate"); + this.peakBitrate = peakBitrate; + return this; + } + + + /** + * Target photo resolution. + */ + public Builder photoResolution(String photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = Optional.ofNullable(photoResolution); + return this; + } + + /** + * Target photo resolution. + */ + public Builder photoResolution(Optional photoResolution) { + Utils.checkNotNull(photoResolution, "photoResolution"); + this.photoResolution = photoResolution; + return this; + } + + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public Builder protocol(QueryParamProtocol protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + */ + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + + /** + * Number of seconds to include in each transcoded segment + */ + public Builder secondsPerSegment(long secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = Optional.ofNullable(secondsPerSegment); + return this; + } + + /** + * Number of seconds to include in each transcoded segment + */ + public Builder secondsPerSegment(Optional secondsPerSegment) { + Utils.checkNotNull(secondsPerSegment, "secondsPerSegment"); + this.secondsPerSegment = secondsPerSegment; + return this; + } + + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public Builder subtitleSize(long subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = Optional.ofNullable(subtitleSize); + return this; + } + + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + public Builder subtitleSize(Optional subtitleSize) { + Utils.checkNotNull(subtitleSize, "subtitleSize"); + this.subtitleSize = subtitleSize; + return this; + } + + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public Builder subtitles(QueryParamSubtitles subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = Optional.ofNullable(subtitles); + return this; + } + + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + */ + public Builder subtitles(Optional subtitles) { + Utils.checkNotNull(subtitles, "subtitles"); + this.subtitles = subtitles; + return this; + } + + + /** + * Target video bitrate (in kbps). + */ + public Builder videoBitrate(long videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = Optional.ofNullable(videoBitrate); + return this; + } + + /** + * Target video bitrate (in kbps). + */ + public Builder videoBitrate(Optional videoBitrate) { + Utils.checkNotNull(videoBitrate, "videoBitrate"); + this.videoBitrate = videoBitrate; + return this; + } + + + /** + * Target photo quality. + */ + public Builder videoQuality(long videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = Optional.ofNullable(videoQuality); + return this; + } + + /** + * Target photo quality. + */ + public Builder videoQuality(Optional videoQuality) { + Utils.checkNotNull(videoQuality, "videoQuality"); + this.videoQuality = videoQuality; + return this; + } + + + /** + * Target maximum video resolution. + */ + public Builder videoResolution(String videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + /** + * Target maximum video resolution. + */ + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public Builder xPlexClientProfileExtra(String xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = Optional.ofNullable(xPlexClientProfileExtra); + return this; + } + + /** + * See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . + */ + public Builder xPlexClientProfileExtra(Optional xPlexClientProfileExtra) { + Utils.checkNotNull(xPlexClientProfileExtra, "xPlexClientProfileExtra"); + this.xPlexClientProfileExtra = xPlexClientProfileExtra; + return this; + } + + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public Builder xPlexClientProfileName(String xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = Optional.ofNullable(xPlexClientProfileName); + return this; + } + + /** + * Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. + */ + public Builder xPlexClientProfileName(Optional xPlexClientProfileName) { + Utils.checkNotNull(xPlexClientProfileName, "xPlexClientProfileName"); + this.xPlexClientProfileName = xPlexClientProfileName; + return this; + } + + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public Builder xPlexSessionIdentifier(String xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = Optional.ofNullable(xPlexSessionIdentifier); + return this; + } + + /** + * Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) + */ + public Builder xPlexSessionIdentifier(Optional xPlexSessionIdentifier) { + Utils.checkNotNull(xPlexSessionIdentifier, "xPlexSessionIdentifier"); + this.xPlexSessionIdentifier = xPlexSessionIdentifier; + return this; + } + + public TranscodeSubtitlesRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new TranscodeSubtitlesRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, transcodeType, + transcodeSessionId, advancedSubtitles, audioBoost, + audioChannelCount, autoAdjustQuality, autoAdjustSubtitle, + directPlay, directStream, directStreamAudio, + disableResolutionRotation, hasMDE, location, + mediaBufferSize, mediaIndex, musicBitrate, + offset, partIndex, path, + peakBitrate, photoResolution, protocol, + secondsPerSegment, subtitleSize, subtitles, + videoBitrate, videoQuality, videoResolution, + xPlexClientProfileExtra, xPlexClientProfileName, xPlexSessionIdentifier); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesRequestBuilder.java new file mode 100644 index 00000000..00ce7ebd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.TranscodeSubtitles; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class TranscodeSubtitlesRequestBuilder { + + private TranscodeSubtitlesRequest request; + private final SDKConfiguration sdkConfiguration; + + public TranscodeSubtitlesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public TranscodeSubtitlesRequestBuilder request(TranscodeSubtitlesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public TranscodeSubtitlesResponse call() throws Exception { + + RequestOperation operation + = new TranscodeSubtitles.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesResponse.java new file mode 100644 index 00000000..1d1b082c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TranscodeSubtitlesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class TranscodeSubtitlesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public TranscodeSubtitlesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public TranscodeSubtitlesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TranscodeSubtitlesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TranscodeSubtitlesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranscodeSubtitlesResponse other = (TranscodeSubtitlesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(TranscodeSubtitlesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public TranscodeSubtitlesResponse build() { + + return new TranscodeSubtitlesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Trials.java b/src/main/java/dev/plexapi/sdk/models/operations/Trials.java deleted file mode 100644 index 5a188425..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Trials.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; - - -public class Trials { - @JsonCreator - public Trials() { - } - - public static Builder builder() { - return new Builder(); - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - ); - } - - @Override - public String toString() { - return Utils.toString(Trials.class); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public Trials build() { - - return new Trials( - ); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackRequest.java new file mode 100644 index 00000000..9ad6cf45 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackRequest.java @@ -0,0 +1,842 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.TranscodeType; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class TriggerFallbackRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Type of transcode media + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transcodeType") + private TranscodeType transcodeType; + + /** + * Transcode session UUID + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=transcodeSessionId") + private Optional transcodeSessionId; + + @JsonCreator + public TriggerFallbackRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + TranscodeType transcodeType, + Optional transcodeSessionId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(transcodeType, "transcodeType"); + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.transcodeType = transcodeType; + this.transcodeSessionId = transcodeSessionId; + } + + public TriggerFallbackRequest( + TranscodeType transcodeType) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), transcodeType, + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Type of transcode media + */ + @JsonIgnore + public TranscodeType transcodeType() { + return transcodeType; + } + + /** + * Transcode session UUID + */ + @JsonIgnore + public Optional transcodeSessionId() { + return transcodeSessionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public TriggerFallbackRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public TriggerFallbackRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public TriggerFallbackRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public TriggerFallbackRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public TriggerFallbackRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public TriggerFallbackRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public TriggerFallbackRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public TriggerFallbackRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public TriggerFallbackRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public TriggerFallbackRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public TriggerFallbackRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public TriggerFallbackRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public TriggerFallbackRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public TriggerFallbackRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public TriggerFallbackRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public TriggerFallbackRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public TriggerFallbackRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public TriggerFallbackRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public TriggerFallbackRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public TriggerFallbackRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public TriggerFallbackRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public TriggerFallbackRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Type of transcode media + */ + public TriggerFallbackRequest withTranscodeType(TranscodeType transcodeType) { + Utils.checkNotNull(transcodeType, "transcodeType"); + this.transcodeType = transcodeType; + return this; + } + + /** + * Transcode session UUID + */ + public TriggerFallbackRequest withTranscodeSessionId(String transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = Optional.ofNullable(transcodeSessionId); + return this; + } + + + /** + * Transcode session UUID + */ + public TriggerFallbackRequest withTranscodeSessionId(Optional transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = transcodeSessionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TriggerFallbackRequest other = (TriggerFallbackRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.transcodeType, other.transcodeType) && + Utils.enhancedDeepEquals(this.transcodeSessionId, other.transcodeSessionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, transcodeType, + transcodeSessionId); + } + + @Override + public String toString() { + return Utils.toString(TriggerFallbackRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "transcodeType", transcodeType, + "transcodeSessionId", transcodeSessionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private TranscodeType transcodeType; + + private Optional transcodeSessionId = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Type of transcode media + */ + public Builder transcodeType(TranscodeType transcodeType) { + Utils.checkNotNull(transcodeType, "transcodeType"); + this.transcodeType = transcodeType; + return this; + } + + + /** + * Transcode session UUID + */ + public Builder transcodeSessionId(String transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = Optional.ofNullable(transcodeSessionId); + return this; + } + + /** + * Transcode session UUID + */ + public Builder transcodeSessionId(Optional transcodeSessionId) { + Utils.checkNotNull(transcodeSessionId, "transcodeSessionId"); + this.transcodeSessionId = transcodeSessionId; + return this; + } + + public TriggerFallbackRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new TriggerFallbackRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, transcodeType, + transcodeSessionId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackRequestBuilder.java new file mode 100644 index 00000000..e7c19513 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.TriggerFallback; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class TriggerFallbackRequestBuilder { + + private TriggerFallbackRequest request; + private final SDKConfiguration sdkConfiguration; + + public TriggerFallbackRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public TriggerFallbackRequestBuilder request(TriggerFallbackRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public TriggerFallbackResponse call() throws Exception { + + RequestOperation operation + = new TriggerFallback.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackResponse.java new file mode 100644 index 00000000..f4be9683 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TriggerFallbackResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class TriggerFallbackResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public TriggerFallbackResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public TriggerFallbackResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TriggerFallbackResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TriggerFallbackResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TriggerFallbackResponse other = (TriggerFallbackResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(TriggerFallbackResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public TriggerFallbackResponse build() { + + return new TriggerFallbackResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TuneChannelRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/TuneChannelRequest.java new file mode 100644 index 00000000..4e451821 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TuneChannelRequest.java @@ -0,0 +1,824 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class TuneChannelRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the DVR. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dvrId") + private long dvrId; + + /** + * The channel ID to tune + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=channel") + private String channel; + + @JsonCreator + public TuneChannelRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long dvrId, + String channel) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(dvrId, "dvrId"); + Utils.checkNotNull(channel, "channel"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.dvrId = dvrId; + this.channel = channel; + } + + public TuneChannelRequest( + long dvrId, + String channel) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), dvrId, + channel); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the DVR. + */ + @JsonIgnore + public long dvrId() { + return dvrId; + } + + /** + * The channel ID to tune + */ + @JsonIgnore + public String channel() { + return channel; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public TuneChannelRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public TuneChannelRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public TuneChannelRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public TuneChannelRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public TuneChannelRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public TuneChannelRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public TuneChannelRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public TuneChannelRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public TuneChannelRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public TuneChannelRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public TuneChannelRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public TuneChannelRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public TuneChannelRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public TuneChannelRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public TuneChannelRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public TuneChannelRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public TuneChannelRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public TuneChannelRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public TuneChannelRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public TuneChannelRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public TuneChannelRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public TuneChannelRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the DVR. + */ + public TuneChannelRequest withDvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + /** + * The channel ID to tune + */ + public TuneChannelRequest withChannel(String channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TuneChannelRequest other = (TuneChannelRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.dvrId, other.dvrId) && + Utils.enhancedDeepEquals(this.channel, other.channel); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + channel); + } + + @Override + public String toString() { + return Utils.toString(TuneChannelRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "dvrId", dvrId, + "channel", channel); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long dvrId; + + private String channel; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the DVR. + */ + public Builder dvrId(long dvrId) { + Utils.checkNotNull(dvrId, "dvrId"); + this.dvrId = dvrId; + return this; + } + + + /** + * The channel ID to tune + */ + public Builder channel(String channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + + public TuneChannelRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new TuneChannelRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, dvrId, + channel); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TuneChannelRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/TuneChannelRequestBuilder.java new file mode 100644 index 00000000..49889e28 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TuneChannelRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.TuneChannel; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class TuneChannelRequestBuilder { + + private TuneChannelRequest request; + private final SDKConfiguration sdkConfiguration; + + public TuneChannelRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public TuneChannelRequestBuilder request(TuneChannelRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public TuneChannelResponse call() throws Exception { + + RequestOperation operation + = new TuneChannel.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/TuneChannelResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/TuneChannelResponse.java new file mode 100644 index 00000000..6175476a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/TuneChannelResponse.java @@ -0,0 +1,285 @@ +/* + * 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.models.shared.MediaContainerWithMetadata; +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.List; +import java.util.Map; +import java.util.Optional; + + +public class TuneChannelResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public TuneChannelResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public TuneChannelResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public TuneChannelResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TuneChannelResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TuneChannelResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public TuneChannelResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public TuneChannelResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public TuneChannelResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TuneChannelResponse other = (TuneChannelResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(TuneChannelResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public TuneChannelResponse build() { + + return new TuneChannelResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Type.java b/src/main/java/dev/plexapi/sdk/models/operations/Type.java index 6b70a5ec..2e19c46f 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Type.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Type.java @@ -3,216 +3,39 @@ */ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.core.JacksonException; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.lang.Long; -import java.lang.Override; +import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; import java.util.Objects; import java.util.Optional; -/** - *

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

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

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

The type of media to retrieve or filter by. - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + *

The type of play queue to create */ -@JsonDeserialize(using = Type._Deserializer.class) -@JsonSerialize(using = Type._Serializer.class) -public class Type { +public enum Type { + AUDIO("audio"), + VIDEO("video"), + PHOTO("photo"); - public static final Type Movie = new Type(1L); - public static final Type TvShow = new Type(2L); - public static final Type Season = new Type(3L); - public static final Type Episode = new Type(4L); - public static final Type Artist = new Type(5L); - public static final Type Album = new Type(6L); - public static final Type Track = new Type(7L); - public static final Type PhotoAlbum = new Type(8L); - public static final Type Photo = new Type(9L); + @JsonValue + private final String value; - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final long value; - - private Type(long value) { + Type(String value) { this.value = value; } - - /** - * Returns a Type with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as Type - */ - public static Type of(long value) { - synchronized (Type.class) { - return values.computeIfAbsent(value, v -> new Type(v)); - } - } - - public long value() { + + public String value() { return value; } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Type other = (Type) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "Type [value=" + value + "]"; - } - - // return an array just like an enum - public static Type[] values() { - synchronized (Type.class) { - return values.values().toArray(new Type[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put(1L, Movie); - map.put(2L, TvShow); - map.put(3L, Season); - map.put(4L, Episode); - map.put(5L, Artist); - map.put(6L, Album); - map.put(7L, Track); - map.put(8L, PhotoAlbum); - map.put(9L, Photo); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put(1L, TypeEnum.Movie); - map.put(2L, TypeEnum.TvShow); - map.put(3L, TypeEnum.Season); - map.put(4L, TypeEnum.Episode); - map.put(5L, TypeEnum.Artist); - map.put(6L, TypeEnum.Album); - map.put(7L, TypeEnum.Track); - map.put(8L, TypeEnum.PhotoAlbum); - map.put(9L, TypeEnum.Photo); - return map; - } - @SuppressWarnings("serial") - public static final class _Serializer extends StdSerializer { - - protected _Serializer() { - super(Type.class); - } - - @Override - public void serialize(Type value, JsonGenerator g, SerializerProvider provider) - throws IOException, JsonProcessingException { - g.writeObject(value.value); - } - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends StdDeserializer { - - protected _Deserializer() { - super(Type.class); - } - - @Override - public Type deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JacksonException { - long v = p.readValueAs(new TypeReference() {}); - // use the factory method to ensure we get singletons - return Type.of(v); - } - } - - public enum TypeEnum { - - Movie(1L), - TvShow(2L), - Season(3L), - Episode(4L), - Artist(5L), - Album(6L), - Track(7L), - PhotoAlbum(8L), - Photo(9L),; - - private final long value; - - private TypeEnum(long value) { - this.value = value; - } - - public long value() { - return value; + public static Optional fromValue(String value) { + for (Type o: Type.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } } + return Optional.empty(); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UltraBlurColors.java b/src/main/java/dev/plexapi/sdk/models/operations/UltraBlurColors.java index d6419822..0411a1c2 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/UltraBlurColors.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/UltraBlurColors.java @@ -5,63 +5,95 @@ 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.Optional; public class UltraBlurColors { - - @JsonProperty("topLeft") - private String topLeft; - - - @JsonProperty("topRight") - private String topRight; - - - @JsonProperty("bottomRight") - private String bottomRight; - - + /** + * The color (hex) for the bottom left quadrant. + */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("bottomLeft") - private String bottomLeft; + private Optional bottomLeft; + + /** + * The color (hex) for the bottom right quadrant. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bottomRight") + private Optional bottomRight; + + /** + * The color (hex) for the top left quadrant. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("topLeft") + private Optional topLeft; + + /** + * The color (hex) for the top right quadrant. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("topRight") + private Optional topRight; @JsonCreator public UltraBlurColors( - @JsonProperty("topLeft") String topLeft, - @JsonProperty("topRight") String topRight, - @JsonProperty("bottomRight") String bottomRight, - @JsonProperty("bottomLeft") String bottomLeft) { + @JsonProperty("bottomLeft") Optional bottomLeft, + @JsonProperty("bottomRight") Optional bottomRight, + @JsonProperty("topLeft") Optional topLeft, + @JsonProperty("topRight") Optional topRight) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + Utils.checkNotNull(bottomRight, "bottomRight"); Utils.checkNotNull(topLeft, "topLeft"); Utils.checkNotNull(topRight, "topRight"); - Utils.checkNotNull(bottomRight, "bottomRight"); - Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = bottomLeft; + this.bottomRight = bottomRight; this.topLeft = topLeft; this.topRight = topRight; - this.bottomRight = bottomRight; - this.bottomLeft = bottomLeft; + } + + public UltraBlurColors() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } + /** + * The color (hex) for the bottom left quadrant. + */ @JsonIgnore - public String topLeft() { - return topLeft; + public Optional bottomLeft() { + return bottomLeft; } + /** + * The color (hex) for the bottom right quadrant. + */ @JsonIgnore - public String topRight() { - return topRight; - } - - @JsonIgnore - public String bottomRight() { + public Optional bottomRight() { return bottomRight; } + /** + * The color (hex) for the top left quadrant. + */ @JsonIgnore - public String bottomLeft() { - return bottomLeft; + public Optional topLeft() { + return topLeft; + } + + /** + * The color (hex) for the top right quadrant. + */ + @JsonIgnore + public Optional topRight() { + return topRight; } public static Builder builder() { @@ -69,27 +101,79 @@ public class UltraBlurColors { } - public UltraBlurColors withTopLeft(String topLeft) { - Utils.checkNotNull(topLeft, "topLeft"); - this.topLeft = topLeft; + /** + * The color (hex) for the bottom left quadrant. + */ + public UltraBlurColors withBottomLeft(String bottomLeft) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = Optional.ofNullable(bottomLeft); return this; } - public UltraBlurColors withTopRight(String topRight) { - Utils.checkNotNull(topRight, "topRight"); - this.topRight = topRight; + + /** + * The color (hex) for the bottom left quadrant. + */ + public UltraBlurColors withBottomLeft(Optional bottomLeft) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = bottomLeft; return this; } + /** + * The color (hex) for the bottom right quadrant. + */ public UltraBlurColors withBottomRight(String bottomRight) { + Utils.checkNotNull(bottomRight, "bottomRight"); + this.bottomRight = Optional.ofNullable(bottomRight); + return this; + } + + + /** + * The color (hex) for the bottom right quadrant. + */ + public UltraBlurColors withBottomRight(Optional bottomRight) { Utils.checkNotNull(bottomRight, "bottomRight"); this.bottomRight = bottomRight; return this; } - public UltraBlurColors withBottomLeft(String bottomLeft) { - Utils.checkNotNull(bottomLeft, "bottomLeft"); - this.bottomLeft = bottomLeft; + /** + * The color (hex) for the top left quadrant. + */ + public UltraBlurColors withTopLeft(String topLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + this.topLeft = Optional.ofNullable(topLeft); + return this; + } + + + /** + * The color (hex) for the top left quadrant. + */ + public UltraBlurColors withTopLeft(Optional topLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + this.topLeft = topLeft; + return this; + } + + /** + * The color (hex) for the top right quadrant. + */ + public UltraBlurColors withTopRight(String topRight) { + Utils.checkNotNull(topRight, "topRight"); + this.topRight = Optional.ofNullable(topRight); + return this; + } + + + /** + * The color (hex) for the top right quadrant. + */ + public UltraBlurColors withTopRight(Optional topRight) { + Utils.checkNotNull(topRight, "topRight"); + this.topRight = topRight; return this; } @@ -103,76 +187,124 @@ public class UltraBlurColors { } UltraBlurColors other = (UltraBlurColors) o; return - Utils.enhancedDeepEquals(this.topLeft, other.topLeft) && - Utils.enhancedDeepEquals(this.topRight, other.topRight) && + Utils.enhancedDeepEquals(this.bottomLeft, other.bottomLeft) && Utils.enhancedDeepEquals(this.bottomRight, other.bottomRight) && - Utils.enhancedDeepEquals(this.bottomLeft, other.bottomLeft); + Utils.enhancedDeepEquals(this.topLeft, other.topLeft) && + Utils.enhancedDeepEquals(this.topRight, other.topRight); } @Override public int hashCode() { return Utils.enhancedHash( - topLeft, topRight, bottomRight, - bottomLeft); + bottomLeft, bottomRight, topLeft, + topRight); } @Override public String toString() { return Utils.toString(UltraBlurColors.class, - "topLeft", topLeft, - "topRight", topRight, + "bottomLeft", bottomLeft, "bottomRight", bottomRight, - "bottomLeft", bottomLeft); + "topLeft", topLeft, + "topRight", topRight); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private String topLeft; + private Optional bottomLeft = Optional.empty(); - private String topRight; + private Optional bottomRight = Optional.empty(); - private String bottomRight; + private Optional topLeft = Optional.empty(); - private String bottomLeft; + private Optional topRight = Optional.empty(); 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; + /** + * The color (hex) for the bottom left quadrant. + */ + public Builder bottomLeft(String bottomLeft) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = Optional.ofNullable(bottomLeft); + return this; + } + + /** + * The color (hex) for the bottom left quadrant. + */ + public Builder bottomLeft(Optional bottomLeft) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = bottomLeft; return this; } + /** + * The color (hex) for the bottom right quadrant. + */ public Builder bottomRight(String bottomRight) { + Utils.checkNotNull(bottomRight, "bottomRight"); + this.bottomRight = Optional.ofNullable(bottomRight); + return this; + } + + /** + * The color (hex) for the bottom right quadrant. + */ + public Builder bottomRight(Optional bottomRight) { Utils.checkNotNull(bottomRight, "bottomRight"); this.bottomRight = bottomRight; return this; } - public Builder bottomLeft(String bottomLeft) { - Utils.checkNotNull(bottomLeft, "bottomLeft"); - this.bottomLeft = bottomLeft; + /** + * The color (hex) for the top left quadrant. + */ + public Builder topLeft(String topLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + this.topLeft = Optional.ofNullable(topLeft); + return this; + } + + /** + * The color (hex) for the top left quadrant. + */ + public Builder topLeft(Optional topLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + this.topLeft = topLeft; + return this; + } + + + /** + * The color (hex) for the top right quadrant. + */ + public Builder topRight(String topRight) { + Utils.checkNotNull(topRight, "topRight"); + this.topRight = Optional.ofNullable(topRight); + return this; + } + + /** + * The color (hex) for the top right quadrant. + */ + public Builder topRight(Optional topRight) { + Utils.checkNotNull(topRight, "topRight"); + this.topRight = topRight; return this; } public UltraBlurColors build() { return new UltraBlurColors( - topLeft, topRight, bottomRight, - bottomLeft); + bottomLeft, bottomRight, topLeft, + topRight); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UnmatchRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/UnmatchRequest.java new file mode 100644 index 00000000..a12458a4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UnmatchRequest.java @@ -0,0 +1,768 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class UnmatchRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + @JsonCreator + public UnmatchRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + } + + public UnmatchRequest( + String ids) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UnmatchRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UnmatchRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public UnmatchRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public UnmatchRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public UnmatchRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public UnmatchRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public UnmatchRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public UnmatchRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public UnmatchRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public UnmatchRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public UnmatchRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public UnmatchRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public UnmatchRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public UnmatchRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public UnmatchRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public UnmatchRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public UnmatchRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public UnmatchRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public UnmatchRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public UnmatchRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public UnmatchRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public UnmatchRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public UnmatchRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnmatchRequest other = (UnmatchRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + @Override + public String toString() { + return Utils.toString(UnmatchRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public UnmatchRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new UnmatchRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UnmatchRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/UnmatchRequestBuilder.java new file mode 100644 index 00000000..06a69c8c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UnmatchRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.Unmatch; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class UnmatchRequestBuilder { + + private UnmatchRequest request; + private final SDKConfiguration sdkConfiguration; + + public UnmatchRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UnmatchRequestBuilder request(UnmatchRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UnmatchResponse call() throws Exception { + + RequestOperation operation + = new Unmatch.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UnmatchResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/UnmatchResponse.java new file mode 100644 index 00000000..46225039 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UnmatchResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class UnmatchResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UnmatchResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UnmatchResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UnmatchResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UnmatchResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnmatchResponse other = (UnmatchResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UnmatchResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UnmatchResponse build() { + + return new UnmatchResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleRequest.java new file mode 100644 index 00000000..5ca76ed2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleRequest.java @@ -0,0 +1,900 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class UnscrobbleRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=identifier") + private String identifier; + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") + private Optional key; + + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=uri") + private Optional uri; + + @JsonCreator + public UnscrobbleRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String identifier, + Optional key, + Optional uri) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(uri, "uri"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.identifier = identifier; + this.key = key; + this.uri = uri; + } + + public UnscrobbleRequest( + String identifier) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), identifier, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + @JsonIgnore + public String identifier() { + return identifier; + } + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + @JsonIgnore + public Optional key() { + return key; + } + + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + @JsonIgnore + public Optional uri() { + return uri; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UnscrobbleRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UnscrobbleRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public UnscrobbleRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public UnscrobbleRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public UnscrobbleRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public UnscrobbleRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public UnscrobbleRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public UnscrobbleRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public UnscrobbleRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public UnscrobbleRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public UnscrobbleRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public UnscrobbleRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public UnscrobbleRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public UnscrobbleRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public UnscrobbleRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public UnscrobbleRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public UnscrobbleRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public UnscrobbleRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public UnscrobbleRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public UnscrobbleRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public UnscrobbleRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public UnscrobbleRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + public UnscrobbleRequest withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + public UnscrobbleRequest withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + public UnscrobbleRequest withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + public UnscrobbleRequest withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + public UnscrobbleRequest withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnscrobbleRequest other = (UnscrobbleRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.uri, other.uri); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, identifier, + key, uri); + } + + @Override + public String toString() { + return Utils.toString(UnscrobbleRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "identifier", identifier, + "key", key, + "uri", uri); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String identifier; + + private Optional key = Optional.empty(); + + private Optional uri = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key of the item to rate. This is the `ratingKey` found in metadata items + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + /** + * The URI of the item to mark as played. See intro for description of the URIs + */ + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + public UnscrobbleRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new UnscrobbleRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, identifier, + key, uri); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleRequestBuilder.java new file mode 100644 index 00000000..1c0e80fe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.Unscrobble; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class UnscrobbleRequestBuilder { + + private UnscrobbleRequest request; + private final SDKConfiguration sdkConfiguration; + + public UnscrobbleRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UnscrobbleRequestBuilder request(UnscrobbleRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UnscrobbleResponse call() throws Exception { + + RequestOperation operation + = new Unscrobble.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleResponse.java new file mode 100644 index 00000000..d202adf9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UnscrobbleResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class UnscrobbleResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UnscrobbleResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UnscrobbleResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UnscrobbleResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UnscrobbleResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnscrobbleResponse other = (UnscrobbleResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UnscrobbleResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UnscrobbleResponse build() { + + return new UnscrobbleResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UnshuffleRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/UnshuffleRequest.java new file mode 100644 index 00000000..b64bbab6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UnshuffleRequest.java @@ -0,0 +1,780 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class UnshuffleRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the play queue. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playQueueId") + private long playQueueId; + + @JsonCreator + public UnshuffleRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playQueueId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playQueueId, "playQueueId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playQueueId = playQueueId; + } + + public UnshuffleRequest( + long playQueueId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playQueueId); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the play queue. + */ + @JsonIgnore + public long playQueueId() { + return playQueueId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UnshuffleRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UnshuffleRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public UnshuffleRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public UnshuffleRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public UnshuffleRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public UnshuffleRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public UnshuffleRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public UnshuffleRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public UnshuffleRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public UnshuffleRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public UnshuffleRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public UnshuffleRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public UnshuffleRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public UnshuffleRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public UnshuffleRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public UnshuffleRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public UnshuffleRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public UnshuffleRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public UnshuffleRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public UnshuffleRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public UnshuffleRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public UnshuffleRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the play queue. + */ + public UnshuffleRequest withPlayQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnshuffleRequest other = (UnshuffleRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playQueueId, other.playQueueId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId); + } + + @Override + public String toString() { + return Utils.toString(UnshuffleRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playQueueId", playQueueId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playQueueId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the play queue. + */ + public Builder playQueueId(long playQueueId) { + Utils.checkNotNull(playQueueId, "playQueueId"); + this.playQueueId = playQueueId; + return this; + } + + public UnshuffleRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new UnshuffleRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playQueueId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UnshuffleRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/UnshuffleRequestBuilder.java new file mode 100644 index 00000000..a7478940 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UnshuffleRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.Unshuffle; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class UnshuffleRequestBuilder { + + private UnshuffleRequest request; + private final SDKConfiguration sdkConfiguration; + + public UnshuffleRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UnshuffleRequestBuilder request(UnshuffleRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UnshuffleResponse call() throws Exception { + + RequestOperation operation + = new Unshuffle.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UnshuffleResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/UnshuffleResponse.java new file mode 100644 index 00000000..0df9ce41 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UnshuffleResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +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.Optional; + + +public class UnshuffleResponse 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public UnshuffleResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public UnshuffleResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UnshuffleResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UnshuffleResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UnshuffleResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public UnshuffleResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public UnshuffleResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnshuffleResponse other = (UnshuffleResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(UnshuffleResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public UnshuffleResponse build() { + + return new UnshuffleResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityRequest.java new file mode 100644 index 00000000..ba98d9b9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityRequest.java @@ -0,0 +1,1008 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class UpdateHubVisibilityRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The section ID for the hubs to change + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private long sectionId; + + /** + * The identifier of the hub to change + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=identifier") + private String identifier; + + /** + * Whether this hub should be displayed in recommended + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=promotedToRecommended") + private Optional promotedToRecommended; + + /** + * Whether this hub should be displayed in admin's home + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=promotedToOwnHome") + private Optional promotedToOwnHome; + + /** + * Whether this hub should be displayed in shared user's home + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=promotedToSharedHome") + private Optional promotedToSharedHome; + + @JsonCreator + public UpdateHubVisibilityRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long sectionId, + String identifier, + Optional promotedToRecommended, + Optional promotedToOwnHome, + Optional promotedToSharedHome) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.identifier = identifier; + this.promotedToRecommended = promotedToRecommended; + this.promotedToOwnHome = promotedToOwnHome; + this.promotedToSharedHome = promotedToSharedHome; + } + + public UpdateHubVisibilityRequest( + long sectionId, + String identifier) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + identifier, Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The section ID for the hubs to change + */ + @JsonIgnore + public long sectionId() { + return sectionId; + } + + /** + * The identifier of the hub to change + */ + @JsonIgnore + public String identifier() { + return identifier; + } + + /** + * Whether this hub should be displayed in recommended + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional promotedToRecommended() { + return (Optional) promotedToRecommended; + } + + /** + * Whether this hub should be displayed in admin's home + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional promotedToOwnHome() { + return (Optional) promotedToOwnHome; + } + + /** + * Whether this hub should be displayed in shared user's home + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional promotedToSharedHome() { + return (Optional) promotedToSharedHome; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UpdateHubVisibilityRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UpdateHubVisibilityRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public UpdateHubVisibilityRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public UpdateHubVisibilityRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public UpdateHubVisibilityRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public UpdateHubVisibilityRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public UpdateHubVisibilityRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public UpdateHubVisibilityRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public UpdateHubVisibilityRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public UpdateHubVisibilityRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public UpdateHubVisibilityRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public UpdateHubVisibilityRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public UpdateHubVisibilityRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public UpdateHubVisibilityRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public UpdateHubVisibilityRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public UpdateHubVisibilityRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public UpdateHubVisibilityRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public UpdateHubVisibilityRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public UpdateHubVisibilityRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public UpdateHubVisibilityRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public UpdateHubVisibilityRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public UpdateHubVisibilityRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The section ID for the hubs to change + */ + public UpdateHubVisibilityRequest withSectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + /** + * The identifier of the hub to change + */ + public UpdateHubVisibilityRequest withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * Whether this hub should be displayed in recommended + */ + public UpdateHubVisibilityRequest withPromotedToRecommended(BoolInt promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = Optional.ofNullable(promotedToRecommended); + return this; + } + + + /** + * Whether this hub should be displayed in recommended + */ + public UpdateHubVisibilityRequest withPromotedToRecommended(Optional promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = promotedToRecommended; + return this; + } + + /** + * Whether this hub should be displayed in admin's home + */ + public UpdateHubVisibilityRequest withPromotedToOwnHome(BoolInt promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = Optional.ofNullable(promotedToOwnHome); + return this; + } + + + /** + * Whether this hub should be displayed in admin's home + */ + public UpdateHubVisibilityRequest withPromotedToOwnHome(Optional promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = promotedToOwnHome; + return this; + } + + /** + * Whether this hub should be displayed in shared user's home + */ + public UpdateHubVisibilityRequest withPromotedToSharedHome(BoolInt promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = Optional.ofNullable(promotedToSharedHome); + return this; + } + + + /** + * Whether this hub should be displayed in shared user's home + */ + public UpdateHubVisibilityRequest withPromotedToSharedHome(Optional promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = promotedToSharedHome; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateHubVisibilityRequest other = (UpdateHubVisibilityRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.promotedToRecommended, other.promotedToRecommended) && + Utils.enhancedDeepEquals(this.promotedToOwnHome, other.promotedToOwnHome) && + Utils.enhancedDeepEquals(this.promotedToSharedHome, other.promotedToSharedHome); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + identifier, promotedToRecommended, promotedToOwnHome, + promotedToSharedHome); + } + + @Override + public String toString() { + return Utils.toString(UpdateHubVisibilityRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "identifier", identifier, + "promotedToRecommended", promotedToRecommended, + "promotedToOwnHome", promotedToOwnHome, + "promotedToSharedHome", promotedToSharedHome); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long sectionId; + + private String identifier; + + private Optional promotedToRecommended = Optional.empty(); + + private Optional promotedToOwnHome = Optional.empty(); + + private Optional promotedToSharedHome = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The section ID for the hubs to change + */ + public Builder sectionId(long sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + + /** + * The identifier of the hub to change + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + + /** + * Whether this hub should be displayed in recommended + */ + public Builder promotedToRecommended(BoolInt promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = Optional.ofNullable(promotedToRecommended); + return this; + } + + /** + * Whether this hub should be displayed in recommended + */ + public Builder promotedToRecommended(Optional promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = promotedToRecommended; + return this; + } + + + /** + * Whether this hub should be displayed in admin's home + */ + public Builder promotedToOwnHome(BoolInt promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = Optional.ofNullable(promotedToOwnHome); + return this; + } + + /** + * Whether this hub should be displayed in admin's home + */ + public Builder promotedToOwnHome(Optional promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = promotedToOwnHome; + return this; + } + + + /** + * Whether this hub should be displayed in shared user's home + */ + public Builder promotedToSharedHome(BoolInt promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = Optional.ofNullable(promotedToSharedHome); + return this; + } + + /** + * Whether this hub should be displayed in shared user's home + */ + public Builder promotedToSharedHome(Optional promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = promotedToSharedHome; + return this; + } + + public UpdateHubVisibilityRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new UpdateHubVisibilityRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + identifier, promotedToRecommended, promotedToOwnHome, + promotedToSharedHome); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityRequestBuilder.java new file mode 100644 index 00000000..f341772f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.UpdateHubVisibility; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class UpdateHubVisibilityRequestBuilder { + + private UpdateHubVisibilityRequest request; + private final SDKConfiguration sdkConfiguration; + + public UpdateHubVisibilityRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UpdateHubVisibilityRequestBuilder request(UpdateHubVisibilityRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UpdateHubVisibilityResponse call() throws Exception { + + RequestOperation operation + = new UpdateHubVisibility.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityResponse.java new file mode 100644 index 00000000..0485eb60 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdateHubVisibilityResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class UpdateHubVisibilityResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UpdateHubVisibilityResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UpdateHubVisibilityResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdateHubVisibilityResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdateHubVisibilityResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateHubVisibilityResponse other = (UpdateHubVisibilityResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpdateHubVisibilityResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UpdateHubVisibilityResponse build() { + + return new UpdateHubVisibilityResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkRequest.java new file mode 100644 index 00000000..e7502e6d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkRequest.java @@ -0,0 +1,860 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class UpdateItemArtworkRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ids") + private String ids; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=element") + private PathParamElement element; + + /** + * The url of the new asset. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=url") + private Optional url; + + @JsonCreator + public UpdateItemArtworkRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String ids, + PathParamElement element, + Optional url) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(ids, "ids"); + Utils.checkNotNull(element, "element"); + Utils.checkNotNull(url, "url"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.ids = ids; + this.element = element; + this.url = url; + } + + public UpdateItemArtworkRequest( + String ids, + PathParamElement element) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), ids, + element, Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + @JsonIgnore + public String ids() { + return ids; + } + + @JsonIgnore + public PathParamElement element() { + return element; + } + + /** + * The url of the new asset. + */ + @JsonIgnore + public Optional url() { + return url; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UpdateItemArtworkRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UpdateItemArtworkRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public UpdateItemArtworkRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public UpdateItemArtworkRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public UpdateItemArtworkRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public UpdateItemArtworkRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public UpdateItemArtworkRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public UpdateItemArtworkRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public UpdateItemArtworkRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public UpdateItemArtworkRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public UpdateItemArtworkRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public UpdateItemArtworkRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public UpdateItemArtworkRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public UpdateItemArtworkRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public UpdateItemArtworkRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public UpdateItemArtworkRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public UpdateItemArtworkRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public UpdateItemArtworkRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public UpdateItemArtworkRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public UpdateItemArtworkRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public UpdateItemArtworkRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public UpdateItemArtworkRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + public UpdateItemArtworkRequest withIds(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + public UpdateItemArtworkRequest withElement(PathParamElement element) { + Utils.checkNotNull(element, "element"); + this.element = element; + return this; + } + + /** + * The url of the new asset. + */ + public UpdateItemArtworkRequest withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + + /** + * The url of the new asset. + */ + public UpdateItemArtworkRequest withUrl(Optional 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; + } + UpdateItemArtworkRequest other = (UpdateItemArtworkRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.ids, other.ids) && + Utils.enhancedDeepEquals(this.element, other.element) && + Utils.enhancedDeepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + element, url); + } + + @Override + public String toString() { + return Utils.toString(UpdateItemArtworkRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "ids", ids, + "element", element, + "url", url); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String ids; + + private PathParamElement element; + + private Optional url = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + public Builder ids(String ids) { + Utils.checkNotNull(ids, "ids"); + this.ids = ids; + return this; + } + + + public Builder element(PathParamElement element) { + Utils.checkNotNull(element, "element"); + this.element = element; + return this; + } + + + /** + * The url of the new asset. + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The url of the new asset. + */ + public Builder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public UpdateItemArtworkRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new UpdateItemArtworkRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, ids, + element, url); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkRequestBuilder.java new file mode 100644 index 00000000..5317f3ce --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.UpdateItemArtwork; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class UpdateItemArtworkRequestBuilder { + + private UpdateItemArtworkRequest request; + private final SDKConfiguration sdkConfiguration; + + public UpdateItemArtworkRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UpdateItemArtworkRequestBuilder request(UpdateItemArtworkRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UpdateItemArtworkResponse call() throws Exception { + + RequestOperation operation + = new UpdateItemArtwork.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkResponse.java new file mode 100644 index 00000000..d33fa263 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemArtworkResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class UpdateItemArtworkResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UpdateItemArtworkResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UpdateItemArtworkResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdateItemArtworkResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdateItemArtworkResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateItemArtworkResponse other = (UpdateItemArtworkResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpdateItemArtworkResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UpdateItemArtworkResponse build() { + + return new UpdateItemArtworkResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsRequest.java new file mode 100644 index 00000000..b2bb2314 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsRequest.java @@ -0,0 +1,1546 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class UpdateItemsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The id of the section + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId") + private String sectionId; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + /** + * The filters to apply to determine which items should be modified + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=filters") + private Optional filters; + + /** + * Set the specified field to a new value + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=field.value") + private Optional fieldValue; + + /** + * Set the specified field to locked (or unlocked if set to 0) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=field.locked") + private Optional fieldLocked; + + /** + * This field is treated specially by albums or artists and may be used for implicit reparenting. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=title.value") + private Optional titleValue; + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=artist.title.value") + private Optional artistTitleValue; + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=artist.title.id") + private Optional artistTitleId; + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=album.title.value") + private Optional albumTitleValue; + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=album.title.id") + private Optional albumTitleId; + + /** + * Creates tag and associates it with each item in the set. - [idx] links this and the next parameters together + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=tagtype[idx].tag.tag") + private Optional tagtypeIdxTagTag; + + /** + * Here `object` may be text/thumb/art/theme - Optionally used in conjunction with tag.tag, to update association info across the set. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=tagtype[idx].tagging.object") + private Optional tagtypeIdxTaggingObject; + + /** + * Remove comma separated tags from the set of items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=tagtype[].tag.tag-") + private Optional tagtypeTagTag; + + /** + * Remove associations of this type (e.g. genre) from the set of items + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=tagtype[].tag") + private Optional tagtypeTag; + + @JsonCreator + public UpdateItemsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String sectionId, + Optional type, + Optional filters, + Optional fieldValue, + Optional fieldLocked, + Optional titleValue, + Optional artistTitleValue, + Optional artistTitleId, + Optional albumTitleValue, + Optional albumTitleId, + Optional tagtypeIdxTagTag, + Optional tagtypeIdxTaggingObject, + Optional tagtypeTagTag, + Optional tagtypeTag) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(sectionId, "sectionId"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(filters, "filters"); + Utils.checkNotNull(fieldValue, "fieldValue"); + Utils.checkNotNull(fieldLocked, "fieldLocked"); + Utils.checkNotNull(titleValue, "titleValue"); + Utils.checkNotNull(artistTitleValue, "artistTitleValue"); + Utils.checkNotNull(artistTitleId, "artistTitleId"); + Utils.checkNotNull(albumTitleValue, "albumTitleValue"); + Utils.checkNotNull(albumTitleId, "albumTitleId"); + Utils.checkNotNull(tagtypeIdxTagTag, "tagtypeIdxTagTag"); + Utils.checkNotNull(tagtypeIdxTaggingObject, "tagtypeIdxTaggingObject"); + Utils.checkNotNull(tagtypeTagTag, "tagtypeTagTag"); + Utils.checkNotNull(tagtypeTag, "tagtypeTag"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.sectionId = sectionId; + this.type = type; + this.filters = filters; + this.fieldValue = fieldValue; + this.fieldLocked = fieldLocked; + this.titleValue = titleValue; + this.artistTitleValue = artistTitleValue; + this.artistTitleId = artistTitleId; + this.albumTitleValue = albumTitleValue; + this.albumTitleId = albumTitleId; + this.tagtypeIdxTagTag = tagtypeIdxTagTag; + this.tagtypeIdxTaggingObject = tagtypeIdxTaggingObject; + this.tagtypeTagTag = tagtypeTagTag; + this.tagtypeTag = tagtypeTag; + } + + public UpdateItemsRequest( + String sectionId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), sectionId, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The id of the section + */ + @JsonIgnore + public String sectionId() { + return sectionId; + } + + @JsonIgnore + public Optional type() { + return type; + } + + /** + * The filters to apply to determine which items should be modified + */ + @JsonIgnore + public Optional filters() { + return filters; + } + + /** + * Set the specified field to a new value + */ + @JsonIgnore + public Optional fieldValue() { + return fieldValue; + } + + /** + * Set the specified field to locked (or unlocked if set to 0) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional fieldLocked() { + return (Optional) fieldLocked; + } + + /** + * This field is treated specially by albums or artists and may be used for implicit reparenting. + */ + @JsonIgnore + public Optional titleValue() { + return titleValue; + } + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + @JsonIgnore + public Optional artistTitleValue() { + return artistTitleValue; + } + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + @JsonIgnore + public Optional artistTitleId() { + return artistTitleId; + } + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + @JsonIgnore + public Optional albumTitleValue() { + return albumTitleValue; + } + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + @JsonIgnore + public Optional albumTitleId() { + return albumTitleId; + } + + /** + * Creates tag and associates it with each item in the set. - [idx] links this and the next parameters together + */ + @JsonIgnore + public Optional tagtypeIdxTagTag() { + return tagtypeIdxTagTag; + } + + /** + * Here `object` may be text/thumb/art/theme - Optionally used in conjunction with tag.tag, to update association info across the set. + */ + @JsonIgnore + public Optional tagtypeIdxTaggingObject() { + return tagtypeIdxTaggingObject; + } + + /** + * Remove comma separated tags from the set of items + */ + @JsonIgnore + public Optional tagtypeTagTag() { + return tagtypeTagTag; + } + + /** + * Remove associations of this type (e.g. genre) from the set of items + */ + @JsonIgnore + public Optional tagtypeTag() { + return tagtypeTag; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UpdateItemsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UpdateItemsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public UpdateItemsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public UpdateItemsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public UpdateItemsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public UpdateItemsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public UpdateItemsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public UpdateItemsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public UpdateItemsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public UpdateItemsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public UpdateItemsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public UpdateItemsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public UpdateItemsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public UpdateItemsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public UpdateItemsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public UpdateItemsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public UpdateItemsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public UpdateItemsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public UpdateItemsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public UpdateItemsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public UpdateItemsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public UpdateItemsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The id of the section + */ + public UpdateItemsRequest withSectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + return this; + } + + public UpdateItemsRequest withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public UpdateItemsRequest withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The filters to apply to determine which items should be modified + */ + public UpdateItemsRequest withFilters(String filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = Optional.ofNullable(filters); + return this; + } + + + /** + * The filters to apply to determine which items should be modified + */ + public UpdateItemsRequest withFilters(Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + /** + * Set the specified field to a new value + */ + public UpdateItemsRequest withFieldValue(String fieldValue) { + Utils.checkNotNull(fieldValue, "fieldValue"); + this.fieldValue = Optional.ofNullable(fieldValue); + return this; + } + + + /** + * Set the specified field to a new value + */ + public UpdateItemsRequest withFieldValue(Optional fieldValue) { + Utils.checkNotNull(fieldValue, "fieldValue"); + this.fieldValue = fieldValue; + return this; + } + + /** + * Set the specified field to locked (or unlocked if set to 0) + */ + public UpdateItemsRequest withFieldLocked(BoolInt fieldLocked) { + Utils.checkNotNull(fieldLocked, "fieldLocked"); + this.fieldLocked = Optional.ofNullable(fieldLocked); + return this; + } + + + /** + * Set the specified field to locked (or unlocked if set to 0) + */ + public UpdateItemsRequest withFieldLocked(Optional fieldLocked) { + Utils.checkNotNull(fieldLocked, "fieldLocked"); + this.fieldLocked = fieldLocked; + return this; + } + + /** + * This field is treated specially by albums or artists and may be used for implicit reparenting. + */ + public UpdateItemsRequest withTitleValue(String titleValue) { + Utils.checkNotNull(titleValue, "titleValue"); + this.titleValue = Optional.ofNullable(titleValue); + return this; + } + + + /** + * This field is treated specially by albums or artists and may be used for implicit reparenting. + */ + public UpdateItemsRequest withTitleValue(Optional titleValue) { + Utils.checkNotNull(titleValue, "titleValue"); + this.titleValue = titleValue; + return this; + } + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + public UpdateItemsRequest withArtistTitleValue(String artistTitleValue) { + Utils.checkNotNull(artistTitleValue, "artistTitleValue"); + this.artistTitleValue = Optional.ofNullable(artistTitleValue); + return this; + } + + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + public UpdateItemsRequest withArtistTitleValue(Optional artistTitleValue) { + Utils.checkNotNull(artistTitleValue, "artistTitleValue"); + this.artistTitleValue = artistTitleValue; + return this; + } + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + public UpdateItemsRequest withArtistTitleId(String artistTitleId) { + Utils.checkNotNull(artistTitleId, "artistTitleId"); + this.artistTitleId = Optional.ofNullable(artistTitleId); + return this; + } + + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + public UpdateItemsRequest withArtistTitleId(Optional artistTitleId) { + Utils.checkNotNull(artistTitleId, "artistTitleId"); + this.artistTitleId = artistTitleId; + return this; + } + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + public UpdateItemsRequest withAlbumTitleValue(String albumTitleValue) { + Utils.checkNotNull(albumTitleValue, "albumTitleValue"); + this.albumTitleValue = Optional.ofNullable(albumTitleValue); + return this; + } + + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + public UpdateItemsRequest withAlbumTitleValue(Optional albumTitleValue) { + Utils.checkNotNull(albumTitleValue, "albumTitleValue"); + this.albumTitleValue = albumTitleValue; + return this; + } + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + public UpdateItemsRequest withAlbumTitleId(String albumTitleId) { + Utils.checkNotNull(albumTitleId, "albumTitleId"); + this.albumTitleId = Optional.ofNullable(albumTitleId); + return this; + } + + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + public UpdateItemsRequest withAlbumTitleId(Optional albumTitleId) { + Utils.checkNotNull(albumTitleId, "albumTitleId"); + this.albumTitleId = albumTitleId; + return this; + } + + /** + * Creates tag and associates it with each item in the set. - [idx] links this and the next parameters together + */ + public UpdateItemsRequest withTagtypeIdxTagTag(String tagtypeIdxTagTag) { + Utils.checkNotNull(tagtypeIdxTagTag, "tagtypeIdxTagTag"); + this.tagtypeIdxTagTag = Optional.ofNullable(tagtypeIdxTagTag); + return this; + } + + + /** + * Creates tag and associates it with each item in the set. - [idx] links this and the next parameters together + */ + public UpdateItemsRequest withTagtypeIdxTagTag(Optional tagtypeIdxTagTag) { + Utils.checkNotNull(tagtypeIdxTagTag, "tagtypeIdxTagTag"); + this.tagtypeIdxTagTag = tagtypeIdxTagTag; + return this; + } + + /** + * Here `object` may be text/thumb/art/theme - Optionally used in conjunction with tag.tag, to update association info across the set. + */ + public UpdateItemsRequest withTagtypeIdxTaggingObject(String tagtypeIdxTaggingObject) { + Utils.checkNotNull(tagtypeIdxTaggingObject, "tagtypeIdxTaggingObject"); + this.tagtypeIdxTaggingObject = Optional.ofNullable(tagtypeIdxTaggingObject); + return this; + } + + + /** + * Here `object` may be text/thumb/art/theme - Optionally used in conjunction with tag.tag, to update association info across the set. + */ + public UpdateItemsRequest withTagtypeIdxTaggingObject(Optional tagtypeIdxTaggingObject) { + Utils.checkNotNull(tagtypeIdxTaggingObject, "tagtypeIdxTaggingObject"); + this.tagtypeIdxTaggingObject = tagtypeIdxTaggingObject; + return this; + } + + /** + * Remove comma separated tags from the set of items + */ + public UpdateItemsRequest withTagtypeTagTag(String tagtypeTagTag) { + Utils.checkNotNull(tagtypeTagTag, "tagtypeTagTag"); + this.tagtypeTagTag = Optional.ofNullable(tagtypeTagTag); + return this; + } + + + /** + * Remove comma separated tags from the set of items + */ + public UpdateItemsRequest withTagtypeTagTag(Optional tagtypeTagTag) { + Utils.checkNotNull(tagtypeTagTag, "tagtypeTagTag"); + this.tagtypeTagTag = tagtypeTagTag; + return this; + } + + /** + * Remove associations of this type (e.g. genre) from the set of items + */ + public UpdateItemsRequest withTagtypeTag(String tagtypeTag) { + Utils.checkNotNull(tagtypeTag, "tagtypeTag"); + this.tagtypeTag = Optional.ofNullable(tagtypeTag); + return this; + } + + + /** + * Remove associations of this type (e.g. genre) from the set of items + */ + public UpdateItemsRequest withTagtypeTag(Optional tagtypeTag) { + Utils.checkNotNull(tagtypeTag, "tagtypeTag"); + this.tagtypeTag = tagtypeTag; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateItemsRequest other = (UpdateItemsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.sectionId, other.sectionId) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.filters, other.filters) && + Utils.enhancedDeepEquals(this.fieldValue, other.fieldValue) && + Utils.enhancedDeepEquals(this.fieldLocked, other.fieldLocked) && + Utils.enhancedDeepEquals(this.titleValue, other.titleValue) && + Utils.enhancedDeepEquals(this.artistTitleValue, other.artistTitleValue) && + Utils.enhancedDeepEquals(this.artistTitleId, other.artistTitleId) && + Utils.enhancedDeepEquals(this.albumTitleValue, other.albumTitleValue) && + Utils.enhancedDeepEquals(this.albumTitleId, other.albumTitleId) && + Utils.enhancedDeepEquals(this.tagtypeIdxTagTag, other.tagtypeIdxTagTag) && + Utils.enhancedDeepEquals(this.tagtypeIdxTaggingObject, other.tagtypeIdxTaggingObject) && + Utils.enhancedDeepEquals(this.tagtypeTagTag, other.tagtypeTagTag) && + Utils.enhancedDeepEquals(this.tagtypeTag, other.tagtypeTag); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + type, filters, fieldValue, + fieldLocked, titleValue, artistTitleValue, + artistTitleId, albumTitleValue, albumTitleId, + tagtypeIdxTagTag, tagtypeIdxTaggingObject, tagtypeTagTag, + tagtypeTag); + } + + @Override + public String toString() { + return Utils.toString(UpdateItemsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "sectionId", sectionId, + "type", type, + "filters", filters, + "fieldValue", fieldValue, + "fieldLocked", fieldLocked, + "titleValue", titleValue, + "artistTitleValue", artistTitleValue, + "artistTitleId", artistTitleId, + "albumTitleValue", albumTitleValue, + "albumTitleId", albumTitleId, + "tagtypeIdxTagTag", tagtypeIdxTagTag, + "tagtypeIdxTaggingObject", tagtypeIdxTaggingObject, + "tagtypeTagTag", tagtypeTagTag, + "tagtypeTag", tagtypeTag); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String sectionId; + + private Optional type = Optional.empty(); + + private Optional filters = Optional.empty(); + + private Optional fieldValue = Optional.empty(); + + private Optional fieldLocked = Optional.empty(); + + private Optional titleValue = Optional.empty(); + + private Optional artistTitleValue = Optional.empty(); + + private Optional artistTitleId = Optional.empty(); + + private Optional albumTitleValue = Optional.empty(); + + private Optional albumTitleId = Optional.empty(); + + private Optional tagtypeIdxTagTag = Optional.empty(); + + private Optional tagtypeIdxTaggingObject = Optional.empty(); + + private Optional tagtypeTagTag = Optional.empty(); + + private Optional tagtypeTag = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The id of the section + */ + public Builder sectionId(String sectionId) { + Utils.checkNotNull(sectionId, "sectionId"); + this.sectionId = sectionId; + 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; + } + + + /** + * The filters to apply to determine which items should be modified + */ + public Builder filters(String filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = Optional.ofNullable(filters); + return this; + } + + /** + * The filters to apply to determine which items should be modified + */ + public Builder filters(Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + + /** + * Set the specified field to a new value + */ + public Builder fieldValue(String fieldValue) { + Utils.checkNotNull(fieldValue, "fieldValue"); + this.fieldValue = Optional.ofNullable(fieldValue); + return this; + } + + /** + * Set the specified field to a new value + */ + public Builder fieldValue(Optional fieldValue) { + Utils.checkNotNull(fieldValue, "fieldValue"); + this.fieldValue = fieldValue; + return this; + } + + + /** + * Set the specified field to locked (or unlocked if set to 0) + */ + public Builder fieldLocked(BoolInt fieldLocked) { + Utils.checkNotNull(fieldLocked, "fieldLocked"); + this.fieldLocked = Optional.ofNullable(fieldLocked); + return this; + } + + /** + * Set the specified field to locked (or unlocked if set to 0) + */ + public Builder fieldLocked(Optional fieldLocked) { + Utils.checkNotNull(fieldLocked, "fieldLocked"); + this.fieldLocked = fieldLocked; + return this; + } + + + /** + * This field is treated specially by albums or artists and may be used for implicit reparenting. + */ + public Builder titleValue(String titleValue) { + Utils.checkNotNull(titleValue, "titleValue"); + this.titleValue = Optional.ofNullable(titleValue); + return this; + } + + /** + * This field is treated specially by albums or artists and may be used for implicit reparenting. + */ + public Builder titleValue(Optional titleValue) { + Utils.checkNotNull(titleValue, "titleValue"); + this.titleValue = titleValue; + return this; + } + + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + public Builder artistTitleValue(String artistTitleValue) { + Utils.checkNotNull(artistTitleValue, "artistTitleValue"); + this.artistTitleValue = Optional.ofNullable(artistTitleValue); + return this; + } + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + public Builder artistTitleValue(Optional artistTitleValue) { + Utils.checkNotNull(artistTitleValue, "artistTitleValue"); + this.artistTitleValue = artistTitleValue; + return this; + } + + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + public Builder artistTitleId(String artistTitleId) { + Utils.checkNotNull(artistTitleId, "artistTitleId"); + this.artistTitleId = Optional.ofNullable(artistTitleId); + return this; + } + + /** + * Reparents set of Tracks or Albums - used with album.title.* in the case of tracks + */ + public Builder artistTitleId(Optional artistTitleId) { + Utils.checkNotNull(artistTitleId, "artistTitleId"); + this.artistTitleId = artistTitleId; + return this; + } + + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + public Builder albumTitleValue(String albumTitleValue) { + Utils.checkNotNull(albumTitleValue, "albumTitleValue"); + this.albumTitleValue = Optional.ofNullable(albumTitleValue); + return this; + } + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + public Builder albumTitleValue(Optional albumTitleValue) { + Utils.checkNotNull(albumTitleValue, "albumTitleValue"); + this.albumTitleValue = albumTitleValue; + return this; + } + + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + public Builder albumTitleId(String albumTitleId) { + Utils.checkNotNull(albumTitleId, "albumTitleId"); + this.albumTitleId = Optional.ofNullable(albumTitleId); + return this; + } + + /** + * Reparents set of Tracks - Must be used in conjunction with artist.title.value or id + */ + public Builder albumTitleId(Optional albumTitleId) { + Utils.checkNotNull(albumTitleId, "albumTitleId"); + this.albumTitleId = albumTitleId; + return this; + } + + + /** + * Creates tag and associates it with each item in the set. - [idx] links this and the next parameters together + */ + public Builder tagtypeIdxTagTag(String tagtypeIdxTagTag) { + Utils.checkNotNull(tagtypeIdxTagTag, "tagtypeIdxTagTag"); + this.tagtypeIdxTagTag = Optional.ofNullable(tagtypeIdxTagTag); + return this; + } + + /** + * Creates tag and associates it with each item in the set. - [idx] links this and the next parameters together + */ + public Builder tagtypeIdxTagTag(Optional tagtypeIdxTagTag) { + Utils.checkNotNull(tagtypeIdxTagTag, "tagtypeIdxTagTag"); + this.tagtypeIdxTagTag = tagtypeIdxTagTag; + return this; + } + + + /** + * Here `object` may be text/thumb/art/theme - Optionally used in conjunction with tag.tag, to update association info across the set. + */ + public Builder tagtypeIdxTaggingObject(String tagtypeIdxTaggingObject) { + Utils.checkNotNull(tagtypeIdxTaggingObject, "tagtypeIdxTaggingObject"); + this.tagtypeIdxTaggingObject = Optional.ofNullable(tagtypeIdxTaggingObject); + return this; + } + + /** + * Here `object` may be text/thumb/art/theme - Optionally used in conjunction with tag.tag, to update association info across the set. + */ + public Builder tagtypeIdxTaggingObject(Optional tagtypeIdxTaggingObject) { + Utils.checkNotNull(tagtypeIdxTaggingObject, "tagtypeIdxTaggingObject"); + this.tagtypeIdxTaggingObject = tagtypeIdxTaggingObject; + return this; + } + + + /** + * Remove comma separated tags from the set of items + */ + public Builder tagtypeTagTag(String tagtypeTagTag) { + Utils.checkNotNull(tagtypeTagTag, "tagtypeTagTag"); + this.tagtypeTagTag = Optional.ofNullable(tagtypeTagTag); + return this; + } + + /** + * Remove comma separated tags from the set of items + */ + public Builder tagtypeTagTag(Optional tagtypeTagTag) { + Utils.checkNotNull(tagtypeTagTag, "tagtypeTagTag"); + this.tagtypeTagTag = tagtypeTagTag; + return this; + } + + + /** + * Remove associations of this type (e.g. genre) from the set of items + */ + public Builder tagtypeTag(String tagtypeTag) { + Utils.checkNotNull(tagtypeTag, "tagtypeTag"); + this.tagtypeTag = Optional.ofNullable(tagtypeTag); + return this; + } + + /** + * Remove associations of this type (e.g. genre) from the set of items + */ + public Builder tagtypeTag(Optional tagtypeTag) { + Utils.checkNotNull(tagtypeTag, "tagtypeTag"); + this.tagtypeTag = tagtypeTag; + return this; + } + + public UpdateItemsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new UpdateItemsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, sectionId, + type, filters, fieldValue, + fieldLocked, titleValue, artistTitleValue, + artistTitleId, albumTitleValue, albumTitleId, + tagtypeIdxTagTag, tagtypeIdxTaggingObject, tagtypeTagTag, + tagtypeTag); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsRequestBuilder.java new file mode 100644 index 00000000..db2dd10f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.UpdateItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class UpdateItemsRequestBuilder { + + private UpdateItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public UpdateItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UpdateItemsRequestBuilder request(UpdateItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UpdateItemsResponse call() throws Exception { + + RequestOperation operation + = new UpdateItems.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsResponse.java new file mode 100644 index 00000000..8ad25746 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdateItemsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class UpdateItemsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UpdateItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UpdateItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdateItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdateItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateItemsResponse other = (UpdateItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpdateItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UpdateItemsResponse build() { + + return new UpdateItemsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressRequest.java deleted file mode 100644 index 1e71e23b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressRequest.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.SpeakeasyMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; - - -public class UpdatePlayProgressRequest { - /** - * the media key - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") - private String key; - - /** - * The time, in milliseconds, used to set the media playback progress. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=time") - private double time; - - /** - * The playback state of the media item. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=state") - private String state; - - @JsonCreator - public UpdatePlayProgressRequest( - String key, - double time, - String state) { - Utils.checkNotNull(key, "key"); - Utils.checkNotNull(time, "time"); - Utils.checkNotNull(state, "state"); - this.key = key; - this.time = time; - this.state = state; - } - - /** - * the media key - */ - @JsonIgnore - public String key() { - return key; - } - - /** - * The time, in milliseconds, used to set the media playback progress. - */ - @JsonIgnore - public double time() { - return time; - } - - /** - * The playback state of the media item. - */ - @JsonIgnore - public String state() { - return state; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * the media key - */ - public UpdatePlayProgressRequest withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - /** - * The time, in milliseconds, used to set the media playback progress. - */ - public UpdatePlayProgressRequest withTime(double time) { - Utils.checkNotNull(time, "time"); - this.time = time; - return this; - } - - /** - * The playback state of the media item. - */ - public UpdatePlayProgressRequest withState(String state) { - Utils.checkNotNull(state, "state"); - this.state = state; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlayProgressRequest other = (UpdatePlayProgressRequest) o; - return - Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.time, other.time) && - Utils.enhancedDeepEquals(this.state, other.state); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - key, time, state); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlayProgressRequest.class, - "key", key, - "time", time, - "state", state); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String key; - - private Double time; - - private String state; - - private Builder() { - // force use of static builder() method - } - - - /** - * the media key - */ - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - /** - * The time, in milliseconds, used to set the media playback progress. - */ - public Builder time(double time) { - Utils.checkNotNull(time, "time"); - this.time = time; - return this; - } - - - /** - * The playback state of the media item. - */ - public Builder state(String state) { - Utils.checkNotNull(state, "state"); - this.state = state; - return this; - } - - public UpdatePlayProgressRequest build() { - - return new UpdatePlayProgressRequest( - key, time, state); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressRequestBuilder.java deleted file mode 100644 index 826d0149..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressRequestBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.UpdatePlayProgress; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; - -public class UpdatePlayProgressRequestBuilder { - - private String key; - private Double time; - private String state; - private final SDKConfiguration sdkConfiguration; - - public UpdatePlayProgressRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public UpdatePlayProgressRequestBuilder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public UpdatePlayProgressRequestBuilder time(double time) { - Utils.checkNotNull(time, "time"); - this.time = time; - return this; - } - - public UpdatePlayProgressRequestBuilder state(String state) { - Utils.checkNotNull(state, "state"); - this.state = state; - return this; - } - - - private UpdatePlayProgressRequest buildRequest() { - - UpdatePlayProgressRequest request = new UpdatePlayProgressRequest(key, - time, - state); - - return request; - } - - public UpdatePlayProgressResponse call() throws Exception { - - RequestOperation operation - = new UpdatePlayProgress.Sync(sdkConfiguration); - UpdatePlayProgressRequest request = buildRequest(); - - return operation.handleResponse(operation.doRequest(request)); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressResponse.java deleted file mode 100644 index 1ec3a66d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlayProgressResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.Response; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class UpdatePlayProgressResponse implements Response { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public UpdatePlayProgressResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public UpdatePlayProgressResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public UpdatePlayProgressResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlayProgressResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlayProgressResponse other = (UpdatePlayProgressResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlayProgressResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UpdatePlayProgressResponse build() { - - return new UpdatePlayProgressResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistRequest.java index 6de29d54..5f928506 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistRequest.java @@ -5,73 +5,234 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.SpeakeasyMetadata; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Optional; public class UpdatePlaylistRequest { /** - * the ID of the playlist + * Indicates the client accepts the indicated media types */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistID") - private double playlistID; + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; /** - * name of the playlist + * An opaque identifier unique to the client */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=title") - private Optional title; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; /** - * summary description of the playlist + * The name of the client product */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=summary") - private Optional summary; + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The ID of the playlist + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playlistId") + private long playlistId; @JsonCreator public UpdatePlaylistRequest( - double playlistID, - Optional title, - Optional summary) { - Utils.checkNotNull(playlistID, "playlistID"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(summary, "summary"); - this.playlistID = playlistID; - this.title = title; - this.summary = summary; + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + long playlistId) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(playlistId, "playlistId"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.playlistId = playlistId; } public UpdatePlaylistRequest( - double playlistID) { - this(playlistID, Optional.empty(), Optional.empty()); + long playlistId) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), playlistId); } /** - * the ID of the playlist + * Indicates the client accepts the indicated media types */ + @SuppressWarnings("unchecked") @JsonIgnore - public double playlistID() { - return playlistID; + public Optional accepts() { + return (Optional) accepts; } /** - * name of the playlist + * An opaque identifier unique to the client */ @JsonIgnore - public Optional title() { - return title; + public Optional clientIdentifier() { + return clientIdentifier; } /** - * summary description of the playlist + * The name of the client product */ @JsonIgnore - public Optional summary() { - return summary; + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The ID of the playlist + */ + @JsonIgnore + public long playlistId() { + return playlistId; } public static Builder builder() { @@ -80,49 +241,220 @@ public class UpdatePlaylistRequest { /** - * the ID of the playlist + * Indicates the client accepts the indicated media types */ - public UpdatePlaylistRequest withPlaylistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - /** - * name of the playlist - */ - public UpdatePlaylistRequest withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); + public UpdatePlaylistRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); return this; } /** - * name of the playlist + * Indicates the client accepts the indicated media types */ - public UpdatePlaylistRequest withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; + public UpdatePlaylistRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; return this; } /** - * summary description of the playlist + * An opaque identifier unique to the client */ - public UpdatePlaylistRequest withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); + public UpdatePlaylistRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); return this; } /** - * summary description of the playlist + * An opaque identifier unique to the client */ - public UpdatePlaylistRequest withSummary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; + public UpdatePlaylistRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public UpdatePlaylistRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public UpdatePlaylistRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public UpdatePlaylistRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public UpdatePlaylistRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public UpdatePlaylistRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public UpdatePlaylistRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public UpdatePlaylistRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public UpdatePlaylistRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public UpdatePlaylistRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public UpdatePlaylistRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public UpdatePlaylistRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public UpdatePlaylistRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public UpdatePlaylistRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public UpdatePlaylistRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public UpdatePlaylistRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public UpdatePlaylistRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public UpdatePlaylistRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public UpdatePlaylistRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The ID of the playlist + */ + public UpdatePlaylistRequest withPlaylistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; return this; } @@ -136,33 +468,72 @@ public class UpdatePlaylistRequest { } UpdatePlaylistRequest other = (UpdatePlaylistRequest) o; return - Utils.enhancedDeepEquals(this.playlistID, other.playlistID) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.summary, other.summary); + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.playlistId, other.playlistId); } @Override public int hashCode() { return Utils.enhancedHash( - playlistID, title, summary); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId); } @Override public String toString() { return Utils.toString(UpdatePlaylistRequest.class, - "playlistID", playlistID, - "title", title, - "summary", summary); + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "playlistId", playlistId); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Double playlistID; + private Optional accepts; - private Optional title = Optional.empty(); + private Optional clientIdentifier = Optional.empty(); - private Optional summary = Optional.empty(); + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Long playlistId; private Builder() { // force use of static builder() method @@ -170,57 +541,240 @@ public class UpdatePlaylistRequest { /** - * the ID of the playlist + * Indicates the client accepts the indicated media types */ - public Builder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; return this; } /** - * name of the playlist + * An opaque identifier unique to the client */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); return this; } /** - * name of the playlist + * An opaque identifier unique to the client */ - public Builder title(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; return this; } /** - * summary description of the playlist + * The name of the client product */ - public Builder summary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); return this; } /** - * summary description of the playlist + * The name of the client product */ - public Builder summary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The ID of the playlist + */ + public Builder playlistId(long playlistId) { + Utils.checkNotNull(playlistId, "playlistId"); + this.playlistId = playlistId; return this; } public UpdatePlaylistRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } return new UpdatePlaylistRequest( - playlistID, title, summary); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, playlistId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistRequestBuilder.java index 00501386..97df4c13 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/UpdatePlaylistRequestBuilder.java @@ -8,67 +8,27 @@ import static dev.plexapi.sdk.operations.Operations.RequestOperation; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.operations.UpdatePlaylist; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; import java.lang.Exception; -import java.lang.String; -import java.util.Optional; public class UpdatePlaylistRequestBuilder { - private Double playlistID; - private Optional title = Optional.empty(); - private Optional summary = Optional.empty(); + private UpdatePlaylistRequest request; private final SDKConfiguration sdkConfiguration; public UpdatePlaylistRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public UpdatePlaylistRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public UpdatePlaylistRequestBuilder request(UpdatePlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - public UpdatePlaylistRequestBuilder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.of(title); - return this; - } - - public UpdatePlaylistRequestBuilder title(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public UpdatePlaylistRequestBuilder summary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.of(summary); - return this; - } - - public UpdatePlaylistRequestBuilder summary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - - private UpdatePlaylistRequest buildRequest() { - - UpdatePlaylistRequest request = new UpdatePlaylistRequest(playlistID, - title, - summary); - - return request; - } public UpdatePlaylistResponse call() throws Exception { RequestOperation operation = new UpdatePlaylist.Sync(sdkConfiguration); - UpdatePlaylistRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistRequest.java index 85e80e7e..dfb1b76b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistRequest.java @@ -6,84 +6,251 @@ 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.models.shared.Accepts; +import dev.plexapi.sdk.models.shared.BoolInt; import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.SpeakeasyMetadata; import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; public class UploadPlaylistRequest { /** - * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. - * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. - * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. - * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=path") - private String path; + private Optional path; /** - * Force overwriting of duplicate playlists. - * By default, a playlist file uploaded with the same path will overwrite the existing playlist. - * The `force` argument is used to disable overwriting. - * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + * Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=force") - private QueryParamForce force; - - /** - * Possibly the section ID to upload the playlist to, we are not certain. - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionID") - private long sectionID; + private Optional force; @JsonCreator public UploadPlaylistRequest( - String path, - QueryParamForce force, - long sectionID) { + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional path, + Optional force) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); Utils.checkNotNull(path, "path"); Utils.checkNotNull(force, "force"); - Utils.checkNotNull(sectionID, "sectionID"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; this.path = path; this.force = force; - this.sectionID = sectionID; + } + + public UploadPlaylistRequest() { + 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()); } /** - * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. - * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. - * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. - * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client */ @JsonIgnore - public String path() { + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename. + */ + @JsonIgnore + public Optional path() { return path; } /** - * Force overwriting of duplicate playlists. - * By default, a playlist file uploaded with the same path will overwrite the existing playlist. - * The `force` argument is used to disable overwriting. - * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + * Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. */ + @SuppressWarnings("unchecked") @JsonIgnore - public QueryParamForce force() { - return force; - } - - /** - * Possibly the section ID to upload the playlist to, we are not certain. - */ - @JsonIgnore - public long sectionID() { - return sectionID; + public Optional force() { + return (Optional) force; } public static Builder builder() { @@ -92,37 +259,249 @@ public class UploadPlaylistRequest { /** - * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. - * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. - * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. - * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. + * Indicates the client accepts the indicated media types + */ + public UploadPlaylistRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public UploadPlaylistRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public UploadPlaylistRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public UploadPlaylistRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public UploadPlaylistRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public UploadPlaylistRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public UploadPlaylistRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public UploadPlaylistRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public UploadPlaylistRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public UploadPlaylistRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public UploadPlaylistRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public UploadPlaylistRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public UploadPlaylistRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public UploadPlaylistRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public UploadPlaylistRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public UploadPlaylistRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public UploadPlaylistRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public UploadPlaylistRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public UploadPlaylistRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public UploadPlaylistRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public UploadPlaylistRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public UploadPlaylistRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename. */ public UploadPlaylistRequest withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + + /** + * Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename. + */ + public UploadPlaylistRequest withPath(Optional path) { Utils.checkNotNull(path, "path"); this.path = path; return this; } /** - * Force overwriting of duplicate playlists. - * By default, a playlist file uploaded with the same path will overwrite the existing playlist. - * The `force` argument is used to disable overwriting. - * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + * Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. */ - public UploadPlaylistRequest withForce(QueryParamForce force) { + public UploadPlaylistRequest withForce(BoolInt force) { Utils.checkNotNull(force, "force"); - this.force = force; + this.force = Optional.ofNullable(force); return this; } + /** - * Possibly the section ID to upload the playlist to, we are not certain. + * Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. */ - public UploadPlaylistRequest withSectionID(long sectionID) { - Utils.checkNotNull(sectionID, "sectionID"); - this.sectionID = sectionID; + public UploadPlaylistRequest withForce(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; return this; } @@ -136,33 +515,77 @@ public class UploadPlaylistRequest { } UploadPlaylistRequest other = (UploadPlaylistRequest) o; return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && Utils.enhancedDeepEquals(this.path, other.path) && - Utils.enhancedDeepEquals(this.force, other.force) && - Utils.enhancedDeepEquals(this.sectionID, other.sectionID); + Utils.enhancedDeepEquals(this.force, other.force); } @Override public int hashCode() { return Utils.enhancedHash( - path, force, sectionID); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, path, + force); } @Override public String toString() { return Utils.toString(UploadPlaylistRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, "path", path, - "force", force, - "sectionID", sectionID); + "force", force); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private String path; + private Optional accepts; - private QueryParamForce force; + private Optional clientIdentifier = Optional.empty(); - private Long sectionID; + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional path = Optional.empty(); + + private Optional force = Optional.empty(); private Builder() { // force use of static builder() method @@ -170,14 +593,227 @@ public class UploadPlaylistRequest { /** - * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. - * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. - * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. - * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename. */ public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + /** + * Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename. + */ + public Builder path(Optional path) { Utils.checkNotNull(path, "path"); this.path = path; return this; @@ -185,41 +821,41 @@ public class UploadPlaylistRequest { /** - * Force overwriting of duplicate playlists. - * By default, a playlist file uploaded with the same path will overwrite the existing playlist. - * The `force` argument is used to disable overwriting. - * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + * Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. */ - public Builder force(QueryParamForce force) { + public Builder force(BoolInt force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + /** + * Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + */ + public Builder force(Optional force) { Utils.checkNotNull(force, "force"); this.force = force; return this; } - - /** - * Possibly the section ID to upload the playlist to, we are not certain. - */ - public Builder sectionID(long sectionID) { - Utils.checkNotNull(sectionID, "sectionID"); - this.sectionID = sectionID; - return this; - } - public UploadPlaylistRequest build() { - if (sectionID == null) { - sectionID = _SINGLETON_VALUE_SectionID.value(); + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); } return new UploadPlaylistRequest( - path, force, sectionID); + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, path, + force); } - private static final LazySingletonValue _SINGLETON_VALUE_SectionID = + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = new LazySingletonValue<>( - "sectionID", - "1", - new TypeReference() {}); + "accepts", + "\"application/xml\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistRequestBuilder.java index 77e2b43a..24b3a246 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/UploadPlaylistRequestBuilder.java @@ -5,69 +5,31 @@ package dev.plexapi.sdk.models.operations; import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.operations.UploadPlaylist; -import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Exception; -import java.lang.Long; -import java.lang.String; public class UploadPlaylistRequestBuilder { - private String path; - private QueryParamForce force; - private Long sectionID; + private UploadPlaylistRequest request; private final SDKConfiguration sdkConfiguration; public UploadPlaylistRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public UploadPlaylistRequestBuilder path(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; + public UploadPlaylistRequestBuilder request(UploadPlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - public UploadPlaylistRequestBuilder force(QueryParamForce force) { - Utils.checkNotNull(force, "force"); - this.force = force; - return this; - } - - public UploadPlaylistRequestBuilder sectionID(long sectionID) { - Utils.checkNotNull(sectionID, "sectionID"); - this.sectionID = sectionID; - return this; - } - - - private UploadPlaylistRequest buildRequest() { - if (sectionID == null) { - sectionID = _SINGLETON_VALUE_SectionID.value(); - } - - UploadPlaylistRequest request = new UploadPlaylistRequest(path, - force, - sectionID); - - return request; - } - public UploadPlaylistResponse call() throws Exception { RequestOperation operation = new UploadPlaylist.Sync(sdkConfiguration); - UploadPlaylistRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); } - - private static final LazySingletonValue _SINGLETON_VALUE_SectionID = - new LazySingletonValue<>( - "sectionID", - "1", - new TypeReference() {}); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Upscale.java b/src/main/java/dev/plexapi/sdk/models/operations/Upscale.java deleted file mode 100644 index b958bc5f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Upscale.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * Upscale - * - *

allow images to be resized beyond native dimensions. - */ -public enum Upscale { - ZERO(0L), - ONE(1L); - - @JsonValue - private final long value; - - Upscale(long value) { - this.value = value; - } - - public long value() { - return value; - } - - public static Optional fromValue(long value) { - for (Upscale o: Upscale.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/User.java b/src/main/java/dev/plexapi/sdk/models/operations/User.java deleted file mode 100644 index 09aa693c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/User.java +++ /dev/null @@ -1,1080 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class User { - /** - * User's unique ID. - */ - private long id; - - /** - * User's display name. - */ - private String title; - - /** - * User's username. - */ - private String username; - - /** - * User's email address. - */ - private String email; - - /** - * ID of the user's recommendation playlist. - */ - private JsonNullable recommendationsPlaylistId; - - /** - * URL to the user's avatar image. - */ - private String thumb; - - - private Optional protected_; - - - private Optional home; - - - private Optional allowTuners; - - - private Optional allowSync; - - - private Optional allowCameraUpload; - - - private Optional allowChannels; - - - private Optional allowSubtitleAdmin; - - /** - * Filters applied for all content. - */ - private JsonNullable filterAll; - - /** - * Filters applied for movies. - */ - private JsonNullable filterMovies; - - /** - * Filters applied for music. - */ - private JsonNullable filterMusic; - - /** - * Filters applied for photos. - */ - private JsonNullable filterPhotos; - - /** - * Filters applied for television. - */ - private Optional filterTelevision; - - - private Optional restricted; - - /** - * List of servers owned by the user. - */ - private List server; - - @JsonCreator - public User( - long id, - String title, - String username, - String email, - JsonNullable recommendationsPlaylistId, - String thumb, - Optional protected_, - Optional home, - Optional allowTuners, - Optional allowSync, - Optional allowCameraUpload, - Optional allowChannels, - Optional allowSubtitleAdmin, - JsonNullable filterAll, - JsonNullable filterMovies, - JsonNullable filterMusic, - JsonNullable filterPhotos, - Optional filterTelevision, - Optional restricted, - List server) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(username, "username"); - Utils.checkNotNull(email, "email"); - Utils.checkNotNull(recommendationsPlaylistId, "recommendationsPlaylistId"); - Utils.checkNotNull(thumb, "thumb"); - Utils.checkNotNull(protected_, "protected_"); - Utils.checkNotNull(home, "home"); - Utils.checkNotNull(allowTuners, "allowTuners"); - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); - Utils.checkNotNull(allowChannels, "allowChannels"); - Utils.checkNotNull(allowSubtitleAdmin, "allowSubtitleAdmin"); - Utils.checkNotNull(filterAll, "filterAll"); - Utils.checkNotNull(filterMovies, "filterMovies"); - Utils.checkNotNull(filterMusic, "filterMusic"); - Utils.checkNotNull(filterPhotos, "filterPhotos"); - Utils.checkNotNull(filterTelevision, "filterTelevision"); - Utils.checkNotNull(restricted, "restricted"); - Utils.checkNotNull(server, "server"); - this.id = id; - this.title = title; - this.username = username; - this.email = email; - this.recommendationsPlaylistId = recommendationsPlaylistId; - this.thumb = thumb; - this.protected_ = protected_; - this.home = home; - this.allowTuners = allowTuners; - this.allowSync = allowSync; - this.allowCameraUpload = allowCameraUpload; - this.allowChannels = allowChannels; - this.allowSubtitleAdmin = allowSubtitleAdmin; - this.filterAll = filterAll; - this.filterMovies = filterMovies; - this.filterMusic = filterMusic; - this.filterPhotos = filterPhotos; - this.filterTelevision = filterTelevision; - this.restricted = restricted; - this.server = server; - } - - public User( - long id, - String title, - String username, - String email, - String thumb, - List server) { - this(id, title, username, - email, JsonNullable.undefined(), thumb, - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), - Optional.empty(), server); - } - - /** - * User's unique ID. - */ - @JsonIgnore - public long id() { - return id; - } - - /** - * User's display name. - */ - @JsonIgnore - public String title() { - return title; - } - - /** - * User's username. - */ - @JsonIgnore - public String username() { - return username; - } - - /** - * User's email address. - */ - @JsonIgnore - public String email() { - return email; - } - - /** - * ID of the user's recommendation playlist. - */ - @JsonIgnore - public JsonNullable recommendationsPlaylistId() { - return recommendationsPlaylistId; - } - - /** - * URL to the user's avatar image. - */ - @JsonIgnore - public String thumb() { - return thumb; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional protected_() { - return (Optional) protected_; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional home() { - return (Optional) home; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional allowTuners() { - return (Optional) allowTuners; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional allowSync() { - return (Optional) allowSync; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional allowCameraUpload() { - return (Optional) allowCameraUpload; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional allowChannels() { - return (Optional) allowChannels; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional allowSubtitleAdmin() { - return (Optional) allowSubtitleAdmin; - } - - /** - * Filters applied for all content. - */ - @JsonIgnore - public JsonNullable filterAll() { - return filterAll; - } - - /** - * Filters applied for movies. - */ - @JsonIgnore - public JsonNullable filterMovies() { - return filterMovies; - } - - /** - * Filters applied for music. - */ - @JsonIgnore - public JsonNullable filterMusic() { - return filterMusic; - } - - /** - * Filters applied for photos. - */ - @JsonIgnore - public JsonNullable filterPhotos() { - return filterPhotos; - } - - /** - * Filters applied for television. - */ - @JsonIgnore - public Optional filterTelevision() { - return filterTelevision; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional restricted() { - return (Optional) restricted; - } - - /** - * List of servers owned by the user. - */ - @JsonIgnore - public List server() { - return server; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * User's unique ID. - */ - public User withId(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * User's display name. - */ - public User withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - /** - * User's username. - */ - public User withUsername(String username) { - Utils.checkNotNull(username, "username"); - this.username = username; - return this; - } - - /** - * User's email address. - */ - public User withEmail(String email) { - Utils.checkNotNull(email, "email"); - this.email = email; - return this; - } - - /** - * ID of the user's recommendation playlist. - */ - public User withRecommendationsPlaylistId(String recommendationsPlaylistId) { - Utils.checkNotNull(recommendationsPlaylistId, "recommendationsPlaylistId"); - this.recommendationsPlaylistId = JsonNullable.of(recommendationsPlaylistId); - return this; - } - - /** - * ID of the user's recommendation playlist. - */ - public User withRecommendationsPlaylistId(JsonNullable recommendationsPlaylistId) { - Utils.checkNotNull(recommendationsPlaylistId, "recommendationsPlaylistId"); - this.recommendationsPlaylistId = recommendationsPlaylistId; - return this; - } - - /** - * URL to the user's avatar image. - */ - public User withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public User withProtected(Protected protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = Optional.ofNullable(protected_); - return this; - } - - - public User withProtected(Optional protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = protected_; - return this; - } - - public User withHome(Home home) { - Utils.checkNotNull(home, "home"); - this.home = Optional.ofNullable(home); - return this; - } - - - public User withHome(Optional home) { - Utils.checkNotNull(home, "home"); - this.home = home; - return this; - } - - public User withAllowTuners(AllowTuners allowTuners) { - Utils.checkNotNull(allowTuners, "allowTuners"); - this.allowTuners = Optional.ofNullable(allowTuners); - return this; - } - - - public User withAllowTuners(Optional allowTuners) { - Utils.checkNotNull(allowTuners, "allowTuners"); - this.allowTuners = allowTuners; - return this; - } - - public User withAllowSync(AllowSync allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); - return this; - } - - - public User withAllowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - public User withAllowCameraUpload(AllowCameraUpload allowCameraUpload) { - Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); - this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); - return this; - } - - - public User withAllowCameraUpload(Optional allowCameraUpload) { - Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); - this.allowCameraUpload = allowCameraUpload; - return this; - } - - public User withAllowChannels(AllowChannels allowChannels) { - Utils.checkNotNull(allowChannels, "allowChannels"); - this.allowChannels = Optional.ofNullable(allowChannels); - return this; - } - - - public User withAllowChannels(Optional allowChannels) { - Utils.checkNotNull(allowChannels, "allowChannels"); - this.allowChannels = allowChannels; - return this; - } - - public User withAllowSubtitleAdmin(AllowSubtitleAdmin allowSubtitleAdmin) { - Utils.checkNotNull(allowSubtitleAdmin, "allowSubtitleAdmin"); - this.allowSubtitleAdmin = Optional.ofNullable(allowSubtitleAdmin); - return this; - } - - - public User withAllowSubtitleAdmin(Optional allowSubtitleAdmin) { - Utils.checkNotNull(allowSubtitleAdmin, "allowSubtitleAdmin"); - this.allowSubtitleAdmin = allowSubtitleAdmin; - return this; - } - - /** - * Filters applied for all content. - */ - public User withFilterAll(String filterAll) { - Utils.checkNotNull(filterAll, "filterAll"); - this.filterAll = JsonNullable.of(filterAll); - return this; - } - - /** - * Filters applied for all content. - */ - public User withFilterAll(JsonNullable filterAll) { - Utils.checkNotNull(filterAll, "filterAll"); - this.filterAll = filterAll; - return this; - } - - /** - * Filters applied for movies. - */ - public User withFilterMovies(String filterMovies) { - Utils.checkNotNull(filterMovies, "filterMovies"); - this.filterMovies = JsonNullable.of(filterMovies); - return this; - } - - /** - * Filters applied for movies. - */ - public User withFilterMovies(JsonNullable filterMovies) { - Utils.checkNotNull(filterMovies, "filterMovies"); - this.filterMovies = filterMovies; - return this; - } - - /** - * Filters applied for music. - */ - public User withFilterMusic(String filterMusic) { - Utils.checkNotNull(filterMusic, "filterMusic"); - this.filterMusic = JsonNullable.of(filterMusic); - return this; - } - - /** - * Filters applied for music. - */ - public User withFilterMusic(JsonNullable filterMusic) { - Utils.checkNotNull(filterMusic, "filterMusic"); - this.filterMusic = filterMusic; - return this; - } - - /** - * Filters applied for photos. - */ - public User withFilterPhotos(String filterPhotos) { - Utils.checkNotNull(filterPhotos, "filterPhotos"); - this.filterPhotos = JsonNullable.of(filterPhotos); - return this; - } - - /** - * Filters applied for photos. - */ - public User withFilterPhotos(JsonNullable filterPhotos) { - Utils.checkNotNull(filterPhotos, "filterPhotos"); - this.filterPhotos = filterPhotos; - return this; - } - - /** - * Filters applied for television. - */ - public User withFilterTelevision(String filterTelevision) { - Utils.checkNotNull(filterTelevision, "filterTelevision"); - this.filterTelevision = Optional.ofNullable(filterTelevision); - return this; - } - - - /** - * Filters applied for television. - */ - public User withFilterTelevision(Optional filterTelevision) { - Utils.checkNotNull(filterTelevision, "filterTelevision"); - this.filterTelevision = filterTelevision; - return this; - } - - public User withRestricted(Restricted restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = Optional.ofNullable(restricted); - return this; - } - - - public User withRestricted(Optional restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = restricted; - return this; - } - - /** - * List of servers owned by the user. - */ - public User withServer(List server) { - Utils.checkNotNull(server, "server"); - this.server = server; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User other = (User) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.username, other.username) && - Utils.enhancedDeepEquals(this.email, other.email) && - Utils.enhancedDeepEquals(this.recommendationsPlaylistId, other.recommendationsPlaylistId) && - Utils.enhancedDeepEquals(this.thumb, other.thumb) && - Utils.enhancedDeepEquals(this.protected_, other.protected_) && - Utils.enhancedDeepEquals(this.home, other.home) && - Utils.enhancedDeepEquals(this.allowTuners, other.allowTuners) && - Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && - Utils.enhancedDeepEquals(this.allowCameraUpload, other.allowCameraUpload) && - Utils.enhancedDeepEquals(this.allowChannels, other.allowChannels) && - Utils.enhancedDeepEquals(this.allowSubtitleAdmin, other.allowSubtitleAdmin) && - Utils.enhancedDeepEquals(this.filterAll, other.filterAll) && - Utils.enhancedDeepEquals(this.filterMovies, other.filterMovies) && - Utils.enhancedDeepEquals(this.filterMusic, other.filterMusic) && - Utils.enhancedDeepEquals(this.filterPhotos, other.filterPhotos) && - Utils.enhancedDeepEquals(this.filterTelevision, other.filterTelevision) && - Utils.enhancedDeepEquals(this.restricted, other.restricted) && - Utils.enhancedDeepEquals(this.server, other.server); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, title, username, - email, recommendationsPlaylistId, thumb, - protected_, home, allowTuners, - allowSync, allowCameraUpload, allowChannels, - allowSubtitleAdmin, filterAll, filterMovies, - filterMusic, filterPhotos, filterTelevision, - restricted, server); - } - - @Override - public String toString() { - return Utils.toString(User.class, - "id", id, - "title", title, - "username", username, - "email", email, - "recommendationsPlaylistId", recommendationsPlaylistId, - "thumb", thumb, - "protected_", protected_, - "home", home, - "allowTuners", allowTuners, - "allowSync", allowSync, - "allowCameraUpload", allowCameraUpload, - "allowChannels", allowChannels, - "allowSubtitleAdmin", allowSubtitleAdmin, - "filterAll", filterAll, - "filterMovies", filterMovies, - "filterMusic", filterMusic, - "filterPhotos", filterPhotos, - "filterTelevision", filterTelevision, - "restricted", restricted, - "server", server); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Long id; - - private String title; - - private String username; - - private String email; - - private JsonNullable recommendationsPlaylistId = JsonNullable.undefined(); - - private String thumb; - - private Optional protected_; - - private Optional home; - - private Optional allowTuners; - - private Optional allowSync; - - private Optional allowCameraUpload; - - private Optional allowChannels; - - private Optional allowSubtitleAdmin; - - private JsonNullable filterAll = JsonNullable.undefined(); - - private JsonNullable filterMovies = JsonNullable.undefined(); - - private JsonNullable filterMusic = JsonNullable.undefined(); - - private JsonNullable filterPhotos = JsonNullable.undefined(); - - private Optional filterTelevision = Optional.empty(); - - private Optional restricted; - - private List server; - - private Builder() { - // force use of static builder() method - } - - - /** - * User's unique ID. - */ - public Builder id(long id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * User's display name. - */ - public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - - /** - * User's username. - */ - public Builder username(String username) { - Utils.checkNotNull(username, "username"); - this.username = username; - return this; - } - - - /** - * User's email address. - */ - public Builder email(String email) { - Utils.checkNotNull(email, "email"); - this.email = email; - return this; - } - - - /** - * ID of the user's recommendation playlist. - */ - public Builder recommendationsPlaylistId(String recommendationsPlaylistId) { - Utils.checkNotNull(recommendationsPlaylistId, "recommendationsPlaylistId"); - this.recommendationsPlaylistId = JsonNullable.of(recommendationsPlaylistId); - return this; - } - - /** - * ID of the user's recommendation playlist. - */ - public Builder recommendationsPlaylistId(JsonNullable recommendationsPlaylistId) { - Utils.checkNotNull(recommendationsPlaylistId, "recommendationsPlaylistId"); - this.recommendationsPlaylistId = recommendationsPlaylistId; - return this; - } - - - /** - * URL to the user's avatar image. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - - public Builder protected_(Protected protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = Optional.ofNullable(protected_); - return this; - } - - public Builder protected_(Optional protected_) { - Utils.checkNotNull(protected_, "protected_"); - this.protected_ = protected_; - return this; - } - - - public Builder home(Home home) { - Utils.checkNotNull(home, "home"); - this.home = Optional.ofNullable(home); - return this; - } - - public Builder home(Optional home) { - Utils.checkNotNull(home, "home"); - this.home = home; - return this; - } - - - public Builder allowTuners(AllowTuners allowTuners) { - Utils.checkNotNull(allowTuners, "allowTuners"); - this.allowTuners = Optional.ofNullable(allowTuners); - return this; - } - - public Builder allowTuners(Optional allowTuners) { - Utils.checkNotNull(allowTuners, "allowTuners"); - this.allowTuners = allowTuners; - return this; - } - - - public Builder allowSync(AllowSync 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 allowCameraUpload(AllowCameraUpload allowCameraUpload) { - Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); - this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); - return this; - } - - public Builder allowCameraUpload(Optional allowCameraUpload) { - Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); - this.allowCameraUpload = allowCameraUpload; - return this; - } - - - public Builder allowChannels(AllowChannels allowChannels) { - Utils.checkNotNull(allowChannels, "allowChannels"); - this.allowChannels = Optional.ofNullable(allowChannels); - return this; - } - - public Builder allowChannels(Optional allowChannels) { - Utils.checkNotNull(allowChannels, "allowChannels"); - this.allowChannels = allowChannels; - return this; - } - - - public Builder allowSubtitleAdmin(AllowSubtitleAdmin allowSubtitleAdmin) { - Utils.checkNotNull(allowSubtitleAdmin, "allowSubtitleAdmin"); - this.allowSubtitleAdmin = Optional.ofNullable(allowSubtitleAdmin); - return this; - } - - public Builder allowSubtitleAdmin(Optional allowSubtitleAdmin) { - Utils.checkNotNull(allowSubtitleAdmin, "allowSubtitleAdmin"); - this.allowSubtitleAdmin = allowSubtitleAdmin; - return this; - } - - - /** - * Filters applied for all content. - */ - public Builder filterAll(String filterAll) { - Utils.checkNotNull(filterAll, "filterAll"); - this.filterAll = JsonNullable.of(filterAll); - return this; - } - - /** - * Filters applied for all content. - */ - public Builder filterAll(JsonNullable filterAll) { - Utils.checkNotNull(filterAll, "filterAll"); - this.filterAll = filterAll; - return this; - } - - - /** - * Filters applied for movies. - */ - public Builder filterMovies(String filterMovies) { - Utils.checkNotNull(filterMovies, "filterMovies"); - this.filterMovies = JsonNullable.of(filterMovies); - return this; - } - - /** - * Filters applied for movies. - */ - public Builder filterMovies(JsonNullable filterMovies) { - Utils.checkNotNull(filterMovies, "filterMovies"); - this.filterMovies = filterMovies; - return this; - } - - - /** - * Filters applied for music. - */ - public Builder filterMusic(String filterMusic) { - Utils.checkNotNull(filterMusic, "filterMusic"); - this.filterMusic = JsonNullable.of(filterMusic); - return this; - } - - /** - * Filters applied for music. - */ - public Builder filterMusic(JsonNullable filterMusic) { - Utils.checkNotNull(filterMusic, "filterMusic"); - this.filterMusic = filterMusic; - return this; - } - - - /** - * Filters applied for photos. - */ - public Builder filterPhotos(String filterPhotos) { - Utils.checkNotNull(filterPhotos, "filterPhotos"); - this.filterPhotos = JsonNullable.of(filterPhotos); - return this; - } - - /** - * Filters applied for photos. - */ - public Builder filterPhotos(JsonNullable filterPhotos) { - Utils.checkNotNull(filterPhotos, "filterPhotos"); - this.filterPhotos = filterPhotos; - return this; - } - - - /** - * Filters applied for television. - */ - public Builder filterTelevision(String filterTelevision) { - Utils.checkNotNull(filterTelevision, "filterTelevision"); - this.filterTelevision = Optional.ofNullable(filterTelevision); - return this; - } - - /** - * Filters applied for television. - */ - public Builder filterTelevision(Optional filterTelevision) { - Utils.checkNotNull(filterTelevision, "filterTelevision"); - this.filterTelevision = filterTelevision; - return this; - } - - - public Builder restricted(Restricted restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = Optional.ofNullable(restricted); - return this; - } - - public Builder restricted(Optional restricted) { - Utils.checkNotNull(restricted, "restricted"); - this.restricted = restricted; - return this; - } - - - /** - * List of servers owned by the user. - */ - public Builder server(List server) { - Utils.checkNotNull(server, "server"); - this.server = server; - return this; - } - - public User build() { - if (protected_ == null) { - protected_ = _SINGLETON_VALUE_Protected.value(); - } - if (home == null) { - home = _SINGLETON_VALUE_Home.value(); - } - if (allowTuners == null) { - allowTuners = _SINGLETON_VALUE_AllowTuners.value(); - } - if (allowSync == null) { - allowSync = _SINGLETON_VALUE_AllowSync.value(); - } - if (allowCameraUpload == null) { - allowCameraUpload = _SINGLETON_VALUE_AllowCameraUpload.value(); - } - if (allowChannels == null) { - allowChannels = _SINGLETON_VALUE_AllowChannels.value(); - } - if (allowSubtitleAdmin == null) { - allowSubtitleAdmin = _SINGLETON_VALUE_AllowSubtitleAdmin.value(); - } - if (restricted == null) { - restricted = _SINGLETON_VALUE_Restricted.value(); - } - - return new User( - id, title, username, - email, recommendationsPlaylistId, thumb, - protected_, home, allowTuners, - allowSync, allowCameraUpload, allowChannels, - allowSubtitleAdmin, filterAll, filterMovies, - filterMusic, filterPhotos, filterTelevision, - restricted, server); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_Protected = - new LazySingletonValue<>( - "protected", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Home = - new LazySingletonValue<>( - "home", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_AllowTuners = - new LazySingletonValue<>( - "allowTuners", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_AllowSync = - new LazySingletonValue<>( - "allowSync", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_AllowCameraUpload = - new LazySingletonValue<>( - "allowCameraUpload", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_AllowChannels = - new LazySingletonValue<>( - "allowChannels", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_AllowSubtitleAdmin = - new LazySingletonValue<>( - "allowSubtitleAdmin", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_Restricted = - new LazySingletonValue<>( - "restricted", - "0", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/UserProfile.java b/src/main/java/dev/plexapi/sdk/models/operations/UserProfile.java deleted file mode 100644 index ca91d45a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/UserProfile.java +++ /dev/null @@ -1,532 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Optional; - - -public class UserProfile { - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("autoSelectAudio") - private Optional autoSelectAudio; - - /** - * The preferred audio language for the account - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("defaultAudioLanguage") - private Optional defaultAudioLanguage; - - /** - * The preferred subtitle language for the account - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("defaultSubtitleLanguage") - private Optional defaultSubtitleLanguage; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("autoSelectSubtitle") - private Optional autoSelectSubtitle; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("defaultSubtitleAccessibility") - private Optional defaultSubtitleAccessibility; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("defaultSubtitleForced") - private Optional defaultSubtitleForced; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("watchedIndicator") - private Optional watchedIndicator; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mediaReviewsVisibility") - private Optional mediaReviewsVisibility; - - @JsonCreator - public UserProfile( - @JsonProperty("autoSelectAudio") Optional autoSelectAudio, - @JsonProperty("defaultAudioLanguage") Optional defaultAudioLanguage, - @JsonProperty("defaultSubtitleLanguage") Optional defaultSubtitleLanguage, - @JsonProperty("autoSelectSubtitle") Optional autoSelectSubtitle, - @JsonProperty("defaultSubtitleAccessibility") Optional defaultSubtitleAccessibility, - @JsonProperty("defaultSubtitleForced") Optional defaultSubtitleForced, - @JsonProperty("watchedIndicator") Optional watchedIndicator, - @JsonProperty("mediaReviewsVisibility") Optional mediaReviewsVisibility) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle"); - Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility"); - Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced"); - Utils.checkNotNull(watchedIndicator, "watchedIndicator"); - Utils.checkNotNull(mediaReviewsVisibility, "mediaReviewsVisibility"); - this.autoSelectAudio = autoSelectAudio; - this.defaultAudioLanguage = defaultAudioLanguage; - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - this.autoSelectSubtitle = autoSelectSubtitle; - this.defaultSubtitleAccessibility = defaultSubtitleAccessibility; - this.defaultSubtitleForced = defaultSubtitleForced; - this.watchedIndicator = watchedIndicator; - this.mediaReviewsVisibility = mediaReviewsVisibility; - } - - public UserProfile() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); - } - - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - @JsonIgnore - public Optional autoSelectAudio() { - return autoSelectAudio; - } - - /** - * The preferred audio language for the account - */ - @JsonIgnore - public Optional defaultAudioLanguage() { - return defaultAudioLanguage; - } - - /** - * The preferred subtitle language for the account - */ - @JsonIgnore - public Optional defaultSubtitleLanguage() { - return defaultSubtitleLanguage; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional autoSelectSubtitle() { - return (Optional) autoSelectSubtitle; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional defaultSubtitleAccessibility() { - return (Optional) defaultSubtitleAccessibility; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional defaultSubtitleForced() { - return (Optional) defaultSubtitleForced; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional watchedIndicator() { - return (Optional) watchedIndicator; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional mediaReviewsVisibility() { - return (Optional) mediaReviewsVisibility; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - public UserProfile withAutoSelectAudio(boolean autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = Optional.ofNullable(autoSelectAudio); - return this; - } - - - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - public UserProfile withAutoSelectAudio(Optional autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = autoSelectAudio; - return this; - } - - /** - * The preferred audio language for the account - */ - public UserProfile withDefaultAudioLanguage(String defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage); - return this; - } - - - /** - * The preferred audio language for the account - */ - public UserProfile withDefaultAudioLanguage(Optional defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = defaultAudioLanguage; - return this; - } - - /** - * The preferred subtitle language for the account - */ - public UserProfile withDefaultSubtitleLanguage(String defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage); - return this; - } - - - /** - * The preferred subtitle language for the account - */ - public UserProfile withDefaultSubtitleLanguage(Optional defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - return this; - } - - public UserProfile withAutoSelectSubtitle(AutoSelectSubtitle autoSelectSubtitle) { - Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle"); - this.autoSelectSubtitle = Optional.ofNullable(autoSelectSubtitle); - return this; - } - - - public UserProfile withAutoSelectSubtitle(Optional autoSelectSubtitle) { - Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle"); - this.autoSelectSubtitle = autoSelectSubtitle; - return this; - } - - public UserProfile withDefaultSubtitleAccessibility(DefaultSubtitleAccessibility defaultSubtitleAccessibility) { - Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility"); - this.defaultSubtitleAccessibility = Optional.ofNullable(defaultSubtitleAccessibility); - return this; - } - - - public UserProfile withDefaultSubtitleAccessibility(Optional defaultSubtitleAccessibility) { - Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility"); - this.defaultSubtitleAccessibility = defaultSubtitleAccessibility; - return this; - } - - public UserProfile withDefaultSubtitleForced(DefaultSubtitleForced defaultSubtitleForced) { - Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced"); - this.defaultSubtitleForced = Optional.ofNullable(defaultSubtitleForced); - return this; - } - - - public UserProfile withDefaultSubtitleForced(Optional defaultSubtitleForced) { - Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced"); - this.defaultSubtitleForced = defaultSubtitleForced; - return this; - } - - public UserProfile withWatchedIndicator(WatchedIndicator watchedIndicator) { - Utils.checkNotNull(watchedIndicator, "watchedIndicator"); - this.watchedIndicator = Optional.ofNullable(watchedIndicator); - return this; - } - - - public UserProfile withWatchedIndicator(Optional watchedIndicator) { - Utils.checkNotNull(watchedIndicator, "watchedIndicator"); - this.watchedIndicator = watchedIndicator; - return this; - } - - public UserProfile withMediaReviewsVisibility(MediaReviewsVisibility mediaReviewsVisibility) { - Utils.checkNotNull(mediaReviewsVisibility, "mediaReviewsVisibility"); - this.mediaReviewsVisibility = Optional.ofNullable(mediaReviewsVisibility); - return this; - } - - - public UserProfile withMediaReviewsVisibility(Optional mediaReviewsVisibility) { - Utils.checkNotNull(mediaReviewsVisibility, "mediaReviewsVisibility"); - this.mediaReviewsVisibility = mediaReviewsVisibility; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserProfile other = (UserProfile) o; - return - Utils.enhancedDeepEquals(this.autoSelectAudio, other.autoSelectAudio) && - Utils.enhancedDeepEquals(this.defaultAudioLanguage, other.defaultAudioLanguage) && - Utils.enhancedDeepEquals(this.defaultSubtitleLanguage, other.defaultSubtitleLanguage) && - Utils.enhancedDeepEquals(this.autoSelectSubtitle, other.autoSelectSubtitle) && - Utils.enhancedDeepEquals(this.defaultSubtitleAccessibility, other.defaultSubtitleAccessibility) && - Utils.enhancedDeepEquals(this.defaultSubtitleForced, other.defaultSubtitleForced) && - Utils.enhancedDeepEquals(this.watchedIndicator, other.watchedIndicator) && - Utils.enhancedDeepEquals(this.mediaReviewsVisibility, other.mediaReviewsVisibility); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - autoSelectAudio, defaultAudioLanguage, defaultSubtitleLanguage, - autoSelectSubtitle, defaultSubtitleAccessibility, defaultSubtitleForced, - watchedIndicator, mediaReviewsVisibility); - } - - @Override - public String toString() { - return Utils.toString(UserProfile.class, - "autoSelectAudio", autoSelectAudio, - "defaultAudioLanguage", defaultAudioLanguage, - "defaultSubtitleLanguage", defaultSubtitleLanguage, - "autoSelectSubtitle", autoSelectSubtitle, - "defaultSubtitleAccessibility", defaultSubtitleAccessibility, - "defaultSubtitleForced", defaultSubtitleForced, - "watchedIndicator", watchedIndicator, - "mediaReviewsVisibility", mediaReviewsVisibility); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional autoSelectAudio; - - private Optional defaultAudioLanguage = Optional.empty(); - - private Optional defaultSubtitleLanguage = Optional.empty(); - - private Optional autoSelectSubtitle; - - private Optional defaultSubtitleAccessibility; - - private Optional defaultSubtitleForced; - - private Optional watchedIndicator; - - private Optional mediaReviewsVisibility; - - private Builder() { - // force use of static builder() method - } - - - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - public Builder autoSelectAudio(boolean autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = Optional.ofNullable(autoSelectAudio); - return this; - } - - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - public Builder autoSelectAudio(Optional autoSelectAudio) { - Utils.checkNotNull(autoSelectAudio, "autoSelectAudio"); - this.autoSelectAudio = autoSelectAudio; - return this; - } - - - /** - * The preferred audio language for the account - */ - public Builder defaultAudioLanguage(String defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = Optional.ofNullable(defaultAudioLanguage); - return this; - } - - /** - * The preferred audio language for the account - */ - public Builder defaultAudioLanguage(Optional defaultAudioLanguage) { - Utils.checkNotNull(defaultAudioLanguage, "defaultAudioLanguage"); - this.defaultAudioLanguage = defaultAudioLanguage; - return this; - } - - - /** - * The preferred subtitle language for the account - */ - public Builder defaultSubtitleLanguage(String defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = Optional.ofNullable(defaultSubtitleLanguage); - return this; - } - - /** - * The preferred subtitle language for the account - */ - public Builder defaultSubtitleLanguage(Optional defaultSubtitleLanguage) { - Utils.checkNotNull(defaultSubtitleLanguage, "defaultSubtitleLanguage"); - this.defaultSubtitleLanguage = defaultSubtitleLanguage; - return this; - } - - - public Builder autoSelectSubtitle(AutoSelectSubtitle autoSelectSubtitle) { - Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle"); - this.autoSelectSubtitle = Optional.ofNullable(autoSelectSubtitle); - return this; - } - - public Builder autoSelectSubtitle(Optional autoSelectSubtitle) { - Utils.checkNotNull(autoSelectSubtitle, "autoSelectSubtitle"); - this.autoSelectSubtitle = autoSelectSubtitle; - return this; - } - - - public Builder defaultSubtitleAccessibility(DefaultSubtitleAccessibility defaultSubtitleAccessibility) { - Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility"); - this.defaultSubtitleAccessibility = Optional.ofNullable(defaultSubtitleAccessibility); - return this; - } - - public Builder defaultSubtitleAccessibility(Optional defaultSubtitleAccessibility) { - Utils.checkNotNull(defaultSubtitleAccessibility, "defaultSubtitleAccessibility"); - this.defaultSubtitleAccessibility = defaultSubtitleAccessibility; - return this; - } - - - public Builder defaultSubtitleForced(DefaultSubtitleForced defaultSubtitleForced) { - Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced"); - this.defaultSubtitleForced = Optional.ofNullable(defaultSubtitleForced); - return this; - } - - public Builder defaultSubtitleForced(Optional defaultSubtitleForced) { - Utils.checkNotNull(defaultSubtitleForced, "defaultSubtitleForced"); - this.defaultSubtitleForced = defaultSubtitleForced; - return this; - } - - - public Builder watchedIndicator(WatchedIndicator watchedIndicator) { - Utils.checkNotNull(watchedIndicator, "watchedIndicator"); - this.watchedIndicator = Optional.ofNullable(watchedIndicator); - return this; - } - - public Builder watchedIndicator(Optional watchedIndicator) { - Utils.checkNotNull(watchedIndicator, "watchedIndicator"); - this.watchedIndicator = watchedIndicator; - return this; - } - - - public Builder mediaReviewsVisibility(MediaReviewsVisibility mediaReviewsVisibility) { - Utils.checkNotNull(mediaReviewsVisibility, "mediaReviewsVisibility"); - this.mediaReviewsVisibility = Optional.ofNullable(mediaReviewsVisibility); - return this; - } - - public Builder mediaReviewsVisibility(Optional mediaReviewsVisibility) { - Utils.checkNotNull(mediaReviewsVisibility, "mediaReviewsVisibility"); - this.mediaReviewsVisibility = mediaReviewsVisibility; - return this; - } - - public UserProfile build() { - if (autoSelectAudio == null) { - autoSelectAudio = _SINGLETON_VALUE_AutoSelectAudio.value(); - } - if (autoSelectSubtitle == null) { - autoSelectSubtitle = _SINGLETON_VALUE_AutoSelectSubtitle.value(); - } - if (defaultSubtitleAccessibility == null) { - defaultSubtitleAccessibility = _SINGLETON_VALUE_DefaultSubtitleAccessibility.value(); - } - if (defaultSubtitleForced == null) { - defaultSubtitleForced = _SINGLETON_VALUE_DefaultSubtitleForced.value(); - } - if (watchedIndicator == null) { - watchedIndicator = _SINGLETON_VALUE_WatchedIndicator.value(); - } - if (mediaReviewsVisibility == null) { - mediaReviewsVisibility = _SINGLETON_VALUE_MediaReviewsVisibility.value(); - } - - return new UserProfile( - autoSelectAudio, defaultAudioLanguage, defaultSubtitleLanguage, - autoSelectSubtitle, defaultSubtitleAccessibility, defaultSubtitleForced, - watchedIndicator, mediaReviewsVisibility); - } - - - private static final LazySingletonValue> _SINGLETON_VALUE_AutoSelectAudio = - new LazySingletonValue<>( - "autoSelectAudio", - "true", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_AutoSelectSubtitle = - new LazySingletonValue<>( - "autoSelectSubtitle", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_DefaultSubtitleAccessibility = - new LazySingletonValue<>( - "defaultSubtitleAccessibility", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_DefaultSubtitleForced = - new LazySingletonValue<>( - "defaultSubtitleForced", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_WatchedIndicator = - new LazySingletonValue<>( - "watchedIndicator", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_MediaReviewsVisibility = - new LazySingletonValue<>( - "mediaReviewsVisibility", - "0", - new TypeReference>() {}); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsMediaContainer.java new file mode 100644 index 00000000..d8462d5d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsMediaContainer.java @@ -0,0 +1,331 @@ +/* + * 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.models.shared.Hub; +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.List; +import java.util.Optional; + +/** + * VoiceSearchHubsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class VoiceSearchHubsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + @JsonCreator + public VoiceSearchHubsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(hub, "hub"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.hub = hub; + } + + public VoiceSearchHubsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hub() { + return (Optional>) hub; + } + + public static Builder builder() { + return new Builder(); + } + + + public VoiceSearchHubsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public VoiceSearchHubsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public VoiceSearchHubsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public VoiceSearchHubsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public VoiceSearchHubsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public VoiceSearchHubsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public VoiceSearchHubsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public VoiceSearchHubsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public VoiceSearchHubsMediaContainer withHub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + + public VoiceSearchHubsMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VoiceSearchHubsMediaContainer other = (VoiceSearchHubsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, hub); + } + + @Override + public String toString() { + return Utils.toString(VoiceSearchHubsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "hub", hub); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder hub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public VoiceSearchHubsMediaContainer build() { + + return new VoiceSearchHubsMediaContainer( + identifier, offset, size, + totalSize, hub); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsRequest.java new file mode 100644 index 00000000..5f739a6f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsRequest.java @@ -0,0 +1,901 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class VoiceSearchHubsRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * The query term + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") + private String query; + + /** + * The metadata type to filter by + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Optional type; + + /** + * The number of items to return per hub. 3 if not specified + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + @JsonCreator + public VoiceSearchHubsRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + String query, + Optional type, + Optional limit) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(query, "query"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(limit, "limit"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.query = query; + this.type = type; + this.limit = limit; + } + + public VoiceSearchHubsRequest( + String query) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), query, + Optional.empty(), Optional.empty()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * The query term + */ + @JsonIgnore + public String query() { + return query; + } + + /** + * The metadata type to filter by + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * The number of items to return per hub. 3 if not specified + */ + @JsonIgnore + public Optional limit() { + return limit; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public VoiceSearchHubsRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public VoiceSearchHubsRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public VoiceSearchHubsRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public VoiceSearchHubsRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public VoiceSearchHubsRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public VoiceSearchHubsRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public VoiceSearchHubsRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public VoiceSearchHubsRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public VoiceSearchHubsRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public VoiceSearchHubsRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public VoiceSearchHubsRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public VoiceSearchHubsRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public VoiceSearchHubsRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public VoiceSearchHubsRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public VoiceSearchHubsRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public VoiceSearchHubsRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public VoiceSearchHubsRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public VoiceSearchHubsRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public VoiceSearchHubsRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public VoiceSearchHubsRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public VoiceSearchHubsRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public VoiceSearchHubsRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * The query term + */ + public VoiceSearchHubsRequest withQuery(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + /** + * The metadata type to filter by + */ + public VoiceSearchHubsRequest withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The metadata type to filter by + */ + public VoiceSearchHubsRequest withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The number of items to return per hub. 3 if not specified + */ + public VoiceSearchHubsRequest withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + + /** + * The number of items to return per hub. 3 if not specified + */ + public VoiceSearchHubsRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VoiceSearchHubsRequest other = (VoiceSearchHubsRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.query, other.query) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.limit, other.limit); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, query, + type, limit); + } + + @Override + public String toString() { + return Utils.toString(VoiceSearchHubsRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "query", query, + "type", type, + "limit", limit); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private String query; + + private Optional type = Optional.empty(); + + private Optional limit = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * The query term + */ + public Builder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + + /** + * The metadata type to filter by + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The metadata type to filter by + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The number of items to return per hub. 3 if not specified + */ + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * The number of items to return per hub. 3 if not specified + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public VoiceSearchHubsRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new VoiceSearchHubsRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, query, + type, limit); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsRequestBuilder.java new file mode 100644 index 00000000..d1777daf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.VoiceSearchHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class VoiceSearchHubsRequestBuilder { + + private VoiceSearchHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public VoiceSearchHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public VoiceSearchHubsRequestBuilder request(VoiceSearchHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public VoiceSearchHubsResponse call() throws Exception { + + RequestOperation operation + = new VoiceSearchHubs.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsResponse.java new file mode 100644 index 00000000..4e374564 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsResponse.java @@ -0,0 +1,284 @@ +/* + * 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.List; +import java.util.Map; +import java.util.Optional; + + +public class VoiceSearchHubsResponse 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public VoiceSearchHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public VoiceSearchHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public VoiceSearchHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public VoiceSearchHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public VoiceSearchHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public VoiceSearchHubsResponse withObject(VoiceSearchHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public VoiceSearchHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public VoiceSearchHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VoiceSearchHubsResponse other = (VoiceSearchHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(VoiceSearchHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(VoiceSearchHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public VoiceSearchHubsResponse build() { + + return new VoiceSearchHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsResponseBody.java new file mode 100644 index 00000000..2f6fae77 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/VoiceSearchHubsResponseBody.java @@ -0,0 +1,117 @@ +/* + * 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.Optional; + +/** + * VoiceSearchHubsResponseBody + * + *

OK + */ +public class VoiceSearchHubsResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public VoiceSearchHubsResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public VoiceSearchHubsResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public VoiceSearchHubsResponseBody withMediaContainer(VoiceSearchHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public VoiceSearchHubsResponseBody 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; + } + VoiceSearchHubsResponseBody other = (VoiceSearchHubsResponseBody) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(VoiceSearchHubsResponseBody.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(VoiceSearchHubsMediaContainer 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 VoiceSearchHubsResponseBody build() { + + return new VoiceSearchHubsResponseBody( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/WatchedIndicator.java b/src/main/java/dev/plexapi/sdk/models/operations/WatchedIndicator.java deleted file mode 100644 index f0262893..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/WatchedIndicator.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -/** - * WatchedIndicator - * - *

Whether or not media watched indicators are enabled (little orange dot on media) - */ -public enum WatchedIndicator { - Disable(0), - Enable(1); - - @JsonValue - private final int value; - - WatchedIndicator(int value) { - this.value = value; - } - - public int value() { - return value; - } - - public static Optional fromValue(int value) { - for (WatchedIndicator o: WatchedIndicator.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/dev/plexapi/sdk/models/operations/WriteLogRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/WriteLogRequestBuilder.java new file mode 100644 index 00000000..baa05af7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/WriteLogRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.WriteLog; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class WriteLogRequestBuilder { + + private byte[] request; + private final SDKConfiguration sdkConfiguration; + + public WriteLogRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public WriteLogRequestBuilder request(byte[] request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public WriteLogResponse call() throws Exception { + + RequestOperation operation + = new WriteLog.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/WriteLogResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/WriteLogResponse.java new file mode 100644 index 00000000..8dc52735 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/WriteLogResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class WriteLogResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public WriteLogResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public WriteLogResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public WriteLogResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public WriteLogResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WriteLogResponse other = (WriteLogResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(WriteLogResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public WriteLogResponse build() { + + return new WriteLogResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/WriteMessageRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/WriteMessageRequest.java new file mode 100644 index 00000000..5f7cd197 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/WriteMessageRequest.java @@ -0,0 +1,949 @@ +/* + * 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.models.shared.Accepts; +import dev.plexapi.sdk.utils.LazySingletonValue; +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.Optional; + + +public class WriteMessageRequest { + /** + * Indicates the client accepts the indicated media types + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=accepts") + private Optional accepts; + + /** + * An opaque identifier unique to the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier") + private Optional clientIdentifier; + + /** + * The name of the client product + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product") + private Optional product; + + /** + * The version of the client application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version") + private Optional version; + + /** + * The platform of the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform") + private Optional platform; + + /** + * The version of the platform + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version") + private Optional platformVersion; + + /** + * A relatively friendly name for the client device + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device") + private Optional device; + + /** + * A potentially less friendly identifier for the device model + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model") + private Optional model; + + /** + * The device vendor + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Vendor") + private Optional deviceVendor; + + /** + * A friendly name for the client + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name") + private Optional deviceName; + + /** + * The marketplace on which the client application is distributed + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Marketplace") + private Optional marketplace; + + /** + * An integer log level to write to the PMS log with. + * - 0: Error + * - 1: Warning + * - 2: Info + * - 3: Debug + * - 4: Verbose + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=level") + private Optional level; + + /** + * The text of the message to write to the log. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=message") + private Optional message; + + /** + * A string indicating the source of the message. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=source") + private Optional source; + + @JsonCreator + public WriteMessageRequest( + Optional accepts, + Optional clientIdentifier, + Optional product, + Optional version, + Optional platform, + Optional platformVersion, + Optional device, + Optional model, + Optional deviceVendor, + Optional deviceName, + Optional marketplace, + Optional level, + Optional message, + Optional source) { + Utils.checkNotNull(accepts, "accepts"); + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(deviceVendor, "deviceVendor"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(marketplace, "marketplace"); + Utils.checkNotNull(level, "level"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(source, "source"); + this.accepts = accepts; + this.clientIdentifier = clientIdentifier; + this.product = product; + this.version = version; + this.platform = platform; + this.platformVersion = platformVersion; + this.device = device; + this.model = model; + this.deviceVendor = deviceVendor; + this.deviceName = deviceName; + this.marketplace = marketplace; + this.level = level; + this.message = message; + this.source = source; + } + + public WriteMessageRequest() { + 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()); + } + + /** + * Indicates the client accepts the indicated media types + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accepts() { + return (Optional) accepts; + } + + /** + * An opaque identifier unique to the client + */ + @JsonIgnore + public Optional clientIdentifier() { + return clientIdentifier; + } + + /** + * The name of the client product + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * The version of the client application + */ + @JsonIgnore + public Optional version() { + return version; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The version of the platform + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * A relatively friendly name for the client device + */ + @JsonIgnore + public Optional device() { + return device; + } + + /** + * A potentially less friendly identifier for the device model + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The device vendor + */ + @JsonIgnore + public Optional deviceVendor() { + return deviceVendor; + } + + /** + * A friendly name for the client + */ + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + /** + * The marketplace on which the client application is distributed + */ + @JsonIgnore + public Optional marketplace() { + return marketplace; + } + + /** + * An integer log level to write to the PMS log with. + * - 0: Error + * - 1: Warning + * - 2: Info + * - 3: Debug + * - 4: Verbose + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional level() { + return (Optional) level; + } + + /** + * The text of the message to write to the log. + */ + @JsonIgnore + public Optional message() { + return message; + } + + /** + * A string indicating the source of the message. + */ + @JsonIgnore + public Optional source() { + return source; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the client accepts the indicated media types + */ + public WriteMessageRequest withAccepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + + /** + * Indicates the client accepts the indicated media types + */ + public WriteMessageRequest withAccepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + /** + * An opaque identifier unique to the client + */ + public WriteMessageRequest withClientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public WriteMessageRequest withClientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + /** + * The name of the client product + */ + public WriteMessageRequest withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The name of the client product + */ + public WriteMessageRequest withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * The version of the client application + */ + public WriteMessageRequest withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client application + */ + public WriteMessageRequest withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * The platform of the client + */ + public WriteMessageRequest withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public WriteMessageRequest withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The version of the platform + */ + public WriteMessageRequest withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The version of the platform + */ + public WriteMessageRequest withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * A relatively friendly name for the client device + */ + public WriteMessageRequest withDevice(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public WriteMessageRequest withDevice(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public WriteMessageRequest withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public WriteMessageRequest withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The device vendor + */ + public WriteMessageRequest withDeviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + + /** + * The device vendor + */ + public WriteMessageRequest withDeviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + /** + * A friendly name for the client + */ + public WriteMessageRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + + /** + * A friendly name for the client + */ + public WriteMessageRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public WriteMessageRequest withMarketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public WriteMessageRequest withMarketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + /** + * An integer log level to write to the PMS log with. + * - 0: Error + * - 1: Warning + * - 2: Info + * - 3: Debug + * - 4: Verbose + */ + public WriteMessageRequest withLevel(Level level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + + /** + * An integer log level to write to the PMS log with. + * - 0: Error + * - 1: Warning + * - 2: Info + * - 3: Debug + * - 4: Verbose + */ + public WriteMessageRequest withLevel(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + /** + * The text of the message to write to the log. + */ + public WriteMessageRequest withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + + /** + * The text of the message to write to the log. + */ + public WriteMessageRequest withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + /** + * A string indicating the source of the message. + */ + public WriteMessageRequest withSource(String source) { + Utils.checkNotNull(source, "source"); + this.source = Optional.ofNullable(source); + return this; + } + + + /** + * A string indicating the source of the message. + */ + public WriteMessageRequest withSource(Optional source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WriteMessageRequest other = (WriteMessageRequest) o; + return + Utils.enhancedDeepEquals(this.accepts, other.accepts) && + Utils.enhancedDeepEquals(this.clientIdentifier, other.clientIdentifier) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.deviceVendor, other.deviceVendor) && + Utils.enhancedDeepEquals(this.deviceName, other.deviceName) && + Utils.enhancedDeepEquals(this.marketplace, other.marketplace) && + Utils.enhancedDeepEquals(this.level, other.level) && + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.source, other.source); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, level, + message, source); + } + + @Override + public String toString() { + return Utils.toString(WriteMessageRequest.class, + "accepts", accepts, + "clientIdentifier", clientIdentifier, + "product", product, + "version", version, + "platform", platform, + "platformVersion", platformVersion, + "device", device, + "model", model, + "deviceVendor", deviceVendor, + "deviceName", deviceName, + "marketplace", marketplace, + "level", level, + "message", message, + "source", source); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accepts; + + private Optional clientIdentifier = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional device = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional deviceVendor = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional marketplace = Optional.empty(); + + private Optional level = Optional.empty(); + + private Optional message = Optional.empty(); + + private Optional source = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Accepts accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = Optional.ofNullable(accepts); + return this; + } + + /** + * Indicates the client accepts the indicated media types + */ + public Builder accepts(Optional accepts) { + Utils.checkNotNull(accepts, "accepts"); + this.accepts = accepts; + return this; + } + + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(String clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = Optional.ofNullable(clientIdentifier); + return this; + } + + /** + * An opaque identifier unique to the client + */ + public Builder clientIdentifier(Optional clientIdentifier) { + Utils.checkNotNull(clientIdentifier, "clientIdentifier"); + this.clientIdentifier = clientIdentifier; + return this; + } + + + /** + * The name of the client product + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The name of the client product + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * The version of the client application + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client application + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The version of the platform + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The version of the platform + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * A relatively friendly name for the client device + */ + public Builder device(String device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + /** + * A relatively friendly name for the client device + */ + public Builder device(Optional device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * A potentially less friendly identifier for the device model + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The device vendor + */ + public Builder deviceVendor(String deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = Optional.ofNullable(deviceVendor); + return this; + } + + /** + * The device vendor + */ + public Builder deviceVendor(Optional deviceVendor) { + Utils.checkNotNull(deviceVendor, "deviceVendor"); + this.deviceVendor = deviceVendor; + return this; + } + + + /** + * A friendly name for the client + */ + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + /** + * A friendly name for the client + */ + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(String marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = Optional.ofNullable(marketplace); + return this; + } + + /** + * The marketplace on which the client application is distributed + */ + public Builder marketplace(Optional marketplace) { + Utils.checkNotNull(marketplace, "marketplace"); + this.marketplace = marketplace; + return this; + } + + + /** + * An integer log level to write to the PMS log with. + * - 0: Error + * - 1: Warning + * - 2: Info + * - 3: Debug + * - 4: Verbose + */ + public Builder level(Level level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + /** + * An integer log level to write to the PMS log with. + * - 0: Error + * - 1: Warning + * - 2: Info + * - 3: Debug + * - 4: Verbose + */ + public Builder level(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + + /** + * The text of the message to write to the log. + */ + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + /** + * The text of the message to write to the log. + */ + public Builder message(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + /** + * A string indicating the source of the message. + */ + public Builder source(String source) { + Utils.checkNotNull(source, "source"); + this.source = Optional.ofNullable(source); + return this; + } + + /** + * A string indicating the source of the message. + */ + public Builder source(Optional source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + public WriteMessageRequest build() { + if (accepts == null) { + accepts = _SINGLETON_VALUE_Accepts.value(); + } + + return new WriteMessageRequest( + accepts, clientIdentifier, product, + version, platform, platformVersion, + device, model, deviceVendor, + deviceName, marketplace, level, + message, source); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Accepts = + new LazySingletonValue<>( + "accepts", + "\"application/xml\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/WriteMessageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/WriteMessageRequestBuilder.java new file mode 100644 index 00000000..4a3c2695 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/WriteMessageRequestBuilder.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.WriteMessage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; + +public class WriteMessageRequestBuilder { + + private WriteMessageRequest request; + private final SDKConfiguration sdkConfiguration; + + public WriteMessageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public WriteMessageRequestBuilder request(WriteMessageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public WriteMessageResponse call() throws Exception { + + RequestOperation operation + = new WriteMessage.Sync(sdkConfiguration); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/WriteMessageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/WriteMessageResponse.java new file mode 100644 index 00000000..9181b22d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/WriteMessageResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class WriteMessageResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public WriteMessageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public WriteMessageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public WriteMessageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public WriteMessageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WriteMessageResponse other = (WriteMessageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(WriteMessageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public WriteMessageResponse build() { + + return new WriteMessageResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Writer.java b/src/main/java/dev/plexapi/sdk/models/operations/Writer.java deleted file mode 100644 index d729d168..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/Writer.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; - - -public class Writer { - /** - * Unique identifier for the writer. - */ - @JsonProperty("id") - private int id; - - /** - * The filter string used to query this writer. - */ - @JsonProperty("filter") - private String filter; - - /** - * The role of Writer - */ - @JsonProperty("tag") - private String tag; - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tagKey") - private Optional tagKey; - - /** - * The absolute URL of the thumbnail image for the writer. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("thumb") - private Optional thumb; - - @JsonCreator - public Writer( - @JsonProperty("id") int id, - @JsonProperty("filter") String filter, - @JsonProperty("tag") String tag, - @JsonProperty("tagKey") Optional tagKey, - @JsonProperty("thumb") Optional thumb) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(filter, "filter"); - Utils.checkNotNull(tag, "tag"); - Utils.checkNotNull(tagKey, "tagKey"); - Utils.checkNotNull(thumb, "thumb"); - this.id = id; - this.filter = filter; - this.tag = tag; - this.tagKey = tagKey; - this.thumb = thumb; - } - - public Writer( - int id, - String filter, - String tag) { - this(id, filter, tag, - Optional.empty(), Optional.empty()); - } - - /** - * Unique identifier for the writer. - */ - @JsonIgnore - public int id() { - return id; - } - - /** - * The filter string used to query this writer. - */ - @JsonIgnore - public String filter() { - return filter; - } - - /** - * The role of Writer - */ - @JsonIgnore - public String tag() { - return tag; - } - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - @JsonIgnore - public Optional tagKey() { - return tagKey; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - @JsonIgnore - public Optional thumb() { - return thumb; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Unique identifier for the writer. - */ - public Writer withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The filter string used to query this writer. - */ - public Writer withFilter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - /** - * The role of Writer - */ - public Writer withTag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - public Writer withTagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - public Writer withTagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public Writer withThumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public Writer withThumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Writer other = (Writer) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.filter, other.filter) && - Utils.enhancedDeepEquals(this.tag, other.tag) && - Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && - Utils.enhancedDeepEquals(this.thumb, other.thumb); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, filter, tag, - tagKey, thumb); - } - - @Override - public String toString() { - return Utils.toString(Writer.class, - "id", id, - "filter", filter, - "tag", tag, - "tagKey", tagKey, - "thumb", thumb); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Integer id; - - private String filter; - - private String tag; - - private Optional tagKey = Optional.empty(); - - private Optional thumb = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Unique identifier for the writer. - */ - public Builder id(int id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The filter string used to query this writer. - */ - public Builder filter(String filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - - /** - * The role of Writer - */ - public Builder tag(String tag) { - Utils.checkNotNull(tag, "tag"); - this.tag = tag; - return this; - } - - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - public Builder tagKey(String tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = Optional.ofNullable(tagKey); - return this; - } - - /** - * A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. - */ - public Builder tagKey(Optional tagKey) { - Utils.checkNotNull(tagKey, "tagKey"); - this.tagKey = tagKey; - return this; - } - - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public Builder thumb(String thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = Optional.ofNullable(thumb); - return this; - } - - /** - * The absolute URL of the thumbnail image for the writer. - */ - public Builder thumb(Optional thumb) { - Utils.checkNotNull(thumb, "thumb"); - this.thumb = thumb; - return this; - } - - public Writer build() { - - return new Writer( - id, filter, tag, - tagKey, thumb); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddCollectionItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddCollectionItemsRequestBuilder.java new file mode 100644 index 00000000..e1b13a40 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddCollectionItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddCollectionItemsRequest; +import dev.plexapi.sdk.operations.AddCollectionItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddCollectionItemsRequestBuilder { + + private AddCollectionItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddCollectionItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddCollectionItemsRequestBuilder request(AddCollectionItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddCollectionItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddCollectionItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddCollectionItemsResponse.java new file mode 100644 index 00000000..7ef849a0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddCollectionItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class AddCollectionItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public AddCollectionItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public AddCollectionItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddCollectionItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddCollectionItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddCollectionItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddCollectionItemsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public AddCollectionItemsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddCollectionItemsResponse other = (AddCollectionItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(AddCollectionItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public AddCollectionItemsResponse build() { + + return new AddCollectionItemsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceRequestBuilder.java new file mode 100644 index 00000000..4ab88504 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddDeviceRequest; +import dev.plexapi.sdk.operations.AddDevice; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddDeviceRequestBuilder { + + private AddDeviceRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddDeviceRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddDeviceRequestBuilder request(AddDeviceRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddDevice.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceResponse.java new file mode 100644 index 00000000..315e7327 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class AddDeviceResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + @JsonCreator + public AddDeviceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + } + + public AddDeviceResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddDeviceResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddDeviceResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddDeviceResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddDeviceResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public AddDeviceResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDeviceResponse other = (AddDeviceResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + @Override + public String toString() { + return Utils.toString(AddDeviceResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public AddDeviceResponse build() { + + return new AddDeviceResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceToDVRRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceToDVRRequestBuilder.java new file mode 100644 index 00000000..b0392153 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceToDVRRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddDeviceToDVRRequest; +import dev.plexapi.sdk.operations.AddDeviceToDVR; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddDeviceToDVRRequestBuilder { + + private AddDeviceToDVRRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddDeviceToDVRRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddDeviceToDVRRequestBuilder request(AddDeviceToDVRRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddDeviceToDVR.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceToDVRResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceToDVRResponse.java new file mode 100644 index 00000000..7a3d29f9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDeviceToDVRResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.AddDeviceToDVRResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class AddDeviceToDVRResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public AddDeviceToDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public AddDeviceToDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddDeviceToDVRResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddDeviceToDVRResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddDeviceToDVRResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddDeviceToDVRResponse withObject(AddDeviceToDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public AddDeviceToDVRResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public AddDeviceToDVRResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddDeviceToDVRResponse other = (AddDeviceToDVRResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(AddDeviceToDVRResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(AddDeviceToDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public AddDeviceToDVRResponse build() { + + return new AddDeviceToDVRResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddDownloadQueueItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDownloadQueueItemsRequestBuilder.java new file mode 100644 index 00000000..f2611b59 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDownloadQueueItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsRequest; +import dev.plexapi.sdk.operations.AddDownloadQueueItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddDownloadQueueItemsRequestBuilder { + + private AddDownloadQueueItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddDownloadQueueItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddDownloadQueueItemsRequestBuilder request(AddDownloadQueueItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddDownloadQueueItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddDownloadQueueItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDownloadQueueItemsResponse.java new file mode 100644 index 00000000..0ec880d7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddDownloadQueueItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class AddDownloadQueueItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public AddDownloadQueueItemsResponse( + 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 AddDownloadQueueItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddDownloadQueueItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddDownloadQueueItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddDownloadQueueItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddDownloadQueueItemsResponse withObject(AddDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public AddDownloadQueueItemsResponse 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; + } + AddDownloadQueueItemsResponse other = (AddDownloadQueueItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(AddDownloadQueueItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(AddDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public AddDownloadQueueItemsResponse build() { + + return new AddDownloadQueueItemsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddExtrasRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddExtrasRequestBuilder.java new file mode 100644 index 00000000..0824fa45 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddExtrasRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddExtrasRequest; +import dev.plexapi.sdk.operations.AddExtras; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddExtrasRequestBuilder { + + private AddExtrasRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddExtrasRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddExtrasRequestBuilder request(AddExtrasRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddExtras.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddExtrasResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddExtrasResponse.java new file mode 100644 index 00000000..57155b8b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddExtrasResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class AddExtrasResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public AddExtrasResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddExtrasResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddExtrasResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddExtrasResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddExtrasResponse other = (AddExtrasResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(AddExtrasResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public AddExtrasResponse build() { + + return new AddExtrasResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddLineupRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddLineupRequestBuilder.java new file mode 100644 index 00000000..c12caff5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddLineupRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddLineupRequest; +import dev.plexapi.sdk.operations.AddLineup; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddLineupRequestBuilder { + + private AddLineupRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddLineupRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddLineupRequestBuilder request(AddLineupRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddLineup.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddLineupResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddLineupResponse.java new file mode 100644 index 00000000..6da1ef76 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddLineupResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.AddLineupResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class AddLineupResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public AddLineupResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public AddLineupResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddLineupResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddLineupResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddLineupResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddLineupResponse withObject(AddLineupResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public AddLineupResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public AddLineupResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddLineupResponse other = (AddLineupResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(AddLineupResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(AddLineupResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public AddLineupResponse build() { + + return new AddLineupResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistContentsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistContentsRequestBuilder.java deleted file mode 100644 index 7d1fd64b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistContentsRequestBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsRequest; -import dev.plexapi.sdk.operations.AddPlaylistContents; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class AddPlaylistContentsRequestBuilder { - - private Double playlistID; - private String uri; - private Optional playQueueID = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public AddPlaylistContentsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public AddPlaylistContentsRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - public AddPlaylistContentsRequestBuilder uri(String uri) { - Utils.checkNotNull(uri, "uri"); - this.uri = uri; - return this; - } - - public AddPlaylistContentsRequestBuilder playQueueID(double playQueueID) { - Utils.checkNotNull(playQueueID, "playQueueID"); - this.playQueueID = Optional.of(playQueueID); - return this; - } - - public AddPlaylistContentsRequestBuilder playQueueID(Optional playQueueID) { - Utils.checkNotNull(playQueueID, "playQueueID"); - this.playQueueID = playQueueID; - return this; - } - - - private AddPlaylistContentsRequest buildRequest() { - - AddPlaylistContentsRequest request = new AddPlaylistContentsRequest(playlistID, - uri, - playQueueID); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new AddPlaylistContents.Async(sdkConfiguration); - AddPlaylistContentsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistContentsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistContentsResponse.java deleted file mode 100644 index a6b36863..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistContentsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class AddPlaylistContentsResponse implements AsyncResponse { - /** - * 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; - - /** - * Playlist Updated - */ - private Optional object; - - @JsonCreator - public AddPlaylistContentsResponse( - 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 AddPlaylistContentsResponse( - 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; - } - - /** - * Playlist Updated - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public AddPlaylistContentsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public AddPlaylistContentsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public AddPlaylistContentsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Playlist Updated - */ - public AddPlaylistContentsResponse withObject(AddPlaylistContentsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Playlist Updated - */ - public AddPlaylistContentsResponse 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; - } - AddPlaylistContentsResponse other = (AddPlaylistContentsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(AddPlaylistContentsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Playlist Updated - */ - public Builder object(AddPlaylistContentsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Playlist Updated - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public AddPlaylistContentsResponse build() { - - return new AddPlaylistContentsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistItemsRequestBuilder.java new file mode 100644 index 00000000..e76be3d3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddPlaylistItemsRequest; +import dev.plexapi.sdk.operations.AddPlaylistItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddPlaylistItemsRequestBuilder { + + private AddPlaylistItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddPlaylistItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddPlaylistItemsRequestBuilder request(AddPlaylistItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddPlaylistItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistItemsResponse.java new file mode 100644 index 00000000..7aa7540a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddPlaylistItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class AddPlaylistItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public AddPlaylistItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public AddPlaylistItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddPlaylistItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddPlaylistItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddPlaylistItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddPlaylistItemsResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public AddPlaylistItemsResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddPlaylistItemsResponse other = (AddPlaylistItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(AddPlaylistItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public AddPlaylistItemsResponse build() { + + return new AddPlaylistItemsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddProviderRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddProviderRequestBuilder.java new file mode 100644 index 00000000..b739e75b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddProviderRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddProviderRequest; +import dev.plexapi.sdk.operations.AddProvider; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddProviderRequestBuilder { + + private AddProviderRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddProviderRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddProviderRequestBuilder request(AddProviderRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddProvider.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddProviderResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddProviderResponse.java new file mode 100644 index 00000000..e2196f6b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddProviderResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class AddProviderResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public AddProviderResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddProviderResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddProviderResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddProviderResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddProviderResponse other = (AddProviderResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(AddProviderResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public AddProviderResponse build() { + + return new AddProviderResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddSectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddSectionRequestBuilder.java new file mode 100644 index 00000000..36946f0a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddSectionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddSectionRequest; +import dev.plexapi.sdk.operations.AddSection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddSectionRequestBuilder { + + private AddSectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddSectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddSectionRequestBuilder request(AddSectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddSection.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddSectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddSectionResponse.java new file mode 100644 index 00000000..f6a2a675 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddSectionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.SlashGetResponses200; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class AddSectionResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional slashGetResponses200; + + @JsonCreator + public AddSectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional slashGetResponses200) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(slashGetResponses200, "slashGetResponses200"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.slashGetResponses200 = slashGetResponses200; + } + + public AddSectionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional slashGetResponses200() { + return (Optional) slashGetResponses200; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddSectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddSectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddSectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddSectionResponse withSlashGetResponses200(SlashGetResponses200 slashGetResponses200) { + Utils.checkNotNull(slashGetResponses200, "slashGetResponses200"); + this.slashGetResponses200 = Optional.ofNullable(slashGetResponses200); + return this; + } + + + /** + * OK + */ + public AddSectionResponse withSlashGetResponses200(Optional slashGetResponses200) { + Utils.checkNotNull(slashGetResponses200, "slashGetResponses200"); + this.slashGetResponses200 = slashGetResponses200; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddSectionResponse other = (AddSectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.slashGetResponses200, other.slashGetResponses200); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + slashGetResponses200); + } + + @Override + public String toString() { + return Utils.toString(AddSectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "slashGetResponses200", slashGetResponses200); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional slashGetResponses200 = 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; + } + + + /** + * OK + */ + public Builder slashGetResponses200(SlashGetResponses200 slashGetResponses200) { + Utils.checkNotNull(slashGetResponses200, "slashGetResponses200"); + this.slashGetResponses200 = Optional.ofNullable(slashGetResponses200); + return this; + } + + /** + * OK + */ + public Builder slashGetResponses200(Optional slashGetResponses200) { + Utils.checkNotNull(slashGetResponses200, "slashGetResponses200"); + this.slashGetResponses200 = slashGetResponses200; + return this; + } + + public AddSectionResponse build() { + + return new AddSectionResponse( + contentType, statusCode, rawResponse, + slashGetResponses200); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddSubtitlesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddSubtitlesRequestBuilder.java new file mode 100644 index 00000000..4c3efbd6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddSubtitlesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddSubtitlesRequest; +import dev.plexapi.sdk.operations.AddSubtitles; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddSubtitlesRequestBuilder { + + private AddSubtitlesRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddSubtitlesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddSubtitlesRequestBuilder request(AddSubtitlesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddSubtitles.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddSubtitlesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddSubtitlesResponse.java new file mode 100644 index 00000000..2128e1fd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddSubtitlesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class AddSubtitlesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public AddSubtitlesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddSubtitlesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddSubtitlesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddSubtitlesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddSubtitlesResponse other = (AddSubtitlesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(AddSubtitlesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public AddSubtitlesResponse build() { + + return new AddSubtitlesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddToPlayQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddToPlayQueueRequestBuilder.java new file mode 100644 index 00000000..7cada434 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddToPlayQueueRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AddToPlayQueueRequest; +import dev.plexapi.sdk.operations.AddToPlayQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AddToPlayQueueRequestBuilder { + + private AddToPlayQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public AddToPlayQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AddToPlayQueueRequestBuilder request(AddToPlayQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AddToPlayQueue.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AddToPlayQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AddToPlayQueueResponse.java new file mode 100644 index 00000000..fe15e845 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AddToPlayQueueResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class AddToPlayQueueResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public AddToPlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public AddToPlayQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AddToPlayQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AddToPlayQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AddToPlayQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AddToPlayQueueResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public AddToPlayQueueResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddToPlayQueueResponse other = (AddToPlayQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(AddToPlayQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public AddToPlayQueueResponse build() { + + return new AddToPlayQueueResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AnalyzeMetadataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AnalyzeMetadataRequestBuilder.java new file mode 100644 index 00000000..17604ebe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AnalyzeMetadataRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AnalyzeMetadataRequest; +import dev.plexapi.sdk.operations.AnalyzeMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AnalyzeMetadataRequestBuilder { + + private AnalyzeMetadataRequest request; + private final SDKConfiguration sdkConfiguration; + + public AnalyzeMetadataRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AnalyzeMetadataRequestBuilder request(AnalyzeMetadataRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new AnalyzeMetadata.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AnalyzeMetadataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AnalyzeMetadataResponse.java new file mode 100644 index 00000000..b8c25ad1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AnalyzeMetadataResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class AnalyzeMetadataResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public AnalyzeMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AnalyzeMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AnalyzeMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AnalyzeMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyzeMetadataResponse other = (AnalyzeMetadataResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(AnalyzeMetadataResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public AnalyzeMetadataResponse build() { + + return new AnalyzeMetadataResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ApplyUpdatesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ApplyUpdatesRequestBuilder.java index e7043cf7..ee74004b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/ApplyUpdatesRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ApplyUpdatesRequestBuilder.java @@ -7,62 +7,30 @@ import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.models.operations.ApplyUpdatesRequest; -import dev.plexapi.sdk.models.operations.Skip; -import dev.plexapi.sdk.models.operations.Tonight; import dev.plexapi.sdk.operations.ApplyUpdates; import dev.plexapi.sdk.utils.Utils; import java.lang.Exception; -import java.util.Optional; import java.util.concurrent.CompletableFuture; public class ApplyUpdatesRequestBuilder { - private Optional tonight = Optional.empty(); - private Optional skip = Optional.empty(); + private ApplyUpdatesRequest request; private final SDKConfiguration sdkConfiguration; public ApplyUpdatesRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - - public ApplyUpdatesRequestBuilder tonight(Tonight tonight) { - Utils.checkNotNull(tonight, "tonight"); - this.tonight = Optional.of(tonight); + + public ApplyUpdatesRequestBuilder request(ApplyUpdatesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - public ApplyUpdatesRequestBuilder tonight(Optional tonight) { - Utils.checkNotNull(tonight, "tonight"); - this.tonight = tonight; - return this; - } - - public ApplyUpdatesRequestBuilder skip(Skip skip) { - Utils.checkNotNull(skip, "skip"); - this.skip = Optional.of(skip); - return this; - } - - public ApplyUpdatesRequestBuilder skip(Optional skip) { - Utils.checkNotNull(skip, "skip"); - this.skip = skip; - return this; - } - - - private ApplyUpdatesRequest buildRequest() { - - ApplyUpdatesRequest request = new ApplyUpdatesRequest(tonight, - skip); - - return request; - } - public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new ApplyUpdates.Async(sdkConfiguration); - ApplyUpdatesRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AutocompleteRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AutocompleteRequestBuilder.java new file mode 100644 index 00000000..c2c47abc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AutocompleteRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.AutocompleteRequest; +import dev.plexapi.sdk.operations.Autocomplete; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class AutocompleteRequestBuilder { + + private AutocompleteRequest request; + private final SDKConfiguration sdkConfiguration; + + public AutocompleteRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AutocompleteRequestBuilder request(AutocompleteRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new Autocomplete.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/AutocompleteResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/AutocompleteResponse.java new file mode 100644 index 00000000..7685fd6b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/AutocompleteResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class AutocompleteResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public AutocompleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public AutocompleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AutocompleteResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AutocompleteResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AutocompleteResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public AutocompleteResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public AutocompleteResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public AutocompleteResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutocompleteResponse other = (AutocompleteResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(AutocompleteResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public AutocompleteResponse build() { + + return new AutocompleteResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CancelActivityRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelActivityRequestBuilder.java new file mode 100644 index 00000000..a17f84af --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelActivityRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.CancelActivityRequest; +import dev.plexapi.sdk.operations.CancelActivity; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CancelActivityRequestBuilder { + + private CancelActivityRequest request; + private final SDKConfiguration sdkConfiguration; + + public CancelActivityRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CancelActivityRequestBuilder request(CancelActivityRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new CancelActivity.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CancelActivityResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelActivityResponse.java new file mode 100644 index 00000000..2f8985a7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelActivityResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CancelActivityResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CancelActivityResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CancelActivityResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CancelActivityResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CancelActivityResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelActivityResponse other = (CancelActivityResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CancelActivityResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CancelActivityResponse build() { + + return new CancelActivityResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CancelGrabRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelGrabRequestBuilder.java new file mode 100644 index 00000000..4e680bf7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelGrabRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.CancelGrabRequest; +import dev.plexapi.sdk.operations.CancelGrab; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CancelGrabRequestBuilder { + + private CancelGrabRequest request; + private final SDKConfiguration sdkConfiguration; + + public CancelGrabRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CancelGrabRequestBuilder request(CancelGrabRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new CancelGrab.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CancelGrabResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelGrabResponse.java new file mode 100644 index 00000000..d0d3eac2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelGrabResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CancelGrabResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CancelGrabResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CancelGrabResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CancelGrabResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CancelGrabResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelGrabResponse other = (CancelGrabResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CancelGrabResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CancelGrabResponse build() { + + return new CancelGrabResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CancelRefreshRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelRefreshRequestBuilder.java new file mode 100644 index 00000000..987790d6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelRefreshRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.CancelRefreshRequest; +import dev.plexapi.sdk.operations.CancelRefresh; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CancelRefreshRequestBuilder { + + private CancelRefreshRequest request; + private final SDKConfiguration sdkConfiguration; + + public CancelRefreshRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CancelRefreshRequestBuilder request(CancelRefreshRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new CancelRefresh.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CancelRefreshResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelRefreshResponse.java new file mode 100644 index 00000000..f257a45f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelRefreshResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CancelRefreshResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CancelRefreshResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CancelRefreshResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CancelRefreshResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CancelRefreshResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelRefreshResponse other = (CancelRefreshResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CancelRefreshResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CancelRefreshResponse build() { + + return new CancelRefreshResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CancelServerActivitiesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelServerActivitiesRequestBuilder.java deleted file mode 100644 index 10c89d4d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/CancelServerActivitiesRequestBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.CancelServerActivitiesRequest; -import dev.plexapi.sdk.operations.CancelServerActivities; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.concurrent.CompletableFuture; - -public class CancelServerActivitiesRequestBuilder { - - private String activityUUID; - private final SDKConfiguration sdkConfiguration; - - public CancelServerActivitiesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CancelServerActivitiesRequestBuilder activityUUID(String activityUUID) { - Utils.checkNotNull(activityUUID, "activityUUID"); - this.activityUUID = activityUUID; - return this; - } - - - private CancelServerActivitiesRequest buildRequest() { - - CancelServerActivitiesRequest request = new CancelServerActivitiesRequest(activityUUID); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new CancelServerActivities.Async(sdkConfiguration); - CancelServerActivitiesRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CancelServerActivitiesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CancelServerActivitiesResponse.java deleted file mode 100644 index 55a7a1ae..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/CancelServerActivitiesResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class CancelServerActivitiesResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public CancelServerActivitiesResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public CancelServerActivitiesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public CancelServerActivitiesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CancelServerActivitiesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelServerActivitiesResponse other = (CancelServerActivitiesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CancelServerActivitiesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CancelServerActivitiesResponse build() { - - return new CancelServerActivitiesResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CheckForUpdatesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CheckForUpdatesRequestBuilder.java deleted file mode 100644 index c59a4461..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/CheckForUpdatesRequestBuilder.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.CheckForUpdatesRequest; -import dev.plexapi.sdk.models.operations.Download; -import dev.plexapi.sdk.operations.CheckForUpdates; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class CheckForUpdatesRequestBuilder { - - private Optional download = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public CheckForUpdatesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CheckForUpdatesRequestBuilder download(Download download) { - Utils.checkNotNull(download, "download"); - this.download = Optional.of(download); - return this; - } - - public CheckForUpdatesRequestBuilder download(Optional download) { - Utils.checkNotNull(download, "download"); - this.download = download; - return this; - } - - - private CheckForUpdatesRequest buildRequest() { - - CheckForUpdatesRequest request = new CheckForUpdatesRequest(download); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new CheckForUpdates.Async(sdkConfiguration); - CheckForUpdatesRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CheckForUpdatesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CheckForUpdatesResponse.java deleted file mode 100644 index a488a55b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/CheckForUpdatesResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class CheckForUpdatesResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public CheckForUpdatesResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public CheckForUpdatesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public CheckForUpdatesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public CheckForUpdatesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckForUpdatesResponse other = (CheckForUpdatesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(CheckForUpdatesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public CheckForUpdatesResponse build() { - - return new CheckForUpdatesResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CheckUpdatesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CheckUpdatesRequestBuilder.java new file mode 100644 index 00000000..dab85600 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CheckUpdatesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.CheckUpdatesRequest; +import dev.plexapi.sdk.operations.CheckUpdates; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CheckUpdatesRequestBuilder { + + private CheckUpdatesRequest request; + private final SDKConfiguration sdkConfiguration; + + public CheckUpdatesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CheckUpdatesRequestBuilder request(CheckUpdatesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new CheckUpdates.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CheckUpdatesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CheckUpdatesResponse.java new file mode 100644 index 00000000..c398c3ca --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CheckUpdatesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CheckUpdatesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CheckUpdatesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CheckUpdatesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CheckUpdatesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CheckUpdatesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckUpdatesResponse other = (CheckUpdatesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CheckUpdatesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CheckUpdatesResponse build() { + + return new CheckUpdatesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CleanBundlesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CleanBundlesRequestBuilder.java new file mode 100644 index 00000000..dbd840d4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CleanBundlesRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CleanBundles; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CleanBundlesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public CleanBundlesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new CleanBundles.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CleanBundlesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CleanBundlesResponse.java new file mode 100644 index 00000000..28caea65 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CleanBundlesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CleanBundlesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CleanBundlesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CleanBundlesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CleanBundlesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CleanBundlesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CleanBundlesResponse other = (CleanBundlesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CleanBundlesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CleanBundlesResponse build() { + + return new CleanBundlesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlayQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlayQueueRequestBuilder.java new file mode 100644 index 00000000..9e733f06 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlayQueueRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ClearPlayQueueRequest; +import dev.plexapi.sdk.operations.ClearPlayQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ClearPlayQueueRequestBuilder { + + private ClearPlayQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public ClearPlayQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ClearPlayQueueRequestBuilder request(ClearPlayQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ClearPlayQueue.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlayQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlayQueueResponse.java new file mode 100644 index 00000000..dde0cdc4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlayQueueResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ClearPlayQueueResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public ClearPlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public ClearPlayQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ClearPlayQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ClearPlayQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ClearPlayQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ClearPlayQueueResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public ClearPlayQueueResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClearPlayQueueResponse other = (ClearPlayQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(ClearPlayQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public ClearPlayQueueResponse build() { + + return new ClearPlayQueueResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistContentsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistContentsRequestBuilder.java deleted file mode 100644 index d6aaa925..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistContentsRequestBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.ClearPlaylistContentsRequest; -import dev.plexapi.sdk.operations.ClearPlaylistContents; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class ClearPlaylistContentsRequestBuilder { - - private Double playlistID; - private final SDKConfiguration sdkConfiguration; - - public ClearPlaylistContentsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public ClearPlaylistContentsRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - - private ClearPlaylistContentsRequest buildRequest() { - - ClearPlaylistContentsRequest request = new ClearPlaylistContentsRequest(playlistID); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new ClearPlaylistContents.Async(sdkConfiguration); - ClearPlaylistContentsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistContentsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistContentsResponse.java deleted file mode 100644 index 4e0cad8d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistContentsResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class ClearPlaylistContentsResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public ClearPlaylistContentsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public ClearPlaylistContentsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public ClearPlaylistContentsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public ClearPlaylistContentsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClearPlaylistContentsResponse other = (ClearPlaylistContentsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(ClearPlaylistContentsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public ClearPlaylistContentsResponse build() { - - return new ClearPlaylistContentsResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistItemsRequestBuilder.java new file mode 100644 index 00000000..74ba9683 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ClearPlaylistItemsRequest; +import dev.plexapi.sdk.operations.ClearPlaylistItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ClearPlaylistItemsRequestBuilder { + + private ClearPlaylistItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ClearPlaylistItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ClearPlaylistItemsRequestBuilder request(ClearPlaylistItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ClearPlaylistItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistItemsResponse.java new file mode 100644 index 00000000..73e50712 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ClearPlaylistItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ClearPlaylistItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public ClearPlaylistItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public ClearPlaylistItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ClearPlaylistItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ClearPlaylistItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ClearPlaylistItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ClearPlaylistItemsResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public ClearPlaylistItemsResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClearPlaylistItemsResponse other = (ClearPlaylistItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(ClearPlaylistItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public ClearPlaylistItemsResponse build() { + + return new ClearPlaylistItemsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ComputeChannelMapRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ComputeChannelMapRequestBuilder.java new file mode 100644 index 00000000..875c432a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ComputeChannelMapRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ComputeChannelMapRequest; +import dev.plexapi.sdk.operations.ComputeChannelMap; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ComputeChannelMapRequestBuilder { + + private ComputeChannelMapRequest request; + private final SDKConfiguration sdkConfiguration; + + public ComputeChannelMapRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ComputeChannelMapRequestBuilder request(ComputeChannelMapRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ComputeChannelMap.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ComputeChannelMapResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ComputeChannelMapResponse.java new file mode 100644 index 00000000..e34e70d4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ComputeChannelMapResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ComputeChannelMapResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ComputeChannelMapResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ComputeChannelMapResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ComputeChannelMapResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ComputeChannelMapResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ComputeChannelMapResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ComputeChannelMapResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ComputeChannelMapResponse withObject(ComputeChannelMapResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ComputeChannelMapResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ComputeChannelMapResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComputeChannelMapResponse other = (ComputeChannelMapResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ComputeChannelMapResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ComputeChannelMapResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ComputeChannelMapResponse build() { + + return new ComputeChannelMapResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ConnectWebSocketRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ConnectWebSocketRequestBuilder.java new file mode 100644 index 00000000..53689aa9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ConnectWebSocketRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ConnectWebSocketRequest; +import dev.plexapi.sdk.operations.ConnectWebSocket; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ConnectWebSocketRequestBuilder { + + private ConnectWebSocketRequest request; + private final SDKConfiguration sdkConfiguration; + + public ConnectWebSocketRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ConnectWebSocketRequestBuilder request(ConnectWebSocketRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ConnectWebSocket.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ConnectWebSocketResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ConnectWebSocketResponse.java new file mode 100644 index 00000000..eaf486c7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ConnectWebSocketResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ConnectWebSocketResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public ConnectWebSocketResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public ConnectWebSocketResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ConnectWebSocketResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ConnectWebSocketResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ConnectWebSocketResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ConnectWebSocketResponse withResponseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public ConnectWebSocketResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectWebSocketResponse other = (ConnectWebSocketResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(ConnectWebSocketResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public ConnectWebSocketResponse build() { + + return new ConnectWebSocketResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCollectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCollectionRequestBuilder.java new file mode 100644 index 00000000..25440d8c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCollectionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.CreateCollectionRequest; +import dev.plexapi.sdk.operations.CreateCollection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CreateCollectionRequestBuilder { + + private CreateCollectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreateCollectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateCollectionRequestBuilder request(CreateCollectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new CreateCollection.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCollectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCollectionResponse.java new file mode 100644 index 00000000..b027e4f1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCollectionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class CreateCollectionResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public CreateCollectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public CreateCollectionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateCollectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateCollectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateCollectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateCollectionResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public CreateCollectionResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCollectionResponse other = (CreateCollectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(CreateCollectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public CreateCollectionResponse build() { + + return new CreateCollectionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCustomHubRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCustomHubRequestBuilder.java new file mode 100644 index 00000000..75ab47c7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCustomHubRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.CreateCustomHubRequest; +import dev.plexapi.sdk.operations.CreateCustomHub; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CreateCustomHubRequestBuilder { + + private CreateCustomHubRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreateCustomHubRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateCustomHubRequestBuilder request(CreateCustomHubRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new CreateCustomHub.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCustomHubResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCustomHubResponse.java new file mode 100644 index 00000000..3ac81922 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateCustomHubResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class CreateCustomHubResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CreateCustomHubResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateCustomHubResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateCustomHubResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateCustomHubResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomHubResponse other = (CreateCustomHubResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CreateCustomHubResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CreateCustomHubResponse build() { + + return new CreateCustomHubResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDVRRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDVRRequestBuilder.java new file mode 100644 index 00000000..a6d29809 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDVRRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.CreateDVRRequest; +import dev.plexapi.sdk.operations.CreateDVR; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CreateDVRRequestBuilder { + + private CreateDVRRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreateDVRRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateDVRRequestBuilder request(CreateDVRRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new CreateDVR.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDVRResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDVRResponse.java new file mode 100644 index 00000000..73939682 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDVRResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.DvrRequestHandlerSlashGetResponses200; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class CreateDVRResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional dvrRequestHandlerSlashGetResponses200; + + + private Map> headers; + + @JsonCreator + public CreateDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional dvrRequestHandlerSlashGetResponses200, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(dvrRequestHandlerSlashGetResponses200, "dvrRequestHandlerSlashGetResponses200"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.dvrRequestHandlerSlashGetResponses200 = dvrRequestHandlerSlashGetResponses200; + this.headers = headers; + } + + public CreateDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional dvrRequestHandlerSlashGetResponses200() { + return (Optional) dvrRequestHandlerSlashGetResponses200; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateDVRResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateDVRResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateDVRResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateDVRResponse withDvrRequestHandlerSlashGetResponses200(DvrRequestHandlerSlashGetResponses200 dvrRequestHandlerSlashGetResponses200) { + Utils.checkNotNull(dvrRequestHandlerSlashGetResponses200, "dvrRequestHandlerSlashGetResponses200"); + this.dvrRequestHandlerSlashGetResponses200 = Optional.ofNullable(dvrRequestHandlerSlashGetResponses200); + return this; + } + + + /** + * OK + */ + public CreateDVRResponse withDvrRequestHandlerSlashGetResponses200(Optional dvrRequestHandlerSlashGetResponses200) { + Utils.checkNotNull(dvrRequestHandlerSlashGetResponses200, "dvrRequestHandlerSlashGetResponses200"); + this.dvrRequestHandlerSlashGetResponses200 = dvrRequestHandlerSlashGetResponses200; + return this; + } + + public CreateDVRResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDVRResponse other = (CreateDVRResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.dvrRequestHandlerSlashGetResponses200, other.dvrRequestHandlerSlashGetResponses200) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + dvrRequestHandlerSlashGetResponses200, headers); + } + + @Override + public String toString() { + return Utils.toString(CreateDVRResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "dvrRequestHandlerSlashGetResponses200", dvrRequestHandlerSlashGetResponses200, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional dvrRequestHandlerSlashGetResponses200 = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder dvrRequestHandlerSlashGetResponses200(DvrRequestHandlerSlashGetResponses200 dvrRequestHandlerSlashGetResponses200) { + Utils.checkNotNull(dvrRequestHandlerSlashGetResponses200, "dvrRequestHandlerSlashGetResponses200"); + this.dvrRequestHandlerSlashGetResponses200 = Optional.ofNullable(dvrRequestHandlerSlashGetResponses200); + return this; + } + + /** + * OK + */ + public Builder dvrRequestHandlerSlashGetResponses200(Optional dvrRequestHandlerSlashGetResponses200) { + Utils.checkNotNull(dvrRequestHandlerSlashGetResponses200, "dvrRequestHandlerSlashGetResponses200"); + this.dvrRequestHandlerSlashGetResponses200 = dvrRequestHandlerSlashGetResponses200; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public CreateDVRResponse build() { + + return new CreateDVRResponse( + contentType, statusCode, rawResponse, + dvrRequestHandlerSlashGetResponses200, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDownloadQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDownloadQueueRequestBuilder.java new file mode 100644 index 00000000..0f166f8d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDownloadQueueRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.CreateDownloadQueue; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CreateDownloadQueueRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public CreateDownloadQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new CreateDownloadQueue.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDownloadQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDownloadQueueResponse.java new file mode 100644 index 00000000..d860d906 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateDownloadQueueResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.CreateDownloadQueueResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class CreateDownloadQueueResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public CreateDownloadQueueResponse( + 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 CreateDownloadQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateDownloadQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateDownloadQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateDownloadQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateDownloadQueueResponse withObject(CreateDownloadQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public CreateDownloadQueueResponse 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; + } + CreateDownloadQueueResponse other = (CreateDownloadQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(CreateDownloadQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(CreateDownloadQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreateDownloadQueueResponse build() { + + return new CreateDownloadQueueResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateMarkerRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateMarkerRequestBuilder.java new file mode 100644 index 00000000..337e9fd2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateMarkerRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.CreateMarkerRequest; +import dev.plexapi.sdk.operations.CreateMarker; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CreateMarkerRequestBuilder { + + private CreateMarkerRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreateMarkerRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateMarkerRequestBuilder request(CreateMarkerRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new CreateMarker.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateMarkerResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateMarkerResponse.java new file mode 100644 index 00000000..87df11be --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateMarkerResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.CreateMarkerResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class CreateMarkerResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public CreateMarkerResponse( + 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 CreateMarkerResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateMarkerResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateMarkerResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateMarkerResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateMarkerResponse withObject(CreateMarkerResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public CreateMarkerResponse 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; + } + CreateMarkerResponse other = (CreateMarkerResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(CreateMarkerResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(CreateMarkerResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreateMarkerResponse build() { + + return new CreateMarkerResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlayQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlayQueueRequestBuilder.java new file mode 100644 index 00000000..bf714f59 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlayQueueRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.CreatePlayQueueRequest; +import dev.plexapi.sdk.operations.CreatePlayQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CreatePlayQueueRequestBuilder { + + private CreatePlayQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreatePlayQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreatePlayQueueRequestBuilder request(CreatePlayQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new CreatePlayQueue.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlayQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlayQueueResponse.java new file mode 100644 index 00000000..46d99cf5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlayQueueResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.CreatePlayQueueResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class CreatePlayQueueResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public CreatePlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public CreatePlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreatePlayQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreatePlayQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreatePlayQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreatePlayQueueResponse withObject(CreatePlayQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public CreatePlayQueueResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreatePlayQueueResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlayQueueResponse other = (CreatePlayQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(CreatePlayQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(CreatePlayQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public CreatePlayQueueResponse build() { + + return new CreatePlayQueueResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlaylistResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlaylistResponse.java index 3c61112d..c35103d8 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlaylistResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreatePlaylistResponse.java @@ -5,7 +5,7 @@ package dev.plexapi.sdk.models.operations.async; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.CreatePlaylistResponseBody; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; import dev.plexapi.sdk.utils.AsyncResponse; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Utils; @@ -34,24 +34,24 @@ public class CreatePlaylistResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * returns all playlists + * OK */ - private Optional object; + private Optional mediaContainerWithPlaylistMetadata; @JsonCreator public CreatePlaylistResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional object) { + Optional mediaContainerWithPlaylistMetadata) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.object = object; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; } public CreatePlaylistResponse( @@ -87,12 +87,12 @@ public class CreatePlaylistResponse implements AsyncResponse { } /** - * returns all playlists + * OK */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional object() { - return (Optional) object; + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; } public static Builder builder() { @@ -128,21 +128,21 @@ public class CreatePlaylistResponse implements AsyncResponse { } /** - * returns all playlists + * OK */ - public CreatePlaylistResponse withObject(CreatePlaylistResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public CreatePlaylistResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); return this; } /** - * returns all playlists + * OK */ - public CreatePlaylistResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public CreatePlaylistResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; return this; } @@ -159,14 +159,14 @@ public class CreatePlaylistResponse implements AsyncResponse { Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); } @Override public int hashCode() { return Utils.enhancedHash( contentType, statusCode, rawResponse, - object); + mediaContainerWithPlaylistMetadata); } @Override @@ -175,7 +175,7 @@ public class CreatePlaylistResponse implements AsyncResponse { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "object", object); + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); } @SuppressWarnings("UnusedReturnValue") @@ -187,7 +187,7 @@ public class CreatePlaylistResponse implements AsyncResponse { private HttpResponse rawResponse; - private Optional object = Optional.empty(); + private Optional mediaContainerWithPlaylistMetadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -225,20 +225,20 @@ public class CreatePlaylistResponse implements AsyncResponse { /** - * returns all playlists + * OK */ - public Builder object(CreatePlaylistResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); return this; } /** - * returns all playlists + * OK */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; return this; } @@ -246,7 +246,7 @@ public class CreatePlaylistResponse implements AsyncResponse { return new CreatePlaylistResponse( contentType, statusCode, rawResponse, - object); + mediaContainerWithPlaylistMetadata); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateSubscriptionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateSubscriptionRequestBuilder.java new file mode 100644 index 00000000..b3cfab49 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateSubscriptionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.CreateSubscriptionRequest; +import dev.plexapi.sdk.operations.CreateSubscription; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class CreateSubscriptionRequestBuilder { + + private CreateSubscriptionRequest request; + private final SDKConfiguration sdkConfiguration; + + public CreateSubscriptionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateSubscriptionRequestBuilder request(CreateSubscriptionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new CreateSubscription.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/CreateSubscriptionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateSubscriptionResponse.java new file mode 100644 index 00000000..41091791 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/CreateSubscriptionResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.CreateSubscriptionResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class CreateSubscriptionResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public CreateSubscriptionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public CreateSubscriptionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateSubscriptionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateSubscriptionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateSubscriptionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateSubscriptionResponse withObject(CreateSubscriptionResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public CreateSubscriptionResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreateSubscriptionResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSubscriptionResponse other = (CreateSubscriptionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(CreateSubscriptionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(CreateSubscriptionResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public CreateSubscriptionResponse build() { + + return new CreateSubscriptionResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCachesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCachesRequestBuilder.java new file mode 100644 index 00000000..e08e2750 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCachesRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DeleteCaches; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteCachesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public DeleteCachesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new DeleteCaches.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCachesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCachesResponse.java new file mode 100644 index 00000000..0106b39a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCachesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteCachesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteCachesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteCachesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteCachesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteCachesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCachesResponse other = (DeleteCachesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteCachesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteCachesResponse build() { + + return new DeleteCachesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionItemRequestBuilder.java new file mode 100644 index 00000000..820f8d1b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteCollectionItemRequest; +import dev.plexapi.sdk.operations.DeleteCollectionItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteCollectionItemRequestBuilder { + + private DeleteCollectionItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteCollectionItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteCollectionItemRequestBuilder request(DeleteCollectionItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteCollectionItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionItemResponse.java new file mode 100644 index 00000000..d3be29a1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class DeleteCollectionItemResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public DeleteCollectionItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public DeleteCollectionItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteCollectionItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteCollectionItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteCollectionItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DeleteCollectionItemResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public DeleteCollectionItemResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCollectionItemResponse other = (DeleteCollectionItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(DeleteCollectionItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public DeleteCollectionItemResponse build() { + + return new DeleteCollectionItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionRequestBuilder.java new file mode 100644 index 00000000..8b159cb1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteCollectionRequest; +import dev.plexapi.sdk.operations.DeleteCollection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteCollectionRequestBuilder { + + private DeleteCollectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteCollectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteCollectionRequestBuilder request(DeleteCollectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteCollection.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionResponse.java new file mode 100644 index 00000000..c11261a2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCollectionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteCollectionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteCollectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteCollectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteCollectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteCollectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCollectionResponse other = (DeleteCollectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteCollectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteCollectionResponse build() { + + return new DeleteCollectionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCustomHubRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCustomHubRequestBuilder.java new file mode 100644 index 00000000..8e981f1c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCustomHubRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteCustomHubRequest; +import dev.plexapi.sdk.operations.DeleteCustomHub; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteCustomHubRequestBuilder { + + private DeleteCustomHubRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteCustomHubRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteCustomHubRequestBuilder request(DeleteCustomHubRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteCustomHub.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCustomHubResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCustomHubResponse.java new file mode 100644 index 00000000..18ac4693 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteCustomHubResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteCustomHubResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteCustomHubResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteCustomHubResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteCustomHubResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteCustomHubResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCustomHubResponse other = (DeleteCustomHubResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteCustomHubResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteCustomHubResponse build() { + + return new DeleteCustomHubResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteDVRRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteDVRRequestBuilder.java new file mode 100644 index 00000000..667b5c20 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteDVRRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteDVRRequest; +import dev.plexapi.sdk.operations.DeleteDVR; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteDVRRequestBuilder { + + private DeleteDVRRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteDVRRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteDVRRequestBuilder request(DeleteDVRRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteDVR.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteDVRResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteDVRResponse.java new file mode 100644 index 00000000..cf42f73f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteDVRResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteDVRResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteDVRResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteDVRResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteDVRResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteDVRResponse other = (DeleteDVRResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteDVRResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteDVRResponse build() { + + return new DeleteDVRResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteHistoryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteHistoryRequestBuilder.java new file mode 100644 index 00000000..4f68effb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteHistoryRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteHistoryRequest; +import dev.plexapi.sdk.operations.DeleteHistory; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteHistoryRequestBuilder { + + private DeleteHistoryRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteHistoryRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteHistoryRequestBuilder request(DeleteHistoryRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteHistory.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteHistoryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteHistoryResponse.java new file mode 100644 index 00000000..b4cd02bb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteHistoryResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainer; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class DeleteHistoryResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainer; + + + private Map> headers; + + @JsonCreator + public DeleteHistoryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainer, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainer, "mediaContainer"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainer = mediaContainer; + this.headers = headers; + } + + public DeleteHistoryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteHistoryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteHistoryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteHistoryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DeleteHistoryResponse withMediaContainer(MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + /** + * OK + */ + public DeleteHistoryResponse withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public DeleteHistoryResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteHistoryResponse other = (DeleteHistoryResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainer, headers); + } + + @Override + public String toString() { + return Utils.toString(DeleteHistoryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainer", mediaContainer, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainer = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainer(MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + /** + * OK + */ + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public DeleteHistoryResponse build() { + + return new DeleteHistoryResponse( + contentType, statusCode, rawResponse, + mediaContainer, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIndexesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIndexesRequestBuilder.java new file mode 100644 index 00000000..0e543d1e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIndexesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteIndexesRequest; +import dev.plexapi.sdk.operations.DeleteIndexes; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteIndexesRequestBuilder { + + private DeleteIndexesRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteIndexesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteIndexesRequestBuilder request(DeleteIndexesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteIndexes.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIndexesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIndexesResponse.java new file mode 100644 index 00000000..f4bcdf3d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIndexesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteIndexesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteIndexesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteIndexesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteIndexesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteIndexesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteIndexesResponse other = (DeleteIndexesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteIndexesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteIndexesResponse build() { + + return new DeleteIndexesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIntrosRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIntrosRequestBuilder.java new file mode 100644 index 00000000..0c3c8891 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIntrosRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteIntrosRequest; +import dev.plexapi.sdk.operations.DeleteIntros; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteIntrosRequestBuilder { + + private DeleteIntrosRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteIntrosRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteIntrosRequestBuilder request(DeleteIntrosRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteIntros.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIntrosResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIntrosResponse.java new file mode 100644 index 00000000..5902d243 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteIntrosResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteIntrosResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteIntrosResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteIntrosResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteIntrosResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteIntrosResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteIntrosResponse other = (DeleteIntrosResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteIntrosResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteIntrosResponse build() { + + return new DeleteIntrosResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibraryRequestBuilder.java deleted file mode 100644 index 6c17a75f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibraryRequestBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.DeleteLibraryRequest; -import dev.plexapi.sdk.operations.DeleteLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; -import java.util.concurrent.CompletableFuture; - -public class DeleteLibraryRequestBuilder { - - private Integer sectionKey; - private final SDKConfiguration sdkConfiguration; - - public DeleteLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public DeleteLibraryRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - private DeleteLibraryRequest buildRequest() { - - DeleteLibraryRequest request = new DeleteLibraryRequest(sectionKey); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new DeleteLibrary.Async(sdkConfiguration); - DeleteLibraryRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibraryResponse.java deleted file mode 100644 index d1150189..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibraryResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class DeleteLibraryResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public DeleteLibraryResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public DeleteLibraryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public DeleteLibraryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public DeleteLibraryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteLibraryResponse other = (DeleteLibraryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(DeleteLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public DeleteLibraryResponse build() { - - return new DeleteLibraryResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibrarySectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibrarySectionRequestBuilder.java new file mode 100644 index 00000000..4316b603 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibrarySectionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteLibrarySectionRequest; +import dev.plexapi.sdk.operations.DeleteLibrarySection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteLibrarySectionRequestBuilder { + + private DeleteLibrarySectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteLibrarySectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteLibrarySectionRequestBuilder request(DeleteLibrarySectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteLibrarySection.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibrarySectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibrarySectionResponse.java new file mode 100644 index 00000000..409817a6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLibrarySectionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteLibrarySectionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteLibrarySectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteLibrarySectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteLibrarySectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteLibrarySectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLibrarySectionResponse other = (DeleteLibrarySectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteLibrarySectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteLibrarySectionResponse build() { + + return new DeleteLibrarySectionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLineupRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLineupRequestBuilder.java new file mode 100644 index 00000000..285dc156 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLineupRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteLineupRequest; +import dev.plexapi.sdk.operations.DeleteLineup; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteLineupRequestBuilder { + + private DeleteLineupRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteLineupRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteLineupRequestBuilder request(DeleteLineupRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteLineup.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLineupResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLineupResponse.java new file mode 100644 index 00000000..e4538e5f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteLineupResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.DeleteLineupResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class DeleteLineupResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public DeleteLineupResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public DeleteLineupResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteLineupResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteLineupResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteLineupResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DeleteLineupResponse withObject(DeleteLineupResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public DeleteLineupResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public DeleteLineupResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLineupResponse other = (DeleteLineupResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(DeleteLineupResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(DeleteLineupResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public DeleteLineupResponse build() { + + return new DeleteLineupResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMarkerRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMarkerRequestBuilder.java new file mode 100644 index 00000000..f501ac10 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMarkerRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteMarkerRequest; +import dev.plexapi.sdk.operations.DeleteMarker; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteMarkerRequestBuilder { + + private DeleteMarkerRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteMarkerRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteMarkerRequestBuilder request(DeleteMarkerRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteMarker.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMarkerResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMarkerResponse.java new file mode 100644 index 00000000..96f8ab9f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMarkerResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteMarkerResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteMarkerResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteMarkerResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteMarkerResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteMarkerResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMarkerResponse other = (DeleteMarkerResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteMarkerResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteMarkerResponse build() { + + return new DeleteMarkerResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaItemRequestBuilder.java new file mode 100644 index 00000000..294f00b3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteMediaItemRequest; +import dev.plexapi.sdk.operations.DeleteMediaItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteMediaItemRequestBuilder { + + private DeleteMediaItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteMediaItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteMediaItemRequestBuilder request(DeleteMediaItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteMediaItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaItemResponse.java new file mode 100644 index 00000000..f23d33e3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaItemResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteMediaItemResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteMediaItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteMediaItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteMediaItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteMediaItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMediaItemResponse other = (DeleteMediaItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteMediaItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteMediaItemResponse build() { + + return new DeleteMediaItemResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaProviderRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaProviderRequestBuilder.java new file mode 100644 index 00000000..1075704f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaProviderRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteMediaProviderRequest; +import dev.plexapi.sdk.operations.DeleteMediaProvider; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteMediaProviderRequestBuilder { + + private DeleteMediaProviderRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteMediaProviderRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteMediaProviderRequestBuilder request(DeleteMediaProviderRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteMediaProvider.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaProviderResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaProviderResponse.java new file mode 100644 index 00000000..a320e716 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMediaProviderResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteMediaProviderResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteMediaProviderResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteMediaProviderResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteMediaProviderResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteMediaProviderResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMediaProviderResponse other = (DeleteMediaProviderResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteMediaProviderResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteMediaProviderResponse build() { + + return new DeleteMediaProviderResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMetadataItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMetadataItemRequestBuilder.java new file mode 100644 index 00000000..a45b42b4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMetadataItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteMetadataItemRequest; +import dev.plexapi.sdk.operations.DeleteMetadataItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteMetadataItemRequestBuilder { + + private DeleteMetadataItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteMetadataItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteMetadataItemRequestBuilder request(DeleteMetadataItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteMetadataItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMetadataItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMetadataItemResponse.java new file mode 100644 index 00000000..de74e2f2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteMetadataItemResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteMetadataItemResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteMetadataItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteMetadataItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteMetadataItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteMetadataItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMetadataItemResponse other = (DeleteMetadataItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteMetadataItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteMetadataItemResponse build() { + + return new DeleteMetadataItemResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlayQueueItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlayQueueItemRequestBuilder.java new file mode 100644 index 00000000..5b873b73 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlayQueueItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeletePlayQueueItemRequest; +import dev.plexapi.sdk.operations.DeletePlayQueueItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeletePlayQueueItemRequestBuilder { + + private DeletePlayQueueItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeletePlayQueueItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeletePlayQueueItemRequestBuilder request(DeletePlayQueueItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeletePlayQueueItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlayQueueItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlayQueueItemResponse.java new file mode 100644 index 00000000..0494aa4b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlayQueueItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class DeletePlayQueueItemResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public DeletePlayQueueItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public DeletePlayQueueItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeletePlayQueueItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeletePlayQueueItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeletePlayQueueItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DeletePlayQueueItemResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public DeletePlayQueueItemResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePlayQueueItemResponse other = (DeletePlayQueueItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(DeletePlayQueueItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public DeletePlayQueueItemResponse build() { + + return new DeletePlayQueueItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistItemRequestBuilder.java new file mode 100644 index 00000000..6e7b880b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeletePlaylistItemRequest; +import dev.plexapi.sdk.operations.DeletePlaylistItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeletePlaylistItemRequestBuilder { + + private DeletePlaylistItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeletePlaylistItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeletePlaylistItemRequestBuilder request(DeletePlaylistItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeletePlaylistItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistItemResponse.java new file mode 100644 index 00000000..62a7fe6b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class DeletePlaylistItemResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public DeletePlaylistItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public DeletePlaylistItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeletePlaylistItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeletePlaylistItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeletePlaylistItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DeletePlaylistItemResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public DeletePlaylistItemResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePlaylistItemResponse other = (DeletePlaylistItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(DeletePlaylistItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public DeletePlaylistItemResponse build() { + + return new DeletePlaylistItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistRequestBuilder.java index 426dbcca..228a44bd 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeletePlaylistRequestBuilder.java @@ -9,38 +9,28 @@ import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.models.operations.DeletePlaylistRequest; import dev.plexapi.sdk.operations.DeletePlaylist; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; import java.lang.Exception; import java.util.concurrent.CompletableFuture; public class DeletePlaylistRequestBuilder { - private Double playlistID; + private DeletePlaylistRequest request; private final SDKConfiguration sdkConfiguration; public DeletePlaylistRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public DeletePlaylistRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public DeletePlaylistRequestBuilder request(DeletePlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private DeletePlaylistRequest buildRequest() { - - DeletePlaylistRequest request = new DeletePlaylistRequest(playlistID); - - return request; - } - public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new DeletePlaylist.Async(sdkConfiguration); - DeletePlaylistRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteStreamRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteStreamRequestBuilder.java new file mode 100644 index 00000000..8dac5bc7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteStreamRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteStreamRequest; +import dev.plexapi.sdk.operations.DeleteStream; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteStreamRequestBuilder { + + private DeleteStreamRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteStreamRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteStreamRequestBuilder request(DeleteStreamRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteStream.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteStreamResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteStreamResponse.java new file mode 100644 index 00000000..0cc2b9b8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteStreamResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteStreamResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteStreamResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteStreamResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteStreamResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteStreamResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteStreamResponse other = (DeleteStreamResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteStreamResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteStreamResponse build() { + + return new DeleteStreamResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteSubscriptionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteSubscriptionRequestBuilder.java new file mode 100644 index 00000000..a2549e9b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteSubscriptionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DeleteSubscriptionRequest; +import dev.plexapi.sdk.operations.DeleteSubscription; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DeleteSubscriptionRequestBuilder { + + private DeleteSubscriptionRequest request; + private final SDKConfiguration sdkConfiguration; + + public DeleteSubscriptionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DeleteSubscriptionRequestBuilder request(DeleteSubscriptionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DeleteSubscription.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteSubscriptionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteSubscriptionResponse.java new file mode 100644 index 00000000..67d7c893 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DeleteSubscriptionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DeleteSubscriptionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteSubscriptionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DeleteSubscriptionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteSubscriptionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteSubscriptionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteSubscriptionResponse other = (DeleteSubscriptionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteSubscriptionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteSubscriptionResponse build() { + + return new DeleteSubscriptionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DetectAdsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectAdsRequestBuilder.java new file mode 100644 index 00000000..dc306625 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectAdsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DetectAdsRequest; +import dev.plexapi.sdk.operations.DetectAds; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DetectAdsRequestBuilder { + + private DetectAdsRequest request; + private final SDKConfiguration sdkConfiguration; + + public DetectAdsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DetectAdsRequestBuilder request(DetectAdsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DetectAds.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DetectAdsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectAdsResponse.java new file mode 100644 index 00000000..a2ddc7a8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectAdsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DetectAdsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DetectAdsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DetectAdsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DetectAdsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DetectAdsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectAdsResponse other = (DetectAdsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DetectAdsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DetectAdsResponse build() { + + return new DetectAdsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DetectCreditsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectCreditsRequestBuilder.java new file mode 100644 index 00000000..4688af27 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectCreditsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DetectCreditsRequest; +import dev.plexapi.sdk.operations.DetectCredits; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DetectCreditsRequestBuilder { + + private DetectCreditsRequest request; + private final SDKConfiguration sdkConfiguration; + + public DetectCreditsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DetectCreditsRequestBuilder request(DetectCreditsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DetectCredits.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DetectCreditsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectCreditsResponse.java new file mode 100644 index 00000000..5d76e0cb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectCreditsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DetectCreditsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DetectCreditsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DetectCreditsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DetectCreditsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DetectCreditsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectCreditsResponse other = (DetectCreditsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DetectCreditsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DetectCreditsResponse build() { + + return new DetectCreditsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DetectIntrosRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectIntrosRequestBuilder.java new file mode 100644 index 00000000..4c4e66ca --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectIntrosRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DetectIntrosRequest; +import dev.plexapi.sdk.operations.DetectIntros; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DetectIntrosRequestBuilder { + + private DetectIntrosRequest request; + private final SDKConfiguration sdkConfiguration; + + public DetectIntrosRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DetectIntrosRequestBuilder request(DetectIntrosRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DetectIntros.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DetectIntrosResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectIntrosResponse.java new file mode 100644 index 00000000..b2b7727c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectIntrosResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DetectIntrosResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DetectIntrosResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DetectIntrosResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DetectIntrosResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DetectIntrosResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectIntrosResponse other = (DetectIntrosResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DetectIntrosResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DetectIntrosResponse build() { + + return new DetectIntrosResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DetectVoiceActivityRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectVoiceActivityRequestBuilder.java new file mode 100644 index 00000000..a5062cc5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectVoiceActivityRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.DetectVoiceActivityRequest; +import dev.plexapi.sdk.operations.DetectVoiceActivity; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DetectVoiceActivityRequestBuilder { + + private DetectVoiceActivityRequest request; + private final SDKConfiguration sdkConfiguration; + + public DetectVoiceActivityRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public DetectVoiceActivityRequestBuilder request(DetectVoiceActivityRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new DetectVoiceActivity.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DetectVoiceActivityResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectVoiceActivityResponse.java new file mode 100644 index 00000000..2eb400d6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DetectVoiceActivityResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class DetectVoiceActivityResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DetectVoiceActivityResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DetectVoiceActivityResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DetectVoiceActivityResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DetectVoiceActivityResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetectVoiceActivityResponse other = (DetectVoiceActivityResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DetectVoiceActivityResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DetectVoiceActivityResponse build() { + + return new DetectVoiceActivityResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DiscoverDevicesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DiscoverDevicesRequestBuilder.java new file mode 100644 index 00000000..f5d541bd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DiscoverDevicesRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.DiscoverDevices; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class DiscoverDevicesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public DiscoverDevicesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new DiscoverDevices.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/DiscoverDevicesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/DiscoverDevicesResponse.java new file mode 100644 index 00000000..b6d7c97e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/DiscoverDevicesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class DiscoverDevicesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + @JsonCreator + public DiscoverDevicesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + } + + public DiscoverDevicesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public DiscoverDevicesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DiscoverDevicesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DiscoverDevicesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public DiscoverDevicesResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public DiscoverDevicesResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DiscoverDevicesResponse other = (DiscoverDevicesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + @Override + public String toString() { + return Utils.toString(DiscoverDevicesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public DiscoverDevicesResponse build() { + + return new DiscoverDevicesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EditMarkerRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EditMarkerRequestBuilder.java new file mode 100644 index 00000000..80255435 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EditMarkerRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.EditMarkerRequest; +import dev.plexapi.sdk.operations.EditMarker; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class EditMarkerRequestBuilder { + + private EditMarkerRequest request; + private final SDKConfiguration sdkConfiguration; + + public EditMarkerRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EditMarkerRequestBuilder request(EditMarkerRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new EditMarker.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EditMarkerResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EditMarkerResponse.java new file mode 100644 index 00000000..52fd56b4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EditMarkerResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.PostResponses200; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class EditMarkerResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional postResponses200; + + @JsonCreator + public EditMarkerResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional postResponses200) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(postResponses200, "postResponses200"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.postResponses200 = postResponses200; + } + + public EditMarkerResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional postResponses200() { + return (Optional) postResponses200; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EditMarkerResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EditMarkerResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EditMarkerResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public EditMarkerResponse withPostResponses200(PostResponses200 postResponses200) { + Utils.checkNotNull(postResponses200, "postResponses200"); + this.postResponses200 = Optional.ofNullable(postResponses200); + return this; + } + + + /** + * OK + */ + public EditMarkerResponse withPostResponses200(Optional postResponses200) { + Utils.checkNotNull(postResponses200, "postResponses200"); + this.postResponses200 = postResponses200; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditMarkerResponse other = (EditMarkerResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.postResponses200, other.postResponses200); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + postResponses200); + } + + @Override + public String toString() { + return Utils.toString(EditMarkerResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "postResponses200", postResponses200); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional postResponses200 = 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; + } + + + /** + * OK + */ + public Builder postResponses200(PostResponses200 postResponses200) { + Utils.checkNotNull(postResponses200, "postResponses200"); + this.postResponses200 = Optional.ofNullable(postResponses200); + return this; + } + + /** + * OK + */ + public Builder postResponses200(Optional postResponses200) { + Utils.checkNotNull(postResponses200, "postResponses200"); + this.postResponses200 = postResponses200; + return this; + } + + public EditMarkerResponse build() { + + return new EditMarkerResponse( + contentType, statusCode, rawResponse, + postResponses200); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EditMetadataItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EditMetadataItemRequestBuilder.java new file mode 100644 index 00000000..dda97bd2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EditMetadataItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.EditMetadataItemRequest; +import dev.plexapi.sdk.operations.EditMetadataItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class EditMetadataItemRequestBuilder { + + private EditMetadataItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public EditMetadataItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EditMetadataItemRequestBuilder request(EditMetadataItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new EditMetadataItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EditMetadataItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EditMetadataItemResponse.java new file mode 100644 index 00000000..4657ea40 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EditMetadataItemResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class EditMetadataItemResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public EditMetadataItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EditMetadataItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EditMetadataItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EditMetadataItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditMetadataItemResponse other = (EditMetadataItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(EditMetadataItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public EditMetadataItemResponse build() { + + return new EditMetadataItemResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EditSectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EditSectionRequestBuilder.java new file mode 100644 index 00000000..acd574cb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EditSectionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.EditSectionRequest; +import dev.plexapi.sdk.operations.EditSection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class EditSectionRequestBuilder { + + private EditSectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public EditSectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EditSectionRequestBuilder request(EditSectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new EditSection.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EditSectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EditSectionResponse.java new file mode 100644 index 00000000..7a449a6b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EditSectionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class EditSectionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public EditSectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EditSectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EditSectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EditSectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditSectionResponse other = (EditSectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(EditSectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public EditSectionResponse build() { + + return new EditSectionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EditSubscriptionPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EditSubscriptionPreferencesRequestBuilder.java new file mode 100644 index 00000000..656a09cb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EditSubscriptionPreferencesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.EditSubscriptionPreferencesRequest; +import dev.plexapi.sdk.operations.EditSubscriptionPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class EditSubscriptionPreferencesRequestBuilder { + + private EditSubscriptionPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public EditSubscriptionPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EditSubscriptionPreferencesRequestBuilder request(EditSubscriptionPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new EditSubscriptionPreferences.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EditSubscriptionPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EditSubscriptionPreferencesResponse.java new file mode 100644 index 00000000..0acaf81a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EditSubscriptionPreferencesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class EditSubscriptionPreferencesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithSubscription; + + @JsonCreator + public EditSubscriptionPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSubscription) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + } + + public EditSubscriptionPreferencesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSubscription() { + return (Optional) mediaContainerWithSubscription; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EditSubscriptionPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EditSubscriptionPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EditSubscriptionPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public EditSubscriptionPreferencesResponse withMediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + + /** + * OK + */ + public EditSubscriptionPreferencesResponse withMediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditSubscriptionPreferencesResponse other = (EditSubscriptionPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSubscription, other.mediaContainerWithSubscription); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + @Override + public String toString() { + return Utils.toString(EditSubscriptionPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSubscription", mediaContainerWithSubscription); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSubscription = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + public EditSubscriptionPreferencesResponse build() { + + return new EditSubscriptionPreferencesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EmptyTrashRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EmptyTrashRequestBuilder.java new file mode 100644 index 00000000..ed51aa9c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EmptyTrashRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.EmptyTrashRequest; +import dev.plexapi.sdk.operations.EmptyTrash; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class EmptyTrashRequestBuilder { + + private EmptyTrashRequest request; + private final SDKConfiguration sdkConfiguration; + + public EmptyTrashRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EmptyTrashRequestBuilder request(EmptyTrashRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new EmptyTrash.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EmptyTrashResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EmptyTrashResponse.java new file mode 100644 index 00000000..56bd0503 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EmptyTrashResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class EmptyTrashResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public EmptyTrashResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EmptyTrashResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EmptyTrashResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EmptyTrashResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyTrashResponse other = (EmptyTrashResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(EmptyTrashResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public EmptyTrashResponse build() { + + return new EmptyTrashResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePaperTrailRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePaperTrailRequestBuilder.java deleted file mode 100644 index 2dc0516b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePaperTrailRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.EnablePaperTrail; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class EnablePaperTrailRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public EnablePaperTrailRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new EnablePaperTrail.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePaperTrailResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePaperTrailResponse.java deleted file mode 100644 index b2115a6f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePaperTrailResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class EnablePaperTrailResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public EnablePaperTrailResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public EnablePaperTrailResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public EnablePaperTrailResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public EnablePaperTrailResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnablePaperTrailResponse other = (EnablePaperTrailResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(EnablePaperTrailResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public EnablePaperTrailResponse build() { - - return new EnablePaperTrailResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePapertrailRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePapertrailRequestBuilder.java new file mode 100644 index 00000000..222d69ed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePapertrailRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.EnablePapertrailRequest; +import dev.plexapi.sdk.operations.EnablePapertrail; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class EnablePapertrailRequestBuilder { + + private EnablePapertrailRequest request; + private final SDKConfiguration sdkConfiguration; + + public EnablePapertrailRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public EnablePapertrailRequestBuilder request(EnablePapertrailRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new EnablePapertrail.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePapertrailResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePapertrailResponse.java new file mode 100644 index 00000000..65589d2b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/EnablePapertrailResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class EnablePapertrailResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public EnablePapertrailResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnablePapertrailResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public EnablePapertrailResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnablePapertrailResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnablePapertrailResponse other = (EnablePapertrailResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(EnablePapertrailResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public EnablePapertrailResponse build() { + + return new EnablePapertrailResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GenerateThumbsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GenerateThumbsRequestBuilder.java new file mode 100644 index 00000000..24db271b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GenerateThumbsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GenerateThumbsRequest; +import dev.plexapi.sdk.operations.GenerateThumbs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GenerateThumbsRequestBuilder { + + private GenerateThumbsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GenerateThumbsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GenerateThumbsRequestBuilder request(GenerateThumbsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GenerateThumbs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GenerateThumbsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GenerateThumbsResponse.java new file mode 100644 index 00000000..f867527e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GenerateThumbsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GenerateThumbsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GenerateThumbsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GenerateThumbsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GenerateThumbsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GenerateThumbsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateThumbsResponse other = (GenerateThumbsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GenerateThumbsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GenerateThumbsResponse build() { + + return new GenerateThumbsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetActorsLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetActorsLibraryRequestBuilder.java deleted file mode 100644 index b282df53..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetActorsLibraryRequestBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetActorsLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetActorsLibraryRequest; -import dev.plexapi.sdk.operations.GetActorsLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; -import java.util.concurrent.CompletableFuture; - -public class GetActorsLibraryRequestBuilder { - - private Integer sectionKey; - private GetActorsLibraryQueryParamType type; - private final SDKConfiguration sdkConfiguration; - - public GetActorsLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetActorsLibraryRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - public GetActorsLibraryRequestBuilder type(GetActorsLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetActorsLibraryRequest buildRequest() { - - GetActorsLibraryRequest request = new GetActorsLibraryRequest(sectionKey, - type); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetActorsLibrary.Async(sdkConfiguration); - GetActorsLibraryRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetActorsLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetActorsLibraryResponse.java deleted file mode 100644 index 4d97222f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetActorsLibraryResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetActorsLibraryResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetActorsLibraryResponse implements AsyncResponse { - /** - * 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; - - /** - * Successful response containing media container data. - */ - private Optional object; - - @JsonCreator - public GetActorsLibraryResponse( - 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 GetActorsLibraryResponse( - 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; - } - - /** - * Successful response containing media container data. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetActorsLibraryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetActorsLibraryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetActorsLibraryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response containing media container data. - */ - public GetActorsLibraryResponse withObject(GetActorsLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Successful response containing media container data. - */ - public GetActorsLibraryResponse 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; - } - GetActorsLibraryResponse other = (GetActorsLibraryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetActorsLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Successful response containing media container data. - */ - public Builder object(GetActorsLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Successful response containing media container data. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetActorsLibraryResponse build() { - - return new GetActorsLibraryResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAlbumsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAlbumsRequestBuilder.java new file mode 100644 index 00000000..0a89b2b4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAlbumsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetAlbumsRequest; +import dev.plexapi.sdk.operations.GetAlbums; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetAlbumsRequestBuilder { + + private GetAlbumsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAlbumsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAlbumsRequestBuilder request(GetAlbumsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetAlbums.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAlbumsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAlbumsResponse.java new file mode 100644 index 00000000..c23d6b09 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAlbumsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetAlbumsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public GetAlbumsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public GetAlbumsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAlbumsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAlbumsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAlbumsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAlbumsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetAlbumsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAlbumsResponse other = (GetAlbumsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetAlbumsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetAlbumsResponse build() { + + return new GetAlbumsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllHubsRequestBuilder.java new file mode 100644 index 00000000..780a602f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllHubsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetAllHubsRequest; +import dev.plexapi.sdk.operations.GetAllHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetAllHubsRequestBuilder { + + private GetAllHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAllHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAllHubsRequestBuilder request(GetAllHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetAllHubs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllHubsResponse.java new file mode 100644 index 00000000..5ceb1e99 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllHubsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetAllHubsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetAllHubsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetAllHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetAllHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllHubsResponse withObject(GetAllHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetAllHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetAllHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllHubsResponse other = (GetAllHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetAllHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetAllHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetAllHubsResponse build() { + + return new GetAllHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllItemLeavesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllItemLeavesRequestBuilder.java new file mode 100644 index 00000000..5753b7db --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllItemLeavesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetAllItemLeavesRequest; +import dev.plexapi.sdk.operations.GetAllItemLeaves; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetAllItemLeavesRequestBuilder { + + private GetAllItemLeavesRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAllItemLeavesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAllItemLeavesRequestBuilder request(GetAllItemLeavesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetAllItemLeaves.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllItemLeavesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllItemLeavesResponse.java new file mode 100644 index 00000000..f6291283 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllItemLeavesResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetAllItemLeavesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetAllItemLeavesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetAllItemLeavesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllItemLeavesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllItemLeavesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllItemLeavesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllItemLeavesResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetAllItemLeavesResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetAllItemLeavesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllItemLeavesResponse other = (GetAllItemLeavesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetAllItemLeavesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetAllItemLeavesResponse build() { + + return new GetAllItemLeavesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLanguagesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLanguagesRequestBuilder.java new file mode 100644 index 00000000..07bfb64b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLanguagesRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAllLanguages; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetAllLanguagesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetAllLanguagesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new GetAllLanguages.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLanguagesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLanguagesResponse.java new file mode 100644 index 00000000..5790b208 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLanguagesResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetAllLanguagesResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetAllLanguagesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetAllLanguagesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetAllLanguagesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllLanguagesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllLanguagesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllLanguagesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllLanguagesResponse withObject(GetAllLanguagesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetAllLanguagesResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetAllLanguagesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllLanguagesResponse other = (GetAllLanguagesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetAllLanguagesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetAllLanguagesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetAllLanguagesResponse build() { + + return new GetAllLanguagesResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLeavesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLeavesRequestBuilder.java new file mode 100644 index 00000000..718337e1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLeavesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetAllLeavesRequest; +import dev.plexapi.sdk.operations.GetAllLeaves; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetAllLeavesRequestBuilder { + + private GetAllLeavesRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAllLeavesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAllLeavesRequestBuilder request(GetAllLeavesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetAllLeaves.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLeavesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLeavesResponse.java new file mode 100644 index 00000000..6a7dc0d0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLeavesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetAllLeavesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public GetAllLeavesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public GetAllLeavesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllLeavesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllLeavesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllLeavesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllLeavesResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetAllLeavesResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllLeavesResponse other = (GetAllLeavesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetAllLeavesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetAllLeavesResponse build() { + + return new GetAllLeavesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLibrariesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLibrariesRequestBuilder.java deleted file mode 100644 index 838957f8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLibrariesRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetAllLibraries; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetAllLibrariesRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetAllLibrariesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetAllLibraries.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLibrariesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLibrariesResponse.java deleted file mode 100644 index 94aa931f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllLibrariesResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetAllLibrariesResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetAllLibrariesResponse implements AsyncResponse { - /** - * 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 libraries available on the Server - */ - private Optional object; - - @JsonCreator - public GetAllLibrariesResponse( - 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 GetAllLibrariesResponse( - 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 libraries available on the Server - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetAllLibrariesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetAllLibrariesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAllLibrariesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The libraries available on the Server - */ - public GetAllLibrariesResponse withObject(GetAllLibrariesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The libraries available on the Server - */ - public GetAllLibrariesResponse 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; - } - GetAllLibrariesResponse other = (GetAllLibrariesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetAllLibrariesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 libraries available on the Server - */ - public Builder object(GetAllLibrariesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The libraries available on the Server - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetAllLibrariesResponse build() { - - return new GetAllLibrariesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllPreferencesRequestBuilder.java new file mode 100644 index 00000000..56bfca28 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllPreferencesRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetAllPreferences; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetAllPreferencesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetAllPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new GetAllPreferences.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllPreferencesResponse.java new file mode 100644 index 00000000..6cd5dbd3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllPreferencesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSettings; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetAllPreferencesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithSettings; + + @JsonCreator + public GetAllPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSettings) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSettings = mediaContainerWithSettings; + } + + public GetAllPreferencesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSettings() { + return (Optional) mediaContainerWithSettings; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllPreferencesResponse withMediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + + /** + * OK + */ + public GetAllPreferencesResponse withMediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllPreferencesResponse other = (GetAllPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSettings, other.mediaContainerWithSettings); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + @Override + public String toString() { + return Utils.toString(GetAllPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSettings", mediaContainerWithSettings); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSettings = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + public GetAllPreferencesResponse build() { + + return new GetAllPreferencesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllSubscriptionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllSubscriptionsRequestBuilder.java new file mode 100644 index 00000000..0b15aaee --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllSubscriptionsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetAllSubscriptionsRequest; +import dev.plexapi.sdk.operations.GetAllSubscriptions; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetAllSubscriptionsRequestBuilder { + + private GetAllSubscriptionsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAllSubscriptionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAllSubscriptionsRequestBuilder request(GetAllSubscriptionsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetAllSubscriptions.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllSubscriptionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllSubscriptionsResponse.java new file mode 100644 index 00000000..81e612a6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAllSubscriptionsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetAllSubscriptionsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithSubscription; + + + private Map> headers; + + @JsonCreator + public GetAllSubscriptionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSubscription, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + this.headers = headers; + } + + public GetAllSubscriptionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSubscription() { + return (Optional) mediaContainerWithSubscription; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAllSubscriptionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllSubscriptionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllSubscriptionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAllSubscriptionsResponse withMediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + + /** + * OK + */ + public GetAllSubscriptionsResponse withMediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + public GetAllSubscriptionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllSubscriptionsResponse other = (GetAllSubscriptionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSubscription, other.mediaContainerWithSubscription) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription, headers); + } + + @Override + public String toString() { + return Utils.toString(GetAllSubscriptionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSubscription", mediaContainerWithSubscription, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSubscription = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetAllSubscriptionsResponse build() { + + return new GetAllSubscriptionsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetArtsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetArtsRequestBuilder.java new file mode 100644 index 00000000..21ed3702 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetArtsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetArtsRequest; +import dev.plexapi.sdk.operations.GetArts; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetArtsRequestBuilder { + + private GetArtsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetArtsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetArtsRequestBuilder request(GetArtsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetArts.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetArtsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetArtsResponse.java new file mode 100644 index 00000000..52a7c574 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetArtsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetArtsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithArtwork; + + @JsonCreator + public GetArtsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithArtwork) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + } + + public GetArtsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithArtwork() { + return (Optional) mediaContainerWithArtwork; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetArtsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetArtsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetArtsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetArtsResponse withMediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + + /** + * OK + */ + public GetArtsResponse withMediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetArtsResponse other = (GetArtsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithArtwork, other.mediaContainerWithArtwork); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + @Override + public String toString() { + return Utils.toString(GetArtsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithArtwork", mediaContainerWithArtwork); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithArtwork = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + public GetArtsResponse build() { + + return new GetArtsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAugmentationStatusRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAugmentationStatusRequestBuilder.java new file mode 100644 index 00000000..1e761de6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAugmentationStatusRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetAugmentationStatusRequest; +import dev.plexapi.sdk.operations.GetAugmentationStatus; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetAugmentationStatusRequestBuilder { + + private GetAugmentationStatusRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAugmentationStatusRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAugmentationStatusRequestBuilder request(GetAugmentationStatusRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetAugmentationStatus.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAugmentationStatusResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAugmentationStatusResponse.java new file mode 100644 index 00000000..6d55caa7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAugmentationStatusResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetAugmentationStatusResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetAugmentationStatusResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAugmentationStatusResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAugmentationStatusResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAugmentationStatusResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAugmentationStatusResponse other = (GetAugmentationStatusResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetAugmentationStatusResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetAugmentationStatusResponse build() { + + return new GetAugmentationStatusResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableClientsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableClientsRequestBuilder.java deleted file mode 100644 index 16bd4e47..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableClientsRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetAvailableClients; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetAvailableClientsRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetAvailableClientsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetAvailableClients.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableClientsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableClientsResponse.java deleted file mode 100644 index e76edee3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableClientsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetAvailableClientsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetAvailableClientsResponse implements AsyncResponse { - /** - * 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; - - /** - * Available Clients - */ - private Optional object; - - @JsonCreator - public GetAvailableClientsResponse( - 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 GetAvailableClientsResponse( - 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; - } - - /** - * Available Clients - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetAvailableClientsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetAvailableClientsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetAvailableClientsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Available Clients - */ - public GetAvailableClientsResponse withObject(GetAvailableClientsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Available Clients - */ - public GetAvailableClientsResponse 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; - } - GetAvailableClientsResponse other = (GetAvailableClientsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetAvailableClientsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Available Clients - */ - public Builder object(GetAvailableClientsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Available Clients - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetAvailableClientsResponse build() { - - return new GetAvailableClientsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableGrabbersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableGrabbersRequestBuilder.java new file mode 100644 index 00000000..658e8116 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableGrabbersRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersRequest; +import dev.plexapi.sdk.operations.GetAvailableGrabbers; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetAvailableGrabbersRequestBuilder { + + private GetAvailableGrabbersRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAvailableGrabbersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAvailableGrabbersRequestBuilder request(GetAvailableGrabbersRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetAvailableGrabbers.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableGrabbersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableGrabbersResponse.java new file mode 100644 index 00000000..0b77e744 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableGrabbersResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetAvailableGrabbersResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetAvailableGrabbersResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetAvailableGrabbersResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAvailableGrabbersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAvailableGrabbersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAvailableGrabbersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAvailableGrabbersResponse withObject(GetAvailableGrabbersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetAvailableGrabbersResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetAvailableGrabbersResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAvailableGrabbersResponse other = (GetAvailableGrabbersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableGrabbersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetAvailableGrabbersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetAvailableGrabbersResponse build() { + + return new GetAvailableGrabbersResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableSortsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableSortsRequestBuilder.java new file mode 100644 index 00000000..921ab501 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableSortsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetAvailableSortsRequest; +import dev.plexapi.sdk.operations.GetAvailableSorts; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetAvailableSortsRequestBuilder { + + private GetAvailableSortsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetAvailableSortsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetAvailableSortsRequestBuilder request(GetAvailableSortsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetAvailableSorts.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableSortsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableSortsResponse.java new file mode 100644 index 00000000..fcfa1ece --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetAvailableSortsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetAvailableSortsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetAvailableSortsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetAvailableSortsResponse( + 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 GetAvailableSortsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetAvailableSortsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAvailableSortsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAvailableSortsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetAvailableSortsResponse withObject(GetAvailableSortsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetAvailableSortsResponse 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; + } + GetAvailableSortsResponse other = (GetAvailableSortsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetAvailableSortsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetAvailableSortsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetAvailableSortsResponse build() { + + return new GetAvailableSortsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetBackgroundTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetBackgroundTasksRequestBuilder.java new file mode 100644 index 00000000..5219f889 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetBackgroundTasksRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetBackgroundTasks; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetBackgroundTasksRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetBackgroundTasksRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new GetBackgroundTasks.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetBackgroundTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetBackgroundTasksResponse.java new file mode 100644 index 00000000..73907859 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetBackgroundTasksResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetBackgroundTasksResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetBackgroundTasksResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetBackgroundTasksResponse( + 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 GetBackgroundTasksResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetBackgroundTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetBackgroundTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetBackgroundTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetBackgroundTasksResponse withObject(GetBackgroundTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetBackgroundTasksResponse 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; + } + GetBackgroundTasksResponse other = (GetBackgroundTasksResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetBackgroundTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetBackgroundTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetBackgroundTasksResponse build() { + + return new GetBackgroundTasksResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetBandwidthStatisticsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetBandwidthStatisticsRequestBuilder.java deleted file mode 100644 index 13284e65..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetBandwidthStatisticsRequestBuilder.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsRequest; -import dev.plexapi.sdk.operations.GetBandwidthStatistics; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetBandwidthStatisticsRequestBuilder { - - private Optional timespan = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetBandwidthStatisticsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetBandwidthStatisticsRequestBuilder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.of(timespan); - return this; - } - - public GetBandwidthStatisticsRequestBuilder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - - private GetBandwidthStatisticsRequest buildRequest() { - - GetBandwidthStatisticsRequest request = new GetBandwidthStatisticsRequest(timespan); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetBandwidthStatistics.Async(sdkConfiguration); - GetBandwidthStatisticsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetBandwidthStatisticsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetBandwidthStatisticsResponse.java deleted file mode 100644 index 8c52f311..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetBandwidthStatisticsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetBandwidthStatisticsResponse implements AsyncResponse { - /** - * 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; - - /** - * Bandwidth Statistics - */ - private Optional object; - - @JsonCreator - public GetBandwidthStatisticsResponse( - 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 GetBandwidthStatisticsResponse( - 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; - } - - /** - * Bandwidth Statistics - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetBandwidthStatisticsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetBandwidthStatisticsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBandwidthStatisticsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Bandwidth Statistics - */ - public GetBandwidthStatisticsResponse withObject(GetBandwidthStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Bandwidth Statistics - */ - public GetBandwidthStatisticsResponse 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; - } - GetBandwidthStatisticsResponse other = (GetBandwidthStatisticsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetBandwidthStatisticsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Bandwidth Statistics - */ - public Builder object(GetBandwidthStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Bandwidth Statistics - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetBandwidthStatisticsResponse build() { - - return new GetBandwidthStatisticsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetBannerImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetBannerImageRequestBuilder.java deleted file mode 100644 index 1b1e099f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetBannerImageRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetBannerImageRequest; -import dev.plexapi.sdk.operations.GetBannerImage; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetBannerImageRequestBuilder { - - private GetBannerImageRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetBannerImageRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetBannerImageRequestBuilder request(GetBannerImageRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetBannerImage.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetBannerImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetBannerImageResponse.java deleted file mode 100644 index 30a258c8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetBannerImageResponse.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Map; -import java.util.Optional; - - -public class GetBannerImageResponse implements AsyncResponse { - /** - * 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; - - /** - * Successful response returning an image - */ - private Optional responseStream; - - - private Map> headers; - - @JsonCreator - public GetBannerImageResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional responseStream, - Map> headers) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(responseStream, "responseStream"); - headers = Utils.emptyMapIfNull(headers); - Utils.checkNotNull(headers, "headers"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.responseStream = responseStream; - this.headers = headers; - } - - public GetBannerImageResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Map> headers) { - this(contentType, statusCode, rawResponse, - Optional.empty(), headers); - } - - /** - * 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; - } - - /** - * Successful response returning an image - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional responseStream() { - return (Optional) responseStream; - } - - @JsonIgnore - public Map> headers() { - return headers; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetBannerImageResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetBannerImageResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetBannerImageResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response returning an image - */ - public GetBannerImageResponse withResponseStream(Blob responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = Optional.ofNullable(responseStream); - return this; - } - - - /** - * Successful response returning an image - */ - public GetBannerImageResponse withResponseStream(Optional responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = responseStream; - return this; - } - - public GetBannerImageResponse withHeaders(Map> headers) { - Utils.checkNotNull(headers, "headers"); - this.headers = headers; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetBannerImageResponse other = (GetBannerImageResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.responseStream, other.responseStream) && - Utils.enhancedDeepEquals(this.headers, other.headers); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - responseStream, headers); - } - - @Override - public String toString() { - return Utils.toString(GetBannerImageResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "responseStream", responseStream, - "headers", headers); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional responseStream = Optional.empty(); - - private Map> headers; - - 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; - } - - - /** - * Successful response returning an image - */ - public Builder responseStream(Blob responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = Optional.ofNullable(responseStream); - return this; - } - - /** - * Successful response returning an image - */ - public Builder responseStream(Optional responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = responseStream; - return this; - } - - - public Builder headers(Map> headers) { - Utils.checkNotNull(headers, "headers"); - this.headers = headers; - return this; - } - - public GetBannerImageResponse build() { - - return new GetBannerImageResponse( - contentType, statusCode, rawResponse, - responseStream, headers); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetButlerTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetButlerTasksRequestBuilder.java deleted file mode 100644 index 620e2698..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetButlerTasksRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetButlerTasks; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetButlerTasksRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetButlerTasksRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetButlerTasks.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetButlerTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetButlerTasksResponse.java deleted file mode 100644 index 4be9b109..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetButlerTasksResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetButlerTasksResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetButlerTasksResponse implements AsyncResponse { - /** - * 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; - - /** - * All butler tasks - */ - private Optional object; - - @JsonCreator - public GetButlerTasksResponse( - 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 GetButlerTasksResponse( - 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; - } - - /** - * All butler tasks - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetButlerTasksResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetButlerTasksResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetButlerTasksResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * All butler tasks - */ - public GetButlerTasksResponse withObject(GetButlerTasksResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * All butler tasks - */ - public GetButlerTasksResponse 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; - } - GetButlerTasksResponse other = (GetButlerTasksResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetButlerTasksResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * All butler tasks - */ - public Builder object(GetButlerTasksResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * All butler tasks - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetButlerTasksResponse build() { - - return new GetButlerTasksResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCategoriesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCategoriesRequestBuilder.java new file mode 100644 index 00000000..f20e126f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCategoriesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetCategoriesRequest; +import dev.plexapi.sdk.operations.GetCategories; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetCategoriesRequestBuilder { + + private GetCategoriesRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCategoriesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCategoriesRequestBuilder request(GetCategoriesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetCategories.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCategoriesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCategoriesResponse.java new file mode 100644 index 00000000..52e93923 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCategoriesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetCategoriesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithArtwork; + + @JsonCreator + public GetCategoriesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithArtwork) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + } + + public GetCategoriesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithArtwork() { + return (Optional) mediaContainerWithArtwork; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCategoriesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCategoriesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCategoriesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCategoriesResponse withMediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + + /** + * OK + */ + public GetCategoriesResponse withMediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCategoriesResponse other = (GetCategoriesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithArtwork, other.mediaContainerWithArtwork); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + @Override + public String toString() { + return Utils.toString(GetCategoriesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithArtwork", mediaContainerWithArtwork); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithArtwork = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + public GetCategoriesResponse build() { + + return new GetCategoriesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetChannelsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetChannelsRequestBuilder.java new file mode 100644 index 00000000..3551dc07 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetChannelsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetChannelsRequest; +import dev.plexapi.sdk.operations.GetChannels; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetChannelsRequestBuilder { + + private GetChannelsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetChannelsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetChannelsRequestBuilder request(GetChannelsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetChannels.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetChannelsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetChannelsResponse.java new file mode 100644 index 00000000..bfdc7f11 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetChannelsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetChannelsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetChannelsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetChannelsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetChannelsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetChannelsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetChannelsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetChannelsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetChannelsResponse withObject(GetChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetChannelsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetChannelsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChannelsResponse other = (GetChannelsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetChannelsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetChannelsResponse build() { + + return new GetChannelsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetChapterImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetChapterImageRequestBuilder.java new file mode 100644 index 00000000..a8bcac37 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetChapterImageRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetChapterImageRequest; +import dev.plexapi.sdk.operations.GetChapterImage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetChapterImageRequestBuilder { + + private GetChapterImageRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetChapterImageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetChapterImageRequestBuilder request(GetChapterImageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetChapterImage.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetChapterImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetChapterImageResponse.java new file mode 100644 index 00000000..29cf6218 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetChapterImageResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetChapterImageResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetChapterImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetChapterImageResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetChapterImageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetChapterImageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetChapterImageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetChapterImageResponse withResponseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetChapterImageResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChapterImageResponse other = (GetChapterImageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetChapterImageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetChapterImageResponse build() { + + return new GetChapterImageResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetClusterRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetClusterRequestBuilder.java new file mode 100644 index 00000000..46ad4e63 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetClusterRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetClusterRequest; +import dev.plexapi.sdk.operations.GetCluster; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetClusterRequestBuilder { + + private GetClusterRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetClusterRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetClusterRequestBuilder request(GetClusterRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetCluster.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetClusterResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetClusterResponse.java new file mode 100644 index 00000000..e616de3c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetClusterResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetClusterResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithArtwork; + + @JsonCreator + public GetClusterResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithArtwork) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + } + + public GetClusterResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithArtwork() { + return (Optional) mediaContainerWithArtwork; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetClusterResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetClusterResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetClusterResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetClusterResponse withMediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + + /** + * OK + */ + public GetClusterResponse withMediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetClusterResponse other = (GetClusterResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithArtwork, other.mediaContainerWithArtwork); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + @Override + public String toString() { + return Utils.toString(GetClusterResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithArtwork", mediaContainerWithArtwork); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithArtwork = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + public GetClusterResponse build() { + + return new GetClusterResponse( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionImageRequestBuilder.java new file mode 100644 index 00000000..3234ac4d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionImageRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetCollectionImageRequest; +import dev.plexapi.sdk.operations.GetCollectionImage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetCollectionImageRequestBuilder { + + private GetCollectionImageRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCollectionImageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCollectionImageRequestBuilder request(GetCollectionImageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetCollectionImage.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionImageResponse.java new file mode 100644 index 00000000..2e16385d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionImageResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetCollectionImageResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetCollectionImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetCollectionImageResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCollectionImageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCollectionImageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCollectionImageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCollectionImageResponse withResponseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetCollectionImageResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCollectionImageResponse other = (GetCollectionImageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetCollectionImageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetCollectionImageResponse build() { + + return new GetCollectionImageResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionItemsRequestBuilder.java new file mode 100644 index 00000000..3497e88c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetCollectionItemsRequest; +import dev.plexapi.sdk.operations.GetCollectionItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetCollectionItemsRequestBuilder { + + private GetCollectionItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCollectionItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCollectionItemsRequestBuilder request(GetCollectionItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetCollectionItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionItemsResponse.java new file mode 100644 index 00000000..bfbf2fbb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetCollectionItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public GetCollectionItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public GetCollectionItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCollectionItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCollectionItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCollectionItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCollectionItemsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetCollectionItemsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCollectionItemsResponse other = (GetCollectionItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetCollectionItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetCollectionItemsResponse build() { + + return new GetCollectionItemsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionsRequestBuilder.java new file mode 100644 index 00000000..b873f264 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetCollectionsRequest; +import dev.plexapi.sdk.operations.GetCollections; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetCollectionsRequestBuilder { + + private GetCollectionsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCollectionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCollectionsRequestBuilder request(GetCollectionsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetCollections.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionsResponse.java new file mode 100644 index 00000000..af117cfa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCollectionsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetCollectionsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetCollectionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetCollectionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCollectionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCollectionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCollectionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCollectionsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetCollectionsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetCollectionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCollectionsResponse other = (GetCollectionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetCollectionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetCollectionsResponse build() { + + return new GetCollectionsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetColorsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetColorsRequestBuilder.java new file mode 100644 index 00000000..ee7ed47e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetColorsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetColorsRequest; +import dev.plexapi.sdk.operations.GetColors; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetColorsRequestBuilder { + + private GetColorsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetColorsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetColorsRequestBuilder request(GetColorsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetColors.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetColorsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetColorsResponse.java new file mode 100644 index 00000000..8c6a611b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetColorsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetColorsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetColorsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetColorsResponse( + 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 GetColorsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetColorsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetColorsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetColorsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetColorsResponse withObject(GetColorsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetColorsResponse 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; + } + GetColorsResponse other = (GetColorsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetColorsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetColorsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetColorsResponse build() { + + return new GetColorsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCommonRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCommonRequestBuilder.java new file mode 100644 index 00000000..0e873265 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCommonRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetCommonRequest; +import dev.plexapi.sdk.operations.GetCommon; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetCommonRequestBuilder { + + private GetCommonRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCommonRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCommonRequestBuilder request(GetCommonRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetCommon.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCommonResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCommonResponse.java new file mode 100644 index 00000000..08772aa9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCommonResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetCommonResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetCommonResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetCommonResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCommonResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCommonResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCommonResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCommonResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetCommonResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetCommonResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCommonResponse other = (GetCommonResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetCommonResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetCommonResponse build() { + + return new GetCommonResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCompanionsDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCompanionsDataRequestBuilder.java deleted file mode 100644 index df44755e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCompanionsDataRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetCompanionsData; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetCompanionsDataRequestBuilder { - - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetCompanionsDataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetCompanionsDataRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetCompanionsDataRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetCompanionsData.Async(sdkConfiguration, serverURL); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCompanionsDataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCompanionsDataResponse.java deleted file mode 100644 index 6d561a87..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCompanionsDataResponse.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.ResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - - -public class GetCompanionsDataResponse implements AsyncResponse { - /** - * 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; - - /** - * Companions Data - */ - private Optional> responseBodies; - - @JsonCreator - public GetCompanionsDataResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional> responseBodies) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(responseBodies, "responseBodies"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.responseBodies = responseBodies; - } - - public GetCompanionsDataResponse( - 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; - } - - /** - * Companions Data - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> responseBodies() { - return (Optional>) responseBodies; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetCompanionsDataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetCompanionsDataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCompanionsDataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Companions Data - */ - public GetCompanionsDataResponse withResponseBodies(List responseBodies) { - Utils.checkNotNull(responseBodies, "responseBodies"); - this.responseBodies = Optional.ofNullable(responseBodies); - return this; - } - - - /** - * Companions Data - */ - public GetCompanionsDataResponse withResponseBodies(Optional> responseBodies) { - Utils.checkNotNull(responseBodies, "responseBodies"); - this.responseBodies = responseBodies; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetCompanionsDataResponse other = (GetCompanionsDataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.responseBodies, other.responseBodies); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - responseBodies); - } - - @Override - public String toString() { - return Utils.toString(GetCompanionsDataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "responseBodies", responseBodies); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional> responseBodies = 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; - } - - - /** - * Companions Data - */ - public Builder responseBodies(List responseBodies) { - Utils.checkNotNull(responseBodies, "responseBodies"); - this.responseBodies = Optional.ofNullable(responseBodies); - return this; - } - - /** - * Companions Data - */ - public Builder responseBodies(Optional> responseBodies) { - Utils.checkNotNull(responseBodies, "responseBodies"); - this.responseBodies = responseBodies; - return this; - } - - public GetCompanionsDataResponse build() { - - return new GetCompanionsDataResponse( - contentType, statusCode, rawResponse, - responseBodies); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetContinueWatchingRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetContinueWatchingRequestBuilder.java new file mode 100644 index 00000000..7d359273 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetContinueWatchingRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetContinueWatchingRequest; +import dev.plexapi.sdk.operations.GetContinueWatching; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetContinueWatchingRequestBuilder { + + private GetContinueWatchingRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetContinueWatchingRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetContinueWatchingRequestBuilder request(GetContinueWatchingRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetContinueWatching.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetContinueWatchingResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetContinueWatchingResponse.java new file mode 100644 index 00000000..2a7bc6ee --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetContinueWatchingResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetContinueWatchingResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetContinueWatchingResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetContinueWatchingResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetContinueWatchingResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetContinueWatchingResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetContinueWatchingResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetContinueWatchingResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetContinueWatchingResponse withObject(GetContinueWatchingResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetContinueWatchingResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetContinueWatchingResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContinueWatchingResponse other = (GetContinueWatchingResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetContinueWatchingResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetContinueWatchingResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetContinueWatchingResponse build() { + + return new GetContinueWatchingResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLibraryRequestBuilder.java deleted file mode 100644 index 144a0968..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLibraryRequestBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryRequest; -import dev.plexapi.sdk.operations.GetCountriesLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; -import java.util.concurrent.CompletableFuture; - -public class GetCountriesLibraryRequestBuilder { - - private Integer sectionKey; - private GetCountriesLibraryQueryParamType type; - private final SDKConfiguration sdkConfiguration; - - public GetCountriesLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetCountriesLibraryRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - public GetCountriesLibraryRequestBuilder type(GetCountriesLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetCountriesLibraryRequest buildRequest() { - - GetCountriesLibraryRequest request = new GetCountriesLibraryRequest(sectionKey, - type); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetCountriesLibrary.Async(sdkConfiguration); - GetCountriesLibraryRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLibraryResponse.java deleted file mode 100644 index de8e099d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLibraryResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetCountriesLibraryResponse implements AsyncResponse { - /** - * 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; - - /** - * Successful response containing media container data. - */ - private Optional object; - - @JsonCreator - public GetCountriesLibraryResponse( - 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 GetCountriesLibraryResponse( - 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; - } - - /** - * Successful response containing media container data. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetCountriesLibraryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetCountriesLibraryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetCountriesLibraryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response containing media container data. - */ - public GetCountriesLibraryResponse withObject(GetCountriesLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Successful response containing media container data. - */ - public GetCountriesLibraryResponse 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; - } - GetCountriesLibraryResponse other = (GetCountriesLibraryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetCountriesLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Successful response containing media container data. - */ - public Builder object(GetCountriesLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Successful response containing media container data. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetCountriesLibraryResponse build() { - - return new GetCountriesLibraryResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLineupsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLineupsRequestBuilder.java new file mode 100644 index 00000000..10ae7376 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLineupsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetCountriesLineupsRequest; +import dev.plexapi.sdk.operations.GetCountriesLineups; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetCountriesLineupsRequestBuilder { + + private GetCountriesLineupsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCountriesLineupsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCountriesLineupsRequestBuilder request(GetCountriesLineupsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetCountriesLineups.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLineupsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLineupsResponse.java new file mode 100644 index 00000000..2f5a9161 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesLineupsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithLineup; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetCountriesLineupsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithLineup; + + @JsonCreator + public GetCountriesLineupsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithLineup) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithLineup = mediaContainerWithLineup; + } + + public GetCountriesLineupsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithLineup() { + return (Optional) mediaContainerWithLineup; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCountriesLineupsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCountriesLineupsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCountriesLineupsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCountriesLineupsResponse withMediaContainerWithLineup(MediaContainerWithLineup mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = Optional.ofNullable(mediaContainerWithLineup); + return this; + } + + + /** + * OK + */ + public GetCountriesLineupsResponse withMediaContainerWithLineup(Optional mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = mediaContainerWithLineup; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountriesLineupsResponse other = (GetCountriesLineupsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithLineup, other.mediaContainerWithLineup); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithLineup); + } + + @Override + public String toString() { + return Utils.toString(GetCountriesLineupsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithLineup", mediaContainerWithLineup); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithLineup = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithLineup(MediaContainerWithLineup mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = Optional.ofNullable(mediaContainerWithLineup); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithLineup(Optional mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = mediaContainerWithLineup; + return this; + } + + public GetCountriesLineupsResponse build() { + + return new GetCountriesLineupsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithLineup); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesRequestBuilder.java new file mode 100644 index 00000000..8ed33934 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetCountries; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetCountriesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetCountriesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new GetCountries.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesResponse.java new file mode 100644 index 00000000..a32ea4e3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountriesResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetCountriesResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetCountriesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetCountriesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetCountriesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCountriesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCountriesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCountriesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCountriesResponse withObject(GetCountriesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetCountriesResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetCountriesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountriesResponse other = (GetCountriesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetCountriesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetCountriesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetCountriesResponse build() { + + return new GetCountriesResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountryRegionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountryRegionsRequestBuilder.java new file mode 100644 index 00000000..23e8e507 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountryRegionsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetCountryRegionsRequest; +import dev.plexapi.sdk.operations.GetCountryRegions; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetCountryRegionsRequestBuilder { + + private GetCountryRegionsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetCountryRegionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetCountryRegionsRequestBuilder request(GetCountryRegionsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetCountryRegions.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountryRegionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountryRegionsResponse.java new file mode 100644 index 00000000..73a90e85 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetCountryRegionsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetCountryRegionsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetCountryRegionsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetCountryRegionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetCountryRegionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetCountryRegionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetCountryRegionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetCountryRegionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetCountryRegionsResponse withObject(GetCountryRegionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetCountryRegionsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetCountryRegionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountryRegionsResponse other = (GetCountryRegionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetCountryRegionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetCountryRegionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetCountryRegionsResponse build() { + + return new GetCountryRegionsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDVRRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDVRRequestBuilder.java new file mode 100644 index 00000000..053c81d1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDVRRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetDVRRequest; +import dev.plexapi.sdk.operations.GetDVR; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetDVRRequestBuilder { + + private GetDVRRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDVRRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDVRRequestBuilder request(GetDVRRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetDVR.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDVRResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDVRResponse.java new file mode 100644 index 00000000..1a74cb41 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDVRResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetDVRResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetDVRResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDVRResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDVRResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDVRResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDVRResponse withObject(GetDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetDVRResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetDVRResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDVRResponse other = (GetDVRResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetDVRResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetDVRResponse build() { + + return new GetDVRResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDeviceDetailsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDeviceDetailsRequestBuilder.java new file mode 100644 index 00000000..f6b9a6ff --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDeviceDetailsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetDeviceDetailsRequest; +import dev.plexapi.sdk.operations.GetDeviceDetails; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetDeviceDetailsRequestBuilder { + + private GetDeviceDetailsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDeviceDetailsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDeviceDetailsRequestBuilder request(GetDeviceDetailsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetDeviceDetails.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDeviceDetailsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDeviceDetailsResponse.java new file mode 100644 index 00000000..2a0ea930 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDeviceDetailsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetDeviceDetailsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + @JsonCreator + public GetDeviceDetailsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + } + + public GetDeviceDetailsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDeviceDetailsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDeviceDetailsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDeviceDetailsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDeviceDetailsResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public GetDeviceDetailsResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDeviceDetailsResponse other = (GetDeviceDetailsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + @Override + public String toString() { + return Utils.toString(GetDeviceDetailsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public GetDeviceDetailsResponse build() { + + return new GetDeviceDetailsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesChannelsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesChannelsRequestBuilder.java new file mode 100644 index 00000000..74ff8313 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesChannelsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsRequest; +import dev.plexapi.sdk.operations.GetDevicesChannels; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetDevicesChannelsRequestBuilder { + + private GetDevicesChannelsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDevicesChannelsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDevicesChannelsRequestBuilder request(GetDevicesChannelsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetDevicesChannels.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesChannelsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesChannelsResponse.java new file mode 100644 index 00000000..14708bdb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesChannelsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetDevicesChannelsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetDevicesChannelsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetDevicesChannelsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDevicesChannelsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDevicesChannelsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDevicesChannelsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDevicesChannelsResponse withObject(GetDevicesChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetDevicesChannelsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetDevicesChannelsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDevicesChannelsResponse other = (GetDevicesChannelsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetDevicesChannelsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetDevicesChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetDevicesChannelsResponse build() { + + return new GetDevicesChannelsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesRequestBuilder.java deleted file mode 100644 index d1bded44..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetDevices; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetDevicesRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetDevicesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetDevices.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesResponse.java deleted file mode 100644 index eb3b38b5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDevicesResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetDevicesResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetDevicesResponse implements AsyncResponse { - /** - * 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; - - /** - * Devices - */ - private Optional object; - - @JsonCreator - public GetDevicesResponse( - 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 GetDevicesResponse( - 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; - } - - /** - * Devices - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetDevicesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetDevicesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetDevicesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Devices - */ - public GetDevicesResponse withObject(GetDevicesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Devices - */ - public GetDevicesResponse 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; - } - GetDevicesResponse other = (GetDevicesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetDevicesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Devices - */ - public Builder object(GetDevicesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Devices - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetDevicesResponse build() { - - return new GetDevicesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueItemsRequestBuilder.java new file mode 100644 index 00000000..f2cc3db7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsRequest; +import dev.plexapi.sdk.operations.GetDownloadQueueItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetDownloadQueueItemsRequestBuilder { + + private GetDownloadQueueItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDownloadQueueItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDownloadQueueItemsRequestBuilder request(GetDownloadQueueItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetDownloadQueueItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueItemsResponse.java new file mode 100644 index 00000000..906d6c70 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetDownloadQueueItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetDownloadQueueItemsResponse( + 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 GetDownloadQueueItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDownloadQueueItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDownloadQueueItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDownloadQueueItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDownloadQueueItemsResponse withObject(GetDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetDownloadQueueItemsResponse 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; + } + GetDownloadQueueItemsResponse other = (GetDownloadQueueItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetDownloadQueueItemsResponse build() { + + return new GetDownloadQueueItemsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueMediaRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueMediaRequestBuilder.java new file mode 100644 index 00000000..a0b2cc4e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueMediaRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaRequest; +import dev.plexapi.sdk.operations.GetDownloadQueueMedia; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetDownloadQueueMediaRequestBuilder { + + private GetDownloadQueueMediaRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDownloadQueueMediaRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDownloadQueueMediaRequestBuilder request(GetDownloadQueueMediaRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetDownloadQueueMedia.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueMediaResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueMediaResponse.java new file mode 100644 index 00000000..5a4084ed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueMediaResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; + + +public class GetDownloadQueueMediaResponse implements AsyncResponse { + /** + * 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; + + + private Map> headers; + + @JsonCreator + public GetDownloadQueueMediaResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.headers = headers; + } + + /** + * 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; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDownloadQueueMediaResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDownloadQueueMediaResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDownloadQueueMediaResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetDownloadQueueMediaResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDownloadQueueMediaResponse other = (GetDownloadQueueMediaResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueMediaResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetDownloadQueueMediaResponse build() { + + return new GetDownloadQueueMediaResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueRequestBuilder.java new file mode 100644 index 00000000..cda131d1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetDownloadQueueRequest; +import dev.plexapi.sdk.operations.GetDownloadQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetDownloadQueueRequestBuilder { + + private GetDownloadQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetDownloadQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDownloadQueueRequestBuilder request(GetDownloadQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetDownloadQueue.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueResponse.java new file mode 100644 index 00000000..5e79ea30 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetDownloadQueueResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetDownloadQueueResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetDownloadQueueResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetDownloadQueueResponse( + 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 GetDownloadQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDownloadQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDownloadQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDownloadQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDownloadQueueResponse withObject(GetDownloadQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetDownloadQueueResponse 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; + } + GetDownloadQueueResponse other = (GetDownloadQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetDownloadQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetDownloadQueueResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetDownloadQueueResponse build() { + + return new GetDownloadQueueResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetExtrasRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetExtrasRequestBuilder.java new file mode 100644 index 00000000..e7fa3ab4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetExtrasRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetExtrasRequest; +import dev.plexapi.sdk.operations.GetExtras; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetExtrasRequestBuilder { + + private GetExtrasRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetExtrasRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetExtrasRequestBuilder request(GetExtrasRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetExtras.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetExtrasResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetExtrasResponse.java new file mode 100644 index 00000000..e41bed27 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetExtrasResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetExtrasResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetExtrasResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetExtrasResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetExtrasResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetExtrasResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetExtrasResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetExtrasResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetExtrasResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetExtrasResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtrasResponse other = (GetExtrasResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetExtrasResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetExtrasResponse build() { + + return new GetExtrasResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileHashRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileHashRequestBuilder.java deleted file mode 100644 index e0c50cd9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileHashRequestBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetFileHashRequest; -import dev.plexapi.sdk.operations.GetFileHash; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetFileHashRequestBuilder { - - private String url; - private Optional type = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetFileHashRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetFileHashRequestBuilder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - public GetFileHashRequestBuilder type(double type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.of(type); - return this; - } - - public GetFileHashRequestBuilder type(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetFileHashRequest buildRequest() { - - GetFileHashRequest request = new GetFileHashRequest(url, - type); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetFileHash.Async(sdkConfiguration); - GetFileHashRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileHashResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileHashResponse.java deleted file mode 100644 index 20c493a9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileHashResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class GetFileHashResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public GetFileHashResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetFileHashResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetFileHashResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetFileHashResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetFileHashResponse other = (GetFileHashResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetFileHashResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetFileHashResponse build() { - - return new GetFileHashResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileRequestBuilder.java new file mode 100644 index 00000000..20822d8f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetFileRequest; +import dev.plexapi.sdk.operations.GetFile; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetFileRequestBuilder { + + private GetFileRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetFileRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetFileRequestBuilder request(GetFileRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetFile.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileResponse.java new file mode 100644 index 00000000..6bb32789 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFileResponse.java @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetFileResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional twoHundredAudioMpeg3ResponseStream; + + /** + * OK + */ + private Optional twoHundredImageJpegResponseStream; + + @JsonCreator + public GetFileResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredAudioMpeg3ResponseStream, + Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + } + + public GetFileResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredAudioMpeg3ResponseStream() { + return (Optional) twoHundredAudioMpeg3ResponseStream; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredImageJpegResponseStream() { + return (Optional) twoHundredImageJpegResponseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetFileResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetFileResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetFileResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetFileResponse withTwoHundredAudioMpeg3ResponseStream(Blob twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = Optional.ofNullable(twoHundredAudioMpeg3ResponseStream); + return this; + } + + + /** + * OK + */ + public GetFileResponse withTwoHundredAudioMpeg3ResponseStream(Optional twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + return this; + } + + /** + * OK + */ + public GetFileResponse withTwoHundredImageJpegResponseStream(Blob twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + + /** + * OK + */ + public GetFileResponse withTwoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFileResponse other = (GetFileResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.twoHundredAudioMpeg3ResponseStream, other.twoHundredAudioMpeg3ResponseStream) && + Utils.enhancedDeepEquals(this.twoHundredImageJpegResponseStream, other.twoHundredImageJpegResponseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + twoHundredAudioMpeg3ResponseStream, twoHundredImageJpegResponseStream); + } + + @Override + public String toString() { + return Utils.toString(GetFileResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredAudioMpeg3ResponseStream", twoHundredAudioMpeg3ResponseStream, + "twoHundredImageJpegResponseStream", twoHundredImageJpegResponseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredAudioMpeg3ResponseStream = Optional.empty(); + + private Optional twoHundredImageJpegResponseStream = 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; + } + + + /** + * OK + */ + public Builder twoHundredAudioMpeg3ResponseStream(Blob twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = Optional.ofNullable(twoHundredAudioMpeg3ResponseStream); + return this; + } + + /** + * OK + */ + public Builder twoHundredAudioMpeg3ResponseStream(Optional twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + return this; + } + + + /** + * OK + */ + public Builder twoHundredImageJpegResponseStream(Blob twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + /** + * OK + */ + public Builder twoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + public GetFileResponse build() { + + return new GetFileResponse( + contentType, statusCode, rawResponse, + twoHundredAudioMpeg3ResponseStream, twoHundredImageJpegResponseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetFirstCharactersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFirstCharactersRequestBuilder.java new file mode 100644 index 00000000..c8257d0f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFirstCharactersRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetFirstCharactersRequest; +import dev.plexapi.sdk.operations.GetFirstCharacters; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetFirstCharactersRequestBuilder { + + private GetFirstCharactersRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetFirstCharactersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetFirstCharactersRequestBuilder request(GetFirstCharactersRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetFirstCharacters.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetFirstCharactersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFirstCharactersResponse.java new file mode 100644 index 00000000..085454a9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFirstCharactersResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetFirstCharactersResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetFirstCharactersResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetFirstCharactersResponse( + 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 GetFirstCharactersResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetFirstCharactersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetFirstCharactersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetFirstCharactersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetFirstCharactersResponse withObject(GetFirstCharactersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetFirstCharactersResponse 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; + } + GetFirstCharactersResponse other = (GetFirstCharactersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetFirstCharactersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetFirstCharactersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetFirstCharactersResponse build() { + + return new GetFirstCharactersResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetFoldersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFoldersRequestBuilder.java new file mode 100644 index 00000000..3b84643a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFoldersRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetFoldersRequest; +import dev.plexapi.sdk.operations.GetFolders; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetFoldersRequestBuilder { + + private GetFoldersRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetFoldersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetFoldersRequestBuilder request(GetFoldersRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetFolders.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetFoldersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFoldersResponse.java new file mode 100644 index 00000000..1d971e4e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetFoldersResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetFoldersResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetFoldersResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetFoldersResponse( + 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 GetFoldersResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetFoldersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetFoldersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetFoldersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetFoldersResponse withObject(GetFoldersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetFoldersResponse 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; + } + GetFoldersResponse other = (GetFoldersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetFoldersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetFoldersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetFoldersResponse build() { + + return new GetFoldersResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGenresLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetGenresLibraryRequestBuilder.java deleted file mode 100644 index ded1c3bd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGenresLibraryRequestBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetGenresLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetGenresLibraryRequest; -import dev.plexapi.sdk.operations.GetGenresLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; -import java.util.concurrent.CompletableFuture; - -public class GetGenresLibraryRequestBuilder { - - private Integer sectionKey; - private GetGenresLibraryQueryParamType type; - private final SDKConfiguration sdkConfiguration; - - public GetGenresLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetGenresLibraryRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - public GetGenresLibraryRequestBuilder type(GetGenresLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetGenresLibraryRequest buildRequest() { - - GetGenresLibraryRequest request = new GetGenresLibraryRequest(sectionKey, - type); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetGenresLibrary.Async(sdkConfiguration); - GetGenresLibraryRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGenresLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetGenresLibraryResponse.java deleted file mode 100644 index f7c38fd6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGenresLibraryResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetGenresLibraryResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetGenresLibraryResponse implements AsyncResponse { - /** - * 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; - - /** - * Successful response containing media container data. - */ - private Optional object; - - @JsonCreator - public GetGenresLibraryResponse( - 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 GetGenresLibraryResponse( - 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; - } - - /** - * Successful response containing media container data. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetGenresLibraryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetGenresLibraryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGenresLibraryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response containing media container data. - */ - public GetGenresLibraryResponse withObject(GetGenresLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Successful response containing media container data. - */ - public GetGenresLibraryResponse 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; - } - GetGenresLibraryResponse other = (GetGenresLibraryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetGenresLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Successful response containing media container data. - */ - public Builder object(GetGenresLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Successful response containing media container data. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetGenresLibraryResponse build() { - - return new GetGenresLibraryResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGeoDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetGeoDataRequestBuilder.java deleted file mode 100644 index b13719d4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGeoDataRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetGeoData; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetGeoDataRequestBuilder { - - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetGeoDataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetGeoDataRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetGeoDataRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetGeoData.Async(sdkConfiguration, serverURL); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGeoDataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetGeoDataResponse.java deleted file mode 100644 index 66c40c43..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGeoDataResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetGeoDataGeoData; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetGeoDataResponse implements AsyncResponse { - /** - * 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; - - /** - * Gets the geo location data of the user - */ - private Optional geoData; - - @JsonCreator - public GetGeoDataResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional geoData) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(geoData, "geoData"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.geoData = geoData; - } - - public GetGeoDataResponse( - 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; - } - - /** - * Gets the geo location data of the user - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional geoData() { - return (Optional) geoData; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetGeoDataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetGeoDataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGeoDataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Gets the geo location data of the user - */ - public GetGeoDataResponse withGeoData(GetGeoDataGeoData geoData) { - Utils.checkNotNull(geoData, "geoData"); - this.geoData = Optional.ofNullable(geoData); - return this; - } - - - /** - * Gets the geo location data of the user - */ - public GetGeoDataResponse withGeoData(Optional geoData) { - Utils.checkNotNull(geoData, "geoData"); - this.geoData = geoData; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetGeoDataResponse other = (GetGeoDataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.geoData, other.geoData); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - geoData); - } - - @Override - public String toString() { - return Utils.toString(GetGeoDataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "geoData", geoData); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional geoData = 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; - } - - - /** - * Gets the geo location data of the user - */ - public Builder geoData(GetGeoDataGeoData geoData) { - Utils.checkNotNull(geoData, "geoData"); - this.geoData = Optional.ofNullable(geoData); - return this; - } - - /** - * Gets the geo location data of the user - */ - public Builder geoData(Optional geoData) { - Utils.checkNotNull(geoData, "geoData"); - this.geoData = geoData; - return this; - } - - public GetGeoDataResponse build() { - - return new GetGeoDataResponse( - contentType, statusCode, rawResponse, - geoData); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGlobalHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetGlobalHubsRequestBuilder.java deleted file mode 100644 index e4da8052..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGlobalHubsRequestBuilder.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetGlobalHubsRequest; -import dev.plexapi.sdk.models.operations.OnlyTransient; -import dev.plexapi.sdk.operations.GetGlobalHubs; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetGlobalHubsRequestBuilder { - - private Optional count = Optional.empty(); - private Optional onlyTransient = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetGlobalHubsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetGlobalHubsRequestBuilder count(double count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.of(count); - return this; - } - - public GetGlobalHubsRequestBuilder count(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - public GetGlobalHubsRequestBuilder onlyTransient(OnlyTransient onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = Optional.of(onlyTransient); - return this; - } - - public GetGlobalHubsRequestBuilder onlyTransient(Optional onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = onlyTransient; - return this; - } - - - private GetGlobalHubsRequest buildRequest() { - - GetGlobalHubsRequest request = new GetGlobalHubsRequest(count, - onlyTransient); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetGlobalHubs.Async(sdkConfiguration); - GetGlobalHubsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGlobalHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetGlobalHubsResponse.java deleted file mode 100644 index bc71f70a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetGlobalHubsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetGlobalHubsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetGlobalHubsResponse implements AsyncResponse { - /** - * 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; - - /** - * returns global hubs - */ - private Optional object; - - @JsonCreator - public GetGlobalHubsResponse( - 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 GetGlobalHubsResponse( - 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; - } - - /** - * returns global hubs - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetGlobalHubsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetGlobalHubsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetGlobalHubsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * returns global hubs - */ - public GetGlobalHubsResponse withObject(GetGlobalHubsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * returns global hubs - */ - public GetGlobalHubsResponse 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; - } - GetGlobalHubsResponse other = (GetGlobalHubsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetGlobalHubsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * returns global hubs - */ - public Builder object(GetGlobalHubsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * returns global hubs - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetGlobalHubsResponse build() { - - return new GetGlobalHubsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetHistoryItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetHistoryItemRequestBuilder.java new file mode 100644 index 00000000..ee7b5664 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetHistoryItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetHistoryItemRequest; +import dev.plexapi.sdk.operations.GetHistoryItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetHistoryItemRequestBuilder { + + private GetHistoryItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetHistoryItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetHistoryItemRequestBuilder request(GetHistoryItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetHistoryItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetHistoryItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetHistoryItemResponse.java new file mode 100644 index 00000000..2c91b9e4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetHistoryItemResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.HistoryAllGetResponses200; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetHistoryItemResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional historyAllGetResponses200; + + + private Map> headers; + + @JsonCreator + public GetHistoryItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional historyAllGetResponses200, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(historyAllGetResponses200, "historyAllGetResponses200"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.historyAllGetResponses200 = historyAllGetResponses200; + this.headers = headers; + } + + public GetHistoryItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional historyAllGetResponses200() { + return (Optional) historyAllGetResponses200; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetHistoryItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetHistoryItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetHistoryItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetHistoryItemResponse withHistoryAllGetResponses200(HistoryAllGetResponses200 historyAllGetResponses200) { + Utils.checkNotNull(historyAllGetResponses200, "historyAllGetResponses200"); + this.historyAllGetResponses200 = Optional.ofNullable(historyAllGetResponses200); + return this; + } + + + /** + * OK + */ + public GetHistoryItemResponse withHistoryAllGetResponses200(Optional historyAllGetResponses200) { + Utils.checkNotNull(historyAllGetResponses200, "historyAllGetResponses200"); + this.historyAllGetResponses200 = historyAllGetResponses200; + return this; + } + + public GetHistoryItemResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetHistoryItemResponse other = (GetHistoryItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.historyAllGetResponses200, other.historyAllGetResponses200) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + historyAllGetResponses200, headers); + } + + @Override + public String toString() { + return Utils.toString(GetHistoryItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "historyAllGetResponses200", historyAllGetResponses200, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional historyAllGetResponses200 = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder historyAllGetResponses200(HistoryAllGetResponses200 historyAllGetResponses200) { + Utils.checkNotNull(historyAllGetResponses200, "historyAllGetResponses200"); + this.historyAllGetResponses200 = Optional.ofNullable(historyAllGetResponses200); + return this; + } + + /** + * OK + */ + public Builder historyAllGetResponses200(Optional historyAllGetResponses200) { + Utils.checkNotNull(historyAllGetResponses200, "historyAllGetResponses200"); + this.historyAllGetResponses200 = historyAllGetResponses200; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetHistoryItemResponse build() { + + return new GetHistoryItemResponse( + contentType, statusCode, rawResponse, + historyAllGetResponses200, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetHomeDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetHomeDataRequestBuilder.java deleted file mode 100644 index 7f37f495..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetHomeDataRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetHomeData; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetHomeDataRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetHomeDataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetHomeData.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetHomeDataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetHomeDataResponse.java deleted file mode 100644 index 353ff02f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetHomeDataResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetHomeDataResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetHomeDataResponse implements AsyncResponse { - /** - * 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; - - /** - * Home Data - */ - private Optional object; - - @JsonCreator - public GetHomeDataResponse( - 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 GetHomeDataResponse( - 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; - } - - /** - * Home Data - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetHomeDataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetHomeDataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetHomeDataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Home Data - */ - public GetHomeDataResponse withObject(GetHomeDataResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Home Data - */ - public GetHomeDataResponse 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; - } - GetHomeDataResponse other = (GetHomeDataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetHomeDataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Home Data - */ - public Builder object(GetHomeDataResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Home Data - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetHomeDataResponse build() { - - return new GetHomeDataResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetHubItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetHubItemsRequestBuilder.java new file mode 100644 index 00000000..91ff6262 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetHubItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetHubItemsRequest; +import dev.plexapi.sdk.operations.GetHubItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetHubItemsRequestBuilder { + + private GetHubItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetHubItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetHubItemsRequestBuilder request(GetHubItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetHubItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetHubItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetHubItemsResponse.java new file mode 100644 index 00000000..81602b0d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetHubItemsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetHubItemsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetHubItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetHubItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetHubItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetHubItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetHubItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetHubItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetHubItemsResponse withObject(GetHubItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetHubItemsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetHubItemsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetHubItemsResponse other = (GetHubItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetHubItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetHubItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetHubItemsResponse build() { + + return new GetHubItemsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetIdentityRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetIdentityRequestBuilder.java new file mode 100644 index 00000000..eee1d899 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetIdentityRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetIdentity; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetIdentityRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetIdentityRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new GetIdentity.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetIdentityResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetIdentityResponse.java new file mode 100644 index 00000000..1d67dc43 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetIdentityResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetIdentityResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetIdentityResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetIdentityResponse( + 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 GetIdentityResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetIdentityResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetIdentityResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetIdentityResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetIdentityResponse withObject(GetIdentityResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetIdentityResponse 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; + } + GetIdentityResponse other = (GetIdentityResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetIdentityResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetIdentityResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetIdentityResponse build() { + + return new GetIdentityResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageFromBifRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageFromBifRequestBuilder.java new file mode 100644 index 00000000..b06004f2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageFromBifRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetImageFromBifRequest; +import dev.plexapi.sdk.operations.GetImageFromBif; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetImageFromBifRequestBuilder { + + private GetImageFromBifRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetImageFromBifRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetImageFromBifRequestBuilder request(GetImageFromBifRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetImageFromBif.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageFromBifResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageFromBifResponse.java new file mode 100644 index 00000000..0982422c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageFromBifResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetImageFromBifResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetImageFromBifResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetImageFromBifResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetImageFromBifResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetImageFromBifResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetImageFromBifResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetImageFromBifResponse withResponseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetImageFromBifResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetImageFromBifResponse other = (GetImageFromBifResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetImageFromBifResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetImageFromBifResponse build() { + + return new GetImageFromBifResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageRequestBuilder.java new file mode 100644 index 00000000..393f159d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetImageRequest; +import dev.plexapi.sdk.operations.GetImage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetImageRequestBuilder { + + private GetImageRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetImageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetImageRequestBuilder request(GetImageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetImage.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageResponse.java new file mode 100644 index 00000000..df2f7c4d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetImageResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetImageResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetImageResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetImageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetImageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetImageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetImageResponse withResponseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetImageResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetImageResponse other = (GetImageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetImageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetImageResponse build() { + + return new GetImageResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemArtworkRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemArtworkRequestBuilder.java new file mode 100644 index 00000000..e999364d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemArtworkRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetItemArtworkRequest; +import dev.plexapi.sdk.operations.GetItemArtwork; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetItemArtworkRequestBuilder { + + private GetItemArtworkRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetItemArtworkRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetItemArtworkRequestBuilder request(GetItemArtworkRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetItemArtwork.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemArtworkResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemArtworkResponse.java new file mode 100644 index 00000000..313b83b1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemArtworkResponse.java @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetItemArtworkResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional twoHundredAudioMpeg3ResponseStream; + + /** + * OK + */ + private Optional twoHundredImageJpegResponseStream; + + @JsonCreator + public GetItemArtworkResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredAudioMpeg3ResponseStream, + Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + } + + public GetItemArtworkResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredAudioMpeg3ResponseStream() { + return (Optional) twoHundredAudioMpeg3ResponseStream; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredImageJpegResponseStream() { + return (Optional) twoHundredImageJpegResponseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetItemArtworkResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetItemArtworkResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetItemArtworkResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetItemArtworkResponse withTwoHundredAudioMpeg3ResponseStream(Blob twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = Optional.ofNullable(twoHundredAudioMpeg3ResponseStream); + return this; + } + + + /** + * OK + */ + public GetItemArtworkResponse withTwoHundredAudioMpeg3ResponseStream(Optional twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + return this; + } + + /** + * OK + */ + public GetItemArtworkResponse withTwoHundredImageJpegResponseStream(Blob twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + + /** + * OK + */ + public GetItemArtworkResponse withTwoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetItemArtworkResponse other = (GetItemArtworkResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.twoHundredAudioMpeg3ResponseStream, other.twoHundredAudioMpeg3ResponseStream) && + Utils.enhancedDeepEquals(this.twoHundredImageJpegResponseStream, other.twoHundredImageJpegResponseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + twoHundredAudioMpeg3ResponseStream, twoHundredImageJpegResponseStream); + } + + @Override + public String toString() { + return Utils.toString(GetItemArtworkResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredAudioMpeg3ResponseStream", twoHundredAudioMpeg3ResponseStream, + "twoHundredImageJpegResponseStream", twoHundredImageJpegResponseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredAudioMpeg3ResponseStream = Optional.empty(); + + private Optional twoHundredImageJpegResponseStream = 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; + } + + + /** + * OK + */ + public Builder twoHundredAudioMpeg3ResponseStream(Blob twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = Optional.ofNullable(twoHundredAudioMpeg3ResponseStream); + return this; + } + + /** + * OK + */ + public Builder twoHundredAudioMpeg3ResponseStream(Optional twoHundredAudioMpeg3ResponseStream) { + Utils.checkNotNull(twoHundredAudioMpeg3ResponseStream, "twoHundredAudioMpeg3ResponseStream"); + this.twoHundredAudioMpeg3ResponseStream = twoHundredAudioMpeg3ResponseStream; + return this; + } + + + /** + * OK + */ + public Builder twoHundredImageJpegResponseStream(Blob twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + /** + * OK + */ + public Builder twoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + public GetItemArtworkResponse build() { + + return new GetItemArtworkResponse( + contentType, statusCode, rawResponse, + twoHundredAudioMpeg3ResponseStream, twoHundredImageJpegResponseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemDecisionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemDecisionRequestBuilder.java new file mode 100644 index 00000000..040c36d0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemDecisionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetItemDecisionRequest; +import dev.plexapi.sdk.operations.GetItemDecision; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetItemDecisionRequestBuilder { + + private GetItemDecisionRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetItemDecisionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetItemDecisionRequestBuilder request(GetItemDecisionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetItemDecision.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemDecisionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemDecisionResponse.java new file mode 100644 index 00000000..da4591e8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemDecisionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDecision; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetItemDecisionResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithDecision; + + @JsonCreator + public GetItemDecisionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDecision) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDecision = mediaContainerWithDecision; + } + + public GetItemDecisionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDecision() { + return (Optional) mediaContainerWithDecision; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetItemDecisionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetItemDecisionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetItemDecisionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetItemDecisionResponse withMediaContainerWithDecision(MediaContainerWithDecision mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = Optional.ofNullable(mediaContainerWithDecision); + return this; + } + + + /** + * OK + */ + public GetItemDecisionResponse withMediaContainerWithDecision(Optional mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = mediaContainerWithDecision; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetItemDecisionResponse other = (GetItemDecisionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDecision, other.mediaContainerWithDecision); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDecision); + } + + @Override + public String toString() { + return Utils.toString(GetItemDecisionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDecision", mediaContainerWithDecision); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDecision = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDecision(MediaContainerWithDecision mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = Optional.ofNullable(mediaContainerWithDecision); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDecision(Optional mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = mediaContainerWithDecision; + return this; + } + + public GetItemDecisionResponse build() { + + return new GetItemDecisionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDecision); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemTreeRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemTreeRequestBuilder.java new file mode 100644 index 00000000..901bafd7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemTreeRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetItemTreeRequest; +import dev.plexapi.sdk.operations.GetItemTree; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetItemTreeRequestBuilder { + + private GetItemTreeRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetItemTreeRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetItemTreeRequestBuilder request(GetItemTreeRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetItemTree.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemTreeResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemTreeResponse.java new file mode 100644 index 00000000..86c313b0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetItemTreeResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithNestedMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetItemTreeResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithNestedMetadata; + + @JsonCreator + public GetItemTreeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithNestedMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithNestedMetadata, "mediaContainerWithNestedMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithNestedMetadata = mediaContainerWithNestedMetadata; + } + + public GetItemTreeResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithNestedMetadata() { + return (Optional) mediaContainerWithNestedMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetItemTreeResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetItemTreeResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetItemTreeResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetItemTreeResponse withMediaContainerWithNestedMetadata(MediaContainerWithNestedMetadata mediaContainerWithNestedMetadata) { + Utils.checkNotNull(mediaContainerWithNestedMetadata, "mediaContainerWithNestedMetadata"); + this.mediaContainerWithNestedMetadata = Optional.ofNullable(mediaContainerWithNestedMetadata); + return this; + } + + + /** + * OK + */ + public GetItemTreeResponse withMediaContainerWithNestedMetadata(Optional mediaContainerWithNestedMetadata) { + Utils.checkNotNull(mediaContainerWithNestedMetadata, "mediaContainerWithNestedMetadata"); + this.mediaContainerWithNestedMetadata = mediaContainerWithNestedMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetItemTreeResponse other = (GetItemTreeResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithNestedMetadata, other.mediaContainerWithNestedMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithNestedMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetItemTreeResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithNestedMetadata", mediaContainerWithNestedMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithNestedMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithNestedMetadata(MediaContainerWithNestedMetadata mediaContainerWithNestedMetadata) { + Utils.checkNotNull(mediaContainerWithNestedMetadata, "mediaContainerWithNestedMetadata"); + this.mediaContainerWithNestedMetadata = Optional.ofNullable(mediaContainerWithNestedMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithNestedMetadata(Optional mediaContainerWithNestedMetadata) { + Utils.checkNotNull(mediaContainerWithNestedMetadata, "mediaContainerWithNestedMetadata"); + this.mediaContainerWithNestedMetadata = mediaContainerWithNestedMetadata; + return this; + } + + public GetItemTreeResponse build() { + + return new GetItemTreeResponse( + contentType, statusCode, rawResponse, + mediaContainerWithNestedMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryDetailsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryDetailsRequestBuilder.java index 43424913..608d8ebd 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryDetailsRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryDetailsRequestBuilder.java @@ -5,74 +5,34 @@ package dev.plexapi.sdk.models.operations.async; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.models.operations.GetLibraryDetailsRequest; -import dev.plexapi.sdk.models.operations.IncludeDetails; import dev.plexapi.sdk.operations.GetLibraryDetails; -import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Exception; -import java.lang.Integer; -import java.util.Optional; import java.util.concurrent.CompletableFuture; public class GetLibraryDetailsRequestBuilder { - private Optional includeDetails = Utils.readDefaultOrConstValue( - "includeDetails", - "0", - new TypeReference>() {}); - private Integer sectionKey; + private GetLibraryDetailsRequest request; private final SDKConfiguration sdkConfiguration; public GetLibraryDetailsRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - - public GetLibraryDetailsRequestBuilder includeDetails(IncludeDetails includeDetails) { - Utils.checkNotNull(includeDetails, "includeDetails"); - this.includeDetails = Optional.of(includeDetails); + + public GetLibraryDetailsRequestBuilder request(GetLibraryDetailsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - public GetLibraryDetailsRequestBuilder includeDetails(Optional includeDetails) { - Utils.checkNotNull(includeDetails, "includeDetails"); - this.includeDetails = includeDetails; - return this; - } - - public GetLibraryDetailsRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - private GetLibraryDetailsRequest buildRequest() { - if (includeDetails == null) { - includeDetails = _SINGLETON_VALUE_IncludeDetails.value(); - } - - GetLibraryDetailsRequest request = new GetLibraryDetailsRequest(includeDetails, - sectionKey); - - return request; - } - public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new GetLibraryDetails.Async(sdkConfiguration); - GetLibraryDetailsRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); } - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeDetails = - new LazySingletonValue<>( - "includeDetails", - "0", - new TypeReference>() {}); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryDetailsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryDetailsResponse.java index a86fc83a..c3167492 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryDetailsResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryDetailsResponse.java @@ -34,7 +34,7 @@ public class GetLibraryDetailsResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * The details of the library + * OK */ private Optional object; @@ -87,7 +87,7 @@ public class GetLibraryDetailsResponse implements AsyncResponse { } /** - * The details of the library + * OK */ @SuppressWarnings("unchecked") @JsonIgnore @@ -128,7 +128,7 @@ public class GetLibraryDetailsResponse implements AsyncResponse { } /** - * The details of the library + * OK */ public GetLibraryDetailsResponse withObject(GetLibraryDetailsResponseBody object) { Utils.checkNotNull(object, "object"); @@ -138,7 +138,7 @@ public class GetLibraryDetailsResponse implements AsyncResponse { /** - * The details of the library + * OK */ public GetLibraryDetailsResponse withObject(Optional object) { Utils.checkNotNull(object, "object"); @@ -225,7 +225,7 @@ public class GetLibraryDetailsResponse implements AsyncResponse { /** - * The details of the library + * OK */ public Builder object(GetLibraryDetailsResponseBody object) { Utils.checkNotNull(object, "object"); @@ -234,7 +234,7 @@ public class GetLibraryDetailsResponse implements AsyncResponse { } /** - * The details of the library + * OK */ public Builder object(Optional object) { Utils.checkNotNull(object, "object"); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryHubsRequestBuilder.java deleted file mode 100644 index cf140724..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryHubsRequestBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetLibraryHubsRequest; -import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient; -import dev.plexapi.sdk.operations.GetLibraryHubs; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetLibraryHubsRequestBuilder { - - private Double sectionId; - private Optional count = Optional.empty(); - private Optional onlyTransient = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetLibraryHubsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetLibraryHubsRequestBuilder sectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - public GetLibraryHubsRequestBuilder count(double count) { - Utils.checkNotNull(count, "count"); - this.count = Optional.of(count); - return this; - } - - public GetLibraryHubsRequestBuilder count(Optional count) { - Utils.checkNotNull(count, "count"); - this.count = count; - return this; - } - - public GetLibraryHubsRequestBuilder onlyTransient(QueryParamOnlyTransient onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = Optional.of(onlyTransient); - return this; - } - - public GetLibraryHubsRequestBuilder onlyTransient(Optional onlyTransient) { - Utils.checkNotNull(onlyTransient, "onlyTransient"); - this.onlyTransient = onlyTransient; - return this; - } - - - private GetLibraryHubsRequest buildRequest() { - - GetLibraryHubsRequest request = new GetLibraryHubsRequest(sectionId, - count, - onlyTransient); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetLibraryHubs.Async(sdkConfiguration); - GetLibraryHubsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryHubsResponse.java deleted file mode 100644 index 87c03dd9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryHubsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetLibraryHubsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetLibraryHubsResponse implements AsyncResponse { - /** - * 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 hubs specific to the library - */ - private Optional object; - - @JsonCreator - public GetLibraryHubsResponse( - 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 GetLibraryHubsResponse( - 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 hubs specific to the library - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetLibraryHubsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetLibraryHubsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibraryHubsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The hubs specific to the library - */ - public GetLibraryHubsResponse withObject(GetLibraryHubsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The hubs specific to the library - */ - public GetLibraryHubsResponse 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; - } - GetLibraryHubsResponse other = (GetLibraryHubsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryHubsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 hubs specific to the library - */ - public Builder object(GetLibraryHubsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The hubs specific to the library - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetLibraryHubsResponse build() { - - return new GetLibraryHubsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryItemsResponse.java index f8ae6609..d0ebc08d 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryItemsResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryItemsResponse.java @@ -5,7 +5,7 @@ package dev.plexapi.sdk.models.operations.async; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetLibraryItemsResponseBody; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; import dev.plexapi.sdk.utils.AsyncResponse; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Utils; @@ -14,6 +14,8 @@ import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; import java.util.Optional; @@ -34,32 +36,40 @@ public class GetLibraryItemsResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * The contents of the library by section and tag + * OK */ - private Optional object; + private Optional mediaContainerWithMetadata; + + + private Map> headers; @JsonCreator public GetLibraryItemsResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional object) { + Optional mediaContainerWithMetadata, + Map> headers) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.object = object; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; } public GetLibraryItemsResponse( String contentType, int statusCode, - HttpResponse rawResponse) { + HttpResponse rawResponse, + Map> headers) { this(contentType, statusCode, rawResponse, - Optional.empty()); + Optional.empty(), headers); } /** @@ -87,12 +97,17 @@ public class GetLibraryItemsResponse implements AsyncResponse { } /** - * The contents of the library by section and tag + * OK */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional object() { - return (Optional) object; + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; } public static Builder builder() { @@ -128,21 +143,27 @@ public class GetLibraryItemsResponse implements AsyncResponse { } /** - * The contents of the library by section and tag + * OK */ - public GetLibraryItemsResponse withObject(GetLibraryItemsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public GetLibraryItemsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); return this; } /** - * The contents of the library by section and tag + * OK */ - public GetLibraryItemsResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public GetLibraryItemsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetLibraryItemsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; return this; } @@ -159,14 +180,15 @@ public class GetLibraryItemsResponse implements AsyncResponse { Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); } @Override public int hashCode() { return Utils.enhancedHash( contentType, statusCode, rawResponse, - object); + mediaContainerWithMetadata, headers); } @Override @@ -175,7 +197,8 @@ public class GetLibraryItemsResponse implements AsyncResponse { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "object", object); + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); } @SuppressWarnings("UnusedReturnValue") @@ -187,7 +210,9 @@ public class GetLibraryItemsResponse implements AsyncResponse { private HttpResponse rawResponse; - private Optional object = Optional.empty(); + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; private Builder() { // force use of static builder() method @@ -225,20 +250,27 @@ public class GetLibraryItemsResponse implements AsyncResponse { /** - * The contents of the library by section and tag + * OK */ - public Builder object(GetLibraryItemsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); return this; } /** - * The contents of the library by section and tag + * OK */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; return this; } @@ -246,7 +278,7 @@ public class GetLibraryItemsResponse implements AsyncResponse { return new GetLibraryItemsResponse( contentType, statusCode, rawResponse, - object); + mediaContainerWithMetadata, headers); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryMatchesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryMatchesRequestBuilder.java new file mode 100644 index 00000000..f437b2d8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryMatchesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetLibraryMatchesRequest; +import dev.plexapi.sdk.operations.GetLibraryMatches; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetLibraryMatchesRequestBuilder { + + private GetLibraryMatchesRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetLibraryMatchesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetLibraryMatchesRequestBuilder request(GetLibraryMatchesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetLibraryMatches.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryMatchesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryMatchesResponse.java new file mode 100644 index 00000000..6b143be1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibraryMatchesResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetLibraryMatchesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetLibraryMatchesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetLibraryMatchesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetLibraryMatchesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLibraryMatchesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLibraryMatchesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetLibraryMatchesResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetLibraryMatchesResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetLibraryMatchesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryMatchesResponse other = (GetLibraryMatchesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryMatchesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetLibraryMatchesResponse build() { + + return new GetLibraryMatchesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibrarySectionsAllRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibrarySectionsAllRequestBuilder.java deleted file mode 100644 index c0e46bb4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibrarySectionsAllRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetLibrarySectionsAllRequest; -import dev.plexapi.sdk.operations.GetLibrarySectionsAll; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetLibrarySectionsAllRequestBuilder { - - private GetLibrarySectionsAllRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetLibrarySectionsAllRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetLibrarySectionsAllRequestBuilder request(GetLibrarySectionsAllRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetLibrarySectionsAll.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibrarySectionsAllResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibrarySectionsAllResponse.java deleted file mode 100644 index f7d84754..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLibrarySectionsAllResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetLibrarySectionsAllResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetLibrarySectionsAllResponse implements AsyncResponse { - /** - * 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; - - /** - * Successful response containing media container data. - */ - private Optional object; - - @JsonCreator - public GetLibrarySectionsAllResponse( - 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 GetLibrarySectionsAllResponse( - 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; - } - - /** - * Successful response containing media container data. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetLibrarySectionsAllResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetLibrarySectionsAllResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetLibrarySectionsAllResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response containing media container data. - */ - public GetLibrarySectionsAllResponse withObject(GetLibrarySectionsAllResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Successful response containing media container data. - */ - public GetLibrarySectionsAllResponse 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; - } - GetLibrarySectionsAllResponse other = (GetLibrarySectionsAllResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetLibrarySectionsAllResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Successful response containing media container data. - */ - public Builder object(GetLibrarySectionsAllResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Successful response containing media container data. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetLibrarySectionsAllResponse build() { - - return new GetLibrarySectionsAllResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupChannelsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupChannelsRequestBuilder.java new file mode 100644 index 00000000..7656082c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupChannelsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetLineupChannelsRequest; +import dev.plexapi.sdk.operations.GetLineupChannels; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetLineupChannelsRequestBuilder { + + private GetLineupChannelsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetLineupChannelsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetLineupChannelsRequestBuilder request(GetLineupChannelsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetLineupChannels.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupChannelsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupChannelsResponse.java new file mode 100644 index 00000000..55e9be90 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupChannelsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetLineupChannelsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetLineupChannelsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetLineupChannelsResponse( + 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 GetLineupChannelsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetLineupChannelsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLineupChannelsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLineupChannelsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetLineupChannelsResponse withObject(GetLineupChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetLineupChannelsResponse 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; + } + GetLineupChannelsResponse other = (GetLineupChannelsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetLineupChannelsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetLineupChannelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetLineupChannelsResponse build() { + + return new GetLineupChannelsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupRequestBuilder.java new file mode 100644 index 00000000..abcde185 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetLineupRequest; +import dev.plexapi.sdk.operations.GetLineup; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetLineupRequestBuilder { + + private GetLineupRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetLineupRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetLineupRequestBuilder request(GetLineupRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetLineup.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupResponse.java new file mode 100644 index 00000000..08a531ea --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLineupResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; + + +public class GetLineupResponse implements AsyncResponse { + /** + * 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; + + + private Map> headers; + + @JsonCreator + public GetLineupResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.headers = headers; + } + + /** + * 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; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetLineupResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLineupResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLineupResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetLineupResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLineupResponse other = (GetLineupResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(GetLineupResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetLineupResponse build() { + + return new GetLineupResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLiveTVSessionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLiveTVSessionRequestBuilder.java new file mode 100644 index 00000000..b1acccbe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLiveTVSessionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetLiveTVSessionRequest; +import dev.plexapi.sdk.operations.GetLiveTVSession; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetLiveTVSessionRequestBuilder { + + private GetLiveTVSessionRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetLiveTVSessionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetLiveTVSessionRequestBuilder request(GetLiveTVSessionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetLiveTVSession.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetLiveTVSessionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLiveTVSessionResponse.java new file mode 100644 index 00000000..2a183e08 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetLiveTVSessionResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetLiveTVSessionResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetLiveTVSessionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetLiveTVSessionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetLiveTVSessionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLiveTVSessionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLiveTVSessionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetLiveTVSessionResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetLiveTVSessionResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetLiveTVSessionResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLiveTVSessionResponse other = (GetLiveTVSessionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetLiveTVSessionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetLiveTVSessionResponse build() { + + return new GetLiveTVSessionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaArtsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaArtsRequestBuilder.java deleted file mode 100644 index 07e5e1fd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaArtsRequestBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetMediaArtsRequest; -import dev.plexapi.sdk.operations.GetMediaArts; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.util.concurrent.CompletableFuture; - -public class GetMediaArtsRequestBuilder { - - private Long ratingKey; - private final SDKConfiguration sdkConfiguration; - - public GetMediaArtsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMediaArtsRequestBuilder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - private GetMediaArtsRequest buildRequest() { - - GetMediaArtsRequest request = new GetMediaArtsRequest(ratingKey); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetMediaArts.Async(sdkConfiguration); - GetMediaArtsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaArtsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaArtsResponse.java deleted file mode 100644 index 147542ea..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaArtsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetMediaArtsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetMediaArtsResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - /** - * The available background artwork for the library item. - */ - private Optional object; - - @JsonCreator - public GetMediaArtsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional object) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.object = object; - } - - public GetMediaArtsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, - Optional.empty()); - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - /** - * The available background artwork for the library item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMediaArtsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMediaArtsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaArtsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The available background artwork for the library item. - */ - public GetMediaArtsResponse withObject(GetMediaArtsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The available background artwork for the library item. - */ - public GetMediaArtsResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaArtsResponse other = (GetMediaArtsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMediaArtsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional object = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - - /** - * The available background artwork for the library item. - */ - public Builder object(GetMediaArtsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The available background artwork for the library item. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMediaArtsResponse build() { - - return new GetMediaArtsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaMetaDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaMetaDataRequestBuilder.java deleted file mode 100644 index 9c954b60..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaMetaDataRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequest; -import dev.plexapi.sdk.operations.GetMediaMetaData; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetMediaMetaDataRequestBuilder { - - private GetMediaMetaDataRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetMediaMetaDataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMediaMetaDataRequestBuilder request(GetMediaMetaDataRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetMediaMetaData.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaMetaDataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaMetaDataResponse.java deleted file mode 100644 index 7110be59..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaMetaDataResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetMediaMetaDataResponse implements AsyncResponse { - /** - * 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 metadata of the library item. - */ - private Optional object; - - @JsonCreator - public GetMediaMetaDataResponse( - 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 GetMediaMetaDataResponse( - 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 metadata of the library item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMediaMetaDataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMediaMetaDataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaMetaDataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The metadata of the library item. - */ - public GetMediaMetaDataResponse withObject(GetMediaMetaDataResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The metadata of the library item. - */ - public GetMediaMetaDataResponse 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; - } - GetMediaMetaDataResponse other = (GetMediaMetaDataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMediaMetaDataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 metadata of the library item. - */ - public Builder object(GetMediaMetaDataResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The metadata of the library item. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMediaMetaDataResponse build() { - - return new GetMediaMetaDataResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPartRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPartRequestBuilder.java new file mode 100644 index 00000000..15644bf1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPartRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetMediaPartRequest; +import dev.plexapi.sdk.operations.GetMediaPart; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetMediaPartRequestBuilder { + + private GetMediaPartRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetMediaPartRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetMediaPartRequestBuilder request(GetMediaPartRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetMediaPart.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPartResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPartResponse.java new file mode 100644 index 00000000..d56d8124 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPartResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; + + +public class GetMediaPartResponse implements AsyncResponse { + /** + * 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; + + + private Map> headers; + + @JsonCreator + public GetMediaPartResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.headers = headers; + } + + /** + * 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; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetMediaPartResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMediaPartResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMediaPartResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetMediaPartResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMediaPartResponse other = (GetMediaPartResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(GetMediaPartResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetMediaPartResponse build() { + + return new GetMediaPartResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPostersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPostersRequestBuilder.java deleted file mode 100644 index d1b9fb28..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPostersRequestBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetMediaPostersRequest; -import dev.plexapi.sdk.operations.GetMediaPosters; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.util.concurrent.CompletableFuture; - -public class GetMediaPostersRequestBuilder { - - private Long ratingKey; - private final SDKConfiguration sdkConfiguration; - - public GetMediaPostersRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMediaPostersRequestBuilder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - - private GetMediaPostersRequest buildRequest() { - - GetMediaPostersRequest request = new GetMediaPostersRequest(ratingKey); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetMediaPosters.Async(sdkConfiguration); - GetMediaPostersRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPostersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPostersResponse.java deleted file mode 100644 index eb40df52..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaPostersResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetMediaPostersResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetMediaPostersResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - /** - * The available posters for the library item. - */ - private Optional object; - - @JsonCreator - public GetMediaPostersResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional object) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.object = object; - } - - public GetMediaPostersResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, - Optional.empty()); - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - /** - * The available posters for the library item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMediaPostersResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMediaPostersResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaPostersResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The available posters for the library item. - */ - public GetMediaPostersResponse withObject(GetMediaPostersResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The available posters for the library item. - */ - public GetMediaPostersResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetMediaPostersResponse other = (GetMediaPostersResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMediaPostersResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional object = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - - /** - * The available posters for the library item. - */ - public Builder object(GetMediaPostersResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The available posters for the library item. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMediaPostersResponse build() { - - return new GetMediaPostersResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaProvidersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaProvidersRequestBuilder.java deleted file mode 100644 index 805f5c56..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaProvidersRequestBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetMediaProvidersRequest; -import dev.plexapi.sdk.operations.GetMediaProviders; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.concurrent.CompletableFuture; - -public class GetMediaProvidersRequestBuilder { - - private String xPlexToken; - private final SDKConfiguration sdkConfiguration; - - public GetMediaProvidersRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMediaProvidersRequestBuilder xPlexToken(String xPlexToken) { - Utils.checkNotNull(xPlexToken, "xPlexToken"); - this.xPlexToken = xPlexToken; - return this; - } - - - private GetMediaProvidersRequest buildRequest() { - - GetMediaProvidersRequest request = new GetMediaProvidersRequest(xPlexToken); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetMediaProviders.Async(sdkConfiguration); - GetMediaProvidersRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaProvidersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaProvidersResponse.java deleted file mode 100644 index f1c35624..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMediaProvidersResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetMediaProvidersResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetMediaProvidersResponse implements AsyncResponse { - /** - * 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; - - /** - * Media providers and their features - */ - private Optional object; - - @JsonCreator - public GetMediaProvidersResponse( - 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 GetMediaProvidersResponse( - 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; - } - - /** - * Media providers and their features - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMediaProvidersResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMediaProvidersResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMediaProvidersResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Media providers and their features - */ - public GetMediaProvidersResponse withObject(GetMediaProvidersResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Media providers and their features - */ - public GetMediaProvidersResponse 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; - } - GetMediaProvidersResponse other = (GetMediaProvidersResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMediaProvidersResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Media providers and their features - */ - public Builder object(GetMediaProvidersResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Media providers and their features - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMediaProvidersResponse build() { - - return new GetMediaProvidersResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataChildrenRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataChildrenRequestBuilder.java deleted file mode 100644 index aad86594..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataChildrenRequestBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequest; -import dev.plexapi.sdk.operations.GetMetadataChildren; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetMetadataChildrenRequestBuilder { - - private Double ratingKey; - private Optional includeElements = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetMetadataChildrenRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetMetadataChildrenRequestBuilder ratingKey(double ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public GetMetadataChildrenRequestBuilder includeElements(String includeElements) { - Utils.checkNotNull(includeElements, "includeElements"); - this.includeElements = Optional.of(includeElements); - return this; - } - - public GetMetadataChildrenRequestBuilder includeElements(Optional includeElements) { - Utils.checkNotNull(includeElements, "includeElements"); - this.includeElements = includeElements; - return this; - } - - - private GetMetadataChildrenRequest buildRequest() { - - GetMetadataChildrenRequest request = new GetMetadataChildrenRequest(ratingKey, - includeElements); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetMetadataChildren.Async(sdkConfiguration); - GetMetadataChildrenRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataChildrenResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataChildrenResponse.java deleted file mode 100644 index 2ba5650b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataChildrenResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetMetadataChildrenResponse implements AsyncResponse { - /** - * 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 children of the library item. - */ - private Optional object; - - @JsonCreator - public GetMetadataChildrenResponse( - 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 GetMetadataChildrenResponse( - 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 children of the library item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMetadataChildrenResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMetadataChildrenResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMetadataChildrenResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The children of the library item. - */ - public GetMetadataChildrenResponse withObject(GetMetadataChildrenResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The children of the library item. - */ - public GetMetadataChildrenResponse 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; - } - GetMetadataChildrenResponse other = (GetMetadataChildrenResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMetadataChildrenResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 children of the library item. - */ - public Builder object(GetMetadataChildrenResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The children of the library item. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMetadataChildrenResponse build() { - - return new GetMetadataChildrenResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataHubsRequestBuilder.java new file mode 100644 index 00000000..b0316437 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataHubsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetMetadataHubsRequest; +import dev.plexapi.sdk.operations.GetMetadataHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetMetadataHubsRequestBuilder { + + private GetMetadataHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetMetadataHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetMetadataHubsRequestBuilder request(GetMetadataHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetMetadataHubs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataHubsResponse.java new file mode 100644 index 00000000..19b10b87 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataHubsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithHubs; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetMetadataHubsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithHubs; + + + private Map> headers; + + @JsonCreator + public GetMetadataHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithHubs, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithHubs = mediaContainerWithHubs; + this.headers = headers; + } + + public GetMetadataHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithHubs() { + return (Optional) mediaContainerWithHubs; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetMetadataHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMetadataHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMetadataHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetMetadataHubsResponse withMediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + + /** + * OK + */ + public GetMetadataHubsResponse withMediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + public GetMetadataHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataHubsResponse other = (GetMetadataHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithHubs, other.mediaContainerWithHubs) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithHubs", mediaContainerWithHubs, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithHubs = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetMetadataHubsResponse build() { + + return new GetMetadataHubsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataItemRequestBuilder.java new file mode 100644 index 00000000..96e3e658 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetMetadataItemRequest; +import dev.plexapi.sdk.operations.GetMetadataItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetMetadataItemRequestBuilder { + + private GetMetadataItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetMetadataItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetMetadataItemRequestBuilder request(GetMetadataItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetMetadataItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataItemResponse.java new file mode 100644 index 00000000..ef36797d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMetadataItemResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetMetadataItemResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetMetadataItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetMetadataItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetMetadataItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetMetadataItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetMetadataItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetMetadataItemResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetMetadataItemResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetMetadataItemResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetadataItemResponse other = (GetMetadataItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetMetadataItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetMetadataItemResponse build() { + + return new GetMetadataItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMyPlexAccountRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMyPlexAccountRequestBuilder.java deleted file mode 100644 index 558f4fa5..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMyPlexAccountRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetMyPlexAccount; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetMyPlexAccountRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetMyPlexAccountRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetMyPlexAccount.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMyPlexAccountResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetMyPlexAccountResponse.java deleted file mode 100644 index f40992b9..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetMyPlexAccountResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetMyPlexAccountResponse implements AsyncResponse { - /** - * 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; - - /** - * MyPlex Account - */ - private Optional object; - - @JsonCreator - public GetMyPlexAccountResponse( - 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 GetMyPlexAccountResponse( - 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; - } - - /** - * MyPlex Account - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetMyPlexAccountResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetMyPlexAccountResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetMyPlexAccountResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * MyPlex Account - */ - public GetMyPlexAccountResponse withObject(GetMyPlexAccountResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * MyPlex Account - */ - public GetMyPlexAccountResponse 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; - } - GetMyPlexAccountResponse other = (GetMyPlexAccountResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetMyPlexAccountResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * MyPlex Account - */ - public Builder object(GetMyPlexAccountResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * MyPlex Account - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetMyPlexAccountResponse build() { - - return new GetMyPlexAccountResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetNotificationsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetNotificationsRequestBuilder.java new file mode 100644 index 00000000..31d8c95f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetNotificationsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetNotificationsRequest; +import dev.plexapi.sdk.operations.GetNotifications; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetNotificationsRequestBuilder { + + private GetNotificationsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetNotificationsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetNotificationsRequestBuilder request(GetNotificationsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetNotifications.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetNotificationsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetNotificationsResponse.java new file mode 100644 index 00000000..65aef739 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetNotificationsResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetNotificationsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetNotificationsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetNotificationsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetNotificationsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetNotificationsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetNotificationsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetNotificationsResponse withResponseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetNotificationsResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNotificationsResponse other = (GetNotificationsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetNotificationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetNotificationsResponse build() { + + return new GetNotificationsResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPartIndexRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPartIndexRequestBuilder.java new file mode 100644 index 00000000..6767e91f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPartIndexRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetPartIndexRequest; +import dev.plexapi.sdk.operations.GetPartIndex; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetPartIndexRequestBuilder { + + private GetPartIndexRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPartIndexRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPartIndexRequestBuilder request(GetPartIndexRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetPartIndex.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPartIndexResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPartIndexResponse.java new file mode 100644 index 00000000..a6a5d78e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPartIndexResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetPartIndexResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional responseStream; + + @JsonCreator + public GetPartIndexResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public GetPartIndexResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPartIndexResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPartIndexResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPartIndexResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPartIndexResponse withResponseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * OK + */ + public GetPartIndexResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPartIndexResponse other = (GetPartIndexResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(GetPartIndexResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * OK + */ + public Builder responseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * OK + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public GetPartIndexResponse build() { + + return new GetPartIndexResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPersonRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPersonRequestBuilder.java new file mode 100644 index 00000000..c0d214ab --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPersonRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetPersonRequest; +import dev.plexapi.sdk.operations.GetPerson; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetPersonRequestBuilder { + + private GetPersonRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPersonRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPersonRequestBuilder request(GetPersonRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetPerson.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPersonResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPersonResponse.java new file mode 100644 index 00000000..f1f1b6b1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPersonResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetPersonResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetPersonResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetPersonResponse( + 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 GetPersonResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPersonResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPersonResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPersonResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPersonResponse withObject(GetPersonResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetPersonResponse 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; + } + GetPersonResponse other = (GetPersonResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetPersonResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetPersonResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetPersonResponse build() { + + return new GetPersonResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPinRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPinRequestBuilder.java deleted file mode 100644 index a7cbd095..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPinRequestBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetPinRequest; -import dev.plexapi.sdk.operations.GetPin; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetPinRequestBuilder { - - private GetPinRequest request; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetPinRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetPinRequestBuilder request(GetPinRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetPinRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetPinRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetPin.Async(sdkConfiguration, serverURL); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPinResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPinResponse.java deleted file mode 100644 index e6e6396a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPinResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetPinAuthPinContainer; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetPinResponse implements AsyncResponse { - /** - * 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; - - /** - * Requests a new pin id used in the authentication flow - */ - private Optional authPinContainer; - - @JsonCreator - public GetPinResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional authPinContainer) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.authPinContainer = authPinContainer; - } - - public GetPinResponse( - 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; - } - - /** - * Requests a new pin id used in the authentication flow - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional authPinContainer() { - return (Optional) authPinContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetPinResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetPinResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPinResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Requests a new pin id used in the authentication flow - */ - public GetPinResponse withAuthPinContainer(GetPinAuthPinContainer authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = Optional.ofNullable(authPinContainer); - return this; - } - - - /** - * Requests a new pin id used in the authentication flow - */ - public GetPinResponse withAuthPinContainer(Optional authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = authPinContainer; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetPinResponse other = (GetPinResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.authPinContainer, other.authPinContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - authPinContainer); - } - - @Override - public String toString() { - return Utils.toString(GetPinResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "authPinContainer", authPinContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional authPinContainer = 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; - } - - - /** - * Requests a new pin id used in the authentication flow - */ - public Builder authPinContainer(GetPinAuthPinContainer authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = Optional.ofNullable(authPinContainer); - return this; - } - - /** - * Requests a new pin id used in the authentication flow - */ - public Builder authPinContainer(Optional authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = authPinContainer; - return this; - } - - public GetPinResponse build() { - - return new GetPinResponse( - contentType, statusCode, rawResponse, - authPinContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlayQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlayQueueRequestBuilder.java new file mode 100644 index 00000000..31f5273c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlayQueueRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetPlayQueueRequest; +import dev.plexapi.sdk.operations.GetPlayQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetPlayQueueRequestBuilder { + + private GetPlayQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPlayQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPlayQueueRequestBuilder request(GetPlayQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetPlayQueue.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlayQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlayQueueResponse.java new file mode 100644 index 00000000..ec4a7f53 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlayQueueResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetPlayQueueResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public GetPlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public GetPlayQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPlayQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlayQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlayQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPlayQueueResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public GetPlayQueueResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlayQueueResponse other = (GetPlayQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetPlayQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public GetPlayQueueResponse build() { + + return new GetPlayQueueResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistContentsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistContentsRequestBuilder.java deleted file mode 100644 index dcaab695..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistContentsRequestBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsQueryParamType; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsRequest; -import dev.plexapi.sdk.operations.GetPlaylistContents; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetPlaylistContentsRequestBuilder { - - private Double playlistID; - private GetPlaylistContentsQueryParamType type; - private final SDKConfiguration sdkConfiguration; - - public GetPlaylistContentsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetPlaylistContentsRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; - return this; - } - - public GetPlaylistContentsRequestBuilder type(GetPlaylistContentsQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetPlaylistContentsRequest buildRequest() { - - GetPlaylistContentsRequest request = new GetPlaylistContentsRequest(playlistID, - type); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetPlaylistContents.Async(sdkConfiguration); - GetPlaylistContentsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistContentsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistContentsResponse.java deleted file mode 100644 index 561f6833..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistContentsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetPlaylistContentsResponse implements AsyncResponse { - /** - * 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 playlist contents - */ - private Optional object; - - @JsonCreator - public GetPlaylistContentsResponse( - 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 GetPlaylistContentsResponse( - 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 playlist contents - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetPlaylistContentsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetPlaylistContentsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistContentsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The playlist contents - */ - public GetPlaylistContentsResponse withObject(GetPlaylistContentsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The playlist contents - */ - public GetPlaylistContentsResponse 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; - } - GetPlaylistContentsResponse other = (GetPlaylistContentsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistContentsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 playlist contents - */ - public Builder object(GetPlaylistContentsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The playlist contents - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetPlaylistContentsResponse build() { - - return new GetPlaylistContentsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorItemsRequestBuilder.java new file mode 100644 index 00000000..a7c119f0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsRequest; +import dev.plexapi.sdk.operations.GetPlaylistGeneratorItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetPlaylistGeneratorItemsRequestBuilder { + + private GetPlaylistGeneratorItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPlaylistGeneratorItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPlaylistGeneratorItemsRequestBuilder request(GetPlaylistGeneratorItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetPlaylistGeneratorItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorItemsResponse.java new file mode 100644 index 00000000..ef5d24b6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetPlaylistGeneratorItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetPlaylistGeneratorItemsResponse( + 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 GetPlaylistGeneratorItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPlaylistGeneratorItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistGeneratorItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistGeneratorItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPlaylistGeneratorItemsResponse withObject(GetPlaylistGeneratorItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetPlaylistGeneratorItemsResponse 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; + } + GetPlaylistGeneratorItemsResponse other = (GetPlaylistGeneratorItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetPlaylistGeneratorItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetPlaylistGeneratorItemsResponse build() { + + return new GetPlaylistGeneratorItemsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorRequestBuilder.java new file mode 100644 index 00000000..68e39b54 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorRequest; +import dev.plexapi.sdk.operations.GetPlaylistGenerator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetPlaylistGeneratorRequestBuilder { + + private GetPlaylistGeneratorRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPlaylistGeneratorRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPlaylistGeneratorRequestBuilder request(GetPlaylistGeneratorRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetPlaylistGenerator.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorResponse.java new file mode 100644 index 00000000..2f857cc7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetPlaylistGeneratorResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetPlaylistGeneratorResponse( + 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 GetPlaylistGeneratorResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPlaylistGeneratorResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistGeneratorResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistGeneratorResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPlaylistGeneratorResponse withObject(GetPlaylistGeneratorResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetPlaylistGeneratorResponse 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; + } + GetPlaylistGeneratorResponse other = (GetPlaylistGeneratorResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetPlaylistGeneratorResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetPlaylistGeneratorResponse build() { + + return new GetPlaylistGeneratorResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorsRequestBuilder.java new file mode 100644 index 00000000..08252717 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsRequest; +import dev.plexapi.sdk.operations.GetPlaylistGenerators; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetPlaylistGeneratorsRequestBuilder { + + private GetPlaylistGeneratorsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPlaylistGeneratorsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPlaylistGeneratorsRequestBuilder request(GetPlaylistGeneratorsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetPlaylistGenerators.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorsResponse.java new file mode 100644 index 00000000..db67958f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistGeneratorsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetPlaylistGeneratorsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetPlaylistGeneratorsResponse( + 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 GetPlaylistGeneratorsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPlaylistGeneratorsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistGeneratorsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistGeneratorsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPlaylistGeneratorsResponse withObject(GetPlaylistGeneratorsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetPlaylistGeneratorsResponse 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; + } + GetPlaylistGeneratorsResponse other = (GetPlaylistGeneratorsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistGeneratorsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetPlaylistGeneratorsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetPlaylistGeneratorsResponse build() { + + return new GetPlaylistGeneratorsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistItemsRequestBuilder.java new file mode 100644 index 00000000..6c5089c7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetPlaylistItemsRequest; +import dev.plexapi.sdk.operations.GetPlaylistItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetPlaylistItemsRequestBuilder { + + private GetPlaylistItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPlaylistItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPlaylistItemsRequestBuilder request(GetPlaylistItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetPlaylistItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistItemsResponse.java new file mode 100644 index 00000000..a5e5ece3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistItemsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetPlaylistItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public GetPlaylistItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public GetPlaylistItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPlaylistItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPlaylistItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPlaylistItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPlaylistItemsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetPlaylistItemsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetPlaylistItemsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPlaylistItemsResponse other = (GetPlaylistItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(GetPlaylistItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetPlaylistItemsResponse build() { + + return new GetPlaylistItemsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistRequestBuilder.java index 93737d7e..d027cbf9 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistRequestBuilder.java @@ -9,38 +9,28 @@ import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.models.operations.GetPlaylistRequest; import dev.plexapi.sdk.operations.GetPlaylist; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; import java.lang.Exception; import java.util.concurrent.CompletableFuture; public class GetPlaylistRequestBuilder { - private Double playlistID; + private GetPlaylistRequest request; private final SDKConfiguration sdkConfiguration; public GetPlaylistRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public GetPlaylistRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public GetPlaylistRequestBuilder request(GetPlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private GetPlaylistRequest buildRequest() { - - GetPlaylistRequest request = new GetPlaylistRequest(playlistID); - - return request; - } - public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new GetPlaylist.Async(sdkConfiguration); - GetPlaylistRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistResponse.java index 3fe4db18..7dd4fbb8 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistResponse.java @@ -5,7 +5,7 @@ package dev.plexapi.sdk.models.operations.async; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetPlaylistResponseBody; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; import dev.plexapi.sdk.utils.AsyncResponse; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Utils; @@ -34,24 +34,24 @@ public class GetPlaylistResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * The playlist + * OK */ - private Optional object; + private Optional mediaContainerWithPlaylistMetadata; @JsonCreator public GetPlaylistResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional object) { + Optional mediaContainerWithPlaylistMetadata) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.object = object; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; } public GetPlaylistResponse( @@ -87,12 +87,12 @@ public class GetPlaylistResponse implements AsyncResponse { } /** - * The playlist + * OK */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional object() { - return (Optional) object; + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; } public static Builder builder() { @@ -128,21 +128,21 @@ public class GetPlaylistResponse implements AsyncResponse { } /** - * The playlist + * OK */ - public GetPlaylistResponse withObject(GetPlaylistResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public GetPlaylistResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); return this; } /** - * The playlist + * OK */ - public GetPlaylistResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public GetPlaylistResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; return this; } @@ -159,14 +159,14 @@ public class GetPlaylistResponse implements AsyncResponse { Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); } @Override public int hashCode() { return Utils.enhancedHash( contentType, statusCode, rawResponse, - object); + mediaContainerWithPlaylistMetadata); } @Override @@ -175,7 +175,7 @@ public class GetPlaylistResponse implements AsyncResponse { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "object", object); + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); } @SuppressWarnings("UnusedReturnValue") @@ -187,7 +187,7 @@ public class GetPlaylistResponse implements AsyncResponse { private HttpResponse rawResponse; - private Optional object = Optional.empty(); + private Optional mediaContainerWithPlaylistMetadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -225,20 +225,20 @@ public class GetPlaylistResponse implements AsyncResponse { /** - * The playlist + * OK */ - public Builder object(GetPlaylistResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); return this; } /** - * The playlist + * OK */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; return this; } @@ -246,7 +246,7 @@ public class GetPlaylistResponse implements AsyncResponse { return new GetPlaylistResponse( contentType, statusCode, rawResponse, - object); + mediaContainerWithPlaylistMetadata); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistsRequestBuilder.java deleted file mode 100644 index 96cc11eb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistsRequestBuilder.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetPlaylistsRequest; -import dev.plexapi.sdk.models.operations.PlaylistType; -import dev.plexapi.sdk.models.operations.QueryParamSmart; -import dev.plexapi.sdk.operations.GetPlaylists; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetPlaylistsRequestBuilder { - - private Optional playlistType = Optional.empty(); - private Optional smart = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetPlaylistsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetPlaylistsRequestBuilder playlistType(PlaylistType playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = Optional.of(playlistType); - return this; - } - - public GetPlaylistsRequestBuilder playlistType(Optional playlistType) { - Utils.checkNotNull(playlistType, "playlistType"); - this.playlistType = playlistType; - return this; - } - - public GetPlaylistsRequestBuilder smart(QueryParamSmart smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = Optional.of(smart); - return this; - } - - public GetPlaylistsRequestBuilder smart(Optional smart) { - Utils.checkNotNull(smart, "smart"); - this.smart = smart; - return this; - } - - - private GetPlaylistsRequest buildRequest() { - - GetPlaylistsRequest request = new GetPlaylistsRequest(playlistType, - smart); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetPlaylists.Async(sdkConfiguration); - GetPlaylistsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistsResponse.java deleted file mode 100644 index d06297c2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPlaylistsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetPlaylistsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetPlaylistsResponse implements AsyncResponse { - /** - * 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; - - /** - * returns all playlists - */ - private Optional object; - - @JsonCreator - public GetPlaylistsResponse( - 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 GetPlaylistsResponse( - 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; - } - - /** - * returns all playlists - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetPlaylistsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetPlaylistsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetPlaylistsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * returns all playlists - */ - public GetPlaylistsResponse withObject(GetPlaylistsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * returns all playlists - */ - public GetPlaylistsResponse 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; - } - GetPlaylistsResponse other = (GetPlaylistsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetPlaylistsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * returns all playlists - */ - public Builder object(GetPlaylistsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * returns all playlists - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetPlaylistsResponse build() { - - return new GetPlaylistsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPostplayHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPostplayHubsRequestBuilder.java new file mode 100644 index 00000000..b9f0136d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPostplayHubsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetPostplayHubsRequest; +import dev.plexapi.sdk.operations.GetPostplayHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetPostplayHubsRequestBuilder { + + private GetPostplayHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPostplayHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPostplayHubsRequestBuilder request(GetPostplayHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetPostplayHubs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPostplayHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPostplayHubsResponse.java new file mode 100644 index 00000000..f37d16ac --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPostplayHubsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithHubs; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetPostplayHubsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithHubs; + + + private Map> headers; + + @JsonCreator + public GetPostplayHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithHubs, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithHubs = mediaContainerWithHubs; + this.headers = headers; + } + + public GetPostplayHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithHubs() { + return (Optional) mediaContainerWithHubs; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPostplayHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPostplayHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPostplayHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPostplayHubsResponse withMediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + + /** + * OK + */ + public GetPostplayHubsResponse withMediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + public GetPostplayHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPostplayHubsResponse other = (GetPostplayHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithHubs, other.mediaContainerWithHubs) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + @Override + public String toString() { + return Utils.toString(GetPostplayHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithHubs", mediaContainerWithHubs, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithHubs = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetPostplayHubsResponse build() { + + return new GetPostplayHubsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPreferenceRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPreferenceRequestBuilder.java new file mode 100644 index 00000000..fc9a1db3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPreferenceRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetPreferenceRequest; +import dev.plexapi.sdk.operations.GetPreference; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetPreferenceRequestBuilder { + + private GetPreferenceRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPreferenceRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPreferenceRequestBuilder request(GetPreferenceRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetPreference.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPreferenceResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPreferenceResponse.java new file mode 100644 index 00000000..554aea7b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPreferenceResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSettings; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetPreferenceResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithSettings; + + @JsonCreator + public GetPreferenceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSettings) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSettings = mediaContainerWithSettings; + } + + public GetPreferenceResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSettings() { + return (Optional) mediaContainerWithSettings; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPreferenceResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPreferenceResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPreferenceResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPreferenceResponse withMediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + + /** + * OK + */ + public GetPreferenceResponse withMediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPreferenceResponse other = (GetPreferenceResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSettings, other.mediaContainerWithSettings); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + @Override + public String toString() { + return Utils.toString(GetPreferenceResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSettings", mediaContainerWithSettings); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSettings = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + public GetPreferenceResponse build() { + + return new GetPreferenceResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPromotedHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPromotedHubsRequestBuilder.java new file mode 100644 index 00000000..85d78058 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPromotedHubsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetPromotedHubsRequest; +import dev.plexapi.sdk.operations.GetPromotedHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetPromotedHubsRequestBuilder { + + private GetPromotedHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetPromotedHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetPromotedHubsRequestBuilder request(GetPromotedHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetPromotedHubs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetPromotedHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPromotedHubsResponse.java new file mode 100644 index 00000000..478474b4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetPromotedHubsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetPromotedHubsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetPromotedHubsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetPromotedHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetPromotedHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetPromotedHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPromotedHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPromotedHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetPromotedHubsResponse withObject(GetPromotedHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetPromotedHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetPromotedHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPromotedHubsResponse other = (GetPromotedHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetPromotedHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetPromotedHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetPromotedHubsResponse build() { + + return new GetPromotedHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRandomArtworkRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRandomArtworkRequestBuilder.java new file mode 100644 index 00000000..74ca6bf8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRandomArtworkRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetRandomArtworkRequest; +import dev.plexapi.sdk.operations.GetRandomArtwork; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetRandomArtworkRequestBuilder { + + private GetRandomArtworkRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetRandomArtworkRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetRandomArtworkRequestBuilder request(GetRandomArtworkRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetRandomArtwork.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRandomArtworkResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRandomArtworkResponse.java new file mode 100644 index 00000000..d6140608 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRandomArtworkResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetRandomArtworkResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithArtwork; + + @JsonCreator + public GetRandomArtworkResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithArtwork) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + } + + public GetRandomArtworkResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithArtwork() { + return (Optional) mediaContainerWithArtwork; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetRandomArtworkResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetRandomArtworkResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRandomArtworkResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetRandomArtworkResponse withMediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + + /** + * OK + */ + public GetRandomArtworkResponse withMediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRandomArtworkResponse other = (GetRandomArtworkResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithArtwork, other.mediaContainerWithArtwork); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + @Override + public String toString() { + return Utils.toString(GetRandomArtworkResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithArtwork", mediaContainerWithArtwork); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithArtwork = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + public GetRandomArtworkResponse build() { + + return new GetRandomArtworkResponse( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedLibraryRequestBuilder.java deleted file mode 100644 index a96edd20..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedLibraryRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRequest; -import dev.plexapi.sdk.operations.GetRecentlyAddedLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetRecentlyAddedLibraryRequestBuilder { - - private GetRecentlyAddedLibraryRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetRecentlyAddedLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetRecentlyAddedLibraryRequestBuilder request(GetRecentlyAddedLibraryRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetRecentlyAddedLibrary.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedLibraryResponse.java deleted file mode 100644 index ccf6cd4d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedLibraryResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetRecentlyAddedLibraryResponse implements AsyncResponse { - /** - * 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 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 - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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/async/GetRecentlyAddedRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedRequestBuilder.java deleted file mode 100644 index f58e406f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequest; -import dev.plexapi.sdk.operations.GetRecentlyAdded; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetRecentlyAddedRequestBuilder { - - private GetRecentlyAddedRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetRecentlyAddedRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetRecentlyAddedRequestBuilder request(GetRecentlyAddedRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetRecentlyAdded.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedResponse.java deleted file mode 100644 index 0accdab2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRecentlyAddedResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetRecentlyAddedResponse implements AsyncResponse { - /** - * 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; - - /** - * A successful response with recently added content. - */ - private Optional object; - - @JsonCreator - public GetRecentlyAddedResponse( - 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 GetRecentlyAddedResponse( - 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; - } - - /** - * A successful response with recently added content. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetRecentlyAddedResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetRecentlyAddedResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRecentlyAddedResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * A successful response with recently added content. - */ - public GetRecentlyAddedResponse withObject(GetRecentlyAddedResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * A successful response with recently added content. - */ - public GetRecentlyAddedResponse 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; - } - GetRecentlyAddedResponse other = (GetRecentlyAddedResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetRecentlyAddedResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * A successful response with recently added content. - */ - public Builder object(GetRecentlyAddedResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * A successful response with recently added content. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetRecentlyAddedResponse build() { - - return new GetRecentlyAddedResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRefreshLibraryMetadataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRefreshLibraryMetadataRequestBuilder.java deleted file mode 100644 index 70d14560..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRefreshLibraryMetadataRequestBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.Force; -import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataRequest; -import dev.plexapi.sdk.operations.GetRefreshLibraryMetadata; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetRefreshLibraryMetadataRequestBuilder { - - private Optional force = Optional.empty(); - private Integer sectionKey; - private final SDKConfiguration sdkConfiguration; - - public GetRefreshLibraryMetadataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetRefreshLibraryMetadataRequestBuilder force(Force force) { - Utils.checkNotNull(force, "force"); - this.force = Optional.of(force); - return this; - } - - public GetRefreshLibraryMetadataRequestBuilder force(Optional force) { - Utils.checkNotNull(force, "force"); - this.force = force; - return this; - } - - public GetRefreshLibraryMetadataRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - - private GetRefreshLibraryMetadataRequest buildRequest() { - - GetRefreshLibraryMetadataRequest request = new GetRefreshLibraryMetadataRequest(force, - sectionKey); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetRefreshLibraryMetadata.Async(sdkConfiguration); - GetRefreshLibraryMetadataRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRefreshLibraryMetadataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRefreshLibraryMetadataResponse.java deleted file mode 100644 index 8732052f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRefreshLibraryMetadataResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class GetRefreshLibraryMetadataResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public GetRefreshLibraryMetadataResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetRefreshLibraryMetadataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetRefreshLibraryMetadataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetRefreshLibraryMetadataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRefreshLibraryMetadataResponse other = (GetRefreshLibraryMetadataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetRefreshLibraryMetadataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetRefreshLibraryMetadataResponse build() { - - return new GetRefreshLibraryMetadataResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedHubsRequestBuilder.java new file mode 100644 index 00000000..049ba573 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedHubsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetRelatedHubsRequest; +import dev.plexapi.sdk.operations.GetRelatedHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetRelatedHubsRequestBuilder { + + private GetRelatedHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetRelatedHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetRelatedHubsRequestBuilder request(GetRelatedHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetRelatedHubs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedHubsResponse.java new file mode 100644 index 00000000..cc8a06db --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedHubsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithHubs; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetRelatedHubsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithHubs; + + + private Map> headers; + + @JsonCreator + public GetRelatedHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithHubs, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithHubs = mediaContainerWithHubs; + this.headers = headers; + } + + public GetRelatedHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithHubs() { + return (Optional) mediaContainerWithHubs; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetRelatedHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetRelatedHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRelatedHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetRelatedHubsResponse withMediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + + /** + * OK + */ + public GetRelatedHubsResponse withMediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + public GetRelatedHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRelatedHubsResponse other = (GetRelatedHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithHubs, other.mediaContainerWithHubs) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + @Override + public String toString() { + return Utils.toString(GetRelatedHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithHubs", mediaContainerWithHubs, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithHubs = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithHubs(MediaContainerWithHubs mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = Optional.ofNullable(mediaContainerWithHubs); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithHubs(Optional mediaContainerWithHubs) { + Utils.checkNotNull(mediaContainerWithHubs, "mediaContainerWithHubs"); + this.mediaContainerWithHubs = mediaContainerWithHubs; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetRelatedHubsResponse build() { + + return new GetRelatedHubsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithHubs, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedItemsRequestBuilder.java new file mode 100644 index 00000000..b87ce8dc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetRelatedItemsRequest; +import dev.plexapi.sdk.operations.GetRelatedItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetRelatedItemsRequestBuilder { + + private GetRelatedItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetRelatedItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetRelatedItemsRequestBuilder request(GetRelatedItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetRelatedItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedItemsResponse.java new file mode 100644 index 00000000..d56d5e15 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetRelatedItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetRelatedItemsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetRelatedItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetRelatedItemsResponse( + 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 GetRelatedItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetRelatedItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetRelatedItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRelatedItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetRelatedItemsResponse withObject(GetRelatedItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetRelatedItemsResponse 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; + } + GetRelatedItemsResponse other = (GetRelatedItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetRelatedItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetRelatedItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetRelatedItemsResponse build() { + + return new GetRelatedItemsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetResizedPhotoRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetResizedPhotoRequestBuilder.java deleted file mode 100644 index 10367a8a..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetResizedPhotoRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetResizedPhotoRequest; -import dev.plexapi.sdk.operations.GetResizedPhoto; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetResizedPhotoRequestBuilder { - - private GetResizedPhotoRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetResizedPhotoRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetResizedPhotoRequestBuilder request(GetResizedPhotoRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetResizedPhoto.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetResizedPhotoResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetResizedPhotoResponse.java deleted file mode 100644 index ea1e49dc..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetResizedPhotoResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class GetResizedPhotoResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public GetResizedPhotoResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetResizedPhotoResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetResizedPhotoResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResizedPhotoResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetResizedPhotoResponse other = (GetResizedPhotoResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetResizedPhotoResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetResizedPhotoResponse build() { - - return new GetResizedPhotoResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetResourcesStatisticsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetResourcesStatisticsRequestBuilder.java deleted file mode 100644 index f575d11f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetResourcesStatisticsRequestBuilder.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsRequest; -import dev.plexapi.sdk.operations.GetResourcesStatistics; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetResourcesStatisticsRequestBuilder { - - private Optional timespan = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetResourcesStatisticsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetResourcesStatisticsRequestBuilder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.of(timespan); - return this; - } - - public GetResourcesStatisticsRequestBuilder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - - private GetResourcesStatisticsRequest buildRequest() { - - GetResourcesStatisticsRequest request = new GetResourcesStatisticsRequest(timespan); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetResourcesStatistics.Async(sdkConfiguration); - GetResourcesStatisticsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetResourcesStatisticsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetResourcesStatisticsResponse.java deleted file mode 100644 index 510cd128..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetResourcesStatisticsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetResourcesStatisticsResponse implements AsyncResponse { - /** - * 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; - - /** - * Resource Statistics - */ - private Optional object; - - @JsonCreator - public GetResourcesStatisticsResponse( - 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 GetResourcesStatisticsResponse( - 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; - } - - /** - * Resource Statistics - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetResourcesStatisticsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetResourcesStatisticsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetResourcesStatisticsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Resource Statistics - */ - public GetResourcesStatisticsResponse withObject(GetResourcesStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Resource Statistics - */ - public GetResourcesStatisticsResponse 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; - } - GetResourcesStatisticsResponse other = (GetResourcesStatisticsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetResourcesStatisticsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Resource Statistics - */ - public Builder object(GetResourcesStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Resource Statistics - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetResourcesStatisticsResponse build() { - - return new GetResourcesStatisticsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetScheduledRecordingsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetScheduledRecordingsRequestBuilder.java new file mode 100644 index 00000000..98afec3f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetScheduledRecordingsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetScheduledRecordings; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetScheduledRecordingsRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetScheduledRecordingsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new GetScheduledRecordings.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetScheduledRecordingsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetScheduledRecordingsResponse.java new file mode 100644 index 00000000..0827c596 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetScheduledRecordingsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetScheduledRecordingsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetScheduledRecordingsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetScheduledRecordingsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetScheduledRecordingsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetScheduledRecordingsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetScheduledRecordingsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetScheduledRecordingsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetScheduledRecordingsResponse withObject(GetScheduledRecordingsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetScheduledRecordingsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetScheduledRecordingsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetScheduledRecordingsResponse other = (GetScheduledRecordingsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetScheduledRecordingsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetScheduledRecordingsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetScheduledRecordingsResponse build() { + + return new GetScheduledRecordingsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchAllLibrariesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchAllLibrariesRequestBuilder.java deleted file mode 100644 index faa06052..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchAllLibrariesRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesRequest; -import dev.plexapi.sdk.operations.GetSearchAllLibraries; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetSearchAllLibrariesRequestBuilder { - - private GetSearchAllLibrariesRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetSearchAllLibrariesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetSearchAllLibrariesRequestBuilder request(GetSearchAllLibrariesRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetSearchAllLibraries.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchAllLibrariesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchAllLibrariesResponse.java deleted file mode 100644 index c24b0850..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchAllLibrariesResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetSearchAllLibrariesResponse implements AsyncResponse { - /** - * 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 libraries available on the Server - */ - private Optional object; - - @JsonCreator - public GetSearchAllLibrariesResponse( - 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 GetSearchAllLibrariesResponse( - 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 libraries available on the Server - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetSearchAllLibrariesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetSearchAllLibrariesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchAllLibrariesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The libraries available on the Server - */ - public GetSearchAllLibrariesResponse withObject(GetSearchAllLibrariesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The libraries available on the Server - */ - public GetSearchAllLibrariesResponse 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; - } - GetSearchAllLibrariesResponse other = (GetSearchAllLibrariesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetSearchAllLibrariesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 libraries available on the Server - */ - public Builder object(GetSearchAllLibrariesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The libraries available on the Server - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetSearchAllLibrariesResponse build() { - - return new GetSearchAllLibrariesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchLibraryRequestBuilder.java deleted file mode 100644 index 59df4999..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchLibraryRequestBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetSearchLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetSearchLibraryRequest; -import dev.plexapi.sdk.operations.GetSearchLibrary; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Integer; -import java.util.concurrent.CompletableFuture; - -public class GetSearchLibraryRequestBuilder { - - private Integer sectionKey; - private GetSearchLibraryQueryParamType type; - private final SDKConfiguration sdkConfiguration; - - public GetSearchLibraryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetSearchLibraryRequestBuilder sectionKey(int sectionKey) { - Utils.checkNotNull(sectionKey, "sectionKey"); - this.sectionKey = sectionKey; - return this; - } - - public GetSearchLibraryRequestBuilder type(GetSearchLibraryQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - private GetSearchLibraryRequest buildRequest() { - - GetSearchLibraryRequest request = new GetSearchLibraryRequest(sectionKey, - type); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetSearchLibrary.Async(sdkConfiguration); - GetSearchLibraryRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchLibraryResponse.java deleted file mode 100644 index 558ecd47..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchLibraryResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetSearchLibraryResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetSearchLibraryResponse implements AsyncResponse { - /** - * 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 contents of the library by section and type - */ - private Optional object; - - @JsonCreator - public GetSearchLibraryResponse( - 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 GetSearchLibraryResponse( - 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 contents of the library by section and type - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetSearchLibraryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetSearchLibraryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchLibraryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The contents of the library by section and type - */ - public GetSearchLibraryResponse withObject(GetSearchLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The contents of the library by section and type - */ - public GetSearchLibraryResponse 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; - } - GetSearchLibraryResponse other = (GetSearchLibraryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetSearchLibraryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 contents of the library by section and type - */ - public Builder object(GetSearchLibraryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The contents of the library by section and type - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetSearchLibraryResponse build() { - - return new GetSearchLibraryResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchResultsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchResultsRequestBuilder.java deleted file mode 100644 index ebb6f53f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchResultsRequestBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetSearchResultsRequest; -import dev.plexapi.sdk.operations.GetSearchResults; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.concurrent.CompletableFuture; - -public class GetSearchResultsRequestBuilder { - - private String query; - private final SDKConfiguration sdkConfiguration; - - public GetSearchResultsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetSearchResultsRequestBuilder query(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - - private GetSearchResultsRequest buildRequest() { - - GetSearchResultsRequest request = new GetSearchResultsRequest(query); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetSearchResults.Async(sdkConfiguration); - GetSearchResultsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchResultsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchResultsResponse.java deleted file mode 100644 index 74d41354..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSearchResultsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetSearchResultsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetSearchResultsResponse implements AsyncResponse { - /** - * 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; - - /** - * Search Results - */ - private Optional object; - - @JsonCreator - public GetSearchResultsResponse( - 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 GetSearchResultsResponse( - 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; - } - - /** - * Search Results - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetSearchResultsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetSearchResultsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSearchResultsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Search Results - */ - public GetSearchResultsResponse withObject(GetSearchResultsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Search Results - */ - public GetSearchResultsResponse 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; - } - GetSearchResultsResponse other = (GetSearchResultsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetSearchResultsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Search Results - */ - public Builder object(GetSearchResultsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Search Results - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetSearchResultsResponse build() { - - return new GetSearchResultsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionFiltersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionFiltersRequestBuilder.java new file mode 100644 index 00000000..3f8a031b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionFiltersRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetSectionFiltersRequest; +import dev.plexapi.sdk.operations.GetSectionFilters; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSectionFiltersRequestBuilder { + + private GetSectionFiltersRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSectionFiltersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionFiltersRequestBuilder request(GetSectionFiltersRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetSectionFilters.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionFiltersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionFiltersResponse.java new file mode 100644 index 00000000..b8232b36 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionFiltersResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetSectionFiltersResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetSectionFiltersResponse implements AsyncResponse { + /** + * 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 filters on the section + */ + private Optional object; + + @JsonCreator + public GetSectionFiltersResponse( + 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 GetSectionFiltersResponse( + 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 filters on the section + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionFiltersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionFiltersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionFiltersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The filters on the section + */ + public GetSectionFiltersResponse withObject(GetSectionFiltersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * The filters on the section + */ + public GetSectionFiltersResponse 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; + } + GetSectionFiltersResponse other = (GetSectionFiltersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetSectionFiltersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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 filters on the section + */ + public Builder object(GetSectionFiltersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The filters on the section + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetSectionFiltersResponse build() { + + return new GetSectionFiltersResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionHubsRequestBuilder.java new file mode 100644 index 00000000..cf147f58 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionHubsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetSectionHubsRequest; +import dev.plexapi.sdk.operations.GetSectionHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSectionHubsRequestBuilder { + + private GetSectionHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSectionHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionHubsRequestBuilder request(GetSectionHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetSectionHubs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionHubsResponse.java new file mode 100644 index 00000000..fbd2ddc5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionHubsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetSectionHubsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetSectionHubsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetSectionHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetSectionHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSectionHubsResponse withObject(GetSectionHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetSectionHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetSectionHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionHubsResponse other = (GetSectionHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetSectionHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetSectionHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetSectionHubsResponse build() { + + return new GetSectionHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionImageRequestBuilder.java new file mode 100644 index 00000000..02891c0f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionImageRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetSectionImageRequest; +import dev.plexapi.sdk.operations.GetSectionImage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSectionImageRequestBuilder { + + private GetSectionImageRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSectionImageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionImageRequestBuilder request(GetSectionImageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetSectionImage.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionImageResponse.java new file mode 100644 index 00000000..f244c6d1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionImageResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetSectionImageResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetSectionImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionImageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionImageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionImageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionImageResponse other = (GetSectionImageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSectionImageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetSectionImageResponse build() { + + return new GetSectionImageResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionPreferencesRequestBuilder.java new file mode 100644 index 00000000..d1fbff78 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionPreferencesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetSectionPreferencesRequest; +import dev.plexapi.sdk.operations.GetSectionPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSectionPreferencesRequestBuilder { + + private GetSectionPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSectionPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionPreferencesRequestBuilder request(GetSectionPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetSectionPreferences.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionPreferencesResponse.java new file mode 100644 index 00000000..00724d2f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionPreferencesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSettings; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetSectionPreferencesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithSettings; + + @JsonCreator + public GetSectionPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSettings) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSettings = mediaContainerWithSettings; + } + + public GetSectionPreferencesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSettings() { + return (Optional) mediaContainerWithSettings; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSectionPreferencesResponse withMediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + + /** + * OK + */ + public GetSectionPreferencesResponse withMediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionPreferencesResponse other = (GetSectionPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSettings, other.mediaContainerWithSettings); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + @Override + public String toString() { + return Utils.toString(GetSectionPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSettings", mediaContainerWithSettings); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSettings = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSettings(MediaContainerWithSettings mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = Optional.ofNullable(mediaContainerWithSettings); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSettings(Optional mediaContainerWithSettings) { + Utils.checkNotNull(mediaContainerWithSettings, "mediaContainerWithSettings"); + this.mediaContainerWithSettings = mediaContainerWithSettings; + return this; + } + + public GetSectionPreferencesResponse build() { + + return new GetSectionPreferencesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSettings); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsPrefsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsPrefsRequestBuilder.java new file mode 100644 index 00000000..1fbb540a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsPrefsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetSectionsPrefsRequest; +import dev.plexapi.sdk.operations.GetSectionsPrefs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSectionsPrefsRequestBuilder { + + private GetSectionsPrefsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSectionsPrefsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSectionsPrefsRequestBuilder request(GetSectionsPrefsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetSectionsPrefs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsPrefsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsPrefsResponse.java new file mode 100644 index 00000000..793115e7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsPrefsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.RequestHandlerSlashGetResponses200; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetSectionsPrefsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional requestHandlerSlashGetResponses200; + + @JsonCreator + public GetSectionsPrefsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + } + + public GetSectionsPrefsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional requestHandlerSlashGetResponses200() { + return (Optional) requestHandlerSlashGetResponses200; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionsPrefsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionsPrefsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionsPrefsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSectionsPrefsResponse withRequestHandlerSlashGetResponses200(RequestHandlerSlashGetResponses200 requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = Optional.ofNullable(requestHandlerSlashGetResponses200); + return this; + } + + + /** + * OK + */ + public GetSectionsPrefsResponse withRequestHandlerSlashGetResponses200(Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionsPrefsResponse other = (GetSectionsPrefsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.requestHandlerSlashGetResponses200, other.requestHandlerSlashGetResponses200); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + requestHandlerSlashGetResponses200); + } + + @Override + public String toString() { + return Utils.toString(GetSectionsPrefsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "requestHandlerSlashGetResponses200", requestHandlerSlashGetResponses200); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional requestHandlerSlashGetResponses200 = 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; + } + + + /** + * OK + */ + public Builder requestHandlerSlashGetResponses200(RequestHandlerSlashGetResponses200 requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = Optional.ofNullable(requestHandlerSlashGetResponses200); + return this; + } + + /** + * OK + */ + public Builder requestHandlerSlashGetResponses200(Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + return this; + } + + public GetSectionsPrefsResponse build() { + + return new GetSectionsPrefsResponse( + contentType, statusCode, rawResponse, + requestHandlerSlashGetResponses200); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsRequestBuilder.java new file mode 100644 index 00000000..48fc9bec --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetSections; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSectionsRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetSectionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new GetSections.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsResponse.java new file mode 100644 index 00000000..9df14274 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSectionsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetSectionsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetSectionsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetSectionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetSectionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSectionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSectionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSectionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSectionsResponse withObject(GetSectionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetSectionsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetSectionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSectionsResponse other = (GetSectionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetSectionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetSectionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetSectionsResponse build() { + + return new GetSectionsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerActivitiesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerActivitiesRequestBuilder.java deleted file mode 100644 index 12fe9b69..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerActivitiesRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerActivities; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetServerActivitiesRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetServerActivitiesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetServerActivities.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerActivitiesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerActivitiesResponse.java deleted file mode 100644 index 86747a34..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerActivitiesResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetServerActivitiesResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetServerActivitiesResponse implements AsyncResponse { - /** - * 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 Server Activities - */ - private Optional object; - - @JsonCreator - public GetServerActivitiesResponse( - 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 GetServerActivitiesResponse( - 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 Server Activities - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerActivitiesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerActivitiesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerActivitiesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Server Activities - */ - public GetServerActivitiesResponse withObject(GetServerActivitiesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The Server Activities - */ - public GetServerActivitiesResponse 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; - } - GetServerActivitiesResponse other = (GetServerActivitiesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetServerActivitiesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Server Activities - */ - public Builder object(GetServerActivitiesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The Server Activities - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetServerActivitiesResponse build() { - - return new GetServerActivitiesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerCapabilitiesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerCapabilitiesRequestBuilder.java deleted file mode 100644 index 07e93dcb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerCapabilitiesRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerCapabilities; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetServerCapabilitiesRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetServerCapabilitiesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetServerCapabilities.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerCapabilitiesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerCapabilitiesResponse.java deleted file mode 100644 index 651d617c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerCapabilitiesResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetServerCapabilitiesResponse implements AsyncResponse { - /** - * 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 Server Capabilities - */ - private Optional object; - - @JsonCreator - public GetServerCapabilitiesResponse( - 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 GetServerCapabilitiesResponse( - 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 Server Capabilities - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerCapabilitiesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerCapabilitiesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerCapabilitiesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Server Capabilities - */ - public GetServerCapabilitiesResponse withObject(GetServerCapabilitiesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The Server Capabilities - */ - public GetServerCapabilitiesResponse 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; - } - GetServerCapabilitiesResponse other = (GetServerCapabilitiesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetServerCapabilitiesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Server Capabilities - */ - public Builder object(GetServerCapabilitiesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The Server Capabilities - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetServerCapabilitiesResponse build() { - - return new GetServerCapabilitiesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerIdentityRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerIdentityRequestBuilder.java deleted file mode 100644 index 2d5a6c8f..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerIdentityRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerIdentity; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetServerIdentityRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetServerIdentityRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetServerIdentity.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerIdentityResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerIdentityResponse.java deleted file mode 100644 index 3be4d419..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerIdentityResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetServerIdentityResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetServerIdentityResponse implements AsyncResponse { - /** - * 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 Server Identity information - */ - private Optional object; - - @JsonCreator - public GetServerIdentityResponse( - 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 GetServerIdentityResponse( - 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 Server Identity information - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerIdentityResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerIdentityResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerIdentityResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Server Identity information - */ - public GetServerIdentityResponse withObject(GetServerIdentityResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The Server Identity information - */ - public GetServerIdentityResponse 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; - } - GetServerIdentityResponse other = (GetServerIdentityResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetServerIdentityResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Server Identity information - */ - public Builder object(GetServerIdentityResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The Server Identity information - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetServerIdentityResponse build() { - - return new GetServerIdentityResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerInfoRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerInfoRequestBuilder.java new file mode 100644 index 00000000..7fa42ca9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerInfoRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetServerInfoRequest; +import dev.plexapi.sdk.operations.GetServerInfo; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetServerInfoRequestBuilder { + + private GetServerInfoRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetServerInfoRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetServerInfoRequestBuilder request(GetServerInfoRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetServerInfo.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerInfoResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerInfoResponse.java new file mode 100644 index 00000000..e2904db8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerInfoResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDirectory; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetServerInfoResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithDirectory; + + @JsonCreator + public GetServerInfoResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDirectory) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDirectory, "mediaContainerWithDirectory"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDirectory = mediaContainerWithDirectory; + } + + public GetServerInfoResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDirectory() { + return (Optional) mediaContainerWithDirectory; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetServerInfoResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetServerInfoResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetServerInfoResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetServerInfoResponse withMediaContainerWithDirectory(MediaContainerWithDirectory mediaContainerWithDirectory) { + Utils.checkNotNull(mediaContainerWithDirectory, "mediaContainerWithDirectory"); + this.mediaContainerWithDirectory = Optional.ofNullable(mediaContainerWithDirectory); + return this; + } + + + /** + * OK + */ + public GetServerInfoResponse withMediaContainerWithDirectory(Optional mediaContainerWithDirectory) { + Utils.checkNotNull(mediaContainerWithDirectory, "mediaContainerWithDirectory"); + this.mediaContainerWithDirectory = mediaContainerWithDirectory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetServerInfoResponse other = (GetServerInfoResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDirectory, other.mediaContainerWithDirectory); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDirectory); + } + + @Override + public String toString() { + return Utils.toString(GetServerInfoResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDirectory", mediaContainerWithDirectory); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDirectory = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDirectory(MediaContainerWithDirectory mediaContainerWithDirectory) { + Utils.checkNotNull(mediaContainerWithDirectory, "mediaContainerWithDirectory"); + this.mediaContainerWithDirectory = Optional.ofNullable(mediaContainerWithDirectory); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDirectory(Optional mediaContainerWithDirectory) { + Utils.checkNotNull(mediaContainerWithDirectory, "mediaContainerWithDirectory"); + this.mediaContainerWithDirectory = mediaContainerWithDirectory; + return this; + } + + public GetServerInfoResponse build() { + + return new GetServerInfoResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDirectory); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerListRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerListRequestBuilder.java deleted file mode 100644 index 541b6253..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerListRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerList; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetServerListRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetServerListRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetServerList.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerListResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerListResponse.java deleted file mode 100644 index 6d3c48b3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerListResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetServerListResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetServerListResponse implements AsyncResponse { - /** - * 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; - - /** - * List of Servers - */ - private Optional object; - - @JsonCreator - public GetServerListResponse( - 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 GetServerListResponse( - 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; - } - - /** - * List of Servers - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerListResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerListResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerListResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * List of Servers - */ - public GetServerListResponse withObject(GetServerListResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * List of Servers - */ - public GetServerListResponse 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; - } - GetServerListResponse other = (GetServerListResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetServerListResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * List of Servers - */ - public Builder object(GetServerListResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * List of Servers - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetServerListResponse build() { - - return new GetServerListResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerPreferencesRequestBuilder.java deleted file mode 100644 index b6c8d7cb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerPreferencesRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetServerPreferences; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetServerPreferencesRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetServerPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetServerPreferences.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerPreferencesResponse.java deleted file mode 100644 index 977a1f01..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerPreferencesResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetServerPreferencesResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetServerPreferencesResponse implements AsyncResponse { - /** - * 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; - - /** - * Server Preferences - */ - private Optional object; - - @JsonCreator - public GetServerPreferencesResponse( - 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 GetServerPreferencesResponse( - 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; - } - - /** - * Server Preferences - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerPreferencesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerPreferencesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerPreferencesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Server Preferences - */ - public GetServerPreferencesResponse withObject(GetServerPreferencesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Server Preferences - */ - public GetServerPreferencesResponse 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; - } - GetServerPreferencesResponse other = (GetServerPreferencesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetServerPreferencesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Server Preferences - */ - public Builder object(GetServerPreferencesResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Server Preferences - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetServerPreferencesResponse build() { - - return new GetServerPreferencesResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerResourcesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerResourcesRequestBuilder.java deleted file mode 100644 index 4d29a7ce..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerResourcesRequestBuilder.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetServerResourcesRequest; -import dev.plexapi.sdk.models.operations.IncludeHttps; -import dev.plexapi.sdk.models.operations.IncludeIPv6; -import dev.plexapi.sdk.models.operations.IncludeRelay; -import dev.plexapi.sdk.operations.GetServerResources; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetServerResourcesRequestBuilder { - - private Optional includeHttps = Utils.readDefaultOrConstValue( - "includeHttps", - "0", - new TypeReference>() {}); - private Optional includeRelay = Utils.readDefaultOrConstValue( - "includeRelay", - "0", - new TypeReference>() {}); - private Optional includeIPv6 = Utils.readDefaultOrConstValue( - "includeIPv6", - "0", - new TypeReference>() {}); - private String clientID; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetServerResourcesRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetServerResourcesRequestBuilder includeHttps(IncludeHttps includeHttps) { - Utils.checkNotNull(includeHttps, "includeHttps"); - this.includeHttps = Optional.of(includeHttps); - return this; - } - - public GetServerResourcesRequestBuilder includeHttps(Optional includeHttps) { - Utils.checkNotNull(includeHttps, "includeHttps"); - this.includeHttps = includeHttps; - return this; - } - - public GetServerResourcesRequestBuilder includeRelay(IncludeRelay includeRelay) { - Utils.checkNotNull(includeRelay, "includeRelay"); - this.includeRelay = Optional.of(includeRelay); - return this; - } - - public GetServerResourcesRequestBuilder includeRelay(Optional includeRelay) { - Utils.checkNotNull(includeRelay, "includeRelay"); - this.includeRelay = includeRelay; - return this; - } - - public GetServerResourcesRequestBuilder includeIPv6(IncludeIPv6 includeIPv6) { - Utils.checkNotNull(includeIPv6, "includeIPv6"); - this.includeIPv6 = Optional.of(includeIPv6); - return this; - } - - public GetServerResourcesRequestBuilder includeIPv6(Optional includeIPv6) { - Utils.checkNotNull(includeIPv6, "includeIPv6"); - this.includeIPv6 = includeIPv6; - return this; - } - - public GetServerResourcesRequestBuilder clientID(String clientID) { - Utils.checkNotNull(clientID, "clientID"); - this.clientID = clientID; - return this; - } - - public GetServerResourcesRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetServerResourcesRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - - private GetServerResourcesRequest buildRequest() { - if (includeHttps == null) { - includeHttps = _SINGLETON_VALUE_IncludeHttps.value(); - } - if (includeRelay == null) { - includeRelay = _SINGLETON_VALUE_IncludeRelay.value(); - } - if (includeIPv6 == null) { - includeIPv6 = _SINGLETON_VALUE_IncludeIPv6.value(); - } - - GetServerResourcesRequest request = new GetServerResourcesRequest(includeHttps, - includeRelay, - includeIPv6, - clientID); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetServerResources.Async(sdkConfiguration, serverURL); - GetServerResourcesRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeHttps = - new LazySingletonValue<>( - "includeHttps", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeRelay = - new LazySingletonValue<>( - "includeRelay", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeIPv6 = - new LazySingletonValue<>( - "includeIPv6", - "0", - new TypeReference>() {}); -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerResourcesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerResourcesResponse.java deleted file mode 100644 index 2bf2cd5b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetServerResourcesResponse.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.PlexDevice; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - - -public class GetServerResourcesResponse implements AsyncResponse { - /** - * 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; - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - private Optional> plexDevices; - - @JsonCreator - public GetServerResourcesResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional> plexDevices) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(plexDevices, "plexDevices"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.plexDevices = plexDevices; - } - - public GetServerResourcesResponse( - 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; - } - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> plexDevices() { - return (Optional>) plexDevices; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetServerResourcesResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetServerResourcesResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetServerResourcesResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - public GetServerResourcesResponse withPlexDevices(List plexDevices) { - Utils.checkNotNull(plexDevices, "plexDevices"); - this.plexDevices = Optional.ofNullable(plexDevices); - return this; - } - - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - public GetServerResourcesResponse withPlexDevices(Optional> plexDevices) { - Utils.checkNotNull(plexDevices, "plexDevices"); - this.plexDevices = plexDevices; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetServerResourcesResponse other = (GetServerResourcesResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.plexDevices, other.plexDevices); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - plexDevices); - } - - @Override - public String toString() { - return Utils.toString(GetServerResourcesResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "plexDevices", plexDevices); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional> plexDevices = 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; - } - - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - public Builder plexDevices(List plexDevices) { - Utils.checkNotNull(plexDevices, "plexDevices"); - this.plexDevices = Optional.ofNullable(plexDevices); - return this; - } - - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - public Builder plexDevices(Optional> plexDevices) { - Utils.checkNotNull(plexDevices, "plexDevices"); - this.plexDevices = plexDevices; - return this; - } - - public GetServerResourcesResponse build() { - - return new GetServerResourcesResponse( - contentType, statusCode, rawResponse, - plexDevices); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionHistoryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionHistoryRequestBuilder.java deleted file mode 100644 index f84b49c8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionHistoryRequestBuilder.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetSessionHistoryRequest; -import dev.plexapi.sdk.models.operations.QueryParamFilter; -import dev.plexapi.sdk.operations.GetSessionHistory; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetSessionHistoryRequestBuilder { - - private Optional sort = Optional.empty(); - private Optional accountId = Optional.empty(); - private Optional filter = Optional.empty(); - private Optional librarySectionID = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetSessionHistoryRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetSessionHistoryRequestBuilder sort(String sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = Optional.of(sort); - return this; - } - - public GetSessionHistoryRequestBuilder sort(Optional sort) { - Utils.checkNotNull(sort, "sort"); - this.sort = sort; - return this; - } - - public GetSessionHistoryRequestBuilder accountId(long accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.of(accountId); - return this; - } - - public GetSessionHistoryRequestBuilder accountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - public GetSessionHistoryRequestBuilder filter(QueryParamFilter filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = Optional.of(filter); - return this; - } - - public GetSessionHistoryRequestBuilder filter(Optional filter) { - Utils.checkNotNull(filter, "filter"); - this.filter = filter; - return this; - } - - public GetSessionHistoryRequestBuilder librarySectionID(long librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.of(librarySectionID); - return this; - } - - public GetSessionHistoryRequestBuilder librarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - - private GetSessionHistoryRequest buildRequest() { - - GetSessionHistoryRequest request = new GetSessionHistoryRequest(sort, - accountId, - filter, - librarySectionID); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetSessionHistory.Async(sdkConfiguration); - GetSessionHistoryRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionHistoryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionHistoryResponse.java deleted file mode 100644 index 940afccb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionHistoryResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetSessionHistoryResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetSessionHistoryResponse implements AsyncResponse { - /** - * 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; - - /** - * List of Plex Sessions - */ - private Optional object; - - @JsonCreator - public GetSessionHistoryResponse( - 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 GetSessionHistoryResponse( - 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; - } - - /** - * List of Plex Sessions - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetSessionHistoryResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetSessionHistoryResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetSessionHistoryResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * List of Plex Sessions - */ - public GetSessionHistoryResponse withObject(GetSessionHistoryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * List of Plex Sessions - */ - public GetSessionHistoryResponse 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; - } - GetSessionHistoryResponse other = (GetSessionHistoryResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetSessionHistoryResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * List of Plex Sessions - */ - public Builder object(GetSessionHistoryResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * List of Plex Sessions - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetSessionHistoryResponse build() { - - return new GetSessionHistoryResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionPlaylistIndexRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionPlaylistIndexRequestBuilder.java new file mode 100644 index 00000000..f7f43798 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionPlaylistIndexRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexRequest; +import dev.plexapi.sdk.operations.GetSessionPlaylistIndex; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSessionPlaylistIndexRequestBuilder { + + private GetSessionPlaylistIndexRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSessionPlaylistIndexRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSessionPlaylistIndexRequestBuilder request(GetSessionPlaylistIndexRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetSessionPlaylistIndex.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionPlaylistIndexResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionPlaylistIndexResponse.java new file mode 100644 index 00000000..a1d945d2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionPlaylistIndexResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetSessionPlaylistIndexResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetSessionPlaylistIndexResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSessionPlaylistIndexResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSessionPlaylistIndexResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSessionPlaylistIndexResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionPlaylistIndexResponse other = (GetSessionPlaylistIndexResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSessionPlaylistIndexResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetSessionPlaylistIndexResponse build() { + + return new GetSessionPlaylistIndexResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionSegmentRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionSegmentRequestBuilder.java new file mode 100644 index 00000000..9162155f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionSegmentRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetSessionSegmentRequest; +import dev.plexapi.sdk.operations.GetSessionSegment; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSessionSegmentRequestBuilder { + + private GetSessionSegmentRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSessionSegmentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSessionSegmentRequestBuilder request(GetSessionSegmentRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetSessionSegment.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionSegmentResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionSegmentResponse.java new file mode 100644 index 00000000..4588c35c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionSegmentResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetSessionSegmentResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetSessionSegmentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSessionSegmentResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSessionSegmentResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSessionSegmentResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSessionSegmentResponse other = (GetSessionSegmentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSessionSegmentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetSessionSegmentResponse build() { + + return new GetSessionSegmentResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionsResponse.java index 7507ba24..416e3037 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionsResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSessionsResponse.java @@ -5,7 +5,7 @@ package dev.plexapi.sdk.models.operations.async; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetSessionsResponseBody; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; import dev.plexapi.sdk.utils.AsyncResponse; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Utils; @@ -14,6 +14,8 @@ import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; import java.util.Optional; @@ -34,32 +36,40 @@ public class GetSessionsResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * List of Active Plex Sessions + * OK */ - private Optional object; + private Optional mediaContainerWithMetadata; + + + private Map> headers; @JsonCreator public GetSessionsResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional object) { + Optional mediaContainerWithMetadata, + Map> headers) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(object, "object"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.object = object; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; } public GetSessionsResponse( String contentType, int statusCode, - HttpResponse rawResponse) { + HttpResponse rawResponse, + Map> headers) { this(contentType, statusCode, rawResponse, - Optional.empty()); + Optional.empty(), headers); } /** @@ -87,12 +97,17 @@ public class GetSessionsResponse implements AsyncResponse { } /** - * List of Active Plex Sessions + * OK */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional object() { - return (Optional) object; + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; } public static Builder builder() { @@ -128,21 +143,27 @@ public class GetSessionsResponse implements AsyncResponse { } /** - * List of Active Plex Sessions + * OK */ - public GetSessionsResponse withObject(GetSessionsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public GetSessionsResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); return this; } /** - * List of Active Plex Sessions + * OK */ - public GetSessionsResponse withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public GetSessionsResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetSessionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; return this; } @@ -159,14 +180,15 @@ public class GetSessionsResponse implements AsyncResponse { Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); } @Override public int hashCode() { return Utils.enhancedHash( contentType, statusCode, rawResponse, - object); + mediaContainerWithMetadata, headers); } @Override @@ -175,7 +197,8 @@ public class GetSessionsResponse implements AsyncResponse { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "object", object); + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); } @SuppressWarnings("UnusedReturnValue") @@ -187,7 +210,9 @@ public class GetSessionsResponse implements AsyncResponse { private HttpResponse rawResponse; - private Optional object = Optional.empty(); + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; private Builder() { // force use of static builder() method @@ -225,20 +250,27 @@ public class GetSessionsResponse implements AsyncResponse { /** - * List of Active Plex Sessions + * OK */ - public Builder object(GetSessionsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); return this; } /** - * List of Active Plex Sessions + * OK */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; return this; } @@ -246,7 +278,7 @@ public class GetSessionsResponse implements AsyncResponse { return new GetSessionsResponse( contentType, statusCode, rawResponse, - object); + mediaContainerWithMetadata, headers); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicPathRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicPathRequestBuilder.java new file mode 100644 index 00000000..38f6daa6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicPathRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetSonicPathRequest; +import dev.plexapi.sdk.operations.GetSonicPath; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSonicPathRequestBuilder { + + private GetSonicPathRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSonicPathRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSonicPathRequestBuilder request(GetSonicPathRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetSonicPath.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicPathResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicPathResponse.java new file mode 100644 index 00000000..c49c3d6f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicPathResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetSonicPathResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public GetSonicPathResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public GetSonicPathResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSonicPathResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSonicPathResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSonicPathResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSonicPathResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetSonicPathResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSonicPathResponse other = (GetSonicPathResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetSonicPathResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetSonicPathResponse build() { + + return new GetSonicPathResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicallySimilarRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicallySimilarRequestBuilder.java new file mode 100644 index 00000000..1d840b7d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicallySimilarRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetSonicallySimilarRequest; +import dev.plexapi.sdk.operations.GetSonicallySimilar; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSonicallySimilarRequestBuilder { + + private GetSonicallySimilarRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSonicallySimilarRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSonicallySimilarRequestBuilder request(GetSonicallySimilarRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetSonicallySimilar.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicallySimilarResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicallySimilarResponse.java new file mode 100644 index 00000000..7a692c94 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSonicallySimilarResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetSonicallySimilarResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public GetSonicallySimilarResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public GetSonicallySimilarResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSonicallySimilarResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSonicallySimilarResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSonicallySimilarResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSonicallySimilarResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public GetSonicallySimilarResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSonicallySimilarResponse other = (GetSonicallySimilarResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetSonicallySimilarResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public GetSonicallySimilarResponse build() { + + return new GetSonicallySimilarResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSourceConnectionInformationRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSourceConnectionInformationRequestBuilder.java index e94ef544..00fedaca 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSourceConnectionInformationRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSourceConnectionInformationRequestBuilder.java @@ -10,37 +10,27 @@ import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequest; import dev.plexapi.sdk.operations.GetSourceConnectionInformation; import dev.plexapi.sdk.utils.Utils; import java.lang.Exception; -import java.lang.String; import java.util.concurrent.CompletableFuture; public class GetSourceConnectionInformationRequestBuilder { - private String source; + private GetSourceConnectionInformationRequest request; private final SDKConfiguration sdkConfiguration; public GetSourceConnectionInformationRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public GetSourceConnectionInformationRequestBuilder source(String source) { - Utils.checkNotNull(source, "source"); - this.source = source; + public GetSourceConnectionInformationRequestBuilder request(GetSourceConnectionInformationRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private GetSourceConnectionInformationRequest buildRequest() { - - GetSourceConnectionInformationRequest request = new GetSourceConnectionInformationRequest(source); - - return request; - } - public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new GetSourceConnectionInformation.Async(sdkConfiguration); - GetSourceConnectionInformationRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSourceConnectionInformationResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSourceConnectionInformationResponse.java index 9a0f0716..2c6619a3 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSourceConnectionInformationResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSourceConnectionInformationResponse.java @@ -5,13 +5,16 @@ package dev.plexapi.sdk.models.operations.async; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponseBody; import dev.plexapi.sdk.utils.AsyncResponse; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Utils; import java.lang.Integer; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.net.http.HttpResponse; +import java.util.Optional; public class GetSourceConnectionInformationResponse implements AsyncResponse { @@ -30,17 +33,33 @@ public class GetSourceConnectionInformationResponse implements AsyncResponse { */ private HttpResponse rawResponse; + /** + * OK + */ + private Optional object; + @JsonCreator public GetSourceConnectionInformationResponse( String contentType, int statusCode, - HttpResponse rawResponse) { + 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 GetSourceConnectionInformationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -67,6 +86,15 @@ public class GetSourceConnectionInformationResponse implements AsyncResponse { return rawResponse; } + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + public static Builder builder() { return new Builder(); } @@ -99,6 +127,25 @@ public class GetSourceConnectionInformationResponse implements AsyncResponse { return this; } + /** + * OK + */ + public GetSourceConnectionInformationResponse withObject(GetSourceConnectionInformationResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetSourceConnectionInformationResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -111,13 +158,15 @@ public class GetSourceConnectionInformationResponse implements AsyncResponse { return Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); } @Override public int hashCode() { return Utils.enhancedHash( - contentType, statusCode, rawResponse); + contentType, statusCode, rawResponse, + object); } @Override @@ -125,7 +174,8 @@ public class GetSourceConnectionInformationResponse implements AsyncResponse { return Utils.toString(GetSourceConnectionInformationResponse.class, "contentType", contentType, "statusCode", statusCode, - "rawResponse", rawResponse); + "rawResponse", rawResponse, + "object", object); } @SuppressWarnings("UnusedReturnValue") @@ -137,6 +187,8 @@ public class GetSourceConnectionInformationResponse implements AsyncResponse { private HttpResponse rawResponse; + private Optional object = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -171,10 +223,30 @@ public class GetSourceConnectionInformationResponse implements AsyncResponse { return this; } + + /** + * OK + */ + public Builder object(GetSourceConnectionInformationResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + public GetSourceConnectionInformationResponse build() { return new GetSourceConnectionInformationResponse( - contentType, statusCode, rawResponse); + contentType, statusCode, rawResponse, + object); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetStatisticsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStatisticsRequestBuilder.java deleted file mode 100644 index 36800e2e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetStatisticsRequestBuilder.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetStatisticsRequest; -import dev.plexapi.sdk.operations.GetStatistics; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetStatisticsRequestBuilder { - - private Optional timespan = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetStatisticsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetStatisticsRequestBuilder timespan(long timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = Optional.of(timespan); - return this; - } - - public GetStatisticsRequestBuilder timespan(Optional timespan) { - Utils.checkNotNull(timespan, "timespan"); - this.timespan = timespan; - return this; - } - - - private GetStatisticsRequest buildRequest() { - - GetStatisticsRequest request = new GetStatisticsRequest(timespan); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetStatistics.Async(sdkConfiguration); - GetStatisticsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetStatisticsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStatisticsResponse.java deleted file mode 100644 index 613bc040..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetStatisticsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetStatisticsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetStatisticsResponse implements AsyncResponse { - /** - * 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; - - /** - * Media Statistics - */ - private Optional object; - - @JsonCreator - public GetStatisticsResponse( - 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 GetStatisticsResponse( - 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; - } - - /** - * Media Statistics - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetStatisticsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetStatisticsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetStatisticsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Media Statistics - */ - public GetStatisticsResponse withObject(GetStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Media Statistics - */ - public GetStatisticsResponse 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; - } - GetStatisticsResponse other = (GetStatisticsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetStatisticsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Media Statistics - */ - public Builder object(GetStatisticsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Media Statistics - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetStatisticsResponse build() { - - return new GetStatisticsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLevelsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLevelsRequestBuilder.java new file mode 100644 index 00000000..a922eccb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLevelsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetStreamLevelsRequest; +import dev.plexapi.sdk.operations.GetStreamLevels; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetStreamLevelsRequestBuilder { + + private GetStreamLevelsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetStreamLevelsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetStreamLevelsRequestBuilder request(GetStreamLevelsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetStreamLevels.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLevelsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLevelsResponse.java new file mode 100644 index 00000000..3e484aa3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLevelsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetStreamLevelsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetStreamLevelsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetStreamLevelsResponse( + 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 GetStreamLevelsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetStreamLevelsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetStreamLevelsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetStreamLevelsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetStreamLevelsResponse withObject(GetStreamLevelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetStreamLevelsResponse 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; + } + GetStreamLevelsResponse other = (GetStreamLevelsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetStreamLevelsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetStreamLevelsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetStreamLevelsResponse build() { + + return new GetStreamLevelsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLoudnessRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLoudnessRequestBuilder.java new file mode 100644 index 00000000..e6d239aa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLoudnessRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetStreamLoudnessRequest; +import dev.plexapi.sdk.operations.GetStreamLoudness; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetStreamLoudnessRequestBuilder { + + private GetStreamLoudnessRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetStreamLoudnessRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetStreamLoudnessRequestBuilder request(GetStreamLoudnessRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetStreamLoudness.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLoudnessResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLoudnessResponse.java new file mode 100644 index 00000000..52490547 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamLoudnessResponse.java @@ -0,0 +1,250 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetStreamLoudnessResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional res; + + @JsonCreator + public GetStreamLoudnessResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional res) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(res, "res"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.res = res; + } + + public GetStreamLoudnessResponse( + 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; + } + + /** + * OK + */ + @JsonIgnore + public Optional res() { + return res; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetStreamLoudnessResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetStreamLoudnessResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetStreamLoudnessResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetStreamLoudnessResponse withRes(String res) { + Utils.checkNotNull(res, "res"); + this.res = Optional.ofNullable(res); + return this; + } + + + /** + * OK + */ + public GetStreamLoudnessResponse withRes(Optional res) { + Utils.checkNotNull(res, "res"); + this.res = res; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStreamLoudnessResponse other = (GetStreamLoudnessResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.res, other.res); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + res); + } + + @Override + public String toString() { + return Utils.toString(GetStreamLoudnessResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "res", res); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional res = 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; + } + + + /** + * OK + */ + public Builder res(String res) { + Utils.checkNotNull(res, "res"); + this.res = Optional.ofNullable(res); + return this; + } + + /** + * OK + */ + public Builder res(Optional res) { + Utils.checkNotNull(res, "res"); + this.res = res; + return this; + } + + public GetStreamLoudnessResponse build() { + + return new GetStreamLoudnessResponse( + contentType, statusCode, rawResponse, + res); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamRequestBuilder.java new file mode 100644 index 00000000..293fd1c9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetStreamRequest; +import dev.plexapi.sdk.operations.GetStream; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetStreamRequestBuilder { + + private GetStreamRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetStreamRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetStreamRequestBuilder request(GetStreamRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetStream.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamResponse.java new file mode 100644 index 00000000..b8f7c743 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetStreamResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetStreamResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetStreamResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetStreamResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetStreamResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetStreamResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStreamResponse other = (GetStreamResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetStreamResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetStreamResponse build() { + + return new GetStreamResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSubscriptionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSubscriptionRequestBuilder.java new file mode 100644 index 00000000..f345ebb8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSubscriptionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetSubscriptionRequest; +import dev.plexapi.sdk.operations.GetSubscription; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetSubscriptionRequestBuilder { + + private GetSubscriptionRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetSubscriptionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetSubscriptionRequestBuilder request(GetSubscriptionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetSubscription.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetSubscriptionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSubscriptionResponse.java new file mode 100644 index 00000000..5a8dee61 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetSubscriptionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetSubscriptionResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithSubscription; + + @JsonCreator + public GetSubscriptionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSubscription) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + } + + public GetSubscriptionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSubscription() { + return (Optional) mediaContainerWithSubscription; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetSubscriptionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSubscriptionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSubscriptionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSubscriptionResponse withMediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + + /** + * OK + */ + public GetSubscriptionResponse withMediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSubscriptionResponse other = (GetSubscriptionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSubscription, other.mediaContainerWithSubscription); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + @Override + public String toString() { + return Utils.toString(GetSubscriptionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSubscription", mediaContainerWithSubscription); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSubscription = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + public GetSubscriptionResponse build() { + + return new GetSubscriptionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTagsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTagsRequestBuilder.java new file mode 100644 index 00000000..9b1bf1fd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTagsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetTagsRequest; +import dev.plexapi.sdk.operations.GetTags; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetTagsRequestBuilder { + + private GetTagsRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetTagsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetTagsRequestBuilder request(GetTagsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetTags.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTagsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTagsResponse.java new file mode 100644 index 00000000..fe378f5a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTagsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetTagsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetTagsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetTagsResponse( + 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 GetTagsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetTagsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTagsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTagsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetTagsResponse withObject(GetTagsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetTagsResponse 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; + } + GetTagsResponse other = (GetTagsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetTagsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetTagsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetTagsResponse build() { + + return new GetTagsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTasksRequestBuilder.java new file mode 100644 index 00000000..9e25794c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTasksRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetTasks; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetTasksRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetTasksRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new GetTasks.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTasksResponse.java new file mode 100644 index 00000000..5b04b857 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTasksResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetTasksResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetTasksResponse implements AsyncResponse { + /** + * 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; + + /** + * Butler tasks + */ + private Optional object; + + @JsonCreator + public GetTasksResponse( + 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 GetTasksResponse( + 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; + } + + /** + * Butler tasks + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Butler tasks + */ + public GetTasksResponse withObject(GetTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * Butler tasks + */ + public GetTasksResponse 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; + } + GetTasksResponse other = (GetTasksResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * Butler tasks + */ + public Builder object(GetTasksResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Butler tasks + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetTasksResponse build() { + + return new GetTasksResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTemplateRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTemplateRequestBuilder.java new file mode 100644 index 00000000..24f7f975 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTemplateRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetTemplateRequest; +import dev.plexapi.sdk.operations.GetTemplate; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetTemplateRequestBuilder { + + private GetTemplateRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetTemplateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetTemplateRequestBuilder request(GetTemplateRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetTemplate.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTemplateResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTemplateResponse.java new file mode 100644 index 00000000..297d3afc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTemplateResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetTemplateResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class GetTemplateResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public GetTemplateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public GetTemplateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetTemplateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTemplateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTemplateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetTemplateResponse withObject(GetTemplateResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetTemplateResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetTemplateResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTemplateResponse other = (GetTemplateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(GetTemplateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(GetTemplateResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public GetTemplateResponse build() { + + return new GetTemplateResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbImageRequestBuilder.java deleted file mode 100644 index fcd227ba..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbImageRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetThumbImageRequest; -import dev.plexapi.sdk.operations.GetThumbImage; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetThumbImageRequestBuilder { - - private GetThumbImageRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetThumbImageRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetThumbImageRequestBuilder request(GetThumbImageRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetThumbImage.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbImageResponse.java deleted file mode 100644 index 553eb26d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbImageResponse.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Map; -import java.util.Optional; - - -public class GetThumbImageResponse implements AsyncResponse { - /** - * 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; - - /** - * Successful response returning an image - */ - private Optional responseStream; - - - private Map> headers; - - @JsonCreator - public GetThumbImageResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional responseStream, - Map> headers) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(responseStream, "responseStream"); - headers = Utils.emptyMapIfNull(headers); - Utils.checkNotNull(headers, "headers"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.responseStream = responseStream; - this.headers = headers; - } - - public GetThumbImageResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Map> headers) { - this(contentType, statusCode, rawResponse, - Optional.empty(), headers); - } - - /** - * 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; - } - - /** - * Successful response returning an image - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional responseStream() { - return (Optional) responseStream; - } - - @JsonIgnore - public Map> headers() { - return headers; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetThumbImageResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetThumbImageResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetThumbImageResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Successful response returning an image - */ - public GetThumbImageResponse withResponseStream(Blob responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = Optional.ofNullable(responseStream); - return this; - } - - - /** - * Successful response returning an image - */ - public GetThumbImageResponse withResponseStream(Optional responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = responseStream; - return this; - } - - public GetThumbImageResponse withHeaders(Map> headers) { - Utils.checkNotNull(headers, "headers"); - this.headers = headers; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetThumbImageResponse other = (GetThumbImageResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.responseStream, other.responseStream) && - Utils.enhancedDeepEquals(this.headers, other.headers); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - responseStream, headers); - } - - @Override - public String toString() { - return Utils.toString(GetThumbImageResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "responseStream", responseStream, - "headers", headers); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional responseStream = Optional.empty(); - - private Map> headers; - - 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; - } - - - /** - * Successful response returning an image - */ - public Builder responseStream(Blob responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = Optional.ofNullable(responseStream); - return this; - } - - /** - * Successful response returning an image - */ - public Builder responseStream(Optional responseStream) { - Utils.checkNotNull(responseStream, "responseStream"); - this.responseStream = responseStream; - return this; - } - - - public Builder headers(Map> headers) { - Utils.checkNotNull(headers, "headers"); - this.headers = headers; - return this; - } - - public GetThumbImageResponse build() { - - return new GetThumbImageResponse( - contentType, statusCode, rawResponse, - responseStream, headers); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbRequestBuilder.java new file mode 100644 index 00000000..07016931 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.GetThumbRequest; +import dev.plexapi.sdk.operations.GetThumb; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetThumbRequestBuilder { + + private GetThumbRequest request; + private final SDKConfiguration sdkConfiguration; + + public GetThumbRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetThumbRequestBuilder request(GetThumbRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new GetThumb.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbResponse.java new file mode 100644 index 00000000..e2e3fffa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetThumbResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class GetThumbResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetThumbResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetThumbResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetThumbResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetThumbResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetThumbResponse other = (GetThumbResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetThumbResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetThumbResponse build() { + + return new GetThumbResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTimelineRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTimelineRequestBuilder.java deleted file mode 100644 index 8b931504..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTimelineRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetTimelineRequest; -import dev.plexapi.sdk.operations.GetTimeline; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetTimelineRequestBuilder { - - private GetTimelineRequest request; - private final SDKConfiguration sdkConfiguration; - - public GetTimelineRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetTimelineRequestBuilder request(GetTimelineRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetTimeline.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTimelineResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTimelineResponse.java deleted file mode 100644 index 16e06aff..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTimelineResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class GetTimelineResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public GetTimelineResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetTimelineResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetTimelineResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTimelineResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTimelineResponse other = (GetTimelineResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(GetTimelineResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetTimelineResponse build() { - - return new GetTimelineResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenByPinIdRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenByPinIdRequestBuilder.java deleted file mode 100644 index e4a9e5f2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenByPinIdRequestBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdRequest; -import dev.plexapi.sdk.operations.GetTokenByPinId; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetTokenByPinIdRequestBuilder { - - private GetTokenByPinIdRequest request; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetTokenByPinIdRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetTokenByPinIdRequestBuilder request(GetTokenByPinIdRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetTokenByPinIdRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetTokenByPinIdRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetTokenByPinId.Async(sdkConfiguration, serverURL); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenByPinIdResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenByPinIdResponse.java deleted file mode 100644 index 47b0e750..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenByPinIdResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdAuthPinContainer; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetTokenByPinIdResponse implements AsyncResponse { - /** - * 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 Pin with a non-null authToken when it has been verified by the user - */ - private Optional authPinContainer; - - @JsonCreator - public GetTokenByPinIdResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional authPinContainer) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.authPinContainer = authPinContainer; - } - - public GetTokenByPinIdResponse( - 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 Pin with a non-null authToken when it has been verified by the user - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional authPinContainer() { - return (Optional) authPinContainer; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetTokenByPinIdResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetTokenByPinIdResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenByPinIdResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Pin with a non-null authToken when it has been verified by the user - */ - public GetTokenByPinIdResponse withAuthPinContainer(GetTokenByPinIdAuthPinContainer authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = Optional.ofNullable(authPinContainer); - return this; - } - - - /** - * The Pin with a non-null authToken when it has been verified by the user - */ - public GetTokenByPinIdResponse withAuthPinContainer(Optional authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = authPinContainer; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenByPinIdResponse other = (GetTokenByPinIdResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.authPinContainer, other.authPinContainer); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - authPinContainer); - } - - @Override - public String toString() { - return Utils.toString(GetTokenByPinIdResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "authPinContainer", authPinContainer); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional authPinContainer = 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 Pin with a non-null authToken when it has been verified by the user - */ - public Builder authPinContainer(GetTokenByPinIdAuthPinContainer authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = Optional.ofNullable(authPinContainer); - return this; - } - - /** - * The Pin with a non-null authToken when it has been verified by the user - */ - public Builder authPinContainer(Optional authPinContainer) { - Utils.checkNotNull(authPinContainer, "authPinContainer"); - this.authPinContainer = authPinContainer; - return this; - } - - public GetTokenByPinIdResponse build() { - - return new GetTokenByPinIdResponse( - contentType, statusCode, rawResponse, - authPinContainer); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenDetailsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenDetailsRequestBuilder.java deleted file mode 100644 index 2b9ca9ed..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenDetailsRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetTokenDetails; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetTokenDetailsRequestBuilder { - - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetTokenDetailsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetTokenDetailsRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetTokenDetailsRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetTokenDetails.Async(sdkConfiguration, serverURL); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenDetailsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenDetailsResponse.java deleted file mode 100644 index eda0253b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTokenDetailsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetTokenDetailsUserPlexAccount; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetTokenDetailsResponse implements AsyncResponse { - /** - * 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; - - /** - * Logged in user details - */ - private Optional userPlexAccount; - - @JsonCreator - public GetTokenDetailsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional userPlexAccount) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.userPlexAccount = userPlexAccount; - } - - public GetTokenDetailsResponse( - 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; - } - - /** - * Logged in user details - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional userPlexAccount() { - return (Optional) userPlexAccount; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetTokenDetailsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetTokenDetailsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTokenDetailsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Logged in user details - */ - public GetTokenDetailsResponse withUserPlexAccount(GetTokenDetailsUserPlexAccount userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = Optional.ofNullable(userPlexAccount); - return this; - } - - - /** - * Logged in user details - */ - public GetTokenDetailsResponse withUserPlexAccount(Optional userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = userPlexAccount; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTokenDetailsResponse other = (GetTokenDetailsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.userPlexAccount, other.userPlexAccount); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - userPlexAccount); - } - - @Override - public String toString() { - return Utils.toString(GetTokenDetailsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "userPlexAccount", userPlexAccount); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional userPlexAccount = 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; - } - - - /** - * Logged in user details - */ - public Builder userPlexAccount(GetTokenDetailsUserPlexAccount userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = Optional.ofNullable(userPlexAccount); - return this; - } - - /** - * Logged in user details - */ - public Builder userPlexAccount(Optional userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = userPlexAccount; - return this; - } - - public GetTokenDetailsResponse build() { - - return new GetTokenDetailsResponse( - contentType, statusCode, rawResponse, - userPlexAccount); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTopWatchedContentRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTopWatchedContentRequestBuilder.java deleted file mode 100644 index d7919637..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTopWatchedContentRequestBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamIncludeGuids; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamType; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentRequest; -import dev.plexapi.sdk.operations.GetTopWatchedContent; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetTopWatchedContentRequestBuilder { - - private GetTopWatchedContentQueryParamType type; - private Optional includeGuids = Utils.readDefaultOrConstValue( - "includeGuids", - "0", - new TypeReference>() {}); - private final SDKConfiguration sdkConfiguration; - - public GetTopWatchedContentRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetTopWatchedContentRequestBuilder type(GetTopWatchedContentQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public GetTopWatchedContentRequestBuilder includeGuids(GetTopWatchedContentQueryParamIncludeGuids includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = Optional.of(includeGuids); - return this; - } - - public GetTopWatchedContentRequestBuilder includeGuids(Optional includeGuids) { - Utils.checkNotNull(includeGuids, "includeGuids"); - this.includeGuids = includeGuids; - return this; - } - - - private GetTopWatchedContentRequest buildRequest() { - if (includeGuids == null) { - includeGuids = _SINGLETON_VALUE_IncludeGuids.value(); - } - - GetTopWatchedContentRequest request = new GetTopWatchedContentRequest(type, - includeGuids); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetTopWatchedContent.Async(sdkConfiguration); - GetTopWatchedContentRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeGuids = - new LazySingletonValue<>( - "includeGuids", - "0", - new TypeReference>() {}); -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTopWatchedContentResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTopWatchedContentResponse.java deleted file mode 100644 index 23d62d96..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTopWatchedContentResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetTopWatchedContentResponse implements AsyncResponse { - /** - * 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 metadata of the library item. - */ - private Optional object; - - @JsonCreator - public GetTopWatchedContentResponse( - 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 GetTopWatchedContentResponse( - 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 metadata of the library item. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetTopWatchedContentResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetTopWatchedContentResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTopWatchedContentResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The metadata of the library item. - */ - public GetTopWatchedContentResponse withObject(GetTopWatchedContentResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The metadata of the library item. - */ - public GetTopWatchedContentResponse 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; - } - GetTopWatchedContentResponse other = (GetTopWatchedContentResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetTopWatchedContentResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 metadata of the library item. - */ - public Builder object(GetTopWatchedContentResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The metadata of the library item. - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetTopWatchedContentResponse build() { - - return new GetTopWatchedContentResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTranscodeSessionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTranscodeSessionsRequestBuilder.java deleted file mode 100644 index 60078751..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTranscodeSessionsRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetTranscodeSessions; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetTranscodeSessionsRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetTranscodeSessionsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetTranscodeSessions.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTranscodeSessionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTranscodeSessionsResponse.java deleted file mode 100644 index 59074dbe..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTranscodeSessionsResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetTranscodeSessionsResponse implements AsyncResponse { - /** - * 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 Transcode Sessions - */ - private Optional object; - - @JsonCreator - public GetTranscodeSessionsResponse( - 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 GetTranscodeSessionsResponse( - 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 Transcode Sessions - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetTranscodeSessionsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetTranscodeSessionsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetTranscodeSessionsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Transcode Sessions - */ - public GetTranscodeSessionsResponse withObject(GetTranscodeSessionsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The Transcode Sessions - */ - public GetTranscodeSessionsResponse 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; - } - GetTranscodeSessionsResponse other = (GetTranscodeSessionsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetTranscodeSessionsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Transcode Sessions - */ - public Builder object(GetTranscodeSessionsResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The Transcode Sessions - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetTranscodeSessionsResponse build() { - - return new GetTranscodeSessionsResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTransientTokenRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTransientTokenRequestBuilder.java index 39bff5fc..26a4e850 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTransientTokenRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTransientTokenRequestBuilder.java @@ -6,9 +6,7 @@ package dev.plexapi.sdk.models.operations.async; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType; import dev.plexapi.sdk.models.operations.GetTransientTokenRequest; -import dev.plexapi.sdk.models.operations.Scope; import dev.plexapi.sdk.operations.GetTransientToken; import dev.plexapi.sdk.utils.Utils; import java.lang.Exception; @@ -16,40 +14,23 @@ import java.util.concurrent.CompletableFuture; public class GetTransientTokenRequestBuilder { - private GetTransientTokenQueryParamType type; - private Scope scope; + private GetTransientTokenRequest request; private final SDKConfiguration sdkConfiguration; public GetTransientTokenRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public GetTransientTokenRequestBuilder type(GetTransientTokenQueryParamType type) { - Utils.checkNotNull(type, "type"); - this.type = type; + public GetTransientTokenRequestBuilder request(GetTransientTokenRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - public GetTransientTokenRequestBuilder scope(Scope scope) { - Utils.checkNotNull(scope, "scope"); - this.scope = scope; - return this; - } - - - private GetTransientTokenRequest buildRequest() { - - GetTransientTokenRequest request = new GetTransientTokenRequest(type, - scope); - - return request; - } - public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new GetTransientToken.Async(sdkConfiguration); - GetTransientTokenRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTransientTokenResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTransientTokenResponse.java index a196cf71..3955f275 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetTransientTokenResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetTransientTokenResponse.java @@ -5,13 +5,16 @@ package dev.plexapi.sdk.models.operations.async; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetTransientTokenResponseBody; import dev.plexapi.sdk.utils.AsyncResponse; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Utils; import java.lang.Integer; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.net.http.HttpResponse; +import java.util.Optional; public class GetTransientTokenResponse implements AsyncResponse { @@ -30,17 +33,33 @@ public class GetTransientTokenResponse implements AsyncResponse { */ private HttpResponse rawResponse; + /** + * OK + */ + private Optional object; + @JsonCreator public GetTransientTokenResponse( String contentType, int statusCode, - HttpResponse rawResponse) { + 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 GetTransientTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -67,6 +86,15 @@ public class GetTransientTokenResponse implements AsyncResponse { return rawResponse; } + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + public static Builder builder() { return new Builder(); } @@ -99,6 +127,25 @@ public class GetTransientTokenResponse implements AsyncResponse { return this; } + /** + * OK + */ + public GetTransientTokenResponse withObject(GetTransientTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetTransientTokenResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -111,13 +158,15 @@ public class GetTransientTokenResponse implements AsyncResponse { return Utils.enhancedDeepEquals(this.contentType, other.contentType) && Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); } @Override public int hashCode() { return Utils.enhancedHash( - contentType, statusCode, rawResponse); + contentType, statusCode, rawResponse, + object); } @Override @@ -125,7 +174,8 @@ public class GetTransientTokenResponse implements AsyncResponse { return Utils.toString(GetTransientTokenResponse.class, "contentType", contentType, "statusCode", statusCode, - "rawResponse", rawResponse); + "rawResponse", rawResponse, + "object", object); } @SuppressWarnings("UnusedReturnValue") @@ -137,6 +187,8 @@ public class GetTransientTokenResponse implements AsyncResponse { private HttpResponse rawResponse; + private Optional object = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -171,10 +223,30 @@ public class GetTransientTokenResponse implements AsyncResponse { return this; } + + /** + * OK + */ + public Builder object(GetTransientTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + public GetTransientTokenResponse build() { return new GetTransientTokenResponse( - contentType, statusCode, rawResponse); + contentType, statusCode, rawResponse, + object); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdateStatusRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdateStatusRequestBuilder.java deleted file mode 100644 index 6a2feaa2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdateStatusRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetUpdateStatus; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class GetUpdateStatusRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public GetUpdateStatusRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetUpdateStatus.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdateStatusResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdateStatusResponse.java deleted file mode 100644 index 67abb839..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdateStatusResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetUpdateStatusResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetUpdateStatusResponse implements AsyncResponse { - /** - * 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 Server Updates - */ - private Optional object; - - @JsonCreator - public GetUpdateStatusResponse( - 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 GetUpdateStatusResponse( - 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 Server Updates - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetUpdateStatusResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetUpdateStatusResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUpdateStatusResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * The Server Updates - */ - public GetUpdateStatusResponse withObject(GetUpdateStatusResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * The Server Updates - */ - public GetUpdateStatusResponse 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; - } - GetUpdateStatusResponse other = (GetUpdateStatusResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetUpdateStatusResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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 Server Updates - */ - public Builder object(GetUpdateStatusResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * The Server Updates - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetUpdateStatusResponse build() { - - return new GetUpdateStatusResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdatesStatusRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdatesStatusRequestBuilder.java new file mode 100644 index 00000000..950a7fb8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdatesStatusRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.GetUpdatesStatus; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class GetUpdatesStatusRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public GetUpdatesStatusRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new GetUpdatesStatus.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdatesStatusResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdatesStatusResponse.java new file mode 100644 index 00000000..d243355f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/GetUpdatesStatusResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.GetUpdatesStatusResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetUpdatesStatusResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public GetUpdatesStatusResponse( + 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 GetUpdatesStatusResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetUpdatesStatusResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetUpdatesStatusResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetUpdatesStatusResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetUpdatesStatusResponse withObject(GetUpdatesStatusResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public GetUpdatesStatusResponse 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; + } + GetUpdatesStatusResponse other = (GetUpdatesStatusResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetUpdatesStatusResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(GetUpdatesStatusResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetUpdatesStatusResponse build() { + + return new GetUpdatesStatusResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUserFriendsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetUserFriendsRequestBuilder.java deleted file mode 100644 index 98add9d2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUserFriendsRequestBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.GetUserFriends; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetUserFriendsRequestBuilder { - - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetUserFriendsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetUserFriendsRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetUserFriendsRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new GetUserFriends.Async(sdkConfiguration, serverURL); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUserFriendsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetUserFriendsResponse.java deleted file mode 100644 index f0f2e671..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUserFriendsResponse.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.Friend; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Optional; - - -public class GetUserFriendsResponse implements AsyncResponse { - /** - * 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; - - /** - * Friends Data - */ - private Optional> friends; - - @JsonCreator - public GetUserFriendsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional> friends) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(friends, "friends"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.friends = friends; - } - - public GetUserFriendsResponse( - 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; - } - - /** - * Friends Data - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> friends() { - return (Optional>) friends; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetUserFriendsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetUserFriendsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUserFriendsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Friends Data - */ - public GetUserFriendsResponse withFriends(List friends) { - Utils.checkNotNull(friends, "friends"); - this.friends = Optional.ofNullable(friends); - return this; - } - - - /** - * Friends Data - */ - public GetUserFriendsResponse withFriends(Optional> friends) { - Utils.checkNotNull(friends, "friends"); - this.friends = friends; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUserFriendsResponse other = (GetUserFriendsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.friends, other.friends); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - friends); - } - - @Override - public String toString() { - return Utils.toString(GetUserFriendsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "friends", friends); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional> friends = 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; - } - - - /** - * Friends Data - */ - public Builder friends(List friends) { - Utils.checkNotNull(friends, "friends"); - this.friends = Optional.ofNullable(friends); - return this; - } - - /** - * Friends Data - */ - public Builder friends(Optional> friends) { - Utils.checkNotNull(friends, "friends"); - this.friends = friends; - return this; - } - - public GetUserFriendsResponse build() { - - return new GetUserFriendsResponse( - contentType, statusCode, rawResponse, - friends); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUsersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetUsersRequestBuilder.java deleted file mode 100644 index c5ddd516..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUsersRequestBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetUsersRequest; -import dev.plexapi.sdk.operations.GetUsers; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetUsersRequestBuilder { - - private GetUsersRequest request; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetUsersRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetUsersRequestBuilder request(GetUsersRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetUsersRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetUsersRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetUsers.Async(sdkConfiguration, serverURL); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUsersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetUsersResponse.java deleted file mode 100644 index 4bf89157..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetUsersResponse.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetUsersResponse implements AsyncResponse { - /** - * 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; - - - private Optional body; - - @JsonCreator - public GetUsersResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional body) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(body, "body"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.body = body; - } - - public GetUsersResponse( - 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; - } - - @JsonIgnore - public Blob body() { - return rawResponse.body(); - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetUsersResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetUsersResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetUsersResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public GetUsersResponse withBody(byte[] body) { - Utils.checkNotNull(body, "body"); - this.body = Optional.ofNullable(body); - return this; - } - - - public GetUsersResponse withBody(Optional body) { - Utils.checkNotNull(body, "body"); - this.body = body; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersResponse other = (GetUsersResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.body, other.body); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - body); - } - - @Override - public String toString() { - return Utils.toString(GetUsersResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "body", body); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional body = 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; - } - - - public Builder body(byte[] body) { - Utils.checkNotNull(body, "body"); - this.body = Optional.ofNullable(body); - return this; - } - - public Builder body(Optional body) { - Utils.checkNotNull(body, "body"); - this.body = body; - return this; - } - - public GetUsersResponse build() { - - return new GetUsersResponse( - contentType, statusCode, rawResponse, - body); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetWatchListRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetWatchListRequestBuilder.java deleted file mode 100644 index dcc22a78..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetWatchListRequestBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.GetWatchListRequest; -import dev.plexapi.sdk.operations.GetWatchList; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class GetWatchListRequestBuilder { - - private GetWatchListRequest request; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public GetWatchListRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public GetWatchListRequestBuilder request(GetWatchListRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public GetWatchListRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public GetWatchListRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new GetWatchList.Async(sdkConfiguration, serverURL); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/GetWatchListResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/GetWatchListResponse.java deleted file mode 100644 index 09e49c5e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/GetWatchListResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.GetWatchListResponseBody; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class GetWatchListResponse implements AsyncResponse { - /** - * 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; - - /** - * Watchlist Data - */ - private Optional object; - - @JsonCreator - public GetWatchListResponse( - 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 GetWatchListResponse( - 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; - } - - /** - * Watchlist Data - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional object() { - return (Optional) object; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public GetWatchListResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public GetWatchListResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public GetWatchListResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Watchlist Data - */ - public GetWatchListResponse withObject(GetWatchListResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - /** - * Watchlist Data - */ - public GetWatchListResponse 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; - } - GetWatchListResponse other = (GetWatchListResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.object, other.object); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - object); - } - - @Override - public String toString() { - return Utils.toString(GetWatchListResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "object", object); - } - - @SuppressWarnings("UnusedReturnValue") - 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; - } - - - /** - * Watchlist Data - */ - public Builder object(GetWatchListResponseBody object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - /** - * Watchlist Data - */ - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public GetWatchListResponse build() { - - return new GetWatchListResponse( - contentType, statusCode, rawResponse, - object); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/IngestTransientItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/IngestTransientItemRequestBuilder.java new file mode 100644 index 00000000..f7acc4d8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/IngestTransientItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.IngestTransientItemRequest; +import dev.plexapi.sdk.operations.IngestTransientItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class IngestTransientItemRequestBuilder { + + private IngestTransientItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public IngestTransientItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public IngestTransientItemRequestBuilder request(IngestTransientItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new IngestTransientItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/IngestTransientItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/IngestTransientItemResponse.java new file mode 100644 index 00000000..2ed48579 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/IngestTransientItemResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class IngestTransientItemResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public IngestTransientItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public IngestTransientItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public IngestTransientItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public IngestTransientItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public IngestTransientItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public IngestTransientItemResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public IngestTransientItemResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public IngestTransientItemResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IngestTransientItemResponse other = (IngestTransientItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(IngestTransientItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public IngestTransientItemResponse build() { + + return new IngestTransientItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListActivitiesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListActivitiesRequestBuilder.java new file mode 100644 index 00000000..305ddee5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListActivitiesRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListActivities; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListActivitiesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ListActivitiesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new ListActivities.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListActivitiesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListActivitiesResponse.java new file mode 100644 index 00000000..37da17df --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListActivitiesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ListActivitiesResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ListActivitiesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public ListActivitiesResponse( + 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 ListActivitiesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListActivitiesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListActivitiesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListActivitiesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListActivitiesResponse withObject(ListActivitiesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListActivitiesResponse 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; + } + ListActivitiesResponse other = (ListActivitiesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ListActivitiesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(ListActivitiesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListActivitiesResponse build() { + + return new ListActivitiesResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListContentRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListContentRequestBuilder.java new file mode 100644 index 00000000..44d7f33b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListContentRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListContentRequest; +import dev.plexapi.sdk.operations.ListContent; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListContentRequestBuilder { + + private ListContentRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListContentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListContentRequestBuilder request(ListContentRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListContent.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListContentResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListContentResponse.java new file mode 100644 index 00000000..9883d38f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListContentResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ListContentResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public ListContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public ListContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListContentResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListContentResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListContentResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListContentResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public ListContentResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public ListContentResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListContentResponse other = (ListContentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(ListContentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListContentResponse build() { + + return new ListContentResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListDVRsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDVRsRequestBuilder.java new file mode 100644 index 00000000..d5d0185c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDVRsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListDVRs; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListDVRsRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ListDVRsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new ListDVRs.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListDVRsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDVRsResponse.java new file mode 100644 index 00000000..3e6ee9ab --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDVRsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ListDVRsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ListDVRsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ListDVRsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ListDVRsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListDVRsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListDVRsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListDVRsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListDVRsResponse withObject(ListDVRsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListDVRsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListDVRsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListDVRsResponse other = (ListDVRsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ListDVRsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ListDVRsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListDVRsResponse build() { + + return new ListDVRsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListDevicesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDevicesRequestBuilder.java new file mode 100644 index 00000000..c76e715b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDevicesRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListDevices; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListDevicesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ListDevicesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new ListDevices.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListDevicesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDevicesResponse.java new file mode 100644 index 00000000..ec8836c3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDevicesResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ListDevicesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + + private Map> headers; + + @JsonCreator + public ListDevicesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + this.headers = headers; + } + + public ListDevicesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListDevicesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListDevicesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListDevicesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListDevicesResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public ListDevicesResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public ListDevicesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListDevicesResponse other = (ListDevicesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice, headers); + } + + @Override + public String toString() { + return Utils.toString(ListDevicesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListDevicesResponse build() { + + return new ListDevicesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListDownloadQueueItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDownloadQueueItemsRequestBuilder.java new file mode 100644 index 00000000..3aca36ad --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDownloadQueueItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsRequest; +import dev.plexapi.sdk.operations.ListDownloadQueueItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListDownloadQueueItemsRequestBuilder { + + private ListDownloadQueueItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListDownloadQueueItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListDownloadQueueItemsRequestBuilder request(ListDownloadQueueItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListDownloadQueueItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListDownloadQueueItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDownloadQueueItemsResponse.java new file mode 100644 index 00000000..cedc1fc7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListDownloadQueueItemsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ListDownloadQueueItemsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public ListDownloadQueueItemsResponse( + 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 ListDownloadQueueItemsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListDownloadQueueItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListDownloadQueueItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListDownloadQueueItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListDownloadQueueItemsResponse withObject(ListDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListDownloadQueueItemsResponse 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; + } + ListDownloadQueueItemsResponse other = (ListDownloadQueueItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ListDownloadQueueItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(ListDownloadQueueItemsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListDownloadQueueItemsResponse build() { + + return new ListDownloadQueueItemsResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListHubsRequestBuilder.java new file mode 100644 index 00000000..176236f1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListHubsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListHubsRequest; +import dev.plexapi.sdk.operations.ListHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListHubsRequestBuilder { + + private ListHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListHubsRequestBuilder request(ListHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListHubs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListHubsResponse.java new file mode 100644 index 00000000..03fbc2f4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListHubsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ListHubsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ListHubsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ListHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ListHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListHubsResponse withObject(ListHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListHubsResponse other = (ListHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ListHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ListHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListHubsResponse build() { + + return new ListHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListLineupsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListLineupsRequestBuilder.java new file mode 100644 index 00000000..f77706bb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListLineupsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListLineupsRequest; +import dev.plexapi.sdk.operations.ListLineups; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListLineupsRequestBuilder { + + private ListLineupsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListLineupsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListLineupsRequestBuilder request(ListLineupsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListLineups.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListLineupsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListLineupsResponse.java new file mode 100644 index 00000000..a3cf295b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListLineupsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithLineup; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ListLineupsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithLineup; + + + private Map> headers; + + @JsonCreator + public ListLineupsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithLineup, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithLineup = mediaContainerWithLineup; + this.headers = headers; + } + + public ListLineupsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithLineup() { + return (Optional) mediaContainerWithLineup; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListLineupsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListLineupsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListLineupsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListLineupsResponse withMediaContainerWithLineup(MediaContainerWithLineup mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = Optional.ofNullable(mediaContainerWithLineup); + return this; + } + + + /** + * OK + */ + public ListLineupsResponse withMediaContainerWithLineup(Optional mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = mediaContainerWithLineup; + return this; + } + + public ListLineupsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListLineupsResponse other = (ListLineupsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithLineup, other.mediaContainerWithLineup) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithLineup, headers); + } + + @Override + public String toString() { + return Utils.toString(ListLineupsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithLineup", mediaContainerWithLineup, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithLineup = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithLineup(MediaContainerWithLineup mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = Optional.ofNullable(mediaContainerWithLineup); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithLineup(Optional mediaContainerWithLineup) { + Utils.checkNotNull(mediaContainerWithLineup, "mediaContainerWithLineup"); + this.mediaContainerWithLineup = mediaContainerWithLineup; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListLineupsResponse build() { + + return new ListLineupsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithLineup, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListMatchesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListMatchesRequestBuilder.java new file mode 100644 index 00000000..f90e437c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListMatchesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListMatchesRequest; +import dev.plexapi.sdk.operations.ListMatches; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListMatchesRequestBuilder { + + private ListMatchesRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListMatchesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListMatchesRequestBuilder request(ListMatchesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListMatches.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListMatchesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListMatchesResponse.java new file mode 100644 index 00000000..90045ba9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListMatchesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ListMatchesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public ListMatchesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public ListMatchesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListMatchesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListMatchesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListMatchesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListMatchesResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public ListMatchesResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListMatchesResponse other = (ListMatchesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(ListMatchesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public ListMatchesResponse build() { + + return new ListMatchesResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListMomentsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListMomentsRequestBuilder.java new file mode 100644 index 00000000..f2352600 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListMomentsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListMomentsRequest; +import dev.plexapi.sdk.operations.ListMoments; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListMomentsRequestBuilder { + + private ListMomentsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListMomentsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListMomentsRequestBuilder request(ListMomentsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListMoments.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListMomentsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListMomentsResponse.java new file mode 100644 index 00000000..4f4591fc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListMomentsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ListMomentsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithArtwork; + + @JsonCreator + public ListMomentsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithArtwork) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + } + + public ListMomentsResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithArtwork() { + return (Optional) mediaContainerWithArtwork; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListMomentsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListMomentsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListMomentsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListMomentsResponse withMediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + + /** + * OK + */ + public ListMomentsResponse withMediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListMomentsResponse other = (ListMomentsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithArtwork, other.mediaContainerWithArtwork); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + @Override + public String toString() { + return Utils.toString(ListMomentsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithArtwork", mediaContainerWithArtwork); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithArtwork = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithArtwork(MediaContainerWithArtwork mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = Optional.ofNullable(mediaContainerWithArtwork); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithArtwork(Optional mediaContainerWithArtwork) { + Utils.checkNotNull(mediaContainerWithArtwork, "mediaContainerWithArtwork"); + this.mediaContainerWithArtwork = mediaContainerWithArtwork; + return this; + } + + public ListMomentsResponse build() { + + return new ListMomentsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithArtwork); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListPersonMediaRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPersonMediaRequestBuilder.java new file mode 100644 index 00000000..779a5c38 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPersonMediaRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListPersonMediaRequest; +import dev.plexapi.sdk.operations.ListPersonMedia; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListPersonMediaRequestBuilder { + + private ListPersonMediaRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListPersonMediaRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListPersonMediaRequestBuilder request(ListPersonMediaRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListPersonMedia.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListPersonMediaResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPersonMediaResponse.java new file mode 100644 index 00000000..073e7fc9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPersonMediaResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ListPersonMediaResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public ListPersonMediaResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public ListPersonMediaResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListPersonMediaResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListPersonMediaResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListPersonMediaResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListPersonMediaResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public ListPersonMediaResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPersonMediaResponse other = (ListPersonMediaResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(ListPersonMediaResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public ListPersonMediaResponse build() { + + return new ListPersonMediaResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaybackHistoryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaybackHistoryRequestBuilder.java new file mode 100644 index 00000000..2e162757 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaybackHistoryRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryRequest; +import dev.plexapi.sdk.operations.ListPlaybackHistory; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListPlaybackHistoryRequestBuilder { + + private ListPlaybackHistoryRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListPlaybackHistoryRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListPlaybackHistoryRequestBuilder request(ListPlaybackHistoryRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListPlaybackHistory.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaybackHistoryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaybackHistoryResponse.java new file mode 100644 index 00000000..82b1e354 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaybackHistoryResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ListPlaybackHistoryResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ListPlaybackHistoryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ListPlaybackHistoryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListPlaybackHistoryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListPlaybackHistoryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListPlaybackHistoryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListPlaybackHistoryResponse withObject(ListPlaybackHistoryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListPlaybackHistoryResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListPlaybackHistoryResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPlaybackHistoryResponse other = (ListPlaybackHistoryResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ListPlaybackHistoryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ListPlaybackHistoryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListPlaybackHistoryResponse build() { + + return new ListPlaybackHistoryResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaylistsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaylistsRequestBuilder.java new file mode 100644 index 00000000..69c1e8c8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaylistsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListPlaylistsRequest; +import dev.plexapi.sdk.operations.ListPlaylists; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListPlaylistsRequestBuilder { + + private ListPlaylistsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListPlaylistsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListPlaylistsRequestBuilder request(ListPlaylistsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListPlaylists.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaylistsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaylistsResponse.java new file mode 100644 index 00000000..5dfb0845 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListPlaylistsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ListPlaylistsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + + private Map> headers; + + @JsonCreator + public ListPlaylistsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + this.headers = headers; + } + + public ListPlaylistsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListPlaylistsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListPlaylistsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListPlaylistsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListPlaylistsResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public ListPlaylistsResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public ListPlaylistsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPlaylistsResponse other = (ListPlaylistsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(ListPlaylistsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListPlaylistsResponse build() { + + return new ListPlaylistsResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListProvidersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListProvidersRequestBuilder.java new file mode 100644 index 00000000..f942e5c8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListProvidersRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListProviders; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListProvidersRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ListProvidersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new ListProviders.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListProvidersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListProvidersResponse.java new file mode 100644 index 00000000..82589a9b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListProvidersResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ListProvidersResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ListProvidersResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public ListProvidersResponse( + 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 ListProvidersResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListProvidersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListProvidersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListProvidersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListProvidersResponse withObject(ListProvidersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListProvidersResponse 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; + } + ListProvidersResponse other = (ListProvidersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ListProvidersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(ListProvidersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListProvidersResponse build() { + + return new ListProvidersResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListSessionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSessionsRequestBuilder.java new file mode 100644 index 00000000..20e533c7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSessionsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ListSessions; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListSessionsRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ListSessionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new ListSessions.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListSessionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSessionsResponse.java new file mode 100644 index 00000000..228997b3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSessionsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ListSessionsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ListSessionsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ListSessionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ListSessionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListSessionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListSessionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListSessionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListSessionsResponse withObject(ListSessionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListSessionsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListSessionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListSessionsResponse other = (ListSessionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ListSessionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ListSessionsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ListSessionsResponse build() { + + return new ListSessionsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListSimilarRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSimilarRequestBuilder.java new file mode 100644 index 00000000..51e6dfa4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSimilarRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListSimilarRequest; +import dev.plexapi.sdk.operations.ListSimilar; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListSimilarRequestBuilder { + + private ListSimilarRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListSimilarRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListSimilarRequestBuilder request(ListSimilarRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListSimilar.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListSimilarResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSimilarResponse.java new file mode 100644 index 00000000..e74bf59a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSimilarResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ListSimilarResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public ListSimilarResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public ListSimilarResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListSimilarResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListSimilarResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListSimilarResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListSimilarResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public ListSimilarResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListSimilarResponse other = (ListSimilarResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(ListSimilarResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public ListSimilarResponse build() { + + return new ListSimilarResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListSonicallySimilarRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSonicallySimilarRequestBuilder.java new file mode 100644 index 00000000..5eec1db9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSonicallySimilarRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListSonicallySimilarRequest; +import dev.plexapi.sdk.operations.ListSonicallySimilar; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListSonicallySimilarRequestBuilder { + + private ListSonicallySimilarRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListSonicallySimilarRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListSonicallySimilarRequestBuilder request(ListSonicallySimilarRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListSonicallySimilar.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListSonicallySimilarResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSonicallySimilarResponse.java new file mode 100644 index 00000000..7404c8a7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListSonicallySimilarResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ListSonicallySimilarResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public ListSonicallySimilarResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public ListSonicallySimilarResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListSonicallySimilarResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListSonicallySimilarResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListSonicallySimilarResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListSonicallySimilarResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public ListSonicallySimilarResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListSonicallySimilarResponse other = (ListSonicallySimilarResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(ListSonicallySimilarResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public ListSonicallySimilarResponse build() { + + return new ListSonicallySimilarResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListTopUsersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListTopUsersRequestBuilder.java new file mode 100644 index 00000000..35d0d784 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListTopUsersRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ListTopUsersRequest; +import dev.plexapi.sdk.operations.ListTopUsers; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ListTopUsersRequestBuilder { + + private ListTopUsersRequest request; + private final SDKConfiguration sdkConfiguration; + + public ListTopUsersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListTopUsersRequestBuilder request(ListTopUsersRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ListTopUsers.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ListTopUsersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ListTopUsersResponse.java new file mode 100644 index 00000000..1070a2e6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ListTopUsersResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ListTopUsersResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ListTopUsersResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public ListTopUsersResponse( + 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 ListTopUsersResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListTopUsersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListTopUsersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListTopUsersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ListTopUsersResponse withObject(ListTopUsersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ListTopUsersResponse 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; + } + ListTopUsersResponse other = (ListTopUsersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ListTopUsersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(ListTopUsersResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ListTopUsersResponse build() { + + return new ListTopUsersResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/LogLineRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/LogLineRequestBuilder.java deleted file mode 100644 index b6f2b97e..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/LogLineRequestBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.Level; -import dev.plexapi.sdk.models.operations.LogLineRequest; -import dev.plexapi.sdk.operations.LogLine; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.concurrent.CompletableFuture; - -public class LogLineRequestBuilder { - - private Level level; - private String message; - private String source; - private final SDKConfiguration sdkConfiguration; - - public LogLineRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public LogLineRequestBuilder level(Level level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - public LogLineRequestBuilder message(String message) { - Utils.checkNotNull(message, "message"); - this.message = message; - return this; - } - - public LogLineRequestBuilder source(String source) { - Utils.checkNotNull(source, "source"); - this.source = source; - return this; - } - - - private LogLineRequest buildRequest() { - - LogLineRequest request = new LogLineRequest(level, - message, - source); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new LogLine.Async(sdkConfiguration); - LogLineRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/LogLineResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/LogLineResponse.java deleted file mode 100644 index fab99e70..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/LogLineResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class LogLineResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public LogLineResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public LogLineResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public LogLineResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogLineResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogLineResponse other = (LogLineResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogLineResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogLineResponse build() { - - return new LogLineResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/LogMultiLineRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/LogMultiLineRequestBuilder.java deleted file mode 100644 index 448e12d3..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/LogMultiLineRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.LogMultiLine; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.concurrent.CompletableFuture; - -public class LogMultiLineRequestBuilder { - - private String request; - private final SDKConfiguration sdkConfiguration; - - public LogMultiLineRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public LogMultiLineRequestBuilder request(String request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new LogMultiLine.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/LogMultiLineResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/LogMultiLineResponse.java deleted file mode 100644 index 324ecd8c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/LogMultiLineResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class LogMultiLineResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public LogMultiLineResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public LogMultiLineResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public LogMultiLineResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public LogMultiLineResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogMultiLineResponse other = (LogMultiLineResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(LogMultiLineResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public LogMultiLineResponse build() { - - return new LogMultiLineResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MakeDecisionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MakeDecisionRequestBuilder.java new file mode 100644 index 00000000..281fc370 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MakeDecisionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.MakeDecisionRequest; +import dev.plexapi.sdk.operations.MakeDecision; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class MakeDecisionRequestBuilder { + + private MakeDecisionRequest request; + private final SDKConfiguration sdkConfiguration; + + public MakeDecisionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MakeDecisionRequestBuilder request(MakeDecisionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new MakeDecision.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MakeDecisionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MakeDecisionResponse.java new file mode 100644 index 00000000..1f23ce70 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MakeDecisionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDecision; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class MakeDecisionResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithDecision; + + @JsonCreator + public MakeDecisionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDecision) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDecision = mediaContainerWithDecision; + } + + public MakeDecisionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDecision() { + return (Optional) mediaContainerWithDecision; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MakeDecisionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MakeDecisionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MakeDecisionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public MakeDecisionResponse withMediaContainerWithDecision(MediaContainerWithDecision mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = Optional.ofNullable(mediaContainerWithDecision); + return this; + } + + + /** + * OK + */ + public MakeDecisionResponse withMediaContainerWithDecision(Optional mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = mediaContainerWithDecision; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MakeDecisionResponse other = (MakeDecisionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDecision, other.mediaContainerWithDecision); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDecision); + } + + @Override + public String toString() { + return Utils.toString(MakeDecisionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDecision", mediaContainerWithDecision); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDecision = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDecision(MediaContainerWithDecision mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = Optional.ofNullable(mediaContainerWithDecision); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDecision(Optional mediaContainerWithDecision) { + Utils.checkNotNull(mediaContainerWithDecision, "mediaContainerWithDecision"); + this.mediaContainerWithDecision = mediaContainerWithDecision; + return this; + } + + public MakeDecisionResponse build() { + + return new MakeDecisionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDecision); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MarkPlayedRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MarkPlayedRequestBuilder.java index f25969d5..e84cfbec 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/MarkPlayedRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MarkPlayedRequestBuilder.java @@ -9,38 +9,28 @@ import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.models.operations.MarkPlayedRequest; import dev.plexapi.sdk.operations.MarkPlayed; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; import java.lang.Exception; import java.util.concurrent.CompletableFuture; public class MarkPlayedRequestBuilder { - private Double key; + private MarkPlayedRequest request; private final SDKConfiguration sdkConfiguration; public MarkPlayedRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public MarkPlayedRequestBuilder key(double key) { - Utils.checkNotNull(key, "key"); - this.key = key; + public MarkPlayedRequestBuilder request(MarkPlayedRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private MarkPlayedRequest buildRequest() { - - MarkPlayedRequest request = new MarkPlayedRequest(key); - - return request; - } - public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new MarkPlayed.Async(sdkConfiguration); - MarkPlayedRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MarkUnplayedRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MarkUnplayedRequestBuilder.java deleted file mode 100644 index 934b6256..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/MarkUnplayedRequestBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.MarkUnplayedRequest; -import dev.plexapi.sdk.operations.MarkUnplayed; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class MarkUnplayedRequestBuilder { - - private Double key; - private final SDKConfiguration sdkConfiguration; - - public MarkUnplayedRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public MarkUnplayedRequestBuilder key(double key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - - private MarkUnplayedRequest buildRequest() { - - MarkUnplayedRequest request = new MarkUnplayedRequest(key); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new MarkUnplayed.Async(sdkConfiguration); - MarkUnplayedRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MarkUnplayedResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MarkUnplayedResponse.java deleted file mode 100644 index ed588c44..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/MarkUnplayedResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class MarkUnplayedResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public MarkUnplayedResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public MarkUnplayedResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public MarkUnplayedResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public MarkUnplayedResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MarkUnplayedResponse other = (MarkUnplayedResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(MarkUnplayedResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public MarkUnplayedResponse build() { - - return new MarkUnplayedResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MatchItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MatchItemRequestBuilder.java new file mode 100644 index 00000000..120ff74a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MatchItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.MatchItemRequest; +import dev.plexapi.sdk.operations.MatchItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class MatchItemRequestBuilder { + + private MatchItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public MatchItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MatchItemRequestBuilder request(MatchItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new MatchItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MatchItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MatchItemResponse.java new file mode 100644 index 00000000..d0aded02 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MatchItemResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class MatchItemResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public MatchItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MatchItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MatchItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MatchItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchItemResponse other = (MatchItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(MatchItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public MatchItemResponse build() { + + return new MatchItemResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MergeItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MergeItemsRequestBuilder.java new file mode 100644 index 00000000..b47eb0c8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MergeItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.MergeItemsRequest; +import dev.plexapi.sdk.operations.MergeItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class MergeItemsRequestBuilder { + + private MergeItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public MergeItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MergeItemsRequestBuilder request(MergeItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new MergeItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MergeItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MergeItemsResponse.java new file mode 100644 index 00000000..c428c4b8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MergeItemsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class MergeItemsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public MergeItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MergeItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MergeItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MergeItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeItemsResponse other = (MergeItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(MergeItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public MergeItemsResponse build() { + + return new MergeItemsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ModifyDeviceRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ModifyDeviceRequestBuilder.java new file mode 100644 index 00000000..d8987b60 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ModifyDeviceRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ModifyDeviceRequest; +import dev.plexapi.sdk.operations.ModifyDevice; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ModifyDeviceRequestBuilder { + + private ModifyDeviceRequest request; + private final SDKConfiguration sdkConfiguration; + + public ModifyDeviceRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ModifyDeviceRequestBuilder request(ModifyDeviceRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ModifyDevice.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ModifyDeviceResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ModifyDeviceResponse.java new file mode 100644 index 00000000..15a67f07 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ModifyDeviceResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ModifyDeviceResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ModifyDeviceResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public ModifyDeviceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public ModifyDeviceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ModifyDeviceResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ModifyDeviceResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ModifyDeviceResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ModifyDeviceResponse withObject(ModifyDeviceResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ModifyDeviceResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ModifyDeviceResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifyDeviceResponse other = (ModifyDeviceResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(ModifyDeviceResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(ModifyDeviceResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ModifyDeviceResponse build() { + + return new ModifyDeviceResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MoveCollectionItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MoveCollectionItemRequestBuilder.java new file mode 100644 index 00000000..77f3ef77 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MoveCollectionItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.MoveCollectionItemRequest; +import dev.plexapi.sdk.operations.MoveCollectionItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class MoveCollectionItemRequestBuilder { + + private MoveCollectionItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public MoveCollectionItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MoveCollectionItemRequestBuilder request(MoveCollectionItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new MoveCollectionItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MoveCollectionItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MoveCollectionItemResponse.java new file mode 100644 index 00000000..a5576833 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MoveCollectionItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class MoveCollectionItemResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + @JsonCreator + public MoveCollectionItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + } + + public MoveCollectionItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MoveCollectionItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MoveCollectionItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MoveCollectionItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public MoveCollectionItemResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public MoveCollectionItemResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MoveCollectionItemResponse other = (MoveCollectionItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + @Override + public String toString() { + return Utils.toString(MoveCollectionItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public MoveCollectionItemResponse build() { + + return new MoveCollectionItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MoveHubRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MoveHubRequestBuilder.java new file mode 100644 index 00000000..442667a4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MoveHubRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.MoveHubRequest; +import dev.plexapi.sdk.operations.MoveHub; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class MoveHubRequestBuilder { + + private MoveHubRequest request; + private final SDKConfiguration sdkConfiguration; + + public MoveHubRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MoveHubRequestBuilder request(MoveHubRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new MoveHub.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MoveHubResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MoveHubResponse.java new file mode 100644 index 00000000..9d31dd6a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MoveHubResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.GetResponses200; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class MoveHubResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional getResponses200; + + + private Map> headers; + + @JsonCreator + public MoveHubResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional getResponses200, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(getResponses200, "getResponses200"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.getResponses200 = getResponses200; + this.headers = headers; + } + + public MoveHubResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getResponses200() { + return (Optional) getResponses200; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MoveHubResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MoveHubResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MoveHubResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public MoveHubResponse withGetResponses200(GetResponses200 getResponses200) { + Utils.checkNotNull(getResponses200, "getResponses200"); + this.getResponses200 = Optional.ofNullable(getResponses200); + return this; + } + + + /** + * OK + */ + public MoveHubResponse withGetResponses200(Optional getResponses200) { + Utils.checkNotNull(getResponses200, "getResponses200"); + this.getResponses200 = getResponses200; + return this; + } + + public MoveHubResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MoveHubResponse other = (MoveHubResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getResponses200, other.getResponses200) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getResponses200, headers); + } + + @Override + public String toString() { + return Utils.toString(MoveHubResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getResponses200", getResponses200, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional getResponses200 = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder getResponses200(GetResponses200 getResponses200) { + Utils.checkNotNull(getResponses200, "getResponses200"); + this.getResponses200 = Optional.ofNullable(getResponses200); + return this; + } + + /** + * OK + */ + public Builder getResponses200(Optional getResponses200) { + Utils.checkNotNull(getResponses200, "getResponses200"); + this.getResponses200 = getResponses200; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public MoveHubResponse build() { + + return new MoveHubResponse( + contentType, statusCode, rawResponse, + getResponses200, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlayQueueItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlayQueueItemRequestBuilder.java new file mode 100644 index 00000000..69b25e6d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlayQueueItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.MovePlayQueueItemRequest; +import dev.plexapi.sdk.operations.MovePlayQueueItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class MovePlayQueueItemRequestBuilder { + + private MovePlayQueueItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public MovePlayQueueItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MovePlayQueueItemRequestBuilder request(MovePlayQueueItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new MovePlayQueueItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlayQueueItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlayQueueItemResponse.java new file mode 100644 index 00000000..3fada648 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlayQueueItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class MovePlayQueueItemResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public MovePlayQueueItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public MovePlayQueueItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MovePlayQueueItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MovePlayQueueItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MovePlayQueueItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public MovePlayQueueItemResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public MovePlayQueueItemResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MovePlayQueueItemResponse other = (MovePlayQueueItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(MovePlayQueueItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public MovePlayQueueItemResponse build() { + + return new MovePlayQueueItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlaylistItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlaylistItemRequestBuilder.java new file mode 100644 index 00000000..1666aaed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlaylistItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.MovePlaylistItemRequest; +import dev.plexapi.sdk.operations.MovePlaylistItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class MovePlaylistItemRequestBuilder { + + private MovePlaylistItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public MovePlaylistItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public MovePlaylistItemRequestBuilder request(MovePlaylistItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new MovePlaylistItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlaylistItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlaylistItemResponse.java new file mode 100644 index 00000000..2945b24a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/MovePlaylistItemResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class MovePlaylistItemResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public MovePlaylistItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public MovePlaylistItemResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public MovePlaylistItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public MovePlaylistItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public MovePlaylistItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public MovePlaylistItemResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public MovePlaylistItemResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MovePlaylistItemResponse other = (MovePlaylistItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(MovePlaylistItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public MovePlaylistItemResponse build() { + + return new MovePlaylistItemResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/OptimizeDatabaseRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/OptimizeDatabaseRequestBuilder.java new file mode 100644 index 00000000..06103037 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/OptimizeDatabaseRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.OptimizeDatabaseRequest; +import dev.plexapi.sdk.operations.OptimizeDatabase; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class OptimizeDatabaseRequestBuilder { + + private OptimizeDatabaseRequest request; + private final SDKConfiguration sdkConfiguration; + + public OptimizeDatabaseRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public OptimizeDatabaseRequestBuilder request(OptimizeDatabaseRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new OptimizeDatabase.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/OptimizeDatabaseResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/OptimizeDatabaseResponse.java new file mode 100644 index 00000000..cc01a837 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/OptimizeDatabaseResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class OptimizeDatabaseResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public OptimizeDatabaseResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public OptimizeDatabaseResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public OptimizeDatabaseResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public OptimizeDatabaseResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OptimizeDatabaseResponse other = (OptimizeDatabaseResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(OptimizeDatabaseResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public OptimizeDatabaseResponse build() { + + return new OptimizeDatabaseResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/PerformSearchRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/PerformSearchRequestBuilder.java deleted file mode 100644 index f9a821d1..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/PerformSearchRequestBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.PerformSearchRequest; -import dev.plexapi.sdk.operations.PerformSearch; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class PerformSearchRequestBuilder { - - private String query; - private Optional sectionId = Optional.empty(); - private Optional limit = Utils.readDefaultOrConstValue( - "limit", - "3", - new TypeReference>() {}); - private final SDKConfiguration sdkConfiguration; - - public PerformSearchRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public PerformSearchRequestBuilder query(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - public PerformSearchRequestBuilder sectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = Optional.of(sectionId); - return this; - } - - public PerformSearchRequestBuilder sectionId(Optional sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - public PerformSearchRequestBuilder limit(double limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.of(limit); - return this; - } - - public PerformSearchRequestBuilder limit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - - private PerformSearchRequest buildRequest() { - if (limit == null) { - limit = _SINGLETON_VALUE_Limit.value(); - } - - PerformSearchRequest request = new PerformSearchRequest(query, - sectionId, - limit); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new PerformSearch.Async(sdkConfiguration); - PerformSearchRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - private static final LazySingletonValue> _SINGLETON_VALUE_Limit = - new LazySingletonValue<>( - "limit", - "3", - new TypeReference>() {}); -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/PerformSearchResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/PerformSearchResponse.java deleted file mode 100644 index ba699211..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/PerformSearchResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class PerformSearchResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public PerformSearchResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public PerformSearchResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public PerformSearchResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformSearchResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformSearchResponse other = (PerformSearchResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformSearchResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformSearchResponse build() { - - return new PerformSearchResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/PerformVoiceSearchRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/PerformVoiceSearchRequestBuilder.java deleted file mode 100644 index a1e468b2..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/PerformVoiceSearchRequestBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.PerformVoiceSearchRequest; -import dev.plexapi.sdk.operations.PerformVoiceSearch; -import dev.plexapi.sdk.utils.LazySingletonValue; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class PerformVoiceSearchRequestBuilder { - - private String query; - private Optional sectionId = Optional.empty(); - private Optional limit = Utils.readDefaultOrConstValue( - "limit", - "3", - new TypeReference>() {}); - private final SDKConfiguration sdkConfiguration; - - public PerformVoiceSearchRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public PerformVoiceSearchRequestBuilder query(String query) { - Utils.checkNotNull(query, "query"); - this.query = query; - return this; - } - - public PerformVoiceSearchRequestBuilder sectionId(double sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = Optional.of(sectionId); - return this; - } - - public PerformVoiceSearchRequestBuilder sectionId(Optional sectionId) { - Utils.checkNotNull(sectionId, "sectionId"); - this.sectionId = sectionId; - return this; - } - - public PerformVoiceSearchRequestBuilder limit(double limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.of(limit); - return this; - } - - public PerformVoiceSearchRequestBuilder limit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - - private PerformVoiceSearchRequest buildRequest() { - if (limit == null) { - limit = _SINGLETON_VALUE_Limit.value(); - } - - PerformVoiceSearchRequest request = new PerformVoiceSearchRequest(query, - sectionId, - limit); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new PerformVoiceSearch.Async(sdkConfiguration); - PerformVoiceSearchRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } - - private static final LazySingletonValue> _SINGLETON_VALUE_Limit = - new LazySingletonValue<>( - "limit", - "3", - new TypeReference>() {}); -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/PerformVoiceSearchResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/PerformVoiceSearchResponse.java deleted file mode 100644 index 8c97b55b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/PerformVoiceSearchResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class PerformVoiceSearchResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public PerformVoiceSearchResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public PerformVoiceSearchResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public PerformVoiceSearchResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PerformVoiceSearchResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PerformVoiceSearchResponse other = (PerformVoiceSearchResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PerformVoiceSearchResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PerformVoiceSearchResponse build() { - - return new PerformVoiceSearchResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaArtsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaArtsRequestBuilder.java deleted file mode 100644 index 5abe3534..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaArtsRequestBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.PostMediaArtsRequest; -import dev.plexapi.sdk.operations.PostMediaArts; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class PostMediaArtsRequestBuilder { - - private Long ratingKey; - private Optional url = Optional.empty(); - private Optional requestBody = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public PostMediaArtsRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public PostMediaArtsRequestBuilder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public PostMediaArtsRequestBuilder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = Optional.of(url); - return this; - } - - public PostMediaArtsRequestBuilder url(Optional url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - public PostMediaArtsRequestBuilder requestBody(byte[] requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = Optional.of(requestBody); - return this; - } - - public PostMediaArtsRequestBuilder requestBody(Optional requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = requestBody; - return this; - } - - - private PostMediaArtsRequest buildRequest() { - - PostMediaArtsRequest request = new PostMediaArtsRequest(ratingKey, - url, - requestBody); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new PostMediaArts.Async(sdkConfiguration); - PostMediaArtsRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaArtsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaArtsResponse.java deleted file mode 100644 index e51af579..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaArtsResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class PostMediaArtsResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public PostMediaArtsResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public PostMediaArtsResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public PostMediaArtsResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostMediaArtsResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostMediaArtsResponse other = (PostMediaArtsResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PostMediaArtsResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PostMediaArtsResponse build() { - - return new PostMediaArtsResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaPosterRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaPosterRequestBuilder.java deleted file mode 100644 index 14994051..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaPosterRequestBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.PostMediaPosterRequest; -import dev.plexapi.sdk.operations.PostMediaPoster; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.Long; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class PostMediaPosterRequestBuilder { - - private Long ratingKey; - private Optional url = Optional.empty(); - private Optional requestBody = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public PostMediaPosterRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public PostMediaPosterRequestBuilder ratingKey(long ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = ratingKey; - return this; - } - - public PostMediaPosterRequestBuilder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = Optional.of(url); - return this; - } - - public PostMediaPosterRequestBuilder url(Optional url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - public PostMediaPosterRequestBuilder requestBody(byte[] requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = Optional.of(requestBody); - return this; - } - - public PostMediaPosterRequestBuilder requestBody(Optional requestBody) { - Utils.checkNotNull(requestBody, "requestBody"); - this.requestBody = requestBody; - return this; - } - - - private PostMediaPosterRequest buildRequest() { - - PostMediaPosterRequest request = new PostMediaPosterRequest(ratingKey, - url, - requestBody); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new PostMediaPoster.Async(sdkConfiguration); - PostMediaPosterRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaPosterResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaPosterResponse.java deleted file mode 100644 index 7ed2e3d4..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/PostMediaPosterResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class PostMediaPosterResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public PostMediaPosterResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public PostMediaPosterResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public PostMediaPosterResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostMediaPosterResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostMediaPosterResponse other = (PostMediaPosterResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(PostMediaPosterResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public PostMediaPosterResponse build() { - - return new PostMediaPosterResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/PostUsersSignInDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/PostUsersSignInDataRequestBuilder.java deleted file mode 100644 index 6caa4de8..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/PostUsersSignInDataRequestBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest; -import dev.plexapi.sdk.operations.PostUsersSignInData; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; - -public class PostUsersSignInDataRequestBuilder { - - private PostUsersSignInDataRequest request; - private Optional serverURL = Optional.empty(); - private final SDKConfiguration sdkConfiguration; - - public PostUsersSignInDataRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public PostUsersSignInDataRequestBuilder request(PostUsersSignInDataRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public PostUsersSignInDataRequestBuilder serverURL(String serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = Optional.of(serverURL); - return this; - } - - public PostUsersSignInDataRequestBuilder serverURL(Optional serverURL) { - Utils.checkNotNull(serverURL, "serverURL"); - this.serverURL = serverURL; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new PostUsersSignInData.Async(sdkConfiguration, serverURL); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/PostUsersSignInDataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/PostUsersSignInDataResponse.java deleted file mode 100644 index 2db6a96b..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/PostUsersSignInDataResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataUserPlexAccount; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.net.http.HttpResponse; -import java.util.Optional; - - -public class PostUsersSignInDataResponse implements AsyncResponse { - /** - * 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; - - /** - * Returns the user account data with a valid auth token - */ - private Optional userPlexAccount; - - @JsonCreator - public PostUsersSignInDataResponse( - String contentType, - int statusCode, - HttpResponse rawResponse, - Optional userPlexAccount) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - this.userPlexAccount = userPlexAccount; - } - - public PostUsersSignInDataResponse( - 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; - } - - /** - * Returns the user account data with a valid auth token - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional userPlexAccount() { - return (Optional) userPlexAccount; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public PostUsersSignInDataResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public PostUsersSignInDataResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public PostUsersSignInDataResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - /** - * Returns the user account data with a valid auth token - */ - public PostUsersSignInDataResponse withUserPlexAccount(PostUsersSignInDataUserPlexAccount userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = Optional.ofNullable(userPlexAccount); - return this; - } - - - /** - * Returns the user account data with a valid auth token - */ - public PostUsersSignInDataResponse withUserPlexAccount(Optional userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = userPlexAccount; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PostUsersSignInDataResponse other = (PostUsersSignInDataResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && - Utils.enhancedDeepEquals(this.userPlexAccount, other.userPlexAccount); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse, - userPlexAccount); - } - - @Override - public String toString() { - return Utils.toString(PostUsersSignInDataResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse, - "userPlexAccount", userPlexAccount); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Optional userPlexAccount = 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; - } - - - /** - * Returns the user account data with a valid auth token - */ - public Builder userPlexAccount(PostUsersSignInDataUserPlexAccount userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = Optional.ofNullable(userPlexAccount); - return this; - } - - /** - * Returns the user account data with a valid auth token - */ - public Builder userPlexAccount(Optional userPlexAccount) { - Utils.checkNotNull(userPlexAccount, "userPlexAccount"); - this.userPlexAccount = userPlexAccount; - return this; - } - - public PostUsersSignInDataResponse build() { - - return new PostUsersSignInDataResponse( - contentType, statusCode, rawResponse, - userPlexAccount); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ProcessSubscriptionsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ProcessSubscriptionsRequestBuilder.java new file mode 100644 index 00000000..b042eebf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ProcessSubscriptionsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.ProcessSubscriptions; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ProcessSubscriptionsRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public ProcessSubscriptionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new ProcessSubscriptions.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ProcessSubscriptionsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ProcessSubscriptionsResponse.java new file mode 100644 index 00000000..cdf35f9c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ProcessSubscriptionsResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; + + +public class ProcessSubscriptionsResponse implements AsyncResponse { + /** + * 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; + + + private Map> headers; + + @JsonCreator + public ProcessSubscriptionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.headers = headers; + } + + /** + * 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; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ProcessSubscriptionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ProcessSubscriptionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ProcessSubscriptionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ProcessSubscriptionsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProcessSubscriptionsResponse other = (ProcessSubscriptionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(ProcessSubscriptionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ProcessSubscriptionsResponse build() { + + return new ProcessSubscriptionsResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshItemsMetadataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshItemsMetadataRequestBuilder.java new file mode 100644 index 00000000..339f63ba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshItemsMetadataRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.RefreshItemsMetadataRequest; +import dev.plexapi.sdk.operations.RefreshItemsMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class RefreshItemsMetadataRequestBuilder { + + private RefreshItemsMetadataRequest request; + private final SDKConfiguration sdkConfiguration; + + public RefreshItemsMetadataRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RefreshItemsMetadataRequestBuilder request(RefreshItemsMetadataRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new RefreshItemsMetadata.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshItemsMetadataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshItemsMetadataResponse.java new file mode 100644 index 00000000..40b1a425 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshItemsMetadataResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RefreshItemsMetadataResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RefreshItemsMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RefreshItemsMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshItemsMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshItemsMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshItemsMetadataResponse other = (RefreshItemsMetadataResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RefreshItemsMetadataResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RefreshItemsMetadataResponse build() { + + return new RefreshItemsMetadataResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshPlaylistRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshPlaylistRequestBuilder.java new file mode 100644 index 00000000..6473ab90 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshPlaylistRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.RefreshPlaylistRequest; +import dev.plexapi.sdk.operations.RefreshPlaylist; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class RefreshPlaylistRequestBuilder { + + private RefreshPlaylistRequest request; + private final SDKConfiguration sdkConfiguration; + + public RefreshPlaylistRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RefreshPlaylistRequestBuilder request(RefreshPlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new RefreshPlaylist.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshPlaylistResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshPlaylistResponse.java new file mode 100644 index 00000000..ec881a2b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshPlaylistResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RefreshPlaylistResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RefreshPlaylistResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RefreshPlaylistResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshPlaylistResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshPlaylistResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshPlaylistResponse other = (RefreshPlaylistResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RefreshPlaylistResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RefreshPlaylistResponse build() { + + return new RefreshPlaylistResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshProvidersRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshProvidersRequestBuilder.java new file mode 100644 index 00000000..d31111f2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshProvidersRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.RefreshProviders; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class RefreshProvidersRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public RefreshProvidersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new RefreshProviders.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshProvidersResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshProvidersResponse.java new file mode 100644 index 00000000..c8a80af1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshProvidersResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RefreshProvidersResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RefreshProvidersResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RefreshProvidersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshProvidersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshProvidersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshProvidersResponse other = (RefreshProvidersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RefreshProvidersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RefreshProvidersResponse build() { + + return new RefreshProvidersResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionRequestBuilder.java new file mode 100644 index 00000000..d43ab21d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.RefreshSectionRequest; +import dev.plexapi.sdk.operations.RefreshSection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class RefreshSectionRequestBuilder { + + private RefreshSectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public RefreshSectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RefreshSectionRequestBuilder request(RefreshSectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new RefreshSection.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionResponse.java new file mode 100644 index 00000000..9624d7ea --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RefreshSectionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RefreshSectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RefreshSectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshSectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshSectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshSectionResponse other = (RefreshSectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RefreshSectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RefreshSectionResponse build() { + + return new RefreshSectionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionsMetadataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionsMetadataRequestBuilder.java new file mode 100644 index 00000000..2fb57fb6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionsMetadataRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataRequest; +import dev.plexapi.sdk.operations.RefreshSectionsMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class RefreshSectionsMetadataRequestBuilder { + + private RefreshSectionsMetadataRequest request; + private final SDKConfiguration sdkConfiguration; + + public RefreshSectionsMetadataRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RefreshSectionsMetadataRequestBuilder request(RefreshSectionsMetadataRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new RefreshSectionsMetadata.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionsMetadataResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionsMetadataResponse.java new file mode 100644 index 00000000..6f7aadaf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RefreshSectionsMetadataResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RefreshSectionsMetadataResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RefreshSectionsMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RefreshSectionsMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RefreshSectionsMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RefreshSectionsMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefreshSectionsMetadataResponse other = (RefreshSectionsMetadataResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RefreshSectionsMetadataResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RefreshSectionsMetadataResponse build() { + + return new RefreshSectionsMetadataResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ReloadGuideRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ReloadGuideRequestBuilder.java new file mode 100644 index 00000000..ff1b4873 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ReloadGuideRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ReloadGuideRequest; +import dev.plexapi.sdk.operations.ReloadGuide; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ReloadGuideRequestBuilder { + + private ReloadGuideRequest request; + private final SDKConfiguration sdkConfiguration; + + public ReloadGuideRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ReloadGuideRequestBuilder request(ReloadGuideRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ReloadGuide.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ReloadGuideResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ReloadGuideResponse.java new file mode 100644 index 00000000..02630132 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ReloadGuideResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; + + +public class ReloadGuideResponse implements AsyncResponse { + /** + * 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; + + + private Map> headers; + + @JsonCreator + public ReloadGuideResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.headers = headers; + } + + /** + * 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; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ReloadGuideResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ReloadGuideResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ReloadGuideResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ReloadGuideResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReloadGuideResponse other = (ReloadGuideResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(ReloadGuideResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ReloadGuideResponse build() { + + return new ReloadGuideResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceFromDVRRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceFromDVRRequestBuilder.java new file mode 100644 index 00000000..82aff196 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceFromDVRRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRRequest; +import dev.plexapi.sdk.operations.RemoveDeviceFromDVR; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class RemoveDeviceFromDVRRequestBuilder { + + private RemoveDeviceFromDVRRequest request; + private final SDKConfiguration sdkConfiguration; + + public RemoveDeviceFromDVRRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RemoveDeviceFromDVRRequestBuilder request(RemoveDeviceFromDVRRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new RemoveDeviceFromDVR.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceFromDVRResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceFromDVRResponse.java new file mode 100644 index 00000000..236e63d7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceFromDVRResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class RemoveDeviceFromDVRResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public RemoveDeviceFromDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public RemoveDeviceFromDVRResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RemoveDeviceFromDVRResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RemoveDeviceFromDVRResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RemoveDeviceFromDVRResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public RemoveDeviceFromDVRResponse withObject(RemoveDeviceFromDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public RemoveDeviceFromDVRResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public RemoveDeviceFromDVRResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDeviceFromDVRResponse other = (RemoveDeviceFromDVRResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceFromDVRResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(RemoveDeviceFromDVRResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public RemoveDeviceFromDVRResponse build() { + + return new RemoveDeviceFromDVRResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceRequestBuilder.java new file mode 100644 index 00000000..1703f406 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.RemoveDeviceRequest; +import dev.plexapi.sdk.operations.RemoveDevice; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class RemoveDeviceRequestBuilder { + + private RemoveDeviceRequest request; + private final SDKConfiguration sdkConfiguration; + + public RemoveDeviceRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RemoveDeviceRequestBuilder request(RemoveDeviceRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new RemoveDevice.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceResponse.java new file mode 100644 index 00000000..981b9b61 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDeviceResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.RemoveDeviceResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class RemoveDeviceResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public RemoveDeviceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public RemoveDeviceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RemoveDeviceResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RemoveDeviceResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RemoveDeviceResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public RemoveDeviceResponse withObject(RemoveDeviceResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public RemoveDeviceResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public RemoveDeviceResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDeviceResponse other = (RemoveDeviceResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(RemoveDeviceResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(RemoveDeviceResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public RemoveDeviceResponse build() { + + return new RemoveDeviceResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDownloadQueueItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDownloadQueueItemsRequestBuilder.java new file mode 100644 index 00000000..d77600c8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDownloadQueueItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsRequest; +import dev.plexapi.sdk.operations.RemoveDownloadQueueItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class RemoveDownloadQueueItemsRequestBuilder { + + private RemoveDownloadQueueItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public RemoveDownloadQueueItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RemoveDownloadQueueItemsRequestBuilder request(RemoveDownloadQueueItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new RemoveDownloadQueueItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDownloadQueueItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDownloadQueueItemsResponse.java new file mode 100644 index 00000000..cf284fd9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RemoveDownloadQueueItemsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RemoveDownloadQueueItemsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RemoveDownloadQueueItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RemoveDownloadQueueItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RemoveDownloadQueueItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RemoveDownloadQueueItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveDownloadQueueItemsResponse other = (RemoveDownloadQueueItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RemoveDownloadQueueItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RemoveDownloadQueueItemsResponse build() { + + return new RemoveDownloadQueueItemsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ReorderSubscriptionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ReorderSubscriptionRequestBuilder.java new file mode 100644 index 00000000..7900f50f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ReorderSubscriptionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ReorderSubscriptionRequest; +import dev.plexapi.sdk.operations.ReorderSubscription; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ReorderSubscriptionRequestBuilder { + + private ReorderSubscriptionRequest request; + private final SDKConfiguration sdkConfiguration; + + public ReorderSubscriptionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ReorderSubscriptionRequestBuilder request(ReorderSubscriptionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ReorderSubscription.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ReorderSubscriptionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ReorderSubscriptionResponse.java new file mode 100644 index 00000000..51599b74 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ReorderSubscriptionResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ReorderSubscriptionResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithSubscription; + + @JsonCreator + public ReorderSubscriptionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithSubscription) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + } + + public ReorderSubscriptionResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithSubscription() { + return (Optional) mediaContainerWithSubscription; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ReorderSubscriptionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ReorderSubscriptionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ReorderSubscriptionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ReorderSubscriptionResponse withMediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + + /** + * OK + */ + public ReorderSubscriptionResponse withMediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReorderSubscriptionResponse other = (ReorderSubscriptionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithSubscription, other.mediaContainerWithSubscription); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + @Override + public String toString() { + return Utils.toString(ReorderSubscriptionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithSubscription", mediaContainerWithSubscription); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithSubscription = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithSubscription(MediaContainerWithSubscription mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = Optional.ofNullable(mediaContainerWithSubscription); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithSubscription(Optional mediaContainerWithSubscription) { + Utils.checkNotNull(mediaContainerWithSubscription, "mediaContainerWithSubscription"); + this.mediaContainerWithSubscription = mediaContainerWithSubscription; + return this; + } + + public ReorderSubscriptionResponse build() { + + return new ReorderSubscriptionResponse( + contentType, statusCode, rawResponse, + mediaContainerWithSubscription); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ReportRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ReportRequestBuilder.java new file mode 100644 index 00000000..9f38f21d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ReportRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ReportRequest; +import dev.plexapi.sdk.operations.Report; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ReportRequestBuilder { + + private ReportRequest request; + private final SDKConfiguration sdkConfiguration; + + public ReportRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ReportRequestBuilder request(ReportRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new Report.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ReportResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ReportResponse.java new file mode 100644 index 00000000..e10951b4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ReportResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.ReportResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ReportResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public ReportResponse( + 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 ReportResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ReportResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ReportResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ReportResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ReportResponse withObject(ReportResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public ReportResponse 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; + } + ReportResponse other = (ReportResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(ReportResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + 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; + } + + + /** + * OK + */ + public Builder object(ReportResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public ReportResponse build() { + + return new ReportResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ResetPlayQueueRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ResetPlayQueueRequestBuilder.java new file mode 100644 index 00000000..ab9ff60f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ResetPlayQueueRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ResetPlayQueueRequest; +import dev.plexapi.sdk.operations.ResetPlayQueue; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ResetPlayQueueRequestBuilder { + + private ResetPlayQueueRequest request; + private final SDKConfiguration sdkConfiguration; + + public ResetPlayQueueRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ResetPlayQueueRequestBuilder request(ResetPlayQueueRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ResetPlayQueue.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ResetPlayQueueResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ResetPlayQueueResponse.java new file mode 100644 index 00000000..1d43bd79 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ResetPlayQueueResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ResetPlayQueueResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public ResetPlayQueueResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public ResetPlayQueueResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ResetPlayQueueResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ResetPlayQueueResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ResetPlayQueueResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ResetPlayQueueResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public ResetPlayQueueResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResetPlayQueueResponse other = (ResetPlayQueueResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(ResetPlayQueueResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public ResetPlayQueueResponse build() { + + return new ResetPlayQueueResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ResetSectionDefaultsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ResetSectionDefaultsRequestBuilder.java new file mode 100644 index 00000000..d97d87ec --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ResetSectionDefaultsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ResetSectionDefaultsRequest; +import dev.plexapi.sdk.operations.ResetSectionDefaults; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ResetSectionDefaultsRequestBuilder { + + private ResetSectionDefaultsRequest request; + private final SDKConfiguration sdkConfiguration; + + public ResetSectionDefaultsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ResetSectionDefaultsRequestBuilder request(ResetSectionDefaultsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new ResetSectionDefaults.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ResetSectionDefaultsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ResetSectionDefaultsResponse.java new file mode 100644 index 00000000..c1a8e778 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ResetSectionDefaultsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class ResetSectionDefaultsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public ResetSectionDefaultsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ResetSectionDefaultsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ResetSectionDefaultsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ResetSectionDefaultsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResetSectionDefaultsResponse other = (ResetSectionDefaultsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ResetSectionDefaultsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ResetSectionDefaultsResponse build() { + + return new ResetSectionDefaultsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RestartProcessingDownloadQueueItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RestartProcessingDownloadQueueItemsRequestBuilder.java new file mode 100644 index 00000000..422d5f10 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RestartProcessingDownloadQueueItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsRequest; +import dev.plexapi.sdk.operations.RestartProcessingDownloadQueueItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class RestartProcessingDownloadQueueItemsRequestBuilder { + + private RestartProcessingDownloadQueueItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public RestartProcessingDownloadQueueItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RestartProcessingDownloadQueueItemsRequestBuilder request(RestartProcessingDownloadQueueItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new RestartProcessingDownloadQueueItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/RestartProcessingDownloadQueueItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/RestartProcessingDownloadQueueItemsResponse.java new file mode 100644 index 00000000..9241ce94 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/RestartProcessingDownloadQueueItemsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class RestartProcessingDownloadQueueItemsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RestartProcessingDownloadQueueItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RestartProcessingDownloadQueueItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RestartProcessingDownloadQueueItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RestartProcessingDownloadQueueItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RestartProcessingDownloadQueueItemsResponse other = (RestartProcessingDownloadQueueItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RestartProcessingDownloadQueueItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RestartProcessingDownloadQueueItemsResponse build() { + + return new RestartProcessingDownloadQueueItemsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ScanRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ScanRequestBuilder.java new file mode 100644 index 00000000..343914fa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ScanRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ScanRequest; +import dev.plexapi.sdk.operations.Scan; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ScanRequestBuilder { + + private ScanRequest request; + private final SDKConfiguration sdkConfiguration; + + public ScanRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ScanRequestBuilder request(ScanRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new Scan.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ScanResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ScanResponse.java new file mode 100644 index 00000000..0cdc481d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ScanResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class ScanResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + + private Map> headers; + + @JsonCreator + public ScanResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + this.headers = headers; + } + + public ScanResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ScanResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ScanResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ScanResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ScanResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public ScanResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public ScanResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScanResponse other = (ScanResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice, headers); + } + + @Override + public String toString() { + return Utils.toString(ScanResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public ScanResponse build() { + + return new ScanResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SearchHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SearchHubsRequestBuilder.java new file mode 100644 index 00000000..cca9e07f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SearchHubsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SearchHubsRequest; +import dev.plexapi.sdk.operations.SearchHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SearchHubsRequestBuilder { + + private SearchHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public SearchHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SearchHubsRequestBuilder request(SearchHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SearchHubs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SearchHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SearchHubsResponse.java new file mode 100644 index 00000000..9e03ee5b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SearchHubsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.SearchHubsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SearchHubsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public SearchHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public SearchHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SearchHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SearchHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SearchHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public SearchHubsResponse withObject(SearchHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public SearchHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public SearchHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchHubsResponse other = (SearchHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(SearchHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(SearchHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public SearchHubsResponse build() { + + return new SearchHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetChannelmapRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetChannelmapRequestBuilder.java new file mode 100644 index 00000000..d22f3bfd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetChannelmapRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SetChannelmapRequest; +import dev.plexapi.sdk.operations.SetChannelmap; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SetChannelmapRequestBuilder { + + private SetChannelmapRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetChannelmapRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetChannelmapRequestBuilder request(SetChannelmapRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SetChannelmap.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetChannelmapResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetChannelmapResponse.java new file mode 100644 index 00000000..56a28e50 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetChannelmapResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class SetChannelmapResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + @JsonCreator + public SetChannelmapResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + } + + public SetChannelmapResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetChannelmapResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetChannelmapResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetChannelmapResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public SetChannelmapResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public SetChannelmapResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetChannelmapResponse other = (SetChannelmapResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + @Override + public String toString() { + return Utils.toString(SetChannelmapResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public SetChannelmapResponse build() { + + return new SetChannelmapResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetDVRPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetDVRPreferencesRequestBuilder.java new file mode 100644 index 00000000..31ded4e8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetDVRPreferencesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesRequest; +import dev.plexapi.sdk.operations.SetDVRPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SetDVRPreferencesRequestBuilder { + + private SetDVRPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetDVRPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetDVRPreferencesRequestBuilder request(SetDVRPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SetDVRPreferences.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetDVRPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetDVRPreferencesResponse.java new file mode 100644 index 00000000..7e4034b7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetDVRPreferencesResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SetDVRPreferencesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public SetDVRPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public SetDVRPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetDVRPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetDVRPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetDVRPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public SetDVRPreferencesResponse withObject(SetDVRPreferencesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public SetDVRPreferencesResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public SetDVRPreferencesResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetDVRPreferencesResponse other = (SetDVRPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(SetDVRPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(SetDVRPreferencesResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public SetDVRPreferencesResponse build() { + + return new SetDVRPreferencesResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetDevicePreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetDevicePreferencesRequestBuilder.java new file mode 100644 index 00000000..f671ea9c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetDevicePreferencesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SetDevicePreferencesRequest; +import dev.plexapi.sdk.operations.SetDevicePreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SetDevicePreferencesRequestBuilder { + + private SetDevicePreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetDevicePreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetDevicePreferencesRequestBuilder request(SetDevicePreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SetDevicePreferences.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetDevicePreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetDevicePreferencesResponse.java new file mode 100644 index 00000000..a85a95bc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetDevicePreferencesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetDevicePreferencesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetDevicePreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetDevicePreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetDevicePreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetDevicePreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetDevicePreferencesResponse other = (SetDevicePreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetDevicePreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetDevicePreferencesResponse build() { + + return new SetDevicePreferencesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemArtworkRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemArtworkRequestBuilder.java new file mode 100644 index 00000000..c05dd865 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemArtworkRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SetItemArtworkRequest; +import dev.plexapi.sdk.operations.SetItemArtwork; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SetItemArtworkRequestBuilder { + + private SetItemArtworkRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetItemArtworkRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetItemArtworkRequestBuilder request(SetItemArtworkRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SetItemArtwork.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemArtworkResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemArtworkResponse.java new file mode 100644 index 00000000..aabae977 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemArtworkResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetItemArtworkResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetItemArtworkResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetItemArtworkResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetItemArtworkResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetItemArtworkResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetItemArtworkResponse other = (SetItemArtworkResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetItemArtworkResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetItemArtworkResponse build() { + + return new SetItemArtworkResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemPreferencesRequestBuilder.java new file mode 100644 index 00000000..96213236 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemPreferencesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SetItemPreferencesRequest; +import dev.plexapi.sdk.operations.SetItemPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SetItemPreferencesRequestBuilder { + + private SetItemPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetItemPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetItemPreferencesRequestBuilder request(SetItemPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SetItemPreferences.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemPreferencesResponse.java new file mode 100644 index 00000000..0c4ef8aa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetItemPreferencesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetItemPreferencesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetItemPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetItemPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetItemPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetItemPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetItemPreferencesResponse other = (SetItemPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetItemPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetItemPreferencesResponse build() { + + return new SetItemPreferencesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetPreferencesRequestBuilder.java new file mode 100644 index 00000000..9be083c2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetPreferencesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SetPreferencesRequest; +import dev.plexapi.sdk.operations.SetPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SetPreferencesRequestBuilder { + + private SetPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetPreferencesRequestBuilder request(SetPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SetPreferences.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetPreferencesResponse.java new file mode 100644 index 00000000..a7858010 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetPreferencesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetPreferencesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetPreferencesResponse other = (SetPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetPreferencesResponse build() { + + return new SetPreferencesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetRatingRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetRatingRequestBuilder.java new file mode 100644 index 00000000..58e95768 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetRatingRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SetRatingRequest; +import dev.plexapi.sdk.operations.SetRating; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SetRatingRequestBuilder { + + private SetRatingRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetRatingRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetRatingRequestBuilder request(SetRatingRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SetRating.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetRatingResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetRatingResponse.java new file mode 100644 index 00000000..93b5256e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetRatingResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetRatingResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetRatingResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetRatingResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetRatingResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetRatingResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetRatingResponse other = (SetRatingResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetRatingResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetRatingResponse build() { + + return new SetRatingResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetSectionPreferencesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetSectionPreferencesRequestBuilder.java new file mode 100644 index 00000000..b06b9d23 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetSectionPreferencesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SetSectionPreferencesRequest; +import dev.plexapi.sdk.operations.SetSectionPreferences; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SetSectionPreferencesRequestBuilder { + + private SetSectionPreferencesRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetSectionPreferencesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetSectionPreferencesRequestBuilder request(SetSectionPreferencesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SetSectionPreferences.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetSectionPreferencesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetSectionPreferencesResponse.java new file mode 100644 index 00000000..e371d7a9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetSectionPreferencesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetSectionPreferencesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetSectionPreferencesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetSectionPreferencesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetSectionPreferencesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetSectionPreferencesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetSectionPreferencesResponse other = (SetSectionPreferencesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetSectionPreferencesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetSectionPreferencesResponse build() { + + return new SetSectionPreferencesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamOffsetRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamOffsetRequestBuilder.java new file mode 100644 index 00000000..9886a9a3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamOffsetRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SetStreamOffsetRequest; +import dev.plexapi.sdk.operations.SetStreamOffset; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SetStreamOffsetRequestBuilder { + + private SetStreamOffsetRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetStreamOffsetRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetStreamOffsetRequestBuilder request(SetStreamOffsetRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SetStreamOffset.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamOffsetResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamOffsetResponse.java new file mode 100644 index 00000000..61da3f6e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamOffsetResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetStreamOffsetResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetStreamOffsetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetStreamOffsetResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetStreamOffsetResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetStreamOffsetResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetStreamOffsetResponse other = (SetStreamOffsetResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetStreamOffsetResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetStreamOffsetResponse build() { + + return new SetStreamOffsetResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamSelectionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamSelectionRequestBuilder.java new file mode 100644 index 00000000..ba0c9bb9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamSelectionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SetStreamSelectionRequest; +import dev.plexapi.sdk.operations.SetStreamSelection; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SetStreamSelectionRequestBuilder { + + private SetStreamSelectionRequest request; + private final SDKConfiguration sdkConfiguration; + + public SetStreamSelectionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SetStreamSelectionRequestBuilder request(SetStreamSelectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SetStreamSelection.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamSelectionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamSelectionResponse.java new file mode 100644 index 00000000..f67e889f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SetStreamSelectionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SetStreamSelectionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SetStreamSelectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SetStreamSelectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SetStreamSelectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SetStreamSelectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetStreamSelectionResponse other = (SetStreamSelectionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SetStreamSelectionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SetStreamSelectionResponse build() { + + return new SetStreamSelectionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ShuffleRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ShuffleRequestBuilder.java new file mode 100644 index 00000000..b396c799 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ShuffleRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.ShuffleRequest; +import dev.plexapi.sdk.operations.Shuffle; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class ShuffleRequestBuilder { + + private ShuffleRequest request; + private final SDKConfiguration sdkConfiguration; + + public ShuffleRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ShuffleRequestBuilder request(ShuffleRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new Shuffle.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/ShuffleResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/ShuffleResponse.java new file mode 100644 index 00000000..a3388944 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/ShuffleResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ShuffleResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public ShuffleResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public ShuffleResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ShuffleResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ShuffleResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ShuffleResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public ShuffleResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public ShuffleResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShuffleResponse other = (ShuffleResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(ShuffleResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public ShuffleResponse build() { + + return new ShuffleResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SplitItemRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SplitItemRequestBuilder.java new file mode 100644 index 00000000..9f9e45d2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SplitItemRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.SplitItemRequest; +import dev.plexapi.sdk.operations.SplitItem; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class SplitItemRequestBuilder { + + private SplitItemRequest request; + private final SDKConfiguration sdkConfiguration; + + public SplitItemRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public SplitItemRequestBuilder request(SplitItemRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new SplitItem.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/SplitItemResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/SplitItemResponse.java new file mode 100644 index 00000000..d64b5a75 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/SplitItemResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class SplitItemResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SplitItemResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SplitItemResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SplitItemResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SplitItemResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SplitItemResponse other = (SplitItemResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SplitItemResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SplitItemResponse build() { + + return new SplitItemResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartAllTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartAllTasksRequestBuilder.java deleted file mode 100644 index 2ab47d7c..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/StartAllTasksRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.StartAllTasks; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class StartAllTasksRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public StartAllTasksRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new StartAllTasks.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartAllTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartAllTasksResponse.java deleted file mode 100644 index cbd2bcbd..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/StartAllTasksResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class StartAllTasksResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public StartAllTasksResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public StartAllTasksResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public StartAllTasksResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartAllTasksResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartAllTasksResponse other = (StartAllTasksResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartAllTasksResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartAllTasksResponse build() { - - return new StartAllTasksResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartAnalysisRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartAnalysisRequestBuilder.java new file mode 100644 index 00000000..44f90011 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StartAnalysisRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.StartAnalysisRequest; +import dev.plexapi.sdk.operations.StartAnalysis; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class StartAnalysisRequestBuilder { + + private StartAnalysisRequest request; + private final SDKConfiguration sdkConfiguration; + + public StartAnalysisRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StartAnalysisRequestBuilder request(StartAnalysisRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new StartAnalysis.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartAnalysisResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartAnalysisResponse.java new file mode 100644 index 00000000..1480891d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StartAnalysisResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class StartAnalysisResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public StartAnalysisResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StartAnalysisResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartAnalysisResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartAnalysisResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartAnalysisResponse other = (StartAnalysisResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StartAnalysisResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public StartAnalysisResponse build() { + + return new StartAnalysisResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartBifGenerationRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartBifGenerationRequestBuilder.java new file mode 100644 index 00000000..f86ccc0a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StartBifGenerationRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.StartBifGenerationRequest; +import dev.plexapi.sdk.operations.StartBifGeneration; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class StartBifGenerationRequestBuilder { + + private StartBifGenerationRequest request; + private final SDKConfiguration sdkConfiguration; + + public StartBifGenerationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StartBifGenerationRequestBuilder request(StartBifGenerationRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new StartBifGeneration.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartBifGenerationResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartBifGenerationResponse.java new file mode 100644 index 00000000..cbe697ae --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StartBifGenerationResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class StartBifGenerationResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public StartBifGenerationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StartBifGenerationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartBifGenerationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartBifGenerationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartBifGenerationResponse other = (StartBifGenerationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StartBifGenerationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public StartBifGenerationResponse build() { + + return new StartBifGenerationResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartTaskRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartTaskRequestBuilder.java index 74faca6a..bd885bd3 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/StartTaskRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StartTaskRequestBuilder.java @@ -7,7 +7,6 @@ import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.models.operations.StartTaskRequest; -import dev.plexapi.sdk.models.operations.TaskName; import dev.plexapi.sdk.operations.StartTask; import dev.plexapi.sdk.utils.Utils; import java.lang.Exception; @@ -15,32 +14,23 @@ import java.util.concurrent.CompletableFuture; public class StartTaskRequestBuilder { - private TaskName taskName; + private StartTaskRequest request; private final SDKConfiguration sdkConfiguration; public StartTaskRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public StartTaskRequestBuilder taskName(TaskName taskName) { - Utils.checkNotNull(taskName, "taskName"); - this.taskName = taskName; + public StartTaskRequestBuilder request(StartTaskRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private StartTaskRequest buildRequest() { - - StartTaskRequest request = new StartTaskRequest(taskName); - - return request; - } - public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new StartTask.Async(sdkConfiguration); - StartTaskRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartTasksRequestBuilder.java new file mode 100644 index 00000000..dd4181e2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StartTasksRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StartTasks; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class StartTasksRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public StartTasksRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new StartTasks.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartTasksResponse.java new file mode 100644 index 00000000..7d99b2fd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StartTasksResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class StartTasksResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public StartTasksResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StartTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartTasksResponse other = (StartTasksResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StartTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public StartTasksResponse build() { + + return new StartTasksResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartTranscodeSessionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartTranscodeSessionRequestBuilder.java new file mode 100644 index 00000000..dbe7608d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StartTranscodeSessionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.StartTranscodeSessionRequest; +import dev.plexapi.sdk.operations.StartTranscodeSession; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class StartTranscodeSessionRequestBuilder { + + private StartTranscodeSessionRequest request; + private final SDKConfiguration sdkConfiguration; + + public StartTranscodeSessionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StartTranscodeSessionRequestBuilder request(StartTranscodeSessionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new StartTranscodeSession.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartTranscodeSessionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartTranscodeSessionResponse.java new file mode 100644 index 00000000..bd353b8f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StartTranscodeSessionResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class StartTranscodeSessionResponse implements AsyncResponse { + /** + * 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; + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + private Optional responseStream; + + @JsonCreator + public StartTranscodeSessionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + } + + public StartTranscodeSessionResponse( + 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; + } + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StartTranscodeSessionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StartTranscodeSessionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StartTranscodeSessionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + public StartTranscodeSessionResponse withResponseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + public StartTranscodeSessionResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartTranscodeSessionResponse other = (StartTranscodeSessionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream); + } + + @Override + public String toString() { + return Utils.toString(StartTranscodeSessionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = 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; + } + + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + public Builder responseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public StartTranscodeSessionResponse build() { + + return new StartTranscodeSessionResponse( + contentType, statusCode, rawResponse, + responseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartUniversalTranscodeRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartUniversalTranscodeRequestBuilder.java deleted file mode 100644 index 5e1f89cb..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/StartUniversalTranscodeRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest; -import dev.plexapi.sdk.operations.StartUniversalTranscode; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class StartUniversalTranscodeRequestBuilder { - - private StartUniversalTranscodeRequest request; - private final SDKConfiguration sdkConfiguration; - - public StartUniversalTranscodeRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public StartUniversalTranscodeRequestBuilder request(StartUniversalTranscodeRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; - return this; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new StartUniversalTranscode.Async(sdkConfiguration); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StartUniversalTranscodeResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StartUniversalTranscodeResponse.java deleted file mode 100644 index 58a383c6..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/StartUniversalTranscodeResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class StartUniversalTranscodeResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public StartUniversalTranscodeResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public StartUniversalTranscodeResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public StartUniversalTranscodeResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StartUniversalTranscodeResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StartUniversalTranscodeResponse other = (StartUniversalTranscodeResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StartUniversalTranscodeResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StartUniversalTranscodeResponse build() { - - return new StartUniversalTranscodeResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllRefreshesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllRefreshesRequestBuilder.java new file mode 100644 index 00000000..0bb84e6c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllRefreshesRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StopAllRefreshes; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class StopAllRefreshesRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public StopAllRefreshesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new StopAllRefreshes.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllRefreshesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllRefreshesResponse.java new file mode 100644 index 00000000..fd3edf06 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllRefreshesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.RequestHandlerSlashGetResponses200; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class StopAllRefreshesResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional requestHandlerSlashGetResponses200; + + @JsonCreator + public StopAllRefreshesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + } + + public StopAllRefreshesResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional requestHandlerSlashGetResponses200() { + return (Optional) requestHandlerSlashGetResponses200; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StopAllRefreshesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopAllRefreshesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopAllRefreshesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public StopAllRefreshesResponse withRequestHandlerSlashGetResponses200(RequestHandlerSlashGetResponses200 requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = Optional.ofNullable(requestHandlerSlashGetResponses200); + return this; + } + + + /** + * OK + */ + public StopAllRefreshesResponse withRequestHandlerSlashGetResponses200(Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopAllRefreshesResponse other = (StopAllRefreshesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.requestHandlerSlashGetResponses200, other.requestHandlerSlashGetResponses200); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + requestHandlerSlashGetResponses200); + } + + @Override + public String toString() { + return Utils.toString(StopAllRefreshesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "requestHandlerSlashGetResponses200", requestHandlerSlashGetResponses200); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional requestHandlerSlashGetResponses200 = 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; + } + + + /** + * OK + */ + public Builder requestHandlerSlashGetResponses200(RequestHandlerSlashGetResponses200 requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = Optional.ofNullable(requestHandlerSlashGetResponses200); + return this; + } + + /** + * OK + */ + public Builder requestHandlerSlashGetResponses200(Optional requestHandlerSlashGetResponses200) { + Utils.checkNotNull(requestHandlerSlashGetResponses200, "requestHandlerSlashGetResponses200"); + this.requestHandlerSlashGetResponses200 = requestHandlerSlashGetResponses200; + return this; + } + + public StopAllRefreshesResponse build() { + + return new StopAllRefreshesResponse( + contentType, statusCode, rawResponse, + requestHandlerSlashGetResponses200); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllTasksRequestBuilder.java deleted file mode 100644 index 19c84507..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllTasksRequestBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.operations.StopAllTasks; -import java.lang.Exception; -import java.util.concurrent.CompletableFuture; - -public class StopAllTasksRequestBuilder { - - private final SDKConfiguration sdkConfiguration; - - public StopAllTasksRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestlessOperation operation - = new StopAllTasks.Async(sdkConfiguration); - - return operation.doRequest() - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllTasksResponse.java deleted file mode 100644 index 00025b07..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/StopAllTasksResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class StopAllTasksResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public StopAllTasksResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public StopAllTasksResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public StopAllTasksResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopAllTasksResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopAllTasksResponse other = (StopAllTasksResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopAllTasksResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopAllTasksResponse build() { - - return new StopAllTasksResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopDVRReloadRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopDVRReloadRequestBuilder.java new file mode 100644 index 00000000..06a16860 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StopDVRReloadRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.StopDVRReloadRequest; +import dev.plexapi.sdk.operations.StopDVRReload; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class StopDVRReloadRequestBuilder { + + private StopDVRReloadRequest request; + private final SDKConfiguration sdkConfiguration; + + public StopDVRReloadRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StopDVRReloadRequestBuilder request(StopDVRReloadRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new StopDVRReload.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopDVRReloadResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopDVRReloadResponse.java new file mode 100644 index 00000000..1409efa9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StopDVRReloadResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class StopDVRReloadResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public StopDVRReloadResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StopDVRReloadResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopDVRReloadResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopDVRReloadResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopDVRReloadResponse other = (StopDVRReloadResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StopDVRReloadResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public StopDVRReloadResponse build() { + + return new StopDVRReloadResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopScanRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopScanRequestBuilder.java new file mode 100644 index 00000000..c4c9c64c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StopScanRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.StopScanRequest; +import dev.plexapi.sdk.operations.StopScan; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class StopScanRequestBuilder { + + private StopScanRequest request; + private final SDKConfiguration sdkConfiguration; + + public StopScanRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public StopScanRequestBuilder request(StopScanRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new StopScan.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopScanResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopScanResponse.java new file mode 100644 index 00000000..cf88a44e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StopScanResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class StopScanResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithDevice; + + @JsonCreator + public StopScanResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithDevice) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithDevice = mediaContainerWithDevice; + } + + public StopScanResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithDevice() { + return (Optional) mediaContainerWithDevice; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StopScanResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopScanResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopScanResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public StopScanResponse withMediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + + /** + * OK + */ + public StopScanResponse withMediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopScanResponse other = (StopScanResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithDevice, other.mediaContainerWithDevice); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + @Override + public String toString() { + return Utils.toString(StopScanResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithDevice", mediaContainerWithDevice); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithDevice = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithDevice(MediaContainerWithDevice mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = Optional.ofNullable(mediaContainerWithDevice); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithDevice(Optional mediaContainerWithDevice) { + Utils.checkNotNull(mediaContainerWithDevice, "mediaContainerWithDevice"); + this.mediaContainerWithDevice = mediaContainerWithDevice; + return this; + } + + public StopScanResponse build() { + + return new StopScanResponse( + contentType, statusCode, rawResponse, + mediaContainerWithDevice); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopTaskRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopTaskRequestBuilder.java index 9e2f3406..c9b905d2 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/StopTaskRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StopTaskRequestBuilder.java @@ -6,7 +6,6 @@ package dev.plexapi.sdk.models.operations.async; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.PathParamTaskName; import dev.plexapi.sdk.models.operations.StopTaskRequest; import dev.plexapi.sdk.operations.StopTask; import dev.plexapi.sdk.utils.Utils; @@ -15,32 +14,23 @@ import java.util.concurrent.CompletableFuture; public class StopTaskRequestBuilder { - private PathParamTaskName taskName; + private StopTaskRequest request; private final SDKConfiguration sdkConfiguration; public StopTaskRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public StopTaskRequestBuilder taskName(PathParamTaskName taskName) { - Utils.checkNotNull(taskName, "taskName"); - this.taskName = taskName; + public StopTaskRequestBuilder request(StopTaskRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - private StopTaskRequest buildRequest() { - - StopTaskRequest request = new StopTaskRequest(taskName); - - return request; - } - public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new StopTask.Async(sdkConfiguration); - StopTaskRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopTasksRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopTasksRequestBuilder.java new file mode 100644 index 00000000..4242cc1a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StopTasksRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.StopTasks; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class StopTasksRequestBuilder { + + private final SDKConfiguration sdkConfiguration; + + public StopTasksRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestlessOperation operation + = new StopTasks.Async(sdkConfiguration); + + return operation.doRequest() + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopTasksResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopTasksResponse.java new file mode 100644 index 00000000..9c8377ce --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/StopTasksResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class StopTasksResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public StopTasksResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public StopTasksResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public StopTasksResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public StopTasksResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopTasksResponse other = (StopTasksResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(StopTasksResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public StopTasksResponse build() { + + return new StopTasksResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopTranscodeSessionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopTranscodeSessionRequestBuilder.java deleted file mode 100644 index 02b984ec..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/StopTranscodeSessionRequestBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.StopTranscodeSessionRequest; -import dev.plexapi.sdk.operations.StopTranscodeSession; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Exception; -import java.lang.String; -import java.util.concurrent.CompletableFuture; - -public class StopTranscodeSessionRequestBuilder { - - private String sessionKey; - private final SDKConfiguration sdkConfiguration; - - public StopTranscodeSessionRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public StopTranscodeSessionRequestBuilder sessionKey(String sessionKey) { - Utils.checkNotNull(sessionKey, "sessionKey"); - this.sessionKey = sessionKey; - return this; - } - - - private StopTranscodeSessionRequest buildRequest() { - - StopTranscodeSessionRequest request = new StopTranscodeSessionRequest(sessionKey); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new StopTranscodeSession.Async(sdkConfiguration); - StopTranscodeSessionRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/StopTranscodeSessionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/StopTranscodeSessionResponse.java deleted file mode 100644 index 7db5a127..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/StopTranscodeSessionResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class StopTranscodeSessionResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public StopTranscodeSessionResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public StopTranscodeSessionResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public StopTranscodeSessionResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public StopTranscodeSessionResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopTranscodeSessionResponse other = (StopTranscodeSessionResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(StopTranscodeSessionResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public StopTranscodeSessionResponse build() { - - return new StopTranscodeSessionResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/TerminateSessionRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/TerminateSessionRequestBuilder.java new file mode 100644 index 00000000..8863f319 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/TerminateSessionRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.TerminateSessionRequest; +import dev.plexapi.sdk.operations.TerminateSession; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class TerminateSessionRequestBuilder { + + private TerminateSessionRequest request; + private final SDKConfiguration sdkConfiguration; + + public TerminateSessionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public TerminateSessionRequestBuilder request(TerminateSessionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new TerminateSession.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/TerminateSessionResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/TerminateSessionResponse.java new file mode 100644 index 00000000..6f1566eb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/TerminateSessionResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class TerminateSessionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public TerminateSessionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public TerminateSessionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TerminateSessionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TerminateSessionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminateSessionResponse other = (TerminateSessionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(TerminateSessionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public TerminateSessionResponse build() { + + return new TerminateSessionResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeImageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeImageRequestBuilder.java new file mode 100644 index 00000000..6233c425 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeImageRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.TranscodeImageRequest; +import dev.plexapi.sdk.operations.TranscodeImage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class TranscodeImageRequestBuilder { + + private TranscodeImageRequest request; + private final SDKConfiguration sdkConfiguration; + + public TranscodeImageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public TranscodeImageRequestBuilder request(TranscodeImageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new TranscodeImage.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeImageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeImageResponse.java new file mode 100644 index 00000000..76e5393d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeImageResponse.java @@ -0,0 +1,370 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class TranscodeImageResponse implements AsyncResponse { + /** + * 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 resulting image + */ + private Optional twoHundredImageJpegResponseStream; + + /** + * The resulting image + */ + private Optional twoHundredImagePngResponseStream; + + /** + * The resulting image + */ + private Optional twoHundredImageXPortablePixmapResponseStream; + + @JsonCreator + public TranscodeImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional twoHundredImageJpegResponseStream, + Optional twoHundredImagePngResponseStream, + Optional twoHundredImageXPortablePixmapResponseStream) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + Utils.checkNotNull(twoHundredImagePngResponseStream, "twoHundredImagePngResponseStream"); + Utils.checkNotNull(twoHundredImageXPortablePixmapResponseStream, "twoHundredImageXPortablePixmapResponseStream"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + this.twoHundredImagePngResponseStream = twoHundredImagePngResponseStream; + this.twoHundredImageXPortablePixmapResponseStream = twoHundredImageXPortablePixmapResponseStream; + } + + public TranscodeImageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), Optional.empty(), 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 resulting image + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredImageJpegResponseStream() { + return (Optional) twoHundredImageJpegResponseStream; + } + + /** + * The resulting image + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredImagePngResponseStream() { + return (Optional) twoHundredImagePngResponseStream; + } + + /** + * The resulting image + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredImageXPortablePixmapResponseStream() { + return (Optional) twoHundredImageXPortablePixmapResponseStream; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public TranscodeImageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TranscodeImageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TranscodeImageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImageJpegResponseStream(Blob twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImagePngResponseStream(Blob twoHundredImagePngResponseStream) { + Utils.checkNotNull(twoHundredImagePngResponseStream, "twoHundredImagePngResponseStream"); + this.twoHundredImagePngResponseStream = Optional.ofNullable(twoHundredImagePngResponseStream); + return this; + } + + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImagePngResponseStream(Optional twoHundredImagePngResponseStream) { + Utils.checkNotNull(twoHundredImagePngResponseStream, "twoHundredImagePngResponseStream"); + this.twoHundredImagePngResponseStream = twoHundredImagePngResponseStream; + return this; + } + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImageXPortablePixmapResponseStream(Blob twoHundredImageXPortablePixmapResponseStream) { + Utils.checkNotNull(twoHundredImageXPortablePixmapResponseStream, "twoHundredImageXPortablePixmapResponseStream"); + this.twoHundredImageXPortablePixmapResponseStream = Optional.ofNullable(twoHundredImageXPortablePixmapResponseStream); + return this; + } + + + /** + * The resulting image + */ + public TranscodeImageResponse withTwoHundredImageXPortablePixmapResponseStream(Optional twoHundredImageXPortablePixmapResponseStream) { + Utils.checkNotNull(twoHundredImageXPortablePixmapResponseStream, "twoHundredImageXPortablePixmapResponseStream"); + this.twoHundredImageXPortablePixmapResponseStream = twoHundredImageXPortablePixmapResponseStream; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranscodeImageResponse other = (TranscodeImageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.twoHundredImageJpegResponseStream, other.twoHundredImageJpegResponseStream) && + Utils.enhancedDeepEquals(this.twoHundredImagePngResponseStream, other.twoHundredImagePngResponseStream) && + Utils.enhancedDeepEquals(this.twoHundredImageXPortablePixmapResponseStream, other.twoHundredImageXPortablePixmapResponseStream); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + twoHundredImageJpegResponseStream, twoHundredImagePngResponseStream, twoHundredImageXPortablePixmapResponseStream); + } + + @Override + public String toString() { + return Utils.toString(TranscodeImageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "twoHundredImageJpegResponseStream", twoHundredImageJpegResponseStream, + "twoHundredImagePngResponseStream", twoHundredImagePngResponseStream, + "twoHundredImageXPortablePixmapResponseStream", twoHundredImageXPortablePixmapResponseStream); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional twoHundredImageJpegResponseStream = Optional.empty(); + + private Optional twoHundredImagePngResponseStream = Optional.empty(); + + private Optional twoHundredImageXPortablePixmapResponseStream = 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 resulting image + */ + public Builder twoHundredImageJpegResponseStream(Blob twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = Optional.ofNullable(twoHundredImageJpegResponseStream); + return this; + } + + /** + * The resulting image + */ + public Builder twoHundredImageJpegResponseStream(Optional twoHundredImageJpegResponseStream) { + Utils.checkNotNull(twoHundredImageJpegResponseStream, "twoHundredImageJpegResponseStream"); + this.twoHundredImageJpegResponseStream = twoHundredImageJpegResponseStream; + return this; + } + + + /** + * The resulting image + */ + public Builder twoHundredImagePngResponseStream(Blob twoHundredImagePngResponseStream) { + Utils.checkNotNull(twoHundredImagePngResponseStream, "twoHundredImagePngResponseStream"); + this.twoHundredImagePngResponseStream = Optional.ofNullable(twoHundredImagePngResponseStream); + return this; + } + + /** + * The resulting image + */ + public Builder twoHundredImagePngResponseStream(Optional twoHundredImagePngResponseStream) { + Utils.checkNotNull(twoHundredImagePngResponseStream, "twoHundredImagePngResponseStream"); + this.twoHundredImagePngResponseStream = twoHundredImagePngResponseStream; + return this; + } + + + /** + * The resulting image + */ + public Builder twoHundredImageXPortablePixmapResponseStream(Blob twoHundredImageXPortablePixmapResponseStream) { + Utils.checkNotNull(twoHundredImageXPortablePixmapResponseStream, "twoHundredImageXPortablePixmapResponseStream"); + this.twoHundredImageXPortablePixmapResponseStream = Optional.ofNullable(twoHundredImageXPortablePixmapResponseStream); + return this; + } + + /** + * The resulting image + */ + public Builder twoHundredImageXPortablePixmapResponseStream(Optional twoHundredImageXPortablePixmapResponseStream) { + Utils.checkNotNull(twoHundredImageXPortablePixmapResponseStream, "twoHundredImageXPortablePixmapResponseStream"); + this.twoHundredImageXPortablePixmapResponseStream = twoHundredImageXPortablePixmapResponseStream; + return this; + } + + public TranscodeImageResponse build() { + + return new TranscodeImageResponse( + contentType, statusCode, rawResponse, + twoHundredImageJpegResponseStream, twoHundredImagePngResponseStream, twoHundredImageXPortablePixmapResponseStream); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeSubtitlesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeSubtitlesRequestBuilder.java new file mode 100644 index 00000000..0f36ced2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeSubtitlesRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.TranscodeSubtitlesRequest; +import dev.plexapi.sdk.operations.TranscodeSubtitles; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class TranscodeSubtitlesRequestBuilder { + + private TranscodeSubtitlesRequest request; + private final SDKConfiguration sdkConfiguration; + + public TranscodeSubtitlesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public TranscodeSubtitlesRequestBuilder request(TranscodeSubtitlesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new TranscodeSubtitles.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeSubtitlesResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeSubtitlesResponse.java new file mode 100644 index 00000000..192506cf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/TranscodeSubtitlesResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class TranscodeSubtitlesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public TranscodeSubtitlesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public TranscodeSubtitlesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TranscodeSubtitlesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TranscodeSubtitlesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranscodeSubtitlesResponse other = (TranscodeSubtitlesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(TranscodeSubtitlesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public TranscodeSubtitlesResponse build() { + + return new TranscodeSubtitlesResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/TriggerFallbackRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/TriggerFallbackRequestBuilder.java new file mode 100644 index 00000000..9b643d00 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/TriggerFallbackRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.TriggerFallbackRequest; +import dev.plexapi.sdk.operations.TriggerFallback; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class TriggerFallbackRequestBuilder { + + private TriggerFallbackRequest request; + private final SDKConfiguration sdkConfiguration; + + public TriggerFallbackRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public TriggerFallbackRequestBuilder request(TriggerFallbackRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new TriggerFallback.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/TriggerFallbackResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/TriggerFallbackResponse.java new file mode 100644 index 00000000..e3eacad8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/TriggerFallbackResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class TriggerFallbackResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public TriggerFallbackResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public TriggerFallbackResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TriggerFallbackResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TriggerFallbackResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TriggerFallbackResponse other = (TriggerFallbackResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(TriggerFallbackResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public TriggerFallbackResponse build() { + + return new TriggerFallbackResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/TuneChannelRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/TuneChannelRequestBuilder.java new file mode 100644 index 00000000..3b6da19d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/TuneChannelRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.TuneChannelRequest; +import dev.plexapi.sdk.operations.TuneChannel; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class TuneChannelRequestBuilder { + + private TuneChannelRequest request; + private final SDKConfiguration sdkConfiguration; + + public TuneChannelRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public TuneChannelRequestBuilder request(TuneChannelRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new TuneChannel.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/TuneChannelResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/TuneChannelResponse.java new file mode 100644 index 00000000..58d41202 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/TuneChannelResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class TuneChannelResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithMetadata; + + + private Map> headers; + + @JsonCreator + public TuneChannelResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithMetadata, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + this.headers = headers; + } + + public TuneChannelResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithMetadata() { + return (Optional) mediaContainerWithMetadata; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public TuneChannelResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TuneChannelResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TuneChannelResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public TuneChannelResponse withMediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + + /** + * OK + */ + public TuneChannelResponse withMediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + public TuneChannelResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TuneChannelResponse other = (TuneChannelResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithMetadata, other.mediaContainerWithMetadata) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + @Override + public String toString() { + return Utils.toString(TuneChannelResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithMetadata", mediaContainerWithMetadata, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithMetadata = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithMetadata(MediaContainerWithMetadata mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = Optional.ofNullable(mediaContainerWithMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithMetadata(Optional mediaContainerWithMetadata) { + Utils.checkNotNull(mediaContainerWithMetadata, "mediaContainerWithMetadata"); + this.mediaContainerWithMetadata = mediaContainerWithMetadata; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public TuneChannelResponse build() { + + return new TuneChannelResponse( + contentType, statusCode, rawResponse, + mediaContainerWithMetadata, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UnmatchRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UnmatchRequestBuilder.java new file mode 100644 index 00000000..fbdfb3c0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UnmatchRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.UnmatchRequest; +import dev.plexapi.sdk.operations.Unmatch; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class UnmatchRequestBuilder { + + private UnmatchRequest request; + private final SDKConfiguration sdkConfiguration; + + public UnmatchRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UnmatchRequestBuilder request(UnmatchRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new Unmatch.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UnmatchResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UnmatchResponse.java new file mode 100644 index 00000000..bd4409ee --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UnmatchResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class UnmatchResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UnmatchResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UnmatchResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UnmatchResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UnmatchResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnmatchResponse other = (UnmatchResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UnmatchResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UnmatchResponse build() { + + return new UnmatchResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UnscrobbleRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UnscrobbleRequestBuilder.java new file mode 100644 index 00000000..84b525c2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UnscrobbleRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.UnscrobbleRequest; +import dev.plexapi.sdk.operations.Unscrobble; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class UnscrobbleRequestBuilder { + + private UnscrobbleRequest request; + private final SDKConfiguration sdkConfiguration; + + public UnscrobbleRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UnscrobbleRequestBuilder request(UnscrobbleRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new Unscrobble.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UnscrobbleResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UnscrobbleResponse.java new file mode 100644 index 00000000..610812bc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UnscrobbleResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class UnscrobbleResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UnscrobbleResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UnscrobbleResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UnscrobbleResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UnscrobbleResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnscrobbleResponse other = (UnscrobbleResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UnscrobbleResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UnscrobbleResponse build() { + + return new UnscrobbleResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UnshuffleRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UnshuffleRequestBuilder.java new file mode 100644 index 00000000..f96c6182 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UnshuffleRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.UnshuffleRequest; +import dev.plexapi.sdk.operations.Unshuffle; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class UnshuffleRequestBuilder { + + private UnshuffleRequest request; + private final SDKConfiguration sdkConfiguration; + + public UnshuffleRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UnshuffleRequestBuilder request(UnshuffleRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new Unshuffle.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UnshuffleResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UnshuffleResponse.java new file mode 100644 index 00000000..2b5ffea1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UnshuffleResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class UnshuffleResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional mediaContainerWithPlaylistMetadata; + + @JsonCreator + public UnshuffleResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + } + + public UnshuffleResponse( + 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainerWithPlaylistMetadata() { + return (Optional) mediaContainerWithPlaylistMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UnshuffleResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UnshuffleResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UnshuffleResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public UnshuffleResponse withMediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + + /** + * OK + */ + public UnshuffleResponse withMediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnshuffleResponse other = (UnshuffleResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.mediaContainerWithPlaylistMetadata, other.mediaContainerWithPlaylistMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + @Override + public String toString() { + return Utils.toString(UnshuffleResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "mediaContainerWithPlaylistMetadata", mediaContainerWithPlaylistMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional mediaContainerWithPlaylistMetadata = 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; + } + + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(MediaContainerWithPlaylistMetadata mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = Optional.ofNullable(mediaContainerWithPlaylistMetadata); + return this; + } + + /** + * OK + */ + public Builder mediaContainerWithPlaylistMetadata(Optional mediaContainerWithPlaylistMetadata) { + Utils.checkNotNull(mediaContainerWithPlaylistMetadata, "mediaContainerWithPlaylistMetadata"); + this.mediaContainerWithPlaylistMetadata = mediaContainerWithPlaylistMetadata; + return this; + } + + public UnshuffleResponse build() { + + return new UnshuffleResponse( + contentType, statusCode, rawResponse, + mediaContainerWithPlaylistMetadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateHubVisibilityRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateHubVisibilityRequestBuilder.java new file mode 100644 index 00000000..5ede6b40 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateHubVisibilityRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.UpdateHubVisibilityRequest; +import dev.plexapi.sdk.operations.UpdateHubVisibility; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class UpdateHubVisibilityRequestBuilder { + + private UpdateHubVisibilityRequest request; + private final SDKConfiguration sdkConfiguration; + + public UpdateHubVisibilityRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UpdateHubVisibilityRequestBuilder request(UpdateHubVisibilityRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new UpdateHubVisibility.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateHubVisibilityResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateHubVisibilityResponse.java new file mode 100644 index 00000000..9f321471 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateHubVisibilityResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class UpdateHubVisibilityResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UpdateHubVisibilityResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UpdateHubVisibilityResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdateHubVisibilityResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdateHubVisibilityResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateHubVisibilityResponse other = (UpdateHubVisibilityResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpdateHubVisibilityResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UpdateHubVisibilityResponse build() { + + return new UpdateHubVisibilityResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemArtworkRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemArtworkRequestBuilder.java new file mode 100644 index 00000000..ec241573 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemArtworkRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.UpdateItemArtworkRequest; +import dev.plexapi.sdk.operations.UpdateItemArtwork; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class UpdateItemArtworkRequestBuilder { + + private UpdateItemArtworkRequest request; + private final SDKConfiguration sdkConfiguration; + + public UpdateItemArtworkRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UpdateItemArtworkRequestBuilder request(UpdateItemArtworkRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new UpdateItemArtwork.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemArtworkResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemArtworkResponse.java new file mode 100644 index 00000000..4a3d9dde --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemArtworkResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class UpdateItemArtworkResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UpdateItemArtworkResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UpdateItemArtworkResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdateItemArtworkResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdateItemArtworkResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateItemArtworkResponse other = (UpdateItemArtworkResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpdateItemArtworkResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UpdateItemArtworkResponse build() { + + return new UpdateItemArtworkResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemsRequestBuilder.java new file mode 100644 index 00000000..0ab5e793 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.UpdateItemsRequest; +import dev.plexapi.sdk.operations.UpdateItems; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class UpdateItemsRequestBuilder { + + private UpdateItemsRequest request; + private final SDKConfiguration sdkConfiguration; + + public UpdateItemsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UpdateItemsRequestBuilder request(UpdateItemsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new UpdateItems.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemsResponse.java new file mode 100644 index 00000000..0f5ce919 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdateItemsResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class UpdateItemsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UpdateItemsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UpdateItemsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdateItemsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdateItemsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateItemsResponse other = (UpdateItemsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpdateItemsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UpdateItemsResponse build() { + + return new UpdateItemsResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlayProgressRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlayProgressRequestBuilder.java deleted file mode 100644 index b22b5f29..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlayProgressRequestBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.UpdatePlayProgressRequest; -import dev.plexapi.sdk.operations.UpdatePlayProgress; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; -import java.lang.Exception; -import java.lang.String; -import java.util.concurrent.CompletableFuture; - -public class UpdatePlayProgressRequestBuilder { - - private String key; - private Double time; - private String state; - private final SDKConfiguration sdkConfiguration; - - public UpdatePlayProgressRequestBuilder(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - public UpdatePlayProgressRequestBuilder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public UpdatePlayProgressRequestBuilder time(double time) { - Utils.checkNotNull(time, "time"); - this.time = time; - return this; - } - - public UpdatePlayProgressRequestBuilder state(String state) { - Utils.checkNotNull(state, "state"); - this.state = state; - return this; - } - - - private UpdatePlayProgressRequest buildRequest() { - - UpdatePlayProgressRequest request = new UpdatePlayProgressRequest(key, - time, - state); - - return request; - } - - public CompletableFuture call() throws Exception { - - AsyncRequestOperation operation - = new UpdatePlayProgress.Async(sdkConfiguration); - UpdatePlayProgressRequest request = buildRequest(); - - return operation.doRequest(request) - .thenCompose(operation::handleResponse); - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlayProgressResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlayProgressResponse.java deleted file mode 100644 index d5eeb10d..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlayProgressResponse.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.models.operations.async; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.plexapi.sdk.utils.AsyncResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.lang.Override; -import java.lang.String; -import java.net.http.HttpResponse; - - -public class UpdatePlayProgressResponse implements AsyncResponse { - /** - * HTTP response content type for this operation - */ - private String contentType; - - /** - * HTTP response status code for this operation - */ - private int statusCode; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - private HttpResponse rawResponse; - - @JsonCreator - public UpdatePlayProgressResponse( - String contentType, - int statusCode, - HttpResponse rawResponse) { - Utils.checkNotNull(contentType, "contentType"); - Utils.checkNotNull(statusCode, "statusCode"); - Utils.checkNotNull(rawResponse, "rawResponse"); - this.contentType = contentType; - this.statusCode = statusCode; - this.rawResponse = rawResponse; - } - - /** - * HTTP response content type for this operation - */ - @JsonIgnore - public String contentType() { - return contentType; - } - - /** - * HTTP response status code for this operation - */ - @JsonIgnore - public int statusCode() { - return statusCode; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @JsonIgnore - public HttpResponse rawResponse() { - return rawResponse; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * HTTP response content type for this operation - */ - public UpdatePlayProgressResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - /** - * HTTP response status code for this operation - */ - public UpdatePlayProgressResponse withStatusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public UpdatePlayProgressResponse withRawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePlayProgressResponse other = (UpdatePlayProgressResponse) o; - return - Utils.enhancedDeepEquals(this.contentType, other.contentType) && - Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && - Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - contentType, statusCode, rawResponse); - } - - @Override - public String toString() { - return Utils.toString(UpdatePlayProgressResponse.class, - "contentType", contentType, - "statusCode", statusCode, - "rawResponse", rawResponse); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private String contentType; - - private Integer statusCode; - - private HttpResponse rawResponse; - - private Builder() { - // force use of static builder() method - } - - - /** - * HTTP response content type for this operation - */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; - return this; - } - - - /** - * HTTP response status code for this operation - */ - public Builder statusCode(int statusCode) { - Utils.checkNotNull(statusCode, "statusCode"); - this.statusCode = statusCode; - return this; - } - - - /** - * Raw HTTP response; suitable for custom response parsing - */ - public Builder rawResponse(HttpResponse rawResponse) { - Utils.checkNotNull(rawResponse, "rawResponse"); - this.rawResponse = rawResponse; - return this; - } - - public UpdatePlayProgressResponse build() { - - return new UpdatePlayProgressResponse( - contentType, statusCode, rawResponse); - } - - } -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlaylistRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlaylistRequestBuilder.java index ece5ede6..dfac1ce7 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlaylistRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UpdatePlaylistRequestBuilder.java @@ -9,68 +9,28 @@ import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.models.operations.UpdatePlaylistRequest; import dev.plexapi.sdk.operations.UpdatePlaylist; import dev.plexapi.sdk.utils.Utils; -import java.lang.Double; import java.lang.Exception; -import java.lang.String; -import java.util.Optional; import java.util.concurrent.CompletableFuture; public class UpdatePlaylistRequestBuilder { - private Double playlistID; - private Optional title = Optional.empty(); - private Optional summary = Optional.empty(); + private UpdatePlaylistRequest request; private final SDKConfiguration sdkConfiguration; public UpdatePlaylistRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public UpdatePlaylistRequestBuilder playlistID(double playlistID) { - Utils.checkNotNull(playlistID, "playlistID"); - this.playlistID = playlistID; + public UpdatePlaylistRequestBuilder request(UpdatePlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - - public UpdatePlaylistRequestBuilder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.of(title); - return this; - } - - public UpdatePlaylistRequestBuilder title(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public UpdatePlaylistRequestBuilder summary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.of(summary); - return this; - } - - public UpdatePlaylistRequestBuilder summary(Optional summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = summary; - return this; - } - - - private UpdatePlaylistRequest buildRequest() { - - UpdatePlaylistRequest request = new UpdatePlaylistRequest(playlistID, - title, - summary); - - return request; - } public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new UpdatePlaylist.Async(sdkConfiguration); - UpdatePlaylistRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/UploadPlaylistRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/UploadPlaylistRequestBuilder.java index 7539d9ba..b28c303a 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/async/UploadPlaylistRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/UploadPlaylistRequestBuilder.java @@ -5,73 +5,34 @@ package dev.plexapi.sdk.models.operations.async; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.models.operations.QueryParamForce; import dev.plexapi.sdk.models.operations.UploadPlaylistRequest; import dev.plexapi.sdk.operations.UploadPlaylist; -import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Exception; -import java.lang.Long; -import java.lang.String; import java.util.concurrent.CompletableFuture; public class UploadPlaylistRequestBuilder { - private String path; - private QueryParamForce force; - private Long sectionID; + private UploadPlaylistRequest request; private final SDKConfiguration sdkConfiguration; public UploadPlaylistRequestBuilder(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - public UploadPlaylistRequestBuilder path(String path) { - Utils.checkNotNull(path, "path"); - this.path = path; + public UploadPlaylistRequestBuilder request(UploadPlaylistRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } - public UploadPlaylistRequestBuilder force(QueryParamForce force) { - Utils.checkNotNull(force, "force"); - this.force = force; - return this; - } - - public UploadPlaylistRequestBuilder sectionID(long sectionID) { - Utils.checkNotNull(sectionID, "sectionID"); - this.sectionID = sectionID; - return this; - } - - - private UploadPlaylistRequest buildRequest() { - if (sectionID == null) { - sectionID = _SINGLETON_VALUE_SectionID.value(); - } - - UploadPlaylistRequest request = new UploadPlaylistRequest(path, - force, - sectionID); - - return request; - } - public CompletableFuture call() throws Exception { AsyncRequestOperation operation = new UploadPlaylist.Async(sdkConfiguration); - UploadPlaylistRequest request = buildRequest(); return operation.doRequest(request) .thenCompose(operation::handleResponse); } - - private static final LazySingletonValue _SINGLETON_VALUE_SectionID = - new LazySingletonValue<>( - "sectionID", - "1", - new TypeReference() {}); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/VoiceSearchHubsRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/VoiceSearchHubsRequestBuilder.java new file mode 100644 index 00000000..d0a262ab --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/VoiceSearchHubsRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsRequest; +import dev.plexapi.sdk.operations.VoiceSearchHubs; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class VoiceSearchHubsRequestBuilder { + + private VoiceSearchHubsRequest request; + private final SDKConfiguration sdkConfiguration; + + public VoiceSearchHubsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public VoiceSearchHubsRequestBuilder request(VoiceSearchHubsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new VoiceSearchHubs.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/VoiceSearchHubsResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/VoiceSearchHubsResponse.java new file mode 100644 index 00000000..dd417dea --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/VoiceSearchHubsResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsResponseBody; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class VoiceSearchHubsResponse implements AsyncResponse { + /** + * 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; + + /** + * OK + */ + private Optional object; + + + private Map> headers; + + @JsonCreator + public VoiceSearchHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + this.headers = headers; + } + + public VoiceSearchHubsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * 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; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public VoiceSearchHubsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public VoiceSearchHubsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public VoiceSearchHubsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public VoiceSearchHubsResponse withObject(VoiceSearchHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * OK + */ + public VoiceSearchHubsResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public VoiceSearchHubsResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VoiceSearchHubsResponse other = (VoiceSearchHubsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object, headers); + } + + @Override + public String toString() { + return Utils.toString(VoiceSearchHubsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Map> headers; + + 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; + } + + + /** + * OK + */ + public Builder object(VoiceSearchHubsResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public VoiceSearchHubsResponse build() { + + return new VoiceSearchHubsResponse( + contentType, statusCode, rawResponse, + object, headers); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/WriteLogRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/WriteLogRequestBuilder.java new file mode 100644 index 00000000..4b8476f0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/WriteLogRequestBuilder.java @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.operations.WriteLog; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class WriteLogRequestBuilder { + + private byte[] request; + private final SDKConfiguration sdkConfiguration; + + public WriteLogRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public WriteLogRequestBuilder request(byte[] request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new WriteLog.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/WriteLogResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/WriteLogResponse.java new file mode 100644 index 00000000..0079f0fc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/WriteLogResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class WriteLogResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public WriteLogResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public WriteLogResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public WriteLogResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public WriteLogResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WriteLogResponse other = (WriteLogResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(WriteLogResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public WriteLogResponse build() { + + return new WriteLogResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/WriteMessageRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/async/WriteMessageRequestBuilder.java new file mode 100644 index 00000000..c69e579c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/WriteMessageRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.models.operations.WriteMessageRequest; +import dev.plexapi.sdk.operations.WriteMessage; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Exception; +import java.util.concurrent.CompletableFuture; + +public class WriteMessageRequestBuilder { + + private WriteMessageRequest request; + private final SDKConfiguration sdkConfiguration; + + public WriteMessageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public WriteMessageRequestBuilder request(WriteMessageRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() throws Exception { + + AsyncRequestOperation operation + = new WriteMessage.Async(sdkConfiguration); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/async/WriteMessageResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/async/WriteMessageResponse.java new file mode 100644 index 00000000..052ae762 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/async/WriteMessageResponse.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.AsyncResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; + + +public class WriteMessageResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public WriteMessageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public WriteMessageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public WriteMessageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public WriteMessageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WriteMessageResponse other = (WriteMessageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse); + } + + @Override + public String toString() { + return Utils.toString(WriteMessageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public WriteMessageResponse build() { + + return new WriteMessageResponse( + contentType, statusCode, rawResponse); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Accepts.java b/src/main/java/dev/plexapi/sdk/models/shared/Accepts.java new file mode 100644 index 00000000..d791332e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Accepts.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum Accepts { + APPLICATION_JSON("application/json"), + APPLICATION_XML("application/xml"); + + @JsonValue + private final String value; + + Accepts(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Accepts o: Accepts.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/AdvancedSubtitles.java b/src/main/java/dev/plexapi/sdk/models/shared/AdvancedSubtitles.java new file mode 100644 index 00000000..d4aa4cae --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/AdvancedSubtitles.java @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum AdvancedSubtitles { + BURN("burn"), + TEXT("text"), + UNKNOWN("unknown"); + + @JsonValue + private final String value; + + AdvancedSubtitles(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (AdvancedSubtitles o: AdvancedSubtitles.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/AiringsType.java b/src/main/java/dev/plexapi/sdk/models/shared/AiringsType.java new file mode 100644 index 00000000..8d6ac344 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/AiringsType.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum AiringsType { + NEW_AIRINGS_ONLY("New Airings Only"), + NEW_AND_REPEAT_AIRINGS("New and Repeat Airings"); + + @JsonValue + private final String value; + + AiringsType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (AiringsType o: AiringsType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/BoolInt.java b/src/main/java/dev/plexapi/sdk/models/shared/BoolInt.java new file mode 100644 index 00000000..9cb6b369 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/BoolInt.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public enum BoolInt { + ZERO(0L), + ONE(1L); + + @JsonValue + private final long value; + + BoolInt(long value) { + this.value = value; + } + + public long value() { + return value; + } + + public static Optional fromValue(long value) { + for (BoolInt o: BoolInt.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Channel.java b/src/main/java/dev/plexapi/sdk/models/shared/Channel.java new file mode 100644 index 00000000..39e4ca1c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Channel.java @@ -0,0 +1,419 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class Channel { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("callSign") + private Optional callSign; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("channelVcn") + private Optional channelVcn; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hd") + private Optional hd; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonCreator + public Channel( + @JsonProperty("title") Optional title, + @JsonProperty("callSign") Optional callSign, + @JsonProperty("channelVcn") Optional channelVcn, + @JsonProperty("hd") Optional hd, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(callSign, "callSign"); + Utils.checkNotNull(channelVcn, "channelVcn"); + Utils.checkNotNull(hd, "hd"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(thumb, "thumb"); + this.title = title; + this.callSign = callSign; + this.channelVcn = channelVcn; + this.hd = hd; + this.identifier = identifier; + this.key = key; + this.language = language; + this.thumb = thumb; + } + + public Channel() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional callSign() { + return callSign; + } + + @JsonIgnore + public Optional channelVcn() { + return channelVcn; + } + + @JsonIgnore + public Optional hd() { + return hd; + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional thumb() { + return thumb; + } + + public static Builder builder() { + return new Builder(); + } + + + public Channel withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public Channel withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Channel withCallSign(String callSign) { + Utils.checkNotNull(callSign, "callSign"); + this.callSign = Optional.ofNullable(callSign); + return this; + } + + + public Channel withCallSign(Optional callSign) { + Utils.checkNotNull(callSign, "callSign"); + this.callSign = callSign; + return this; + } + + public Channel withChannelVcn(String channelVcn) { + Utils.checkNotNull(channelVcn, "channelVcn"); + this.channelVcn = Optional.ofNullable(channelVcn); + return this; + } + + + public Channel withChannelVcn(Optional channelVcn) { + Utils.checkNotNull(channelVcn, "channelVcn"); + this.channelVcn = channelVcn; + return this; + } + + public Channel withHd(boolean hd) { + Utils.checkNotNull(hd, "hd"); + this.hd = Optional.ofNullable(hd); + return this; + } + + + public Channel withHd(Optional hd) { + Utils.checkNotNull(hd, "hd"); + this.hd = hd; + return this; + } + + public Channel withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public Channel withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Channel withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public Channel withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Channel withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public Channel withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public Channel withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + public Channel withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Channel other = (Channel) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.callSign, other.callSign) && + Utils.enhancedDeepEquals(this.channelVcn, other.channelVcn) && + Utils.enhancedDeepEquals(this.hd, other.hd) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, callSign, channelVcn, + hd, identifier, key, + language, thumb); + } + + @Override + public String toString() { + return Utils.toString(Channel.class, + "title", title, + "callSign", callSign, + "channelVcn", channelVcn, + "hd", hd, + "identifier", identifier, + "key", key, + "language", language, + "thumb", thumb); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional callSign = Optional.empty(); + + private Optional channelVcn = Optional.empty(); + + private Optional hd = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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 callSign(String callSign) { + Utils.checkNotNull(callSign, "callSign"); + this.callSign = Optional.ofNullable(callSign); + return this; + } + + public Builder callSign(Optional callSign) { + Utils.checkNotNull(callSign, "callSign"); + this.callSign = callSign; + return this; + } + + + public Builder channelVcn(String channelVcn) { + Utils.checkNotNull(channelVcn, "channelVcn"); + this.channelVcn = Optional.ofNullable(channelVcn); + return this; + } + + public Builder channelVcn(Optional channelVcn) { + Utils.checkNotNull(channelVcn, "channelVcn"); + this.channelVcn = channelVcn; + return this; + } + + + public Builder hd(boolean hd) { + Utils.checkNotNull(hd, "hd"); + this.hd = Optional.ofNullable(hd); + return this; + } + + public Builder hd(Optional hd) { + Utils.checkNotNull(hd, "hd"); + this.hd = hd; + 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 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 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 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 Channel build() { + + return new Channel( + title, callSign, channelVcn, + hd, identifier, key, + language, thumb); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/ChannelMapping.java b/src/main/java/dev/plexapi/sdk/models/shared/ChannelMapping.java new file mode 100644 index 00000000..0f2268d3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/ChannelMapping.java @@ -0,0 +1,243 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class ChannelMapping { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("channelKey") + private Optional channelKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("deviceIdentifier") + private Optional deviceIdentifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("enabled") + private Optional enabled; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineupIdentifier") + private Optional lineupIdentifier; + + @JsonCreator + public ChannelMapping( + @JsonProperty("channelKey") Optional channelKey, + @JsonProperty("deviceIdentifier") Optional deviceIdentifier, + @JsonProperty("enabled") Optional enabled, + @JsonProperty("lineupIdentifier") Optional lineupIdentifier) { + Utils.checkNotNull(channelKey, "channelKey"); + Utils.checkNotNull(deviceIdentifier, "deviceIdentifier"); + Utils.checkNotNull(enabled, "enabled"); + Utils.checkNotNull(lineupIdentifier, "lineupIdentifier"); + this.channelKey = channelKey; + this.deviceIdentifier = deviceIdentifier; + this.enabled = enabled; + this.lineupIdentifier = lineupIdentifier; + } + + public ChannelMapping() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + @JsonIgnore + public Optional channelKey() { + return channelKey; + } + + @JsonIgnore + public Optional deviceIdentifier() { + return deviceIdentifier; + } + + @JsonIgnore + public Optional enabled() { + return enabled; + } + + @JsonIgnore + public Optional lineupIdentifier() { + return lineupIdentifier; + } + + public static Builder builder() { + return new Builder(); + } + + + public ChannelMapping withChannelKey(String channelKey) { + Utils.checkNotNull(channelKey, "channelKey"); + this.channelKey = Optional.ofNullable(channelKey); + return this; + } + + + public ChannelMapping withChannelKey(Optional channelKey) { + Utils.checkNotNull(channelKey, "channelKey"); + this.channelKey = channelKey; + return this; + } + + public ChannelMapping withDeviceIdentifier(String deviceIdentifier) { + Utils.checkNotNull(deviceIdentifier, "deviceIdentifier"); + this.deviceIdentifier = Optional.ofNullable(deviceIdentifier); + return this; + } + + + public ChannelMapping withDeviceIdentifier(Optional deviceIdentifier) { + Utils.checkNotNull(deviceIdentifier, "deviceIdentifier"); + this.deviceIdentifier = deviceIdentifier; + return this; + } + + public ChannelMapping withEnabled(String enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = Optional.ofNullable(enabled); + return this; + } + + + public ChannelMapping withEnabled(Optional enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = enabled; + return this; + } + + public ChannelMapping withLineupIdentifier(String lineupIdentifier) { + Utils.checkNotNull(lineupIdentifier, "lineupIdentifier"); + this.lineupIdentifier = Optional.ofNullable(lineupIdentifier); + return this; + } + + + public ChannelMapping withLineupIdentifier(Optional lineupIdentifier) { + Utils.checkNotNull(lineupIdentifier, "lineupIdentifier"); + this.lineupIdentifier = lineupIdentifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelMapping other = (ChannelMapping) o; + return + Utils.enhancedDeepEquals(this.channelKey, other.channelKey) && + Utils.enhancedDeepEquals(this.deviceIdentifier, other.deviceIdentifier) && + Utils.enhancedDeepEquals(this.enabled, other.enabled) && + Utils.enhancedDeepEquals(this.lineupIdentifier, other.lineupIdentifier); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + channelKey, deviceIdentifier, enabled, + lineupIdentifier); + } + + @Override + public String toString() { + return Utils.toString(ChannelMapping.class, + "channelKey", channelKey, + "deviceIdentifier", deviceIdentifier, + "enabled", enabled, + "lineupIdentifier", lineupIdentifier); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional channelKey = Optional.empty(); + + private Optional deviceIdentifier = Optional.empty(); + + private Optional enabled = Optional.empty(); + + private Optional lineupIdentifier = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder channelKey(String channelKey) { + Utils.checkNotNull(channelKey, "channelKey"); + this.channelKey = Optional.ofNullable(channelKey); + return this; + } + + public Builder channelKey(Optional channelKey) { + Utils.checkNotNull(channelKey, "channelKey"); + this.channelKey = channelKey; + return this; + } + + + public Builder deviceIdentifier(String deviceIdentifier) { + Utils.checkNotNull(deviceIdentifier, "deviceIdentifier"); + this.deviceIdentifier = Optional.ofNullable(deviceIdentifier); + return this; + } + + public Builder deviceIdentifier(Optional deviceIdentifier) { + Utils.checkNotNull(deviceIdentifier, "deviceIdentifier"); + this.deviceIdentifier = deviceIdentifier; + return this; + } + + + public Builder enabled(String enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public Builder enabled(Optional enabled) { + Utils.checkNotNull(enabled, "enabled"); + this.enabled = enabled; + return this; + } + + + public Builder lineupIdentifier(String lineupIdentifier) { + Utils.checkNotNull(lineupIdentifier, "lineupIdentifier"); + this.lineupIdentifier = Optional.ofNullable(lineupIdentifier); + return this; + } + + public Builder lineupIdentifier(Optional lineupIdentifier) { + Utils.checkNotNull(lineupIdentifier, "lineupIdentifier"); + this.lineupIdentifier = lineupIdentifier; + return this; + } + + public ChannelMapping build() { + + return new ChannelMapping( + channelKey, deviceIdentifier, enabled, + lineupIdentifier); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Composite.java b/src/main/java/dev/plexapi/sdk/models/shared/Composite.java new file mode 100644 index 00000000..8faf9ef2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Composite.java @@ -0,0 +1,730 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class Composite { + /** + * Limit composite to specified metadata types + */ + @SpeakeasyMetadata("queryParam:name=type") + private Optional type; + + /** + * The image type + */ + @SpeakeasyMetadata("queryParam:name=format") + private Optional format; + + /** + * 6 character hex RGB value for background color for image + */ + @SpeakeasyMetadata("queryParam:name=backgroundColor") + private Optional backgroundColor; + + /** + * The width of the intra-image border + */ + @SpeakeasyMetadata("queryParam:name=border") + private Optional border; + + /** + * Number of columns to construct in the composite image + */ + @SpeakeasyMetadata("queryParam:name=cols") + private Optional cols; + + /** + * Where to crop source images to fit into composite image proportions + */ + @SpeakeasyMetadata("queryParam:name=crop") + private Optional crop; + + /** + * The height of the image + */ + @SpeakeasyMetadata("queryParam:name=height") + private Optional height; + + /** + * The default image type to use as the sources + */ + @SpeakeasyMetadata("queryParam:name=media") + private Optional media; + + /** + * Allow repetion of images if there are not enough source images to fill grid + */ + @SpeakeasyMetadata("queryParam:name=repeat") + private Optional repeat; + + /** + * Number of rows to construct in the composite image + */ + @SpeakeasyMetadata("queryParam:name=rows") + private Optional rows; + + /** + * The width of the image + */ + @SpeakeasyMetadata("queryParam:name=width") + private Optional width; + + @JsonCreator + public Composite( + Optional type, + Optional format, + Optional backgroundColor, + Optional border, + Optional cols, + Optional crop, + Optional height, + Optional media, + Optional repeat, + Optional rows, + Optional width) { + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(format, "format"); + Utils.checkNotNull(backgroundColor, "backgroundColor"); + Utils.checkNotNull(border, "border"); + Utils.checkNotNull(cols, "cols"); + Utils.checkNotNull(crop, "crop"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(repeat, "repeat"); + Utils.checkNotNull(rows, "rows"); + Utils.checkNotNull(width, "width"); + this.type = type; + this.format = format; + this.backgroundColor = backgroundColor; + this.border = border; + this.cols = cols; + this.crop = crop; + this.height = height; + this.media = media; + this.repeat = repeat; + this.rows = rows; + this.width = width; + } + + public Composite() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * Limit composite to specified metadata types + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * The image type + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional format() { + return (Optional) format; + } + + /** + * 6 character hex RGB value for background color for image + */ + @JsonIgnore + public Optional backgroundColor() { + return backgroundColor; + } + + /** + * The width of the intra-image border + */ + @JsonIgnore + public Optional border() { + return border; + } + + /** + * Number of columns to construct in the composite image + */ + @JsonIgnore + public Optional cols() { + return cols; + } + + /** + * Where to crop source images to fit into composite image proportions + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional crop() { + return (Optional) crop; + } + + /** + * The height of the image + */ + @JsonIgnore + public Optional height() { + return height; + } + + /** + * The default image type to use as the sources + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional media() { + return (Optional) media; + } + + /** + * Allow repetion of images if there are not enough source images to fill grid + */ + @JsonIgnore + public Optional repeat() { + return repeat; + } + + /** + * Number of rows to construct in the composite image + */ + @JsonIgnore + public Optional rows() { + return rows; + } + + /** + * The width of the image + */ + @JsonIgnore + public Optional width() { + return width; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Limit composite to specified metadata types + */ + public Composite withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * Limit composite to specified metadata types + */ + public Composite withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The image type + */ + public Composite withFormat(Format format) { + Utils.checkNotNull(format, "format"); + this.format = Optional.ofNullable(format); + return this; + } + + + /** + * The image type + */ + public Composite withFormat(Optional format) { + Utils.checkNotNull(format, "format"); + this.format = format; + return this; + } + + /** + * 6 character hex RGB value for background color for image + */ + public Composite withBackgroundColor(String backgroundColor) { + Utils.checkNotNull(backgroundColor, "backgroundColor"); + this.backgroundColor = Optional.ofNullable(backgroundColor); + return this; + } + + + /** + * 6 character hex RGB value for background color for image + */ + public Composite withBackgroundColor(Optional backgroundColor) { + Utils.checkNotNull(backgroundColor, "backgroundColor"); + this.backgroundColor = backgroundColor; + return this; + } + + /** + * The width of the intra-image border + */ + public Composite withBorder(long border) { + Utils.checkNotNull(border, "border"); + this.border = Optional.ofNullable(border); + return this; + } + + + /** + * The width of the intra-image border + */ + public Composite withBorder(Optional border) { + Utils.checkNotNull(border, "border"); + this.border = border; + return this; + } + + /** + * Number of columns to construct in the composite image + */ + public Composite withCols(long cols) { + Utils.checkNotNull(cols, "cols"); + this.cols = Optional.ofNullable(cols); + return this; + } + + + /** + * Number of columns to construct in the composite image + */ + public Composite withCols(Optional cols) { + Utils.checkNotNull(cols, "cols"); + this.cols = cols; + return this; + } + + /** + * Where to crop source images to fit into composite image proportions + */ + public Composite withCrop(Crop crop) { + Utils.checkNotNull(crop, "crop"); + this.crop = Optional.ofNullable(crop); + return this; + } + + + /** + * Where to crop source images to fit into composite image proportions + */ + public Composite withCrop(Optional crop) { + Utils.checkNotNull(crop, "crop"); + this.crop = crop; + return this; + } + + /** + * The height of the image + */ + public Composite withHeight(long height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + + /** + * The height of the image + */ + public Composite withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + /** + * The default image type to use as the sources + */ + public Composite withMedia(CompositeMedia media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + + /** + * The default image type to use as the sources + */ + public Composite withMedia(Optional media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + /** + * Allow repetion of images if there are not enough source images to fill grid + */ + public Composite withRepeat(boolean repeat) { + Utils.checkNotNull(repeat, "repeat"); + this.repeat = Optional.ofNullable(repeat); + return this; + } + + + /** + * Allow repetion of images if there are not enough source images to fill grid + */ + public Composite withRepeat(Optional repeat) { + Utils.checkNotNull(repeat, "repeat"); + this.repeat = repeat; + return this; + } + + /** + * Number of rows to construct in the composite image + */ + public Composite withRows(long rows) { + Utils.checkNotNull(rows, "rows"); + this.rows = Optional.ofNullable(rows); + return this; + } + + + /** + * Number of rows to construct in the composite image + */ + public Composite withRows(Optional rows) { + Utils.checkNotNull(rows, "rows"); + this.rows = rows; + return this; + } + + /** + * The width of the image + */ + public Composite withWidth(long width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + + /** + * The width of the image + */ + public Composite withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Composite other = (Composite) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.format, other.format) && + Utils.enhancedDeepEquals(this.backgroundColor, other.backgroundColor) && + Utils.enhancedDeepEquals(this.border, other.border) && + Utils.enhancedDeepEquals(this.cols, other.cols) && + Utils.enhancedDeepEquals(this.crop, other.crop) && + Utils.enhancedDeepEquals(this.height, other.height) && + Utils.enhancedDeepEquals(this.media, other.media) && + Utils.enhancedDeepEquals(this.repeat, other.repeat) && + Utils.enhancedDeepEquals(this.rows, other.rows) && + Utils.enhancedDeepEquals(this.width, other.width); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, format, backgroundColor, + border, cols, crop, + height, media, repeat, + rows, width); + } + + @Override + public String toString() { + return Utils.toString(Composite.class, + "type", type, + "format", format, + "backgroundColor", backgroundColor, + "border", border, + "cols", cols, + "crop", crop, + "height", height, + "media", media, + "repeat", repeat, + "rows", rows, + "width", width); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional type = Optional.empty(); + + private Optional format = Optional.empty(); + + private Optional backgroundColor = Optional.empty(); + + private Optional border = Optional.empty(); + + private Optional cols = Optional.empty(); + + private Optional crop = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional media = Optional.empty(); + + private Optional repeat = Optional.empty(); + + private Optional rows = Optional.empty(); + + private Optional width = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Limit composite to specified metadata types + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Limit composite to specified metadata types + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The image type + */ + public Builder format(Format format) { + Utils.checkNotNull(format, "format"); + this.format = Optional.ofNullable(format); + return this; + } + + /** + * The image type + */ + public Builder format(Optional format) { + Utils.checkNotNull(format, "format"); + this.format = format; + return this; + } + + + /** + * 6 character hex RGB value for background color for image + */ + public Builder backgroundColor(String backgroundColor) { + Utils.checkNotNull(backgroundColor, "backgroundColor"); + this.backgroundColor = Optional.ofNullable(backgroundColor); + return this; + } + + /** + * 6 character hex RGB value for background color for image + */ + public Builder backgroundColor(Optional backgroundColor) { + Utils.checkNotNull(backgroundColor, "backgroundColor"); + this.backgroundColor = backgroundColor; + return this; + } + + + /** + * The width of the intra-image border + */ + public Builder border(long border) { + Utils.checkNotNull(border, "border"); + this.border = Optional.ofNullable(border); + return this; + } + + /** + * The width of the intra-image border + */ + public Builder border(Optional border) { + Utils.checkNotNull(border, "border"); + this.border = border; + return this; + } + + + /** + * Number of columns to construct in the composite image + */ + public Builder cols(long cols) { + Utils.checkNotNull(cols, "cols"); + this.cols = Optional.ofNullable(cols); + return this; + } + + /** + * Number of columns to construct in the composite image + */ + public Builder cols(Optional cols) { + Utils.checkNotNull(cols, "cols"); + this.cols = cols; + return this; + } + + + /** + * Where to crop source images to fit into composite image proportions + */ + public Builder crop(Crop crop) { + Utils.checkNotNull(crop, "crop"); + this.crop = Optional.ofNullable(crop); + return this; + } + + /** + * Where to crop source images to fit into composite image proportions + */ + public Builder crop(Optional crop) { + Utils.checkNotNull(crop, "crop"); + this.crop = crop; + return this; + } + + + /** + * The height of the image + */ + public Builder height(long height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + /** + * The height of the image + */ + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + + /** + * The default image type to use as the sources + */ + public Builder media(CompositeMedia media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + /** + * The default image type to use as the sources + */ + public Builder media(Optional media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + + /** + * Allow repetion of images if there are not enough source images to fill grid + */ + public Builder repeat(boolean repeat) { + Utils.checkNotNull(repeat, "repeat"); + this.repeat = Optional.ofNullable(repeat); + return this; + } + + /** + * Allow repetion of images if there are not enough source images to fill grid + */ + public Builder repeat(Optional repeat) { + Utils.checkNotNull(repeat, "repeat"); + this.repeat = repeat; + return this; + } + + + /** + * Number of rows to construct in the composite image + */ + public Builder rows(long rows) { + Utils.checkNotNull(rows, "rows"); + this.rows = Optional.ofNullable(rows); + return this; + } + + /** + * Number of rows to construct in the composite image + */ + public Builder rows(Optional rows) { + Utils.checkNotNull(rows, "rows"); + this.rows = rows; + return this; + } + + + /** + * The width of the image + */ + public Builder width(long width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + /** + * The width of the image + */ + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Composite build() { + + return new Composite( + type, format, backgroundColor, + border, cols, crop, + height, media, repeat, + rows, width); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/CompositeMedia.java b/src/main/java/dev/plexapi/sdk/models/shared/CompositeMedia.java new file mode 100644 index 00000000..63f4231d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/CompositeMedia.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * CompositeMedia + * + *

The default image type to use as the sources + */ +public enum CompositeMedia { + THUMB("thumb"), + ART("art"), + BANNER("banner"); + + @JsonValue + private final String value; + + CompositeMedia(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (CompositeMedia o: CompositeMedia.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Crop.java b/src/main/java/dev/plexapi/sdk/models/shared/Crop.java new file mode 100644 index 00000000..fce15061 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Crop.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * Crop + * + *

Where to crop source images to fit into composite image proportions + */ +public enum Crop { + CENTER("center"), + TOP("top"); + + @JsonValue + private final String value; + + Crop(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Crop o: Crop.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Decision.java b/src/main/java/dev/plexapi/sdk/models/shared/Decision.java new file mode 100644 index 00000000..19d1586e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Decision.java @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum Decision { + DIRECTPLAY("directplay"), + TRANSCODE("transcode"), + NONE("none"); + + @JsonValue + private final String value; + + Decision(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Decision o: Decision.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Default.java b/src/main/java/dev/plexapi/sdk/models/shared/Default.java new file mode 100644 index 00000000..9347ba1b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Default.java @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import dev.plexapi.sdk.utils.OneOfDeserializer; +import dev.plexapi.sdk.utils.TypedObject; +import dev.plexapi.sdk.utils.Utils.JsonShape; +import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; + +/** + * Default + * + *

The default value of this setting + */ +@JsonDeserialize(using = Default._Deserializer.class) +public class Default { + + @JsonValue + private TypedObject value; + + private Default(TypedObject value) { + this.value = value; + } + + public static Default of(String value) { + Utils.checkNotNull(value, "value"); + return new Default(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static Default of(double value) { + Utils.checkNotNull(value, "value"); + return new Default(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static Default of(boolean value) { + Utils.checkNotNull(value, "value"); + return new Default(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + /** + * Returns an instance of one of these types: + *

    + *
  • {@code java.lang.String}
  • + *
  • {@code double}
  • + *
  • {@code boolean}
  • + *
+ * + *

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

+     * if (obj.value() instanceof String) {
+     *     String answer = (String) obj.value();
+     *     System.out.println("answer=" + answer);
+     * }
+     * 
+ * + * @return value of oneOf type + **/ + public java.lang.Object value() { + return value.value(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Default other = (Default) o; + return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); + } + + @Override + public int hashCode() { + return Utils.enhancedHash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends OneOfDeserializer { + + public _Deserializer() { + super(Default.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(Default.class, + "value", value); + } + +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/DefaultDirection.java b/src/main/java/dev/plexapi/sdk/models/shared/DefaultDirection.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/operations/DefaultDirection.java rename to src/main/java/dev/plexapi/sdk/models/shared/DefaultDirection.java index 3044ffc7..0cac0a58 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/DefaultDirection.java +++ b/src/main/java/dev/plexapi/sdk/models/shared/DefaultDirection.java @@ -1,7 +1,7 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -package dev.plexapi.sdk.models.operations; +package dev.plexapi.sdk.models.shared; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; @@ -11,11 +11,11 @@ import java.util.Optional; /** * DefaultDirection * - *

The direction of the sort. Can be either `asc` or `desc`. + *

This default diction of this sort */ public enum DefaultDirection { - Ascending("asc"), - Descending("desc"); + ASC("asc"), + DESC("desc"); @JsonValue private final String value; diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Device.java b/src/main/java/dev/plexapi/sdk/models/shared/Device.java new file mode 100644 index 00000000..89e79a10 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Device.java @@ -0,0 +1,643 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class Device { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ChannelMapping") + private Optional> channelMapping; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastSeenAt") + private Optional lastSeenAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("make") + private Optional make; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("model") + private Optional model; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("modelNumber") + private Optional modelNumber; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("protocol") + private Optional protocol; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sources") + private Optional sources; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("state") + private Optional state; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tuners") + private Optional tuners; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uri") + private Optional uri; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public Device( + @JsonProperty("ChannelMapping") Optional> channelMapping, + @JsonProperty("key") Optional key, + @JsonProperty("lastSeenAt") Optional lastSeenAt, + @JsonProperty("make") Optional make, + @JsonProperty("model") Optional model, + @JsonProperty("modelNumber") Optional modelNumber, + @JsonProperty("protocol") Optional protocol, + @JsonProperty("sources") Optional sources, + @JsonProperty("state") Optional state, + @JsonProperty("status") Optional status, + @JsonProperty("tuners") Optional tuners, + @JsonProperty("uri") Optional uri, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(channelMapping, "channelMapping"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastSeenAt, "lastSeenAt"); + Utils.checkNotNull(make, "make"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(modelNumber, "modelNumber"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(sources, "sources"); + Utils.checkNotNull(state, "state"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(tuners, "tuners"); + Utils.checkNotNull(uri, "uri"); + Utils.checkNotNull(uuid, "uuid"); + this.channelMapping = channelMapping; + this.key = key; + this.lastSeenAt = lastSeenAt; + this.make = make; + this.model = model; + this.modelNumber = modelNumber; + this.protocol = protocol; + this.sources = sources; + this.state = state; + this.status = status; + this.tuners = tuners; + this.uri = uri; + this.uuid = uuid; + } + + public Device() { + 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()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> channelMapping() { + return (Optional>) channelMapping; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional lastSeenAt() { + return lastSeenAt; + } + + @JsonIgnore + public Optional make() { + return make; + } + + @JsonIgnore + public Optional model() { + return model; + } + + @JsonIgnore + public Optional modelNumber() { + return modelNumber; + } + + @JsonIgnore + public Optional protocol() { + return protocol; + } + + @JsonIgnore + public Optional sources() { + return sources; + } + + @JsonIgnore + public Optional state() { + return state; + } + + @JsonIgnore + public Optional status() { + return status; + } + + @JsonIgnore + public Optional tuners() { + return tuners; + } + + @JsonIgnore + public Optional uri() { + return uri; + } + + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public Device withChannelMapping(List channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = Optional.ofNullable(channelMapping); + return this; + } + + + public Device withChannelMapping(Optional> channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = channelMapping; + return this; + } + + public Device withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public Device withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Device withLastSeenAt(long lastSeenAt) { + Utils.checkNotNull(lastSeenAt, "lastSeenAt"); + this.lastSeenAt = Optional.ofNullable(lastSeenAt); + return this; + } + + + public Device withLastSeenAt(Optional lastSeenAt) { + Utils.checkNotNull(lastSeenAt, "lastSeenAt"); + this.lastSeenAt = lastSeenAt; + return this; + } + + public Device withMake(String make) { + Utils.checkNotNull(make, "make"); + this.make = Optional.ofNullable(make); + return this; + } + + + public Device withMake(Optional make) { + Utils.checkNotNull(make, "make"); + this.make = make; + return this; + } + + public Device withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + public Device withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + public Device withModelNumber(String modelNumber) { + Utils.checkNotNull(modelNumber, "modelNumber"); + this.modelNumber = Optional.ofNullable(modelNumber); + return this; + } + + + public Device withModelNumber(Optional modelNumber) { + Utils.checkNotNull(modelNumber, "modelNumber"); + this.modelNumber = modelNumber; + return this; + } + + public Device withProtocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + + public Device withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + public Device withSources(String sources) { + Utils.checkNotNull(sources, "sources"); + this.sources = Optional.ofNullable(sources); + return this; + } + + + public Device withSources(Optional sources) { + Utils.checkNotNull(sources, "sources"); + this.sources = sources; + return this; + } + + public Device withState(String state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + + public Device withState(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + public Device withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + public Device withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public Device withTuners(String tuners) { + Utils.checkNotNull(tuners, "tuners"); + this.tuners = Optional.ofNullable(tuners); + return this; + } + + + public Device withTuners(Optional tuners) { + Utils.checkNotNull(tuners, "tuners"); + this.tuners = tuners; + return this; + } + + public Device withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + public Device withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + public Device withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + public Device withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Device other = (Device) o; + return + Utils.enhancedDeepEquals(this.channelMapping, other.channelMapping) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastSeenAt, other.lastSeenAt) && + Utils.enhancedDeepEquals(this.make, other.make) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.modelNumber, other.modelNumber) && + Utils.enhancedDeepEquals(this.protocol, other.protocol) && + Utils.enhancedDeepEquals(this.sources, other.sources) && + Utils.enhancedDeepEquals(this.state, other.state) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.tuners, other.tuners) && + Utils.enhancedDeepEquals(this.uri, other.uri) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + channelMapping, key, lastSeenAt, + make, model, modelNumber, + protocol, sources, state, + status, tuners, uri, + uuid); + } + + @Override + public String toString() { + return Utils.toString(Device.class, + "channelMapping", channelMapping, + "key", key, + "lastSeenAt", lastSeenAt, + "make", make, + "model", model, + "modelNumber", modelNumber, + "protocol", protocol, + "sources", sources, + "state", state, + "status", status, + "tuners", tuners, + "uri", uri, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> channelMapping = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastSeenAt = Optional.empty(); + + private Optional make = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional modelNumber = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional sources = Optional.empty(); + + private Optional state = Optional.empty(); + + private Optional status = Optional.empty(); + + private Optional tuners = Optional.empty(); + + private Optional uri = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder channelMapping(List channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = Optional.ofNullable(channelMapping); + return this; + } + + public Builder channelMapping(Optional> channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = channelMapping; + 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 lastSeenAt(long lastSeenAt) { + Utils.checkNotNull(lastSeenAt, "lastSeenAt"); + this.lastSeenAt = Optional.ofNullable(lastSeenAt); + return this; + } + + public Builder lastSeenAt(Optional lastSeenAt) { + Utils.checkNotNull(lastSeenAt, "lastSeenAt"); + this.lastSeenAt = lastSeenAt; + return this; + } + + + public Builder make(String make) { + Utils.checkNotNull(make, "make"); + this.make = Optional.ofNullable(make); + return this; + } + + public Builder make(Optional make) { + Utils.checkNotNull(make, "make"); + this.make = make; + return this; + } + + + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + public Builder modelNumber(String modelNumber) { + Utils.checkNotNull(modelNumber, "modelNumber"); + this.modelNumber = Optional.ofNullable(modelNumber); + return this; + } + + public Builder modelNumber(Optional modelNumber) { + Utils.checkNotNull(modelNumber, "modelNumber"); + this.modelNumber = modelNumber; + return this; + } + + + public Builder protocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + + public Builder sources(String sources) { + Utils.checkNotNull(sources, "sources"); + this.sources = Optional.ofNullable(sources); + return this; + } + + public Builder sources(Optional sources) { + Utils.checkNotNull(sources, "sources"); + this.sources = sources; + return this; + } + + + public Builder state(String state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + public Builder state(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + public Builder tuners(String tuners) { + Utils.checkNotNull(tuners, "tuners"); + this.tuners = Optional.ofNullable(tuners); + return this; + } + + public Builder tuners(Optional tuners) { + Utils.checkNotNull(tuners, "tuners"); + this.tuners = tuners; + return this; + } + + + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public Device build() { + + return new Device( + channelMapping, key, lastSeenAt, + make, model, modelNumber, + protocol, sources, state, + status, tuners, uri, + uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Directory.java b/src/main/java/dev/plexapi/sdk/models/shared/Directory.java new file mode 100644 index 00000000..5568ee9e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Directory.java @@ -0,0 +1,780 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class Directory { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("content") + private Optional content; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasPrefs") + private Optional hasPrefs; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasStoreServices") + private Optional hasStoreServices; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubKey") + private Optional hubKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastAccessedAt") + private Optional lastAccessedAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Pivot") + private Optional> pivot; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("share") + private Optional share; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleBar") + private Optional titleBar; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public Directory( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("art") Optional art, + @JsonProperty("content") Optional content, + @JsonProperty("filter") Optional filter, + @JsonProperty("hasPrefs") Optional hasPrefs, + @JsonProperty("hasStoreServices") Optional hasStoreServices, + @JsonProperty("hubKey") Optional hubKey, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("key") Optional key, + @JsonProperty("lastAccessedAt") Optional lastAccessedAt, + @JsonProperty("Pivot") Optional> pivot, + @JsonProperty("share") Optional share, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("titleBar") Optional titleBar) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(hasPrefs, "hasPrefs"); + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + Utils.checkNotNull(hubKey, "hubKey"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + Utils.checkNotNull(pivot, "pivot"); + Utils.checkNotNull(share, "share"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(titleBar, "titleBar"); + this.title = title; + this.type = type; + this.art = art; + this.content = content; + this.filter = filter; + this.hasPrefs = hasPrefs; + this.hasStoreServices = hasStoreServices; + this.hubKey = hubKey; + this.identifier = identifier; + this.key = key; + this.lastAccessedAt = lastAccessedAt; + this.pivot = pivot; + this.share = share; + this.thumb = thumb; + this.titleBar = titleBar; + this.additionalProperties = new HashMap<>(); + } + + public Directory() { + 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()); + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional art() { + return art; + } + + @JsonIgnore + public Optional content() { + return content; + } + + @JsonIgnore + public Optional filter() { + return filter; + } + + @JsonIgnore + public Optional hasPrefs() { + return hasPrefs; + } + + @JsonIgnore + public Optional hasStoreServices() { + return hasStoreServices; + } + + @JsonIgnore + public Optional hubKey() { + return hubKey; + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional lastAccessedAt() { + return lastAccessedAt; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> pivot() { + return (Optional>) pivot; + } + + @JsonIgnore + public Optional share() { + return share; + } + + @JsonIgnore + public Optional thumb() { + return thumb; + } + + @JsonIgnore + public Optional titleBar() { + return titleBar; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + public Directory withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public Directory withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Directory withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public Directory withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Directory withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + public Directory withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Directory withContent(boolean content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + + public Directory withContent(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public Directory withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + public Directory withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Directory withHasPrefs(boolean hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = Optional.ofNullable(hasPrefs); + return this; + } + + + public Directory withHasPrefs(Optional hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = hasPrefs; + return this; + } + + public Directory withHasStoreServices(boolean hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = Optional.ofNullable(hasStoreServices); + return this; + } + + + public Directory withHasStoreServices(Optional hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = hasStoreServices; + return this; + } + + public Directory withHubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + + public Directory withHubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + return this; + } + + public Directory withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public Directory withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Directory withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public Directory withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Directory withLastAccessedAt(long lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = Optional.ofNullable(lastAccessedAt); + return this; + } + + + public Directory withLastAccessedAt(Optional lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = lastAccessedAt; + return this; + } + + public Directory withPivot(List pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = Optional.ofNullable(pivot); + return this; + } + + + public Directory withPivot(Optional> pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = pivot; + return this; + } + + public Directory withShare(long share) { + Utils.checkNotNull(share, "share"); + this.share = Optional.ofNullable(share); + return this; + } + + + public Directory withShare(Optional share) { + Utils.checkNotNull(share, "share"); + this.share = share; + return this; + } + + public Directory withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + public Directory withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Directory withTitleBar(String titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = Optional.ofNullable(titleBar); + return this; + } + + + public Directory withTitleBar(Optional titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = titleBar; + return this; + } + + @JsonAnySetter + public Directory withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public Directory withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Directory other = (Directory) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.content, other.content) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.hasPrefs, other.hasPrefs) && + Utils.enhancedDeepEquals(this.hasStoreServices, other.hasStoreServices) && + Utils.enhancedDeepEquals(this.hubKey, other.hubKey) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastAccessedAt, other.lastAccessedAt) && + Utils.enhancedDeepEquals(this.pivot, other.pivot) && + Utils.enhancedDeepEquals(this.share, other.share) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.titleBar, other.titleBar) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, art, + content, filter, hasPrefs, + hasStoreServices, hubKey, identifier, + key, lastAccessedAt, pivot, + share, thumb, titleBar, + additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(Directory.class, + "title", title, + "type", type, + "art", art, + "content", content, + "filter", filter, + "hasPrefs", hasPrefs, + "hasStoreServices", hasStoreServices, + "hubKey", hubKey, + "identifier", identifier, + "key", key, + "lastAccessedAt", lastAccessedAt, + "pivot", pivot, + "share", share, + "thumb", thumb, + "titleBar", titleBar, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional content = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional hasPrefs = Optional.empty(); + + private Optional hasStoreServices = Optional.empty(); + + private Optional hubKey = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastAccessedAt = Optional.empty(); + + private Optional> pivot = Optional.empty(); + + private Optional share = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional titleBar = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + 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 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 content(boolean content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + public Builder content(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + + public Builder filter(String 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 hasPrefs(boolean hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = Optional.ofNullable(hasPrefs); + return this; + } + + public Builder hasPrefs(Optional hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = hasPrefs; + return this; + } + + + public Builder hasStoreServices(boolean hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = Optional.ofNullable(hasStoreServices); + return this; + } + + public Builder hasStoreServices(Optional hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = hasStoreServices; + return this; + } + + + public Builder hubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + public Builder hubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + 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 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 lastAccessedAt(long lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = Optional.ofNullable(lastAccessedAt); + return this; + } + + public Builder lastAccessedAt(Optional lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = lastAccessedAt; + return this; + } + + + public Builder pivot(List pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = Optional.ofNullable(pivot); + return this; + } + + public Builder pivot(Optional> pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = pivot; + return this; + } + + + public Builder share(long share) { + Utils.checkNotNull(share, "share"); + this.share = Optional.ofNullable(share); + return this; + } + + public Builder share(Optional share) { + Utils.checkNotNull(share, "share"); + this.share = share; + 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 titleBar(String titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = Optional.ofNullable(titleBar); + return this; + } + + public Builder titleBar(Optional titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = titleBar; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public Directory build() { + + return new Directory( + title, type, art, + content, filter, hasPrefs, + hasStoreServices, hubKey, identifier, + key, lastAccessedAt, pivot, + share, thumb, titleBar) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Dvr.java b/src/main/java/dev/plexapi/sdk/models/shared/Dvr.java new file mode 100644 index 00000000..e37260bc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Dvr.java @@ -0,0 +1,289 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class Dvr { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineup") + private Optional lineup; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public Dvr( + @JsonProperty("Device") Optional> device, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("lineup") Optional lineup, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(device, "device"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(lineup, "lineup"); + Utils.checkNotNull(uuid, "uuid"); + this.device = device; + this.key = key; + this.language = language; + this.lineup = lineup; + this.uuid = uuid; + } + + public Dvr() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> device() { + return (Optional>) device; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional lineup() { + return lineup; + } + + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public Dvr withDevice(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public Dvr withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public Dvr withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public Dvr withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Dvr withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public Dvr withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public Dvr withLineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + public Dvr withLineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + public Dvr withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + public Dvr withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dvr other = (Dvr) o; + return + Utils.enhancedDeepEquals(this.device, other.device) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.lineup, other.lineup) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + device, key, language, + lineup, uuid); + } + + @Override + public String toString() { + return Utils.toString(Dvr.class, + "device", device, + "key", key, + "language", language, + "lineup", lineup, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> device = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional lineup = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder device(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + 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 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 lineup(String lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + public Builder lineup(Optional lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public Dvr build() { + + return new Dvr( + device, key, language, + lineup, uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200.java b/src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200.java new file mode 100644 index 00000000..cd5253f9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200.java @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * DvrRequestHandlerSlashGetResponses200 + * + *

OK + */ +public class DvrRequestHandlerSlashGetResponses200 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public DvrRequestHandlerSlashGetResponses200( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public DvrRequestHandlerSlashGetResponses200() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public DvrRequestHandlerSlashGetResponses200 withMediaContainer(DvrRequestHandlerSlashGetResponses200MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public DvrRequestHandlerSlashGetResponses200 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; + } + DvrRequestHandlerSlashGetResponses200 other = (DvrRequestHandlerSlashGetResponses200) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(DvrRequestHandlerSlashGetResponses200.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(DvrRequestHandlerSlashGetResponses200MediaContainer 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 DvrRequestHandlerSlashGetResponses200 build() { + + return new DvrRequestHandlerSlashGetResponses200( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainer.java new file mode 100644 index 00000000..dbf57c59 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainer.java @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class DvrRequestHandlerSlashGetResponses200MediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("DVR") + private Optional> dvr; + + @JsonCreator + public DvrRequestHandlerSlashGetResponses200MediaContainer( + @JsonProperty("MediaContainer") Optional mediaContainer, + @JsonProperty("DVR") Optional> dvr) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + Utils.checkNotNull(dvr, "dvr"); + this.mediaContainer = mediaContainer; + this.dvr = dvr; + } + + public DvrRequestHandlerSlashGetResponses200MediaContainer() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> dvr() { + return (Optional>) dvr; + } + + public static Builder builder() { + return new Builder(); + } + + + public DvrRequestHandlerSlashGetResponses200MediaContainer withMediaContainer(DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public DvrRequestHandlerSlashGetResponses200MediaContainer withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public DvrRequestHandlerSlashGetResponses200MediaContainer withDvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + + public DvrRequestHandlerSlashGetResponses200MediaContainer withDvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DvrRequestHandlerSlashGetResponses200MediaContainer other = (DvrRequestHandlerSlashGetResponses200MediaContainer) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer) && + Utils.enhancedDeepEquals(this.dvr, other.dvr); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer, dvr); + } + + @Override + public String toString() { + return Utils.toString(DvrRequestHandlerSlashGetResponses200MediaContainer.class, + "mediaContainer", mediaContainer, + "dvr", dvr); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Optional> dvr = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer 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 Builder dvr(List dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = Optional.ofNullable(dvr); + return this; + } + + public Builder dvr(Optional> dvr) { + Utils.checkNotNull(dvr, "dvr"); + this.dvr = dvr; + return this; + } + + public DvrRequestHandlerSlashGetResponses200MediaContainer build() { + + return new DvrRequestHandlerSlashGetResponses200MediaContainer( + mediaContainer, dvr); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer.java new file mode 100644 index 00000000..e2ce95b8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer.java @@ -0,0 +1,344 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(status, "status"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.status = status; + } + + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + @JsonIgnore + public Optional status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer other = (DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, status); + } + + @Override + public String toString() { + return Utils.toString(DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * A status indicator. If present and non-zero, indicates an error + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer build() { + + return new DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer( + identifier, offset, size, + totalSize, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Filter.java b/src/main/java/dev/plexapi/sdk/models/shared/Filter.java new file mode 100644 index 00000000..e36347db --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Filter.java @@ -0,0 +1,897 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * Filter + * + *

Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an important subset useful for top-level API. + */ +public class Filter { + /** + * The title for the filter. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("content") + private Optional content; + + /** + * This represents the filter name used for the filter, which can be used to construct complex media queries with. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasPrefs") + private Optional hasPrefs; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasStoreServices") + private Optional hasStoreServices; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubKey") + private Optional hubKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastAccessedAt") + private Optional lastAccessedAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Pivot") + private Optional> pivot; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("share") + private Optional share; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleBar") + private Optional titleBar; + + /** + * This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filterType") + private Optional filterType; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public Filter( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("art") Optional art, + @JsonProperty("content") Optional content, + @JsonProperty("filter") Optional filter, + @JsonProperty("hasPrefs") Optional hasPrefs, + @JsonProperty("hasStoreServices") Optional hasStoreServices, + @JsonProperty("hubKey") Optional hubKey, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("key") Optional key, + @JsonProperty("lastAccessedAt") Optional lastAccessedAt, + @JsonProperty("Pivot") Optional> pivot, + @JsonProperty("share") Optional share, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("titleBar") Optional titleBar, + @JsonProperty("filterType") Optional filterType) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(hasPrefs, "hasPrefs"); + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + Utils.checkNotNull(hubKey, "hubKey"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + Utils.checkNotNull(pivot, "pivot"); + Utils.checkNotNull(share, "share"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(titleBar, "titleBar"); + Utils.checkNotNull(filterType, "filterType"); + this.title = title; + this.type = type; + this.art = art; + this.content = content; + this.filter = filter; + this.hasPrefs = hasPrefs; + this.hasStoreServices = hasStoreServices; + this.hubKey = hubKey; + this.identifier = identifier; + this.key = key; + this.lastAccessedAt = lastAccessedAt; + this.pivot = pivot; + this.share = share; + this.thumb = thumb; + this.titleBar = titleBar; + this.filterType = filterType; + this.additionalProperties = new HashMap<>(); + } + + public Filter() { + 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()); + } + + /** + * The title for the filter. + */ + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional art() { + return art; + } + + @JsonIgnore + public Optional content() { + return content; + } + + /** + * This represents the filter name used for the filter, which can be used to construct complex media queries with. + */ + @JsonIgnore + public Optional filter() { + return filter; + } + + @JsonIgnore + public Optional hasPrefs() { + return hasPrefs; + } + + @JsonIgnore + public Optional hasStoreServices() { + return hasStoreServices; + } + + @JsonIgnore + public Optional hubKey() { + return hubKey; + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. + */ + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional lastAccessedAt() { + return lastAccessedAt; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> pivot() { + return (Optional>) pivot; + } + + @JsonIgnore + public Optional share() { + return share; + } + + @JsonIgnore + public Optional thumb() { + return thumb; + } + + @JsonIgnore + public Optional titleBar() { + return titleBar; + } + + /** + * This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. + */ + @JsonIgnore + public Optional filterType() { + return filterType; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The title for the filter. + */ + public Filter withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title for the filter. + */ + public Filter withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Filter withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public Filter withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Filter withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + public Filter withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Filter withContent(boolean content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + + public Filter withContent(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + /** + * This represents the filter name used for the filter, which can be used to construct complex media queries with. + */ + public Filter withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * This represents the filter name used for the filter, which can be used to construct complex media queries with. + */ + public Filter withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Filter withHasPrefs(boolean hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = Optional.ofNullable(hasPrefs); + return this; + } + + + public Filter withHasPrefs(Optional hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = hasPrefs; + return this; + } + + public Filter withHasStoreServices(boolean hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = Optional.ofNullable(hasStoreServices); + return this; + } + + + public Filter withHasStoreServices(Optional hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = hasStoreServices; + return this; + } + + public Filter withHubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + + public Filter withHubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + return this; + } + + public Filter withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public Filter withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. + */ + public Filter withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. + */ + public Filter withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Filter withLastAccessedAt(long lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = Optional.ofNullable(lastAccessedAt); + return this; + } + + + public Filter withLastAccessedAt(Optional lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = lastAccessedAt; + return this; + } + + public Filter withPivot(List pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = Optional.ofNullable(pivot); + return this; + } + + + public Filter withPivot(Optional> pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = pivot; + return this; + } + + public Filter withShare(long share) { + Utils.checkNotNull(share, "share"); + this.share = Optional.ofNullable(share); + return this; + } + + + public Filter withShare(Optional share) { + Utils.checkNotNull(share, "share"); + this.share = share; + return this; + } + + public Filter withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + public Filter withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Filter withTitleBar(String titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = Optional.ofNullable(titleBar); + return this; + } + + + public Filter withTitleBar(Optional titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = titleBar; + return this; + } + + /** + * This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. + */ + public Filter withFilterType(String filterType) { + Utils.checkNotNull(filterType, "filterType"); + this.filterType = Optional.ofNullable(filterType); + return this; + } + + + /** + * This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. + */ + public Filter withFilterType(Optional filterType) { + Utils.checkNotNull(filterType, "filterType"); + this.filterType = filterType; + return this; + } + + @JsonAnySetter + public Filter withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public Filter withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Filter other = (Filter) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.content, other.content) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.hasPrefs, other.hasPrefs) && + Utils.enhancedDeepEquals(this.hasStoreServices, other.hasStoreServices) && + Utils.enhancedDeepEquals(this.hubKey, other.hubKey) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastAccessedAt, other.lastAccessedAt) && + Utils.enhancedDeepEquals(this.pivot, other.pivot) && + Utils.enhancedDeepEquals(this.share, other.share) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.titleBar, other.titleBar) && + Utils.enhancedDeepEquals(this.filterType, other.filterType) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, art, + content, filter, hasPrefs, + hasStoreServices, hubKey, identifier, + key, lastAccessedAt, pivot, + share, thumb, titleBar, + filterType, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(Filter.class, + "title", title, + "type", type, + "art", art, + "content", content, + "filter", filter, + "hasPrefs", hasPrefs, + "hasStoreServices", hasStoreServices, + "hubKey", hubKey, + "identifier", identifier, + "key", key, + "lastAccessedAt", lastAccessedAt, + "pivot", pivot, + "share", share, + "thumb", thumb, + "titleBar", titleBar, + "filterType", filterType, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional content = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional hasPrefs = Optional.empty(); + + private Optional hasStoreServices = Optional.empty(); + + private Optional hubKey = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastAccessedAt = Optional.empty(); + + private Optional> pivot = Optional.empty(); + + private Optional share = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional titleBar = Optional.empty(); + + private Optional filterType = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The title for the filter. + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title for the filter. + */ + 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 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 content(boolean content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + public Builder content(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + + /** + * This represents the filter name used for the filter, which can be used to construct complex media queries with. + */ + public Builder filter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * This represents the filter name used for the filter, which can be used to construct complex media queries with. + */ + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + + public Builder hasPrefs(boolean hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = Optional.ofNullable(hasPrefs); + return this; + } + + public Builder hasPrefs(Optional hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = hasPrefs; + return this; + } + + + public Builder hasStoreServices(boolean hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = Optional.ofNullable(hasStoreServices); + return this; + } + + public Builder hasStoreServices(Optional hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = hasStoreServices; + return this; + } + + + public Builder hubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + public Builder hubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + 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; + } + + + /** + * This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + public Builder lastAccessedAt(long lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = Optional.ofNullable(lastAccessedAt); + return this; + } + + public Builder lastAccessedAt(Optional lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = lastAccessedAt; + return this; + } + + + public Builder pivot(List pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = Optional.ofNullable(pivot); + return this; + } + + public Builder pivot(Optional> pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = pivot; + return this; + } + + + public Builder share(long share) { + Utils.checkNotNull(share, "share"); + this.share = Optional.ofNullable(share); + return this; + } + + public Builder share(Optional share) { + Utils.checkNotNull(share, "share"); + this.share = share; + 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 titleBar(String titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = Optional.ofNullable(titleBar); + return this; + } + + public Builder titleBar(Optional titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = titleBar; + return this; + } + + + /** + * This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. + */ + public Builder filterType(String filterType) { + Utils.checkNotNull(filterType, "filterType"); + this.filterType = Optional.ofNullable(filterType); + return this; + } + + /** + * This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. + */ + public Builder filterType(Optional filterType) { + Utils.checkNotNull(filterType, "filterType"); + this.filterType = filterType; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public Filter build() { + + return new Filter( + title, type, art, + content, filter, hasPrefs, + hasStoreServices, hubKey, identifier, + key, lastAccessedAt, pivot, + share, thumb, titleBar, + filterType) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/FilterPivot.java b/src/main/java/dev/plexapi/sdk/models/shared/FilterPivot.java new file mode 100644 index 00000000..0afa3f97 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/FilterPivot.java @@ -0,0 +1,329 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class FilterPivot { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("context") + private Optional context; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("symbol") + private Optional symbol; + + @JsonCreator + public FilterPivot( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("context") Optional context, + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("symbol") Optional symbol) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(symbol, "symbol"); + this.title = title; + this.type = type; + this.context = context; + this.id = id; + this.key = key; + this.symbol = symbol; + } + + public FilterPivot() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional context() { + return context; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional symbol() { + return symbol; + } + + public static Builder builder() { + return new Builder(); + } + + + public FilterPivot withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public FilterPivot withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public FilterPivot withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public FilterPivot withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public FilterPivot withContext(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + + public FilterPivot withContext(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public FilterPivot withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public FilterPivot withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public FilterPivot withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public FilterPivot withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public FilterPivot withSymbol(String symbol) { + Utils.checkNotNull(symbol, "symbol"); + this.symbol = Optional.ofNullable(symbol); + return this; + } + + + public FilterPivot withSymbol(Optional symbol) { + Utils.checkNotNull(symbol, "symbol"); + this.symbol = symbol; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FilterPivot other = (FilterPivot) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.context, other.context) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.symbol, other.symbol); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, context, + id, key, symbol); + } + + @Override + public String toString() { + return Utils.toString(FilterPivot.class, + "title", title, + "type", type, + "context", context, + "id", id, + "key", key, + "symbol", symbol); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional context = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional symbol = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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 context(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Builder context(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + + public Builder id(String 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 symbol(String symbol) { + Utils.checkNotNull(symbol, "symbol"); + this.symbol = Optional.ofNullable(symbol); + return this; + } + + public Builder symbol(Optional symbol) { + Utils.checkNotNull(symbol, "symbol"); + this.symbol = symbol; + return this; + } + + public FilterPivot build() { + + return new FilterPivot( + title, type, context, + id, key, symbol); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Format.java b/src/main/java/dev/plexapi/sdk/models/shared/Format.java new file mode 100644 index 00000000..01c72e2b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Format.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * Format + * + *

The image type + */ +public enum Format { + JPG("jpg"), + PNG("png"); + + @JsonValue + private final String value; + + Format(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Format o: Format.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/GetResponses200.java b/src/main/java/dev/plexapi/sdk/models/shared/GetResponses200.java new file mode 100644 index 00000000..5dc43162 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/GetResponses200.java @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * GetResponses200 + * + *

OK + */ +public class GetResponses200 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetResponses200( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetResponses200() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetResponses200 withMediaContainer(GetResponses200MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public GetResponses200 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; + } + GetResponses200 other = (GetResponses200) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetResponses200.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(GetResponses200MediaContainer 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 GetResponses200 build() { + + return new GetResponses200( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/GetResponses200Hub.java b/src/main/java/dev/plexapi/sdk/models/shared/GetResponses200Hub.java new file mode 100644 index 00000000..714e8f4e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/GetResponses200Hub.java @@ -0,0 +1,546 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class GetResponses200Hub { + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("homeVisibility") + private Optional homeVisibility; + + /** + * The identifier for this hub + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * Whether this hub is visible to admin user home + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("promotedToOwnHome") + private Optional promotedToOwnHome; + + /** + * Whether this hub is promoted to all for recommendations + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("promotedToRecommended") + private Optional promotedToRecommended; + + /** + * Whether this hub is visible to shared user's home + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("promotedToSharedHome") + private Optional promotedToSharedHome; + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("recommendationsVisibility") + private Optional recommendationsVisibility; + + /** + * The title of this hub + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonCreator + public GetResponses200Hub( + @JsonProperty("homeVisibility") Optional homeVisibility, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("promotedToOwnHome") Optional promotedToOwnHome, + @JsonProperty("promotedToRecommended") Optional promotedToRecommended, + @JsonProperty("promotedToSharedHome") Optional promotedToSharedHome, + @JsonProperty("recommendationsVisibility") Optional recommendationsVisibility, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(homeVisibility, "homeVisibility"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + Utils.checkNotNull(recommendationsVisibility, "recommendationsVisibility"); + Utils.checkNotNull(title, "title"); + this.homeVisibility = homeVisibility; + this.identifier = identifier; + this.promotedToOwnHome = promotedToOwnHome; + this.promotedToRecommended = promotedToRecommended; + this.promotedToSharedHome = promotedToSharedHome; + this.recommendationsVisibility = recommendationsVisibility; + this.title = title; + } + + public GetResponses200Hub() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional homeVisibility() { + return (Optional) homeVisibility; + } + + /** + * The identifier for this hub + */ + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * Whether this hub is visible to admin user home + */ + @JsonIgnore + public Optional promotedToOwnHome() { + return promotedToOwnHome; + } + + /** + * Whether this hub is promoted to all for recommendations + */ + @JsonIgnore + public Optional promotedToRecommended() { + return promotedToRecommended; + } + + /** + * Whether this hub is visible to shared user's home + */ + @JsonIgnore + public Optional promotedToSharedHome() { + return promotedToSharedHome; + } + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional recommendationsVisibility() { + return (Optional) recommendationsVisibility; + } + + /** + * The title of this hub + */ + @JsonIgnore + public Optional title() { + return title; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public GetResponses200Hub withHomeVisibility(HomeVisibility homeVisibility) { + Utils.checkNotNull(homeVisibility, "homeVisibility"); + this.homeVisibility = Optional.ofNullable(homeVisibility); + return this; + } + + + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public GetResponses200Hub withHomeVisibility(Optional homeVisibility) { + Utils.checkNotNull(homeVisibility, "homeVisibility"); + this.homeVisibility = homeVisibility; + return this; + } + + /** + * The identifier for this hub + */ + public GetResponses200Hub withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + /** + * The identifier for this hub + */ + public GetResponses200Hub withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * Whether this hub is visible to admin user home + */ + public GetResponses200Hub withPromotedToOwnHome(boolean promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = Optional.ofNullable(promotedToOwnHome); + return this; + } + + + /** + * Whether this hub is visible to admin user home + */ + public GetResponses200Hub withPromotedToOwnHome(Optional promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = promotedToOwnHome; + return this; + } + + /** + * Whether this hub is promoted to all for recommendations + */ + public GetResponses200Hub withPromotedToRecommended(boolean promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = Optional.ofNullable(promotedToRecommended); + return this; + } + + + /** + * Whether this hub is promoted to all for recommendations + */ + public GetResponses200Hub withPromotedToRecommended(Optional promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = promotedToRecommended; + return this; + } + + /** + * Whether this hub is visible to shared user's home + */ + public GetResponses200Hub withPromotedToSharedHome(boolean promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = Optional.ofNullable(promotedToSharedHome); + return this; + } + + + /** + * Whether this hub is visible to shared user's home + */ + public GetResponses200Hub withPromotedToSharedHome(Optional promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = promotedToSharedHome; + return this; + } + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public GetResponses200Hub withRecommendationsVisibility(RecommendationsVisibility recommendationsVisibility) { + Utils.checkNotNull(recommendationsVisibility, "recommendationsVisibility"); + this.recommendationsVisibility = Optional.ofNullable(recommendationsVisibility); + return this; + } + + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public GetResponses200Hub withRecommendationsVisibility(Optional recommendationsVisibility) { + Utils.checkNotNull(recommendationsVisibility, "recommendationsVisibility"); + this.recommendationsVisibility = recommendationsVisibility; + return this; + } + + /** + * The title of this hub + */ + public GetResponses200Hub withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of this hub + */ + public GetResponses200Hub 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; + } + GetResponses200Hub other = (GetResponses200Hub) o; + return + Utils.enhancedDeepEquals(this.homeVisibility, other.homeVisibility) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.promotedToOwnHome, other.promotedToOwnHome) && + Utils.enhancedDeepEquals(this.promotedToRecommended, other.promotedToRecommended) && + Utils.enhancedDeepEquals(this.promotedToSharedHome, other.promotedToSharedHome) && + Utils.enhancedDeepEquals(this.recommendationsVisibility, other.recommendationsVisibility) && + Utils.enhancedDeepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + homeVisibility, identifier, promotedToOwnHome, + promotedToRecommended, promotedToSharedHome, recommendationsVisibility, + title); + } + + @Override + public String toString() { + return Utils.toString(GetResponses200Hub.class, + "homeVisibility", homeVisibility, + "identifier", identifier, + "promotedToOwnHome", promotedToOwnHome, + "promotedToRecommended", promotedToRecommended, + "promotedToSharedHome", promotedToSharedHome, + "recommendationsVisibility", recommendationsVisibility, + "title", title); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional homeVisibility = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional promotedToOwnHome = Optional.empty(); + + private Optional promotedToRecommended = Optional.empty(); + + private Optional promotedToSharedHome = Optional.empty(); + + private Optional recommendationsVisibility = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Builder homeVisibility(HomeVisibility homeVisibility) { + Utils.checkNotNull(homeVisibility, "homeVisibility"); + this.homeVisibility = Optional.ofNullable(homeVisibility); + return this; + } + + /** + * Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Builder homeVisibility(Optional homeVisibility) { + Utils.checkNotNull(homeVisibility, "homeVisibility"); + this.homeVisibility = homeVisibility; + return this; + } + + + /** + * The identifier for this hub + */ + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + /** + * The identifier for this hub + */ + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + + /** + * Whether this hub is visible to admin user home + */ + public Builder promotedToOwnHome(boolean promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = Optional.ofNullable(promotedToOwnHome); + return this; + } + + /** + * Whether this hub is visible to admin user home + */ + public Builder promotedToOwnHome(Optional promotedToOwnHome) { + Utils.checkNotNull(promotedToOwnHome, "promotedToOwnHome"); + this.promotedToOwnHome = promotedToOwnHome; + return this; + } + + + /** + * Whether this hub is promoted to all for recommendations + */ + public Builder promotedToRecommended(boolean promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = Optional.ofNullable(promotedToRecommended); + return this; + } + + /** + * Whether this hub is promoted to all for recommendations + */ + public Builder promotedToRecommended(Optional promotedToRecommended) { + Utils.checkNotNull(promotedToRecommended, "promotedToRecommended"); + this.promotedToRecommended = promotedToRecommended; + return this; + } + + + /** + * Whether this hub is visible to shared user's home + */ + public Builder promotedToSharedHome(boolean promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = Optional.ofNullable(promotedToSharedHome); + return this; + } + + /** + * Whether this hub is visible to shared user's home + */ + public Builder promotedToSharedHome(Optional promotedToSharedHome) { + Utils.checkNotNull(promotedToSharedHome, "promotedToSharedHome"); + this.promotedToSharedHome = promotedToSharedHome; + return this; + } + + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Builder recommendationsVisibility(RecommendationsVisibility recommendationsVisibility) { + Utils.checkNotNull(recommendationsVisibility, "recommendationsVisibility"); + this.recommendationsVisibility = Optional.ofNullable(recommendationsVisibility); + return this; + } + + /** + * The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ + public Builder recommendationsVisibility(Optional recommendationsVisibility) { + Utils.checkNotNull(recommendationsVisibility, "recommendationsVisibility"); + this.recommendationsVisibility = recommendationsVisibility; + return this; + } + + + /** + * The title of this hub + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of this hub + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetResponses200Hub build() { + + return new GetResponses200Hub( + homeVisibility, identifier, promotedToOwnHome, + promotedToRecommended, promotedToSharedHome, recommendationsVisibility, + title); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/GetResponses200MediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/GetResponses200MediaContainer.java new file mode 100644 index 00000000..3cb76dda --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/GetResponses200MediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * GetResponses200MediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class GetResponses200MediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + @JsonCreator + public GetResponses200MediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(hub, "hub"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.hub = hub; + } + + public GetResponses200MediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hub() { + return (Optional>) hub; + } + + public static Builder builder() { + return new Builder(); + } + + + public GetResponses200MediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public GetResponses200MediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetResponses200MediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public GetResponses200MediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetResponses200MediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public GetResponses200MediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetResponses200MediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public GetResponses200MediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public GetResponses200MediaContainer withHub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + + public GetResponses200MediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResponses200MediaContainer other = (GetResponses200MediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, hub); + } + + @Override + public String toString() { + return Utils.toString(GetResponses200MediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "hub", hub); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder hub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public GetResponses200MediaContainer build() { + + return new GetResponses200MediaContainer( + identifier, offset, size, + totalSize, hub); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200.java b/src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200.java new file mode 100644 index 00000000..6f51fa88 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200.java @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * HistoryAllGetResponses200 + * + *

OK + */ +public class HistoryAllGetResponses200 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public HistoryAllGetResponses200( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public HistoryAllGetResponses200() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public HistoryAllGetResponses200 withMediaContainer(HistoryAllGetResponses200MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public HistoryAllGetResponses200 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; + } + HistoryAllGetResponses200 other = (HistoryAllGetResponses200) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(HistoryAllGetResponses200.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(HistoryAllGetResponses200MediaContainer 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 HistoryAllGetResponses200 build() { + + return new HistoryAllGetResponses200( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200MediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200MediaContainer.java new file mode 100644 index 00000000..7a422ab3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200MediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * HistoryAllGetResponses200MediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class HistoryAllGetResponses200MediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + @JsonCreator + public HistoryAllGetResponses200MediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(metadata, "metadata"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.metadata = metadata; + } + + public HistoryAllGetResponses200MediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadata() { + return (Optional>) metadata; + } + + public static Builder builder() { + return new Builder(); + } + + + public HistoryAllGetResponses200MediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public HistoryAllGetResponses200MediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public HistoryAllGetResponses200MediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public HistoryAllGetResponses200MediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public HistoryAllGetResponses200MediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public HistoryAllGetResponses200MediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public HistoryAllGetResponses200MediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public HistoryAllGetResponses200MediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public HistoryAllGetResponses200MediaContainer withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + + public HistoryAllGetResponses200MediaContainer 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; + } + HistoryAllGetResponses200MediaContainer other = (HistoryAllGetResponses200MediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, metadata); + } + + @Override + public String toString() { + return Utils.toString(HistoryAllGetResponses200MediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "metadata", metadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + 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 HistoryAllGetResponses200MediaContainer build() { + + return new HistoryAllGetResponses200MediaContainer( + identifier, offset, size, + totalSize, metadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200Metadata.java b/src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200Metadata.java new file mode 100644 index 00000000..e9081b4f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/HistoryAllGetResponses200Metadata.java @@ -0,0 +1,738 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class HistoryAllGetResponses200Metadata { + /** + * The account id of this playback + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("accountID") + private Optional accountID; + + /** + * The device id which played the item + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("deviceID") + private Optional deviceID; + + /** + * The key for this individual history item + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("historyKey") + private Optional historyKey; + + /** + * The metadata key for the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * The library section id containing the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + /** + * The originally available at of the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + /** + * The rating key for the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + /** + * The thumb of the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + /** + * The title of the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The metadata type of the item played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * The time when the item was played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedAt") + private Optional viewedAt; + + @JsonCreator + public HistoryAllGetResponses200Metadata( + @JsonProperty("accountID") Optional accountID, + @JsonProperty("deviceID") Optional deviceID, + @JsonProperty("historyKey") Optional historyKey, + @JsonProperty("key") Optional key, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("viewedAt") Optional viewedAt) { + Utils.checkNotNull(accountID, "accountID"); + Utils.checkNotNull(deviceID, "deviceID"); + Utils.checkNotNull(historyKey, "historyKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(viewedAt, "viewedAt"); + this.accountID = accountID; + this.deviceID = deviceID; + this.historyKey = historyKey; + this.key = key; + this.librarySectionID = librarySectionID; + this.originallyAvailableAt = originallyAvailableAt; + this.ratingKey = ratingKey; + this.thumb = thumb; + this.title = title; + this.type = type; + this.viewedAt = viewedAt; + } + + public HistoryAllGetResponses200Metadata() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * The account id of this playback + */ + @JsonIgnore + public Optional accountID() { + return accountID; + } + + /** + * The device id which played the item + */ + @JsonIgnore + public Optional deviceID() { + return deviceID; + } + + /** + * The key for this individual history item + */ + @JsonIgnore + public Optional historyKey() { + return historyKey; + } + + /** + * The metadata key for the item played + */ + @JsonIgnore + public Optional key() { + return key; + } + + /** + * The library section id containing the item played + */ + @JsonIgnore + public Optional librarySectionID() { + return librarySectionID; + } + + /** + * The originally available at of the item played + */ + @JsonIgnore + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + /** + * The rating key for the item played + */ + @JsonIgnore + public Optional ratingKey() { + return ratingKey; + } + + /** + * The thumb of the item played + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + + /** + * The title of the item played + */ + @JsonIgnore + public Optional title() { + return title; + } + + /** + * The metadata type of the item played + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * The time when the item was played + */ + @JsonIgnore + public Optional viewedAt() { + return viewedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The account id of this playback + */ + public HistoryAllGetResponses200Metadata withAccountID(long accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = Optional.ofNullable(accountID); + return this; + } + + + /** + * The account id of this playback + */ + public HistoryAllGetResponses200Metadata withAccountID(Optional accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = accountID; + return this; + } + + /** + * The device id which played the item + */ + public HistoryAllGetResponses200Metadata withDeviceID(long deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = Optional.ofNullable(deviceID); + return this; + } + + + /** + * The device id which played the item + */ + public HistoryAllGetResponses200Metadata withDeviceID(Optional deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = deviceID; + return this; + } + + /** + * The key for this individual history item + */ + public HistoryAllGetResponses200Metadata withHistoryKey(String historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = Optional.ofNullable(historyKey); + return this; + } + + + /** + * The key for this individual history item + */ + public HistoryAllGetResponses200Metadata withHistoryKey(Optional historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = historyKey; + return this; + } + + /** + * The metadata key for the item played + */ + public HistoryAllGetResponses200Metadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The metadata key for the item played + */ + public HistoryAllGetResponses200Metadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The library section id containing the item played + */ + public HistoryAllGetResponses200Metadata withLibrarySectionID(String librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + + /** + * The library section id containing the item played + */ + public HistoryAllGetResponses200Metadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + /** + * The originally available at of the item played + */ + public HistoryAllGetResponses200Metadata withOriginallyAvailableAt(String originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + + /** + * The originally available at of the item played + */ + public HistoryAllGetResponses200Metadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + /** + * The rating key for the item played + */ + public HistoryAllGetResponses200Metadata withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + /** + * The rating key for the item played + */ + public HistoryAllGetResponses200Metadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The thumb of the item played + */ + public HistoryAllGetResponses200Metadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * The thumb of the item played + */ + public HistoryAllGetResponses200Metadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * The title of the item played + */ + public HistoryAllGetResponses200Metadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the item played + */ + public HistoryAllGetResponses200Metadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The metadata type of the item played + */ + public HistoryAllGetResponses200Metadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The metadata type of the item played + */ + public HistoryAllGetResponses200Metadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The time when the item was played + */ + public HistoryAllGetResponses200Metadata withViewedAt(long viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = Optional.ofNullable(viewedAt); + return this; + } + + + /** + * The time when the item was played + */ + public HistoryAllGetResponses200Metadata withViewedAt(Optional viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = viewedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HistoryAllGetResponses200Metadata other = (HistoryAllGetResponses200Metadata) o; + return + Utils.enhancedDeepEquals(this.accountID, other.accountID) && + Utils.enhancedDeepEquals(this.deviceID, other.deviceID) && + Utils.enhancedDeepEquals(this.historyKey, other.historyKey) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && + Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.viewedAt, other.viewedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + accountID, deviceID, historyKey, + key, librarySectionID, originallyAvailableAt, + ratingKey, thumb, title, + type, viewedAt); + } + + @Override + public String toString() { + return Utils.toString(HistoryAllGetResponses200Metadata.class, + "accountID", accountID, + "deviceID", deviceID, + "historyKey", historyKey, + "key", key, + "librarySectionID", librarySectionID, + "originallyAvailableAt", originallyAvailableAt, + "ratingKey", ratingKey, + "thumb", thumb, + "title", title, + "type", type, + "viewedAt", viewedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional accountID = Optional.empty(); + + private Optional deviceID = Optional.empty(); + + private Optional historyKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional viewedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The account id of this playback + */ + public Builder accountID(long accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = Optional.ofNullable(accountID); + return this; + } + + /** + * The account id of this playback + */ + public Builder accountID(Optional accountID) { + Utils.checkNotNull(accountID, "accountID"); + this.accountID = accountID; + return this; + } + + + /** + * The device id which played the item + */ + public Builder deviceID(long deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = Optional.ofNullable(deviceID); + return this; + } + + /** + * The device id which played the item + */ + public Builder deviceID(Optional deviceID) { + Utils.checkNotNull(deviceID, "deviceID"); + this.deviceID = deviceID; + return this; + } + + + /** + * The key for this individual history item + */ + public Builder historyKey(String historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = Optional.ofNullable(historyKey); + return this; + } + + /** + * The key for this individual history item + */ + public Builder historyKey(Optional historyKey) { + Utils.checkNotNull(historyKey, "historyKey"); + this.historyKey = historyKey; + return this; + } + + + /** + * The metadata key for the item played + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The metadata key for the item played + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * The library section id containing the item played + */ + public Builder librarySectionID(String librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + /** + * The library section id containing the item played + */ + public Builder librarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + + /** + * The originally available at of the item played + */ + public Builder originallyAvailableAt(String originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * The originally available at of the item played + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + + /** + * The rating key for the item played + */ + public Builder ratingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + /** + * The rating key for the item played + */ + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + + /** + * The thumb of the item played + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The thumb of the item played + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + /** + * The title of the item played + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the item played + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The metadata type of the item played + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The metadata type of the item played + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The time when the item was played + */ + public Builder viewedAt(long viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = Optional.ofNullable(viewedAt); + return this; + } + + /** + * The time when the item was played + */ + public Builder viewedAt(Optional viewedAt) { + Utils.checkNotNull(viewedAt, "viewedAt"); + this.viewedAt = viewedAt; + return this; + } + + public HistoryAllGetResponses200Metadata build() { + + return new HistoryAllGetResponses200Metadata( + accountID, deviceID, historyKey, + key, librarySectionID, originallyAvailableAt, + ratingKey, thumb, title, + type, viewedAt); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/HomeVisibility.java b/src/main/java/dev/plexapi/sdk/models/shared/HomeVisibility.java new file mode 100644 index 00000000..0428e509 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/HomeVisibility.java @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * HomeVisibility + * + *

Whether this hub is visible on the home screen + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ +public enum HomeVisibility { + ALL("all"), + NONE("none"), + ADMIN("admin"), + SHARED("shared"); + + @JsonValue + private final String value; + + HomeVisibility(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (HomeVisibility o: HomeVisibility.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Hub.java b/src/main/java/dev/plexapi/sdk/models/shared/Hub.java new file mode 100644 index 00000000..b419c51a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Hub.java @@ -0,0 +1,906 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class Hub { + /** + * A title for this grouping of content + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("context") + private Optional context; + + /** + * A unique identifier for the hub + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubIdentifier") + private Optional hubIdentifier; + + /** + * A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubKey") + private Optional hubKey; + + /** + * The key at which all of the content for this hub can be retrieved + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + /** + * "A boolean indicating that the hub contains more than what's included in the current response." + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("more") + private Optional more; + + /** + * Indicating if the hub should be promoted to the user's homescreen + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("promoted") + private Optional promoted; + + /** + * Indicating that the contents of the hub may change on each request + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("random") + private Optional random; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell` + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("style") + private Optional style; + + /** + * The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtype") + private Optional subtype; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public Hub( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("context") Optional context, + @JsonProperty("hubIdentifier") Optional hubIdentifier, + @JsonProperty("hubKey") Optional hubKey, + @JsonProperty("key") Optional key, + @JsonProperty("Metadata") Optional> metadata, + @JsonProperty("more") Optional more, + @JsonProperty("promoted") Optional promoted, + @JsonProperty("random") Optional random, + @JsonProperty("size") Optional size, + @JsonProperty("style") Optional style, + @JsonProperty("subtype") Optional subtype, + @JsonProperty("totalSize") Optional totalSize) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + Utils.checkNotNull(hubKey, "hubKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(metadata, "metadata"); + Utils.checkNotNull(more, "more"); + Utils.checkNotNull(promoted, "promoted"); + Utils.checkNotNull(random, "random"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(style, "style"); + Utils.checkNotNull(subtype, "subtype"); + Utils.checkNotNull(totalSize, "totalSize"); + this.title = title; + this.type = type; + this.context = context; + this.hubIdentifier = hubIdentifier; + this.hubKey = hubKey; + this.key = key; + this.metadata = metadata; + this.more = more; + this.promoted = promoted; + this.random = random; + this.size = size; + this.style = style; + this.subtype = subtype; + this.totalSize = totalSize; + this.additionalProperties = new HashMap<>(); + } + + public Hub() { + 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()); + } + + /** + * A title for this grouping of content + */ + @JsonIgnore + public Optional title() { + return title; + } + + /** + * The type of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional context() { + return context; + } + + /** + * A unique identifier for the hub + */ + @JsonIgnore + public Optional hubIdentifier() { + return hubIdentifier; + } + + /** + * A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional. + */ + @JsonIgnore + public Optional hubKey() { + return hubKey; + } + + /** + * The key at which all of the content for this hub can be retrieved + */ + @JsonIgnore + public Optional key() { + return key; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadata() { + return (Optional>) metadata; + } + + /** + * "A boolean indicating that the hub contains more than what's included in the current response." + */ + @JsonIgnore + public Optional more() { + return more; + } + + /** + * Indicating if the hub should be promoted to the user's homescreen + */ + @JsonIgnore + public Optional promoted() { + return promoted; + } + + /** + * Indicating that the contents of the hub may change on each request + */ + @JsonIgnore + public Optional random() { + return random; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell` + */ + @JsonIgnore + public Optional style() { + return style; + } + + /** + * The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + @JsonIgnore + public Optional subtype() { + return subtype; + } + + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A title for this grouping of content + */ + public Hub withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * A title for this grouping of content + */ + public Hub withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + public Hub withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + public Hub withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Hub withContext(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + + public Hub withContext(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + /** + * A unique identifier for the hub + */ + public Hub withHubIdentifier(String hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = Optional.ofNullable(hubIdentifier); + return this; + } + + + /** + * A unique identifier for the hub + */ + public Hub withHubIdentifier(Optional hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = hubIdentifier; + return this; + } + + /** + * A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional. + */ + public Hub withHubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + + /** + * A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional. + */ + public Hub withHubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + return this; + } + + /** + * The key at which all of the content for this hub can be retrieved + */ + public Hub withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key at which all of the content for this hub can be retrieved + */ + public Hub withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Hub withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + + public Hub withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + /** + * "A boolean indicating that the hub contains more than what's included in the current response." + */ + public Hub withMore(boolean more) { + Utils.checkNotNull(more, "more"); + this.more = Optional.ofNullable(more); + return this; + } + + + /** + * "A boolean indicating that the hub contains more than what's included in the current response." + */ + public Hub withMore(Optional more) { + Utils.checkNotNull(more, "more"); + this.more = more; + return this; + } + + /** + * Indicating if the hub should be promoted to the user's homescreen + */ + public Hub withPromoted(boolean promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = Optional.ofNullable(promoted); + return this; + } + + + /** + * Indicating if the hub should be promoted to the user's homescreen + */ + public Hub withPromoted(Optional promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = promoted; + return this; + } + + /** + * Indicating that the contents of the hub may change on each request + */ + public Hub withRandom(boolean random) { + Utils.checkNotNull(random, "random"); + this.random = Optional.ofNullable(random); + return this; + } + + + /** + * Indicating that the contents of the hub may change on each request + */ + public Hub withRandom(Optional random) { + Utils.checkNotNull(random, "random"); + this.random = random; + return this; + } + + public Hub withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public Hub withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell` + */ + public Hub withStyle(String style) { + Utils.checkNotNull(style, "style"); + this.style = Optional.ofNullable(style); + return this; + } + + + /** + * A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell` + */ + public Hub withStyle(Optional style) { + Utils.checkNotNull(style, "style"); + this.style = style; + return this; + } + + /** + * The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + public Hub withSubtype(String subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + + /** + * The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + public Hub withSubtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + public Hub withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + public Hub withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + @JsonAnySetter + public Hub withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public Hub withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Hub other = (Hub) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.context, other.context) && + Utils.enhancedDeepEquals(this.hubIdentifier, other.hubIdentifier) && + Utils.enhancedDeepEquals(this.hubKey, other.hubKey) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.metadata, other.metadata) && + Utils.enhancedDeepEquals(this.more, other.more) && + Utils.enhancedDeepEquals(this.promoted, other.promoted) && + Utils.enhancedDeepEquals(this.random, other.random) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.style, other.style) && + Utils.enhancedDeepEquals(this.subtype, other.subtype) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, context, + hubIdentifier, hubKey, key, + metadata, more, promoted, + random, size, style, + subtype, totalSize, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(Hub.class, + "title", title, + "type", type, + "context", context, + "hubIdentifier", hubIdentifier, + "hubKey", hubKey, + "key", key, + "metadata", metadata, + "more", more, + "promoted", promoted, + "random", random, + "size", size, + "style", style, + "subtype", subtype, + "totalSize", totalSize, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional context = Optional.empty(); + + private Optional hubIdentifier = Optional.empty(); + + private Optional hubKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Optional more = Optional.empty(); + + private Optional promoted = Optional.empty(); + + private Optional random = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional style = Optional.empty(); + + private Optional subtype = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + /** + * A title for this grouping of content + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * A title for this grouping of content + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The type of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + public Builder context(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Builder context(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + + /** + * A unique identifier for the hub + */ + public Builder hubIdentifier(String hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = Optional.ofNullable(hubIdentifier); + return this; + } + + /** + * A unique identifier for the hub + */ + public Builder hubIdentifier(Optional hubIdentifier) { + Utils.checkNotNull(hubIdentifier, "hubIdentifier"); + this.hubIdentifier = hubIdentifier; + return this; + } + + + /** + * A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional. + */ + public Builder hubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + /** + * A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional. + */ + public Builder hubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + return this; + } + + + /** + * The key at which all of the content for this hub can be retrieved + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key at which all of the content for this hub can be retrieved + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + 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; + } + + + /** + * "A boolean indicating that the hub contains more than what's included in the current response." + */ + public Builder more(boolean more) { + Utils.checkNotNull(more, "more"); + this.more = Optional.ofNullable(more); + return this; + } + + /** + * "A boolean indicating that the hub contains more than what's included in the current response." + */ + public Builder more(Optional more) { + Utils.checkNotNull(more, "more"); + this.more = more; + return this; + } + + + /** + * Indicating if the hub should be promoted to the user's homescreen + */ + public Builder promoted(boolean promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = Optional.ofNullable(promoted); + return this; + } + + /** + * Indicating if the hub should be promoted to the user's homescreen + */ + public Builder promoted(Optional promoted) { + Utils.checkNotNull(promoted, "promoted"); + this.promoted = promoted; + return this; + } + + + /** + * Indicating that the contents of the hub may change on each request + */ + public Builder random(boolean random) { + Utils.checkNotNull(random, "random"); + this.random = Optional.ofNullable(random); + return this; + } + + /** + * Indicating that the contents of the hub may change on each request + */ + public Builder random(Optional random) { + Utils.checkNotNull(random, "random"); + this.random = random; + return this; + } + + + public Builder size(long 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; + } + + + /** + * A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell` + */ + public Builder style(String style) { + Utils.checkNotNull(style, "style"); + this.style = Optional.ofNullable(style); + return this; + } + + /** + * A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell` + */ + public Builder style(Optional style) { + Utils.checkNotNull(style, "style"); + this.style = style; + return this; + } + + + /** + * The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + public Builder subtype(String subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types + */ + public Builder subtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + + public Builder totalSize(long 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; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public Hub build() { + + return new Hub( + title, type, context, + hubIdentifier, hubKey, key, + metadata, more, promoted, + random, size, style, + subtype, totalSize) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Image.java b/src/main/java/dev/plexapi/sdk/models/shared/Image.java new file mode 100644 index 00000000..473ca813 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Image.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * Image + * + *

Images such as movie posters and background artwork are represented by Image elements. + */ +public class Image { + /** + * Describes both the purpose and intended presentation of the image. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * Title to use for accessibility. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("alt") + private Optional alt; + + /** + * The relative path or absolute url for the image. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("url") + private Optional url; + + @JsonCreator + public Image( + @JsonProperty("type") Optional type, + @JsonProperty("alt") Optional alt, + @JsonProperty("url") Optional url) { + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(alt, "alt"); + Utils.checkNotNull(url, "url"); + this.type = type; + this.alt = alt; + this.url = url; + } + + public Image() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Describes both the purpose and intended presentation of the image. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * Title to use for accessibility. + */ + @JsonIgnore + public Optional alt() { + return alt; + } + + /** + * The relative path or absolute url for the image. + */ + @JsonIgnore + public Optional url() { + return url; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Describes both the purpose and intended presentation of the image. + */ + public Image withType(ImageType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * Describes both the purpose and intended presentation of the image. + */ + public Image withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * Title to use for accessibility. + */ + public Image withAlt(String alt) { + Utils.checkNotNull(alt, "alt"); + this.alt = Optional.ofNullable(alt); + return this; + } + + + /** + * Title to use for accessibility. + */ + public Image withAlt(Optional alt) { + Utils.checkNotNull(alt, "alt"); + this.alt = alt; + return this; + } + + /** + * The relative path or absolute url for the image. + */ + public Image withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + + /** + * The relative path or absolute url for the image. + */ + public Image withUrl(Optional 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; + } + Image other = (Image) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.alt, other.alt) && + Utils.enhancedDeepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, alt, url); + } + + @Override + public String toString() { + return Utils.toString(Image.class, + "type", type, + "alt", alt, + "url", url); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional type = Optional.empty(); + + private Optional alt = Optional.empty(); + + private Optional url = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Describes both the purpose and intended presentation of the image. + */ + public Builder type(ImageType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Describes both the purpose and intended presentation of the image. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * Title to use for accessibility. + */ + public Builder alt(String alt) { + Utils.checkNotNull(alt, "alt"); + this.alt = Optional.ofNullable(alt); + return this; + } + + /** + * Title to use for accessibility. + */ + public Builder alt(Optional alt) { + Utils.checkNotNull(alt, "alt"); + this.alt = alt; + return this; + } + + + /** + * The relative path or absolute url for the image. + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = Optional.ofNullable(url); + return this; + } + + /** + * The relative path or absolute url for the image. + */ + public Builder url(Optional url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public Image build() { + + return new Image( + type, alt, url); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/ImageType.java b/src/main/java/dev/plexapi/sdk/models/shared/ImageType.java new file mode 100644 index 00000000..66a56a33 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/ImageType.java @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * ImageType + * + *

Describes both the purpose and intended presentation of the image. + */ +public enum ImageType { + BACKGROUND("background"), + BANNER("banner"), + CLEAR_LOGO("clearLogo"), + COVER_POSTER("coverPoster"), + SNAPSHOT("snapshot"); + + @JsonValue + private final String value; + + ImageType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (ImageType o: ImageType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Items.java b/src/main/java/dev/plexapi/sdk/models/shared/Items.java new file mode 100644 index 00000000..c07f3631 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Items.java @@ -0,0 +1,4124 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * Items + * + *

Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ +public class Items { + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("absoluteIndex") + private Optional absoluteIndex; + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + /** + * When present, the URL for the background artwork for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Autotag") + private Optional> autotag; + + /** + * When present, the URL for a banner graphic for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("banner") + private Optional banner; + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Filter") + private Optional> filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + /** + * The `art` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + /** + * The `hero` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentHero") + private Optional grandparentHero; + + /** + * The `key` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + /** + * The `ratingKey` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + /** + * The `theme` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTheme") + private Optional grandparentTheme; + + /** + * The `thumb` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + /** + * The `title` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guid; + + /** + * When present, the URL for a hero image for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hero") + private Optional hero; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Image") + private Optional> image; + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originalTitle") + private Optional originalTitle; + + /** + * The `hero` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentHero") + private Optional parentHero; + + /** + * The `index` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + /** + * The `key` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + /** + * The `ratingKey` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + /** + * The `thumb` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + /** + * The `title` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("prompt") + private Optional prompt; + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Rating") + private Optional> ratingArray; + + /** + * Number of ratings under this metadata + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingCount") + private Optional ratingCount; + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + /** + * Indicates this is a search directory + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("search") + private Optional search; + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secondary") + private Optional secondary; + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipChildren") + private Optional skipChildren; + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipParent") + private Optional skipParent; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Sort") + private Optional> sort; + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtype") + private Optional subtype; + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("theme") + private Optional theme; + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userRating") + private Optional userRating; + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MetadataItem") + private Optional> metadataItem; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public Items( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("absoluteIndex") Optional absoluteIndex, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("art") Optional art, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("Autotag") Optional> autotag, + @JsonProperty("banner") Optional banner, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("composite") Optional composite, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("Country") Optional> country, + @JsonProperty("Director") Optional> director, + @JsonProperty("duration") Optional duration, + @JsonProperty("Filter") Optional> filter, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("grandparentHero") Optional grandparentHero, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("Guid") Optional> guid, + @JsonProperty("hero") Optional hero, + @JsonProperty("Image") Optional> image, + @JsonProperty("index") Optional index, + @JsonProperty("key") Optional key, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("Media") Optional> media, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("parentHero") Optional parentHero, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("prompt") Optional prompt, + @JsonProperty("rating") Optional rating, + @JsonProperty("Rating") Optional> ratingArray, + @JsonProperty("ratingCount") Optional ratingCount, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("Role") Optional> role, + @JsonProperty("search") Optional search, + @JsonProperty("secondary") Optional secondary, + @JsonProperty("skipChildren") Optional skipChildren, + @JsonProperty("skipParent") Optional skipParent, + @JsonProperty("Sort") Optional> sort, + @JsonProperty("studio") Optional studio, + @JsonProperty("subtype") Optional subtype, + @JsonProperty("summary") Optional summary, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("theme") Optional theme, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("userRating") Optional userRating, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("year") Optional year, + @JsonProperty("MetadataItem") Optional> metadataItem) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(autotag, "autotag"); + Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(grandparentHero, "grandparentHero"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(hero, "hero"); + Utils.checkNotNull(image, "image"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(parentHero, "parentHero"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(prompt, "prompt"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(ratingArray, "ratingArray"); + Utils.checkNotNull(ratingCount, "ratingCount"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(search, "search"); + Utils.checkNotNull(secondary, "secondary"); + Utils.checkNotNull(skipChildren, "skipChildren"); + Utils.checkNotNull(skipParent, "skipParent"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(subtype, "subtype"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(userRating, "userRating"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(metadataItem, "metadataItem"); + this.title = title; + this.type = type; + this.absoluteIndex = absoluteIndex; + this.addedAt = addedAt; + this.art = art; + this.audienceRating = audienceRating; + this.audienceRatingImage = audienceRatingImage; + this.autotag = autotag; + this.banner = banner; + this.chapterSource = chapterSource; + this.composite = composite; + this.contentRating = contentRating; + this.country = country; + this.director = director; + this.duration = duration; + this.filter = filter; + this.genre = genre; + this.grandparentArt = grandparentArt; + this.grandparentHero = grandparentHero; + this.grandparentKey = grandparentKey; + this.grandparentRatingKey = grandparentRatingKey; + this.grandparentTheme = grandparentTheme; + this.grandparentThumb = grandparentThumb; + this.grandparentTitle = grandparentTitle; + this.guid = guid; + this.hero = hero; + this.image = image; + this.index = index; + this.key = key; + this.lastViewedAt = lastViewedAt; + this.leafCount = leafCount; + this.media = media; + this.originallyAvailableAt = originallyAvailableAt; + this.originalTitle = originalTitle; + this.parentHero = parentHero; + this.parentIndex = parentIndex; + this.parentKey = parentKey; + this.parentRatingKey = parentRatingKey; + this.parentThumb = parentThumb; + this.parentTitle = parentTitle; + this.primaryExtraKey = primaryExtraKey; + this.prompt = prompt; + this.rating = rating; + this.ratingArray = ratingArray; + this.ratingCount = ratingCount; + this.ratingImage = ratingImage; + this.ratingKey = ratingKey; + this.role = role; + this.search = search; + this.secondary = secondary; + this.skipChildren = skipChildren; + this.skipParent = skipParent; + this.sort = sort; + this.studio = studio; + this.subtype = subtype; + this.summary = summary; + this.tagline = tagline; + this.theme = theme; + this.thumb = thumb; + this.titleSort = titleSort; + this.updatedAt = updatedAt; + this.userRating = userRating; + this.viewCount = viewCount; + this.viewedLeafCount = viewedLeafCount; + this.viewOffset = viewOffset; + this.writer = writer; + this.year = year; + this.metadataItem = metadataItem; + this.additionalProperties = new HashMap<>(); + } + + public Items() { + 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(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), 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 title of the item (e.g. “300” or “The Simpsons”) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional title() { + return (Optional) title; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonIgnore + public Optional absoluteIndex() { + return absoluteIndex; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonIgnore + public Optional addedAt() { + return addedAt; + } + + /** + * When present, the URL for the background artwork for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional art() { + return (Optional) art; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonIgnore + public Optional audienceRating() { + return audienceRating; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audienceRatingImage() { + return (Optional) audienceRatingImage; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> autotag() { + return (Optional>) autotag; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional banner() { + return (Optional) banner; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chapterSource() { + return (Optional) chapterSource; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional composite() { + return (Optional) composite; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional contentRating() { + return (Optional) contentRating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> director() { + return (Optional>) director; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonIgnore + public Optional duration() { + return duration; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> filter() { + return (Optional>) filter; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> genre() { + return (Optional>) genre; + } + + /** + * The `art` of the grandparent + */ + @JsonIgnore + public Optional grandparentArt() { + return grandparentArt; + } + + /** + * The `hero` of the grandparent + */ + @JsonIgnore + public Optional grandparentHero() { + return grandparentHero; + } + + /** + * The `key` of the grandparent + */ + @JsonIgnore + public Optional grandparentKey() { + return grandparentKey; + } + + /** + * The `ratingKey` of the grandparent + */ + @JsonIgnore + public Optional grandparentRatingKey() { + return grandparentRatingKey; + } + + /** + * The `theme` of the grandparent + */ + @JsonIgnore + public Optional grandparentTheme() { + return grandparentTheme; + } + + /** + * The `thumb` of the grandparent + */ + @JsonIgnore + public Optional grandparentThumb() { + return grandparentThumb; + } + + /** + * The `title` of the grandparent + */ + @JsonIgnore + public Optional grandparentTitle() { + return grandparentTitle; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> guid() { + return (Optional>) guid; + } + + /** + * When present, the URL for a hero image for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hero() { + return (Optional) hero; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> image() { + return (Optional>) image; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonIgnore + public Optional index() { + return index; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonIgnore + public Optional lastViewedAt() { + return lastViewedAt; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonIgnore + public Optional leafCount() { + return leafCount; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> media() { + return (Optional>) media; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originallyAvailableAt() { + return (Optional) originallyAvailableAt; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originalTitle() { + return (Optional) originalTitle; + } + + /** + * The `hero` of the parent + */ + @JsonIgnore + public Optional parentHero() { + return parentHero; + } + + /** + * The `index` of the parent + */ + @JsonIgnore + public Optional parentIndex() { + return parentIndex; + } + + /** + * The `key` of the parent + */ + @JsonIgnore + public Optional parentKey() { + return parentKey; + } + + /** + * The `ratingKey` of the parent + */ + @JsonIgnore + public Optional parentRatingKey() { + return parentRatingKey; + } + + /** + * The `thumb` of the parent + */ + @JsonIgnore + public Optional parentThumb() { + return parentThumb; + } + + /** + * The `title` of the parent + */ + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional primaryExtraKey() { + return (Optional) primaryExtraKey; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonIgnore + public Optional prompt() { + return prompt; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonIgnore + public Optional rating() { + return rating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> ratingArray() { + return (Optional>) ratingArray; + } + + /** + * Number of ratings under this metadata + */ + @JsonIgnore + public Optional ratingCount() { + return ratingCount; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingImage() { + return (Optional) ratingImage; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingKey() { + return (Optional) ratingKey; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> role() { + return (Optional>) role; + } + + /** + * Indicates this is a search directory + */ + @JsonIgnore + public Optional search() { + return search; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonIgnore + public Optional secondary() { + return secondary; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonIgnore + public Optional skipChildren() { + return skipChildren; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonIgnore + public Optional skipParent() { + return skipParent; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> sort() { + return (Optional>) sort; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional studio() { + return (Optional) studio; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtype() { + return (Optional) subtype; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional summary() { + return (Optional) summary; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional tagline() { + return (Optional) tagline; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional theme() { + return (Optional) theme; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional thumb() { + return (Optional) thumb; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional titleSort() { + return (Optional) titleSort; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonIgnore + public Optional userRating() { + return userRating; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonIgnore + public Optional viewCount() { + return viewCount; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonIgnore + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonIgnore + public Optional viewOffset() { + return viewOffset; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> writer() { + return (Optional>) writer; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonIgnore + public Optional year() { + return year; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadataItem() { + return (Optional>) metadataItem; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Items withTitle(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Items withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Items withType(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Items withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Items withAbsoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Items withAbsoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Items withAddedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Items withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public Items withArt(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public Items withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Items withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Items withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Items withAudienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Items withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Items withAutotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + + public Items withAutotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public Items withBanner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public Items withBanner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Items withChapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Items withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Items withComposite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Items withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Items withContentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Items withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Items withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + + public Items withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Items withDirector(List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + + public Items withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Items withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Items withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Items withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Items withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Items withGenre(List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + + public Items withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + /** + * The `art` of the grandparent + */ + public Items withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + + /** + * The `art` of the grandparent + */ + public Items withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The `hero` of the grandparent + */ + public Items withGrandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + + /** + * The `hero` of the grandparent + */ + public Items withGrandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + /** + * The `key` of the grandparent + */ + public Items withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + + /** + * The `key` of the grandparent + */ + public Items withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public Items withGrandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public Items withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + /** + * The `theme` of the grandparent + */ + public Items withGrandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + + /** + * The `theme` of the grandparent + */ + public Items withGrandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + /** + * The `thumb` of the grandparent + */ + public Items withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public Items withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The `title` of the grandparent + */ + public Items withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + + /** + * The `title` of the grandparent + */ + public Items withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public Items withGuid(List guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + + public Items withGuid(Optional> guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public Items withHero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public Items withHero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + return this; + } + + public Items withImage(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + + public Items withImage(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Items withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Items withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Items withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Items withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Items withLastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Items withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Items withLeafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Items withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Items withMedia(List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + + public Items withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Items withOriginallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Items withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Items withOriginalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Items withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + /** + * The `hero` of the parent + */ + public Items withParentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + + /** + * The `hero` of the parent + */ + public Items withParentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + /** + * The `index` of the parent + */ + public Items withParentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + + /** + * The `index` of the parent + */ + public Items withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The `key` of the parent + */ + public Items withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + + /** + * The `key` of the parent + */ + public Items withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The `ratingKey` of the parent + */ + public Items withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public Items withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The `thumb` of the parent + */ + public Items withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + + /** + * The `thumb` of the parent + */ + public Items withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The `title` of the parent + */ + public Items withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + + /** + * The `title` of the parent + */ + public Items withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Items withPrimaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Items withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Items withPrompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Items withPrompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Items withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Items withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public Items withRatingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + + public Items withRatingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + /** + * Number of ratings under this metadata + */ + public Items withRatingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + + /** + * Number of ratings under this metadata + */ + public Items withRatingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Items withRatingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Items withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Items withRatingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Items withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Items withRole(List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + + public Items withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * Indicates this is a search directory + */ + public Items withSearch(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + + /** + * Indicates this is a search directory + */ + public Items withSearch(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Items withSecondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Items withSecondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Items withSkipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Items withSkipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Items withSkipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Items withSkipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Items withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Items withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Items withStudio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Items withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Items withSubtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Items withSubtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Items withSummary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Items withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Items withTagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Items withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Items withTheme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Items withTheme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Items withThumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Items withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Items withTitleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Items withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Items withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Items withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public Items withUserRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public Items withUserRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Items withViewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Items withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Items withViewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Items withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Items withViewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Items withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public Items withWriter(List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + + public Items withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Items withYear(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Items withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Items withMetadataItem(List metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = Optional.ofNullable(metadataItem); + return this; + } + + + public Items withMetadataItem(Optional> metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = metadataItem; + return this; + } + + @JsonAnySetter + public Items withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public Items withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Items other = (Items) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.absoluteIndex, other.absoluteIndex) && + Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && + Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && + Utils.enhancedDeepEquals(this.autotag, other.autotag) && + Utils.enhancedDeepEquals(this.banner, other.banner) && + Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && + Utils.enhancedDeepEquals(this.composite, other.composite) && + Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && + Utils.enhancedDeepEquals(this.country, other.country) && + Utils.enhancedDeepEquals(this.director, other.director) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.genre, other.genre) && + Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && + Utils.enhancedDeepEquals(this.grandparentHero, other.grandparentHero) && + Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && + Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && + Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && + Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && + Utils.enhancedDeepEquals(this.guid, other.guid) && + Utils.enhancedDeepEquals(this.hero, other.hero) && + Utils.enhancedDeepEquals(this.image, other.image) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && + Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && + Utils.enhancedDeepEquals(this.media, other.media) && + Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && + Utils.enhancedDeepEquals(this.parentHero, other.parentHero) && + Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && + Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && + Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && + Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && + Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && + Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && + Utils.enhancedDeepEquals(this.prompt, other.prompt) && + Utils.enhancedDeepEquals(this.rating, other.rating) && + Utils.enhancedDeepEquals(this.ratingArray, other.ratingArray) && + Utils.enhancedDeepEquals(this.ratingCount, other.ratingCount) && + Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.role, other.role) && + Utils.enhancedDeepEquals(this.search, other.search) && + Utils.enhancedDeepEquals(this.secondary, other.secondary) && + Utils.enhancedDeepEquals(this.skipChildren, other.skipChildren) && + Utils.enhancedDeepEquals(this.skipParent, other.skipParent) && + Utils.enhancedDeepEquals(this.sort, other.sort) && + Utils.enhancedDeepEquals(this.studio, other.studio) && + Utils.enhancedDeepEquals(this.subtype, other.subtype) && + Utils.enhancedDeepEquals(this.summary, other.summary) && + Utils.enhancedDeepEquals(this.tagline, other.tagline) && + Utils.enhancedDeepEquals(this.theme, other.theme) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.userRating, other.userRating) && + Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && + Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && + Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && + Utils.enhancedDeepEquals(this.writer, other.writer) && + Utils.enhancedDeepEquals(this.year, other.year) && + Utils.enhancedDeepEquals(this.metadataItem, other.metadataItem) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year, metadataItem, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(Items.class, + "title", title, + "type", type, + "absoluteIndex", absoluteIndex, + "addedAt", addedAt, + "art", art, + "audienceRating", audienceRating, + "audienceRatingImage", audienceRatingImage, + "autotag", autotag, + "banner", banner, + "chapterSource", chapterSource, + "composite", composite, + "contentRating", contentRating, + "country", country, + "director", director, + "duration", duration, + "filter", filter, + "genre", genre, + "grandparentArt", grandparentArt, + "grandparentHero", grandparentHero, + "grandparentKey", grandparentKey, + "grandparentRatingKey", grandparentRatingKey, + "grandparentTheme", grandparentTheme, + "grandparentThumb", grandparentThumb, + "grandparentTitle", grandparentTitle, + "guid", guid, + "hero", hero, + "image", image, + "index", index, + "key", key, + "lastViewedAt", lastViewedAt, + "leafCount", leafCount, + "media", media, + "originallyAvailableAt", originallyAvailableAt, + "originalTitle", originalTitle, + "parentHero", parentHero, + "parentIndex", parentIndex, + "parentKey", parentKey, + "parentRatingKey", parentRatingKey, + "parentThumb", parentThumb, + "parentTitle", parentTitle, + "primaryExtraKey", primaryExtraKey, + "prompt", prompt, + "rating", rating, + "ratingArray", ratingArray, + "ratingCount", ratingCount, + "ratingImage", ratingImage, + "ratingKey", ratingKey, + "role", role, + "search", search, + "secondary", secondary, + "skipChildren", skipChildren, + "skipParent", skipParent, + "sort", sort, + "studio", studio, + "subtype", subtype, + "summary", summary, + "tagline", tagline, + "theme", theme, + "thumb", thumb, + "titleSort", titleSort, + "updatedAt", updatedAt, + "userRating", userRating, + "viewCount", viewCount, + "viewedLeafCount", viewedLeafCount, + "viewOffset", viewOffset, + "writer", writer, + "year", year, + "metadataItem", metadataItem, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional absoluteIndex = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional> autotag = Optional.empty(); + + private Optional banner = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional> filter = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentHero = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional grandparentRatingKey = Optional.empty(); + + private Optional grandparentTheme = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional> guid = Optional.empty(); + + private Optional hero = Optional.empty(); + + private Optional> image = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional originalTitle = Optional.empty(); + + private Optional parentHero = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional prompt = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional> ratingArray = Optional.empty(); + + private Optional ratingCount = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Optional search = Optional.empty(); + + private Optional secondary = Optional.empty(); + + private Optional skipChildren = Optional.empty(); + + private Optional skipParent = Optional.empty(); + + private Optional> sort = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional subtype = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional theme = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional userRating = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional viewedLeafCount = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional> metadataItem = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + + public Builder autotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + public Builder autotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + 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); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + 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; + } + + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + + public Builder guid(List 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; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + 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; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + 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; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + + /** + * The `hero` of the parent + */ + public Builder parentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + /** + * The `hero` of the parent + */ + public Builder parentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + + /** + * The `index` of the parent + */ + public Builder parentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The `index` of the parent + */ + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + + /** + * The `key` of the parent + */ + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The `key` of the parent + */ + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + + /** + * The `title` of the parent + */ + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The `title` of the parent + */ + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + + public Builder ratingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + public Builder ratingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + 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; + } + + + /** + * Indicates this is a search directory + */ + public Builder search(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + /** + * Indicates this is a search directory + */ + public Builder search(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + 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; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + + public Builder metadataItem(List metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = Optional.ofNullable(metadataItem); + return this; + } + + public Builder metadataItem(Optional> metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = metadataItem; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public Items build() { + + return new Items( + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year, metadataItem) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/LibrarySection.java b/src/main/java/dev/plexapi/sdk/models/shared/LibrarySection.java new file mode 100644 index 00000000..abc3538f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/LibrarySection.java @@ -0,0 +1,985 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class LibrarySection { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("agent") + private Optional agent; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("content") + private Optional content; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentChangedAt") + private Optional contentChangedAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAt") + private Optional createdAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directory") + private Optional directory; + + /** + * Indicates whether this section has filtering capabilities + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filters") + private Optional filters; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hidden") + private Optional hidden; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Location") + private Optional> location; + + /** + * Indicates whether this library section is currently scanning + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("refreshing") + private Optional refreshing; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scannedAt") + private Optional scannedAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scanner") + private Optional scanner; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonCreator + public LibrarySection( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("agent") Optional agent, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("art") Optional art, + @JsonProperty("composite") Optional composite, + @JsonProperty("content") Optional content, + @JsonProperty("contentChangedAt") Optional contentChangedAt, + @JsonProperty("createdAt") Optional createdAt, + @JsonProperty("directory") Optional directory, + @JsonProperty("filters") Optional filters, + @JsonProperty("hidden") Optional hidden, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("Location") Optional> location, + @JsonProperty("refreshing") Optional refreshing, + @JsonProperty("scannedAt") Optional scannedAt, + @JsonProperty("scanner") Optional scanner, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("updatedAt") Optional updatedAt) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(agent, "agent"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(contentChangedAt, "contentChangedAt"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(directory, "directory"); + Utils.checkNotNull(filters, "filters"); + Utils.checkNotNull(hidden, "hidden"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(refreshing, "refreshing"); + Utils.checkNotNull(scannedAt, "scannedAt"); + Utils.checkNotNull(scanner, "scanner"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.title = title; + this.type = type; + this.agent = agent; + this.allowSync = allowSync; + this.art = art; + this.composite = composite; + this.content = content; + this.contentChangedAt = contentChangedAt; + this.createdAt = createdAt; + this.directory = directory; + this.filters = filters; + this.hidden = hidden; + this.key = key; + this.language = language; + this.location = location; + this.refreshing = refreshing; + this.scannedAt = scannedAt; + this.scanner = scanner; + this.thumb = thumb; + this.updatedAt = updatedAt; + } + + public LibrarySection() { + 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()); + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional agent() { + return agent; + } + + @JsonIgnore + public Optional allowSync() { + return allowSync; + } + + @JsonIgnore + public Optional art() { + return art; + } + + @JsonIgnore + public Optional composite() { + return composite; + } + + @JsonIgnore + public Optional content() { + return content; + } + + @JsonIgnore + public Optional contentChangedAt() { + return contentChangedAt; + } + + @JsonIgnore + public Optional createdAt() { + return createdAt; + } + + @JsonIgnore + public Optional directory() { + return directory; + } + + /** + * Indicates whether this section has filtering capabilities + */ + @JsonIgnore + public Optional filters() { + return filters; + } + + @JsonIgnore + public Optional hidden() { + return hidden; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> location() { + return (Optional>) location; + } + + /** + * Indicates whether this library section is currently scanning + */ + @JsonIgnore + public Optional refreshing() { + return refreshing; + } + + @JsonIgnore + public Optional scannedAt() { + return scannedAt; + } + + @JsonIgnore + public Optional scanner() { + return scanner; + } + + @JsonIgnore + public Optional thumb() { + return thumb; + } + + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + public LibrarySection withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public LibrarySection withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public LibrarySection withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public LibrarySection withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public LibrarySection withAgent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + + public LibrarySection withAgent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + return this; + } + + public LibrarySection withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + + public LibrarySection withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public LibrarySection withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + public LibrarySection withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public LibrarySection withComposite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + public LibrarySection withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + public LibrarySection withContent(boolean content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + + public LibrarySection withContent(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public LibrarySection withContentChangedAt(long contentChangedAt) { + Utils.checkNotNull(contentChangedAt, "contentChangedAt"); + this.contentChangedAt = Optional.ofNullable(contentChangedAt); + return this; + } + + + public LibrarySection withContentChangedAt(Optional contentChangedAt) { + Utils.checkNotNull(contentChangedAt, "contentChangedAt"); + this.contentChangedAt = contentChangedAt; + return this; + } + + public LibrarySection withCreatedAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + + public LibrarySection withCreatedAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public LibrarySection withDirectory(boolean directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public LibrarySection withDirectory(Optional directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + /** + * Indicates whether this section has filtering capabilities + */ + public LibrarySection withFilters(boolean filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = Optional.ofNullable(filters); + return this; + } + + + /** + * Indicates whether this section has filtering capabilities + */ + public LibrarySection withFilters(Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + public LibrarySection withHidden(boolean hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = Optional.ofNullable(hidden); + return this; + } + + + public LibrarySection withHidden(Optional hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = hidden; + return this; + } + + public LibrarySection withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public LibrarySection withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public LibrarySection withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public LibrarySection withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public LibrarySection withLocation(List location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + public LibrarySection withLocation(Optional> location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * Indicates whether this library section is currently scanning + */ + public LibrarySection withRefreshing(boolean refreshing) { + Utils.checkNotNull(refreshing, "refreshing"); + this.refreshing = Optional.ofNullable(refreshing); + return this; + } + + + /** + * Indicates whether this library section is currently scanning + */ + public LibrarySection withRefreshing(Optional refreshing) { + Utils.checkNotNull(refreshing, "refreshing"); + this.refreshing = refreshing; + return this; + } + + public LibrarySection withScannedAt(long scannedAt) { + Utils.checkNotNull(scannedAt, "scannedAt"); + this.scannedAt = Optional.ofNullable(scannedAt); + return this; + } + + + public LibrarySection withScannedAt(Optional scannedAt) { + Utils.checkNotNull(scannedAt, "scannedAt"); + this.scannedAt = scannedAt; + return this; + } + + public LibrarySection withScanner(String scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = Optional.ofNullable(scanner); + return this; + } + + + public LibrarySection withScanner(Optional scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = scanner; + return this; + } + + public LibrarySection withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + public LibrarySection withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public LibrarySection withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + public LibrarySection withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LibrarySection other = (LibrarySection) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.agent, other.agent) && + Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.composite, other.composite) && + Utils.enhancedDeepEquals(this.content, other.content) && + Utils.enhancedDeepEquals(this.contentChangedAt, other.contentChangedAt) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.directory, other.directory) && + Utils.enhancedDeepEquals(this.filters, other.filters) && + Utils.enhancedDeepEquals(this.hidden, other.hidden) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.refreshing, other.refreshing) && + Utils.enhancedDeepEquals(this.scannedAt, other.scannedAt) && + Utils.enhancedDeepEquals(this.scanner, other.scanner) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, agent, + allowSync, art, composite, + content, contentChangedAt, createdAt, + directory, filters, hidden, + key, language, location, + refreshing, scannedAt, scanner, + thumb, updatedAt); + } + + @Override + public String toString() { + return Utils.toString(LibrarySection.class, + "title", title, + "type", type, + "agent", agent, + "allowSync", allowSync, + "art", art, + "composite", composite, + "content", content, + "contentChangedAt", contentChangedAt, + "createdAt", createdAt, + "directory", directory, + "filters", filters, + "hidden", hidden, + "key", key, + "language", language, + "location", location, + "refreshing", refreshing, + "scannedAt", scannedAt, + "scanner", scanner, + "thumb", thumb, + "updatedAt", updatedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional agent = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional content = Optional.empty(); + + private Optional contentChangedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional directory = Optional.empty(); + + private Optional filters = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional> location = Optional.empty(); + + private Optional refreshing = Optional.empty(); + + private Optional scannedAt = Optional.empty(); + + private Optional scanner = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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 agent(String agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = Optional.ofNullable(agent); + return this; + } + + public Builder agent(Optional agent) { + Utils.checkNotNull(agent, "agent"); + this.agent = agent; + 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 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 composite(String composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + + public Builder content(boolean content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + public Builder content(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + + public Builder contentChangedAt(long contentChangedAt) { + Utils.checkNotNull(contentChangedAt, "contentChangedAt"); + this.contentChangedAt = Optional.ofNullable(contentChangedAt); + return this; + } + + public Builder contentChangedAt(Optional contentChangedAt) { + Utils.checkNotNull(contentChangedAt, "contentChangedAt"); + this.contentChangedAt = contentChangedAt; + return this; + } + + + public Builder createdAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + public Builder directory(boolean directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + + /** + * Indicates whether this section has filtering capabilities + */ + public Builder filters(boolean filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = Optional.ofNullable(filters); + return this; + } + + /** + * Indicates whether this section has filtering capabilities + */ + public Builder filters(Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + + public Builder hidden(boolean hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = Optional.ofNullable(hidden); + return this; + } + + public Builder hidden(Optional hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = hidden; + 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 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 location(List location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public Builder location(Optional> location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + /** + * Indicates whether this library section is currently scanning + */ + public Builder refreshing(boolean refreshing) { + Utils.checkNotNull(refreshing, "refreshing"); + this.refreshing = Optional.ofNullable(refreshing); + return this; + } + + /** + * Indicates whether this library section is currently scanning + */ + public Builder refreshing(Optional refreshing) { + Utils.checkNotNull(refreshing, "refreshing"); + this.refreshing = refreshing; + return this; + } + + + public Builder scannedAt(long scannedAt) { + Utils.checkNotNull(scannedAt, "scannedAt"); + this.scannedAt = Optional.ofNullable(scannedAt); + return this; + } + + public Builder scannedAt(Optional scannedAt) { + Utils.checkNotNull(scannedAt, "scannedAt"); + this.scannedAt = scannedAt; + return this; + } + + + public Builder scanner(String scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = Optional.ofNullable(scanner); + return this; + } + + public Builder scanner(Optional scanner) { + Utils.checkNotNull(scanner, "scanner"); + this.scanner = scanner; + 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 updatedAt(long 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 LibrarySection build() { + + return new LibrarySection( + title, type, agent, + allowSync, art, composite, + content, contentChangedAt, createdAt, + directory, filters, hidden, + key, language, location, + refreshing, scannedAt, scanner, + thumb, updatedAt); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/LibrarySectionLocation.java b/src/main/java/dev/plexapi/sdk/models/shared/LibrarySectionLocation.java new file mode 100644 index 00000000..f813f65f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/LibrarySectionLocation.java @@ -0,0 +1,179 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +/** + * LibrarySectionLocation + * + *

Represents a top-level location on disk where media in this library section is stored + */ +public class LibrarySectionLocation { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The path of where this directory exists on disk + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("path") + private Optional path; + + @JsonCreator + public LibrarySectionLocation( + @JsonProperty("id") Optional id, + @JsonProperty("path") Optional path) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(path, "path"); + this.id = id; + this.path = path; + } + + public LibrarySectionLocation() { + this(Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The path of where this directory exists on disk + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional path() { + return (Optional) path; + } + + public static Builder builder() { + return new Builder(); + } + + + public LibrarySectionLocation withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public LibrarySectionLocation withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The path of where this directory exists on disk + */ + public LibrarySectionLocation withPath(Object path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + + /** + * The path of where this directory exists on disk + */ + public LibrarySectionLocation withPath(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LibrarySectionLocation other = (LibrarySectionLocation) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.path, other.path); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, path); + } + + @Override + public String toString() { + return Utils.toString(LibrarySectionLocation.class, + "id", id, + "path", path); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional path = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder id(long 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; + } + + + /** + * The path of where this directory exists on disk + */ + public Builder path(Object path) { + Utils.checkNotNull(path, "path"); + this.path = Optional.ofNullable(path); + return this; + } + + /** + * The path of where this directory exists on disk + */ + public Builder path(Optional path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + public LibrarySectionLocation build() { + + return new LibrarySectionLocation( + id, path); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Lineup.java b/src/main/java/dev/plexapi/sdk/models/shared/Lineup.java new file mode 100644 index 00000000..61b927c4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Lineup.java @@ -0,0 +1,369 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class Lineup { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of this object (`lineup` in this case) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lineupType") + private Optional lineupType; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private Optional location; + + /** + * The uuid of this lineup + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public Lineup( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("lineupType") Optional lineupType, + @JsonProperty("location") Optional location, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(lineupType, "lineupType"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(uuid, "uuid"); + this.title = title; + this.type = type; + this.lineupType = lineupType; + this.location = location; + this.uuid = uuid; + } + + public Lineup() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional title() { + return title; + } + + /** + * The type of this object (`lineup` in this case) + */ + @JsonIgnore + public Optional type() { + return type; + } + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional lineupType() { + return (Optional) lineupType; + } + + @JsonIgnore + public Optional location() { + return location; + } + + /** + * The uuid of this lineup + */ + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public Lineup withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public Lineup withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of this object (`lineup` in this case) + */ + public Lineup withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of this object (`lineup` in this case) + */ + public Lineup withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + public Lineup withLineupType(LineupType lineupType) { + Utils.checkNotNull(lineupType, "lineupType"); + this.lineupType = Optional.ofNullable(lineupType); + return this; + } + + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + public Lineup withLineupType(Optional lineupType) { + Utils.checkNotNull(lineupType, "lineupType"); + this.lineupType = lineupType; + return this; + } + + public Lineup withLocation(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + public Lineup withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * The uuid of this lineup + */ + public Lineup withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + /** + * The uuid of this lineup + */ + public Lineup withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Lineup other = (Lineup) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.lineupType, other.lineupType) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, lineupType, + location, uuid); + } + + @Override + public String toString() { + return Utils.toString(Lineup.class, + "title", title, + "type", type, + "lineupType", lineupType, + "location", location, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional lineupType = Optional.empty(); + + private Optional location = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The type of this object (`lineup` in this case) + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of this object (`lineup` in this case) + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + public Builder lineupType(LineupType lineupType) { + Utils.checkNotNull(lineupType, "lineupType"); + this.lineupType = Optional.ofNullable(lineupType); + return this; + } + + /** + * - `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ + public Builder lineupType(Optional lineupType) { + Utils.checkNotNull(lineupType, "lineupType"); + this.lineupType = lineupType; + return this; + } + + + public Builder location(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + /** + * The uuid of this lineup + */ + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + /** + * The uuid of this lineup + */ + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public Lineup build() { + + return new Lineup( + title, type, lineupType, + location, uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/LineupType.java b/src/main/java/dev/plexapi/sdk/models/shared/LineupType.java new file mode 100644 index 00000000..65a36cd0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/LineupType.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +/** + * LineupType + * + *

- `-1`: N/A + * - `0`: Over the air + * - `1`: Cable + * - `2`: Satellite + * - `3`: IPTV + * - `4`: Virtual + */ +public enum LineupType { + MINUS1(-1L), + ZERO(0L), + ONE(1L), + TWO(2L), + THREE(3L), + FOUR(4L); + + @JsonValue + private final long value; + + LineupType(long value) { + this.value = value; + } + + public long value() { + return value; + } + + public static Optional fromValue(long value) { + for (LineupType o: LineupType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Location.java b/src/main/java/dev/plexapi/sdk/models/shared/Location.java new file mode 100644 index 00000000..782834d8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Location.java @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum Location { + LAN("lan"), + WAN("wan"), + CELLULAR("cellular"); + + @JsonValue + private final String value; + + Location(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Location o: Location.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Media.java b/src/main/java/dev/plexapi/sdk/models/shared/Media.java new file mode 100644 index 00000000..8a83b3d1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Media.java @@ -0,0 +1,924 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * Media + * + *

`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element. + */ +public class Media { + + @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("audioProfile") + private Optional audioProfile; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasVoiceActivity") + private Optional hasVoiceActivity; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoFrameRate") + private Optional videoFrameRate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public Media( + @JsonProperty("aspectRatio") Optional aspectRatio, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("container") Optional container, + @JsonProperty("duration") Optional duration, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, + @JsonProperty("height") Optional height, + @JsonProperty("id") Optional id, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("Part") Optional> part, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("videoFrameRate") Optional videoFrameRate, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("videoResolution") Optional videoResolution, + @JsonProperty("width") Optional width) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(part, "part"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(width, "width"); + this.aspectRatio = aspectRatio; + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.audioProfile = audioProfile; + this.bitrate = bitrate; + this.container = container; + this.duration = duration; + this.has64bitOffsets = has64bitOffsets; + this.hasVoiceActivity = hasVoiceActivity; + this.height = height; + this.id = id; + this.optimizedForStreaming = optimizedForStreaming; + this.part = part; + this.videoCodec = videoCodec; + this.videoFrameRate = videoFrameRate; + this.videoProfile = videoProfile; + this.videoResolution = videoResolution; + this.width = width; + this.additionalProperties = new HashMap<>(); + } + + 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(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional aspectRatio() { + return aspectRatio; + } + + @JsonIgnore + public Optional audioChannels() { + return audioChannels; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audioCodec() { + return (Optional) audioCodec; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audioProfile() { + return (Optional) audioProfile; + } + + @JsonIgnore + public Optional bitrate() { + return bitrate; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional container() { + return (Optional) container; + } + + @JsonIgnore + public Optional duration() { + return duration; + } + + @JsonIgnore + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + @JsonIgnore + public Optional hasVoiceActivity() { + return hasVoiceActivity; + } + + @JsonIgnore + public Optional height() { + return height; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> part() { + return (Optional>) part; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional videoCodec() { + return (Optional) videoCodec; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional videoFrameRate() { + return (Optional) videoFrameRate; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional videoProfile() { + return (Optional) videoProfile; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional videoResolution() { + return (Optional) videoResolution; + } + + @JsonIgnore + public Optional width() { + return width; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + 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(long audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + + public Media withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Media withAudioCodec(Object 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 withAudioProfile(Object audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + + public Media withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Media withBitrate(long bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + + public Media withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Media withContainer(Object 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 withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + public Media withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public Media withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + + public Media withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + 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 withHeight(long height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + + public Media withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Media withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public Media withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Media withOptimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + + public Media withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + 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; + } + + public Media withVideoCodec(Object 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 withVideoFrameRate(Object 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 withVideoProfile(Object 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 withVideoResolution(Object videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + + public Media withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public Media withWidth(long width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + + public Media withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + @JsonAnySetter + public Media withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public Media withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Media other = (Media) o; + return + Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && + Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && + Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && + Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && + Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && + Utils.enhancedDeepEquals(this.container, other.container) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && + Utils.enhancedDeepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && + Utils.enhancedDeepEquals(this.height, other.height) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + Utils.enhancedDeepEquals(this.part, other.part) && + Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && + Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && + Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && + Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && + Utils.enhancedDeepEquals(this.width, other.width) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + aspectRatio, audioChannels, audioCodec, + audioProfile, bitrate, container, + duration, has64bitOffsets, hasVoiceActivity, + height, id, optimizedForStreaming, + part, videoCodec, videoFrameRate, + videoProfile, videoResolution, width, + additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(Media.class, + "aspectRatio", aspectRatio, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "audioProfile", audioProfile, + "bitrate", bitrate, + "container", container, + "duration", duration, + "has64bitOffsets", has64bitOffsets, + "hasVoiceActivity", hasVoiceActivity, + "height", height, + "id", id, + "optimizedForStreaming", optimizedForStreaming, + "part", part, + "videoCodec", videoCodec, + "videoFrameRate", videoFrameRate, + "videoProfile", videoProfile, + "videoResolution", videoResolution, + "width", width, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional aspectRatio = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional hasVoiceActivity = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional videoFrameRate = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional width = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + 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(long 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(Object 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 audioProfile(Object 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; + } + + + public Builder bitrate(long 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 container(Object 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 duration(long 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 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 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 height(long 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 id(long 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 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 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 Builder videoCodec(Object 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 videoFrameRate(Object 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 videoProfile(Object 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 videoResolution(Object 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 width(long 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 additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public Media build() { + + return new Media( + aspectRatio, audioChannels, audioCodec, + audioProfile, bitrate, container, + duration, has64bitOffsets, hasVoiceActivity, + height, id, optimizedForStreaming, + part, videoCodec, videoFrameRate, + videoProfile, videoResolution, width) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainer.java new file mode 100644 index 00000000..20352fc9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainer.java @@ -0,0 +1,284 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * MediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + @JsonCreator + public MediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + } + + public MediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainer other = (MediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize); + } + + @Override + public String toString() { + return Utils.toString(MediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainer build() { + + return new MediaContainer( + identifier, offset, size, + totalSize); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtwork.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtwork.java new file mode 100644 index 00000000..133f0072 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtwork.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class MediaContainerWithArtwork { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithArtwork( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithArtwork() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithArtwork withMediaContainer(MediaContainerWithArtworkMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithArtwork 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; + } + MediaContainerWithArtwork other = (MediaContainerWithArtwork) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithArtwork.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithArtworkMediaContainer 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 MediaContainerWithArtwork build() { + + return new MediaContainerWithArtwork( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkMediaContainer.java new file mode 100644 index 00000000..af823910 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithArtworkMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithArtworkMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + @JsonCreator + public MediaContainerWithArtworkMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(metadata, "metadata"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.metadata = metadata; + } + + public MediaContainerWithArtworkMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadata() { + return (Optional>) metadata; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithArtworkMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithArtworkMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithArtworkMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithArtworkMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithArtworkMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithArtworkMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithArtworkMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithArtworkMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainerWithArtworkMediaContainer withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + + public MediaContainerWithArtworkMediaContainer 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; + } + MediaContainerWithArtworkMediaContainer other = (MediaContainerWithArtworkMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, metadata); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithArtworkMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "metadata", metadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + 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 MediaContainerWithArtworkMediaContainer build() { + + return new MediaContainerWithArtworkMediaContainer( + identifier, offset, size, + totalSize, metadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkMetadata.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkMetadata.java new file mode 100644 index 00000000..b911fdb3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkMetadata.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + + +public class MediaContainerWithArtworkMetadata { + /** + * The title of the item + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * The path to the artwork + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public MediaContainerWithArtworkMetadata( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("key") Optional key) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(key, "key"); + this.title = title; + this.type = type; + this.key = key; + this.additionalProperties = new HashMap<>(); + } + + public MediaContainerWithArtworkMetadata() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The title of the item + */ + @JsonIgnore + public Optional title() { + return title; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * The path to the artwork + */ + @JsonIgnore + public Optional key() { + return key; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The title of the item + */ + public MediaContainerWithArtworkMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the item + */ + public MediaContainerWithArtworkMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public MediaContainerWithArtworkMetadata withType(MediaContainerWithArtworkType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public MediaContainerWithArtworkMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The path to the artwork + */ + public MediaContainerWithArtworkMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The path to the artwork + */ + public MediaContainerWithArtworkMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + @JsonAnySetter + public MediaContainerWithArtworkMetadata withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public MediaContainerWithArtworkMetadata withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithArtworkMetadata other = (MediaContainerWithArtworkMetadata) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, key, + additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithArtworkMetadata.class, + "title", title, + "type", type, + "key", key, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional key = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The title of the item + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the item + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + public Builder type(MediaContainerWithArtworkType 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; + } + + + /** + * The path to the artwork + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The path to the artwork + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public MediaContainerWithArtworkMetadata build() { + + return new MediaContainerWithArtworkMetadata( + title, type, key) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkType.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkType.java new file mode 100644 index 00000000..ef8232ac --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithArtworkType.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum MediaContainerWithArtworkType { + IMAGE("image"); + + @JsonValue + private final String value; + + MediaContainerWithArtworkType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (MediaContainerWithArtworkType o: MediaContainerWithArtworkType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecision.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecision.java new file mode 100644 index 00000000..0764c83b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecision.java @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * MediaContainerWithDecision + * + *

`MediaContainer` is commonly found as the root of a response and is a pretty generic container. Common attributes include `identifier` and things related to paging (`offset`, `size`, `totalSize`). + * + *

It is also common for a `MediaContainer` to contain attributes "hoisted" from its children. If every element in the container would have had the same attribute, then that attribute can be present on the container instead of being repeated on every element. For example, an album's list of tracks might include `parentTitle` on the container since all of the tracks have the same album title. A container may have a `source` attribute when all of the items came from the same source. Generally speaking, when looking for an attribute on an item, if the attribute wasn't found then the container should be checked for that attribute as well. + */ +public class MediaContainerWithDecision { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithDecision( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithDecision() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithDecision withMediaContainer(MediaContainerWithDecisionMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithDecision 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; + } + MediaContainerWithDecision other = (MediaContainerWithDecision) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDecision.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithDecisionMediaContainer 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 MediaContainerWithDecision build() { + + return new MediaContainerWithDecision( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionDecision.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionDecision.java new file mode 100644 index 00000000..2d90bba4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionDecision.java @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum MediaContainerWithDecisionDecision { + COPY("copy"), + TRANSCODE("transcode"), + BURN("burn"), + UNAVAILABLE("unavailable"), + IGNORE("ignore"), + NONE("none"); + + @JsonValue + private final String value; + + MediaContainerWithDecisionDecision(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (MediaContainerWithDecisionDecision o: MediaContainerWithDecisionDecision.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionLocation.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionLocation.java new file mode 100644 index 00000000..4663922b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionLocation.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum MediaContainerWithDecisionLocation { + DIRECT("direct"), + SIDECAR_SUBS("sidecar-subs"), + SEGMENTS_VIDEO("segments-video"), + SEGMENTS_AUDIO("segments-audio"), + SEGMENTS_AV("segments-av"), + SEGMENTS_SUBS("segments-subs"), + EMBEDDED("embedded"), + SIDECAR("sidecar"); + + @JsonValue + private final String value; + + MediaContainerWithDecisionLocation(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (MediaContainerWithDecisionLocation o: MediaContainerWithDecisionLocation.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMedia.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMedia.java new file mode 100644 index 00000000..4e77fee0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMedia.java @@ -0,0 +1,1056 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * MediaContainerWithDecisionMedia + * + *

`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element. + */ +public class MediaContainerWithDecisionMedia { + + @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("audioProfile") + private Optional audioProfile; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasVoiceActivity") + private Optional hasVoiceActivity; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoFrameRate") + private Optional videoFrameRate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("abr") + private Optional abr; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("resourceSession") + private Optional resourceSession; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("selected") + private Optional selected; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public MediaContainerWithDecisionMedia( + @JsonProperty("aspectRatio") Optional aspectRatio, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("container") Optional container, + @JsonProperty("duration") Optional duration, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, + @JsonProperty("height") Optional height, + @JsonProperty("id") Optional id, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("Part") Optional> part, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("videoFrameRate") Optional videoFrameRate, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("videoResolution") Optional videoResolution, + @JsonProperty("width") Optional width, + @JsonProperty("abr") Optional abr, + @JsonProperty("resourceSession") Optional resourceSession, + @JsonProperty("selected") Optional selected) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + Utils.checkNotNull(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(part, "part"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(abr, "abr"); + Utils.checkNotNull(resourceSession, "resourceSession"); + Utils.checkNotNull(selected, "selected"); + this.aspectRatio = aspectRatio; + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.audioProfile = audioProfile; + this.bitrate = bitrate; + this.container = container; + this.duration = duration; + this.has64bitOffsets = has64bitOffsets; + this.hasVoiceActivity = hasVoiceActivity; + this.height = height; + this.id = id; + this.optimizedForStreaming = optimizedForStreaming; + this.part = part; + this.videoCodec = videoCodec; + this.videoFrameRate = videoFrameRate; + this.videoProfile = videoProfile; + this.videoResolution = videoResolution; + this.width = width; + this.abr = abr; + this.resourceSession = resourceSession; + this.selected = selected; + this.additionalProperties = new HashMap<>(); + } + + public MediaContainerWithDecisionMedia() { + 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()); + } + + @JsonIgnore + public Optional aspectRatio() { + return aspectRatio; + } + + @JsonIgnore + public Optional audioChannels() { + return audioChannels; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audioCodec() { + return (Optional) audioCodec; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audioProfile() { + return (Optional) audioProfile; + } + + @JsonIgnore + public Optional bitrate() { + return bitrate; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional container() { + return (Optional) container; + } + + @JsonIgnore + public Optional duration() { + return duration; + } + + @JsonIgnore + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + @JsonIgnore + public Optional hasVoiceActivity() { + return hasVoiceActivity; + } + + @JsonIgnore + public Optional height() { + return height; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> part() { + return (Optional>) part; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional videoCodec() { + return (Optional) videoCodec; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional videoFrameRate() { + return (Optional) videoFrameRate; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional videoProfile() { + return (Optional) videoProfile; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional videoResolution() { + return (Optional) videoResolution; + } + + @JsonIgnore + public Optional width() { + return width; + } + + @JsonIgnore + public Optional abr() { + return abr; + } + + @JsonIgnore + public Optional resourceSession() { + return resourceSession; + } + + @JsonIgnore + public Optional selected() { + return selected; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithDecisionMedia withAspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + + public MediaContainerWithDecisionMedia withAspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public MediaContainerWithDecisionMedia withAudioChannels(long audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + + public MediaContainerWithDecisionMedia withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public MediaContainerWithDecisionMedia withAudioCodec(Object audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + + public MediaContainerWithDecisionMedia withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public MediaContainerWithDecisionMedia withAudioProfile(Object audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + + public MediaContainerWithDecisionMedia withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public MediaContainerWithDecisionMedia withBitrate(long bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + + public MediaContainerWithDecisionMedia withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public MediaContainerWithDecisionMedia withContainer(Object container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + + public MediaContainerWithDecisionMedia withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public MediaContainerWithDecisionMedia withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + public MediaContainerWithDecisionMedia withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public MediaContainerWithDecisionMedia withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + + public MediaContainerWithDecisionMedia withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public MediaContainerWithDecisionMedia withHasVoiceActivity(boolean hasVoiceActivity) { + Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); + return this; + } + + + public MediaContainerWithDecisionMedia withHasVoiceActivity(Optional hasVoiceActivity) { + Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + this.hasVoiceActivity = hasVoiceActivity; + return this; + } + + public MediaContainerWithDecisionMedia withHeight(long height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + + public MediaContainerWithDecisionMedia withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public MediaContainerWithDecisionMedia withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public MediaContainerWithDecisionMedia withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public MediaContainerWithDecisionMedia withOptimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + + public MediaContainerWithDecisionMedia withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public MediaContainerWithDecisionMedia withPart(List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + + public MediaContainerWithDecisionMedia withPart(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + public MediaContainerWithDecisionMedia withVideoCodec(Object videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + + public MediaContainerWithDecisionMedia withVideoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public MediaContainerWithDecisionMedia withVideoFrameRate(Object videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + + public MediaContainerWithDecisionMedia withVideoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public MediaContainerWithDecisionMedia withVideoProfile(Object videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + + public MediaContainerWithDecisionMedia withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public MediaContainerWithDecisionMedia withVideoResolution(Object videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + + public MediaContainerWithDecisionMedia withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public MediaContainerWithDecisionMedia withWidth(long width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + + public MediaContainerWithDecisionMedia withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public MediaContainerWithDecisionMedia withAbr(boolean abr) { + Utils.checkNotNull(abr, "abr"); + this.abr = Optional.ofNullable(abr); + return this; + } + + + public MediaContainerWithDecisionMedia withAbr(Optional abr) { + Utils.checkNotNull(abr, "abr"); + this.abr = abr; + return this; + } + + public MediaContainerWithDecisionMedia withResourceSession(String resourceSession) { + Utils.checkNotNull(resourceSession, "resourceSession"); + this.resourceSession = Optional.ofNullable(resourceSession); + return this; + } + + + public MediaContainerWithDecisionMedia withResourceSession(Optional resourceSession) { + Utils.checkNotNull(resourceSession, "resourceSession"); + this.resourceSession = resourceSession; + return this; + } + + public MediaContainerWithDecisionMedia withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + + public MediaContainerWithDecisionMedia withSelected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + @JsonAnySetter + public MediaContainerWithDecisionMedia withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public MediaContainerWithDecisionMedia withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithDecisionMedia other = (MediaContainerWithDecisionMedia) o; + return + Utils.enhancedDeepEquals(this.aspectRatio, other.aspectRatio) && + Utils.enhancedDeepEquals(this.audioChannels, other.audioChannels) && + Utils.enhancedDeepEquals(this.audioCodec, other.audioCodec) && + Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && + Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && + Utils.enhancedDeepEquals(this.container, other.container) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && + Utils.enhancedDeepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && + Utils.enhancedDeepEquals(this.height, other.height) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + Utils.enhancedDeepEquals(this.part, other.part) && + Utils.enhancedDeepEquals(this.videoCodec, other.videoCodec) && + Utils.enhancedDeepEquals(this.videoFrameRate, other.videoFrameRate) && + Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && + Utils.enhancedDeepEquals(this.videoResolution, other.videoResolution) && + Utils.enhancedDeepEquals(this.width, other.width) && + Utils.enhancedDeepEquals(this.abr, other.abr) && + Utils.enhancedDeepEquals(this.resourceSession, other.resourceSession) && + Utils.enhancedDeepEquals(this.selected, other.selected) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + aspectRatio, audioChannels, audioCodec, + audioProfile, bitrate, container, + duration, has64bitOffsets, hasVoiceActivity, + height, id, optimizedForStreaming, + part, videoCodec, videoFrameRate, + videoProfile, videoResolution, width, + abr, resourceSession, selected, + additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDecisionMedia.class, + "aspectRatio", aspectRatio, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "audioProfile", audioProfile, + "bitrate", bitrate, + "container", container, + "duration", duration, + "has64bitOffsets", has64bitOffsets, + "hasVoiceActivity", hasVoiceActivity, + "height", height, + "id", id, + "optimizedForStreaming", optimizedForStreaming, + "part", part, + "videoCodec", videoCodec, + "videoFrameRate", videoFrameRate, + "videoProfile", videoProfile, + "videoResolution", videoResolution, + "width", width, + "abr", abr, + "resourceSession", resourceSession, + "selected", selected, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional aspectRatio = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional audioProfile = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional hasVoiceActivity = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional videoFrameRate = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional abr = Optional.empty(); + + private Optional resourceSession = Optional.empty(); + + private Optional selected = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + 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(long 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(Object 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 audioProfile(Object 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; + } + + + public Builder bitrate(long 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 container(Object 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 duration(long 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 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 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 height(long 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 id(long 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 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 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 Builder videoCodec(Object 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 videoFrameRate(Object 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 videoProfile(Object 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 videoResolution(Object 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 width(long 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 abr(boolean abr) { + Utils.checkNotNull(abr, "abr"); + this.abr = Optional.ofNullable(abr); + return this; + } + + public Builder abr(Optional abr) { + Utils.checkNotNull(abr, "abr"); + this.abr = abr; + return this; + } + + + public Builder resourceSession(String resourceSession) { + Utils.checkNotNull(resourceSession, "resourceSession"); + this.resourceSession = Optional.ofNullable(resourceSession); + return this; + } + + public Builder resourceSession(Optional resourceSession) { + Utils.checkNotNull(resourceSession, "resourceSession"); + this.resourceSession = resourceSession; + 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 additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public MediaContainerWithDecisionMedia build() { + + return new MediaContainerWithDecisionMedia( + aspectRatio, audioChannels, audioCodec, + audioProfile, bitrate, container, + duration, has64bitOffsets, hasVoiceActivity, + height, id, optimizedForStreaming, + part, videoCodec, videoFrameRate, + videoProfile, videoResolution, width, + abr, resourceSession, selected) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMediaContainer.java new file mode 100644 index 00000000..1cd465e7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMediaContainer.java @@ -0,0 +1,794 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithDecisionMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithDecisionMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + /** + * The maximum available bitrate when the decision was rendered. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("availableBandwidth") + private Optional availableBandwidth; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directPlayDecisionCode") + private Optional directPlayDecisionCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directPlayDecisionText") + private Optional directPlayDecisionText; + + /** + * The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generalDecisionCode") + private Optional generalDecisionCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generalDecisionText") + private Optional generalDecisionText; + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mdeDecisionCode") + private Optional mdeDecisionCode; + + /** + * Descriptive text for the above code + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mdeDecisionText") + private Optional mdeDecisionText; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcodeDecisionCode") + private Optional transcodeDecisionCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcodeDecisionText") + private Optional transcodeDecisionText; + + @JsonCreator + public MediaContainerWithDecisionMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("availableBandwidth") Optional availableBandwidth, + @JsonProperty("directPlayDecisionCode") Optional directPlayDecisionCode, + @JsonProperty("directPlayDecisionText") Optional directPlayDecisionText, + @JsonProperty("generalDecisionCode") Optional generalDecisionCode, + @JsonProperty("generalDecisionText") Optional generalDecisionText, + @JsonProperty("mdeDecisionCode") Optional mdeDecisionCode, + @JsonProperty("mdeDecisionText") Optional mdeDecisionText, + @JsonProperty("Metadata") Optional> metadata, + @JsonProperty("transcodeDecisionCode") Optional transcodeDecisionCode, + @JsonProperty("transcodeDecisionText") Optional transcodeDecisionText) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + Utils.checkNotNull(metadata, "metadata"); + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.availableBandwidth = availableBandwidth; + this.directPlayDecisionCode = directPlayDecisionCode; + this.directPlayDecisionText = directPlayDecisionText; + this.generalDecisionCode = generalDecisionCode; + this.generalDecisionText = generalDecisionText; + this.mdeDecisionCode = mdeDecisionCode; + this.mdeDecisionText = mdeDecisionText; + this.metadata = metadata; + this.transcodeDecisionCode = transcodeDecisionCode; + this.transcodeDecisionText = transcodeDecisionText; + } + + public MediaContainerWithDecisionMediaContainer() { + 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()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + /** + * The maximum available bitrate when the decision was rendered. + */ + @JsonIgnore + public Optional availableBandwidth() { + return availableBandwidth; + } + + @JsonIgnore + public Optional directPlayDecisionCode() { + return directPlayDecisionCode; + } + + @JsonIgnore + public Optional directPlayDecisionText() { + return directPlayDecisionText; + } + + /** + * The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all. + */ + @JsonIgnore + public Optional generalDecisionCode() { + return generalDecisionCode; + } + + @JsonIgnore + public Optional generalDecisionText() { + return generalDecisionText; + } + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + @JsonIgnore + public Optional mdeDecisionCode() { + return mdeDecisionCode; + } + + /** + * Descriptive text for the above code + */ + @JsonIgnore + public Optional mdeDecisionText() { + return mdeDecisionText; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadata() { + return (Optional>) metadata; + } + + @JsonIgnore + public Optional transcodeDecisionCode() { + return transcodeDecisionCode; + } + + @JsonIgnore + public Optional transcodeDecisionText() { + return transcodeDecisionText; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithDecisionMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithDecisionMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithDecisionMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithDecisionMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithDecisionMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithDecisionMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithDecisionMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithDecisionMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + /** + * The maximum available bitrate when the decision was rendered. + */ + public MediaContainerWithDecisionMediaContainer withAvailableBandwidth(long availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = Optional.ofNullable(availableBandwidth); + return this; + } + + + /** + * The maximum available bitrate when the decision was rendered. + */ + public MediaContainerWithDecisionMediaContainer withAvailableBandwidth(Optional availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = availableBandwidth; + return this; + } + + public MediaContainerWithDecisionMediaContainer withDirectPlayDecisionCode(long directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = Optional.ofNullable(directPlayDecisionCode); + return this; + } + + + public MediaContainerWithDecisionMediaContainer withDirectPlayDecisionCode(Optional directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = directPlayDecisionCode; + return this; + } + + public MediaContainerWithDecisionMediaContainer withDirectPlayDecisionText(String directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = Optional.ofNullable(directPlayDecisionText); + return this; + } + + + public MediaContainerWithDecisionMediaContainer withDirectPlayDecisionText(Optional directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = directPlayDecisionText; + return this; + } + + /** + * The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all. + */ + public MediaContainerWithDecisionMediaContainer withGeneralDecisionCode(long generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = Optional.ofNullable(generalDecisionCode); + return this; + } + + + /** + * The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all. + */ + public MediaContainerWithDecisionMediaContainer withGeneralDecisionCode(Optional generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = generalDecisionCode; + return this; + } + + public MediaContainerWithDecisionMediaContainer withGeneralDecisionText(String generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = Optional.ofNullable(generalDecisionText); + return this; + } + + + public MediaContainerWithDecisionMediaContainer withGeneralDecisionText(Optional generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = generalDecisionText; + return this; + } + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public MediaContainerWithDecisionMediaContainer withMdeDecisionCode(long mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = Optional.ofNullable(mdeDecisionCode); + return this; + } + + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public MediaContainerWithDecisionMediaContainer withMdeDecisionCode(Optional mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = mdeDecisionCode; + return this; + } + + /** + * Descriptive text for the above code + */ + public MediaContainerWithDecisionMediaContainer withMdeDecisionText(String mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = Optional.ofNullable(mdeDecisionText); + return this; + } + + + /** + * Descriptive text for the above code + */ + public MediaContainerWithDecisionMediaContainer withMdeDecisionText(Optional mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = mdeDecisionText; + return this; + } + + public MediaContainerWithDecisionMediaContainer withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + + public MediaContainerWithDecisionMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public MediaContainerWithDecisionMediaContainer withTranscodeDecisionCode(long transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = Optional.ofNullable(transcodeDecisionCode); + return this; + } + + + public MediaContainerWithDecisionMediaContainer withTranscodeDecisionCode(Optional transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = transcodeDecisionCode; + return this; + } + + public MediaContainerWithDecisionMediaContainer withTranscodeDecisionText(String transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = Optional.ofNullable(transcodeDecisionText); + return this; + } + + + public MediaContainerWithDecisionMediaContainer withTranscodeDecisionText(Optional transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = transcodeDecisionText; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithDecisionMediaContainer other = (MediaContainerWithDecisionMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.availableBandwidth, other.availableBandwidth) && + Utils.enhancedDeepEquals(this.directPlayDecisionCode, other.directPlayDecisionCode) && + Utils.enhancedDeepEquals(this.directPlayDecisionText, other.directPlayDecisionText) && + Utils.enhancedDeepEquals(this.generalDecisionCode, other.generalDecisionCode) && + Utils.enhancedDeepEquals(this.generalDecisionText, other.generalDecisionText) && + Utils.enhancedDeepEquals(this.mdeDecisionCode, other.mdeDecisionCode) && + Utils.enhancedDeepEquals(this.mdeDecisionText, other.mdeDecisionText) && + Utils.enhancedDeepEquals(this.metadata, other.metadata) && + Utils.enhancedDeepEquals(this.transcodeDecisionCode, other.transcodeDecisionCode) && + Utils.enhancedDeepEquals(this.transcodeDecisionText, other.transcodeDecisionText); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, availableBandwidth, directPlayDecisionCode, + directPlayDecisionText, generalDecisionCode, generalDecisionText, + mdeDecisionCode, mdeDecisionText, metadata, + transcodeDecisionCode, transcodeDecisionText); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDecisionMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "availableBandwidth", availableBandwidth, + "directPlayDecisionCode", directPlayDecisionCode, + "directPlayDecisionText", directPlayDecisionText, + "generalDecisionCode", generalDecisionCode, + "generalDecisionText", generalDecisionText, + "mdeDecisionCode", mdeDecisionCode, + "mdeDecisionText", mdeDecisionText, + "metadata", metadata, + "transcodeDecisionCode", transcodeDecisionCode, + "transcodeDecisionText", transcodeDecisionText); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional availableBandwidth = Optional.empty(); + + private Optional directPlayDecisionCode = Optional.empty(); + + private Optional directPlayDecisionText = Optional.empty(); + + private Optional generalDecisionCode = Optional.empty(); + + private Optional generalDecisionText = Optional.empty(); + + private Optional mdeDecisionCode = Optional.empty(); + + private Optional mdeDecisionText = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Optional transcodeDecisionCode = Optional.empty(); + + private Optional transcodeDecisionText = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + /** + * The maximum available bitrate when the decision was rendered. + */ + public Builder availableBandwidth(long availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = Optional.ofNullable(availableBandwidth); + return this; + } + + /** + * The maximum available bitrate when the decision was rendered. + */ + public Builder availableBandwidth(Optional availableBandwidth) { + Utils.checkNotNull(availableBandwidth, "availableBandwidth"); + this.availableBandwidth = availableBandwidth; + return this; + } + + + public Builder directPlayDecisionCode(long directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = Optional.ofNullable(directPlayDecisionCode); + return this; + } + + public Builder directPlayDecisionCode(Optional directPlayDecisionCode) { + Utils.checkNotNull(directPlayDecisionCode, "directPlayDecisionCode"); + this.directPlayDecisionCode = directPlayDecisionCode; + return this; + } + + + public Builder directPlayDecisionText(String directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = Optional.ofNullable(directPlayDecisionText); + return this; + } + + public Builder directPlayDecisionText(Optional directPlayDecisionText) { + Utils.checkNotNull(directPlayDecisionText, "directPlayDecisionText"); + this.directPlayDecisionText = directPlayDecisionText; + return this; + } + + + /** + * The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all. + */ + public Builder generalDecisionCode(long generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = Optional.ofNullable(generalDecisionCode); + return this; + } + + /** + * The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all. + */ + public Builder generalDecisionCode(Optional generalDecisionCode) { + Utils.checkNotNull(generalDecisionCode, "generalDecisionCode"); + this.generalDecisionCode = generalDecisionCode; + return this; + } + + + public Builder generalDecisionText(String generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = Optional.ofNullable(generalDecisionText); + return this; + } + + public Builder generalDecisionText(Optional generalDecisionText) { + Utils.checkNotNull(generalDecisionText, "generalDecisionText"); + this.generalDecisionText = generalDecisionText; + return this; + } + + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public Builder mdeDecisionCode(long mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = Optional.ofNullable(mdeDecisionCode); + return this; + } + + /** + * The code indicating the status of evaluation of playback when client indicates `hasMDE=1` + */ + public Builder mdeDecisionCode(Optional mdeDecisionCode) { + Utils.checkNotNull(mdeDecisionCode, "mdeDecisionCode"); + this.mdeDecisionCode = mdeDecisionCode; + return this; + } + + + /** + * Descriptive text for the above code + */ + public Builder mdeDecisionText(String mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = Optional.ofNullable(mdeDecisionText); + return this; + } + + /** + * Descriptive text for the above code + */ + public Builder mdeDecisionText(Optional mdeDecisionText) { + Utils.checkNotNull(mdeDecisionText, "mdeDecisionText"); + this.mdeDecisionText = mdeDecisionText; + 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 Builder transcodeDecisionCode(long transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = Optional.ofNullable(transcodeDecisionCode); + return this; + } + + public Builder transcodeDecisionCode(Optional transcodeDecisionCode) { + Utils.checkNotNull(transcodeDecisionCode, "transcodeDecisionCode"); + this.transcodeDecisionCode = transcodeDecisionCode; + return this; + } + + + public Builder transcodeDecisionText(String transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = Optional.ofNullable(transcodeDecisionText); + return this; + } + + public Builder transcodeDecisionText(Optional transcodeDecisionText) { + Utils.checkNotNull(transcodeDecisionText, "transcodeDecisionText"); + this.transcodeDecisionText = transcodeDecisionText; + return this; + } + + public MediaContainerWithDecisionMediaContainer build() { + + return new MediaContainerWithDecisionMediaContainer( + identifier, offset, size, + totalSize, availableBandwidth, directPlayDecisionCode, + directPlayDecisionText, generalDecisionCode, generalDecisionText, + mdeDecisionCode, mdeDecisionText, metadata, + transcodeDecisionCode, transcodeDecisionText); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMetadata.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMetadata.java new file mode 100644 index 00000000..8522c4e8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionMetadata.java @@ -0,0 +1,4080 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * MediaContainerWithDecisionMetadata + * + *

Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ +public class MediaContainerWithDecisionMetadata { + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("absoluteIndex") + private Optional absoluteIndex; + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + /** + * When present, the URL for the background artwork for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Autotag") + private Optional> autotag; + + /** + * When present, the URL for a banner graphic for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("banner") + private Optional banner; + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Filter") + private Optional> filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + /** + * The `art` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + /** + * The `hero` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentHero") + private Optional grandparentHero; + + /** + * The `key` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + /** + * The `ratingKey` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + /** + * The `theme` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTheme") + private Optional grandparentTheme; + + /** + * The `thumb` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + /** + * The `title` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guid; + + /** + * When present, the URL for a hero image for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hero") + private Optional hero; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Image") + private Optional> image; + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originalTitle") + private Optional originalTitle; + + /** + * The `hero` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentHero") + private Optional parentHero; + + /** + * The `index` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + /** + * The `key` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + /** + * The `ratingKey` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + /** + * The `thumb` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + /** + * The `title` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("prompt") + private Optional prompt; + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Rating") + private Optional> ratingArray; + + /** + * Number of ratings under this metadata + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingCount") + private Optional ratingCount; + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + /** + * Indicates this is a search directory + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("search") + private Optional search; + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secondary") + private Optional secondary; + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipChildren") + private Optional skipChildren; + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipParent") + private Optional skipParent; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Sort") + private Optional> sort; + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtype") + private Optional subtype; + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("theme") + private Optional theme; + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userRating") + private Optional userRating; + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public MediaContainerWithDecisionMetadata( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("absoluteIndex") Optional absoluteIndex, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("art") Optional art, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("Autotag") Optional> autotag, + @JsonProperty("banner") Optional banner, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("composite") Optional composite, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("Country") Optional> country, + @JsonProperty("Director") Optional> director, + @JsonProperty("duration") Optional duration, + @JsonProperty("Filter") Optional> filter, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("grandparentHero") Optional grandparentHero, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("Guid") Optional> guid, + @JsonProperty("hero") Optional hero, + @JsonProperty("Image") Optional> image, + @JsonProperty("index") Optional index, + @JsonProperty("key") Optional key, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("Media") Optional> media, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("parentHero") Optional parentHero, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("prompt") Optional prompt, + @JsonProperty("rating") Optional rating, + @JsonProperty("Rating") Optional> ratingArray, + @JsonProperty("ratingCount") Optional ratingCount, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("Role") Optional> role, + @JsonProperty("search") Optional search, + @JsonProperty("secondary") Optional secondary, + @JsonProperty("skipChildren") Optional skipChildren, + @JsonProperty("skipParent") Optional skipParent, + @JsonProperty("Sort") Optional> sort, + @JsonProperty("studio") Optional studio, + @JsonProperty("subtype") Optional subtype, + @JsonProperty("summary") Optional summary, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("theme") Optional theme, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("userRating") Optional userRating, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("year") Optional year) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(autotag, "autotag"); + Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(grandparentHero, "grandparentHero"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(hero, "hero"); + Utils.checkNotNull(image, "image"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(parentHero, "parentHero"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(prompt, "prompt"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(ratingArray, "ratingArray"); + Utils.checkNotNull(ratingCount, "ratingCount"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(search, "search"); + Utils.checkNotNull(secondary, "secondary"); + Utils.checkNotNull(skipChildren, "skipChildren"); + Utils.checkNotNull(skipParent, "skipParent"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(subtype, "subtype"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(userRating, "userRating"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(year, "year"); + this.title = title; + this.type = type; + this.absoluteIndex = absoluteIndex; + this.addedAt = addedAt; + this.art = art; + this.audienceRating = audienceRating; + this.audienceRatingImage = audienceRatingImage; + this.autotag = autotag; + this.banner = banner; + this.chapterSource = chapterSource; + this.composite = composite; + this.contentRating = contentRating; + this.country = country; + this.director = director; + this.duration = duration; + this.filter = filter; + this.genre = genre; + this.grandparentArt = grandparentArt; + this.grandparentHero = grandparentHero; + this.grandparentKey = grandparentKey; + this.grandparentRatingKey = grandparentRatingKey; + this.grandparentTheme = grandparentTheme; + this.grandparentThumb = grandparentThumb; + this.grandparentTitle = grandparentTitle; + this.guid = guid; + this.hero = hero; + this.image = image; + this.index = index; + this.key = key; + this.lastViewedAt = lastViewedAt; + this.leafCount = leafCount; + this.media = media; + this.originallyAvailableAt = originallyAvailableAt; + this.originalTitle = originalTitle; + this.parentHero = parentHero; + this.parentIndex = parentIndex; + this.parentKey = parentKey; + this.parentRatingKey = parentRatingKey; + this.parentThumb = parentThumb; + this.parentTitle = parentTitle; + this.primaryExtraKey = primaryExtraKey; + this.prompt = prompt; + this.rating = rating; + this.ratingArray = ratingArray; + this.ratingCount = ratingCount; + this.ratingImage = ratingImage; + this.ratingKey = ratingKey; + this.role = role; + this.search = search; + this.secondary = secondary; + this.skipChildren = skipChildren; + this.skipParent = skipParent; + this.sort = sort; + this.studio = studio; + this.subtype = subtype; + this.summary = summary; + this.tagline = tagline; + this.theme = theme; + this.thumb = thumb; + this.titleSort = titleSort; + this.updatedAt = updatedAt; + this.userRating = userRating; + this.viewCount = viewCount; + this.viewedLeafCount = viewedLeafCount; + this.viewOffset = viewOffset; + this.writer = writer; + this.year = year; + this.additionalProperties = new HashMap<>(); + } + + public MediaContainerWithDecisionMetadata() { + 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(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), 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 title of the item (e.g. “300” or “The Simpsons”) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional title() { + return (Optional) title; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonIgnore + public Optional absoluteIndex() { + return absoluteIndex; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonIgnore + public Optional addedAt() { + return addedAt; + } + + /** + * When present, the URL for the background artwork for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional art() { + return (Optional) art; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonIgnore + public Optional audienceRating() { + return audienceRating; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audienceRatingImage() { + return (Optional) audienceRatingImage; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> autotag() { + return (Optional>) autotag; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional banner() { + return (Optional) banner; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chapterSource() { + return (Optional) chapterSource; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional composite() { + return (Optional) composite; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional contentRating() { + return (Optional) contentRating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> director() { + return (Optional>) director; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonIgnore + public Optional duration() { + return duration; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> filter() { + return (Optional>) filter; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> genre() { + return (Optional>) genre; + } + + /** + * The `art` of the grandparent + */ + @JsonIgnore + public Optional grandparentArt() { + return grandparentArt; + } + + /** + * The `hero` of the grandparent + */ + @JsonIgnore + public Optional grandparentHero() { + return grandparentHero; + } + + /** + * The `key` of the grandparent + */ + @JsonIgnore + public Optional grandparentKey() { + return grandparentKey; + } + + /** + * The `ratingKey` of the grandparent + */ + @JsonIgnore + public Optional grandparentRatingKey() { + return grandparentRatingKey; + } + + /** + * The `theme` of the grandparent + */ + @JsonIgnore + public Optional grandparentTheme() { + return grandparentTheme; + } + + /** + * The `thumb` of the grandparent + */ + @JsonIgnore + public Optional grandparentThumb() { + return grandparentThumb; + } + + /** + * The `title` of the grandparent + */ + @JsonIgnore + public Optional grandparentTitle() { + return grandparentTitle; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> guid() { + return (Optional>) guid; + } + + /** + * When present, the URL for a hero image for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hero() { + return (Optional) hero; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> image() { + return (Optional>) image; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonIgnore + public Optional index() { + return index; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonIgnore + public Optional lastViewedAt() { + return lastViewedAt; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonIgnore + public Optional leafCount() { + return leafCount; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> media() { + return (Optional>) media; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originallyAvailableAt() { + return (Optional) originallyAvailableAt; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originalTitle() { + return (Optional) originalTitle; + } + + /** + * The `hero` of the parent + */ + @JsonIgnore + public Optional parentHero() { + return parentHero; + } + + /** + * The `index` of the parent + */ + @JsonIgnore + public Optional parentIndex() { + return parentIndex; + } + + /** + * The `key` of the parent + */ + @JsonIgnore + public Optional parentKey() { + return parentKey; + } + + /** + * The `ratingKey` of the parent + */ + @JsonIgnore + public Optional parentRatingKey() { + return parentRatingKey; + } + + /** + * The `thumb` of the parent + */ + @JsonIgnore + public Optional parentThumb() { + return parentThumb; + } + + /** + * The `title` of the parent + */ + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional primaryExtraKey() { + return (Optional) primaryExtraKey; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonIgnore + public Optional prompt() { + return prompt; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonIgnore + public Optional rating() { + return rating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> ratingArray() { + return (Optional>) ratingArray; + } + + /** + * Number of ratings under this metadata + */ + @JsonIgnore + public Optional ratingCount() { + return ratingCount; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingImage() { + return (Optional) ratingImage; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingKey() { + return (Optional) ratingKey; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> role() { + return (Optional>) role; + } + + /** + * Indicates this is a search directory + */ + @JsonIgnore + public Optional search() { + return search; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonIgnore + public Optional secondary() { + return secondary; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonIgnore + public Optional skipChildren() { + return skipChildren; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonIgnore + public Optional skipParent() { + return skipParent; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> sort() { + return (Optional>) sort; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional studio() { + return (Optional) studio; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtype() { + return (Optional) subtype; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional summary() { + return (Optional) summary; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional tagline() { + return (Optional) tagline; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional theme() { + return (Optional) theme; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional thumb() { + return (Optional) thumb; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional titleSort() { + return (Optional) titleSort; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonIgnore + public Optional userRating() { + return userRating; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonIgnore + public Optional viewCount() { + return viewCount; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonIgnore + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonIgnore + public Optional viewOffset() { + return viewOffset; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> writer() { + return (Optional>) writer; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonIgnore + public Optional year() { + return year; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public MediaContainerWithDecisionMetadata withTitle(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public MediaContainerWithDecisionMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public MediaContainerWithDecisionMetadata withType(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public MediaContainerWithDecisionMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public MediaContainerWithDecisionMetadata withAbsoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public MediaContainerWithDecisionMetadata withAbsoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public MediaContainerWithDecisionMetadata withAddedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public MediaContainerWithDecisionMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public MediaContainerWithDecisionMetadata withArt(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public MediaContainerWithDecisionMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public MediaContainerWithDecisionMetadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public MediaContainerWithDecisionMetadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public MediaContainerWithDecisionMetadata withAudienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public MediaContainerWithDecisionMetadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public MediaContainerWithDecisionMetadata withAutotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + + public MediaContainerWithDecisionMetadata withAutotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public MediaContainerWithDecisionMetadata withBanner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public MediaContainerWithDecisionMetadata withBanner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public MediaContainerWithDecisionMetadata withChapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public MediaContainerWithDecisionMetadata withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public MediaContainerWithDecisionMetadata withComposite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public MediaContainerWithDecisionMetadata withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public MediaContainerWithDecisionMetadata withContentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public MediaContainerWithDecisionMetadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public MediaContainerWithDecisionMetadata withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + + public MediaContainerWithDecisionMetadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public MediaContainerWithDecisionMetadata withDirector(List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + + public MediaContainerWithDecisionMetadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public MediaContainerWithDecisionMetadata withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public MediaContainerWithDecisionMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public MediaContainerWithDecisionMetadata withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public MediaContainerWithDecisionMetadata withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public MediaContainerWithDecisionMetadata withGenre(List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + + public MediaContainerWithDecisionMetadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + /** + * The `art` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + + /** + * The `art` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The `hero` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + + /** + * The `hero` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + /** + * The `key` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + + /** + * The `key` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + /** + * The `theme` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + + /** + * The `theme` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + /** + * The `thumb` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The `title` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + + /** + * The `title` of the grandparent + */ + public MediaContainerWithDecisionMetadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public MediaContainerWithDecisionMetadata withGuid(List guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + + public MediaContainerWithDecisionMetadata withGuid(Optional> guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public MediaContainerWithDecisionMetadata withHero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public MediaContainerWithDecisionMetadata withHero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + return this; + } + + public MediaContainerWithDecisionMetadata withImage(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + + public MediaContainerWithDecisionMetadata withImage(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public MediaContainerWithDecisionMetadata withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public MediaContainerWithDecisionMetadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public MediaContainerWithDecisionMetadata withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public MediaContainerWithDecisionMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public MediaContainerWithDecisionMetadata withLastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public MediaContainerWithDecisionMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public MediaContainerWithDecisionMetadata withLeafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public MediaContainerWithDecisionMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public MediaContainerWithDecisionMetadata withMedia(List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + + public MediaContainerWithDecisionMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public MediaContainerWithDecisionMetadata withOriginallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public MediaContainerWithDecisionMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public MediaContainerWithDecisionMetadata withOriginalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public MediaContainerWithDecisionMetadata withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + /** + * The `hero` of the parent + */ + public MediaContainerWithDecisionMetadata withParentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + + /** + * The `hero` of the parent + */ + public MediaContainerWithDecisionMetadata withParentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + /** + * The `index` of the parent + */ + public MediaContainerWithDecisionMetadata withParentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + + /** + * The `index` of the parent + */ + public MediaContainerWithDecisionMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The `key` of the parent + */ + public MediaContainerWithDecisionMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + + /** + * The `key` of the parent + */ + public MediaContainerWithDecisionMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The `ratingKey` of the parent + */ + public MediaContainerWithDecisionMetadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public MediaContainerWithDecisionMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The `thumb` of the parent + */ + public MediaContainerWithDecisionMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + + /** + * The `thumb` of the parent + */ + public MediaContainerWithDecisionMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The `title` of the parent + */ + public MediaContainerWithDecisionMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + + /** + * The `title` of the parent + */ + public MediaContainerWithDecisionMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public MediaContainerWithDecisionMetadata withPrimaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public MediaContainerWithDecisionMetadata withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public MediaContainerWithDecisionMetadata withPrompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public MediaContainerWithDecisionMetadata withPrompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public MediaContainerWithDecisionMetadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public MediaContainerWithDecisionMetadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public MediaContainerWithDecisionMetadata withRatingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + + public MediaContainerWithDecisionMetadata withRatingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + /** + * Number of ratings under this metadata + */ + public MediaContainerWithDecisionMetadata withRatingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + + /** + * Number of ratings under this metadata + */ + public MediaContainerWithDecisionMetadata withRatingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public MediaContainerWithDecisionMetadata withRatingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public MediaContainerWithDecisionMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public MediaContainerWithDecisionMetadata withRatingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public MediaContainerWithDecisionMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public MediaContainerWithDecisionMetadata withRole(List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + + public MediaContainerWithDecisionMetadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * Indicates this is a search directory + */ + public MediaContainerWithDecisionMetadata withSearch(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + + /** + * Indicates this is a search directory + */ + public MediaContainerWithDecisionMetadata withSearch(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public MediaContainerWithDecisionMetadata withSecondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public MediaContainerWithDecisionMetadata withSecondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public MediaContainerWithDecisionMetadata withSkipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public MediaContainerWithDecisionMetadata withSkipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public MediaContainerWithDecisionMetadata withSkipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public MediaContainerWithDecisionMetadata withSkipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public MediaContainerWithDecisionMetadata withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public MediaContainerWithDecisionMetadata withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public MediaContainerWithDecisionMetadata withStudio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public MediaContainerWithDecisionMetadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public MediaContainerWithDecisionMetadata withSubtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public MediaContainerWithDecisionMetadata withSubtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public MediaContainerWithDecisionMetadata withSummary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public MediaContainerWithDecisionMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public MediaContainerWithDecisionMetadata withTagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public MediaContainerWithDecisionMetadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public MediaContainerWithDecisionMetadata withTheme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public MediaContainerWithDecisionMetadata withTheme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public MediaContainerWithDecisionMetadata withThumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public MediaContainerWithDecisionMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public MediaContainerWithDecisionMetadata withTitleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public MediaContainerWithDecisionMetadata withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public MediaContainerWithDecisionMetadata withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public MediaContainerWithDecisionMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public MediaContainerWithDecisionMetadata withUserRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public MediaContainerWithDecisionMetadata withUserRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public MediaContainerWithDecisionMetadata withViewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public MediaContainerWithDecisionMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public MediaContainerWithDecisionMetadata withViewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public MediaContainerWithDecisionMetadata withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public MediaContainerWithDecisionMetadata withViewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public MediaContainerWithDecisionMetadata withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public MediaContainerWithDecisionMetadata withWriter(List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + + public MediaContainerWithDecisionMetadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public MediaContainerWithDecisionMetadata withYear(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public MediaContainerWithDecisionMetadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + @JsonAnySetter + public MediaContainerWithDecisionMetadata withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public MediaContainerWithDecisionMetadata withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithDecisionMetadata other = (MediaContainerWithDecisionMetadata) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.absoluteIndex, other.absoluteIndex) && + Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && + Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && + Utils.enhancedDeepEquals(this.autotag, other.autotag) && + Utils.enhancedDeepEquals(this.banner, other.banner) && + Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && + Utils.enhancedDeepEquals(this.composite, other.composite) && + Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && + Utils.enhancedDeepEquals(this.country, other.country) && + Utils.enhancedDeepEquals(this.director, other.director) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.genre, other.genre) && + Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && + Utils.enhancedDeepEquals(this.grandparentHero, other.grandparentHero) && + Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && + Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && + Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && + Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && + Utils.enhancedDeepEquals(this.guid, other.guid) && + Utils.enhancedDeepEquals(this.hero, other.hero) && + Utils.enhancedDeepEquals(this.image, other.image) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && + Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && + Utils.enhancedDeepEquals(this.media, other.media) && + Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && + Utils.enhancedDeepEquals(this.parentHero, other.parentHero) && + Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && + Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && + Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && + Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && + Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && + Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && + Utils.enhancedDeepEquals(this.prompt, other.prompt) && + Utils.enhancedDeepEquals(this.rating, other.rating) && + Utils.enhancedDeepEquals(this.ratingArray, other.ratingArray) && + Utils.enhancedDeepEquals(this.ratingCount, other.ratingCount) && + Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.role, other.role) && + Utils.enhancedDeepEquals(this.search, other.search) && + Utils.enhancedDeepEquals(this.secondary, other.secondary) && + Utils.enhancedDeepEquals(this.skipChildren, other.skipChildren) && + Utils.enhancedDeepEquals(this.skipParent, other.skipParent) && + Utils.enhancedDeepEquals(this.sort, other.sort) && + Utils.enhancedDeepEquals(this.studio, other.studio) && + Utils.enhancedDeepEquals(this.subtype, other.subtype) && + Utils.enhancedDeepEquals(this.summary, other.summary) && + Utils.enhancedDeepEquals(this.tagline, other.tagline) && + Utils.enhancedDeepEquals(this.theme, other.theme) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.userRating, other.userRating) && + Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && + Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && + Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && + Utils.enhancedDeepEquals(this.writer, other.writer) && + Utils.enhancedDeepEquals(this.year, other.year) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDecisionMetadata.class, + "title", title, + "type", type, + "absoluteIndex", absoluteIndex, + "addedAt", addedAt, + "art", art, + "audienceRating", audienceRating, + "audienceRatingImage", audienceRatingImage, + "autotag", autotag, + "banner", banner, + "chapterSource", chapterSource, + "composite", composite, + "contentRating", contentRating, + "country", country, + "director", director, + "duration", duration, + "filter", filter, + "genre", genre, + "grandparentArt", grandparentArt, + "grandparentHero", grandparentHero, + "grandparentKey", grandparentKey, + "grandparentRatingKey", grandparentRatingKey, + "grandparentTheme", grandparentTheme, + "grandparentThumb", grandparentThumb, + "grandparentTitle", grandparentTitle, + "guid", guid, + "hero", hero, + "image", image, + "index", index, + "key", key, + "lastViewedAt", lastViewedAt, + "leafCount", leafCount, + "media", media, + "originallyAvailableAt", originallyAvailableAt, + "originalTitle", originalTitle, + "parentHero", parentHero, + "parentIndex", parentIndex, + "parentKey", parentKey, + "parentRatingKey", parentRatingKey, + "parentThumb", parentThumb, + "parentTitle", parentTitle, + "primaryExtraKey", primaryExtraKey, + "prompt", prompt, + "rating", rating, + "ratingArray", ratingArray, + "ratingCount", ratingCount, + "ratingImage", ratingImage, + "ratingKey", ratingKey, + "role", role, + "search", search, + "secondary", secondary, + "skipChildren", skipChildren, + "skipParent", skipParent, + "sort", sort, + "studio", studio, + "subtype", subtype, + "summary", summary, + "tagline", tagline, + "theme", theme, + "thumb", thumb, + "titleSort", titleSort, + "updatedAt", updatedAt, + "userRating", userRating, + "viewCount", viewCount, + "viewedLeafCount", viewedLeafCount, + "viewOffset", viewOffset, + "writer", writer, + "year", year, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional absoluteIndex = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional> autotag = Optional.empty(); + + private Optional banner = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional> filter = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentHero = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional grandparentRatingKey = Optional.empty(); + + private Optional grandparentTheme = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional> guid = Optional.empty(); + + private Optional hero = Optional.empty(); + + private Optional> image = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional originalTitle = Optional.empty(); + + private Optional parentHero = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional prompt = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional> ratingArray = Optional.empty(); + + private Optional ratingCount = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Optional search = Optional.empty(); + + private Optional secondary = Optional.empty(); + + private Optional skipChildren = Optional.empty(); + + private Optional skipParent = Optional.empty(); + + private Optional> sort = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional subtype = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional theme = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional userRating = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional viewedLeafCount = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional year = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + + public Builder autotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + public Builder autotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + 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); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + 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; + } + + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + + public Builder guid(List 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; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + 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; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + 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; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + + /** + * The `hero` of the parent + */ + public Builder parentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + /** + * The `hero` of the parent + */ + public Builder parentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + + /** + * The `index` of the parent + */ + public Builder parentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The `index` of the parent + */ + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + + /** + * The `key` of the parent + */ + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The `key` of the parent + */ + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + + /** + * The `title` of the parent + */ + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The `title` of the parent + */ + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + + public Builder ratingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + public Builder ratingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + 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; + } + + + /** + * Indicates this is a search directory + */ + public Builder search(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + /** + * Indicates this is a search directory + */ + public Builder search(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + 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; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public MediaContainerWithDecisionMetadata build() { + + return new MediaContainerWithDecisionMetadata( + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionPart.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionPart.java new file mode 100644 index 00000000..54a0c179 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionPart.java @@ -0,0 +1,788 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * MediaContainerWithDecisionPart + * + *

`Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part. + */ +public class MediaContainerWithDecisionPart { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + /** + * The duration of the media item, in milliseconds + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + /** + * The local file path at which the part is stored on the server + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The key from which the media can be streamed + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + /** + * The size of the media, in bytes + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Stream") + private Optional> stream; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("decision") + private Optional decision; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("selected") + private Optional selected; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public MediaContainerWithDecisionPart( + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("container") Optional container, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("size") Optional size, + @JsonProperty("Stream") Optional> stream, + @JsonProperty("videoProfile") Optional videoProfile, + @JsonProperty("decision") Optional decision, + @JsonProperty("selected") Optional selected) { + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(stream, "stream"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(decision, "decision"); + Utils.checkNotNull(selected, "selected"); + this.audioProfile = audioProfile; + this.container = container; + this.duration = duration; + this.file = file; + this.has64bitOffsets = has64bitOffsets; + this.id = id; + this.key = key; + this.optimizedForStreaming = optimizedForStreaming; + this.size = size; + this.stream = stream; + this.videoProfile = videoProfile; + this.decision = decision; + this.selected = selected; + this.additionalProperties = new HashMap<>(); + } + + public MediaContainerWithDecisionPart() { + 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()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audioProfile() { + return (Optional) audioProfile; + } + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional container() { + return (Optional) container; + } + + /** + * The duration of the media item, in milliseconds + */ + @JsonIgnore + public Optional duration() { + return duration; + } + + /** + * The local file path at which the part is stored on the server + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional file() { + return (Optional) file; + } + + @JsonIgnore + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The key from which the media can be streamed + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + @JsonIgnore + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + /** + * The size of the media, in bytes + */ + @JsonIgnore + public Optional size() { + return size; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> stream() { + return (Optional>) stream; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional videoProfile() { + return (Optional) videoProfile; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional decision() { + return (Optional) decision; + } + + @JsonIgnore + public Optional selected() { + return selected; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithDecisionPart withAudioProfile(Object audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + + public MediaContainerWithDecisionPart withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + public MediaContainerWithDecisionPart withContainer(Object container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + public MediaContainerWithDecisionPart withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + /** + * The duration of the media item, in milliseconds + */ + public MediaContainerWithDecisionPart withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + /** + * The duration of the media item, in milliseconds + */ + public MediaContainerWithDecisionPart withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * The local file path at which the part is stored on the server + */ + public MediaContainerWithDecisionPart withFile(Object file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + + /** + * The local file path at which the part is stored on the server + */ + public MediaContainerWithDecisionPart withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public MediaContainerWithDecisionPart withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + + public MediaContainerWithDecisionPart withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public MediaContainerWithDecisionPart withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public MediaContainerWithDecisionPart withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The key from which the media can be streamed + */ + public MediaContainerWithDecisionPart withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key from which the media can be streamed + */ + public MediaContainerWithDecisionPart withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public MediaContainerWithDecisionPart withOptimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + + public MediaContainerWithDecisionPart withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + /** + * The size of the media, in bytes + */ + public MediaContainerWithDecisionPart withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + /** + * The size of the media, in bytes + */ + public MediaContainerWithDecisionPart withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public MediaContainerWithDecisionPart withStream(List stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = Optional.ofNullable(stream); + return this; + } + + + public MediaContainerWithDecisionPart withStream(Optional> stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = stream; + return this; + } + + public MediaContainerWithDecisionPart withVideoProfile(Object videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + + public MediaContainerWithDecisionPart withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public MediaContainerWithDecisionPart withDecision(Decision decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = Optional.ofNullable(decision); + return this; + } + + + public MediaContainerWithDecisionPart withDecision(Optional decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = decision; + return this; + } + + public MediaContainerWithDecisionPart withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + + public MediaContainerWithDecisionPart withSelected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + @JsonAnySetter + public MediaContainerWithDecisionPart withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public MediaContainerWithDecisionPart withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithDecisionPart other = (MediaContainerWithDecisionPart) o; + return + Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && + Utils.enhancedDeepEquals(this.container, other.container) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.file, other.file) && + Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.stream, other.stream) && + Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && + Utils.enhancedDeepEquals(this.decision, other.decision) && + Utils.enhancedDeepEquals(this.selected, other.selected) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + audioProfile, container, duration, + file, has64bitOffsets, id, + key, optimizedForStreaming, size, + stream, videoProfile, decision, + selected, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDecisionPart.class, + "audioProfile", audioProfile, + "container", container, + "duration", duration, + "file", file, + "has64bitOffsets", has64bitOffsets, + "id", id, + "key", key, + "optimizedForStreaming", optimizedForStreaming, + "size", size, + "stream", stream, + "videoProfile", videoProfile, + "decision", decision, + "selected", selected, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional audioProfile = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional> stream = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional decision = Optional.empty(); + + private Optional selected = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + public Builder audioProfile(Object 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; + } + + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + public Builder container(Object container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + + /** + * The duration of the media item, in milliseconds + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * The duration of the media item, in milliseconds + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + + /** + * The local file path at which the part is stored on the server + */ + public Builder file(Object file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + /** + * The local file path at which the part is stored on the server + */ + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + 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 id(long 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; + } + + + /** + * The key from which the media can be streamed + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key from which the media can be streamed + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + 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; + } + + + /** + * The size of the media, in bytes + */ + public Builder size(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * The size of the media, in bytes + */ + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + 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 Builder videoProfile(Object 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 decision(Decision decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = Optional.ofNullable(decision); + return this; + } + + public Builder decision(Optional decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = decision; + 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 additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public MediaContainerWithDecisionPart build() { + + return new MediaContainerWithDecisionPart( + audioProfile, container, duration, + file, has64bitOffsets, id, + key, optimizedForStreaming, size, + stream, videoProfile, decision, + selected) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionStream.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionStream.java new file mode 100644 index 00000000..b6720794 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDecisionStream.java @@ -0,0 +1,1623 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +/** + * MediaContainerWithDecisionStream + * + *

`Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream. Note that photos do not have streams (mostly as an optimization). + */ +public class MediaContainerWithDecisionStream { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default") + private Optional default_; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannelLayout") + private Optional audioChannelLayout; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitDepth") + private Optional bitDepth; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("canAutoSync") + private Optional canAutoSync; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chromaLocation") + private Optional chromaLocation; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chromaSubsampling") + private Optional chromaSubsampling; + + /** + * The codec of the stream, such as `h264` or `aac` + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codec") + private Optional codec; + + + @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; + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("displayTitle") + private Optional displayTitle; + + + @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("id") + private Optional id; + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + /** + * The three character language code for the stream contents + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("languageCode") + private Optional languageCode; + + + @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("samplingRate") + private Optional samplingRate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("selected") + private Optional selected; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamIdentifier") + private Optional streamIdentifier; + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamType") + private Optional streamType; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("decision") + private Optional decision; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private Optional location; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public MediaContainerWithDecisionStream( + @JsonProperty("default") Optional default_, + @JsonProperty("audioChannelLayout") Optional audioChannelLayout, + @JsonProperty("bitDepth") Optional bitDepth, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("canAutoSync") Optional canAutoSync, + @JsonProperty("chromaLocation") Optional chromaLocation, + @JsonProperty("chromaSubsampling") Optional chromaSubsampling, + @JsonProperty("codec") Optional codec, + @JsonProperty("colorPrimaries") Optional colorPrimaries, + @JsonProperty("colorRange") Optional colorRange, + @JsonProperty("colorSpace") Optional colorSpace, + @JsonProperty("colorTrc") Optional colorTrc, + @JsonProperty("displayTitle") Optional displayTitle, + @JsonProperty("frameRate") Optional frameRate, + @JsonProperty("hasScalingMatrix") Optional hasScalingMatrix, + @JsonProperty("height") Optional height, + @JsonProperty("id") Optional id, + @JsonProperty("index") Optional index, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("languageCode") Optional languageCode, + @JsonProperty("level") Optional level, + @JsonProperty("profile") Optional profile, + @JsonProperty("refFrames") Optional refFrames, + @JsonProperty("samplingRate") Optional samplingRate, + @JsonProperty("selected") Optional selected, + @JsonProperty("streamIdentifier") Optional streamIdentifier, + @JsonProperty("streamType") Optional streamType, + @JsonProperty("width") Optional width, + @JsonProperty("decision") Optional decision, + @JsonProperty("location") Optional location) { + Utils.checkNotNull(default_, "default_"); + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + Utils.checkNotNull(bitDepth, "bitDepth"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(canAutoSync, "canAutoSync"); + Utils.checkNotNull(chromaLocation, "chromaLocation"); + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + Utils.checkNotNull(codec, "codec"); + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + Utils.checkNotNull(colorRange, "colorRange"); + Utils.checkNotNull(colorSpace, "colorSpace"); + Utils.checkNotNull(colorTrc, "colorTrc"); + Utils.checkNotNull(displayTitle, "displayTitle"); + Utils.checkNotNull(frameRate, "frameRate"); + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(languageCode, "languageCode"); + Utils.checkNotNull(level, "level"); + Utils.checkNotNull(profile, "profile"); + Utils.checkNotNull(refFrames, "refFrames"); + Utils.checkNotNull(samplingRate, "samplingRate"); + Utils.checkNotNull(selected, "selected"); + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + Utils.checkNotNull(streamType, "streamType"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(decision, "decision"); + Utils.checkNotNull(location, "location"); + this.default_ = default_; + this.audioChannelLayout = audioChannelLayout; + this.bitDepth = bitDepth; + this.bitrate = bitrate; + this.canAutoSync = canAutoSync; + this.chromaLocation = chromaLocation; + this.chromaSubsampling = chromaSubsampling; + this.codec = codec; + this.colorPrimaries = colorPrimaries; + this.colorRange = colorRange; + this.colorSpace = colorSpace; + this.colorTrc = colorTrc; + this.displayTitle = displayTitle; + this.frameRate = frameRate; + this.hasScalingMatrix = hasScalingMatrix; + this.height = height; + this.id = id; + this.index = index; + this.key = key; + this.language = language; + this.languageCode = languageCode; + this.level = level; + this.profile = profile; + this.refFrames = refFrames; + this.samplingRate = samplingRate; + this.selected = selected; + this.streamIdentifier = streamIdentifier; + this.streamType = streamType; + this.width = width; + this.decision = decision; + this.location = location; + this.additionalProperties = new HashMap<>(); + } + + public MediaContainerWithDecisionStream() { + 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()); + } + + @JsonIgnore + public Optional default_() { + return default_; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audioChannelLayout() { + return (Optional) audioChannelLayout; + } + + @JsonIgnore + public Optional bitDepth() { + return bitDepth; + } + + @JsonIgnore + public Optional bitrate() { + return bitrate; + } + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + @JsonIgnore + public Optional canAutoSync() { + return canAutoSync; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chromaLocation() { + return (Optional) chromaLocation; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chromaSubsampling() { + return (Optional) chromaSubsampling; + } + + /** + * The codec of the stream, such as `h264` or `aac` + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional codec() { + return (Optional) codec; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional colorPrimaries() { + return (Optional) colorPrimaries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional colorRange() { + return (Optional) colorRange; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional colorSpace() { + return (Optional) colorSpace; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional colorTrc() { + return (Optional) colorTrc; + } + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional displayTitle() { + return (Optional) displayTitle; + } + + @JsonIgnore + public Optional frameRate() { + return frameRate; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hasScalingMatrix() { + return (Optional) hasScalingMatrix; + } + + @JsonIgnore + public Optional height() { + return height; + } + + @JsonIgnore + public Optional id() { + return id; + } + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + @JsonIgnore + public Optional index() { + return index; + } + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional language() { + return (Optional) language; + } + + /** + * The three character language code for the stream contents + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional languageCode() { + return (Optional) languageCode; + } + + @JsonIgnore + public Optional level() { + return level; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional profile() { + return (Optional) profile; + } + + @JsonIgnore + public Optional refFrames() { + return refFrames; + } + + @JsonIgnore + public Optional samplingRate() { + return samplingRate; + } + + @JsonIgnore + public Optional selected() { + return selected; + } + + @JsonIgnore + public Optional streamIdentifier() { + return streamIdentifier; + } + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + @JsonIgnore + public Optional streamType() { + return streamType; + } + + @JsonIgnore + public Optional width() { + return width; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional decision() { + return (Optional) decision; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional location() { + return (Optional) location; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithDecisionStream withDefault(boolean default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + + public MediaContainerWithDecisionStream withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public MediaContainerWithDecisionStream withAudioChannelLayout(Object audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); + return this; + } + + + public MediaContainerWithDecisionStream withAudioChannelLayout(Optional audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = audioChannelLayout; + return this; + } + + public MediaContainerWithDecisionStream withBitDepth(long bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = Optional.ofNullable(bitDepth); + return this; + } + + + public MediaContainerWithDecisionStream withBitDepth(Optional bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = bitDepth; + return this; + } + + public MediaContainerWithDecisionStream withBitrate(long bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + + public MediaContainerWithDecisionStream withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + public MediaContainerWithDecisionStream withCanAutoSync(boolean canAutoSync) { + Utils.checkNotNull(canAutoSync, "canAutoSync"); + this.canAutoSync = Optional.ofNullable(canAutoSync); + return this; + } + + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + public MediaContainerWithDecisionStream withCanAutoSync(Optional canAutoSync) { + Utils.checkNotNull(canAutoSync, "canAutoSync"); + this.canAutoSync = canAutoSync; + return this; + } + + public MediaContainerWithDecisionStream withChromaLocation(Object chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = Optional.ofNullable(chromaLocation); + return this; + } + + + public MediaContainerWithDecisionStream withChromaLocation(Optional chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = chromaLocation; + return this; + } + + public MediaContainerWithDecisionStream withChromaSubsampling(Object chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); + return this; + } + + + public MediaContainerWithDecisionStream withChromaSubsampling(Optional chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = chromaSubsampling; + return this; + } + + /** + * The codec of the stream, such as `h264` or `aac` + */ + public MediaContainerWithDecisionStream withCodec(Object codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + + /** + * The codec of the stream, such as `h264` or `aac` + */ + public MediaContainerWithDecisionStream withCodec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + public MediaContainerWithDecisionStream withColorPrimaries(Object colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = Optional.ofNullable(colorPrimaries); + return this; + } + + + public MediaContainerWithDecisionStream withColorPrimaries(Optional colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = colorPrimaries; + return this; + } + + public MediaContainerWithDecisionStream withColorRange(Object colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = Optional.ofNullable(colorRange); + return this; + } + + + public MediaContainerWithDecisionStream withColorRange(Optional colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = colorRange; + return this; + } + + public MediaContainerWithDecisionStream withColorSpace(Object colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = Optional.ofNullable(colorSpace); + return this; + } + + + public MediaContainerWithDecisionStream withColorSpace(Optional colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = colorSpace; + return this; + } + + public MediaContainerWithDecisionStream withColorTrc(Object colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = Optional.ofNullable(colorTrc); + return this; + } + + + public MediaContainerWithDecisionStream withColorTrc(Optional colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = colorTrc; + return this; + } + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + public MediaContainerWithDecisionStream withDisplayTitle(Object displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + public MediaContainerWithDecisionStream withDisplayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + public MediaContainerWithDecisionStream withFrameRate(double frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = Optional.ofNullable(frameRate); + return this; + } + + + public MediaContainerWithDecisionStream withFrameRate(Optional frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = frameRate; + return this; + } + + public MediaContainerWithDecisionStream withHasScalingMatrix(Object hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); + return this; + } + + + public MediaContainerWithDecisionStream withHasScalingMatrix(Optional hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = hasScalingMatrix; + return this; + } + + public MediaContainerWithDecisionStream withHeight(long height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + + public MediaContainerWithDecisionStream withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public MediaContainerWithDecisionStream withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public MediaContainerWithDecisionStream withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + public MediaContainerWithDecisionStream withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + public MediaContainerWithDecisionStream withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + public MediaContainerWithDecisionStream withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + public MediaContainerWithDecisionStream withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public MediaContainerWithDecisionStream withLanguage(Object language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public MediaContainerWithDecisionStream withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + /** + * The three character language code for the stream contents + */ + public MediaContainerWithDecisionStream withLanguageCode(Object languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = Optional.ofNullable(languageCode); + return this; + } + + + /** + * The three character language code for the stream contents + */ + public MediaContainerWithDecisionStream withLanguageCode(Optional languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = languageCode; + return this; + } + + public MediaContainerWithDecisionStream withLevel(long level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + + public MediaContainerWithDecisionStream withLevel(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public MediaContainerWithDecisionStream withProfile(Object profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + + public MediaContainerWithDecisionStream withProfile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + public MediaContainerWithDecisionStream withRefFrames(long refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = Optional.ofNullable(refFrames); + return this; + } + + + public MediaContainerWithDecisionStream withRefFrames(Optional refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = refFrames; + return this; + } + + public MediaContainerWithDecisionStream withSamplingRate(long samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = Optional.ofNullable(samplingRate); + return this; + } + + + public MediaContainerWithDecisionStream withSamplingRate(Optional samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = samplingRate; + return this; + } + + public MediaContainerWithDecisionStream withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + + public MediaContainerWithDecisionStream withSelected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public MediaContainerWithDecisionStream withStreamIdentifier(long streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = Optional.ofNullable(streamIdentifier); + return this; + } + + + public MediaContainerWithDecisionStream withStreamIdentifier(Optional streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = streamIdentifier; + return this; + } + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + public MediaContainerWithDecisionStream withStreamType(long streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + public MediaContainerWithDecisionStream withStreamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + public MediaContainerWithDecisionStream withWidth(long width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + + public MediaContainerWithDecisionStream withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public MediaContainerWithDecisionStream withDecision(MediaContainerWithDecisionDecision decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = Optional.ofNullable(decision); + return this; + } + + + public MediaContainerWithDecisionStream withDecision(Optional decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = decision; + return this; + } + + public MediaContainerWithDecisionStream withLocation(MediaContainerWithDecisionLocation location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + public MediaContainerWithDecisionStream withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + @JsonAnySetter + public MediaContainerWithDecisionStream withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public MediaContainerWithDecisionStream withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithDecisionStream other = (MediaContainerWithDecisionStream) o; + return + Utils.enhancedDeepEquals(this.default_, other.default_) && + Utils.enhancedDeepEquals(this.audioChannelLayout, other.audioChannelLayout) && + Utils.enhancedDeepEquals(this.bitDepth, other.bitDepth) && + Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && + Utils.enhancedDeepEquals(this.canAutoSync, other.canAutoSync) && + Utils.enhancedDeepEquals(this.chromaLocation, other.chromaLocation) && + Utils.enhancedDeepEquals(this.chromaSubsampling, other.chromaSubsampling) && + Utils.enhancedDeepEquals(this.codec, other.codec) && + Utils.enhancedDeepEquals(this.colorPrimaries, other.colorPrimaries) && + Utils.enhancedDeepEquals(this.colorRange, other.colorRange) && + Utils.enhancedDeepEquals(this.colorSpace, other.colorSpace) && + Utils.enhancedDeepEquals(this.colorTrc, other.colorTrc) && + Utils.enhancedDeepEquals(this.displayTitle, other.displayTitle) && + Utils.enhancedDeepEquals(this.frameRate, other.frameRate) && + Utils.enhancedDeepEquals(this.hasScalingMatrix, other.hasScalingMatrix) && + Utils.enhancedDeepEquals(this.height, other.height) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.languageCode, other.languageCode) && + Utils.enhancedDeepEquals(this.level, other.level) && + Utils.enhancedDeepEquals(this.profile, other.profile) && + Utils.enhancedDeepEquals(this.refFrames, other.refFrames) && + Utils.enhancedDeepEquals(this.samplingRate, other.samplingRate) && + Utils.enhancedDeepEquals(this.selected, other.selected) && + Utils.enhancedDeepEquals(this.streamIdentifier, other.streamIdentifier) && + Utils.enhancedDeepEquals(this.streamType, other.streamType) && + Utils.enhancedDeepEquals(this.width, other.width) && + Utils.enhancedDeepEquals(this.decision, other.decision) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + default_, audioChannelLayout, bitDepth, + bitrate, canAutoSync, chromaLocation, + chromaSubsampling, codec, colorPrimaries, + colorRange, colorSpace, colorTrc, + displayTitle, frameRate, hasScalingMatrix, + height, id, index, + key, language, languageCode, + level, profile, refFrames, + samplingRate, selected, streamIdentifier, + streamType, width, decision, + location, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDecisionStream.class, + "default_", default_, + "audioChannelLayout", audioChannelLayout, + "bitDepth", bitDepth, + "bitrate", bitrate, + "canAutoSync", canAutoSync, + "chromaLocation", chromaLocation, + "chromaSubsampling", chromaSubsampling, + "codec", codec, + "colorPrimaries", colorPrimaries, + "colorRange", colorRange, + "colorSpace", colorSpace, + "colorTrc", colorTrc, + "displayTitle", displayTitle, + "frameRate", frameRate, + "hasScalingMatrix", hasScalingMatrix, + "height", height, + "id", id, + "index", index, + "key", key, + "language", language, + "languageCode", languageCode, + "level", level, + "profile", profile, + "refFrames", refFrames, + "samplingRate", samplingRate, + "selected", selected, + "streamIdentifier", streamIdentifier, + "streamType", streamType, + "width", width, + "decision", decision, + "location", location, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional default_ = Optional.empty(); + + private Optional audioChannelLayout = Optional.empty(); + + private Optional bitDepth = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional canAutoSync = Optional.empty(); + + private Optional chromaLocation = Optional.empty(); + + private Optional chromaSubsampling = Optional.empty(); + + private Optional codec = Optional.empty(); + + private Optional colorPrimaries = Optional.empty(); + + private Optional colorRange = Optional.empty(); + + private Optional colorSpace = Optional.empty(); + + private Optional colorTrc = Optional.empty(); + + private Optional displayTitle = Optional.empty(); + + private Optional frameRate = Optional.empty(); + + private Optional hasScalingMatrix = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional languageCode = Optional.empty(); + + private Optional level = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional refFrames = Optional.empty(); + + private Optional samplingRate = Optional.empty(); + + private Optional selected = Optional.empty(); + + private Optional streamIdentifier = Optional.empty(); + + private Optional streamType = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional decision = Optional.empty(); + + private Optional location = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + 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 audioChannelLayout(Object audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); + return this; + } + + public Builder audioChannelLayout(Optional audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = audioChannelLayout; + return this; + } + + + public Builder bitDepth(long 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 bitrate(long 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; + } + + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + public Builder canAutoSync(boolean canAutoSync) { + Utils.checkNotNull(canAutoSync, "canAutoSync"); + this.canAutoSync = Optional.ofNullable(canAutoSync); + return this; + } + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + public Builder canAutoSync(Optional canAutoSync) { + Utils.checkNotNull(canAutoSync, "canAutoSync"); + this.canAutoSync = canAutoSync; + return this; + } + + + public Builder chromaLocation(Object 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(Object 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; + } + + + /** + * The codec of the stream, such as `h264` or `aac` + */ + public Builder codec(Object codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + /** + * The codec of the stream, such as `h264` or `aac` + */ + public Builder codec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + + public Builder colorPrimaries(Object 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(Object 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(Object 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(Object 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; + } + + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + public Builder displayTitle(Object displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + public Builder displayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + + public Builder frameRate(double 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(Object 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(long 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 id(long 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; + } + + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + public Builder language(Object 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; + } + + + /** + * The three character language code for the stream contents + */ + public Builder languageCode(Object languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = Optional.ofNullable(languageCode); + return this; + } + + /** + * The three character language code for the stream contents + */ + public Builder languageCode(Optional languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = languageCode; + return this; + } + + + public Builder level(long 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(Object 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(long 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 samplingRate(long 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 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 streamIdentifier(long 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; + } + + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + public Builder streamType(long streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + public Builder streamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + + public Builder width(long 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 decision(MediaContainerWithDecisionDecision decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = Optional.ofNullable(decision); + return this; + } + + public Builder decision(Optional decision) { + Utils.checkNotNull(decision, "decision"); + this.decision = decision; + return this; + } + + + public Builder location(MediaContainerWithDecisionLocation location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public MediaContainerWithDecisionStream build() { + + return new MediaContainerWithDecisionStream( + default_, audioChannelLayout, bitDepth, + bitrate, canAutoSync, chromaLocation, + chromaSubsampling, codec, colorPrimaries, + colorRange, colorSpace, colorTrc, + displayTitle, frameRate, hasScalingMatrix, + height, id, index, + key, language, languageCode, + level, profile, refFrames, + samplingRate, selected, streamIdentifier, + streamType, width, decision, + location) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDevice.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDevice.java new file mode 100644 index 00000000..3c670c09 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDevice.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class MediaContainerWithDevice { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithDevice( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithDevice() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithDevice withMediaContainer(MediaContainerWithDeviceMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithDevice 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; + } + MediaContainerWithDevice other = (MediaContainerWithDevice) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDevice.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithDeviceMediaContainer 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 MediaContainerWithDevice build() { + + return new MediaContainerWithDevice( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDeviceDevice.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDeviceDevice.java new file mode 100644 index 00000000..48741f45 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDeviceDevice.java @@ -0,0 +1,643 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class MediaContainerWithDeviceDevice { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ChannelMapping") + private Optional> channelMapping; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastSeenAt") + private Optional lastSeenAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("make") + private Optional make; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("model") + private Optional model; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("modelNumber") + private Optional modelNumber; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("protocol") + private Optional protocol; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sources") + private Optional sources; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("state") + private Optional state; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tuners") + private Optional tuners; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uri") + private Optional uri; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public MediaContainerWithDeviceDevice( + @JsonProperty("ChannelMapping") Optional> channelMapping, + @JsonProperty("key") Optional key, + @JsonProperty("lastSeenAt") Optional lastSeenAt, + @JsonProperty("make") Optional make, + @JsonProperty("model") Optional model, + @JsonProperty("modelNumber") Optional modelNumber, + @JsonProperty("protocol") Optional protocol, + @JsonProperty("sources") Optional sources, + @JsonProperty("state") Optional state, + @JsonProperty("status") Optional status, + @JsonProperty("tuners") Optional tuners, + @JsonProperty("uri") Optional uri, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(channelMapping, "channelMapping"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastSeenAt, "lastSeenAt"); + Utils.checkNotNull(make, "make"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(modelNumber, "modelNumber"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(sources, "sources"); + Utils.checkNotNull(state, "state"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(tuners, "tuners"); + Utils.checkNotNull(uri, "uri"); + Utils.checkNotNull(uuid, "uuid"); + this.channelMapping = channelMapping; + this.key = key; + this.lastSeenAt = lastSeenAt; + this.make = make; + this.model = model; + this.modelNumber = modelNumber; + this.protocol = protocol; + this.sources = sources; + this.state = state; + this.status = status; + this.tuners = tuners; + this.uri = uri; + this.uuid = uuid; + } + + public MediaContainerWithDeviceDevice() { + 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()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> channelMapping() { + return (Optional>) channelMapping; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional lastSeenAt() { + return lastSeenAt; + } + + @JsonIgnore + public Optional make() { + return make; + } + + @JsonIgnore + public Optional model() { + return model; + } + + @JsonIgnore + public Optional modelNumber() { + return modelNumber; + } + + @JsonIgnore + public Optional protocol() { + return protocol; + } + + @JsonIgnore + public Optional sources() { + return sources; + } + + @JsonIgnore + public Optional state() { + return state; + } + + @JsonIgnore + public Optional status() { + return status; + } + + @JsonIgnore + public Optional tuners() { + return tuners; + } + + @JsonIgnore + public Optional uri() { + return uri; + } + + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithDeviceDevice withChannelMapping(List channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = Optional.ofNullable(channelMapping); + return this; + } + + + public MediaContainerWithDeviceDevice withChannelMapping(Optional> channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = channelMapping; + return this; + } + + public MediaContainerWithDeviceDevice withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public MediaContainerWithDeviceDevice withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public MediaContainerWithDeviceDevice withLastSeenAt(long lastSeenAt) { + Utils.checkNotNull(lastSeenAt, "lastSeenAt"); + this.lastSeenAt = Optional.ofNullable(lastSeenAt); + return this; + } + + + public MediaContainerWithDeviceDevice withLastSeenAt(Optional lastSeenAt) { + Utils.checkNotNull(lastSeenAt, "lastSeenAt"); + this.lastSeenAt = lastSeenAt; + return this; + } + + public MediaContainerWithDeviceDevice withMake(String make) { + Utils.checkNotNull(make, "make"); + this.make = Optional.ofNullable(make); + return this; + } + + + public MediaContainerWithDeviceDevice withMake(Optional make) { + Utils.checkNotNull(make, "make"); + this.make = make; + return this; + } + + public MediaContainerWithDeviceDevice withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + public MediaContainerWithDeviceDevice withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + public MediaContainerWithDeviceDevice withModelNumber(String modelNumber) { + Utils.checkNotNull(modelNumber, "modelNumber"); + this.modelNumber = Optional.ofNullable(modelNumber); + return this; + } + + + public MediaContainerWithDeviceDevice withModelNumber(Optional modelNumber) { + Utils.checkNotNull(modelNumber, "modelNumber"); + this.modelNumber = modelNumber; + return this; + } + + public MediaContainerWithDeviceDevice withProtocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + + public MediaContainerWithDeviceDevice withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + public MediaContainerWithDeviceDevice withSources(String sources) { + Utils.checkNotNull(sources, "sources"); + this.sources = Optional.ofNullable(sources); + return this; + } + + + public MediaContainerWithDeviceDevice withSources(Optional sources) { + Utils.checkNotNull(sources, "sources"); + this.sources = sources; + return this; + } + + public MediaContainerWithDeviceDevice withState(String state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + + public MediaContainerWithDeviceDevice withState(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + public MediaContainerWithDeviceDevice withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + public MediaContainerWithDeviceDevice withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public MediaContainerWithDeviceDevice withTuners(String tuners) { + Utils.checkNotNull(tuners, "tuners"); + this.tuners = Optional.ofNullable(tuners); + return this; + } + + + public MediaContainerWithDeviceDevice withTuners(Optional tuners) { + Utils.checkNotNull(tuners, "tuners"); + this.tuners = tuners; + return this; + } + + public MediaContainerWithDeviceDevice withUri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + + public MediaContainerWithDeviceDevice withUri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + public MediaContainerWithDeviceDevice withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + public MediaContainerWithDeviceDevice withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithDeviceDevice other = (MediaContainerWithDeviceDevice) o; + return + Utils.enhancedDeepEquals(this.channelMapping, other.channelMapping) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastSeenAt, other.lastSeenAt) && + Utils.enhancedDeepEquals(this.make, other.make) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.modelNumber, other.modelNumber) && + Utils.enhancedDeepEquals(this.protocol, other.protocol) && + Utils.enhancedDeepEquals(this.sources, other.sources) && + Utils.enhancedDeepEquals(this.state, other.state) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.tuners, other.tuners) && + Utils.enhancedDeepEquals(this.uri, other.uri) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + channelMapping, key, lastSeenAt, + make, model, modelNumber, + protocol, sources, state, + status, tuners, uri, + uuid); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDeviceDevice.class, + "channelMapping", channelMapping, + "key", key, + "lastSeenAt", lastSeenAt, + "make", make, + "model", model, + "modelNumber", modelNumber, + "protocol", protocol, + "sources", sources, + "state", state, + "status", status, + "tuners", tuners, + "uri", uri, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> channelMapping = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastSeenAt = Optional.empty(); + + private Optional make = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional modelNumber = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional sources = Optional.empty(); + + private Optional state = Optional.empty(); + + private Optional status = Optional.empty(); + + private Optional tuners = Optional.empty(); + + private Optional uri = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder channelMapping(List channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = Optional.ofNullable(channelMapping); + return this; + } + + public Builder channelMapping(Optional> channelMapping) { + Utils.checkNotNull(channelMapping, "channelMapping"); + this.channelMapping = channelMapping; + 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 lastSeenAt(long lastSeenAt) { + Utils.checkNotNull(lastSeenAt, "lastSeenAt"); + this.lastSeenAt = Optional.ofNullable(lastSeenAt); + return this; + } + + public Builder lastSeenAt(Optional lastSeenAt) { + Utils.checkNotNull(lastSeenAt, "lastSeenAt"); + this.lastSeenAt = lastSeenAt; + return this; + } + + + public Builder make(String make) { + Utils.checkNotNull(make, "make"); + this.make = Optional.ofNullable(make); + return this; + } + + public Builder make(Optional make) { + Utils.checkNotNull(make, "make"); + this.make = make; + return this; + } + + + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + public Builder modelNumber(String modelNumber) { + Utils.checkNotNull(modelNumber, "modelNumber"); + this.modelNumber = Optional.ofNullable(modelNumber); + return this; + } + + public Builder modelNumber(Optional modelNumber) { + Utils.checkNotNull(modelNumber, "modelNumber"); + this.modelNumber = modelNumber; + return this; + } + + + public Builder protocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + + public Builder sources(String sources) { + Utils.checkNotNull(sources, "sources"); + this.sources = Optional.ofNullable(sources); + return this; + } + + public Builder sources(Optional sources) { + Utils.checkNotNull(sources, "sources"); + this.sources = sources; + return this; + } + + + public Builder state(String state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + public Builder state(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + public Builder tuners(String tuners) { + Utils.checkNotNull(tuners, "tuners"); + this.tuners = Optional.ofNullable(tuners); + return this; + } + + public Builder tuners(Optional tuners) { + Utils.checkNotNull(tuners, "tuners"); + this.tuners = tuners; + return this; + } + + + public Builder uri(String uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = Optional.ofNullable(uri); + return this; + } + + public Builder uri(Optional uri) { + Utils.checkNotNull(uri, "uri"); + this.uri = uri; + return this; + } + + + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public MediaContainerWithDeviceDevice build() { + + return new MediaContainerWithDeviceDevice( + channelMapping, key, lastSeenAt, + make, model, modelNumber, + protocol, sources, state, + status, tuners, uri, + uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDeviceMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDeviceMediaContainer.java new file mode 100644 index 00000000..cfb23d26 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDeviceMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithDeviceMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithDeviceMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Device") + private Optional> device; + + @JsonCreator + public MediaContainerWithDeviceMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Device") Optional> device) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(device, "device"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.device = device; + } + + public MediaContainerWithDeviceMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> device() { + return (Optional>) device; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithDeviceMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithDeviceMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithDeviceMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithDeviceMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithDeviceMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithDeviceMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithDeviceMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithDeviceMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainerWithDeviceMediaContainer withDevice(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + + public MediaContainerWithDeviceMediaContainer withDevice(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithDeviceMediaContainer other = (MediaContainerWithDeviceMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.device, other.device); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, device); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDeviceMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "device", device); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> device = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder device(List device) { + Utils.checkNotNull(device, "device"); + this.device = Optional.ofNullable(device); + return this; + } + + public Builder device(Optional> device) { + Utils.checkNotNull(device, "device"); + this.device = device; + return this; + } + + public MediaContainerWithDeviceMediaContainer build() { + + return new MediaContainerWithDeviceMediaContainer( + identifier, offset, size, + totalSize, device); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDirectory.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDirectory.java new file mode 100644 index 00000000..ab52fe79 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDirectory.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class MediaContainerWithDirectory { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithDirectory( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithDirectory() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithDirectory withMediaContainer(MediaContainerWithDirectoryMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithDirectory 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; + } + MediaContainerWithDirectory other = (MediaContainerWithDirectory) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDirectory.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithDirectoryMediaContainer 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 MediaContainerWithDirectory build() { + + return new MediaContainerWithDirectory( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDirectoryMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDirectoryMediaContainer.java new file mode 100644 index 00000000..9e84c458 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithDirectoryMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithDirectoryMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithDirectoryMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonCreator + public MediaContainerWithDirectoryMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Directory") Optional> directory) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(directory, "directory"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.directory = directory; + } + + public MediaContainerWithDirectoryMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithDirectoryMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithDirectoryMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithDirectoryMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithDirectoryMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithDirectoryMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithDirectoryMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithDirectoryMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithDirectoryMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainerWithDirectoryMediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public MediaContainerWithDirectoryMediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithDirectoryMediaContainer other = (MediaContainerWithDirectoryMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.directory, other.directory); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, directory); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithDirectoryMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "directory", directory); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public MediaContainerWithDirectoryMediaContainer build() { + + return new MediaContainerWithDirectoryMediaContainer( + identifier, offset, size, + totalSize, directory); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithHubs.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithHubs.java new file mode 100644 index 00000000..f14140d7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithHubs.java @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * MediaContainerWithHubs + * + *

OK + */ +public class MediaContainerWithHubs { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithHubs( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithHubs() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithHubs withMediaContainer(MediaContainerWithHubsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithHubs 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; + } + MediaContainerWithHubs other = (MediaContainerWithHubs) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithHubs.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithHubsMediaContainer 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 MediaContainerWithHubs build() { + + return new MediaContainerWithHubs( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithHubsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithHubsMediaContainer.java new file mode 100644 index 00000000..d9f60dc6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithHubsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithHubsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithHubsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Hub") + private Optional> hub; + + @JsonCreator + public MediaContainerWithHubsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Hub") Optional> hub) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(hub, "hub"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.hub = hub; + } + + public MediaContainerWithHubsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hub() { + return (Optional>) hub; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithHubsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithHubsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithHubsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithHubsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithHubsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithHubsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithHubsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithHubsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainerWithHubsMediaContainer withHub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + + public MediaContainerWithHubsMediaContainer withHub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithHubsMediaContainer other = (MediaContainerWithHubsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.hub, other.hub); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, hub); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithHubsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "hub", hub); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> hub = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder hub(List hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = Optional.ofNullable(hub); + return this; + } + + public Builder hub(Optional> hub) { + Utils.checkNotNull(hub, "hub"); + this.hub = hub; + return this; + } + + public MediaContainerWithHubsMediaContainer build() { + + return new MediaContainerWithHubsMediaContainer( + identifier, offset, size, + totalSize, hub); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithLineup.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithLineup.java new file mode 100644 index 00000000..1732115d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithLineup.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class MediaContainerWithLineup { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithLineup( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithLineup() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithLineup withMediaContainer(MediaContainerWithLineupMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithLineup 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; + } + MediaContainerWithLineup other = (MediaContainerWithLineup) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithLineup.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithLineupMediaContainer 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 MediaContainerWithLineup build() { + + return new MediaContainerWithLineup( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithLineupMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithLineupMediaContainer.java new file mode 100644 index 00000000..c37c3def --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithLineupMediaContainer.java @@ -0,0 +1,390 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithLineupMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithLineupMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Lineup") + private Optional> lineup; + + /** + * The UUID of this set lineups + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uuid") + private Optional uuid; + + @JsonCreator + public MediaContainerWithLineupMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Lineup") Optional> lineup, + @JsonProperty("uuid") Optional uuid) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(lineup, "lineup"); + Utils.checkNotNull(uuid, "uuid"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.lineup = lineup; + this.uuid = uuid; + } + + public MediaContainerWithLineupMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> lineup() { + return (Optional>) lineup; + } + + /** + * The UUID of this set lineups + */ + @JsonIgnore + public Optional uuid() { + return uuid; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithLineupMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithLineupMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithLineupMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithLineupMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithLineupMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithLineupMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithLineupMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithLineupMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainerWithLineupMediaContainer withLineup(List lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + + public MediaContainerWithLineupMediaContainer withLineup(Optional> lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + /** + * The UUID of this set lineups + */ + public MediaContainerWithLineupMediaContainer withUuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + + /** + * The UUID of this set lineups + */ + public MediaContainerWithLineupMediaContainer withUuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithLineupMediaContainer other = (MediaContainerWithLineupMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.lineup, other.lineup) && + Utils.enhancedDeepEquals(this.uuid, other.uuid); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, lineup, uuid); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithLineupMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "lineup", lineup, + "uuid", uuid); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> lineup = Optional.empty(); + + private Optional uuid = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder lineup(List lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = Optional.ofNullable(lineup); + return this; + } + + public Builder lineup(Optional> lineup) { + Utils.checkNotNull(lineup, "lineup"); + this.lineup = lineup; + return this; + } + + + /** + * The UUID of this set lineups + */ + public Builder uuid(String uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = Optional.ofNullable(uuid); + return this; + } + + /** + * The UUID of this set lineups + */ + public Builder uuid(Optional uuid) { + Utils.checkNotNull(uuid, "uuid"); + this.uuid = uuid; + return this; + } + + public MediaContainerWithLineupMediaContainer build() { + + return new MediaContainerWithLineupMediaContainer( + identifier, offset, size, + totalSize, lineup, uuid); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithMetadata.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithMetadata.java new file mode 100644 index 00000000..59b43730 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithMetadata.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class MediaContainerWithMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithMetadata( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithMetadata() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithMetadata withMediaContainer(MediaContainerWithMetadataMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithMetadata 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; + } + MediaContainerWithMetadata other = (MediaContainerWithMetadata) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithMetadata.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithMetadataMediaContainer 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 MediaContainerWithMetadata build() { + + return new MediaContainerWithMetadata( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithMetadataMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithMetadataMediaContainer.java new file mode 100644 index 00000000..978df63e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithMetadataMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithMetadataMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithMetadataMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + @JsonCreator + public MediaContainerWithMetadataMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(metadata, "metadata"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.metadata = metadata; + } + + public MediaContainerWithMetadataMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadata() { + return (Optional>) metadata; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithMetadataMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithMetadataMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithMetadataMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithMetadataMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithMetadataMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithMetadataMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithMetadataMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithMetadataMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainerWithMetadataMediaContainer withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + + public MediaContainerWithMetadataMediaContainer 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; + } + MediaContainerWithMetadataMediaContainer other = (MediaContainerWithMetadataMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, metadata); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithMetadataMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "metadata", metadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + 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 MediaContainerWithMetadataMediaContainer build() { + + return new MediaContainerWithMetadataMediaContainer( + identifier, offset, size, + totalSize, metadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithNestedMetadata.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithNestedMetadata.java new file mode 100644 index 00000000..98221d0c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithNestedMetadata.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class MediaContainerWithNestedMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithNestedMetadata( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithNestedMetadata() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithNestedMetadata withMediaContainer(MediaContainerWithNestedMetadataMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithNestedMetadata 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; + } + MediaContainerWithNestedMetadata other = (MediaContainerWithNestedMetadata) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithNestedMetadata.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithNestedMetadataMediaContainer 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 MediaContainerWithNestedMetadata build() { + + return new MediaContainerWithNestedMetadata( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithNestedMetadataMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithNestedMetadataMediaContainer.java new file mode 100644 index 00000000..3f9c2d1d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithNestedMetadataMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithNestedMetadataMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithNestedMetadataMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MetadataItem") + private Optional> metadataItem; + + @JsonCreator + public MediaContainerWithNestedMetadataMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("MetadataItem") Optional> metadataItem) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(metadataItem, "metadataItem"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.metadataItem = metadataItem; + } + + public MediaContainerWithNestedMetadataMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadataItem() { + return (Optional>) metadataItem; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithNestedMetadataMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithNestedMetadataMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithNestedMetadataMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithNestedMetadataMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithNestedMetadataMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithNestedMetadataMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithNestedMetadataMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithNestedMetadataMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainerWithNestedMetadataMediaContainer withMetadataItem(List metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = Optional.ofNullable(metadataItem); + return this; + } + + + public MediaContainerWithNestedMetadataMediaContainer withMetadataItem(Optional> metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = metadataItem; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithNestedMetadataMediaContainer other = (MediaContainerWithNestedMetadataMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.metadataItem, other.metadataItem); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, metadataItem); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithNestedMetadataMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "metadataItem", metadataItem); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> metadataItem = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder metadataItem(List metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = Optional.ofNullable(metadataItem); + return this; + } + + public Builder metadataItem(Optional> metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = metadataItem; + return this; + } + + public MediaContainerWithNestedMetadataMediaContainer build() { + + return new MediaContainerWithNestedMetadataMediaContainer( + identifier, offset, size, + totalSize, metadataItem); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadata.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadata.java new file mode 100644 index 00000000..1fe5cff9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadata.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class MediaContainerWithPlaylistMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithPlaylistMetadata( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithPlaylistMetadata() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithPlaylistMetadata withMediaContainer(MediaContainerWithPlaylistMetadataMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithPlaylistMetadata 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; + } + MediaContainerWithPlaylistMetadata other = (MediaContainerWithPlaylistMetadata) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithPlaylistMetadata.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithPlaylistMetadataMediaContainer 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 MediaContainerWithPlaylistMetadata build() { + + return new MediaContainerWithPlaylistMetadata( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadataMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadataMediaContainer.java new file mode 100644 index 00000000..03200ad8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadataMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithPlaylistMetadataMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithPlaylistMetadataMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + @JsonCreator + public MediaContainerWithPlaylistMetadataMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(metadata, "metadata"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.metadata = metadata; + } + + public MediaContainerWithPlaylistMetadataMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadata() { + return (Optional>) metadata; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithPlaylistMetadataMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithPlaylistMetadataMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithPlaylistMetadataMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithPlaylistMetadataMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithPlaylistMetadataMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithPlaylistMetadataMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithPlaylistMetadataMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithPlaylistMetadataMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainerWithPlaylistMetadataMediaContainer withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + + public MediaContainerWithPlaylistMetadataMediaContainer 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; + } + MediaContainerWithPlaylistMetadataMediaContainer other = (MediaContainerWithPlaylistMetadataMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, metadata); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithPlaylistMetadataMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "metadata", metadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + 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 MediaContainerWithPlaylistMetadataMediaContainer build() { + + return new MediaContainerWithPlaylistMetadataMediaContainer( + identifier, offset, size, + totalSize, metadata); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadataMetadata.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadataMetadata.java new file mode 100644 index 00000000..b5ff5e53 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithPlaylistMetadataMetadata.java @@ -0,0 +1,4324 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * MediaContainerWithPlaylistMetadataMetadata + * + *

Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ +public class MediaContainerWithPlaylistMetadataMetadata { + /** + * If we return this as true then this playlist cannot be altered or deleted directly by the client. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("readOnly") + private Optional readOnly; + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + /** + * The type of the playlist. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("playlistType") + private Optional playlistType; + + /** + * Whether or not the playlist is smart. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("smart") + private Optional smart; + + /** + * If this is a special playlist, this returns its type (e.g. favorites). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("specialPlaylistType") + private Optional specialPlaylistType; + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("absoluteIndex") + private Optional absoluteIndex; + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + /** + * When present, the URL for the background artwork for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Autotag") + private Optional> autotag; + + /** + * When present, the URL for a banner graphic for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("banner") + private Optional banner; + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Filter") + private Optional> filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + /** + * The `art` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + /** + * The `hero` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentHero") + private Optional grandparentHero; + + /** + * The `key` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + /** + * The `ratingKey` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + /** + * The `theme` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTheme") + private Optional grandparentTheme; + + /** + * The `thumb` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + /** + * The `title` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guid; + + /** + * When present, the URL for a hero image for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hero") + private Optional hero; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Image") + private Optional> image; + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originalTitle") + private Optional originalTitle; + + /** + * The `hero` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentHero") + private Optional parentHero; + + /** + * The `index` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + /** + * The `key` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + /** + * The `ratingKey` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + /** + * The `thumb` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + /** + * The `title` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("prompt") + private Optional prompt; + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Rating") + private Optional> ratingArray; + + /** + * Number of ratings under this metadata + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingCount") + private Optional ratingCount; + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + /** + * Indicates this is a search directory + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("search") + private Optional search; + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secondary") + private Optional secondary; + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipChildren") + private Optional skipChildren; + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipParent") + private Optional skipParent; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Sort") + private Optional> sort; + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtype") + private Optional subtype; + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("theme") + private Optional theme; + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userRating") + private Optional userRating; + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public MediaContainerWithPlaylistMetadataMetadata( + @JsonProperty("readOnly") Optional readOnly, + @JsonProperty("composite") Optional composite, + @JsonProperty("duration") Optional duration, + @JsonProperty("key") Optional key, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("playlistType") Optional playlistType, + @JsonProperty("smart") Optional smart, + @JsonProperty("specialPlaylistType") Optional specialPlaylistType, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("absoluteIndex") Optional absoluteIndex, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("art") Optional art, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("Autotag") Optional> autotag, + @JsonProperty("banner") Optional banner, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("Country") Optional> country, + @JsonProperty("Director") Optional> director, + @JsonProperty("Filter") Optional> filter, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("grandparentHero") Optional grandparentHero, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("Guid") Optional> guid, + @JsonProperty("hero") Optional hero, + @JsonProperty("Image") Optional> image, + @JsonProperty("index") Optional index, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("Media") Optional> media, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("parentHero") Optional parentHero, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("prompt") Optional prompt, + @JsonProperty("rating") Optional rating, + @JsonProperty("Rating") Optional> ratingArray, + @JsonProperty("ratingCount") Optional ratingCount, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("Role") Optional> role, + @JsonProperty("search") Optional search, + @JsonProperty("secondary") Optional secondary, + @JsonProperty("skipChildren") Optional skipChildren, + @JsonProperty("skipParent") Optional skipParent, + @JsonProperty("Sort") Optional> sort, + @JsonProperty("studio") Optional studio, + @JsonProperty("subtype") Optional subtype, + @JsonProperty("summary") Optional summary, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("theme") Optional theme, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("userRating") Optional userRating, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("year") Optional year) { + Utils.checkNotNull(readOnly, "readOnly"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(playlistType, "playlistType"); + Utils.checkNotNull(smart, "smart"); + Utils.checkNotNull(specialPlaylistType, "specialPlaylistType"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(autotag, "autotag"); + Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(grandparentHero, "grandparentHero"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(hero, "hero"); + Utils.checkNotNull(image, "image"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(parentHero, "parentHero"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(prompt, "prompt"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(ratingArray, "ratingArray"); + Utils.checkNotNull(ratingCount, "ratingCount"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(search, "search"); + Utils.checkNotNull(secondary, "secondary"); + Utils.checkNotNull(skipChildren, "skipChildren"); + Utils.checkNotNull(skipParent, "skipParent"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(subtype, "subtype"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(userRating, "userRating"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(year, "year"); + this.readOnly = readOnly; + this.composite = composite; + this.duration = duration; + this.key = key; + this.leafCount = leafCount; + this.playlistType = playlistType; + this.smart = smart; + this.specialPlaylistType = specialPlaylistType; + this.title = title; + this.type = type; + this.absoluteIndex = absoluteIndex; + this.addedAt = addedAt; + this.art = art; + this.audienceRating = audienceRating; + this.audienceRatingImage = audienceRatingImage; + this.autotag = autotag; + this.banner = banner; + this.chapterSource = chapterSource; + this.contentRating = contentRating; + this.country = country; + this.director = director; + this.filter = filter; + this.genre = genre; + this.grandparentArt = grandparentArt; + this.grandparentHero = grandparentHero; + this.grandparentKey = grandparentKey; + this.grandparentRatingKey = grandparentRatingKey; + this.grandparentTheme = grandparentTheme; + this.grandparentThumb = grandparentThumb; + this.grandparentTitle = grandparentTitle; + this.guid = guid; + this.hero = hero; + this.image = image; + this.index = index; + this.lastViewedAt = lastViewedAt; + this.media = media; + this.originallyAvailableAt = originallyAvailableAt; + this.originalTitle = originalTitle; + this.parentHero = parentHero; + this.parentIndex = parentIndex; + this.parentKey = parentKey; + this.parentRatingKey = parentRatingKey; + this.parentThumb = parentThumb; + this.parentTitle = parentTitle; + this.primaryExtraKey = primaryExtraKey; + this.prompt = prompt; + this.rating = rating; + this.ratingArray = ratingArray; + this.ratingCount = ratingCount; + this.ratingImage = ratingImage; + this.ratingKey = ratingKey; + this.role = role; + this.search = search; + this.secondary = secondary; + this.skipChildren = skipChildren; + this.skipParent = skipParent; + this.sort = sort; + this.studio = studio; + this.subtype = subtype; + this.summary = summary; + this.tagline = tagline; + this.theme = theme; + this.thumb = thumb; + this.titleSort = titleSort; + this.updatedAt = updatedAt; + this.userRating = userRating; + this.viewCount = viewCount; + this.viewedLeafCount = viewedLeafCount; + this.viewOffset = viewOffset; + this.writer = writer; + this.year = year; + this.additionalProperties = new HashMap<>(); + } + + public MediaContainerWithPlaylistMetadataMetadata() { + 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(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * If we return this as true then this playlist cannot be altered or deleted directly by the client. + */ + @JsonIgnore + public Optional readOnly() { + return readOnly; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional composite() { + return (Optional) composite; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonIgnore + public Optional duration() { + return duration; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonIgnore + public Optional leafCount() { + return leafCount; + } + + /** + * The type of the playlist. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional playlistType() { + return (Optional) playlistType; + } + + /** + * Whether or not the playlist is smart. + */ + @JsonIgnore + public Optional smart() { + return smart; + } + + /** + * If this is a special playlist, this returns its type (e.g. favorites). + */ + @JsonIgnore + public Optional specialPlaylistType() { + return specialPlaylistType; + } + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional title() { + return (Optional) title; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonIgnore + public Optional absoluteIndex() { + return absoluteIndex; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonIgnore + public Optional addedAt() { + return addedAt; + } + + /** + * When present, the URL for the background artwork for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional art() { + return (Optional) art; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonIgnore + public Optional audienceRating() { + return audienceRating; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audienceRatingImage() { + return (Optional) audienceRatingImage; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> autotag() { + return (Optional>) autotag; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional banner() { + return (Optional) banner; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chapterSource() { + return (Optional) chapterSource; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional contentRating() { + return (Optional) contentRating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> director() { + return (Optional>) director; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> filter() { + return (Optional>) filter; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> genre() { + return (Optional>) genre; + } + + /** + * The `art` of the grandparent + */ + @JsonIgnore + public Optional grandparentArt() { + return grandparentArt; + } + + /** + * The `hero` of the grandparent + */ + @JsonIgnore + public Optional grandparentHero() { + return grandparentHero; + } + + /** + * The `key` of the grandparent + */ + @JsonIgnore + public Optional grandparentKey() { + return grandparentKey; + } + + /** + * The `ratingKey` of the grandparent + */ + @JsonIgnore + public Optional grandparentRatingKey() { + return grandparentRatingKey; + } + + /** + * The `theme` of the grandparent + */ + @JsonIgnore + public Optional grandparentTheme() { + return grandparentTheme; + } + + /** + * The `thumb` of the grandparent + */ + @JsonIgnore + public Optional grandparentThumb() { + return grandparentThumb; + } + + /** + * The `title` of the grandparent + */ + @JsonIgnore + public Optional grandparentTitle() { + return grandparentTitle; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> guid() { + return (Optional>) guid; + } + + /** + * When present, the URL for a hero image for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hero() { + return (Optional) hero; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> image() { + return (Optional>) image; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonIgnore + public Optional index() { + return index; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonIgnore + public Optional lastViewedAt() { + return lastViewedAt; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> media() { + return (Optional>) media; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originallyAvailableAt() { + return (Optional) originallyAvailableAt; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originalTitle() { + return (Optional) originalTitle; + } + + /** + * The `hero` of the parent + */ + @JsonIgnore + public Optional parentHero() { + return parentHero; + } + + /** + * The `index` of the parent + */ + @JsonIgnore + public Optional parentIndex() { + return parentIndex; + } + + /** + * The `key` of the parent + */ + @JsonIgnore + public Optional parentKey() { + return parentKey; + } + + /** + * The `ratingKey` of the parent + */ + @JsonIgnore + public Optional parentRatingKey() { + return parentRatingKey; + } + + /** + * The `thumb` of the parent + */ + @JsonIgnore + public Optional parentThumb() { + return parentThumb; + } + + /** + * The `title` of the parent + */ + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional primaryExtraKey() { + return (Optional) primaryExtraKey; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonIgnore + public Optional prompt() { + return prompt; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonIgnore + public Optional rating() { + return rating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> ratingArray() { + return (Optional>) ratingArray; + } + + /** + * Number of ratings under this metadata + */ + @JsonIgnore + public Optional ratingCount() { + return ratingCount; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingImage() { + return (Optional) ratingImage; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingKey() { + return (Optional) ratingKey; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> role() { + return (Optional>) role; + } + + /** + * Indicates this is a search directory + */ + @JsonIgnore + public Optional search() { + return search; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonIgnore + public Optional secondary() { + return secondary; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonIgnore + public Optional skipChildren() { + return skipChildren; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonIgnore + public Optional skipParent() { + return skipParent; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> sort() { + return (Optional>) sort; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional studio() { + return (Optional) studio; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtype() { + return (Optional) subtype; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional summary() { + return (Optional) summary; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional tagline() { + return (Optional) tagline; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional theme() { + return (Optional) theme; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional thumb() { + return (Optional) thumb; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional titleSort() { + return (Optional) titleSort; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonIgnore + public Optional userRating() { + return userRating; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonIgnore + public Optional viewCount() { + return viewCount; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonIgnore + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonIgnore + public Optional viewOffset() { + return viewOffset; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> writer() { + return (Optional>) writer; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonIgnore + public Optional year() { + return year; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * If we return this as true then this playlist cannot be altered or deleted directly by the client. + */ + public MediaContainerWithPlaylistMetadataMetadata withReadOnly(boolean readOnly) { + Utils.checkNotNull(readOnly, "readOnly"); + this.readOnly = Optional.ofNullable(readOnly); + return this; + } + + + /** + * If we return this as true then this playlist cannot be altered or deleted directly by the client. + */ + public MediaContainerWithPlaylistMetadataMetadata withReadOnly(Optional readOnly) { + Utils.checkNotNull(readOnly, "readOnly"); + this.readOnly = readOnly; + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public MediaContainerWithPlaylistMetadataMetadata withComposite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public MediaContainerWithPlaylistMetadataMetadata withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public MediaContainerWithPlaylistMetadataMetadata withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public MediaContainerWithPlaylistMetadataMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public MediaContainerWithPlaylistMetadataMetadata withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public MediaContainerWithPlaylistMetadataMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public MediaContainerWithPlaylistMetadataMetadata withLeafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public MediaContainerWithPlaylistMetadataMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + /** + * The type of the playlist. + */ + public MediaContainerWithPlaylistMetadataMetadata withPlaylistType(PlaylistType playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + + /** + * The type of the playlist. + */ + public MediaContainerWithPlaylistMetadataMetadata withPlaylistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + /** + * Whether or not the playlist is smart. + */ + public MediaContainerWithPlaylistMetadataMetadata withSmart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + + /** + * Whether or not the playlist is smart. + */ + public MediaContainerWithPlaylistMetadataMetadata withSmart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + /** + * If this is a special playlist, this returns its type (e.g. favorites). + */ + public MediaContainerWithPlaylistMetadataMetadata withSpecialPlaylistType(String specialPlaylistType) { + Utils.checkNotNull(specialPlaylistType, "specialPlaylistType"); + this.specialPlaylistType = Optional.ofNullable(specialPlaylistType); + return this; + } + + + /** + * If this is a special playlist, this returns its type (e.g. favorites). + */ + public MediaContainerWithPlaylistMetadataMetadata withSpecialPlaylistType(Optional specialPlaylistType) { + Utils.checkNotNull(specialPlaylistType, "specialPlaylistType"); + this.specialPlaylistType = specialPlaylistType; + return this; + } + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public MediaContainerWithPlaylistMetadataMetadata withTitle(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public MediaContainerWithPlaylistMetadataMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public MediaContainerWithPlaylistMetadataMetadata withType(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public MediaContainerWithPlaylistMetadataMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public MediaContainerWithPlaylistMetadataMetadata withAbsoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public MediaContainerWithPlaylistMetadataMetadata withAbsoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public MediaContainerWithPlaylistMetadataMetadata withAddedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public MediaContainerWithPlaylistMetadataMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public MediaContainerWithPlaylistMetadataMetadata withArt(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public MediaContainerWithPlaylistMetadataMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public MediaContainerWithPlaylistMetadataMetadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public MediaContainerWithPlaylistMetadataMetadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public MediaContainerWithPlaylistMetadataMetadata withAudienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public MediaContainerWithPlaylistMetadataMetadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata withAutotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + + public MediaContainerWithPlaylistMetadataMetadata withAutotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public MediaContainerWithPlaylistMetadataMetadata withBanner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public MediaContainerWithPlaylistMetadataMetadata withBanner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public MediaContainerWithPlaylistMetadataMetadata withChapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public MediaContainerWithPlaylistMetadataMetadata withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public MediaContainerWithPlaylistMetadataMetadata withContentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public MediaContainerWithPlaylistMetadataMetadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + + public MediaContainerWithPlaylistMetadataMetadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata withDirector(List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + + public MediaContainerWithPlaylistMetadataMetadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public MediaContainerWithPlaylistMetadataMetadata withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public MediaContainerWithPlaylistMetadataMetadata withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata withGenre(List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + + public MediaContainerWithPlaylistMetadataMetadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + /** + * The `art` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + + /** + * The `art` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The `hero` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + + /** + * The `hero` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + /** + * The `key` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + + /** + * The `key` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + /** + * The `theme` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + + /** + * The `theme` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + /** + * The `thumb` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The `title` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + + /** + * The `title` of the grandparent + */ + public MediaContainerWithPlaylistMetadataMetadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata withGuid(List guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + + public MediaContainerWithPlaylistMetadataMetadata withGuid(Optional> guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public MediaContainerWithPlaylistMetadataMetadata withHero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public MediaContainerWithPlaylistMetadataMetadata withHero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata withImage(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + + public MediaContainerWithPlaylistMetadataMetadata withImage(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public MediaContainerWithPlaylistMetadataMetadata withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public MediaContainerWithPlaylistMetadataMetadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public MediaContainerWithPlaylistMetadataMetadata withLastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public MediaContainerWithPlaylistMetadataMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata withMedia(List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + + public MediaContainerWithPlaylistMetadataMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public MediaContainerWithPlaylistMetadataMetadata withOriginallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public MediaContainerWithPlaylistMetadataMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public MediaContainerWithPlaylistMetadataMetadata withOriginalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public MediaContainerWithPlaylistMetadataMetadata withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + /** + * The `hero` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + + /** + * The `hero` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + /** + * The `index` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + + /** + * The `index` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The `key` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + + /** + * The `key` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The `ratingKey` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The `thumb` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + + /** + * The `thumb` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The `title` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + + /** + * The `title` of the parent + */ + public MediaContainerWithPlaylistMetadataMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public MediaContainerWithPlaylistMetadataMetadata withPrimaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public MediaContainerWithPlaylistMetadataMetadata withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public MediaContainerWithPlaylistMetadataMetadata withPrompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public MediaContainerWithPlaylistMetadataMetadata withPrompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public MediaContainerWithPlaylistMetadataMetadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public MediaContainerWithPlaylistMetadataMetadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata withRatingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + + public MediaContainerWithPlaylistMetadataMetadata withRatingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + /** + * Number of ratings under this metadata + */ + public MediaContainerWithPlaylistMetadataMetadata withRatingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + + /** + * Number of ratings under this metadata + */ + public MediaContainerWithPlaylistMetadataMetadata withRatingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public MediaContainerWithPlaylistMetadataMetadata withRatingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public MediaContainerWithPlaylistMetadataMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public MediaContainerWithPlaylistMetadataMetadata withRatingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public MediaContainerWithPlaylistMetadataMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata withRole(List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + + public MediaContainerWithPlaylistMetadataMetadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * Indicates this is a search directory + */ + public MediaContainerWithPlaylistMetadataMetadata withSearch(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + + /** + * Indicates this is a search directory + */ + public MediaContainerWithPlaylistMetadataMetadata withSearch(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public MediaContainerWithPlaylistMetadataMetadata withSecondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public MediaContainerWithPlaylistMetadataMetadata withSecondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public MediaContainerWithPlaylistMetadataMetadata withSkipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public MediaContainerWithPlaylistMetadataMetadata withSkipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public MediaContainerWithPlaylistMetadataMetadata withSkipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public MediaContainerWithPlaylistMetadataMetadata withSkipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public MediaContainerWithPlaylistMetadataMetadata withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public MediaContainerWithPlaylistMetadataMetadata withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public MediaContainerWithPlaylistMetadataMetadata withStudio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public MediaContainerWithPlaylistMetadataMetadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public MediaContainerWithPlaylistMetadataMetadata withSubtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public MediaContainerWithPlaylistMetadataMetadata withSubtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public MediaContainerWithPlaylistMetadataMetadata withSummary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public MediaContainerWithPlaylistMetadataMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public MediaContainerWithPlaylistMetadataMetadata withTagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public MediaContainerWithPlaylistMetadataMetadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public MediaContainerWithPlaylistMetadataMetadata withTheme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public MediaContainerWithPlaylistMetadataMetadata withTheme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public MediaContainerWithPlaylistMetadataMetadata withThumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public MediaContainerWithPlaylistMetadataMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public MediaContainerWithPlaylistMetadataMetadata withTitleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public MediaContainerWithPlaylistMetadataMetadata withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public MediaContainerWithPlaylistMetadataMetadata withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public MediaContainerWithPlaylistMetadataMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public MediaContainerWithPlaylistMetadataMetadata withUserRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public MediaContainerWithPlaylistMetadataMetadata withUserRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public MediaContainerWithPlaylistMetadataMetadata withViewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public MediaContainerWithPlaylistMetadataMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public MediaContainerWithPlaylistMetadataMetadata withViewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public MediaContainerWithPlaylistMetadataMetadata withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public MediaContainerWithPlaylistMetadataMetadata withViewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public MediaContainerWithPlaylistMetadataMetadata withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata withWriter(List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + + public MediaContainerWithPlaylistMetadataMetadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public MediaContainerWithPlaylistMetadataMetadata withYear(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public MediaContainerWithPlaylistMetadataMetadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + @JsonAnySetter + public MediaContainerWithPlaylistMetadataMetadata withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public MediaContainerWithPlaylistMetadataMetadata withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithPlaylistMetadataMetadata other = (MediaContainerWithPlaylistMetadataMetadata) o; + return + Utils.enhancedDeepEquals(this.readOnly, other.readOnly) && + Utils.enhancedDeepEquals(this.composite, other.composite) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && + Utils.enhancedDeepEquals(this.playlistType, other.playlistType) && + Utils.enhancedDeepEquals(this.smart, other.smart) && + Utils.enhancedDeepEquals(this.specialPlaylistType, other.specialPlaylistType) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.absoluteIndex, other.absoluteIndex) && + Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && + Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && + Utils.enhancedDeepEquals(this.autotag, other.autotag) && + Utils.enhancedDeepEquals(this.banner, other.banner) && + Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && + Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && + Utils.enhancedDeepEquals(this.country, other.country) && + Utils.enhancedDeepEquals(this.director, other.director) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.genre, other.genre) && + Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && + Utils.enhancedDeepEquals(this.grandparentHero, other.grandparentHero) && + Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && + Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && + Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && + Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && + Utils.enhancedDeepEquals(this.guid, other.guid) && + Utils.enhancedDeepEquals(this.hero, other.hero) && + Utils.enhancedDeepEquals(this.image, other.image) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && + Utils.enhancedDeepEquals(this.media, other.media) && + Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && + Utils.enhancedDeepEquals(this.parentHero, other.parentHero) && + Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && + Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && + Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && + Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && + Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && + Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && + Utils.enhancedDeepEquals(this.prompt, other.prompt) && + Utils.enhancedDeepEquals(this.rating, other.rating) && + Utils.enhancedDeepEquals(this.ratingArray, other.ratingArray) && + Utils.enhancedDeepEquals(this.ratingCount, other.ratingCount) && + Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.role, other.role) && + Utils.enhancedDeepEquals(this.search, other.search) && + Utils.enhancedDeepEquals(this.secondary, other.secondary) && + Utils.enhancedDeepEquals(this.skipChildren, other.skipChildren) && + Utils.enhancedDeepEquals(this.skipParent, other.skipParent) && + Utils.enhancedDeepEquals(this.sort, other.sort) && + Utils.enhancedDeepEquals(this.studio, other.studio) && + Utils.enhancedDeepEquals(this.subtype, other.subtype) && + Utils.enhancedDeepEquals(this.summary, other.summary) && + Utils.enhancedDeepEquals(this.tagline, other.tagline) && + Utils.enhancedDeepEquals(this.theme, other.theme) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.userRating, other.userRating) && + Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && + Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && + Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && + Utils.enhancedDeepEquals(this.writer, other.writer) && + Utils.enhancedDeepEquals(this.year, other.year) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + readOnly, composite, duration, + key, leafCount, playlistType, + smart, specialPlaylistType, title, + type, absoluteIndex, addedAt, + art, audienceRating, audienceRatingImage, + autotag, banner, chapterSource, + contentRating, country, director, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, lastViewedAt, media, + originallyAvailableAt, originalTitle, parentHero, + parentIndex, parentKey, parentRatingKey, + parentThumb, parentTitle, primaryExtraKey, + prompt, rating, ratingArray, + ratingCount, ratingImage, ratingKey, + role, search, secondary, + skipChildren, skipParent, sort, + studio, subtype, summary, + tagline, theme, thumb, + titleSort, updatedAt, userRating, + viewCount, viewedLeafCount, viewOffset, + writer, year, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithPlaylistMetadataMetadata.class, + "readOnly", readOnly, + "composite", composite, + "duration", duration, + "key", key, + "leafCount", leafCount, + "playlistType", playlistType, + "smart", smart, + "specialPlaylistType", specialPlaylistType, + "title", title, + "type", type, + "absoluteIndex", absoluteIndex, + "addedAt", addedAt, + "art", art, + "audienceRating", audienceRating, + "audienceRatingImage", audienceRatingImage, + "autotag", autotag, + "banner", banner, + "chapterSource", chapterSource, + "contentRating", contentRating, + "country", country, + "director", director, + "filter", filter, + "genre", genre, + "grandparentArt", grandparentArt, + "grandparentHero", grandparentHero, + "grandparentKey", grandparentKey, + "grandparentRatingKey", grandparentRatingKey, + "grandparentTheme", grandparentTheme, + "grandparentThumb", grandparentThumb, + "grandparentTitle", grandparentTitle, + "guid", guid, + "hero", hero, + "image", image, + "index", index, + "lastViewedAt", lastViewedAt, + "media", media, + "originallyAvailableAt", originallyAvailableAt, + "originalTitle", originalTitle, + "parentHero", parentHero, + "parentIndex", parentIndex, + "parentKey", parentKey, + "parentRatingKey", parentRatingKey, + "parentThumb", parentThumb, + "parentTitle", parentTitle, + "primaryExtraKey", primaryExtraKey, + "prompt", prompt, + "rating", rating, + "ratingArray", ratingArray, + "ratingCount", ratingCount, + "ratingImage", ratingImage, + "ratingKey", ratingKey, + "role", role, + "search", search, + "secondary", secondary, + "skipChildren", skipChildren, + "skipParent", skipParent, + "sort", sort, + "studio", studio, + "subtype", subtype, + "summary", summary, + "tagline", tagline, + "theme", theme, + "thumb", thumb, + "titleSort", titleSort, + "updatedAt", updatedAt, + "userRating", userRating, + "viewCount", viewCount, + "viewedLeafCount", viewedLeafCount, + "viewOffset", viewOffset, + "writer", writer, + "year", year, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional readOnly = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional playlistType = Optional.empty(); + + private Optional smart = Optional.empty(); + + private Optional specialPlaylistType = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional absoluteIndex = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional> autotag = Optional.empty(); + + private Optional banner = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional> filter = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentHero = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional grandparentRatingKey = Optional.empty(); + + private Optional grandparentTheme = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional> guid = Optional.empty(); + + private Optional hero = Optional.empty(); + + private Optional> image = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional originalTitle = Optional.empty(); + + private Optional parentHero = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional prompt = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional> ratingArray = Optional.empty(); + + private Optional ratingCount = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Optional search = Optional.empty(); + + private Optional secondary = Optional.empty(); + + private Optional skipChildren = Optional.empty(); + + private Optional skipParent = Optional.empty(); + + private Optional> sort = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional subtype = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional theme = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional userRating = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional viewedLeafCount = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional year = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + /** + * If we return this as true then this playlist cannot be altered or deleted directly by the client. + */ + public Builder readOnly(boolean readOnly) { + Utils.checkNotNull(readOnly, "readOnly"); + this.readOnly = Optional.ofNullable(readOnly); + return this; + } + + /** + * If we return this as true then this playlist cannot be altered or deleted directly by the client. + */ + public Builder readOnly(Optional readOnly) { + Utils.checkNotNull(readOnly, "readOnly"); + this.readOnly = readOnly; + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + + /** + * The type of the playlist. + */ + public Builder playlistType(PlaylistType playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = Optional.ofNullable(playlistType); + return this; + } + + /** + * The type of the playlist. + */ + public Builder playlistType(Optional playlistType) { + Utils.checkNotNull(playlistType, "playlistType"); + this.playlistType = playlistType; + return this; + } + + + /** + * Whether or not the playlist is smart. + */ + public Builder smart(boolean smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = Optional.ofNullable(smart); + return this; + } + + /** + * Whether or not the playlist is smart. + */ + public Builder smart(Optional smart) { + Utils.checkNotNull(smart, "smart"); + this.smart = smart; + return this; + } + + + /** + * If this is a special playlist, this returns its type (e.g. favorites). + */ + public Builder specialPlaylistType(String specialPlaylistType) { + Utils.checkNotNull(specialPlaylistType, "specialPlaylistType"); + this.specialPlaylistType = Optional.ofNullable(specialPlaylistType); + return this; + } + + /** + * If this is a special playlist, this returns its type (e.g. favorites). + */ + public Builder specialPlaylistType(Optional specialPlaylistType) { + Utils.checkNotNull(specialPlaylistType, "specialPlaylistType"); + this.specialPlaylistType = specialPlaylistType; + return this; + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + + public Builder autotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + public Builder autotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + 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); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + 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; + } + + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + + public Builder guid(List 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; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + 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; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + 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; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + + /** + * The `hero` of the parent + */ + public Builder parentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + /** + * The `hero` of the parent + */ + public Builder parentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + + /** + * The `index` of the parent + */ + public Builder parentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The `index` of the parent + */ + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + + /** + * The `key` of the parent + */ + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The `key` of the parent + */ + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + + /** + * The `title` of the parent + */ + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The `title` of the parent + */ + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + + public Builder ratingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + public Builder ratingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + 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; + } + + + /** + * Indicates this is a search directory + */ + public Builder search(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + /** + * Indicates this is a search directory + */ + public Builder search(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + 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; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public MediaContainerWithPlaylistMetadataMetadata build() { + + return new MediaContainerWithPlaylistMetadataMetadata( + readOnly, composite, duration, + key, leafCount, playlistType, + smart, specialPlaylistType, title, + type, absoluteIndex, addedAt, + art, audienceRating, audienceRatingImage, + autotag, banner, chapterSource, + contentRating, country, director, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, lastViewedAt, media, + originallyAvailableAt, originalTitle, parentHero, + parentIndex, parentKey, parentRatingKey, + parentThumb, parentTitle, primaryExtraKey, + prompt, rating, ratingArray, + ratingCount, ratingImage, ratingKey, + role, search, secondary, + skipChildren, skipParent, sort, + studio, subtype, summary, + tagline, theme, thumb, + titleSort, updatedAt, userRating, + viewCount, viewedLeafCount, viewOffset, + writer, year) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSettings.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSettings.java new file mode 100644 index 00000000..10900c72 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSettings.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class MediaContainerWithSettings { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithSettings( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithSettings() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithSettings withMediaContainer(MediaContainerWithSettingsMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithSettings 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; + } + MediaContainerWithSettings other = (MediaContainerWithSettings) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithSettings.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithSettingsMediaContainer 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 MediaContainerWithSettings build() { + + return new MediaContainerWithSettings( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSettingsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSettingsMediaContainer.java new file mode 100644 index 00000000..4652d8c7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSettingsMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithSettingsMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithSettingsMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Setting") + private Optional> setting; + + @JsonCreator + public MediaContainerWithSettingsMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("Setting") Optional> setting) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(setting, "setting"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.setting = setting; + } + + public MediaContainerWithSettingsMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> setting() { + return (Optional>) setting; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithSettingsMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithSettingsMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithSettingsMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithSettingsMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithSettingsMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithSettingsMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithSettingsMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithSettingsMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainerWithSettingsMediaContainer withSetting(List setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = Optional.ofNullable(setting); + return this; + } + + + public MediaContainerWithSettingsMediaContainer withSetting(Optional> setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = setting; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithSettingsMediaContainer other = (MediaContainerWithSettingsMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.setting, other.setting); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, setting); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithSettingsMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "setting", setting); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> setting = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder setting(List setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = Optional.ofNullable(setting); + return this; + } + + public Builder setting(Optional> setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = setting; + return this; + } + + public MediaContainerWithSettingsMediaContainer build() { + + return new MediaContainerWithSettingsMediaContainer( + identifier, offset, size, + totalSize, setting); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSubscription.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSubscription.java new file mode 100644 index 00000000..a429a90f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSubscription.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class MediaContainerWithSubscription { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public MediaContainerWithSubscription( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public MediaContainerWithSubscription() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithSubscription withMediaContainer(MediaContainerWithSubscriptionMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public MediaContainerWithSubscription 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; + } + MediaContainerWithSubscription other = (MediaContainerWithSubscription) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithSubscription.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(MediaContainerWithSubscriptionMediaContainer 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 MediaContainerWithSubscription build() { + + return new MediaContainerWithSubscription( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSubscriptionMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSubscriptionMediaContainer.java new file mode 100644 index 00000000..40830726 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaContainerWithSubscriptionMediaContainer.java @@ -0,0 +1,330 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * MediaContainerWithSubscriptionMediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class MediaContainerWithSubscriptionMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaSubscription") + private Optional> mediaSubscription; + + @JsonCreator + public MediaContainerWithSubscriptionMediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("MediaSubscription") Optional> mediaSubscription) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.mediaSubscription = mediaSubscription; + } + + public MediaContainerWithSubscriptionMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> mediaSubscription() { + return (Optional>) mediaSubscription; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaContainerWithSubscriptionMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public MediaContainerWithSubscriptionMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithSubscriptionMediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public MediaContainerWithSubscriptionMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public MediaContainerWithSubscriptionMediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public MediaContainerWithSubscriptionMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithSubscriptionMediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public MediaContainerWithSubscriptionMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public MediaContainerWithSubscriptionMediaContainer withMediaSubscription(List mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = Optional.ofNullable(mediaSubscription); + return this; + } + + + public MediaContainerWithSubscriptionMediaContainer withMediaSubscription(Optional> mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = mediaSubscription; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaContainerWithSubscriptionMediaContainer other = (MediaContainerWithSubscriptionMediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.mediaSubscription, other.mediaSubscription); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, mediaSubscription); + } + + @Override + public String toString() { + return Utils.toString(MediaContainerWithSubscriptionMediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "mediaSubscription", mediaSubscription); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional> mediaSubscription = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder mediaSubscription(List mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = Optional.ofNullable(mediaSubscription); + return this; + } + + public Builder mediaSubscription(Optional> mediaSubscription) { + Utils.checkNotNull(mediaSubscription, "mediaSubscription"); + this.mediaSubscription = mediaSubscription; + return this; + } + + public MediaContainerWithSubscriptionMediaContainer build() { + + return new MediaContainerWithSubscriptionMediaContainer( + identifier, offset, size, + totalSize, mediaSubscription); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaGrabOperation.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaGrabOperation.java new file mode 100644 index 00000000..4bd583cc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaGrabOperation.java @@ -0,0 +1,600 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +/** + * MediaGrabOperation + * + *

A media grab opration represents a scheduled or active recording of media + */ +public class MediaGrabOperation { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currentSize") + private Optional currentSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grabberIdentifier") + private Optional grabberIdentifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grabberProtocol") + private Optional grabberProtocol; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaIndex") + private Optional mediaIndex; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaSubscriptionID") + private Optional mediaSubscriptionID; + + /** + * Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional metadata; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("percent") + private Optional percent; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("provider") + private Optional provider; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + @JsonCreator + public MediaGrabOperation( + @JsonProperty("currentSize") Optional currentSize, + @JsonProperty("grabberIdentifier") Optional grabberIdentifier, + @JsonProperty("grabberProtocol") Optional grabberProtocol, + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("mediaIndex") Optional mediaIndex, + @JsonProperty("mediaSubscriptionID") Optional mediaSubscriptionID, + @JsonProperty("Metadata") Optional metadata, + @JsonProperty("percent") Optional percent, + @JsonProperty("provider") Optional provider, + @JsonProperty("status") Optional status) { + Utils.checkNotNull(currentSize, "currentSize"); + Utils.checkNotNull(grabberIdentifier, "grabberIdentifier"); + Utils.checkNotNull(grabberProtocol, "grabberProtocol"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(mediaIndex, "mediaIndex"); + Utils.checkNotNull(mediaSubscriptionID, "mediaSubscriptionID"); + Utils.checkNotNull(metadata, "metadata"); + Utils.checkNotNull(percent, "percent"); + Utils.checkNotNull(provider, "provider"); + Utils.checkNotNull(status, "status"); + this.currentSize = currentSize; + this.grabberIdentifier = grabberIdentifier; + this.grabberProtocol = grabberProtocol; + this.id = id; + this.key = key; + this.mediaIndex = mediaIndex; + this.mediaSubscriptionID = mediaSubscriptionID; + this.metadata = metadata; + this.percent = percent; + this.provider = provider; + this.status = status; + } + + public MediaGrabOperation() { + this(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 currentSize() { + return currentSize; + } + + @JsonIgnore + public Optional grabberIdentifier() { + return grabberIdentifier; + } + + @JsonIgnore + public Optional grabberProtocol() { + return grabberProtocol; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional mediaIndex() { + return mediaIndex; + } + + @JsonIgnore + public Optional mediaSubscriptionID() { + return mediaSubscriptionID; + } + + /** + * Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional metadata() { + return (Optional) metadata; + } + + @JsonIgnore + public Optional percent() { + return percent; + } + + @JsonIgnore + public Optional provider() { + return provider; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaGrabOperation withCurrentSize(long currentSize) { + Utils.checkNotNull(currentSize, "currentSize"); + this.currentSize = Optional.ofNullable(currentSize); + return this; + } + + + public MediaGrabOperation withCurrentSize(Optional currentSize) { + Utils.checkNotNull(currentSize, "currentSize"); + this.currentSize = currentSize; + return this; + } + + public MediaGrabOperation withGrabberIdentifier(String grabberIdentifier) { + Utils.checkNotNull(grabberIdentifier, "grabberIdentifier"); + this.grabberIdentifier = Optional.ofNullable(grabberIdentifier); + return this; + } + + + public MediaGrabOperation withGrabberIdentifier(Optional grabberIdentifier) { + Utils.checkNotNull(grabberIdentifier, "grabberIdentifier"); + this.grabberIdentifier = grabberIdentifier; + return this; + } + + public MediaGrabOperation withGrabberProtocol(String grabberProtocol) { + Utils.checkNotNull(grabberProtocol, "grabberProtocol"); + this.grabberProtocol = Optional.ofNullable(grabberProtocol); + return this; + } + + + public MediaGrabOperation withGrabberProtocol(Optional grabberProtocol) { + Utils.checkNotNull(grabberProtocol, "grabberProtocol"); + this.grabberProtocol = grabberProtocol; + return this; + } + + public MediaGrabOperation withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public MediaGrabOperation withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public MediaGrabOperation withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public MediaGrabOperation withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public MediaGrabOperation withMediaIndex(long mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = Optional.ofNullable(mediaIndex); + return this; + } + + + public MediaGrabOperation withMediaIndex(Optional mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + public MediaGrabOperation withMediaSubscriptionID(long mediaSubscriptionID) { + Utils.checkNotNull(mediaSubscriptionID, "mediaSubscriptionID"); + this.mediaSubscriptionID = Optional.ofNullable(mediaSubscriptionID); + return this; + } + + + public MediaGrabOperation withMediaSubscriptionID(Optional mediaSubscriptionID) { + Utils.checkNotNull(mediaSubscriptionID, "mediaSubscriptionID"); + this.mediaSubscriptionID = mediaSubscriptionID; + return this; + } + + /** + * Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ + public MediaGrabOperation withMetadata(Metadata metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + + /** + * Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ + public MediaGrabOperation withMetadata(Optional metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + public MediaGrabOperation withPercent(double percent) { + Utils.checkNotNull(percent, "percent"); + this.percent = Optional.ofNullable(percent); + return this; + } + + + public MediaGrabOperation withPercent(Optional percent) { + Utils.checkNotNull(percent, "percent"); + this.percent = percent; + return this; + } + + public MediaGrabOperation withProvider(String provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = Optional.ofNullable(provider); + return this; + } + + + public MediaGrabOperation withProvider(Optional provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = provider; + return this; + } + + public MediaGrabOperation withStatus(Status status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + public MediaGrabOperation withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaGrabOperation other = (MediaGrabOperation) o; + return + Utils.enhancedDeepEquals(this.currentSize, other.currentSize) && + Utils.enhancedDeepEquals(this.grabberIdentifier, other.grabberIdentifier) && + Utils.enhancedDeepEquals(this.grabberProtocol, other.grabberProtocol) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.mediaIndex, other.mediaIndex) && + Utils.enhancedDeepEquals(this.mediaSubscriptionID, other.mediaSubscriptionID) && + Utils.enhancedDeepEquals(this.metadata, other.metadata) && + Utils.enhancedDeepEquals(this.percent, other.percent) && + Utils.enhancedDeepEquals(this.provider, other.provider) && + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + currentSize, grabberIdentifier, grabberProtocol, + id, key, mediaIndex, + mediaSubscriptionID, metadata, percent, + provider, status); + } + + @Override + public String toString() { + return Utils.toString(MediaGrabOperation.class, + "currentSize", currentSize, + "grabberIdentifier", grabberIdentifier, + "grabberProtocol", grabberProtocol, + "id", id, + "key", key, + "mediaIndex", mediaIndex, + "mediaSubscriptionID", mediaSubscriptionID, + "metadata", metadata, + "percent", percent, + "provider", provider, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional currentSize = Optional.empty(); + + private Optional grabberIdentifier = Optional.empty(); + + private Optional grabberProtocol = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional mediaIndex = Optional.empty(); + + private Optional mediaSubscriptionID = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional percent = Optional.empty(); + + private Optional provider = Optional.empty(); + + private Optional status = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder currentSize(long currentSize) { + Utils.checkNotNull(currentSize, "currentSize"); + this.currentSize = Optional.ofNullable(currentSize); + return this; + } + + public Builder currentSize(Optional currentSize) { + Utils.checkNotNull(currentSize, "currentSize"); + this.currentSize = currentSize; + return this; + } + + + public Builder grabberIdentifier(String grabberIdentifier) { + Utils.checkNotNull(grabberIdentifier, "grabberIdentifier"); + this.grabberIdentifier = Optional.ofNullable(grabberIdentifier); + return this; + } + + public Builder grabberIdentifier(Optional grabberIdentifier) { + Utils.checkNotNull(grabberIdentifier, "grabberIdentifier"); + this.grabberIdentifier = grabberIdentifier; + return this; + } + + + public Builder grabberProtocol(String grabberProtocol) { + Utils.checkNotNull(grabberProtocol, "grabberProtocol"); + this.grabberProtocol = Optional.ofNullable(grabberProtocol); + return this; + } + + public Builder grabberProtocol(Optional grabberProtocol) { + Utils.checkNotNull(grabberProtocol, "grabberProtocol"); + this.grabberProtocol = grabberProtocol; + return this; + } + + + public Builder id(String 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 mediaIndex(long mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = Optional.ofNullable(mediaIndex); + return this; + } + + public Builder mediaIndex(Optional mediaIndex) { + Utils.checkNotNull(mediaIndex, "mediaIndex"); + this.mediaIndex = mediaIndex; + return this; + } + + + public Builder mediaSubscriptionID(long mediaSubscriptionID) { + Utils.checkNotNull(mediaSubscriptionID, "mediaSubscriptionID"); + this.mediaSubscriptionID = Optional.ofNullable(mediaSubscriptionID); + return this; + } + + public Builder mediaSubscriptionID(Optional mediaSubscriptionID) { + Utils.checkNotNull(mediaSubscriptionID, "mediaSubscriptionID"); + this.mediaSubscriptionID = mediaSubscriptionID; + return this; + } + + + /** + * Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ + public Builder metadata(Metadata metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + /** + * Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ + public Builder metadata(Optional metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + + public Builder percent(double percent) { + Utils.checkNotNull(percent, "percent"); + this.percent = Optional.ofNullable(percent); + return this; + } + + public Builder percent(Optional percent) { + Utils.checkNotNull(percent, "percent"); + this.percent = percent; + return this; + } + + + public Builder provider(String provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = Optional.ofNullable(provider); + return this; + } + + public Builder provider(Optional provider) { + Utils.checkNotNull(provider, "provider"); + this.provider = provider; + return this; + } + + + public Builder status(Status status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public MediaGrabOperation build() { + + return new MediaGrabOperation( + currentSize, grabberIdentifier, grabberProtocol, + id, key, mediaIndex, + mediaSubscriptionID, metadata, percent, + provider, status); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaQuery.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaQuery.java new file mode 100644 index 00000000..8e355e85 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaQuery.java @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; + + +public class MediaQuery { + @JsonCreator + public MediaQuery() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(MediaQuery.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public MediaQuery build() { + + return new MediaQuery( + ); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MediaSubscription.java b/src/main/java/dev/plexapi/sdk/models/shared/MediaSubscription.java new file mode 100644 index 00000000..1ad6396d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MediaSubscription.java @@ -0,0 +1,922 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * MediaSubscription + * + *

A media subscription contains a representation of metadata desired to be recorded + */ +public class MediaSubscription { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The metadata type of the root item of the subscription + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("airingsType") + private Optional airingsType; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("createdAt") + private Optional createdAt; + + /** + * Media Matching Hints + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + /** + * Only included if `includeStorage` is specified + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("durationTotal") + private Optional durationTotal; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("locationPath") + private Optional locationPath; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaGrabOperation") + private Optional> mediaGrabOperation; + + /** + * Media Matching Hints + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Playlist") + private Optional> playlist; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Setting") + private Optional> setting; + + /** + * Only included if `includeStorage` is specified + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("storageTotal") + private Optional storageTotal; + + /** + * The library section id for where the item is to be recorded + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("targetLibrarySectionID") + private Optional targetLibrarySectionID; + + /** + * The library section location id for where the item is to be recorded + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("targetSectionLocationID") + private Optional targetSectionLocationID; + + /** + * Media Matching Hints + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Video") + private Optional> video; + + @JsonCreator + public MediaSubscription( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("airingsType") Optional airingsType, + @JsonProperty("createdAt") Optional createdAt, + @JsonProperty("Directory") Optional> directory, + @JsonProperty("durationTotal") Optional durationTotal, + @JsonProperty("key") Optional key, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("locationPath") Optional locationPath, + @JsonProperty("MediaGrabOperation") Optional> mediaGrabOperation, + @JsonProperty("Playlist") Optional> playlist, + @JsonProperty("Setting") Optional> setting, + @JsonProperty("storageTotal") Optional storageTotal, + @JsonProperty("targetLibrarySectionID") Optional targetLibrarySectionID, + @JsonProperty("targetSectionLocationID") Optional targetSectionLocationID, + @JsonProperty("Video") Optional> video) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(airingsType, "airingsType"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(directory, "directory"); + Utils.checkNotNull(durationTotal, "durationTotal"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(locationPath, "locationPath"); + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + Utils.checkNotNull(playlist, "playlist"); + Utils.checkNotNull(setting, "setting"); + Utils.checkNotNull(storageTotal, "storageTotal"); + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + Utils.checkNotNull(video, "video"); + this.title = title; + this.type = type; + this.airingsType = airingsType; + this.createdAt = createdAt; + this.directory = directory; + this.durationTotal = durationTotal; + this.key = key; + this.librarySectionTitle = librarySectionTitle; + this.locationPath = locationPath; + this.mediaGrabOperation = mediaGrabOperation; + this.playlist = playlist; + this.setting = setting; + this.storageTotal = storageTotal; + this.targetLibrarySectionID = targetLibrarySectionID; + this.targetSectionLocationID = targetSectionLocationID; + this.video = video; + } + + public MediaSubscription() { + 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 title() { + return title; + } + + /** + * The metadata type of the root item of the subscription + */ + @JsonIgnore + public Optional type() { + return type; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional airingsType() { + return (Optional) airingsType; + } + + @JsonIgnore + public Optional createdAt() { + return createdAt; + } + + /** + * Media Matching Hints + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + /** + * Only included if `includeStorage` is specified + */ + @JsonIgnore + public Optional durationTotal() { + return durationTotal; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + @JsonIgnore + public Optional locationPath() { + return locationPath; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> mediaGrabOperation() { + return (Optional>) mediaGrabOperation; + } + + /** + * Media Matching Hints + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> playlist() { + return (Optional>) playlist; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> setting() { + return (Optional>) setting; + } + + /** + * Only included if `includeStorage` is specified + */ + @JsonIgnore + public Optional storageTotal() { + return storageTotal; + } + + /** + * The library section id for where the item is to be recorded + */ + @JsonIgnore + public Optional targetLibrarySectionID() { + return targetLibrarySectionID; + } + + /** + * The library section location id for where the item is to be recorded + */ + @JsonIgnore + public Optional targetSectionLocationID() { + return targetSectionLocationID; + } + + /** + * Media Matching Hints + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> video() { + return (Optional>) video; + } + + public static Builder builder() { + return new Builder(); + } + + + public MediaSubscription withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public MediaSubscription withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The metadata type of the root item of the subscription + */ + public MediaSubscription withType(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The metadata type of the root item of the subscription + */ + public MediaSubscription withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public MediaSubscription withAiringsType(AiringsType airingsType) { + Utils.checkNotNull(airingsType, "airingsType"); + this.airingsType = Optional.ofNullable(airingsType); + return this; + } + + + public MediaSubscription withAiringsType(Optional airingsType) { + Utils.checkNotNull(airingsType, "airingsType"); + this.airingsType = airingsType; + return this; + } + + public MediaSubscription withCreatedAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + + public MediaSubscription withCreatedAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Media Matching Hints + */ + public MediaSubscription withDirectory(Map directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + /** + * Media Matching Hints + */ + public MediaSubscription withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + /** + * Only included if `includeStorage` is specified + */ + public MediaSubscription withDurationTotal(long durationTotal) { + Utils.checkNotNull(durationTotal, "durationTotal"); + this.durationTotal = Optional.ofNullable(durationTotal); + return this; + } + + + /** + * Only included if `includeStorage` is specified + */ + public MediaSubscription withDurationTotal(Optional durationTotal) { + Utils.checkNotNull(durationTotal, "durationTotal"); + this.durationTotal = durationTotal; + return this; + } + + public MediaSubscription withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public MediaSubscription withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public MediaSubscription withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + + public MediaSubscription withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public MediaSubscription withLocationPath(String locationPath) { + Utils.checkNotNull(locationPath, "locationPath"); + this.locationPath = Optional.ofNullable(locationPath); + return this; + } + + + public MediaSubscription withLocationPath(Optional locationPath) { + Utils.checkNotNull(locationPath, "locationPath"); + this.locationPath = locationPath; + return this; + } + + public MediaSubscription withMediaGrabOperation(List mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = Optional.ofNullable(mediaGrabOperation); + return this; + } + + + public MediaSubscription withMediaGrabOperation(Optional> mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = mediaGrabOperation; + return this; + } + + /** + * Media Matching Hints + */ + public MediaSubscription withPlaylist(Map playlist) { + Utils.checkNotNull(playlist, "playlist"); + this.playlist = Optional.ofNullable(playlist); + return this; + } + + + /** + * Media Matching Hints + */ + public MediaSubscription withPlaylist(Optional> playlist) { + Utils.checkNotNull(playlist, "playlist"); + this.playlist = playlist; + return this; + } + + public MediaSubscription withSetting(List setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = Optional.ofNullable(setting); + return this; + } + + + public MediaSubscription withSetting(Optional> setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = setting; + return this; + } + + /** + * Only included if `includeStorage` is specified + */ + public MediaSubscription withStorageTotal(long storageTotal) { + Utils.checkNotNull(storageTotal, "storageTotal"); + this.storageTotal = Optional.ofNullable(storageTotal); + return this; + } + + + /** + * Only included if `includeStorage` is specified + */ + public MediaSubscription withStorageTotal(Optional storageTotal) { + Utils.checkNotNull(storageTotal, "storageTotal"); + this.storageTotal = storageTotal; + return this; + } + + /** + * The library section id for where the item is to be recorded + */ + public MediaSubscription withTargetLibrarySectionID(long targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = Optional.ofNullable(targetLibrarySectionID); + return this; + } + + + /** + * The library section id for where the item is to be recorded + */ + public MediaSubscription withTargetLibrarySectionID(Optional targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = targetLibrarySectionID; + return this; + } + + /** + * The library section location id for where the item is to be recorded + */ + public MediaSubscription withTargetSectionLocationID(long targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = Optional.ofNullable(targetSectionLocationID); + return this; + } + + + /** + * The library section location id for where the item is to be recorded + */ + public MediaSubscription withTargetSectionLocationID(Optional targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = targetSectionLocationID; + return this; + } + + /** + * Media Matching Hints + */ + public MediaSubscription withVideo(Map video) { + Utils.checkNotNull(video, "video"); + this.video = Optional.ofNullable(video); + return this; + } + + + /** + * Media Matching Hints + */ + public MediaSubscription withVideo(Optional> video) { + Utils.checkNotNull(video, "video"); + this.video = video; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MediaSubscription other = (MediaSubscription) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.airingsType, other.airingsType) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.directory, other.directory) && + Utils.enhancedDeepEquals(this.durationTotal, other.durationTotal) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.librarySectionTitle, other.librarySectionTitle) && + Utils.enhancedDeepEquals(this.locationPath, other.locationPath) && + Utils.enhancedDeepEquals(this.mediaGrabOperation, other.mediaGrabOperation) && + Utils.enhancedDeepEquals(this.playlist, other.playlist) && + Utils.enhancedDeepEquals(this.setting, other.setting) && + Utils.enhancedDeepEquals(this.storageTotal, other.storageTotal) && + Utils.enhancedDeepEquals(this.targetLibrarySectionID, other.targetLibrarySectionID) && + Utils.enhancedDeepEquals(this.targetSectionLocationID, other.targetSectionLocationID) && + Utils.enhancedDeepEquals(this.video, other.video); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, airingsType, + createdAt, directory, durationTotal, + key, librarySectionTitle, locationPath, + mediaGrabOperation, playlist, setting, + storageTotal, targetLibrarySectionID, targetSectionLocationID, + video); + } + + @Override + public String toString() { + return Utils.toString(MediaSubscription.class, + "title", title, + "type", type, + "airingsType", airingsType, + "createdAt", createdAt, + "directory", directory, + "durationTotal", durationTotal, + "key", key, + "librarySectionTitle", librarySectionTitle, + "locationPath", locationPath, + "mediaGrabOperation", mediaGrabOperation, + "playlist", playlist, + "setting", setting, + "storageTotal", storageTotal, + "targetLibrarySectionID", targetLibrarySectionID, + "targetSectionLocationID", targetSectionLocationID, + "video", video); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional airingsType = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Optional durationTotal = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional locationPath = Optional.empty(); + + private Optional> mediaGrabOperation = Optional.empty(); + + private Optional> playlist = Optional.empty(); + + private Optional> setting = Optional.empty(); + + private Optional storageTotal = Optional.empty(); + + private Optional targetLibrarySectionID = Optional.empty(); + + private Optional targetSectionLocationID = Optional.empty(); + + private Optional> video = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The metadata type of the root item of the subscription + */ + public Builder type(long type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The metadata type of the root item of the subscription + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + public Builder airingsType(AiringsType airingsType) { + Utils.checkNotNull(airingsType, "airingsType"); + this.airingsType = Optional.ofNullable(airingsType); + return this; + } + + public Builder airingsType(Optional airingsType) { + Utils.checkNotNull(airingsType, "airingsType"); + this.airingsType = airingsType; + return this; + } + + + public Builder createdAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + /** + * Media Matching Hints + */ + public Builder directory(Map directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + /** + * Media Matching Hints + */ + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + + /** + * Only included if `includeStorage` is specified + */ + public Builder durationTotal(long durationTotal) { + Utils.checkNotNull(durationTotal, "durationTotal"); + this.durationTotal = Optional.ofNullable(durationTotal); + return this; + } + + /** + * Only included if `includeStorage` is specified + */ + public Builder durationTotal(Optional durationTotal) { + Utils.checkNotNull(durationTotal, "durationTotal"); + this.durationTotal = durationTotal; + 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 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 locationPath(String locationPath) { + Utils.checkNotNull(locationPath, "locationPath"); + this.locationPath = Optional.ofNullable(locationPath); + return this; + } + + public Builder locationPath(Optional locationPath) { + Utils.checkNotNull(locationPath, "locationPath"); + this.locationPath = locationPath; + return this; + } + + + public Builder mediaGrabOperation(List mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = Optional.ofNullable(mediaGrabOperation); + return this; + } + + public Builder mediaGrabOperation(Optional> mediaGrabOperation) { + Utils.checkNotNull(mediaGrabOperation, "mediaGrabOperation"); + this.mediaGrabOperation = mediaGrabOperation; + return this; + } + + + /** + * Media Matching Hints + */ + public Builder playlist(Map playlist) { + Utils.checkNotNull(playlist, "playlist"); + this.playlist = Optional.ofNullable(playlist); + return this; + } + + /** + * Media Matching Hints + */ + public Builder playlist(Optional> playlist) { + Utils.checkNotNull(playlist, "playlist"); + this.playlist = playlist; + return this; + } + + + public Builder setting(List setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = Optional.ofNullable(setting); + return this; + } + + public Builder setting(Optional> setting) { + Utils.checkNotNull(setting, "setting"); + this.setting = setting; + return this; + } + + + /** + * Only included if `includeStorage` is specified + */ + public Builder storageTotal(long storageTotal) { + Utils.checkNotNull(storageTotal, "storageTotal"); + this.storageTotal = Optional.ofNullable(storageTotal); + return this; + } + + /** + * Only included if `includeStorage` is specified + */ + public Builder storageTotal(Optional storageTotal) { + Utils.checkNotNull(storageTotal, "storageTotal"); + this.storageTotal = storageTotal; + return this; + } + + + /** + * The library section id for where the item is to be recorded + */ + public Builder targetLibrarySectionID(long targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = Optional.ofNullable(targetLibrarySectionID); + return this; + } + + /** + * The library section id for where the item is to be recorded + */ + public Builder targetLibrarySectionID(Optional targetLibrarySectionID) { + Utils.checkNotNull(targetLibrarySectionID, "targetLibrarySectionID"); + this.targetLibrarySectionID = targetLibrarySectionID; + return this; + } + + + /** + * The library section location id for where the item is to be recorded + */ + public Builder targetSectionLocationID(long targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = Optional.ofNullable(targetSectionLocationID); + return this; + } + + /** + * The library section location id for where the item is to be recorded + */ + public Builder targetSectionLocationID(Optional targetSectionLocationID) { + Utils.checkNotNull(targetSectionLocationID, "targetSectionLocationID"); + this.targetSectionLocationID = targetSectionLocationID; + return this; + } + + + /** + * Media Matching Hints + */ + public Builder video(Map video) { + Utils.checkNotNull(video, "video"); + this.video = Optional.ofNullable(video); + return this; + } + + /** + * Media Matching Hints + */ + public Builder video(Optional> video) { + Utils.checkNotNull(video, "video"); + this.video = video; + return this; + } + + public MediaSubscription build() { + + return new MediaSubscription( + title, type, airingsType, + createdAt, directory, durationTotal, + key, librarySectionTitle, locationPath, + mediaGrabOperation, playlist, setting, + storageTotal, targetLibrarySectionID, targetSectionLocationID, + video); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Metadata.java b/src/main/java/dev/plexapi/sdk/models/shared/Metadata.java new file mode 100644 index 00000000..010e27e5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Metadata.java @@ -0,0 +1,4080 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * Metadata + * + *

Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ +public class Metadata { + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("absoluteIndex") + private Optional absoluteIndex; + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + /** + * When present, the URL for the background artwork for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Autotag") + private Optional> autotag; + + /** + * When present, the URL for a banner graphic for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("banner") + private Optional banner; + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Filter") + private Optional> filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + /** + * The `art` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + /** + * The `hero` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentHero") + private Optional grandparentHero; + + /** + * The `key` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + /** + * The `ratingKey` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + /** + * The `theme` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTheme") + private Optional grandparentTheme; + + /** + * The `thumb` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + /** + * The `title` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guid; + + /** + * When present, the URL for a hero image for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hero") + private Optional hero; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Image") + private Optional> image; + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originalTitle") + private Optional originalTitle; + + /** + * The `hero` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentHero") + private Optional parentHero; + + /** + * The `index` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + /** + * The `key` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + /** + * The `ratingKey` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + /** + * The `thumb` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + /** + * The `title` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("prompt") + private Optional prompt; + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Rating") + private Optional> ratingArray; + + /** + * Number of ratings under this metadata + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingCount") + private Optional ratingCount; + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + /** + * Indicates this is a search directory + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("search") + private Optional search; + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secondary") + private Optional secondary; + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipChildren") + private Optional skipChildren; + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipParent") + private Optional skipParent; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Sort") + private Optional> sort; + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtype") + private Optional subtype; + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("theme") + private Optional theme; + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userRating") + private Optional userRating; + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public Metadata( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("absoluteIndex") Optional absoluteIndex, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("art") Optional art, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("Autotag") Optional> autotag, + @JsonProperty("banner") Optional banner, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("composite") Optional composite, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("Country") Optional> country, + @JsonProperty("Director") Optional> director, + @JsonProperty("duration") Optional duration, + @JsonProperty("Filter") Optional> filter, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("grandparentHero") Optional grandparentHero, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("Guid") Optional> guid, + @JsonProperty("hero") Optional hero, + @JsonProperty("Image") Optional> image, + @JsonProperty("index") Optional index, + @JsonProperty("key") Optional key, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("Media") Optional> media, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("parentHero") Optional parentHero, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("prompt") Optional prompt, + @JsonProperty("rating") Optional rating, + @JsonProperty("Rating") Optional> ratingArray, + @JsonProperty("ratingCount") Optional ratingCount, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("Role") Optional> role, + @JsonProperty("search") Optional search, + @JsonProperty("secondary") Optional secondary, + @JsonProperty("skipChildren") Optional skipChildren, + @JsonProperty("skipParent") Optional skipParent, + @JsonProperty("Sort") Optional> sort, + @JsonProperty("studio") Optional studio, + @JsonProperty("subtype") Optional subtype, + @JsonProperty("summary") Optional summary, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("theme") Optional theme, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("userRating") Optional userRating, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("year") Optional year) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(autotag, "autotag"); + Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(grandparentHero, "grandparentHero"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(hero, "hero"); + Utils.checkNotNull(image, "image"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(parentHero, "parentHero"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(prompt, "prompt"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(ratingArray, "ratingArray"); + Utils.checkNotNull(ratingCount, "ratingCount"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(search, "search"); + Utils.checkNotNull(secondary, "secondary"); + Utils.checkNotNull(skipChildren, "skipChildren"); + Utils.checkNotNull(skipParent, "skipParent"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(subtype, "subtype"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(userRating, "userRating"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(year, "year"); + this.title = title; + this.type = type; + this.absoluteIndex = absoluteIndex; + this.addedAt = addedAt; + this.art = art; + this.audienceRating = audienceRating; + this.audienceRatingImage = audienceRatingImage; + this.autotag = autotag; + this.banner = banner; + this.chapterSource = chapterSource; + this.composite = composite; + this.contentRating = contentRating; + this.country = country; + this.director = director; + this.duration = duration; + this.filter = filter; + this.genre = genre; + this.grandparentArt = grandparentArt; + this.grandparentHero = grandparentHero; + this.grandparentKey = grandparentKey; + this.grandparentRatingKey = grandparentRatingKey; + this.grandparentTheme = grandparentTheme; + this.grandparentThumb = grandparentThumb; + this.grandparentTitle = grandparentTitle; + this.guid = guid; + this.hero = hero; + this.image = image; + this.index = index; + this.key = key; + this.lastViewedAt = lastViewedAt; + this.leafCount = leafCount; + this.media = media; + this.originallyAvailableAt = originallyAvailableAt; + this.originalTitle = originalTitle; + this.parentHero = parentHero; + this.parentIndex = parentIndex; + this.parentKey = parentKey; + this.parentRatingKey = parentRatingKey; + this.parentThumb = parentThumb; + this.parentTitle = parentTitle; + this.primaryExtraKey = primaryExtraKey; + this.prompt = prompt; + this.rating = rating; + this.ratingArray = ratingArray; + this.ratingCount = ratingCount; + this.ratingImage = ratingImage; + this.ratingKey = ratingKey; + this.role = role; + this.search = search; + this.secondary = secondary; + this.skipChildren = skipChildren; + this.skipParent = skipParent; + this.sort = sort; + this.studio = studio; + this.subtype = subtype; + this.summary = summary; + this.tagline = tagline; + this.theme = theme; + this.thumb = thumb; + this.titleSort = titleSort; + this.updatedAt = updatedAt; + this.userRating = userRating; + this.viewCount = viewCount; + this.viewedLeafCount = viewedLeafCount; + this.viewOffset = viewOffset; + this.writer = writer; + this.year = year; + this.additionalProperties = new HashMap<>(); + } + + public Metadata() { + 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(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), 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 title of the item (e.g. “300” or “The Simpsons”) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional title() { + return (Optional) title; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonIgnore + public Optional absoluteIndex() { + return absoluteIndex; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonIgnore + public Optional addedAt() { + return addedAt; + } + + /** + * When present, the URL for the background artwork for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional art() { + return (Optional) art; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonIgnore + public Optional audienceRating() { + return audienceRating; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audienceRatingImage() { + return (Optional) audienceRatingImage; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> autotag() { + return (Optional>) autotag; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional banner() { + return (Optional) banner; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chapterSource() { + return (Optional) chapterSource; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional composite() { + return (Optional) composite; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional contentRating() { + return (Optional) contentRating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> director() { + return (Optional>) director; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonIgnore + public Optional duration() { + return duration; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> filter() { + return (Optional>) filter; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> genre() { + return (Optional>) genre; + } + + /** + * The `art` of the grandparent + */ + @JsonIgnore + public Optional grandparentArt() { + return grandparentArt; + } + + /** + * The `hero` of the grandparent + */ + @JsonIgnore + public Optional grandparentHero() { + return grandparentHero; + } + + /** + * The `key` of the grandparent + */ + @JsonIgnore + public Optional grandparentKey() { + return grandparentKey; + } + + /** + * The `ratingKey` of the grandparent + */ + @JsonIgnore + public Optional grandparentRatingKey() { + return grandparentRatingKey; + } + + /** + * The `theme` of the grandparent + */ + @JsonIgnore + public Optional grandparentTheme() { + return grandparentTheme; + } + + /** + * The `thumb` of the grandparent + */ + @JsonIgnore + public Optional grandparentThumb() { + return grandparentThumb; + } + + /** + * The `title` of the grandparent + */ + @JsonIgnore + public Optional grandparentTitle() { + return grandparentTitle; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> guid() { + return (Optional>) guid; + } + + /** + * When present, the URL for a hero image for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hero() { + return (Optional) hero; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> image() { + return (Optional>) image; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonIgnore + public Optional index() { + return index; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonIgnore + public Optional lastViewedAt() { + return lastViewedAt; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonIgnore + public Optional leafCount() { + return leafCount; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> media() { + return (Optional>) media; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originallyAvailableAt() { + return (Optional) originallyAvailableAt; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originalTitle() { + return (Optional) originalTitle; + } + + /** + * The `hero` of the parent + */ + @JsonIgnore + public Optional parentHero() { + return parentHero; + } + + /** + * The `index` of the parent + */ + @JsonIgnore + public Optional parentIndex() { + return parentIndex; + } + + /** + * The `key` of the parent + */ + @JsonIgnore + public Optional parentKey() { + return parentKey; + } + + /** + * The `ratingKey` of the parent + */ + @JsonIgnore + public Optional parentRatingKey() { + return parentRatingKey; + } + + /** + * The `thumb` of the parent + */ + @JsonIgnore + public Optional parentThumb() { + return parentThumb; + } + + /** + * The `title` of the parent + */ + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional primaryExtraKey() { + return (Optional) primaryExtraKey; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonIgnore + public Optional prompt() { + return prompt; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonIgnore + public Optional rating() { + return rating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> ratingArray() { + return (Optional>) ratingArray; + } + + /** + * Number of ratings under this metadata + */ + @JsonIgnore + public Optional ratingCount() { + return ratingCount; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingImage() { + return (Optional) ratingImage; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingKey() { + return (Optional) ratingKey; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> role() { + return (Optional>) role; + } + + /** + * Indicates this is a search directory + */ + @JsonIgnore + public Optional search() { + return search; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonIgnore + public Optional secondary() { + return secondary; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonIgnore + public Optional skipChildren() { + return skipChildren; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonIgnore + public Optional skipParent() { + return skipParent; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> sort() { + return (Optional>) sort; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional studio() { + return (Optional) studio; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtype() { + return (Optional) subtype; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional summary() { + return (Optional) summary; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional tagline() { + return (Optional) tagline; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional theme() { + return (Optional) theme; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional thumb() { + return (Optional) thumb; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional titleSort() { + return (Optional) titleSort; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonIgnore + public Optional userRating() { + return userRating; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonIgnore + public Optional viewCount() { + return viewCount; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonIgnore + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonIgnore + public Optional viewOffset() { + return viewOffset; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> writer() { + return (Optional>) writer; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonIgnore + public Optional year() { + return year; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Metadata withTitle(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Metadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Metadata withType(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Metadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Metadata withAbsoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Metadata withAbsoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Metadata withAddedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Metadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public Metadata withArt(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public Metadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Metadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Metadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Metadata withAudienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Metadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Metadata withAutotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + + public Metadata withAutotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public Metadata withBanner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public Metadata withBanner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Metadata withChapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Metadata withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Metadata withComposite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Metadata withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Metadata withContentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Metadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Metadata withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + + public Metadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Metadata withDirector(List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + + public Metadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Metadata withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Metadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Metadata withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Metadata withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Metadata withGenre(List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + + public Metadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + /** + * The `art` of the grandparent + */ + public Metadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + + /** + * The `art` of the grandparent + */ + public Metadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The `hero` of the grandparent + */ + public Metadata withGrandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + + /** + * The `hero` of the grandparent + */ + public Metadata withGrandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + /** + * The `key` of the grandparent + */ + public Metadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + + /** + * The `key` of the grandparent + */ + public Metadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public Metadata withGrandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public Metadata withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + /** + * The `theme` of the grandparent + */ + public Metadata withGrandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + + /** + * The `theme` of the grandparent + */ + public Metadata withGrandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + /** + * The `thumb` of the grandparent + */ + public Metadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public Metadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The `title` of the grandparent + */ + public Metadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + + /** + * The `title` of the grandparent + */ + public Metadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public Metadata withGuid(List guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + + public Metadata withGuid(Optional> guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public Metadata withHero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public Metadata withHero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + return this; + } + + public Metadata withImage(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + + public Metadata withImage(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Metadata withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Metadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Metadata withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Metadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Metadata withLastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Metadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Metadata withLeafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Metadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public Metadata withMedia(List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + + public Metadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Metadata withOriginallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Metadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Metadata withOriginalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Metadata withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + /** + * The `hero` of the parent + */ + public Metadata withParentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + + /** + * The `hero` of the parent + */ + public Metadata withParentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + /** + * The `index` of the parent + */ + public Metadata withParentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + + /** + * The `index` of the parent + */ + public Metadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The `key` of the parent + */ + public Metadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + + /** + * The `key` of the parent + */ + public Metadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The `ratingKey` of the parent + */ + public Metadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public Metadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The `thumb` of the parent + */ + public Metadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + + /** + * The `thumb` of the parent + */ + public Metadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The `title` of the parent + */ + public Metadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + + /** + * The `title` of the parent + */ + public Metadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Metadata withPrimaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Metadata withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Metadata withPrompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Metadata withPrompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Metadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Metadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public Metadata withRatingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + + public Metadata withRatingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + /** + * Number of ratings under this metadata + */ + public Metadata withRatingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + + /** + * Number of ratings under this metadata + */ + public Metadata withRatingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Metadata withRatingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Metadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Metadata withRatingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Metadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Metadata withRole(List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + + public Metadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * Indicates this is a search directory + */ + public Metadata withSearch(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + + /** + * Indicates this is a search directory + */ + public Metadata withSearch(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Metadata withSecondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Metadata withSecondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Metadata withSkipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Metadata withSkipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Metadata withSkipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Metadata withSkipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Metadata withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Metadata withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Metadata withStudio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Metadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Metadata withSubtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Metadata withSubtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Metadata withSummary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Metadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Metadata withTagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Metadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Metadata withTheme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Metadata withTheme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Metadata withThumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Metadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Metadata withTitleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Metadata withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Metadata withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Metadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public Metadata withUserRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public Metadata withUserRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Metadata withViewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Metadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Metadata withViewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Metadata withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Metadata withViewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Metadata withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public Metadata withWriter(List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + + public Metadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Metadata withYear(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Metadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + @JsonAnySetter + public Metadata withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public Metadata withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Metadata other = (Metadata) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.absoluteIndex, other.absoluteIndex) && + Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && + Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && + Utils.enhancedDeepEquals(this.autotag, other.autotag) && + Utils.enhancedDeepEquals(this.banner, other.banner) && + Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && + Utils.enhancedDeepEquals(this.composite, other.composite) && + Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && + Utils.enhancedDeepEquals(this.country, other.country) && + Utils.enhancedDeepEquals(this.director, other.director) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.genre, other.genre) && + Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && + Utils.enhancedDeepEquals(this.grandparentHero, other.grandparentHero) && + Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && + Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && + Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && + Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && + Utils.enhancedDeepEquals(this.guid, other.guid) && + Utils.enhancedDeepEquals(this.hero, other.hero) && + Utils.enhancedDeepEquals(this.image, other.image) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && + Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && + Utils.enhancedDeepEquals(this.media, other.media) && + Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && + Utils.enhancedDeepEquals(this.parentHero, other.parentHero) && + Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && + Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && + Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && + Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && + Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && + Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && + Utils.enhancedDeepEquals(this.prompt, other.prompt) && + Utils.enhancedDeepEquals(this.rating, other.rating) && + Utils.enhancedDeepEquals(this.ratingArray, other.ratingArray) && + Utils.enhancedDeepEquals(this.ratingCount, other.ratingCount) && + Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.role, other.role) && + Utils.enhancedDeepEquals(this.search, other.search) && + Utils.enhancedDeepEquals(this.secondary, other.secondary) && + Utils.enhancedDeepEquals(this.skipChildren, other.skipChildren) && + Utils.enhancedDeepEquals(this.skipParent, other.skipParent) && + Utils.enhancedDeepEquals(this.sort, other.sort) && + Utils.enhancedDeepEquals(this.studio, other.studio) && + Utils.enhancedDeepEquals(this.subtype, other.subtype) && + Utils.enhancedDeepEquals(this.summary, other.summary) && + Utils.enhancedDeepEquals(this.tagline, other.tagline) && + Utils.enhancedDeepEquals(this.theme, other.theme) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.userRating, other.userRating) && + Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && + Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && + Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && + Utils.enhancedDeepEquals(this.writer, other.writer) && + Utils.enhancedDeepEquals(this.year, other.year) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(Metadata.class, + "title", title, + "type", type, + "absoluteIndex", absoluteIndex, + "addedAt", addedAt, + "art", art, + "audienceRating", audienceRating, + "audienceRatingImage", audienceRatingImage, + "autotag", autotag, + "banner", banner, + "chapterSource", chapterSource, + "composite", composite, + "contentRating", contentRating, + "country", country, + "director", director, + "duration", duration, + "filter", filter, + "genre", genre, + "grandparentArt", grandparentArt, + "grandparentHero", grandparentHero, + "grandparentKey", grandparentKey, + "grandparentRatingKey", grandparentRatingKey, + "grandparentTheme", grandparentTheme, + "grandparentThumb", grandparentThumb, + "grandparentTitle", grandparentTitle, + "guid", guid, + "hero", hero, + "image", image, + "index", index, + "key", key, + "lastViewedAt", lastViewedAt, + "leafCount", leafCount, + "media", media, + "originallyAvailableAt", originallyAvailableAt, + "originalTitle", originalTitle, + "parentHero", parentHero, + "parentIndex", parentIndex, + "parentKey", parentKey, + "parentRatingKey", parentRatingKey, + "parentThumb", parentThumb, + "parentTitle", parentTitle, + "primaryExtraKey", primaryExtraKey, + "prompt", prompt, + "rating", rating, + "ratingArray", ratingArray, + "ratingCount", ratingCount, + "ratingImage", ratingImage, + "ratingKey", ratingKey, + "role", role, + "search", search, + "secondary", secondary, + "skipChildren", skipChildren, + "skipParent", skipParent, + "sort", sort, + "studio", studio, + "subtype", subtype, + "summary", summary, + "tagline", tagline, + "theme", theme, + "thumb", thumb, + "titleSort", titleSort, + "updatedAt", updatedAt, + "userRating", userRating, + "viewCount", viewCount, + "viewedLeafCount", viewedLeafCount, + "viewOffset", viewOffset, + "writer", writer, + "year", year, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional absoluteIndex = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional> autotag = Optional.empty(); + + private Optional banner = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional> filter = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentHero = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional grandparentRatingKey = Optional.empty(); + + private Optional grandparentTheme = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional> guid = Optional.empty(); + + private Optional hero = Optional.empty(); + + private Optional> image = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional originalTitle = Optional.empty(); + + private Optional parentHero = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional prompt = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional> ratingArray = Optional.empty(); + + private Optional ratingCount = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Optional search = Optional.empty(); + + private Optional secondary = Optional.empty(); + + private Optional skipChildren = Optional.empty(); + + private Optional skipParent = Optional.empty(); + + private Optional> sort = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional subtype = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional theme = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional userRating = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional viewedLeafCount = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional year = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + + public Builder autotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + public Builder autotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + 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); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + 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; + } + + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + + public Builder guid(List 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; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + 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; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + 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; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + + /** + * The `hero` of the parent + */ + public Builder parentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + /** + * The `hero` of the parent + */ + public Builder parentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + + /** + * The `index` of the parent + */ + public Builder parentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The `index` of the parent + */ + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + + /** + * The `key` of the parent + */ + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The `key` of the parent + */ + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + + /** + * The `title` of the parent + */ + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The `title` of the parent + */ + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + + public Builder ratingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + public Builder ratingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + 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; + } + + + /** + * Indicates this is a search directory + */ + public Builder search(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + /** + * Indicates this is a search directory + */ + public Builder search(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + 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; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public Metadata build() { + + return new Metadata( + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/MetadataItem.java b/src/main/java/dev/plexapi/sdk/models/shared/MetadataItem.java new file mode 100644 index 00000000..40ccdef5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/MetadataItem.java @@ -0,0 +1,4124 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * MetadataItem + * + *

Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + * + *

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + * + *

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + */ +public class MetadataItem { + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("absoluteIndex") + private Optional absoluteIndex; + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + /** + * When present, the URL for the background artwork for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Autotag") + private Optional> autotag; + + /** + * When present, the URL for a banner graphic for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("banner") + private Optional banner; + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("composite") + private Optional composite; + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Filter") + private Optional> filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + /** + * The `art` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + /** + * The `hero` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentHero") + private Optional grandparentHero; + + /** + * The `key` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentKey") + private Optional grandparentKey; + + /** + * The `ratingKey` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + /** + * The `theme` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTheme") + private Optional grandparentTheme; + + /** + * The `thumb` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentThumb") + private Optional grandparentThumb; + + /** + * The `title` of the grandparent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTitle") + private Optional grandparentTitle; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Guid") + private Optional> guid; + + /** + * When present, the URL for a hero image for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hero") + private Optional hero; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Image") + private Optional> image; + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastViewedAt") + private Optional lastViewedAt; + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("leafCount") + private Optional leafCount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originalTitle") + private Optional originalTitle; + + /** + * The `hero` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentHero") + private Optional parentHero; + + /** + * The `index` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentIndex") + private Optional parentIndex; + + /** + * The `key` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentKey") + private Optional parentKey; + + /** + * The `ratingKey` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentRatingKey") + private Optional parentRatingKey; + + /** + * The `thumb` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentThumb") + private Optional parentThumb; + + /** + * The `title` of the parent + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentTitle") + private Optional parentTitle; + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("prompt") + private Optional prompt; + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Rating") + private Optional> ratingArray; + + /** + * Number of ratings under this metadata + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingCount") + private Optional ratingCount; + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + /** + * Indicates this is a search directory + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("search") + private Optional search; + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secondary") + private Optional secondary; + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipChildren") + private Optional skipChildren; + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("skipParent") + private Optional skipParent; + + /** + * Typically only seen in metadata at a library's top level + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Sort") + private Optional> sort; + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subtype") + private Optional subtype; + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("theme") + private Optional theme; + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleSort") + private Optional titleSort; + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userRating") + private Optional userRating; + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewCount") + private Optional viewCount; + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewedLeafCount") + private Optional viewedLeafCount; + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewOffset") + private Optional viewOffset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MetadataItem") + private Optional> metadataItem; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public MetadataItem( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("absoluteIndex") Optional absoluteIndex, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("art") Optional art, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("Autotag") Optional> autotag, + @JsonProperty("banner") Optional banner, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("composite") Optional composite, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("Country") Optional> country, + @JsonProperty("Director") Optional> director, + @JsonProperty("duration") Optional duration, + @JsonProperty("Filter") Optional> filter, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("grandparentArt") Optional grandparentArt, + @JsonProperty("grandparentHero") Optional grandparentHero, + @JsonProperty("grandparentKey") Optional grandparentKey, + @JsonProperty("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("grandparentTheme") Optional grandparentTheme, + @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("grandparentTitle") Optional grandparentTitle, + @JsonProperty("Guid") Optional> guid, + @JsonProperty("hero") Optional hero, + @JsonProperty("Image") Optional> image, + @JsonProperty("index") Optional index, + @JsonProperty("key") Optional key, + @JsonProperty("lastViewedAt") Optional lastViewedAt, + @JsonProperty("leafCount") Optional leafCount, + @JsonProperty("Media") Optional> media, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("originalTitle") Optional originalTitle, + @JsonProperty("parentHero") Optional parentHero, + @JsonProperty("parentIndex") Optional parentIndex, + @JsonProperty("parentKey") Optional parentKey, + @JsonProperty("parentRatingKey") Optional parentRatingKey, + @JsonProperty("parentThumb") Optional parentThumb, + @JsonProperty("parentTitle") Optional parentTitle, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("prompt") Optional prompt, + @JsonProperty("rating") Optional rating, + @JsonProperty("Rating") Optional> ratingArray, + @JsonProperty("ratingCount") Optional ratingCount, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("Role") Optional> role, + @JsonProperty("search") Optional search, + @JsonProperty("secondary") Optional secondary, + @JsonProperty("skipChildren") Optional skipChildren, + @JsonProperty("skipParent") Optional skipParent, + @JsonProperty("Sort") Optional> sort, + @JsonProperty("studio") Optional studio, + @JsonProperty("subtype") Optional subtype, + @JsonProperty("summary") Optional summary, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("theme") Optional theme, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("titleSort") Optional titleSort, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("userRating") Optional userRating, + @JsonProperty("viewCount") Optional viewCount, + @JsonProperty("viewedLeafCount") Optional viewedLeafCount, + @JsonProperty("viewOffset") Optional viewOffset, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("year") Optional year, + @JsonProperty("MetadataItem") Optional> metadataItem) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(autotag, "autotag"); + Utils.checkNotNull(banner, "banner"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(composite, "composite"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(grandparentArt, "grandparentArt"); + Utils.checkNotNull(grandparentHero, "grandparentHero"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(hero, "hero"); + Utils.checkNotNull(image, "image"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + Utils.checkNotNull(leafCount, "leafCount"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(originalTitle, "originalTitle"); + Utils.checkNotNull(parentHero, "parentHero"); + Utils.checkNotNull(parentIndex, "parentIndex"); + Utils.checkNotNull(parentKey, "parentKey"); + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + Utils.checkNotNull(parentThumb, "parentThumb"); + Utils.checkNotNull(parentTitle, "parentTitle"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(prompt, "prompt"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(ratingArray, "ratingArray"); + Utils.checkNotNull(ratingCount, "ratingCount"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(search, "search"); + Utils.checkNotNull(secondary, "secondary"); + Utils.checkNotNull(skipChildren, "skipChildren"); + Utils.checkNotNull(skipParent, "skipParent"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(subtype, "subtype"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(theme, "theme"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(titleSort, "titleSort"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(userRating, "userRating"); + Utils.checkNotNull(viewCount, "viewCount"); + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + Utils.checkNotNull(viewOffset, "viewOffset"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(metadataItem, "metadataItem"); + this.title = title; + this.type = type; + this.absoluteIndex = absoluteIndex; + this.addedAt = addedAt; + this.art = art; + this.audienceRating = audienceRating; + this.audienceRatingImage = audienceRatingImage; + this.autotag = autotag; + this.banner = banner; + this.chapterSource = chapterSource; + this.composite = composite; + this.contentRating = contentRating; + this.country = country; + this.director = director; + this.duration = duration; + this.filter = filter; + this.genre = genre; + this.grandparentArt = grandparentArt; + this.grandparentHero = grandparentHero; + this.grandparentKey = grandparentKey; + this.grandparentRatingKey = grandparentRatingKey; + this.grandparentTheme = grandparentTheme; + this.grandparentThumb = grandparentThumb; + this.grandparentTitle = grandparentTitle; + this.guid = guid; + this.hero = hero; + this.image = image; + this.index = index; + this.key = key; + this.lastViewedAt = lastViewedAt; + this.leafCount = leafCount; + this.media = media; + this.originallyAvailableAt = originallyAvailableAt; + this.originalTitle = originalTitle; + this.parentHero = parentHero; + this.parentIndex = parentIndex; + this.parentKey = parentKey; + this.parentRatingKey = parentRatingKey; + this.parentThumb = parentThumb; + this.parentTitle = parentTitle; + this.primaryExtraKey = primaryExtraKey; + this.prompt = prompt; + this.rating = rating; + this.ratingArray = ratingArray; + this.ratingCount = ratingCount; + this.ratingImage = ratingImage; + this.ratingKey = ratingKey; + this.role = role; + this.search = search; + this.secondary = secondary; + this.skipChildren = skipChildren; + this.skipParent = skipParent; + this.sort = sort; + this.studio = studio; + this.subtype = subtype; + this.summary = summary; + this.tagline = tagline; + this.theme = theme; + this.thumb = thumb; + this.titleSort = titleSort; + this.updatedAt = updatedAt; + this.userRating = userRating; + this.viewCount = viewCount; + this.viewedLeafCount = viewedLeafCount; + this.viewOffset = viewOffset; + this.writer = writer; + this.year = year; + this.metadataItem = metadataItem; + this.additionalProperties = new HashMap<>(); + } + + public MetadataItem() { + 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(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), 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 title of the item (e.g. “300” or “The Simpsons”) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional title() { + return (Optional) title; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + @JsonIgnore + public Optional absoluteIndex() { + return absoluteIndex; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + @JsonIgnore + public Optional addedAt() { + return addedAt; + } + + /** + * When present, the URL for the background artwork for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional art() { + return (Optional) art; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + @JsonIgnore + public Optional audienceRating() { + return audienceRating; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audienceRatingImage() { + return (Optional) audienceRatingImage; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> autotag() { + return (Optional>) autotag; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional banner() { + return (Optional) banner; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chapterSource() { + return (Optional) chapterSource; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional composite() { + return (Optional) composite; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional contentRating() { + return (Optional) contentRating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> director() { + return (Optional>) director; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + @JsonIgnore + public Optional duration() { + return duration; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> filter() { + return (Optional>) filter; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> genre() { + return (Optional>) genre; + } + + /** + * The `art` of the grandparent + */ + @JsonIgnore + public Optional grandparentArt() { + return grandparentArt; + } + + /** + * The `hero` of the grandparent + */ + @JsonIgnore + public Optional grandparentHero() { + return grandparentHero; + } + + /** + * The `key` of the grandparent + */ + @JsonIgnore + public Optional grandparentKey() { + return grandparentKey; + } + + /** + * The `ratingKey` of the grandparent + */ + @JsonIgnore + public Optional grandparentRatingKey() { + return grandparentRatingKey; + } + + /** + * The `theme` of the grandparent + */ + @JsonIgnore + public Optional grandparentTheme() { + return grandparentTheme; + } + + /** + * The `thumb` of the grandparent + */ + @JsonIgnore + public Optional grandparentThumb() { + return grandparentThumb; + } + + /** + * The `title` of the grandparent + */ + @JsonIgnore + public Optional grandparentTitle() { + return grandparentTitle; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> guid() { + return (Optional>) guid; + } + + /** + * When present, the URL for a hero image for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hero() { + return (Optional) hero; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> image() { + return (Optional>) image; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + @JsonIgnore + public Optional index() { + return index; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + @JsonIgnore + public Optional lastViewedAt() { + return lastViewedAt; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + @JsonIgnore + public Optional leafCount() { + return leafCount; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> media() { + return (Optional>) media; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originallyAvailableAt() { + return (Optional) originallyAvailableAt; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional originalTitle() { + return (Optional) originalTitle; + } + + /** + * The `hero` of the parent + */ + @JsonIgnore + public Optional parentHero() { + return parentHero; + } + + /** + * The `index` of the parent + */ + @JsonIgnore + public Optional parentIndex() { + return parentIndex; + } + + /** + * The `key` of the parent + */ + @JsonIgnore + public Optional parentKey() { + return parentKey; + } + + /** + * The `ratingKey` of the parent + */ + @JsonIgnore + public Optional parentRatingKey() { + return parentRatingKey; + } + + /** + * The `thumb` of the parent + */ + @JsonIgnore + public Optional parentThumb() { + return parentThumb; + } + + /** + * The `title` of the parent + */ + @JsonIgnore + public Optional parentTitle() { + return parentTitle; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional primaryExtraKey() { + return (Optional) primaryExtraKey; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + @JsonIgnore + public Optional prompt() { + return prompt; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + @JsonIgnore + public Optional rating() { + return rating; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> ratingArray() { + return (Optional>) ratingArray; + } + + /** + * Number of ratings under this metadata + */ + @JsonIgnore + public Optional ratingCount() { + return ratingCount; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingImage() { + return (Optional) ratingImage; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ratingKey() { + return (Optional) ratingKey; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> role() { + return (Optional>) role; + } + + /** + * Indicates this is a search directory + */ + @JsonIgnore + public Optional search() { + return search; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + @JsonIgnore + public Optional secondary() { + return secondary; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + @JsonIgnore + public Optional skipChildren() { + return skipChildren; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + @JsonIgnore + public Optional skipParent() { + return skipParent; + } + + /** + * Typically only seen in metadata at a library's top level + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> sort() { + return (Optional>) sort; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional studio() { + return (Optional) studio; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional subtype() { + return (Optional) subtype; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional summary() { + return (Optional) summary; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional tagline() { + return (Optional) tagline; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional theme() { + return (Optional) theme; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional thumb() { + return (Optional) thumb; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional titleSort() { + return (Optional) titleSort; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + /** + * When the user has rated an item, this contains the user rating + */ + @JsonIgnore + public Optional userRating() { + return userRating; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + @JsonIgnore + public Optional viewCount() { + return viewCount; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + @JsonIgnore + public Optional viewedLeafCount() { + return viewedLeafCount; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + @JsonIgnore + public Optional viewOffset() { + return viewOffset; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> writer() { + return (Optional>) writer; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + @JsonIgnore + public Optional year() { + return year; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadataItem() { + return (Optional>) metadataItem; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public MetadataItem withTitle(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public MetadataItem withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public MetadataItem withType(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public MetadataItem withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public MetadataItem withAbsoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public MetadataItem withAbsoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public MetadataItem withAddedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public MetadataItem withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public MetadataItem withArt(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public MetadataItem withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public MetadataItem withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public MetadataItem withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public MetadataItem withAudienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public MetadataItem withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public MetadataItem withAutotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + + public MetadataItem withAutotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public MetadataItem withBanner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public MetadataItem withBanner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public MetadataItem withChapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public MetadataItem withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public MetadataItem withComposite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public MetadataItem withComposite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public MetadataItem withContentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public MetadataItem withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public MetadataItem withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + + public MetadataItem withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public MetadataItem withDirector(List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + + public MetadataItem withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public MetadataItem withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public MetadataItem withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public MetadataItem withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public MetadataItem withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public MetadataItem withGenre(List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + + public MetadataItem withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + /** + * The `art` of the grandparent + */ + public MetadataItem withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + + /** + * The `art` of the grandparent + */ + public MetadataItem withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + /** + * The `hero` of the grandparent + */ + public MetadataItem withGrandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + + /** + * The `hero` of the grandparent + */ + public MetadataItem withGrandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + /** + * The `key` of the grandparent + */ + public MetadataItem withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + + /** + * The `key` of the grandparent + */ + public MetadataItem withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public MetadataItem withGrandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public MetadataItem withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + /** + * The `theme` of the grandparent + */ + public MetadataItem withGrandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + + /** + * The `theme` of the grandparent + */ + public MetadataItem withGrandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + /** + * The `thumb` of the grandparent + */ + public MetadataItem withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public MetadataItem withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + /** + * The `title` of the grandparent + */ + public MetadataItem withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + + /** + * The `title` of the grandparent + */ + public MetadataItem withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public MetadataItem withGuid(List guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + + public MetadataItem withGuid(Optional> guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public MetadataItem withHero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public MetadataItem withHero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + return this; + } + + public MetadataItem withImage(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + + public MetadataItem withImage(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public MetadataItem withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public MetadataItem withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public MetadataItem withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public MetadataItem withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public MetadataItem withLastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public MetadataItem withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public MetadataItem withLeafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public MetadataItem withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public MetadataItem withMedia(List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + + public MetadataItem withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public MetadataItem withOriginallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public MetadataItem withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public MetadataItem withOriginalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public MetadataItem withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + /** + * The `hero` of the parent + */ + public MetadataItem withParentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + + /** + * The `hero` of the parent + */ + public MetadataItem withParentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + /** + * The `index` of the parent + */ + public MetadataItem withParentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + + /** + * The `index` of the parent + */ + public MetadataItem withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + /** + * The `key` of the parent + */ + public MetadataItem withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + + /** + * The `key` of the parent + */ + public MetadataItem withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + /** + * The `ratingKey` of the parent + */ + public MetadataItem withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public MetadataItem withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + /** + * The `thumb` of the parent + */ + public MetadataItem withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + + /** + * The `thumb` of the parent + */ + public MetadataItem withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + /** + * The `title` of the parent + */ + public MetadataItem withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + + /** + * The `title` of the parent + */ + public MetadataItem withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public MetadataItem withPrimaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public MetadataItem withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public MetadataItem withPrompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public MetadataItem withPrompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public MetadataItem withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public MetadataItem withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public MetadataItem withRatingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + + public MetadataItem withRatingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + /** + * Number of ratings under this metadata + */ + public MetadataItem withRatingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + + /** + * Number of ratings under this metadata + */ + public MetadataItem withRatingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public MetadataItem withRatingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public MetadataItem withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public MetadataItem withRatingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public MetadataItem withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public MetadataItem withRole(List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + + public MetadataItem withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * Indicates this is a search directory + */ + public MetadataItem withSearch(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + + /** + * Indicates this is a search directory + */ + public MetadataItem withSearch(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public MetadataItem withSecondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public MetadataItem withSecondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public MetadataItem withSkipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public MetadataItem withSkipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public MetadataItem withSkipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public MetadataItem withSkipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public MetadataItem withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public MetadataItem withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public MetadataItem withStudio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public MetadataItem withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public MetadataItem withSubtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public MetadataItem withSubtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public MetadataItem withSummary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public MetadataItem withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public MetadataItem withTagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public MetadataItem withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public MetadataItem withTheme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public MetadataItem withTheme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public MetadataItem withThumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public MetadataItem withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public MetadataItem withTitleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public MetadataItem withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public MetadataItem withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public MetadataItem withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public MetadataItem withUserRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public MetadataItem withUserRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public MetadataItem withViewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public MetadataItem withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public MetadataItem withViewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public MetadataItem withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public MetadataItem withViewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public MetadataItem withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public MetadataItem withWriter(List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + + public MetadataItem withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public MetadataItem withYear(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public MetadataItem withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public MetadataItem withMetadataItem(List metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = Optional.ofNullable(metadataItem); + return this; + } + + + public MetadataItem withMetadataItem(Optional> metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = metadataItem; + return this; + } + + @JsonAnySetter + public MetadataItem withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public MetadataItem withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataItem other = (MetadataItem) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.absoluteIndex, other.absoluteIndex) && + Utils.enhancedDeepEquals(this.addedAt, other.addedAt) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.audienceRating, other.audienceRating) && + Utils.enhancedDeepEquals(this.audienceRatingImage, other.audienceRatingImage) && + Utils.enhancedDeepEquals(this.autotag, other.autotag) && + Utils.enhancedDeepEquals(this.banner, other.banner) && + Utils.enhancedDeepEquals(this.chapterSource, other.chapterSource) && + Utils.enhancedDeepEquals(this.composite, other.composite) && + Utils.enhancedDeepEquals(this.contentRating, other.contentRating) && + Utils.enhancedDeepEquals(this.country, other.country) && + Utils.enhancedDeepEquals(this.director, other.director) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.genre, other.genre) && + Utils.enhancedDeepEquals(this.grandparentArt, other.grandparentArt) && + Utils.enhancedDeepEquals(this.grandparentHero, other.grandparentHero) && + Utils.enhancedDeepEquals(this.grandparentKey, other.grandparentKey) && + Utils.enhancedDeepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + Utils.enhancedDeepEquals(this.grandparentTheme, other.grandparentTheme) && + Utils.enhancedDeepEquals(this.grandparentThumb, other.grandparentThumb) && + Utils.enhancedDeepEquals(this.grandparentTitle, other.grandparentTitle) && + Utils.enhancedDeepEquals(this.guid, other.guid) && + Utils.enhancedDeepEquals(this.hero, other.hero) && + Utils.enhancedDeepEquals(this.image, other.image) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastViewedAt, other.lastViewedAt) && + Utils.enhancedDeepEquals(this.leafCount, other.leafCount) && + Utils.enhancedDeepEquals(this.media, other.media) && + Utils.enhancedDeepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && + Utils.enhancedDeepEquals(this.originalTitle, other.originalTitle) && + Utils.enhancedDeepEquals(this.parentHero, other.parentHero) && + Utils.enhancedDeepEquals(this.parentIndex, other.parentIndex) && + Utils.enhancedDeepEquals(this.parentKey, other.parentKey) && + Utils.enhancedDeepEquals(this.parentRatingKey, other.parentRatingKey) && + Utils.enhancedDeepEquals(this.parentThumb, other.parentThumb) && + Utils.enhancedDeepEquals(this.parentTitle, other.parentTitle) && + Utils.enhancedDeepEquals(this.primaryExtraKey, other.primaryExtraKey) && + Utils.enhancedDeepEquals(this.prompt, other.prompt) && + Utils.enhancedDeepEquals(this.rating, other.rating) && + Utils.enhancedDeepEquals(this.ratingArray, other.ratingArray) && + Utils.enhancedDeepEquals(this.ratingCount, other.ratingCount) && + Utils.enhancedDeepEquals(this.ratingImage, other.ratingImage) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.role, other.role) && + Utils.enhancedDeepEquals(this.search, other.search) && + Utils.enhancedDeepEquals(this.secondary, other.secondary) && + Utils.enhancedDeepEquals(this.skipChildren, other.skipChildren) && + Utils.enhancedDeepEquals(this.skipParent, other.skipParent) && + Utils.enhancedDeepEquals(this.sort, other.sort) && + Utils.enhancedDeepEquals(this.studio, other.studio) && + Utils.enhancedDeepEquals(this.subtype, other.subtype) && + Utils.enhancedDeepEquals(this.summary, other.summary) && + Utils.enhancedDeepEquals(this.tagline, other.tagline) && + Utils.enhancedDeepEquals(this.theme, other.theme) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.titleSort, other.titleSort) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.userRating, other.userRating) && + Utils.enhancedDeepEquals(this.viewCount, other.viewCount) && + Utils.enhancedDeepEquals(this.viewedLeafCount, other.viewedLeafCount) && + Utils.enhancedDeepEquals(this.viewOffset, other.viewOffset) && + Utils.enhancedDeepEquals(this.writer, other.writer) && + Utils.enhancedDeepEquals(this.year, other.year) && + Utils.enhancedDeepEquals(this.metadataItem, other.metadataItem) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year, metadataItem, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(MetadataItem.class, + "title", title, + "type", type, + "absoluteIndex", absoluteIndex, + "addedAt", addedAt, + "art", art, + "audienceRating", audienceRating, + "audienceRatingImage", audienceRatingImage, + "autotag", autotag, + "banner", banner, + "chapterSource", chapterSource, + "composite", composite, + "contentRating", contentRating, + "country", country, + "director", director, + "duration", duration, + "filter", filter, + "genre", genre, + "grandparentArt", grandparentArt, + "grandparentHero", grandparentHero, + "grandparentKey", grandparentKey, + "grandparentRatingKey", grandparentRatingKey, + "grandparentTheme", grandparentTheme, + "grandparentThumb", grandparentThumb, + "grandparentTitle", grandparentTitle, + "guid", guid, + "hero", hero, + "image", image, + "index", index, + "key", key, + "lastViewedAt", lastViewedAt, + "leafCount", leafCount, + "media", media, + "originallyAvailableAt", originallyAvailableAt, + "originalTitle", originalTitle, + "parentHero", parentHero, + "parentIndex", parentIndex, + "parentKey", parentKey, + "parentRatingKey", parentRatingKey, + "parentThumb", parentThumb, + "parentTitle", parentTitle, + "primaryExtraKey", primaryExtraKey, + "prompt", prompt, + "rating", rating, + "ratingArray", ratingArray, + "ratingCount", ratingCount, + "ratingImage", ratingImage, + "ratingKey", ratingKey, + "role", role, + "search", search, + "secondary", secondary, + "skipChildren", skipChildren, + "skipParent", skipParent, + "sort", sort, + "studio", studio, + "subtype", subtype, + "summary", summary, + "tagline", tagline, + "theme", theme, + "thumb", thumb, + "titleSort", titleSort, + "updatedAt", updatedAt, + "userRating", userRating, + "viewCount", viewCount, + "viewedLeafCount", viewedLeafCount, + "viewOffset", viewOffset, + "writer", writer, + "year", year, + "metadataItem", metadataItem, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional absoluteIndex = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional> autotag = Optional.empty(); + + private Optional banner = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Optional composite = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional> filter = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentHero = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional grandparentRatingKey = Optional.empty(); + + private Optional grandparentTheme = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional> guid = Optional.empty(); + + private Optional hero = Optional.empty(); + + private Optional> image = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastViewedAt = Optional.empty(); + + private Optional leafCount = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional originalTitle = Optional.empty(); + + private Optional parentHero = Optional.empty(); + + private Optional parentIndex = Optional.empty(); + + private Optional parentKey = Optional.empty(); + + private Optional parentRatingKey = Optional.empty(); + + private Optional parentThumb = Optional.empty(); + + private Optional parentTitle = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional prompt = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional> ratingArray = Optional.empty(); + + private Optional ratingCount = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Optional search = Optional.empty(); + + private Optional secondary = Optional.empty(); + + private Optional skipChildren = Optional.empty(); + + private Optional skipParent = Optional.empty(); + + private Optional> sort = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional subtype = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional theme = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional titleSort = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional userRating = Optional.empty(); + + private Optional viewCount = Optional.empty(); + + private Optional viewedLeafCount = Optional.empty(); + + private Optional viewOffset = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional> metadataItem = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Object title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the item (e.g. “300” or “The Simpsons”) + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Object type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of the video item, such as `movie`, `episode`, or `clip`. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(long absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = Optional.ofNullable(absoluteIndex); + return this; + } + + /** + * When present, contains the disc number for a track on multi-disc albums. + */ + public Builder absoluteIndex(Optional absoluteIndex) { + Utils.checkNotNull(absoluteIndex, "absoluteIndex"); + this.absoluteIndex = absoluteIndex; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(long addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was added to the library. + */ + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Object art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + /** + * When present, the URL for the background artwork for the item. + */ + public Builder art(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + /** + * Some rating systems separate reviewer ratings from audience ratings + */ + public Builder audienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Object audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + /** + * A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). + */ + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + + public Builder autotag(List autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = Optional.ofNullable(autotag); + return this; + } + + public Builder autotag(Optional> autotag) { + Utils.checkNotNull(autotag, "autotag"); + this.autotag = autotag; + return this; + } + + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Object banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + /** + * When present, the URL for a banner graphic for the item. + */ + public Builder banner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Object chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + /** + * When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). + */ + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Object composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = Optional.ofNullable(composite); + return this; + } + + /** + * When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). + */ + public Builder composite(Optional composite) { + Utils.checkNotNull(composite, "composite"); + this.composite = composite; + return this; + } + + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Object contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + /** + * If known, the content rating (e.g. MPAA) for an item. + */ + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + 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); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * When present, the duration for the item, in units of milliseconds. + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder filter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + 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; + } + + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + /** + * The `art` of the grandparent + */ + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(String grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = Optional.ofNullable(grandparentHero); + return this; + } + + /** + * The `hero` of the grandparent + */ + public Builder grandparentHero(Optional grandparentHero) { + Utils.checkNotNull(grandparentHero, "grandparentHero"); + this.grandparentHero = grandparentHero; + return this; + } + + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + /** + * The `key` of the grandparent + */ + public Builder grandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + /** + * The `ratingKey` of the grandparent + */ + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + /** + * The `theme` of the grandparent + */ + public Builder grandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + /** + * The `thumb` of the grandparent + */ + public Builder grandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + /** + * The `title` of the grandparent + */ + public Builder grandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + + public Builder guid(List 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; + } + + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Object hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = Optional.ofNullable(hero); + return this; + } + + /** + * When present, the URL for a hero image for the item. + */ + public Builder hero(Optional hero) { + Utils.checkNotNull(hero, "hero"); + this.hero = hero; + 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; + } + + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + /** + * When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. + */ + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(long lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + /** + * When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. + */ + public Builder lastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(long leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + /** + * For shows and seasons, contains the number of total episodes. + */ + public Builder leafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + 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; + } + + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Object originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + /** + * When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. + */ + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Object originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + /** + * When present, used to indicate an item's original title, e.g. a movie's foreign title. + */ + public Builder originalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + + /** + * The `hero` of the parent + */ + public Builder parentHero(String parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = Optional.ofNullable(parentHero); + return this; + } + + /** + * The `hero` of the parent + */ + public Builder parentHero(Optional parentHero) { + Utils.checkNotNull(parentHero, "parentHero"); + this.parentHero = parentHero; + return this; + } + + + /** + * The `index` of the parent + */ + public Builder parentIndex(long parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + /** + * The `index` of the parent + */ + public Builder parentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + + /** + * The `key` of the parent + */ + public Builder parentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + /** + * The `key` of the parent + */ + public Builder parentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The `ratingKey` of the parent + */ + public Builder parentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + /** + * The `thumb` of the parent + */ + public Builder parentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + + /** + * The `title` of the parent + */ + public Builder parentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + /** + * The `title` of the parent + */ + public Builder parentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Object primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + /** + * Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. + */ + public Builder primaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(String prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = Optional.ofNullable(prompt); + return this; + } + + /** + * Prompt to give the user for this directory (such as `Search Movies`) + */ + public Builder prompt(Optional prompt) { + Utils.checkNotNull(prompt, "prompt"); + this.prompt = prompt; + return this; + } + + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + /** + * When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. + */ + public Builder rating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + + public Builder ratingArray(List ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = Optional.ofNullable(ratingArray); + return this; + } + + public Builder ratingArray(Optional> ratingArray) { + Utils.checkNotNull(ratingArray, "ratingArray"); + this.ratingArray = ratingArray; + return this; + } + + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(long ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = Optional.ofNullable(ratingCount); + return this; + } + + /** + * Number of ratings under this metadata + */ + public Builder ratingCount(Optional ratingCount) { + Utils.checkNotNull(ratingCount, "ratingCount"); + this.ratingCount = ratingCount; + return this; + } + + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Object ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + /** + * When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. + */ + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Object ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + /** + * This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. + */ + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + 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; + } + + + /** + * Indicates this is a search directory + */ + public Builder search(boolean search) { + Utils.checkNotNull(search, "search"); + this.search = Optional.ofNullable(search); + return this; + } + + /** + * Indicates this is a search directory + */ + public Builder search(Optional search) { + Utils.checkNotNull(search, "search"); + this.search = search; + return this; + } + + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(boolean secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = Optional.ofNullable(secondary); + return this; + } + + /** + * Used by old clients to provide nested menus allowing for primative (but structured) navigation. + */ + public Builder secondary(Optional secondary) { + Utils.checkNotNull(secondary, "secondary"); + this.secondary = secondary; + return this; + } + + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); + return this; + } + + /** + * When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. + */ + public Builder skipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(boolean skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = Optional.ofNullable(skipParent); + return this; + } + + /** + * When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). + */ + public Builder skipParent(Optional skipParent) { + Utils.checkNotNull(skipParent, "skipParent"); + this.skipParent = skipParent; + return this; + } + + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + /** + * Typically only seen in metadata at a library's top level + */ + public Builder sort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Object studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + /** + * When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). + */ + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Object subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = Optional.ofNullable(subtype); + return this; + } + + /** + * The subtype of the video item, such as `photo` when the video item is in a photo library + */ + public Builder subtype(Optional subtype) { + Utils.checkNotNull(subtype, "subtype"); + this.subtype = subtype; + return this; + } + + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Object summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + /** + * When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). + */ + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Object tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + /** + * When present, a pithy one-liner about the item (usually only seen for movies). + */ + public Builder tagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Object theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + /** + * When present, the URL for theme music for the item (usually only for TV shows). + */ + public Builder theme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Object titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + /** + * Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). + */ + public Builder titleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + /** + * In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). + */ + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(double userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = Optional.ofNullable(userRating); + return this; + } + + /** + * When the user has rated an item, this contains the user rating + */ + public Builder userRating(Optional userRating) { + Utils.checkNotNull(userRating, "userRating"); + this.userRating = userRating; + return this; + } + + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(long viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + /** + * When a users has completed watched or listened to an item, this attribute contains the number of consumptions. + */ + public Builder viewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(long viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + /** + * For shows and seasons, contains the number of viewed episodes. + */ + public Builder viewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(long viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + /** + * When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. + */ + public Builder viewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + 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; + } + + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(long year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + /** + * When present, the year associated with the item's release (e.g. release year for a movie). + */ + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + + public Builder metadataItem(List metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = Optional.ofNullable(metadataItem); + return this; + } + + public Builder metadataItem(Optional> metadataItem) { + Utils.checkNotNull(metadataItem, "metadataItem"); + this.metadataItem = metadataItem; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public MetadataItem build() { + + return new MetadataItem( + title, type, absoluteIndex, + addedAt, art, audienceRating, + audienceRatingImage, autotag, banner, + chapterSource, composite, contentRating, + country, director, duration, + filter, genre, grandparentArt, + grandparentHero, grandparentKey, grandparentRatingKey, + grandparentTheme, grandparentThumb, grandparentTitle, + guid, hero, image, + index, key, lastViewedAt, + leafCount, media, originallyAvailableAt, + originalTitle, parentHero, parentIndex, + parentKey, parentRatingKey, parentThumb, + parentTitle, primaryExtraKey, prompt, + rating, ratingArray, ratingCount, + ratingImage, ratingKey, role, + search, secondary, skipChildren, + skipParent, sort, studio, + subtype, summary, tagline, + theme, thumb, titleSort, + updatedAt, userRating, viewCount, + viewedLeafCount, viewOffset, writer, + year, metadataItem) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Part.java b/src/main/java/dev/plexapi/sdk/models/shared/Part.java new file mode 100644 index 00000000..c0d55693 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Part.java @@ -0,0 +1,698 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * Part + * + *

`Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part. + */ +public class Part { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + /** + * The duration of the media item, in milliseconds + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + /** + * The local file path at which the part is stored on the server + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The key from which the media can be streamed + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + /** + * The size of the media, in bytes + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Stream") + private Optional> stream; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public Part( + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("container") Optional container, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("size") Optional size, + @JsonProperty("Stream") Optional> stream, + @JsonProperty("videoProfile") Optional videoProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(stream, "stream"); + Utils.checkNotNull(videoProfile, "videoProfile"); + this.audioProfile = audioProfile; + this.container = container; + this.duration = duration; + this.file = file; + this.has64bitOffsets = has64bitOffsets; + this.id = id; + this.key = key; + this.optimizedForStreaming = optimizedForStreaming; + this.size = size; + this.stream = stream; + this.videoProfile = videoProfile; + this.additionalProperties = new HashMap<>(); + } + + public Part() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audioProfile() { + return (Optional) audioProfile; + } + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional container() { + return (Optional) container; + } + + /** + * The duration of the media item, in milliseconds + */ + @JsonIgnore + public Optional duration() { + return duration; + } + + /** + * The local file path at which the part is stored on the server + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional file() { + return (Optional) file; + } + + @JsonIgnore + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The key from which the media can be streamed + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + @JsonIgnore + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + /** + * The size of the media, in bytes + */ + @JsonIgnore + public Optional size() { + return size; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> stream() { + return (Optional>) stream; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional videoProfile() { + return (Optional) videoProfile; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + public Part withAudioProfile(Object 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; + } + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + public Part withContainer(Object container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + public Part withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + /** + * The duration of the media item, in milliseconds + */ + public Part withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + /** + * The duration of the media item, in milliseconds + */ + public Part withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * The local file path at which the part is stored on the server + */ + public Part withFile(Object file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + + /** + * The local file path at which the part is stored on the server + */ + public Part withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Part withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + + public Part withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Part withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public Part withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The key from which the media can be streamed + */ + public Part withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key from which the media can be streamed + */ + public Part withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Part withOptimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + + public Part withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + /** + * The size of the media, in bytes + */ + public Part withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + /** + * The size of the media, in bytes + */ + public Part withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + 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; + } + + public Part withVideoProfile(Object videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + + public Part withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + @JsonAnySetter + public Part withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public Part withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Part other = (Part) o; + return + Utils.enhancedDeepEquals(this.audioProfile, other.audioProfile) && + Utils.enhancedDeepEquals(this.container, other.container) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.file, other.file) && + Utils.enhancedDeepEquals(this.has64bitOffsets, other.has64bitOffsets) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.stream, other.stream) && + Utils.enhancedDeepEquals(this.videoProfile, other.videoProfile) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + audioProfile, container, duration, + file, has64bitOffsets, id, + key, optimizedForStreaming, size, + stream, videoProfile, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(Part.class, + "audioProfile", audioProfile, + "container", container, + "duration", duration, + "file", file, + "has64bitOffsets", has64bitOffsets, + "id", id, + "key", key, + "optimizedForStreaming", optimizedForStreaming, + "size", size, + "stream", stream, + "videoProfile", videoProfile, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional audioProfile = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional> stream = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + public Builder audioProfile(Object 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; + } + + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + public Builder container(Object container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + /** + * The container of the media file, such as `mp4` or `mkv` + */ + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + + /** + * The duration of the media item, in milliseconds + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * The duration of the media item, in milliseconds + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + + /** + * The local file path at which the part is stored on the server + */ + public Builder file(Object file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + /** + * The local file path at which the part is stored on the server + */ + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + 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 id(long 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; + } + + + /** + * The key from which the media can be streamed + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key from which the media can be streamed + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + 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; + } + + + /** + * The size of the media, in bytes + */ + public Builder size(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * The size of the media, in bytes + */ + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + 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 Builder videoProfile(Object 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 additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public Part build() { + + return new Part( + audioProfile, container, duration, + file, has64bitOffsets, id, + key, optimizedForStreaming, size, + stream, videoProfile) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Pivot.java b/src/main/java/dev/plexapi/sdk/models/shared/Pivot.java similarity index 97% rename from src/main/java/dev/plexapi/sdk/models/operations/Pivot.java rename to src/main/java/dev/plexapi/sdk/models/shared/Pivot.java index fb98c521..dfdca616 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Pivot.java +++ b/src/main/java/dev/plexapi/sdk/models/shared/Pivot.java @@ -1,7 +1,7 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -package dev.plexapi.sdk.models.operations; +package dev.plexapi.sdk.models.shared; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -16,6 +16,21 @@ import java.util.Optional; public class Pivot { + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("context") + private Optional context; + + @JsonInclude(Include.NON_ABSENT) @JsonProperty("id") private Optional id; @@ -26,44 +41,29 @@ public class Pivot { private Optional key; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("title") - private Optional title; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("context") - private Optional context; - - @JsonInclude(Include.NON_ABSENT) @JsonProperty("symbol") private Optional symbol; @JsonCreator public Pivot( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("context") Optional context, @JsonProperty("id") Optional id, @JsonProperty("key") Optional key, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, - @JsonProperty("context") Optional context, @JsonProperty("symbol") Optional symbol) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(context, "context"); Utils.checkNotNull(id, "id"); Utils.checkNotNull(key, "key"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(title, "title"); - Utils.checkNotNull(context, "context"); Utils.checkNotNull(symbol, "symbol"); + this.title = title; + this.type = type; + this.context = context; this.id = id; this.key = key; - this.type = type; - this.title = title; - this.context = context; this.symbol = symbol; } @@ -72,6 +72,21 @@ public class Pivot { Optional.empty(), Optional.empty(), Optional.empty()); } + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional context() { + return context; + } + @JsonIgnore public Optional id() { return id; @@ -82,21 +97,6 @@ public class Pivot { return key; } - @JsonIgnore - public Optional type() { - return type; - } - - @JsonIgnore - public Optional title() { - return title; - } - - @JsonIgnore - public Optional context() { - return context; - } - @JsonIgnore public Optional symbol() { return symbol; @@ -107,6 +107,45 @@ public class Pivot { } + public Pivot withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public Pivot withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Pivot withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public Pivot withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Pivot withContext(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + + public Pivot withContext(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + public Pivot withId(String id) { Utils.checkNotNull(id, "id"); this.id = Optional.ofNullable(id); @@ -133,45 +172,6 @@ public class Pivot { return this; } - public Pivot withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - - public Pivot withType(Optional type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - public Pivot withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - - public Pivot withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; - return this; - } - - public Pivot withContext(String context) { - Utils.checkNotNull(context, "context"); - this.context = Optional.ofNullable(context); - return this; - } - - - public Pivot withContext(Optional context) { - Utils.checkNotNull(context, "context"); - this.context = context; - return this; - } - public Pivot withSymbol(String symbol) { Utils.checkNotNull(symbol, "symbol"); this.symbol = Optional.ofNullable(symbol); @@ -195,45 +195,45 @@ public class Pivot { } Pivot other = (Pivot) o; return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.context, other.context) && Utils.enhancedDeepEquals(this.id, other.id) && Utils.enhancedDeepEquals(this.key, other.key) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.title, other.title) && - Utils.enhancedDeepEquals(this.context, other.context) && Utils.enhancedDeepEquals(this.symbol, other.symbol); } @Override public int hashCode() { return Utils.enhancedHash( - id, key, type, - title, context, symbol); + title, type, context, + id, key, symbol); } @Override public String toString() { return Utils.toString(Pivot.class, + "title", title, + "type", type, + "context", context, "id", id, "key", key, - "type", type, - "title", title, - "context", context, "symbol", symbol); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional id = Optional.empty(); - - private Optional key = Optional.empty(); + private Optional title = Optional.empty(); private Optional type = Optional.empty(); - private Optional title = Optional.empty(); - private Optional context = Optional.empty(); + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + private Optional symbol = Optional.empty(); private Builder() { @@ -241,6 +241,45 @@ public class Pivot { } + 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 context(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Builder context(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public Builder id(String id) { Utils.checkNotNull(id, "id"); this.id = Optional.ofNullable(id); @@ -267,45 +306,6 @@ public class Pivot { } - 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 context(String context) { - Utils.checkNotNull(context, "context"); - this.context = Optional.ofNullable(context); - return this; - } - - public Builder context(Optional context) { - Utils.checkNotNull(context, "context"); - this.context = context; - return this; - } - - public Builder symbol(String symbol) { Utils.checkNotNull(symbol, "symbol"); this.symbol = Optional.ofNullable(symbol); @@ -321,8 +321,8 @@ public class Pivot { public Pivot build() { return new Pivot( - id, key, type, - title, context, symbol); + title, type, context, + id, key, symbol); } } diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Player.java b/src/main/java/dev/plexapi/sdk/models/shared/Player.java new file mode 100644 index 00000000..f8429d9d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Player.java @@ -0,0 +1,986 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * Player + * + *

Information about the player being used for playback + */ +public class Player { + /** + * The title of the client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The remote address + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("address") + private Optional address; + + /** + * Indicating if the client is playing from the local LAN + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("local") + private Optional local; + + /** + * The identifier of the client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("machineIdentifier") + private Optional machineIdentifier; + + /** + * The model of the client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("model") + private Optional model; + + /** + * The platform of the client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platform") + private Optional platform; + + /** + * The platformVersion of the client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platformVersion") + private Optional platformVersion; + + /** + * The product name of the client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("product") + private Optional product; + + /** + * Indicating if the client is playing over a relay connection + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("relayed") + private Optional relayed; + + /** + * The client's public address + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("remotePublicAddress") + private Optional remotePublicAddress; + + /** + * Indicating if the client is playing over HTTPS + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secure") + private Optional secure; + + /** + * The client's last reported state + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("state") + private Optional state; + + /** + * The id of the user + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("userID") + private Optional userID; + + /** + * The vendor of the client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("vendor") + private Optional vendor; + + /** + * The version of the client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + @JsonCreator + public Player( + @JsonProperty("title") Optional title, + @JsonProperty("address") Optional address, + @JsonProperty("local") Optional local, + @JsonProperty("machineIdentifier") Optional machineIdentifier, + @JsonProperty("model") Optional model, + @JsonProperty("platform") Optional platform, + @JsonProperty("platformVersion") Optional platformVersion, + @JsonProperty("product") Optional product, + @JsonProperty("relayed") Optional relayed, + @JsonProperty("remotePublicAddress") Optional remotePublicAddress, + @JsonProperty("secure") Optional secure, + @JsonProperty("state") Optional state, + @JsonProperty("userID") Optional userID, + @JsonProperty("vendor") Optional vendor, + @JsonProperty("version") Optional version) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(address, "address"); + Utils.checkNotNull(local, "local"); + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + Utils.checkNotNull(model, "model"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(product, "product"); + Utils.checkNotNull(relayed, "relayed"); + Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); + Utils.checkNotNull(secure, "secure"); + Utils.checkNotNull(state, "state"); + Utils.checkNotNull(userID, "userID"); + Utils.checkNotNull(vendor, "vendor"); + Utils.checkNotNull(version, "version"); + this.title = title; + this.address = address; + this.local = local; + this.machineIdentifier = machineIdentifier; + this.model = model; + this.platform = platform; + this.platformVersion = platformVersion; + this.product = product; + this.relayed = relayed; + this.remotePublicAddress = remotePublicAddress; + this.secure = secure; + this.state = state; + this.userID = userID; + this.vendor = vendor; + this.version = version; + } + + public Player() { + 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()); + } + + /** + * The title of the client + */ + @JsonIgnore + public Optional title() { + return title; + } + + /** + * The remote address + */ + @JsonIgnore + public Optional address() { + return address; + } + + /** + * Indicating if the client is playing from the local LAN + */ + @JsonIgnore + public Optional local() { + return local; + } + + /** + * The identifier of the client + */ + @JsonIgnore + public Optional machineIdentifier() { + return machineIdentifier; + } + + /** + * The model of the client + */ + @JsonIgnore + public Optional model() { + return model; + } + + /** + * The platform of the client + */ + @JsonIgnore + public Optional platform() { + return platform; + } + + /** + * The platformVersion of the client + */ + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + /** + * The product name of the client + */ + @JsonIgnore + public Optional product() { + return product; + } + + /** + * Indicating if the client is playing over a relay connection + */ + @JsonIgnore + public Optional relayed() { + return relayed; + } + + /** + * The client's public address + */ + @JsonIgnore + public Optional remotePublicAddress() { + return remotePublicAddress; + } + + /** + * Indicating if the client is playing over HTTPS + */ + @JsonIgnore + public Optional secure() { + return secure; + } + + /** + * The client's last reported state + */ + @JsonIgnore + public Optional state() { + return state; + } + + /** + * The id of the user + */ + @JsonIgnore + public Optional userID() { + return userID; + } + + /** + * The vendor of the client + */ + @JsonIgnore + public Optional vendor() { + return vendor; + } + + /** + * The version of the client + */ + @JsonIgnore + public Optional version() { + return version; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The title of the client + */ + public Player withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the client + */ + public Player withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The remote address + */ + public Player withAddress(String address) { + Utils.checkNotNull(address, "address"); + this.address = Optional.ofNullable(address); + return this; + } + + + /** + * The remote address + */ + public Player withAddress(Optional address) { + Utils.checkNotNull(address, "address"); + this.address = address; + return this; + } + + /** + * Indicating if the client is playing from the local LAN + */ + public Player withLocal(boolean local) { + Utils.checkNotNull(local, "local"); + this.local = Optional.ofNullable(local); + return this; + } + + + /** + * Indicating if the client is playing from the local LAN + */ + public Player withLocal(Optional local) { + Utils.checkNotNull(local, "local"); + this.local = local; + return this; + } + + /** + * The identifier of the client + */ + public Player withMachineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + + /** + * The identifier of the client + */ + public Player withMachineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + /** + * The model of the client + */ + public Player withModel(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + + /** + * The model of the client + */ + public Player withModel(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + /** + * The platform of the client + */ + public Player withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + /** + * The platform of the client + */ + public Player withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + /** + * The platformVersion of the client + */ + public Player withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + /** + * The platformVersion of the client + */ + public Player withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + /** + * The product name of the client + */ + public Player withProduct(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + + /** + * The product name of the client + */ + public Player withProduct(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + /** + * Indicating if the client is playing over a relay connection + */ + public Player withRelayed(boolean relayed) { + Utils.checkNotNull(relayed, "relayed"); + this.relayed = Optional.ofNullable(relayed); + return this; + } + + + /** + * Indicating if the client is playing over a relay connection + */ + public Player withRelayed(Optional relayed) { + Utils.checkNotNull(relayed, "relayed"); + this.relayed = relayed; + return this; + } + + /** + * The client's public address + */ + public Player withRemotePublicAddress(String remotePublicAddress) { + Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); + this.remotePublicAddress = Optional.ofNullable(remotePublicAddress); + return this; + } + + + /** + * The client's public address + */ + public Player withRemotePublicAddress(Optional remotePublicAddress) { + Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); + this.remotePublicAddress = remotePublicAddress; + return this; + } + + /** + * Indicating if the client is playing over HTTPS + */ + public Player withSecure(boolean secure) { + Utils.checkNotNull(secure, "secure"); + this.secure = Optional.ofNullable(secure); + return this; + } + + + /** + * Indicating if the client is playing over HTTPS + */ + public Player withSecure(Optional secure) { + Utils.checkNotNull(secure, "secure"); + this.secure = secure; + return this; + } + + /** + * The client's last reported state + */ + public Player withState(String state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + + /** + * The client's last reported state + */ + public Player withState(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + /** + * The id of the user + */ + public Player withUserID(long userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = Optional.ofNullable(userID); + return this; + } + + + /** + * The id of the user + */ + public Player withUserID(Optional userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = userID; + return this; + } + + /** + * The vendor of the client + */ + public Player withVendor(String vendor) { + Utils.checkNotNull(vendor, "vendor"); + this.vendor = Optional.ofNullable(vendor); + return this; + } + + + /** + * The vendor of the client + */ + public Player withVendor(Optional vendor) { + Utils.checkNotNull(vendor, "vendor"); + this.vendor = vendor; + return this; + } + + /** + * The version of the client + */ + public Player withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + /** + * The version of the client + */ + public Player withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Player other = (Player) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.address, other.address) && + Utils.enhancedDeepEquals(this.local, other.local) && + Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && + Utils.enhancedDeepEquals(this.model, other.model) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.product, other.product) && + Utils.enhancedDeepEquals(this.relayed, other.relayed) && + Utils.enhancedDeepEquals(this.remotePublicAddress, other.remotePublicAddress) && + Utils.enhancedDeepEquals(this.secure, other.secure) && + Utils.enhancedDeepEquals(this.state, other.state) && + Utils.enhancedDeepEquals(this.userID, other.userID) && + Utils.enhancedDeepEquals(this.vendor, other.vendor) && + Utils.enhancedDeepEquals(this.version, other.version); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, address, local, + machineIdentifier, model, platform, + platformVersion, product, relayed, + remotePublicAddress, secure, state, + userID, vendor, version); + } + + @Override + public String toString() { + return Utils.toString(Player.class, + "title", title, + "address", address, + "local", local, + "machineIdentifier", machineIdentifier, + "model", model, + "platform", platform, + "platformVersion", platformVersion, + "product", product, + "relayed", relayed, + "remotePublicAddress", remotePublicAddress, + "secure", secure, + "state", state, + "userID", userID, + "vendor", vendor, + "version", version); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional address = Optional.empty(); + + private Optional local = Optional.empty(); + + private Optional machineIdentifier = Optional.empty(); + + private Optional model = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional product = Optional.empty(); + + private Optional relayed = Optional.empty(); + + private Optional remotePublicAddress = Optional.empty(); + + private Optional secure = Optional.empty(); + + private Optional state = Optional.empty(); + + private Optional userID = Optional.empty(); + + private Optional vendor = Optional.empty(); + + private Optional version = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The title of the client + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the client + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The remote address + */ + public Builder address(String address) { + Utils.checkNotNull(address, "address"); + this.address = Optional.ofNullable(address); + return this; + } + + /** + * The remote address + */ + public Builder address(Optional address) { + Utils.checkNotNull(address, "address"); + this.address = address; + return this; + } + + + /** + * Indicating if the client is playing from the local LAN + */ + public Builder local(boolean local) { + Utils.checkNotNull(local, "local"); + this.local = Optional.ofNullable(local); + return this; + } + + /** + * Indicating if the client is playing from the local LAN + */ + public Builder local(Optional local) { + Utils.checkNotNull(local, "local"); + this.local = local; + return this; + } + + + /** + * The identifier of the client + */ + public Builder machineIdentifier(String machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + /** + * The identifier of the client + */ + public Builder machineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + + /** + * The model of the client + */ + public Builder model(String model) { + Utils.checkNotNull(model, "model"); + this.model = Optional.ofNullable(model); + return this; + } + + /** + * The model of the client + */ + public Builder model(Optional model) { + Utils.checkNotNull(model, "model"); + this.model = model; + return this; + } + + + /** + * The platform of the client + */ + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + /** + * The platform of the client + */ + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + /** + * The platformVersion of the client + */ + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + /** + * The platformVersion of the client + */ + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + /** + * The product name of the client + */ + public Builder product(String product) { + Utils.checkNotNull(product, "product"); + this.product = Optional.ofNullable(product); + return this; + } + + /** + * The product name of the client + */ + public Builder product(Optional product) { + Utils.checkNotNull(product, "product"); + this.product = product; + return this; + } + + + /** + * Indicating if the client is playing over a relay connection + */ + public Builder relayed(boolean relayed) { + Utils.checkNotNull(relayed, "relayed"); + this.relayed = Optional.ofNullable(relayed); + return this; + } + + /** + * Indicating if the client is playing over a relay connection + */ + public Builder relayed(Optional relayed) { + Utils.checkNotNull(relayed, "relayed"); + this.relayed = relayed; + return this; + } + + + /** + * The client's public address + */ + public Builder remotePublicAddress(String remotePublicAddress) { + Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); + this.remotePublicAddress = Optional.ofNullable(remotePublicAddress); + return this; + } + + /** + * The client's public address + */ + public Builder remotePublicAddress(Optional remotePublicAddress) { + Utils.checkNotNull(remotePublicAddress, "remotePublicAddress"); + this.remotePublicAddress = remotePublicAddress; + return this; + } + + + /** + * Indicating if the client is playing over HTTPS + */ + public Builder secure(boolean secure) { + Utils.checkNotNull(secure, "secure"); + this.secure = Optional.ofNullable(secure); + return this; + } + + /** + * Indicating if the client is playing over HTTPS + */ + public Builder secure(Optional secure) { + Utils.checkNotNull(secure, "secure"); + this.secure = secure; + return this; + } + + + /** + * The client's last reported state + */ + public Builder state(String state) { + Utils.checkNotNull(state, "state"); + this.state = Optional.ofNullable(state); + return this; + } + + /** + * The client's last reported state + */ + public Builder state(Optional state) { + Utils.checkNotNull(state, "state"); + this.state = state; + return this; + } + + + /** + * The id of the user + */ + public Builder userID(long userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = Optional.ofNullable(userID); + return this; + } + + /** + * The id of the user + */ + public Builder userID(Optional userID) { + Utils.checkNotNull(userID, "userID"); + this.userID = userID; + return this; + } + + + /** + * The vendor of the client + */ + public Builder vendor(String vendor) { + Utils.checkNotNull(vendor, "vendor"); + this.vendor = Optional.ofNullable(vendor); + return this; + } + + /** + * The vendor of the client + */ + public Builder vendor(Optional vendor) { + Utils.checkNotNull(vendor, "vendor"); + this.vendor = vendor; + return this; + } + + + /** + * The version of the client + */ + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + /** + * The version of the client + */ + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public Player build() { + + return new Player( + title, address, local, + machineIdentifier, model, platform, + platformVersion, product, relayed, + remotePublicAddress, secure, state, + userID, vendor, version); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/PlaylistType.java b/src/main/java/dev/plexapi/sdk/models/shared/PlaylistType.java new file mode 100644 index 00000000..372d56ce --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/PlaylistType.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * PlaylistType + * + *

The type of the playlist. + */ +public enum PlaylistType { + AUDIO("audio"), + VIDEO("video"), + PHOTO("photo"); + + @JsonValue + private final String value; + + PlaylistType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (PlaylistType o: PlaylistType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/PostResponses200.java b/src/main/java/dev/plexapi/sdk/models/shared/PostResponses200.java new file mode 100644 index 00000000..4573a7aa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/PostResponses200.java @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * PostResponses200 + * + *

OK + */ +public class PostResponses200 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public PostResponses200( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public PostResponses200() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public PostResponses200 withMediaContainer(PostResponses200MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public PostResponses200 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; + } + PostResponses200 other = (PostResponses200) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(PostResponses200.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(PostResponses200MediaContainer 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 PostResponses200 build() { + + return new PostResponses200( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/PostResponses200MediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/PostResponses200MediaContainer.java new file mode 100644 index 00000000..62f623c5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/PostResponses200MediaContainer.java @@ -0,0 +1,599 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +/** + * PostResponses200MediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class PostResponses200MediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("color") + private Optional color; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("endTimeOffset") + private Optional endTimeOffset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("startTimeOffset") + private Optional startTimeOffset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public PostResponses200MediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("color") Optional color, + @JsonProperty("endTimeOffset") Optional endTimeOffset, + @JsonProperty("id") Optional id, + @JsonProperty("startTimeOffset") Optional startTimeOffset, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(color, "color"); + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.color = color; + this.endTimeOffset = endTimeOffset; + this.id = id; + this.startTimeOffset = startTimeOffset; + this.title = title; + this.type = type; + this.additionalProperties = new HashMap<>(); + } + + public PostResponses200MediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @JsonIgnore + public Optional color() { + return color; + } + + @JsonIgnore + public Optional endTimeOffset() { + return endTimeOffset; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional startTimeOffset() { + return startTimeOffset; + } + + @JsonIgnore + public Optional title() { + return title; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + public PostResponses200MediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public PostResponses200MediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public PostResponses200MediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public PostResponses200MediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public PostResponses200MediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public PostResponses200MediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public PostResponses200MediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public PostResponses200MediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public PostResponses200MediaContainer withColor(String color) { + Utils.checkNotNull(color, "color"); + this.color = Optional.ofNullable(color); + return this; + } + + + public PostResponses200MediaContainer withColor(Optional color) { + Utils.checkNotNull(color, "color"); + this.color = color; + return this; + } + + public PostResponses200MediaContainer withEndTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = Optional.ofNullable(endTimeOffset); + return this; + } + + + public PostResponses200MediaContainer withEndTimeOffset(Optional endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + public PostResponses200MediaContainer withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public PostResponses200MediaContainer withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public PostResponses200MediaContainer withStartTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = Optional.ofNullable(startTimeOffset); + return this; + } + + + public PostResponses200MediaContainer withStartTimeOffset(Optional startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + return this; + } + + public PostResponses200MediaContainer withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public PostResponses200MediaContainer withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public PostResponses200MediaContainer withType(PostResponses200Type type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public PostResponses200MediaContainer withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + @JsonAnySetter + public PostResponses200MediaContainer withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public PostResponses200MediaContainer withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostResponses200MediaContainer other = (PostResponses200MediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.color, other.color) && + Utils.enhancedDeepEquals(this.endTimeOffset, other.endTimeOffset) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.startTimeOffset, other.startTimeOffset) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, color, endTimeOffset, + id, startTimeOffset, title, + type, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(PostResponses200MediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "color", color, + "endTimeOffset", endTimeOffset, + "id", id, + "startTimeOffset", startTimeOffset, + "title", title, + "type", type, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional color = Optional.empty(); + + private Optional endTimeOffset = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional startTimeOffset = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder color(String color) { + Utils.checkNotNull(color, "color"); + this.color = Optional.ofNullable(color); + return this; + } + + public Builder color(Optional color) { + Utils.checkNotNull(color, "color"); + this.color = color; + return this; + } + + + public Builder endTimeOffset(long endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = Optional.ofNullable(endTimeOffset); + return this; + } + + public Builder endTimeOffset(Optional endTimeOffset) { + Utils.checkNotNull(endTimeOffset, "endTimeOffset"); + this.endTimeOffset = endTimeOffset; + return this; + } + + + public Builder id(long 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 startTimeOffset(long startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = Optional.ofNullable(startTimeOffset); + return this; + } + + public Builder startTimeOffset(Optional startTimeOffset) { + Utils.checkNotNull(startTimeOffset, "startTimeOffset"); + this.startTimeOffset = startTimeOffset; + 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(PostResponses200Type 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 additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public PostResponses200MediaContainer build() { + + return new PostResponses200MediaContainer( + identifier, offset, size, + totalSize, color, endTimeOffset, + id, startTimeOffset, title, + type) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/PostResponses200Type.java b/src/main/java/dev/plexapi/sdk/models/shared/PostResponses200Type.java new file mode 100644 index 00000000..e76e22c4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/PostResponses200Type.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum PostResponses200Type { + INTRO("intro"), + COMMERCIAL("commercial"), + BOOKMARK("bookmark"), + RESUME("resume"), + CREDIT("credit"); + + @JsonValue + private final String value; + + PostResponses200Type(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (PostResponses200Type o: PostResponses200Type.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Protocol.java b/src/main/java/dev/plexapi/sdk/models/shared/Protocol.java new file mode 100644 index 00000000..1ddbf2b1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Protocol.java @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum Protocol { + HTTP("http"), + HLS("hls"), + DASH("dash"); + + @JsonValue + private final String value; + + Protocol(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Protocol o: Protocol.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/RecommendationsVisibility.java b/src/main/java/dev/plexapi/sdk/models/shared/RecommendationsVisibility.java new file mode 100644 index 00000000..d3ae7b20 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/RecommendationsVisibility.java @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * RecommendationsVisibility + * + *

The visibility of this hub in recommendations: + * - all: Visible to all users + * - none: Visible to no users + * - admin: Visible to only admin users + * - shared: Visible to shared users + */ +public enum RecommendationsVisibility { + ALL("all"), + NONE("none"), + ADMIN("admin"), + SHARED("shared"); + + @JsonValue + private final String value; + + RecommendationsVisibility(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (RecommendationsVisibility o: RecommendationsVisibility.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200.java b/src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200.java new file mode 100644 index 00000000..ea2c0c56 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200.java @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * RequestHandlerSlashGetResponses200 + * + *

OK + */ +public class RequestHandlerSlashGetResponses200 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public RequestHandlerSlashGetResponses200( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public RequestHandlerSlashGetResponses200() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public RequestHandlerSlashGetResponses200 withMediaContainer(RequestHandlerSlashGetResponses200MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public RequestHandlerSlashGetResponses200 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; + } + RequestHandlerSlashGetResponses200 other = (RequestHandlerSlashGetResponses200) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(RequestHandlerSlashGetResponses200.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(RequestHandlerSlashGetResponses200MediaContainer 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 RequestHandlerSlashGetResponses200 build() { + + return new RequestHandlerSlashGetResponses200( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200Directory.java b/src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200Directory.java new file mode 100644 index 00000000..37ffafa7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200Directory.java @@ -0,0 +1,215 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class RequestHandlerSlashGetResponses200Directory { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("count") + private Optional count; + + /** + * The key where this directory is found + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonCreator + public RequestHandlerSlashGetResponses200Directory( + @JsonProperty("count") Optional count, + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(count, "count"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + this.count = count; + this.key = key; + this.title = title; + } + + public RequestHandlerSlashGetResponses200Directory() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional count() { + return count; + } + + /** + * The key where this directory is found + */ + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional title() { + return title; + } + + public static Builder builder() { + return new Builder(); + } + + + public RequestHandlerSlashGetResponses200Directory withCount(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + + public RequestHandlerSlashGetResponses200Directory withCount(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + /** + * The key where this directory is found + */ + public RequestHandlerSlashGetResponses200Directory withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key where this directory is found + */ + public RequestHandlerSlashGetResponses200Directory withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public RequestHandlerSlashGetResponses200Directory withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public RequestHandlerSlashGetResponses200Directory 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; + } + RequestHandlerSlashGetResponses200Directory other = (RequestHandlerSlashGetResponses200Directory) o; + return + Utils.enhancedDeepEquals(this.count, other.count) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.title, other.title); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + count, key, title); + } + + @Override + public String toString() { + return Utils.toString(RequestHandlerSlashGetResponses200Directory.class, + "count", count, + "key", key, + "title", title); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional count = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder count(long count) { + Utils.checkNotNull(count, "count"); + this.count = Optional.ofNullable(count); + return this; + } + + public Builder count(Optional count) { + Utils.checkNotNull(count, "count"); + this.count = count; + return this; + } + + + /** + * The key where this directory is found + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key where this directory is found + */ + 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 RequestHandlerSlashGetResponses200Directory build() { + + return new RequestHandlerSlashGetResponses200Directory( + count, key, title); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200MediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200MediaContainer.java new file mode 100644 index 00000000..d363b242 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/RequestHandlerSlashGetResponses200MediaContainer.java @@ -0,0 +1,2501 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * RequestHandlerSlashGetResponses200MediaContainer + * + *

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +public class RequestHandlerSlashGetResponses200MediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset") + private Optional offset; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowCameraUpload") + private Optional allowCameraUpload; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowChannelAccess") + private Optional allowChannelAccess; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowMediaDeletion") + private Optional allowMediaDeletion; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSharing") + private Optional allowSharing; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowTuners") + private Optional allowTuners; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("backgroundProcessing") + private Optional backgroundProcessing; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("certificate") + private Optional certificate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("companionProxy") + private Optional companionProxy; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("countryCode") + private Optional countryCode; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("diagnostics") + private Optional diagnostics; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("eventStream") + private Optional eventStream; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("friendlyName") + private Optional friendlyName; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubSearch") + private Optional hubSearch; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("itemClusters") + private Optional itemClusters; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("livetv") + private Optional livetv; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("machineIdentifier") + private Optional machineIdentifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaProviders") + private Optional mediaProviders; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("multiuser") + private Optional multiuser; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("musicAnalysis") + private Optional musicAnalysis; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlex") + private Optional myPlex; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexMappingState") + private Optional myPlexMappingState; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexSigninState") + private Optional myPlexSigninState; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexSubscription") + private Optional myPlexSubscription; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("myPlexUsername") + private Optional myPlexUsername; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offlineTranscode") + private Optional offlineTranscode; + + /** + * A comma-separated list of features which are enabled for the server owner + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ownerFeatures") + private Optional ownerFeatures; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platform") + private Optional platform; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("platformVersion") + private Optional platformVersion; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pluginHost") + private Optional pluginHost; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pushNotifications") + private Optional pushNotifications; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("readOnlyLibraries") + private Optional readOnlyLibraries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamingBrainABRVersion") + private Optional streamingBrainABRVersion; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamingBrainVersion") + private Optional streamingBrainVersion; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sync") + private Optional sync; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderActiveVideoSessions") + private Optional transcoderActiveVideoSessions; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderAudio") + private Optional transcoderAudio; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderLyrics") + private Optional transcoderLyrics; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderPhoto") + private Optional transcoderPhoto; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderSubtitles") + private Optional transcoderSubtitles; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideo") + private Optional transcoderVideo; + + /** + * The suggested video quality bitrates to present to the user + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideoBitrates") + private Optional transcoderVideoBitrates; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideoQualities") + private Optional transcoderVideoQualities; + + /** + * The suggested video resolutions to the above quality bitrates + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcoderVideoResolutions") + private Optional transcoderVideoResolutions; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updater") + private Optional updater; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("version") + private Optional version; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("voiceSearch") + private Optional voiceSearch; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + @JsonCreator + public RequestHandlerSlashGetResponses200MediaContainer( + @JsonProperty("identifier") Optional identifier, + @JsonProperty("offset") Optional offset, + @JsonProperty("size") Optional size, + @JsonProperty("totalSize") Optional totalSize, + @JsonProperty("allowCameraUpload") Optional allowCameraUpload, + @JsonProperty("allowChannelAccess") Optional allowChannelAccess, + @JsonProperty("allowMediaDeletion") Optional allowMediaDeletion, + @JsonProperty("allowSharing") Optional allowSharing, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("allowTuners") Optional allowTuners, + @JsonProperty("backgroundProcessing") Optional backgroundProcessing, + @JsonProperty("certificate") Optional certificate, + @JsonProperty("companionProxy") Optional companionProxy, + @JsonProperty("countryCode") Optional countryCode, + @JsonProperty("diagnostics") Optional diagnostics, + @JsonProperty("eventStream") Optional eventStream, + @JsonProperty("friendlyName") Optional friendlyName, + @JsonProperty("hubSearch") Optional hubSearch, + @JsonProperty("itemClusters") Optional itemClusters, + @JsonProperty("livetv") Optional livetv, + @JsonProperty("machineIdentifier") Optional machineIdentifier, + @JsonProperty("mediaProviders") Optional mediaProviders, + @JsonProperty("multiuser") Optional multiuser, + @JsonProperty("musicAnalysis") Optional musicAnalysis, + @JsonProperty("myPlex") Optional myPlex, + @JsonProperty("myPlexMappingState") Optional myPlexMappingState, + @JsonProperty("myPlexSigninState") Optional myPlexSigninState, + @JsonProperty("myPlexSubscription") Optional myPlexSubscription, + @JsonProperty("myPlexUsername") Optional myPlexUsername, + @JsonProperty("offlineTranscode") Optional offlineTranscode, + @JsonProperty("ownerFeatures") Optional ownerFeatures, + @JsonProperty("platform") Optional platform, + @JsonProperty("platformVersion") Optional platformVersion, + @JsonProperty("pluginHost") Optional pluginHost, + @JsonProperty("pushNotifications") Optional pushNotifications, + @JsonProperty("readOnlyLibraries") Optional readOnlyLibraries, + @JsonProperty("streamingBrainABRVersion") Optional streamingBrainABRVersion, + @JsonProperty("streamingBrainVersion") Optional streamingBrainVersion, + @JsonProperty("sync") Optional sync, + @JsonProperty("transcoderActiveVideoSessions") Optional transcoderActiveVideoSessions, + @JsonProperty("transcoderAudio") Optional transcoderAudio, + @JsonProperty("transcoderLyrics") Optional transcoderLyrics, + @JsonProperty("transcoderPhoto") Optional transcoderPhoto, + @JsonProperty("transcoderSubtitles") Optional transcoderSubtitles, + @JsonProperty("transcoderVideo") Optional transcoderVideo, + @JsonProperty("transcoderVideoBitrates") Optional transcoderVideoBitrates, + @JsonProperty("transcoderVideoQualities") Optional transcoderVideoQualities, + @JsonProperty("transcoderVideoResolutions") Optional transcoderVideoResolutions, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("updater") Optional updater, + @JsonProperty("version") Optional version, + @JsonProperty("voiceSearch") Optional voiceSearch, + @JsonProperty("Directory") Optional> directory) { + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(totalSize, "totalSize"); + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + Utils.checkNotNull(allowSharing, "allowSharing"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(allowTuners, "allowTuners"); + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + Utils.checkNotNull(certificate, "certificate"); + Utils.checkNotNull(companionProxy, "companionProxy"); + Utils.checkNotNull(countryCode, "countryCode"); + Utils.checkNotNull(diagnostics, "diagnostics"); + Utils.checkNotNull(eventStream, "eventStream"); + Utils.checkNotNull(friendlyName, "friendlyName"); + Utils.checkNotNull(hubSearch, "hubSearch"); + Utils.checkNotNull(itemClusters, "itemClusters"); + Utils.checkNotNull(livetv, "livetv"); + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + Utils.checkNotNull(mediaProviders, "mediaProviders"); + Utils.checkNotNull(multiuser, "multiuser"); + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + Utils.checkNotNull(myPlex, "myPlex"); + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + Utils.checkNotNull(platform, "platform"); + Utils.checkNotNull(platformVersion, "platformVersion"); + Utils.checkNotNull(pluginHost, "pluginHost"); + Utils.checkNotNull(pushNotifications, "pushNotifications"); + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + Utils.checkNotNull(sync, "sync"); + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(updater, "updater"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(voiceSearch, "voiceSearch"); + Utils.checkNotNull(directory, "directory"); + this.identifier = identifier; + this.offset = offset; + this.size = size; + this.totalSize = totalSize; + this.allowCameraUpload = allowCameraUpload; + this.allowChannelAccess = allowChannelAccess; + this.allowMediaDeletion = allowMediaDeletion; + this.allowSharing = allowSharing; + this.allowSync = allowSync; + this.allowTuners = allowTuners; + this.backgroundProcessing = backgroundProcessing; + this.certificate = certificate; + this.companionProxy = companionProxy; + this.countryCode = countryCode; + this.diagnostics = diagnostics; + this.eventStream = eventStream; + this.friendlyName = friendlyName; + this.hubSearch = hubSearch; + this.itemClusters = itemClusters; + this.livetv = livetv; + this.machineIdentifier = machineIdentifier; + this.mediaProviders = mediaProviders; + this.multiuser = multiuser; + this.musicAnalysis = musicAnalysis; + this.myPlex = myPlex; + this.myPlexMappingState = myPlexMappingState; + this.myPlexSigninState = myPlexSigninState; + this.myPlexSubscription = myPlexSubscription; + this.myPlexUsername = myPlexUsername; + this.offlineTranscode = offlineTranscode; + this.ownerFeatures = ownerFeatures; + this.platform = platform; + this.platformVersion = platformVersion; + this.pluginHost = pluginHost; + this.pushNotifications = pushNotifications; + this.readOnlyLibraries = readOnlyLibraries; + this.streamingBrainABRVersion = streamingBrainABRVersion; + this.streamingBrainVersion = streamingBrainVersion; + this.sync = sync; + this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; + this.transcoderAudio = transcoderAudio; + this.transcoderLyrics = transcoderLyrics; + this.transcoderPhoto = transcoderPhoto; + this.transcoderSubtitles = transcoderSubtitles; + this.transcoderVideo = transcoderVideo; + this.transcoderVideoBitrates = transcoderVideoBitrates; + this.transcoderVideoQualities = transcoderVideoQualities; + this.transcoderVideoResolutions = transcoderVideoResolutions; + this.updatedAt = updatedAt; + this.updater = updater; + this.version = version; + this.voiceSearch = voiceSearch; + this.directory = directory; + } + + public RequestHandlerSlashGetResponses200MediaContainer() { + 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(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), 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 identifier() { + return identifier; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional size() { + return size; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + @JsonIgnore + public Optional totalSize() { + return totalSize; + } + + @JsonIgnore + public Optional allowCameraUpload() { + return allowCameraUpload; + } + + @JsonIgnore + public Optional allowChannelAccess() { + return allowChannelAccess; + } + + @JsonIgnore + public Optional allowMediaDeletion() { + return allowMediaDeletion; + } + + @JsonIgnore + public Optional allowSharing() { + return allowSharing; + } + + @JsonIgnore + public Optional allowSync() { + return allowSync; + } + + @JsonIgnore + public Optional allowTuners() { + return allowTuners; + } + + @JsonIgnore + public Optional backgroundProcessing() { + return backgroundProcessing; + } + + @JsonIgnore + public Optional certificate() { + return certificate; + } + + @JsonIgnore + public Optional companionProxy() { + return companionProxy; + } + + @JsonIgnore + public Optional countryCode() { + return countryCode; + } + + @JsonIgnore + public Optional diagnostics() { + return diagnostics; + } + + @JsonIgnore + public Optional eventStream() { + return eventStream; + } + + @JsonIgnore + public Optional friendlyName() { + return friendlyName; + } + + @JsonIgnore + public Optional hubSearch() { + return hubSearch; + } + + @JsonIgnore + public Optional itemClusters() { + return itemClusters; + } + + @JsonIgnore + public Optional livetv() { + return livetv; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional machineIdentifier() { + return (Optional) machineIdentifier; + } + + @JsonIgnore + public Optional mediaProviders() { + return mediaProviders; + } + + @JsonIgnore + public Optional multiuser() { + return multiuser; + } + + @JsonIgnore + public Optional musicAnalysis() { + return musicAnalysis; + } + + @JsonIgnore + public Optional myPlex() { + return myPlex; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional myPlexMappingState() { + return (Optional) myPlexMappingState; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional myPlexSigninState() { + return (Optional) myPlexSigninState; + } + + @JsonIgnore + public Optional myPlexSubscription() { + return myPlexSubscription; + } + + @JsonIgnore + public Optional myPlexUsername() { + return myPlexUsername; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional offlineTranscode() { + return (Optional) offlineTranscode; + } + + /** + * A comma-separated list of features which are enabled for the server owner + */ + @JsonIgnore + public Optional ownerFeatures() { + return ownerFeatures; + } + + @JsonIgnore + public Optional platform() { + return platform; + } + + @JsonIgnore + public Optional platformVersion() { + return platformVersion; + } + + @JsonIgnore + public Optional pluginHost() { + return pluginHost; + } + + @JsonIgnore + public Optional pushNotifications() { + return pushNotifications; + } + + @JsonIgnore + public Optional readOnlyLibraries() { + return readOnlyLibraries; + } + + @JsonIgnore + public Optional streamingBrainABRVersion() { + return streamingBrainABRVersion; + } + + @JsonIgnore + public Optional streamingBrainVersion() { + return streamingBrainVersion; + } + + @JsonIgnore + public Optional sync() { + return sync; + } + + @JsonIgnore + public Optional transcoderActiveVideoSessions() { + return transcoderActiveVideoSessions; + } + + @JsonIgnore + public Optional transcoderAudio() { + return transcoderAudio; + } + + @JsonIgnore + public Optional transcoderLyrics() { + return transcoderLyrics; + } + + @JsonIgnore + public Optional transcoderPhoto() { + return transcoderPhoto; + } + + @JsonIgnore + public Optional transcoderSubtitles() { + return transcoderSubtitles; + } + + @JsonIgnore + public Optional transcoderVideo() { + return transcoderVideo; + } + + /** + * The suggested video quality bitrates to present to the user + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional transcoderVideoBitrates() { + return (Optional) transcoderVideoBitrates; + } + + @JsonIgnore + public Optional transcoderVideoQualities() { + return transcoderVideoQualities; + } + + /** + * The suggested video resolutions to the above quality bitrates + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional transcoderVideoResolutions() { + return (Optional) transcoderVideoResolutions; + } + + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + @JsonIgnore + public Optional updater() { + return updater; + } + + @JsonIgnore + public Optional version() { + return version; + } + + @JsonIgnore + public Optional voiceSearch() { + return voiceSearch; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + public static Builder builder() { + return new Builder(); + } + + + public RequestHandlerSlashGetResponses200MediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public RequestHandlerSlashGetResponses200MediaContainer withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public RequestHandlerSlashGetResponses200MediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public RequestHandlerSlashGetResponses200MediaContainer withTotalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public RequestHandlerSlashGetResponses200MediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withAllowCameraUpload(boolean allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withAllowCameraUpload(Optional allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = allowCameraUpload; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withAllowChannelAccess(boolean allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = Optional.ofNullable(allowChannelAccess); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withAllowChannelAccess(Optional allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = allowChannelAccess; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withAllowMediaDeletion(boolean allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = Optional.ofNullable(allowMediaDeletion); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withAllowMediaDeletion(Optional allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = allowMediaDeletion; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withAllowSharing(boolean allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = Optional.ofNullable(allowSharing); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withAllowSharing(Optional allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = allowSharing; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withAllowTuners(boolean allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = Optional.ofNullable(allowTuners); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withAllowTuners(Optional allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = allowTuners; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withBackgroundProcessing(boolean backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = Optional.ofNullable(backgroundProcessing); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withBackgroundProcessing(Optional backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = backgroundProcessing; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withCertificate(boolean certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = Optional.ofNullable(certificate); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withCertificate(Optional certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = certificate; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withCompanionProxy(boolean companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = Optional.ofNullable(companionProxy); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withCompanionProxy(Optional companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = companionProxy; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withCountryCode(String countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = Optional.ofNullable(countryCode); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withCountryCode(Optional countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = countryCode; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withDiagnostics(String diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = Optional.ofNullable(diagnostics); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withDiagnostics(Optional diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = diagnostics; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withEventStream(boolean eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = Optional.ofNullable(eventStream); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withEventStream(Optional eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = eventStream; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withFriendlyName(String friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = Optional.ofNullable(friendlyName); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withFriendlyName(Optional friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = friendlyName; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withHubSearch(boolean hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = Optional.ofNullable(hubSearch); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withHubSearch(Optional hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = hubSearch; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withItemClusters(boolean itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = Optional.ofNullable(itemClusters); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withItemClusters(Optional itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = itemClusters; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withLivetv(long livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = Optional.ofNullable(livetv); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withLivetv(Optional livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = livetv; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withMachineIdentifier(Object machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withMachineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withMediaProviders(boolean mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = Optional.ofNullable(mediaProviders); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withMediaProviders(Optional mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = mediaProviders; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withMultiuser(boolean multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = Optional.ofNullable(multiuser); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withMultiuser(Optional multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = multiuser; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withMusicAnalysis(long musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = Optional.ofNullable(musicAnalysis); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withMusicAnalysis(Optional musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = musicAnalysis; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withMyPlex(boolean myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = Optional.ofNullable(myPlex); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withMyPlex(Optional myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = myPlex; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withMyPlexMappingState(Object myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = Optional.ofNullable(myPlexMappingState); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withMyPlexMappingState(Optional myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = myPlexMappingState; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withMyPlexSigninState(Object myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = Optional.ofNullable(myPlexSigninState); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withMyPlexSigninState(Optional myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = myPlexSigninState; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withMyPlexSubscription(boolean myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = Optional.ofNullable(myPlexSubscription); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withMyPlexSubscription(Optional myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = myPlexSubscription; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withMyPlexUsername(String myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = Optional.ofNullable(myPlexUsername); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withMyPlexUsername(Optional myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = myPlexUsername; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withOfflineTranscode(Object offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = Optional.ofNullable(offlineTranscode); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withOfflineTranscode(Optional offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = offlineTranscode; + return this; + } + + /** + * A comma-separated list of features which are enabled for the server owner + */ + public RequestHandlerSlashGetResponses200MediaContainer withOwnerFeatures(String ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = Optional.ofNullable(ownerFeatures); + return this; + } + + + /** + * A comma-separated list of features which are enabled for the server owner + */ + public RequestHandlerSlashGetResponses200MediaContainer withOwnerFeatures(Optional ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = ownerFeatures; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withPlatform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withPlatform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withPlatformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withPlatformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withPluginHost(boolean pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = Optional.ofNullable(pluginHost); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withPluginHost(Optional pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = pluginHost; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withPushNotifications(boolean pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = Optional.ofNullable(pushNotifications); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withPushNotifications(Optional pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = pushNotifications; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withReadOnlyLibraries(boolean readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = Optional.ofNullable(readOnlyLibraries); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withReadOnlyLibraries(Optional readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = readOnlyLibraries; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withStreamingBrainABRVersion(long streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = Optional.ofNullable(streamingBrainABRVersion); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withStreamingBrainABRVersion(Optional streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = streamingBrainABRVersion; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withStreamingBrainVersion(long streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = Optional.ofNullable(streamingBrainVersion); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withStreamingBrainVersion(Optional streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = streamingBrainVersion; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withSync(boolean sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = Optional.ofNullable(sync); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withSync(Optional sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = sync; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderActiveVideoSessions(long transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = Optional.ofNullable(transcoderActiveVideoSessions); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderAudio(boolean transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = Optional.ofNullable(transcoderAudio); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderAudio(Optional transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = transcoderAudio; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderLyrics(boolean transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = Optional.ofNullable(transcoderLyrics); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderLyrics(Optional transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = transcoderLyrics; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderPhoto(boolean transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = Optional.ofNullable(transcoderPhoto); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderPhoto(Optional transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = transcoderPhoto; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderSubtitles(boolean transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = Optional.ofNullable(transcoderSubtitles); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderSubtitles(Optional transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = transcoderSubtitles; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderVideo(boolean transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = Optional.ofNullable(transcoderVideo); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderVideo(Optional transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = transcoderVideo; + return this; + } + + /** + * The suggested video quality bitrates to present to the user + */ + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderVideoBitrates(Object transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = Optional.ofNullable(transcoderVideoBitrates); + return this; + } + + + /** + * The suggested video quality bitrates to present to the user + */ + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderVideoBitrates(Optional transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = transcoderVideoBitrates; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderVideoQualities(String transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = Optional.ofNullable(transcoderVideoQualities); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderVideoQualities(Optional transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = transcoderVideoQualities; + return this; + } + + /** + * The suggested video resolutions to the above quality bitrates + */ + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderVideoResolutions(Object transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = Optional.ofNullable(transcoderVideoResolutions); + return this; + } + + + /** + * The suggested video resolutions to the above quality bitrates + */ + public RequestHandlerSlashGetResponses200MediaContainer withTranscoderVideoResolutions(Optional transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = transcoderVideoResolutions; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withUpdater(boolean updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = Optional.ofNullable(updater); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withUpdater(Optional updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = updater; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withVersion(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withVoiceSearch(boolean voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = Optional.ofNullable(voiceSearch); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withVoiceSearch(Optional voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = voiceSearch; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public RequestHandlerSlashGetResponses200MediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequestHandlerSlashGetResponses200MediaContainer other = (RequestHandlerSlashGetResponses200MediaContainer) o; + return + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.totalSize, other.totalSize) && + Utils.enhancedDeepEquals(this.allowCameraUpload, other.allowCameraUpload) && + Utils.enhancedDeepEquals(this.allowChannelAccess, other.allowChannelAccess) && + Utils.enhancedDeepEquals(this.allowMediaDeletion, other.allowMediaDeletion) && + Utils.enhancedDeepEquals(this.allowSharing, other.allowSharing) && + Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && + Utils.enhancedDeepEquals(this.allowTuners, other.allowTuners) && + Utils.enhancedDeepEquals(this.backgroundProcessing, other.backgroundProcessing) && + Utils.enhancedDeepEquals(this.certificate, other.certificate) && + Utils.enhancedDeepEquals(this.companionProxy, other.companionProxy) && + Utils.enhancedDeepEquals(this.countryCode, other.countryCode) && + Utils.enhancedDeepEquals(this.diagnostics, other.diagnostics) && + Utils.enhancedDeepEquals(this.eventStream, other.eventStream) && + Utils.enhancedDeepEquals(this.friendlyName, other.friendlyName) && + Utils.enhancedDeepEquals(this.hubSearch, other.hubSearch) && + Utils.enhancedDeepEquals(this.itemClusters, other.itemClusters) && + Utils.enhancedDeepEquals(this.livetv, other.livetv) && + Utils.enhancedDeepEquals(this.machineIdentifier, other.machineIdentifier) && + Utils.enhancedDeepEquals(this.mediaProviders, other.mediaProviders) && + Utils.enhancedDeepEquals(this.multiuser, other.multiuser) && + Utils.enhancedDeepEquals(this.musicAnalysis, other.musicAnalysis) && + Utils.enhancedDeepEquals(this.myPlex, other.myPlex) && + Utils.enhancedDeepEquals(this.myPlexMappingState, other.myPlexMappingState) && + Utils.enhancedDeepEquals(this.myPlexSigninState, other.myPlexSigninState) && + Utils.enhancedDeepEquals(this.myPlexSubscription, other.myPlexSubscription) && + Utils.enhancedDeepEquals(this.myPlexUsername, other.myPlexUsername) && + Utils.enhancedDeepEquals(this.offlineTranscode, other.offlineTranscode) && + Utils.enhancedDeepEquals(this.ownerFeatures, other.ownerFeatures) && + Utils.enhancedDeepEquals(this.platform, other.platform) && + Utils.enhancedDeepEquals(this.platformVersion, other.platformVersion) && + Utils.enhancedDeepEquals(this.pluginHost, other.pluginHost) && + Utils.enhancedDeepEquals(this.pushNotifications, other.pushNotifications) && + Utils.enhancedDeepEquals(this.readOnlyLibraries, other.readOnlyLibraries) && + Utils.enhancedDeepEquals(this.streamingBrainABRVersion, other.streamingBrainABRVersion) && + Utils.enhancedDeepEquals(this.streamingBrainVersion, other.streamingBrainVersion) && + Utils.enhancedDeepEquals(this.sync, other.sync) && + Utils.enhancedDeepEquals(this.transcoderActiveVideoSessions, other.transcoderActiveVideoSessions) && + Utils.enhancedDeepEquals(this.transcoderAudio, other.transcoderAudio) && + Utils.enhancedDeepEquals(this.transcoderLyrics, other.transcoderLyrics) && + Utils.enhancedDeepEquals(this.transcoderPhoto, other.transcoderPhoto) && + Utils.enhancedDeepEquals(this.transcoderSubtitles, other.transcoderSubtitles) && + Utils.enhancedDeepEquals(this.transcoderVideo, other.transcoderVideo) && + Utils.enhancedDeepEquals(this.transcoderVideoBitrates, other.transcoderVideoBitrates) && + Utils.enhancedDeepEquals(this.transcoderVideoQualities, other.transcoderVideoQualities) && + Utils.enhancedDeepEquals(this.transcoderVideoResolutions, other.transcoderVideoResolutions) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.updater, other.updater) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.voiceSearch, other.voiceSearch) && + Utils.enhancedDeepEquals(this.directory, other.directory); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + identifier, offset, size, + totalSize, allowCameraUpload, allowChannelAccess, + allowMediaDeletion, allowSharing, allowSync, + allowTuners, backgroundProcessing, certificate, + companionProxy, countryCode, diagnostics, + eventStream, friendlyName, hubSearch, + itemClusters, livetv, machineIdentifier, + mediaProviders, multiuser, musicAnalysis, + myPlex, myPlexMappingState, myPlexSigninState, + myPlexSubscription, myPlexUsername, offlineTranscode, + ownerFeatures, platform, platformVersion, + pluginHost, pushNotifications, readOnlyLibraries, + streamingBrainABRVersion, streamingBrainVersion, sync, + transcoderActiveVideoSessions, transcoderAudio, transcoderLyrics, + transcoderPhoto, transcoderSubtitles, transcoderVideo, + transcoderVideoBitrates, transcoderVideoQualities, transcoderVideoResolutions, + updatedAt, updater, version, + voiceSearch, directory); + } + + @Override + public String toString() { + return Utils.toString(RequestHandlerSlashGetResponses200MediaContainer.class, + "identifier", identifier, + "offset", offset, + "size", size, + "totalSize", totalSize, + "allowCameraUpload", allowCameraUpload, + "allowChannelAccess", allowChannelAccess, + "allowMediaDeletion", allowMediaDeletion, + "allowSharing", allowSharing, + "allowSync", allowSync, + "allowTuners", allowTuners, + "backgroundProcessing", backgroundProcessing, + "certificate", certificate, + "companionProxy", companionProxy, + "countryCode", countryCode, + "diagnostics", diagnostics, + "eventStream", eventStream, + "friendlyName", friendlyName, + "hubSearch", hubSearch, + "itemClusters", itemClusters, + "livetv", livetv, + "machineIdentifier", machineIdentifier, + "mediaProviders", mediaProviders, + "multiuser", multiuser, + "musicAnalysis", musicAnalysis, + "myPlex", myPlex, + "myPlexMappingState", myPlexMappingState, + "myPlexSigninState", myPlexSigninState, + "myPlexSubscription", myPlexSubscription, + "myPlexUsername", myPlexUsername, + "offlineTranscode", offlineTranscode, + "ownerFeatures", ownerFeatures, + "platform", platform, + "platformVersion", platformVersion, + "pluginHost", pluginHost, + "pushNotifications", pushNotifications, + "readOnlyLibraries", readOnlyLibraries, + "streamingBrainABRVersion", streamingBrainABRVersion, + "streamingBrainVersion", streamingBrainVersion, + "sync", sync, + "transcoderActiveVideoSessions", transcoderActiveVideoSessions, + "transcoderAudio", transcoderAudio, + "transcoderLyrics", transcoderLyrics, + "transcoderPhoto", transcoderPhoto, + "transcoderSubtitles", transcoderSubtitles, + "transcoderVideo", transcoderVideo, + "transcoderVideoBitrates", transcoderVideoBitrates, + "transcoderVideoQualities", transcoderVideoQualities, + "transcoderVideoResolutions", transcoderVideoResolutions, + "updatedAt", updatedAt, + "updater", updater, + "version", version, + "voiceSearch", voiceSearch, + "directory", directory); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Optional offset = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional totalSize = Optional.empty(); + + private Optional allowCameraUpload = Optional.empty(); + + private Optional allowChannelAccess = Optional.empty(); + + private Optional allowMediaDeletion = Optional.empty(); + + private Optional allowSharing = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional allowTuners = Optional.empty(); + + private Optional backgroundProcessing = Optional.empty(); + + private Optional certificate = Optional.empty(); + + private Optional companionProxy = Optional.empty(); + + private Optional countryCode = Optional.empty(); + + private Optional diagnostics = Optional.empty(); + + private Optional eventStream = Optional.empty(); + + private Optional friendlyName = Optional.empty(); + + private Optional hubSearch = Optional.empty(); + + private Optional itemClusters = Optional.empty(); + + private Optional livetv = Optional.empty(); + + private Optional machineIdentifier = Optional.empty(); + + private Optional mediaProviders = Optional.empty(); + + private Optional multiuser = Optional.empty(); + + private Optional musicAnalysis = Optional.empty(); + + private Optional myPlex = Optional.empty(); + + private Optional myPlexMappingState = Optional.empty(); + + private Optional myPlexSigninState = Optional.empty(); + + private Optional myPlexSubscription = Optional.empty(); + + private Optional myPlexUsername = Optional.empty(); + + private Optional offlineTranscode = Optional.empty(); + + private Optional ownerFeatures = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional platformVersion = Optional.empty(); + + private Optional pluginHost = Optional.empty(); + + private Optional pushNotifications = Optional.empty(); + + private Optional readOnlyLibraries = Optional.empty(); + + private Optional streamingBrainABRVersion = Optional.empty(); + + private Optional streamingBrainVersion = Optional.empty(); + + private Optional sync = Optional.empty(); + + private Optional transcoderActiveVideoSessions = Optional.empty(); + + private Optional transcoderAudio = Optional.empty(); + + private Optional transcoderLyrics = Optional.empty(); + + private Optional transcoderPhoto = Optional.empty(); + + private Optional transcoderSubtitles = Optional.empty(); + + private Optional transcoderVideo = Optional.empty(); + + private Optional transcoderVideoBitrates = Optional.empty(); + + private Optional transcoderVideoQualities = Optional.empty(); + + private Optional transcoderVideoResolutions = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional updater = Optional.empty(); + + private Optional version = Optional.empty(); + + private Optional voiceSearch = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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; + } + + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + + public Builder size(long 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; + } + + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(long totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + */ + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; + return this; + } + + + public Builder allowCameraUpload(boolean allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = Optional.ofNullable(allowCameraUpload); + return this; + } + + public Builder allowCameraUpload(Optional allowCameraUpload) { + Utils.checkNotNull(allowCameraUpload, "allowCameraUpload"); + this.allowCameraUpload = allowCameraUpload; + return this; + } + + + public Builder allowChannelAccess(boolean allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = Optional.ofNullable(allowChannelAccess); + return this; + } + + public Builder allowChannelAccess(Optional allowChannelAccess) { + Utils.checkNotNull(allowChannelAccess, "allowChannelAccess"); + this.allowChannelAccess = allowChannelAccess; + return this; + } + + + public Builder allowMediaDeletion(boolean allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = Optional.ofNullable(allowMediaDeletion); + return this; + } + + public Builder allowMediaDeletion(Optional allowMediaDeletion) { + Utils.checkNotNull(allowMediaDeletion, "allowMediaDeletion"); + this.allowMediaDeletion = allowMediaDeletion; + return this; + } + + + public Builder allowSharing(boolean allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = Optional.ofNullable(allowSharing); + return this; + } + + public Builder allowSharing(Optional allowSharing) { + Utils.checkNotNull(allowSharing, "allowSharing"); + this.allowSharing = allowSharing; + 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 allowTuners(boolean allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = Optional.ofNullable(allowTuners); + return this; + } + + public Builder allowTuners(Optional allowTuners) { + Utils.checkNotNull(allowTuners, "allowTuners"); + this.allowTuners = allowTuners; + return this; + } + + + public Builder backgroundProcessing(boolean backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = Optional.ofNullable(backgroundProcessing); + return this; + } + + public Builder backgroundProcessing(Optional backgroundProcessing) { + Utils.checkNotNull(backgroundProcessing, "backgroundProcessing"); + this.backgroundProcessing = backgroundProcessing; + return this; + } + + + public Builder certificate(boolean certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = Optional.ofNullable(certificate); + return this; + } + + public Builder certificate(Optional certificate) { + Utils.checkNotNull(certificate, "certificate"); + this.certificate = certificate; + return this; + } + + + public Builder companionProxy(boolean companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = Optional.ofNullable(companionProxy); + return this; + } + + public Builder companionProxy(Optional companionProxy) { + Utils.checkNotNull(companionProxy, "companionProxy"); + this.companionProxy = companionProxy; + return this; + } + + + public Builder countryCode(String countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = Optional.ofNullable(countryCode); + return this; + } + + public Builder countryCode(Optional countryCode) { + Utils.checkNotNull(countryCode, "countryCode"); + this.countryCode = countryCode; + return this; + } + + + public Builder diagnostics(String diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = Optional.ofNullable(diagnostics); + return this; + } + + public Builder diagnostics(Optional diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = diagnostics; + return this; + } + + + public Builder eventStream(boolean eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = Optional.ofNullable(eventStream); + return this; + } + + public Builder eventStream(Optional eventStream) { + Utils.checkNotNull(eventStream, "eventStream"); + this.eventStream = eventStream; + return this; + } + + + public Builder friendlyName(String friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = Optional.ofNullable(friendlyName); + return this; + } + + public Builder friendlyName(Optional friendlyName) { + Utils.checkNotNull(friendlyName, "friendlyName"); + this.friendlyName = friendlyName; + return this; + } + + + public Builder hubSearch(boolean hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = Optional.ofNullable(hubSearch); + return this; + } + + public Builder hubSearch(Optional hubSearch) { + Utils.checkNotNull(hubSearch, "hubSearch"); + this.hubSearch = hubSearch; + return this; + } + + + public Builder itemClusters(boolean itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = Optional.ofNullable(itemClusters); + return this; + } + + public Builder itemClusters(Optional itemClusters) { + Utils.checkNotNull(itemClusters, "itemClusters"); + this.itemClusters = itemClusters; + return this; + } + + + public Builder livetv(long livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = Optional.ofNullable(livetv); + return this; + } + + public Builder livetv(Optional livetv) { + Utils.checkNotNull(livetv, "livetv"); + this.livetv = livetv; + return this; + } + + + public Builder machineIdentifier(Object machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = Optional.ofNullable(machineIdentifier); + return this; + } + + public Builder machineIdentifier(Optional machineIdentifier) { + Utils.checkNotNull(machineIdentifier, "machineIdentifier"); + this.machineIdentifier = machineIdentifier; + return this; + } + + + public Builder mediaProviders(boolean mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = Optional.ofNullable(mediaProviders); + return this; + } + + public Builder mediaProviders(Optional mediaProviders) { + Utils.checkNotNull(mediaProviders, "mediaProviders"); + this.mediaProviders = mediaProviders; + return this; + } + + + public Builder multiuser(boolean multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = Optional.ofNullable(multiuser); + return this; + } + + public Builder multiuser(Optional multiuser) { + Utils.checkNotNull(multiuser, "multiuser"); + this.multiuser = multiuser; + return this; + } + + + public Builder musicAnalysis(long musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = Optional.ofNullable(musicAnalysis); + return this; + } + + public Builder musicAnalysis(Optional musicAnalysis) { + Utils.checkNotNull(musicAnalysis, "musicAnalysis"); + this.musicAnalysis = musicAnalysis; + return this; + } + + + public Builder myPlex(boolean myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = Optional.ofNullable(myPlex); + return this; + } + + public Builder myPlex(Optional myPlex) { + Utils.checkNotNull(myPlex, "myPlex"); + this.myPlex = myPlex; + return this; + } + + + public Builder myPlexMappingState(Object myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = Optional.ofNullable(myPlexMappingState); + return this; + } + + public Builder myPlexMappingState(Optional myPlexMappingState) { + Utils.checkNotNull(myPlexMappingState, "myPlexMappingState"); + this.myPlexMappingState = myPlexMappingState; + return this; + } + + + public Builder myPlexSigninState(Object myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = Optional.ofNullable(myPlexSigninState); + return this; + } + + public Builder myPlexSigninState(Optional myPlexSigninState) { + Utils.checkNotNull(myPlexSigninState, "myPlexSigninState"); + this.myPlexSigninState = myPlexSigninState; + return this; + } + + + public Builder myPlexSubscription(boolean myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = Optional.ofNullable(myPlexSubscription); + return this; + } + + public Builder myPlexSubscription(Optional myPlexSubscription) { + Utils.checkNotNull(myPlexSubscription, "myPlexSubscription"); + this.myPlexSubscription = myPlexSubscription; + return this; + } + + + public Builder myPlexUsername(String myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = Optional.ofNullable(myPlexUsername); + return this; + } + + public Builder myPlexUsername(Optional myPlexUsername) { + Utils.checkNotNull(myPlexUsername, "myPlexUsername"); + this.myPlexUsername = myPlexUsername; + return this; + } + + + public Builder offlineTranscode(Object offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = Optional.ofNullable(offlineTranscode); + return this; + } + + public Builder offlineTranscode(Optional offlineTranscode) { + Utils.checkNotNull(offlineTranscode, "offlineTranscode"); + this.offlineTranscode = offlineTranscode; + return this; + } + + + /** + * A comma-separated list of features which are enabled for the server owner + */ + public Builder ownerFeatures(String ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = Optional.ofNullable(ownerFeatures); + return this; + } + + /** + * A comma-separated list of features which are enabled for the server owner + */ + public Builder ownerFeatures(Optional ownerFeatures) { + Utils.checkNotNull(ownerFeatures, "ownerFeatures"); + this.ownerFeatures = ownerFeatures; + return this; + } + + + public Builder platform(String platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = Optional.ofNullable(platform); + return this; + } + + public Builder platform(Optional platform) { + Utils.checkNotNull(platform, "platform"); + this.platform = platform; + return this; + } + + + public Builder platformVersion(String platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = Optional.ofNullable(platformVersion); + return this; + } + + public Builder platformVersion(Optional platformVersion) { + Utils.checkNotNull(platformVersion, "platformVersion"); + this.platformVersion = platformVersion; + return this; + } + + + public Builder pluginHost(boolean pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = Optional.ofNullable(pluginHost); + return this; + } + + public Builder pluginHost(Optional pluginHost) { + Utils.checkNotNull(pluginHost, "pluginHost"); + this.pluginHost = pluginHost; + return this; + } + + + public Builder pushNotifications(boolean pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = Optional.ofNullable(pushNotifications); + return this; + } + + public Builder pushNotifications(Optional pushNotifications) { + Utils.checkNotNull(pushNotifications, "pushNotifications"); + this.pushNotifications = pushNotifications; + return this; + } + + + public Builder readOnlyLibraries(boolean readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = Optional.ofNullable(readOnlyLibraries); + return this; + } + + public Builder readOnlyLibraries(Optional readOnlyLibraries) { + Utils.checkNotNull(readOnlyLibraries, "readOnlyLibraries"); + this.readOnlyLibraries = readOnlyLibraries; + return this; + } + + + public Builder streamingBrainABRVersion(long streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = Optional.ofNullable(streamingBrainABRVersion); + return this; + } + + public Builder streamingBrainABRVersion(Optional streamingBrainABRVersion) { + Utils.checkNotNull(streamingBrainABRVersion, "streamingBrainABRVersion"); + this.streamingBrainABRVersion = streamingBrainABRVersion; + return this; + } + + + public Builder streamingBrainVersion(long streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = Optional.ofNullable(streamingBrainVersion); + return this; + } + + public Builder streamingBrainVersion(Optional streamingBrainVersion) { + Utils.checkNotNull(streamingBrainVersion, "streamingBrainVersion"); + this.streamingBrainVersion = streamingBrainVersion; + return this; + } + + + public Builder sync(boolean sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = Optional.ofNullable(sync); + return this; + } + + public Builder sync(Optional sync) { + Utils.checkNotNull(sync, "sync"); + this.sync = sync; + return this; + } + + + public Builder transcoderActiveVideoSessions(long transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = Optional.ofNullable(transcoderActiveVideoSessions); + return this; + } + + public Builder transcoderActiveVideoSessions(Optional transcoderActiveVideoSessions) { + Utils.checkNotNull(transcoderActiveVideoSessions, "transcoderActiveVideoSessions"); + this.transcoderActiveVideoSessions = transcoderActiveVideoSessions; + return this; + } + + + public Builder transcoderAudio(boolean transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = Optional.ofNullable(transcoderAudio); + return this; + } + + public Builder transcoderAudio(Optional transcoderAudio) { + Utils.checkNotNull(transcoderAudio, "transcoderAudio"); + this.transcoderAudio = transcoderAudio; + return this; + } + + + public Builder transcoderLyrics(boolean transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = Optional.ofNullable(transcoderLyrics); + return this; + } + + public Builder transcoderLyrics(Optional transcoderLyrics) { + Utils.checkNotNull(transcoderLyrics, "transcoderLyrics"); + this.transcoderLyrics = transcoderLyrics; + return this; + } + + + public Builder transcoderPhoto(boolean transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = Optional.ofNullable(transcoderPhoto); + return this; + } + + public Builder transcoderPhoto(Optional transcoderPhoto) { + Utils.checkNotNull(transcoderPhoto, "transcoderPhoto"); + this.transcoderPhoto = transcoderPhoto; + return this; + } + + + public Builder transcoderSubtitles(boolean transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = Optional.ofNullable(transcoderSubtitles); + return this; + } + + public Builder transcoderSubtitles(Optional transcoderSubtitles) { + Utils.checkNotNull(transcoderSubtitles, "transcoderSubtitles"); + this.transcoderSubtitles = transcoderSubtitles; + return this; + } + + + public Builder transcoderVideo(boolean transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = Optional.ofNullable(transcoderVideo); + return this; + } + + public Builder transcoderVideo(Optional transcoderVideo) { + Utils.checkNotNull(transcoderVideo, "transcoderVideo"); + this.transcoderVideo = transcoderVideo; + return this; + } + + + /** + * The suggested video quality bitrates to present to the user + */ + public Builder transcoderVideoBitrates(Object transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = Optional.ofNullable(transcoderVideoBitrates); + return this; + } + + /** + * The suggested video quality bitrates to present to the user + */ + public Builder transcoderVideoBitrates(Optional transcoderVideoBitrates) { + Utils.checkNotNull(transcoderVideoBitrates, "transcoderVideoBitrates"); + this.transcoderVideoBitrates = transcoderVideoBitrates; + return this; + } + + + public Builder transcoderVideoQualities(String transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = Optional.ofNullable(transcoderVideoQualities); + return this; + } + + public Builder transcoderVideoQualities(Optional transcoderVideoQualities) { + Utils.checkNotNull(transcoderVideoQualities, "transcoderVideoQualities"); + this.transcoderVideoQualities = transcoderVideoQualities; + return this; + } + + + /** + * The suggested video resolutions to the above quality bitrates + */ + public Builder transcoderVideoResolutions(Object transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = Optional.ofNullable(transcoderVideoResolutions); + return this; + } + + /** + * The suggested video resolutions to the above quality bitrates + */ + public Builder transcoderVideoResolutions(Optional transcoderVideoResolutions) { + Utils.checkNotNull(transcoderVideoResolutions, "transcoderVideoResolutions"); + this.transcoderVideoResolutions = transcoderVideoResolutions; + return this; + } + + + public Builder updatedAt(long 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 updater(boolean updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = Optional.ofNullable(updater); + return this; + } + + public Builder updater(Optional updater) { + Utils.checkNotNull(updater, "updater"); + this.updater = updater; + return this; + } + + + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = Optional.ofNullable(version); + return this; + } + + public Builder version(Optional version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + public Builder voiceSearch(boolean voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = Optional.ofNullable(voiceSearch); + return this; + } + + public Builder voiceSearch(Optional voiceSearch) { + Utils.checkNotNull(voiceSearch, "voiceSearch"); + this.voiceSearch = voiceSearch; + return this; + } + + + public Builder directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public RequestHandlerSlashGetResponses200MediaContainer build() { + + return new RequestHandlerSlashGetResponses200MediaContainer( + identifier, offset, size, + totalSize, allowCameraUpload, allowChannelAccess, + allowMediaDeletion, allowSharing, allowSync, + allowTuners, backgroundProcessing, certificate, + companionProxy, countryCode, diagnostics, + eventStream, friendlyName, hubSearch, + itemClusters, livetv, machineIdentifier, + mediaProviders, multiuser, musicAnalysis, + myPlex, myPlexMappingState, myPlexSigninState, + myPlexSubscription, myPlexUsername, offlineTranscode, + ownerFeatures, platform, platformVersion, + pluginHost, pushNotifications, readOnlyLibraries, + streamingBrainABRVersion, streamingBrainVersion, sync, + transcoderActiveVideoSessions, transcoderAudio, transcoderLyrics, + transcoderPhoto, transcoderSubtitles, transcoderVideo, + transcoderVideoBitrates, transcoderVideoQualities, transcoderVideoResolutions, + updatedAt, updater, version, + voiceSearch, directory); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Security.java b/src/main/java/dev/plexapi/sdk/models/shared/Security.java index 72b432d9..9da5ddb7 100644 --- a/src/main/java/dev/plexapi/sdk/models/shared/Security.java +++ b/src/main/java/dev/plexapi/sdk/models/shared/Security.java @@ -16,13 +16,13 @@ import java.util.Optional; public class Security implements HasSecurity { @SpeakeasyMetadata("security:scheme=true,type=apiKey,subtype=header,name=X-Plex-Token") - private Optional accessToken; + private Optional token; @JsonCreator public Security( - Optional accessToken) { - Utils.checkNotNull(accessToken, "accessToken"); - this.accessToken = accessToken; + Optional token) { + Utils.checkNotNull(token, "token"); + this.token = token; } public Security() { @@ -30,8 +30,8 @@ public class Security implements HasSecurity { } @JsonIgnore - public Optional accessToken() { - return accessToken; + public Optional token() { + return token; } public static Builder builder() { @@ -39,16 +39,16 @@ public class Security implements HasSecurity { } - public Security withAccessToken(String accessToken) { - Utils.checkNotNull(accessToken, "accessToken"); - this.accessToken = Optional.ofNullable(accessToken); + public Security withToken(String token) { + Utils.checkNotNull(token, "token"); + this.token = Optional.ofNullable(token); return this; } - public Security withAccessToken(Optional accessToken) { - Utils.checkNotNull(accessToken, "accessToken"); - this.accessToken = accessToken; + public Security withToken(Optional token) { + Utils.checkNotNull(token, "token"); + this.token = token; return this; } @@ -62,47 +62,47 @@ public class Security implements HasSecurity { } Security other = (Security) o; return - Utils.enhancedDeepEquals(this.accessToken, other.accessToken); + Utils.enhancedDeepEquals(this.token, other.token); } @Override public int hashCode() { return Utils.enhancedHash( - accessToken); + token); } @Override public String toString() { return Utils.toString(Security.class, - "accessToken", accessToken); + "token", token); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional accessToken = Optional.empty(); + private Optional token = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder accessToken(String accessToken) { - Utils.checkNotNull(accessToken, "accessToken"); - this.accessToken = Optional.ofNullable(accessToken); + public Builder token(String token) { + Utils.checkNotNull(token, "token"); + this.token = Optional.ofNullable(token); return this; } - public Builder accessToken(Optional accessToken) { - Utils.checkNotNull(accessToken, "accessToken"); - this.accessToken = accessToken; + public Builder token(Optional token) { + Utils.checkNotNull(token, "token"); + this.token = token; return this; } public Security build() { return new Security( - accessToken); + token); } } diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Session.java b/src/main/java/dev/plexapi/sdk/models/shared/Session.java new file mode 100644 index 00000000..33ac7a78 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Session.java @@ -0,0 +1,255 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +/** + * Session + * + *

Information about the playback session + */ +public class Session { + /** + * The bandwidth used by this client's playback in kbps + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bandwidth") + private Optional bandwidth; + + /** + * The id of the playback session + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The location of the client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private Optional location; + + @JsonCreator + public Session( + @JsonProperty("bandwidth") Optional bandwidth, + @JsonProperty("id") Optional id, + @JsonProperty("location") Optional location) { + Utils.checkNotNull(bandwidth, "bandwidth"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(location, "location"); + this.bandwidth = bandwidth; + this.id = id; + this.location = location; + } + + public Session() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The bandwidth used by this client's playback in kbps + */ + @JsonIgnore + public Optional bandwidth() { + return bandwidth; + } + + /** + * The id of the playback session + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The location of the client + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional location() { + return (Optional) location; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The bandwidth used by this client's playback in kbps + */ + public Session withBandwidth(long bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = Optional.ofNullable(bandwidth); + return this; + } + + + /** + * The bandwidth used by this client's playback in kbps + */ + public Session withBandwidth(Optional bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + return this; + } + + /** + * The id of the playback session + */ + public Session withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * The id of the playback session + */ + public Session withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The location of the client + */ + public Session withLocation(SessionLocation location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + /** + * The location of the client + */ + public Session withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Session other = (Session) o; + return + Utils.enhancedDeepEquals(this.bandwidth, other.bandwidth) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.location, other.location); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + bandwidth, id, location); + } + + @Override + public String toString() { + return Utils.toString(Session.class, + "bandwidth", bandwidth, + "id", id, + "location", location); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional bandwidth = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional location = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The bandwidth used by this client's playback in kbps + */ + public Builder bandwidth(long bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = Optional.ofNullable(bandwidth); + return this; + } + + /** + * The bandwidth used by this client's playback in kbps + */ + public Builder bandwidth(Optional bandwidth) { + Utils.checkNotNull(bandwidth, "bandwidth"); + this.bandwidth = bandwidth; + return this; + } + + + /** + * The id of the playback session + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * The id of the playback session + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * The location of the client + */ + public Builder location(SessionLocation location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + /** + * The location of the client + */ + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + public Session build() { + + return new Session( + bandwidth, id, location); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/SessionLocation.java b/src/main/java/dev/plexapi/sdk/models/shared/SessionLocation.java new file mode 100644 index 00000000..1268ed31 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/SessionLocation.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * SessionLocation + * + *

The location of the client + */ +public enum SessionLocation { + LAN("lan"), + WAN("wan"); + + @JsonValue + private final String value; + + SessionLocation(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (SessionLocation o: SessionLocation.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Setting.java b/src/main/java/dev/plexapi/sdk/models/shared/Setting.java new file mode 100644 index 00000000..93d23961 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Setting.java @@ -0,0 +1,686 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * Setting + * + *

A configuration setting or preference + */ +public class Setting { + /** + * The type of the value of this setting + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * The default value of this setting + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default") + private Optional default_; + + /** + * Whether the setting is considered advanced and normally hidden from the user + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("advanced") + private Optional advanced; + + /** + * The possible values for this setting if restricted. The list is `|` separated with `value:name` entries. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("enumValues") + private Optional enumValues; + + /** + * The group name of this setting to aid in display of a hierarchy + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("group") + private Optional group; + + /** + * Whether the setting is hidden or not + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hidden") + private Optional hidden; + + /** + * The query parameter name for this setting + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * A user-friendly name for the setting + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("label") + private Optional label; + + /** + * A description of the setting + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + /** + * The current value of this setting + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("value") + private Optional value; + + @JsonCreator + public Setting( + @JsonProperty("type") Optional type, + @JsonProperty("default") Optional default_, + @JsonProperty("advanced") Optional advanced, + @JsonProperty("enumValues") Optional enumValues, + @JsonProperty("group") Optional group, + @JsonProperty("hidden") Optional hidden, + @JsonProperty("id") Optional id, + @JsonProperty("label") Optional label, + @JsonProperty("summary") Optional summary, + @JsonProperty("value") Optional value) { + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(default_, "default_"); + Utils.checkNotNull(advanced, "advanced"); + Utils.checkNotNull(enumValues, "enumValues"); + Utils.checkNotNull(group, "group"); + Utils.checkNotNull(hidden, "hidden"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(label, "label"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(value, "value"); + this.type = type; + this.default_ = default_; + this.advanced = advanced; + this.enumValues = enumValues; + this.group = group; + this.hidden = hidden; + this.id = id; + this.label = label; + this.summary = summary; + this.value = value; + } + + public Setting() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * The type of the value of this setting + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * The default value of this setting + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional default_() { + return (Optional) default_; + } + + /** + * Whether the setting is considered advanced and normally hidden from the user + */ + @JsonIgnore + public Optional advanced() { + return advanced; + } + + /** + * The possible values for this setting if restricted. The list is `|` separated with `value:name` entries. + */ + @JsonIgnore + public Optional enumValues() { + return enumValues; + } + + /** + * The group name of this setting to aid in display of a hierarchy + */ + @JsonIgnore + public Optional group() { + return group; + } + + /** + * Whether the setting is hidden or not + */ + @JsonIgnore + public Optional hidden() { + return hidden; + } + + /** + * The query parameter name for this setting + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * A user-friendly name for the setting + */ + @JsonIgnore + public Optional label() { + return label; + } + + /** + * A description of the setting + */ + @JsonIgnore + public Optional summary() { + return summary; + } + + /** + * The current value of this setting + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional value() { + return (Optional) value; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The type of the value of this setting + */ + public Setting withType(Type type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * The type of the value of this setting + */ + public Setting withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The default value of this setting + */ + public Setting withDefault(Default default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + + /** + * The default value of this setting + */ + public Setting withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + /** + * Whether the setting is considered advanced and normally hidden from the user + */ + public Setting withAdvanced(boolean advanced) { + Utils.checkNotNull(advanced, "advanced"); + this.advanced = Optional.ofNullable(advanced); + return this; + } + + + /** + * Whether the setting is considered advanced and normally hidden from the user + */ + public Setting withAdvanced(Optional advanced) { + Utils.checkNotNull(advanced, "advanced"); + this.advanced = advanced; + return this; + } + + /** + * The possible values for this setting if restricted. The list is `|` separated with `value:name` entries. + */ + public Setting withEnumValues(String enumValues) { + Utils.checkNotNull(enumValues, "enumValues"); + this.enumValues = Optional.ofNullable(enumValues); + return this; + } + + + /** + * The possible values for this setting if restricted. The list is `|` separated with `value:name` entries. + */ + public Setting withEnumValues(Optional enumValues) { + Utils.checkNotNull(enumValues, "enumValues"); + this.enumValues = enumValues; + return this; + } + + /** + * The group name of this setting to aid in display of a hierarchy + */ + public Setting withGroup(String group) { + Utils.checkNotNull(group, "group"); + this.group = Optional.ofNullable(group); + return this; + } + + + /** + * The group name of this setting to aid in display of a hierarchy + */ + public Setting withGroup(Optional group) { + Utils.checkNotNull(group, "group"); + this.group = group; + return this; + } + + /** + * Whether the setting is hidden or not + */ + public Setting withHidden(boolean hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = Optional.ofNullable(hidden); + return this; + } + + + /** + * Whether the setting is hidden or not + */ + public Setting withHidden(Optional hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = hidden; + return this; + } + + /** + * The query parameter name for this setting + */ + public Setting withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * The query parameter name for this setting + */ + public Setting withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * A user-friendly name for the setting + */ + public Setting withLabel(String label) { + Utils.checkNotNull(label, "label"); + this.label = Optional.ofNullable(label); + return this; + } + + + /** + * A user-friendly name for the setting + */ + public Setting withLabel(Optional label) { + Utils.checkNotNull(label, "label"); + this.label = label; + return this; + } + + /** + * A description of the setting + */ + public Setting withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + + /** + * A description of the setting + */ + public Setting withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + /** + * The current value of this setting + */ + public Setting withValue(Value value) { + Utils.checkNotNull(value, "value"); + this.value = Optional.ofNullable(value); + return this; + } + + + /** + * The current value of this setting + */ + public Setting withValue(Optional value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Setting other = (Setting) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.default_, other.default_) && + Utils.enhancedDeepEquals(this.advanced, other.advanced) && + Utils.enhancedDeepEquals(this.enumValues, other.enumValues) && + Utils.enhancedDeepEquals(this.group, other.group) && + Utils.enhancedDeepEquals(this.hidden, other.hidden) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.label, other.label) && + Utils.enhancedDeepEquals(this.summary, other.summary) && + Utils.enhancedDeepEquals(this.value, other.value); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, default_, advanced, + enumValues, group, hidden, + id, label, summary, + value); + } + + @Override + public String toString() { + return Utils.toString(Setting.class, + "type", type, + "default_", default_, + "advanced", advanced, + "enumValues", enumValues, + "group", group, + "hidden", hidden, + "id", id, + "label", label, + "summary", summary, + "value", value); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional type = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional advanced = Optional.empty(); + + private Optional enumValues = Optional.empty(); + + private Optional group = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional value = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The type of the value of this setting + */ + public Builder type(Type type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * The type of the value of this setting + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The default value of this setting + */ + public Builder default_(Default default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + /** + * The default value of this setting + */ + public Builder default_(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + + /** + * Whether the setting is considered advanced and normally hidden from the user + */ + public Builder advanced(boolean advanced) { + Utils.checkNotNull(advanced, "advanced"); + this.advanced = Optional.ofNullable(advanced); + return this; + } + + /** + * Whether the setting is considered advanced and normally hidden from the user + */ + public Builder advanced(Optional advanced) { + Utils.checkNotNull(advanced, "advanced"); + this.advanced = advanced; + return this; + } + + + /** + * The possible values for this setting if restricted. The list is `|` separated with `value:name` entries. + */ + public Builder enumValues(String enumValues) { + Utils.checkNotNull(enumValues, "enumValues"); + this.enumValues = Optional.ofNullable(enumValues); + return this; + } + + /** + * The possible values for this setting if restricted. The list is `|` separated with `value:name` entries. + */ + public Builder enumValues(Optional enumValues) { + Utils.checkNotNull(enumValues, "enumValues"); + this.enumValues = enumValues; + return this; + } + + + /** + * The group name of this setting to aid in display of a hierarchy + */ + public Builder group(String group) { + Utils.checkNotNull(group, "group"); + this.group = Optional.ofNullable(group); + return this; + } + + /** + * The group name of this setting to aid in display of a hierarchy + */ + public Builder group(Optional group) { + Utils.checkNotNull(group, "group"); + this.group = group; + return this; + } + + + /** + * Whether the setting is hidden or not + */ + public Builder hidden(boolean hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = Optional.ofNullable(hidden); + return this; + } + + /** + * Whether the setting is hidden or not + */ + public Builder hidden(Optional hidden) { + Utils.checkNotNull(hidden, "hidden"); + this.hidden = hidden; + return this; + } + + + /** + * The query parameter name for this setting + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * The query parameter name for this setting + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * A user-friendly name for the setting + */ + public Builder label(String label) { + Utils.checkNotNull(label, "label"); + this.label = Optional.ofNullable(label); + return this; + } + + /** + * A user-friendly name for the setting + */ + public Builder label(Optional label) { + Utils.checkNotNull(label, "label"); + this.label = label; + return this; + } + + + /** + * A description of the setting + */ + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + /** + * A description of the setting + */ + public Builder summary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + + /** + * The current value of this setting + */ + public Builder value(Value value) { + Utils.checkNotNull(value, "value"); + this.value = Optional.ofNullable(value); + return this; + } + + /** + * The current value of this setting + */ + public Builder value(Optional value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + public Setting build() { + + return new Setting( + type, default_, advanced, + enumValues, group, hidden, + id, label, summary, + value); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/SlashGetResponses200.java b/src/main/java/dev/plexapi/sdk/models/shared/SlashGetResponses200.java new file mode 100644 index 00000000..32444011 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/SlashGetResponses200.java @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * SlashGetResponses200 + * + *

OK + */ +public class SlashGetResponses200 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public SlashGetResponses200( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public SlashGetResponses200() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public static Builder builder() { + return new Builder(); + } + + + public SlashGetResponses200 withMediaContainer(SlashGetResponses200MediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + + public SlashGetResponses200 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; + } + SlashGetResponses200 other = (SlashGetResponses200) o; + return + Utils.enhancedDeepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(SlashGetResponses200.class, + "mediaContainer", mediaContainer); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder mediaContainer(SlashGetResponses200MediaContainer 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 SlashGetResponses200 build() { + + return new SlashGetResponses200( + mediaContainer); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/SlashGetResponses200MediaContainer.java b/src/main/java/dev/plexapi/sdk/models/shared/SlashGetResponses200MediaContainer.java new file mode 100644 index 00000000..aa7152b6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/SlashGetResponses200MediaContainer.java @@ -0,0 +1,722 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class SlashGetResponses200MediaContainer { + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("content") + private Optional content; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Directory") + private Optional> directory; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagPrefix") + private Optional mediaTagPrefix; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagVersion") + private Optional mediaTagVersion; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sortAsc") + private Optional sortAsc; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title1") + private Optional title1; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewGroup") + private Optional viewGroup; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("viewMode") + private Optional viewMode; + + @JsonCreator + public SlashGetResponses200MediaContainer( + @JsonProperty("content") Optional content, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("art") Optional art, + @JsonProperty("Directory") Optional> directory, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("size") Optional size, + @JsonProperty("sortAsc") Optional sortAsc, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("title1") Optional title1, + @JsonProperty("viewGroup") Optional viewGroup, + @JsonProperty("viewMode") Optional viewMode) { + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(directory, "directory"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(sortAsc, "sortAsc"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(title1, "title1"); + Utils.checkNotNull(viewGroup, "viewGroup"); + Utils.checkNotNull(viewMode, "viewMode"); + this.content = content; + this.allowSync = allowSync; + this.art = art; + this.directory = directory; + this.identifier = identifier; + this.librarySectionID = librarySectionID; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; + this.size = size; + this.sortAsc = sortAsc; + this.thumb = thumb; + this.title1 = title1; + this.viewGroup = viewGroup; + this.viewMode = viewMode; + } + + public SlashGetResponses200MediaContainer() { + 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()); + } + + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ + @JsonIgnore + public Optional content() { + return content; + } + + @JsonIgnore + public Optional allowSync() { + return allowSync; + } + + @JsonIgnore + public Optional art() { + return art; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> directory() { + return (Optional>) directory; + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + @JsonIgnore + public Optional librarySectionID() { + return librarySectionID; + } + + @JsonIgnore + public Optional mediaTagPrefix() { + return mediaTagPrefix; + } + + @JsonIgnore + public Optional mediaTagVersion() { + return mediaTagVersion; + } + + @JsonIgnore + public Optional size() { + return size; + } + + @JsonIgnore + public Optional sortAsc() { + return sortAsc; + } + + @JsonIgnore + public Optional thumb() { + return thumb; + } + + @JsonIgnore + public Optional title1() { + return title1; + } + + @JsonIgnore + public Optional viewGroup() { + return viewGroup; + } + + @JsonIgnore + public Optional viewMode() { + return viewMode; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ + public SlashGetResponses200MediaContainer withContent(String content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ + public SlashGetResponses200MediaContainer withContent(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public SlashGetResponses200MediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + + public SlashGetResponses200MediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public SlashGetResponses200MediaContainer withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + public SlashGetResponses200MediaContainer withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public SlashGetResponses200MediaContainer withDirectory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + + public SlashGetResponses200MediaContainer withDirectory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + public SlashGetResponses200MediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public SlashGetResponses200MediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public SlashGetResponses200MediaContainer withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + + public SlashGetResponses200MediaContainer withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public SlashGetResponses200MediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + + public SlashGetResponses200MediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public SlashGetResponses200MediaContainer withMediaTagVersion(long mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + + public SlashGetResponses200MediaContainer withMediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public SlashGetResponses200MediaContainer withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public SlashGetResponses200MediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public SlashGetResponses200MediaContainer withSortAsc(boolean sortAsc) { + Utils.checkNotNull(sortAsc, "sortAsc"); + this.sortAsc = Optional.ofNullable(sortAsc); + return this; + } + + + public SlashGetResponses200MediaContainer withSortAsc(Optional sortAsc) { + Utils.checkNotNull(sortAsc, "sortAsc"); + this.sortAsc = sortAsc; + return this; + } + + public SlashGetResponses200MediaContainer withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + public SlashGetResponses200MediaContainer withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public SlashGetResponses200MediaContainer withTitle1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + + public SlashGetResponses200MediaContainer withTitle1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + public SlashGetResponses200MediaContainer withViewGroup(String viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = Optional.ofNullable(viewGroup); + return this; + } + + + public SlashGetResponses200MediaContainer withViewGroup(Optional viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = viewGroup; + return this; + } + + public SlashGetResponses200MediaContainer withViewMode(long viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + + public SlashGetResponses200MediaContainer withViewMode(Optional viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = viewMode; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SlashGetResponses200MediaContainer other = (SlashGetResponses200MediaContainer) o; + return + Utils.enhancedDeepEquals(this.content, other.content) && + Utils.enhancedDeepEquals(this.allowSync, other.allowSync) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.directory, other.directory) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.librarySectionID, other.librarySectionID) && + Utils.enhancedDeepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + Utils.enhancedDeepEquals(this.mediaTagVersion, other.mediaTagVersion) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.sortAsc, other.sortAsc) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.title1, other.title1) && + Utils.enhancedDeepEquals(this.viewGroup, other.viewGroup) && + Utils.enhancedDeepEquals(this.viewMode, other.viewMode); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + content, allowSync, art, + directory, identifier, librarySectionID, + mediaTagPrefix, mediaTagVersion, size, + sortAsc, thumb, title1, + viewGroup, viewMode); + } + + @Override + public String toString() { + return Utils.toString(SlashGetResponses200MediaContainer.class, + "content", content, + "allowSync", allowSync, + "art", art, + "directory", directory, + "identifier", identifier, + "librarySectionID", librarySectionID, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, + "size", size, + "sortAsc", sortAsc, + "thumb", thumb, + "title1", title1, + "viewGroup", viewGroup, + "viewMode", viewMode); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional content = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional> directory = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional mediaTagPrefix = Optional.empty(); + + private Optional mediaTagVersion = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional sortAsc = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional title1 = Optional.empty(); + + private Optional viewGroup = Optional.empty(); + + private Optional viewMode = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ + public Builder content(String content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + /** + * The flavors of directory found here: + * - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. + * - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. + * - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. + */ + public Builder content(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + 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 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 directory(List directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = Optional.ofNullable(directory); + return this; + } + + public Builder directory(Optional> directory) { + Utils.checkNotNull(directory, "directory"); + this.directory = directory; + return this; + } + + + public Builder 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 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 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(long 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 size(long 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 sortAsc(boolean sortAsc) { + Utils.checkNotNull(sortAsc, "sortAsc"); + this.sortAsc = Optional.ofNullable(sortAsc); + return this; + } + + public Builder sortAsc(Optional sortAsc) { + Utils.checkNotNull(sortAsc, "sortAsc"); + this.sortAsc = sortAsc; + 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 title1(String title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = Optional.ofNullable(title1); + return this; + } + + public Builder title1(Optional title1) { + Utils.checkNotNull(title1, "title1"); + this.title1 = title1; + return this; + } + + + public Builder viewGroup(String viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = Optional.ofNullable(viewGroup); + return this; + } + + public Builder viewGroup(Optional viewGroup) { + Utils.checkNotNull(viewGroup, "viewGroup"); + this.viewGroup = viewGroup; + return this; + } + + + public Builder viewMode(long viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = Optional.ofNullable(viewMode); + return this; + } + + public Builder viewMode(Optional viewMode) { + Utils.checkNotNull(viewMode, "viewMode"); + this.viewMode = viewMode; + return this; + } + + public SlashGetResponses200MediaContainer build() { + + return new SlashGetResponses200MediaContainer( + content, allowSync, art, + directory, identifier, librarySectionID, + mediaTagPrefix, mediaTagVersion, size, + sortAsc, thumb, title1, + viewGroup, viewMode); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Sort.java b/src/main/java/dev/plexapi/sdk/models/shared/Sort.java new file mode 100644 index 00000000..c184d544 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Sort.java @@ -0,0 +1,1065 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * Sort + * + *

Each `Sort` object contains a description of the sort field. + */ +public class Sort { + /** + * The title of the field. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("content") + private Optional content; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasPrefs") + private Optional hasPrefs; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasStoreServices") + private Optional hasStoreServices; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hubKey") + private Optional hubKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + /** + * The key to use in the sort field to make items sort by this item + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastAccessedAt") + private Optional lastAccessedAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Pivot") + private Optional> pivot; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("share") + private Optional share; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("titleBar") + private Optional titleBar; + + /** + * If present, this sort is the default and in this direction + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default") + private Optional default_; + + /** + * This default diction of this sort + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("defaultDirection") + private Optional defaultDirection; + + /** + * The key for sorting this field in reverse order + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("descKey") + private Optional descKey; + + /** + * The key to use to get items sorted by this field and indexed by the first character + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("firstCharacterKey") + private Optional firstCharacterKey; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public Sort( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("art") Optional art, + @JsonProperty("content") Optional content, + @JsonProperty("filter") Optional filter, + @JsonProperty("hasPrefs") Optional hasPrefs, + @JsonProperty("hasStoreServices") Optional hasStoreServices, + @JsonProperty("hubKey") Optional hubKey, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("key") Optional key, + @JsonProperty("lastAccessedAt") Optional lastAccessedAt, + @JsonProperty("Pivot") Optional> pivot, + @JsonProperty("share") Optional share, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("titleBar") Optional titleBar, + @JsonProperty("default") Optional default_, + @JsonProperty("defaultDirection") Optional defaultDirection, + @JsonProperty("descKey") Optional descKey, + @JsonProperty("firstCharacterKey") Optional firstCharacterKey) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(hasPrefs, "hasPrefs"); + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + Utils.checkNotNull(hubKey, "hubKey"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + Utils.checkNotNull(pivot, "pivot"); + Utils.checkNotNull(share, "share"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(titleBar, "titleBar"); + Utils.checkNotNull(default_, "default_"); + Utils.checkNotNull(defaultDirection, "defaultDirection"); + Utils.checkNotNull(descKey, "descKey"); + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.title = title; + this.type = type; + this.art = art; + this.content = content; + this.filter = filter; + this.hasPrefs = hasPrefs; + this.hasStoreServices = hasStoreServices; + this.hubKey = hubKey; + this.identifier = identifier; + this.key = key; + this.lastAccessedAt = lastAccessedAt; + this.pivot = pivot; + this.share = share; + this.thumb = thumb; + this.titleBar = titleBar; + this.default_ = default_; + this.defaultDirection = defaultDirection; + this.descKey = descKey; + this.firstCharacterKey = firstCharacterKey; + this.additionalProperties = new HashMap<>(); + } + + public Sort() { + 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()); + } + + /** + * The title of the field. + */ + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional art() { + return art; + } + + @JsonIgnore + public Optional content() { + return content; + } + + @JsonIgnore + public Optional filter() { + return filter; + } + + @JsonIgnore + public Optional hasPrefs() { + return hasPrefs; + } + + @JsonIgnore + public Optional hasStoreServices() { + return hasStoreServices; + } + + @JsonIgnore + public Optional hubKey() { + return hubKey; + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + /** + * The key to use in the sort field to make items sort by this item + */ + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional lastAccessedAt() { + return lastAccessedAt; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> pivot() { + return (Optional>) pivot; + } + + @JsonIgnore + public Optional share() { + return share; + } + + @JsonIgnore + public Optional thumb() { + return thumb; + } + + @JsonIgnore + public Optional titleBar() { + return titleBar; + } + + /** + * If present, this sort is the default and in this direction + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional default_() { + return (Optional) default_; + } + + /** + * This default diction of this sort + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional defaultDirection() { + return (Optional) defaultDirection; + } + + /** + * The key for sorting this field in reverse order + */ + @JsonIgnore + public Optional descKey() { + return descKey; + } + + /** + * The key to use to get items sorted by this field and indexed by the first character + */ + @JsonIgnore + public Optional firstCharacterKey() { + return firstCharacterKey; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The title of the field. + */ + public Sort withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The title of the field. + */ + public Sort withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Sort withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public Sort withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Sort withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + + public Sort withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public Sort withContent(boolean content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + + public Sort withContent(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public Sort withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + public Sort withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Sort withHasPrefs(boolean hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = Optional.ofNullable(hasPrefs); + return this; + } + + + public Sort withHasPrefs(Optional hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = hasPrefs; + return this; + } + + public Sort withHasStoreServices(boolean hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = Optional.ofNullable(hasStoreServices); + return this; + } + + + public Sort withHasStoreServices(Optional hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = hasStoreServices; + return this; + } + + public Sort withHubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + + public Sort withHubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + return this; + } + + public Sort withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + + public Sort withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + /** + * The key to use in the sort field to make items sort by this item + */ + public Sort withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * The key to use in the sort field to make items sort by this item + */ + public Sort withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Sort withLastAccessedAt(long lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = Optional.ofNullable(lastAccessedAt); + return this; + } + + + public Sort withLastAccessedAt(Optional lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = lastAccessedAt; + return this; + } + + public Sort withPivot(List pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = Optional.ofNullable(pivot); + return this; + } + + + public Sort withPivot(Optional> pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = pivot; + return this; + } + + public Sort withShare(long share) { + Utils.checkNotNull(share, "share"); + this.share = Optional.ofNullable(share); + return this; + } + + + public Sort withShare(Optional share) { + Utils.checkNotNull(share, "share"); + this.share = share; + return this; + } + + public Sort withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + public Sort withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public Sort withTitleBar(String titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = Optional.ofNullable(titleBar); + return this; + } + + + public Sort withTitleBar(Optional titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = titleBar; + return this; + } + + /** + * If present, this sort is the default and in this direction + */ + public Sort withDefault(SortDefault default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + + /** + * If present, this sort is the default and in this direction + */ + public Sort withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + /** + * This default diction of this sort + */ + public Sort withDefaultDirection(DefaultDirection defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = Optional.ofNullable(defaultDirection); + return this; + } + + + /** + * This default diction of this sort + */ + public Sort withDefaultDirection(Optional defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = defaultDirection; + return this; + } + + /** + * The key for sorting this field in reverse order + */ + public Sort withDescKey(String descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = Optional.ofNullable(descKey); + return this; + } + + + /** + * The key for sorting this field in reverse order + */ + public Sort withDescKey(Optional descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = descKey; + return this; + } + + /** + * The key to use to get items sorted by this field and indexed by the first character + */ + public Sort withFirstCharacterKey(String firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); + return this; + } + + + /** + * The key to use to get items sorted by this field and indexed by the first character + */ + public Sort withFirstCharacterKey(Optional firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = firstCharacterKey; + return this; + } + + @JsonAnySetter + public Sort withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public Sort withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Sort other = (Sort) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.art, other.art) && + Utils.enhancedDeepEquals(this.content, other.content) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.hasPrefs, other.hasPrefs) && + Utils.enhancedDeepEquals(this.hasStoreServices, other.hasStoreServices) && + Utils.enhancedDeepEquals(this.hubKey, other.hubKey) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.lastAccessedAt, other.lastAccessedAt) && + Utils.enhancedDeepEquals(this.pivot, other.pivot) && + Utils.enhancedDeepEquals(this.share, other.share) && + Utils.enhancedDeepEquals(this.thumb, other.thumb) && + Utils.enhancedDeepEquals(this.titleBar, other.titleBar) && + Utils.enhancedDeepEquals(this.default_, other.default_) && + Utils.enhancedDeepEquals(this.defaultDirection, other.defaultDirection) && + Utils.enhancedDeepEquals(this.descKey, other.descKey) && + Utils.enhancedDeepEquals(this.firstCharacterKey, other.firstCharacterKey) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, art, + content, filter, hasPrefs, + hasStoreServices, hubKey, identifier, + key, lastAccessedAt, pivot, + share, thumb, titleBar, + default_, defaultDirection, descKey, + firstCharacterKey, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(Sort.class, + "title", title, + "type", type, + "art", art, + "content", content, + "filter", filter, + "hasPrefs", hasPrefs, + "hasStoreServices", hasStoreServices, + "hubKey", hubKey, + "identifier", identifier, + "key", key, + "lastAccessedAt", lastAccessedAt, + "pivot", pivot, + "share", share, + "thumb", thumb, + "titleBar", titleBar, + "default_", default_, + "defaultDirection", defaultDirection, + "descKey", descKey, + "firstCharacterKey", firstCharacterKey, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional content = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional hasPrefs = Optional.empty(); + + private Optional hasStoreServices = Optional.empty(); + + private Optional hubKey = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional lastAccessedAt = Optional.empty(); + + private Optional> pivot = Optional.empty(); + + private Optional share = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional titleBar = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional defaultDirection = Optional.empty(); + + private Optional descKey = Optional.empty(); + + private Optional firstCharacterKey = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The title of the field. + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The title of the field. + */ + 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 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 content(boolean content) { + Utils.checkNotNull(content, "content"); + this.content = Optional.ofNullable(content); + return this; + } + + public Builder content(Optional content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + + public Builder filter(String 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 hasPrefs(boolean hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = Optional.ofNullable(hasPrefs); + return this; + } + + public Builder hasPrefs(Optional hasPrefs) { + Utils.checkNotNull(hasPrefs, "hasPrefs"); + this.hasPrefs = hasPrefs; + return this; + } + + + public Builder hasStoreServices(boolean hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = Optional.ofNullable(hasStoreServices); + return this; + } + + public Builder hasStoreServices(Optional hasStoreServices) { + Utils.checkNotNull(hasStoreServices, "hasStoreServices"); + this.hasStoreServices = hasStoreServices; + return this; + } + + + public Builder hubKey(String hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = Optional.ofNullable(hubKey); + return this; + } + + public Builder hubKey(Optional hubKey) { + Utils.checkNotNull(hubKey, "hubKey"); + this.hubKey = hubKey; + 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; + } + + + /** + * The key to use in the sort field to make items sort by this item + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * The key to use in the sort field to make items sort by this item + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + public Builder lastAccessedAt(long lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = Optional.ofNullable(lastAccessedAt); + return this; + } + + public Builder lastAccessedAt(Optional lastAccessedAt) { + Utils.checkNotNull(lastAccessedAt, "lastAccessedAt"); + this.lastAccessedAt = lastAccessedAt; + return this; + } + + + public Builder pivot(List pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = Optional.ofNullable(pivot); + return this; + } + + public Builder pivot(Optional> pivot) { + Utils.checkNotNull(pivot, "pivot"); + this.pivot = pivot; + return this; + } + + + public Builder share(long share) { + Utils.checkNotNull(share, "share"); + this.share = Optional.ofNullable(share); + return this; + } + + public Builder share(Optional share) { + Utils.checkNotNull(share, "share"); + this.share = share; + 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 titleBar(String titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = Optional.ofNullable(titleBar); + return this; + } + + public Builder titleBar(Optional titleBar) { + Utils.checkNotNull(titleBar, "titleBar"); + this.titleBar = titleBar; + return this; + } + + + /** + * If present, this sort is the default and in this direction + */ + public Builder default_(SortDefault default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + /** + * If present, this sort is the default and in this direction + */ + public Builder default_(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + + /** + * This default diction of this sort + */ + public Builder defaultDirection(DefaultDirection defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = Optional.ofNullable(defaultDirection); + return this; + } + + /** + * This default diction of this sort + */ + public Builder defaultDirection(Optional defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = defaultDirection; + return this; + } + + + /** + * The key for sorting this field in reverse order + */ + public Builder descKey(String descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = Optional.ofNullable(descKey); + return this; + } + + /** + * The key for sorting this field in reverse order + */ + public Builder descKey(Optional descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = descKey; + return this; + } + + + /** + * The key to use to get items sorted by this field and indexed by the first character + */ + public Builder firstCharacterKey(String firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); + return this; + } + + /** + * The key to use to get items sorted by this field and indexed by the first character + */ + public Builder firstCharacterKey(Optional firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = firstCharacterKey; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public Sort build() { + + return new Sort( + title, type, art, + content, filter, hasPrefs, + hasStoreServices, hubKey, identifier, + key, lastAccessedAt, pivot, + share, thumb, titleBar, + default_, defaultDirection, descKey, + firstCharacterKey) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/SortDefault.java b/src/main/java/dev/plexapi/sdk/models/shared/SortDefault.java new file mode 100644 index 00000000..8bdfaebe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/SortDefault.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * SortDefault + * + *

If present, this sort is the default and in this direction + */ +public enum SortDefault { + ASC("asc"), + DESC("desc"); + + @JsonValue + private final String value; + + SortDefault(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (SortDefault o: SortDefault.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/SortPivot.java b/src/main/java/dev/plexapi/sdk/models/shared/SortPivot.java new file mode 100644 index 00000000..43f5941e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/SortPivot.java @@ -0,0 +1,329 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + + +public class SortPivot { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("context") + private Optional context; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("symbol") + private Optional symbol; + + @JsonCreator + public SortPivot( + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional type, + @JsonProperty("context") Optional context, + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("symbol") Optional symbol) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(symbol, "symbol"); + this.title = title; + this.type = type; + this.context = context; + this.id = id; + this.key = key; + this.symbol = symbol; + } + + public SortPivot() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional context() { + return context; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional symbol() { + return symbol; + } + + public static Builder builder() { + return new Builder(); + } + + + public SortPivot withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + public SortPivot withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public SortPivot withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + public SortPivot withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public SortPivot withContext(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + + public SortPivot withContext(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public SortPivot withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public SortPivot withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public SortPivot withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public SortPivot withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public SortPivot withSymbol(String symbol) { + Utils.checkNotNull(symbol, "symbol"); + this.symbol = Optional.ofNullable(symbol); + return this; + } + + + public SortPivot withSymbol(Optional symbol) { + Utils.checkNotNull(symbol, "symbol"); + this.symbol = symbol; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SortPivot other = (SortPivot) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.context, other.context) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.symbol, other.symbol); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, type, context, + id, key, symbol); + } + + @Override + public String toString() { + return Utils.toString(SortPivot.class, + "title", title, + "type", type, + "context", context, + "id", id, + "key", key, + "symbol", symbol); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional context = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional symbol = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + 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 context(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Builder context(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + + public Builder id(String 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 symbol(String symbol) { + Utils.checkNotNull(symbol, "symbol"); + this.symbol = Optional.ofNullable(symbol); + return this; + } + + public Builder symbol(Optional symbol) { + Utils.checkNotNull(symbol, "symbol"); + this.symbol = symbol; + return this; + } + + public SortPivot build() { + + return new SortPivot( + title, type, context, + id, key, symbol); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Status.java b/src/main/java/dev/plexapi/sdk/models/shared/Status.java new file mode 100644 index 00000000..1dc17ce0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Status.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum Status { + INACTIVE("inactive"), + SCHEDULED("scheduled"), + INPROGRESS("inprogress"), + COMPLETE("complete"), + CANCELLED("cancelled"), + ERROR("error"), + POSTPROCESSING("postprocessing"), + PAUSED("paused"); + + @JsonValue + private final String value; + + Status(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Status o: Status.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Stream.java b/src/main/java/dev/plexapi/sdk/models/shared/Stream.java new file mode 100644 index 00000000..b9c12e1f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Stream.java @@ -0,0 +1,1532 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +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.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +/** + * Stream + * + *

`Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream. Note that photos do not have streams (mostly as an optimization). + */ +public class Stream { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default") + private Optional default_; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannelLayout") + private Optional audioChannelLayout; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitDepth") + private Optional bitDepth; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("canAutoSync") + private Optional canAutoSync; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chromaLocation") + private Optional chromaLocation; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chromaSubsampling") + private Optional chromaSubsampling; + + /** + * The codec of the stream, such as `h264` or `aac` + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codec") + private Optional codec; + + + @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; + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("displayTitle") + private Optional displayTitle; + + + @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("id") + private Optional id; + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + /** + * The three character language code for the stream contents + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("languageCode") + private Optional languageCode; + + + @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("samplingRate") + private Optional samplingRate; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("selected") + private Optional selected; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamIdentifier") + private Optional streamIdentifier; + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamType") + private Optional streamType; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public Stream( + @JsonProperty("default") Optional default_, + @JsonProperty("audioChannelLayout") Optional audioChannelLayout, + @JsonProperty("bitDepth") Optional bitDepth, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("canAutoSync") Optional canAutoSync, + @JsonProperty("chromaLocation") Optional chromaLocation, + @JsonProperty("chromaSubsampling") Optional chromaSubsampling, + @JsonProperty("codec") Optional codec, + @JsonProperty("colorPrimaries") Optional colorPrimaries, + @JsonProperty("colorRange") Optional colorRange, + @JsonProperty("colorSpace") Optional colorSpace, + @JsonProperty("colorTrc") Optional colorTrc, + @JsonProperty("displayTitle") Optional displayTitle, + @JsonProperty("frameRate") Optional frameRate, + @JsonProperty("hasScalingMatrix") Optional hasScalingMatrix, + @JsonProperty("height") Optional height, + @JsonProperty("id") Optional id, + @JsonProperty("index") Optional index, + @JsonProperty("key") Optional key, + @JsonProperty("language") Optional language, + @JsonProperty("languageCode") Optional languageCode, + @JsonProperty("level") Optional level, + @JsonProperty("profile") Optional profile, + @JsonProperty("refFrames") Optional refFrames, + @JsonProperty("samplingRate") Optional samplingRate, + @JsonProperty("selected") Optional selected, + @JsonProperty("streamIdentifier") Optional streamIdentifier, + @JsonProperty("streamType") Optional streamType, + @JsonProperty("width") Optional width) { + Utils.checkNotNull(default_, "default_"); + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + Utils.checkNotNull(bitDepth, "bitDepth"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(canAutoSync, "canAutoSync"); + Utils.checkNotNull(chromaLocation, "chromaLocation"); + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + Utils.checkNotNull(codec, "codec"); + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + Utils.checkNotNull(colorRange, "colorRange"); + Utils.checkNotNull(colorSpace, "colorSpace"); + Utils.checkNotNull(colorTrc, "colorTrc"); + Utils.checkNotNull(displayTitle, "displayTitle"); + Utils.checkNotNull(frameRate, "frameRate"); + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(languageCode, "languageCode"); + Utils.checkNotNull(level, "level"); + Utils.checkNotNull(profile, "profile"); + Utils.checkNotNull(refFrames, "refFrames"); + Utils.checkNotNull(samplingRate, "samplingRate"); + Utils.checkNotNull(selected, "selected"); + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + Utils.checkNotNull(streamType, "streamType"); + Utils.checkNotNull(width, "width"); + this.default_ = default_; + this.audioChannelLayout = audioChannelLayout; + this.bitDepth = bitDepth; + this.bitrate = bitrate; + this.canAutoSync = canAutoSync; + this.chromaLocation = chromaLocation; + this.chromaSubsampling = chromaSubsampling; + this.codec = codec; + this.colorPrimaries = colorPrimaries; + this.colorRange = colorRange; + this.colorSpace = colorSpace; + this.colorTrc = colorTrc; + this.displayTitle = displayTitle; + this.frameRate = frameRate; + this.hasScalingMatrix = hasScalingMatrix; + this.height = height; + this.id = id; + this.index = index; + this.key = key; + this.language = language; + this.languageCode = languageCode; + this.level = level; + this.profile = profile; + this.refFrames = refFrames; + this.samplingRate = samplingRate; + this.selected = selected; + this.streamIdentifier = streamIdentifier; + this.streamType = streamType; + this.width = width; + this.additionalProperties = new HashMap<>(); + } + + 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()); + } + + @JsonIgnore + public Optional default_() { + return default_; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional audioChannelLayout() { + return (Optional) audioChannelLayout; + } + + @JsonIgnore + public Optional bitDepth() { + return bitDepth; + } + + @JsonIgnore + public Optional bitrate() { + return bitrate; + } + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + @JsonIgnore + public Optional canAutoSync() { + return canAutoSync; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chromaLocation() { + return (Optional) chromaLocation; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chromaSubsampling() { + return (Optional) chromaSubsampling; + } + + /** + * The codec of the stream, such as `h264` or `aac` + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional codec() { + return (Optional) codec; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional colorPrimaries() { + return (Optional) colorPrimaries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional colorRange() { + return (Optional) colorRange; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional colorSpace() { + return (Optional) colorSpace; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional colorTrc() { + return (Optional) colorTrc; + } + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional displayTitle() { + return (Optional) displayTitle; + } + + @JsonIgnore + public Optional frameRate() { + return frameRate; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hasScalingMatrix() { + return (Optional) hasScalingMatrix; + } + + @JsonIgnore + public Optional height() { + return height; + } + + @JsonIgnore + public Optional id() { + return id; + } + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + @JsonIgnore + public Optional index() { + return index; + } + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional key() { + return (Optional) key; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional language() { + return (Optional) language; + } + + /** + * The three character language code for the stream contents + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional languageCode() { + return (Optional) languageCode; + } + + @JsonIgnore + public Optional level() { + return level; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional profile() { + return (Optional) profile; + } + + @JsonIgnore + public Optional refFrames() { + return refFrames; + } + + @JsonIgnore + public Optional samplingRate() { + return samplingRate; + } + + @JsonIgnore + public Optional selected() { + return selected; + } + + @JsonIgnore + public Optional streamIdentifier() { + return streamIdentifier; + } + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + @JsonIgnore + public Optional streamType() { + return streamType; + } + + @JsonIgnore + public Optional width() { + return width; + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + public Stream withDefault(boolean default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + + public Stream withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public Stream withAudioChannelLayout(Object audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); + return this; + } + + + public Stream withAudioChannelLayout(Optional audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = audioChannelLayout; + return this; + } + + public Stream withBitDepth(long 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 withBitrate(long 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; + } + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + public Stream withCanAutoSync(boolean canAutoSync) { + Utils.checkNotNull(canAutoSync, "canAutoSync"); + this.canAutoSync = Optional.ofNullable(canAutoSync); + return this; + } + + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + public Stream withCanAutoSync(Optional canAutoSync) { + Utils.checkNotNull(canAutoSync, "canAutoSync"); + this.canAutoSync = canAutoSync; + return this; + } + + public Stream withChromaLocation(Object 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(Object 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; + } + + /** + * The codec of the stream, such as `h264` or `aac` + */ + public Stream withCodec(Object codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + + /** + * The codec of the stream, such as `h264` or `aac` + */ + public Stream withCodec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + public Stream withColorPrimaries(Object 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(Object 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(Object 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(Object 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; + } + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + public Stream withDisplayTitle(Object displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + public Stream withDisplayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + public Stream withFrameRate(double 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(Object 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(long 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 withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public Stream withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + public Stream withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + public Stream withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + public Stream withKey(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + public Stream withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Stream withLanguage(Object language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + + public Stream withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + /** + * The three character language code for the stream contents + */ + public Stream withLanguageCode(Object languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = Optional.ofNullable(languageCode); + return this; + } + + + /** + * The three character language code for the stream contents + */ + public Stream withLanguageCode(Optional languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = languageCode; + return this; + } + + public Stream withLevel(long 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(Object 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(long 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 withSamplingRate(long samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = Optional.ofNullable(samplingRate); + return this; + } + + + public Stream withSamplingRate(Optional samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = samplingRate; + return this; + } + + public Stream withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + + public Stream withSelected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public Stream withStreamIdentifier(long 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; + } + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + public Stream withStreamType(long streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + public Stream withStreamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + public Stream withWidth(long 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; + } + + @JsonAnySetter + public Stream withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + public Stream withAdditionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Stream other = (Stream) o; + return + Utils.enhancedDeepEquals(this.default_, other.default_) && + Utils.enhancedDeepEquals(this.audioChannelLayout, other.audioChannelLayout) && + Utils.enhancedDeepEquals(this.bitDepth, other.bitDepth) && + Utils.enhancedDeepEquals(this.bitrate, other.bitrate) && + Utils.enhancedDeepEquals(this.canAutoSync, other.canAutoSync) && + Utils.enhancedDeepEquals(this.chromaLocation, other.chromaLocation) && + Utils.enhancedDeepEquals(this.chromaSubsampling, other.chromaSubsampling) && + Utils.enhancedDeepEquals(this.codec, other.codec) && + Utils.enhancedDeepEquals(this.colorPrimaries, other.colorPrimaries) && + Utils.enhancedDeepEquals(this.colorRange, other.colorRange) && + Utils.enhancedDeepEquals(this.colorSpace, other.colorSpace) && + Utils.enhancedDeepEquals(this.colorTrc, other.colorTrc) && + Utils.enhancedDeepEquals(this.displayTitle, other.displayTitle) && + Utils.enhancedDeepEquals(this.frameRate, other.frameRate) && + Utils.enhancedDeepEquals(this.hasScalingMatrix, other.hasScalingMatrix) && + Utils.enhancedDeepEquals(this.height, other.height) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.index, other.index) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.language, other.language) && + Utils.enhancedDeepEquals(this.languageCode, other.languageCode) && + Utils.enhancedDeepEquals(this.level, other.level) && + Utils.enhancedDeepEquals(this.profile, other.profile) && + Utils.enhancedDeepEquals(this.refFrames, other.refFrames) && + Utils.enhancedDeepEquals(this.samplingRate, other.samplingRate) && + Utils.enhancedDeepEquals(this.selected, other.selected) && + Utils.enhancedDeepEquals(this.streamIdentifier, other.streamIdentifier) && + Utils.enhancedDeepEquals(this.streamType, other.streamType) && + Utils.enhancedDeepEquals(this.width, other.width) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + default_, audioChannelLayout, bitDepth, + bitrate, canAutoSync, chromaLocation, + chromaSubsampling, codec, colorPrimaries, + colorRange, colorSpace, colorTrc, + displayTitle, frameRate, hasScalingMatrix, + height, id, index, + key, language, languageCode, + level, profile, refFrames, + samplingRate, selected, streamIdentifier, + streamType, width, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(Stream.class, + "default_", default_, + "audioChannelLayout", audioChannelLayout, + "bitDepth", bitDepth, + "bitrate", bitrate, + "canAutoSync", canAutoSync, + "chromaLocation", chromaLocation, + "chromaSubsampling", chromaSubsampling, + "codec", codec, + "colorPrimaries", colorPrimaries, + "colorRange", colorRange, + "colorSpace", colorSpace, + "colorTrc", colorTrc, + "displayTitle", displayTitle, + "frameRate", frameRate, + "hasScalingMatrix", hasScalingMatrix, + "height", height, + "id", id, + "index", index, + "key", key, + "language", language, + "languageCode", languageCode, + "level", level, + "profile", profile, + "refFrames", refFrames, + "samplingRate", samplingRate, + "selected", selected, + "streamIdentifier", streamIdentifier, + "streamType", streamType, + "width", width, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional default_ = Optional.empty(); + + private Optional audioChannelLayout = Optional.empty(); + + private Optional bitDepth = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional canAutoSync = Optional.empty(); + + private Optional chromaLocation = Optional.empty(); + + private Optional chromaSubsampling = Optional.empty(); + + private Optional codec = Optional.empty(); + + private Optional colorPrimaries = Optional.empty(); + + private Optional colorRange = Optional.empty(); + + private Optional colorSpace = Optional.empty(); + + private Optional colorTrc = Optional.empty(); + + private Optional displayTitle = Optional.empty(); + + private Optional frameRate = Optional.empty(); + + private Optional hasScalingMatrix = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional languageCode = Optional.empty(); + + private Optional level = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional refFrames = Optional.empty(); + + private Optional samplingRate = Optional.empty(); + + private Optional selected = Optional.empty(); + + private Optional streamIdentifier = Optional.empty(); + + private Optional streamType = Optional.empty(); + + private Optional width = Optional.empty(); + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + + 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 audioChannelLayout(Object audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); + return this; + } + + public Builder audioChannelLayout(Optional audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = audioChannelLayout; + return this; + } + + + public Builder bitDepth(long 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 bitrate(long 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; + } + + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + public Builder canAutoSync(boolean canAutoSync) { + Utils.checkNotNull(canAutoSync, "canAutoSync"); + this.canAutoSync = Optional.ofNullable(canAutoSync); + return this; + } + + /** + * For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. + */ + public Builder canAutoSync(Optional canAutoSync) { + Utils.checkNotNull(canAutoSync, "canAutoSync"); + this.canAutoSync = canAutoSync; + return this; + } + + + public Builder chromaLocation(Object 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(Object 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; + } + + + /** + * The codec of the stream, such as `h264` or `aac` + */ + public Builder codec(Object codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + /** + * The codec of the stream, such as `h264` or `aac` + */ + public Builder codec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + + public Builder colorPrimaries(Object 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(Object 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(Object 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(Object 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; + } + + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + public Builder displayTitle(Object displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + /** + * A friendly name for the stream, often comprised of the language and codec information + */ + public Builder displayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + + public Builder frameRate(double 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(Object 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(long 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 id(long 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; + } + + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + public Builder index(long index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + /** + * If the stream is part of the `Part` and not an external resource, the index of the stream within that part + */ + public Builder index(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + public Builder key(Object key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + /** + * If the stream is independently streamable, the key from which it can be streamed + */ + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + + public Builder language(Object 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; + } + + + /** + * The three character language code for the stream contents + */ + public Builder languageCode(Object languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = Optional.ofNullable(languageCode); + return this; + } + + /** + * The three character language code for the stream contents + */ + public Builder languageCode(Optional languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = languageCode; + return this; + } + + + public Builder level(long 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(Object 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(long 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 samplingRate(long 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 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 streamIdentifier(long 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; + } + + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + public Builder streamType(long streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + /** + * A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics + */ + public Builder streamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + + public Builder width(long 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 additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public Stream build() { + + return new Stream( + default_, audioChannelLayout, bitDepth, + bitrate, canAutoSync, chromaLocation, + chromaSubsampling, codec, colorPrimaries, + colorRange, colorSpace, colorTrc, + displayTitle, frameRate, hasScalingMatrix, + height, id, index, + key, language, languageCode, + level, profile, refFrames, + samplingRate, selected, streamIdentifier, + streamType, width) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Subtitles.java b/src/main/java/dev/plexapi/sdk/models/shared/Subtitles.java new file mode 100644 index 00000000..69b9a6fb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Subtitles.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum Subtitles { + AUTO("auto"), + BURN("burn"), + NONE("none"), + SIDECAR("sidecar"), + EMBEDDED("embedded"), + SEGMENTED("segmented"), + UNKNOWN("unknown"); + + @JsonValue + private final String value; + + Subtitles(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Subtitles o: Subtitles.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Tag.java b/src/main/java/dev/plexapi/sdk/models/shared/Tag.java new file mode 100644 index 00000000..c6d6731f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Tag.java @@ -0,0 +1,605 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Double; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +/** + * Tag + * + *

A variety of extra information about a metadata item is included as tags. These tags use their own element names such as `Genre`, `Writer`, `Directory`, and `Role`. Individual tag types may introduce their own extra attributes. + */ +public class Tag { + /** + * Measure of the confidence of an automatic tag + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("confidence") + private Optional confidence; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("context") + private Optional context; + + /** + * A filter parameter that can be used to query for more content that matches this tag value. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("filter") + private Optional filter; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + /** + * The role this actor played + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("role") + private Optional role; + + /** + * The value of the tag (the name) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + /** + * Plex identifier for this tag which can be used to fetch additional information from plex.tv + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagKey") + private Optional tagKey; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagType") + private Optional tagType; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonCreator + public Tag( + @JsonProperty("confidence") Optional confidence, + @JsonProperty("context") Optional context, + @JsonProperty("filter") Optional filter, + @JsonProperty("id") Optional id, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("role") Optional role, + @JsonProperty("tag") Optional tag, + @JsonProperty("tagKey") Optional tagKey, + @JsonProperty("tagType") Optional tagType, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(confidence, "confidence"); + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(tagKey, "tagKey"); + Utils.checkNotNull(tagType, "tagType"); + Utils.checkNotNull(thumb, "thumb"); + this.confidence = confidence; + this.context = context; + this.filter = filter; + this.id = id; + this.ratingKey = ratingKey; + this.role = role; + this.tag = tag; + this.tagKey = tagKey; + this.tagType = tagType; + this.thumb = thumb; + } + + public Tag() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Measure of the confidence of an automatic tag + */ + @JsonIgnore + public Optional confidence() { + return confidence; + } + + @JsonIgnore + public Optional context() { + return context; + } + + /** + * A filter parameter that can be used to query for more content that matches this tag value. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional filter() { + return (Optional) filter; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional ratingKey() { + return ratingKey; + } + + /** + * The role this actor played + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional role() { + return (Optional) role; + } + + /** + * The value of the tag (the name) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional tag() { + return (Optional) tag; + } + + /** + * Plex identifier for this tag which can be used to fetch additional information from plex.tv + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional tagKey() { + return (Optional) tagKey; + } + + @JsonIgnore + public Optional tagType() { + return tagType; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional thumb() { + return (Optional) thumb; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Measure of the confidence of an automatic tag + */ + public Tag withConfidence(double confidence) { + Utils.checkNotNull(confidence, "confidence"); + this.confidence = Optional.ofNullable(confidence); + return this; + } + + + /** + * Measure of the confidence of an automatic tag + */ + public Tag withConfidence(Optional confidence) { + Utils.checkNotNull(confidence, "confidence"); + this.confidence = confidence; + return this; + } + + public Tag withContext(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + + public Tag withContext(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + /** + * A filter parameter that can be used to query for more content that matches this tag value. + */ + public Tag withFilter(Object filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * A filter parameter that can be used to query for more content that matches this tag value. + */ + public Tag withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public Tag withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + public Tag withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Tag withRatingKey(String ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + + public Tag withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + /** + * The role this actor played + */ + public Tag withRole(Object role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + + /** + * The role this actor played + */ + public Tag withRole(Optional role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * The value of the tag (the name) + */ + public Tag withTag(Object tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + + /** + * The value of the tag (the name) + */ + public Tag withTag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + /** + * Plex identifier for this tag which can be used to fetch additional information from plex.tv + */ + public Tag withTagKey(Object tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + + /** + * Plex identifier for this tag which can be used to fetch additional information from plex.tv + */ + public Tag withTagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + public Tag withTagType(long tagType) { + Utils.checkNotNull(tagType, "tagType"); + this.tagType = Optional.ofNullable(tagType); + return this; + } + + + public Tag withTagType(Optional tagType) { + Utils.checkNotNull(tagType, "tagType"); + this.tagType = tagType; + return this; + } + + public Tag withThumb(Object thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + public Tag withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag other = (Tag) o; + return + Utils.enhancedDeepEquals(this.confidence, other.confidence) && + Utils.enhancedDeepEquals(this.context, other.context) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.ratingKey, other.ratingKey) && + Utils.enhancedDeepEquals(this.role, other.role) && + Utils.enhancedDeepEquals(this.tag, other.tag) && + Utils.enhancedDeepEquals(this.tagKey, other.tagKey) && + Utils.enhancedDeepEquals(this.tagType, other.tagType) && + Utils.enhancedDeepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + confidence, context, filter, + id, ratingKey, role, + tag, tagKey, tagType, + thumb); + } + + @Override + public String toString() { + return Utils.toString(Tag.class, + "confidence", confidence, + "context", context, + "filter", filter, + "id", id, + "ratingKey", ratingKey, + "role", role, + "tag", tag, + "tagKey", tagKey, + "tagType", tagType, + "thumb", thumb); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional confidence = Optional.empty(); + + private Optional context = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional role = Optional.empty(); + + private Optional tag = Optional.empty(); + + private Optional tagKey = Optional.empty(); + + private Optional tagType = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Measure of the confidence of an automatic tag + */ + public Builder confidence(double confidence) { + Utils.checkNotNull(confidence, "confidence"); + this.confidence = Optional.ofNullable(confidence); + return this; + } + + /** + * Measure of the confidence of an automatic tag + */ + public Builder confidence(Optional confidence) { + Utils.checkNotNull(confidence, "confidence"); + this.confidence = confidence; + return this; + } + + + public Builder context(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Builder context(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + + /** + * A filter parameter that can be used to query for more content that matches this tag value. + */ + public Builder filter(Object filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * A filter parameter that can be used to query for more content that matches this tag value. + */ + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + + public Builder id(long 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 ratingKey(String 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; + } + + + /** + * The role this actor played + */ + public Builder role(Object role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + /** + * The role this actor played + */ + public Builder role(Optional role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + + /** + * The value of the tag (the name) + */ + public Builder tag(Object tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + /** + * The value of the tag (the name) + */ + public Builder tag(Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + return this; + } + + + /** + * Plex identifier for this tag which can be used to fetch additional information from plex.tv + */ + public Builder tagKey(Object tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + /** + * Plex identifier for this tag which can be used to fetch additional information from plex.tv + */ + public Builder tagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + + public Builder tagType(long tagType) { + Utils.checkNotNull(tagType, "tagType"); + this.tagType = Optional.ofNullable(tagType); + return this; + } + + public Builder tagType(Optional tagType) { + Utils.checkNotNull(tagType, "tagType"); + this.tagType = tagType; + return this; + } + + + public Builder thumb(Object 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 Tag build() { + + return new Tag( + confidence, context, filter, + id, ratingKey, role, + tag, tagKey, tagType, + thumb); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/TranscodeSession.java b/src/main/java/dev/plexapi/sdk/models/shared/TranscodeSession.java new file mode 100644 index 00000000..6520766c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/TranscodeSession.java @@ -0,0 +1,689 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * TranscodeSession + * + *

The transcode session if item is currently being transcoded + */ +public class TranscodeSession { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("complete") + private Optional complete; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("context") + private Optional context; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private Optional error; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("progress") + private Optional progress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("protocol") + private Optional protocol; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sourceAudioCodec") + private Optional sourceAudioCodec; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sourceVideoCodec") + private Optional sourceVideoCodec; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("speed") + private Optional speed; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("throttled") + private Optional throttled; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcodeHwFullPipeline") + private Optional transcodeHwFullPipeline; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transcodeHwRequested") + private Optional transcodeHwRequested; + + @JsonCreator + public TranscodeSession( + @JsonProperty("complete") Optional complete, + @JsonProperty("context") Optional context, + @JsonProperty("duration") Optional duration, + @JsonProperty("error") Optional error, + @JsonProperty("key") Optional key, + @JsonProperty("progress") Optional progress, + @JsonProperty("protocol") Optional protocol, + @JsonProperty("size") Optional size, + @JsonProperty("sourceAudioCodec") Optional sourceAudioCodec, + @JsonProperty("sourceVideoCodec") Optional sourceVideoCodec, + @JsonProperty("speed") Optional speed, + @JsonProperty("throttled") Optional throttled, + @JsonProperty("transcodeHwFullPipeline") Optional transcodeHwFullPipeline, + @JsonProperty("transcodeHwRequested") Optional transcodeHwRequested) { + Utils.checkNotNull(complete, "complete"); + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(progress, "progress"); + Utils.checkNotNull(protocol, "protocol"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); + Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); + Utils.checkNotNull(speed, "speed"); + Utils.checkNotNull(throttled, "throttled"); + Utils.checkNotNull(transcodeHwFullPipeline, "transcodeHwFullPipeline"); + Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); + this.complete = complete; + this.context = context; + this.duration = duration; + this.error = error; + this.key = key; + this.progress = progress; + this.protocol = protocol; + this.size = size; + this.sourceAudioCodec = sourceAudioCodec; + this.sourceVideoCodec = sourceVideoCodec; + this.speed = speed; + this.throttled = throttled; + this.transcodeHwFullPipeline = transcodeHwFullPipeline; + this.transcodeHwRequested = transcodeHwRequested; + } + + public TranscodeSession() { + 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()); + } + + @JsonIgnore + public Optional complete() { + return complete; + } + + @JsonIgnore + public Optional context() { + return context; + } + + @JsonIgnore + public Optional duration() { + return duration; + } + + @JsonIgnore + public Optional error() { + return error; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional progress() { + return progress; + } + + @JsonIgnore + public Optional protocol() { + return protocol; + } + + @JsonIgnore + public Optional size() { + return size; + } + + @JsonIgnore + public Optional sourceAudioCodec() { + return sourceAudioCodec; + } + + @JsonIgnore + public Optional sourceVideoCodec() { + return sourceVideoCodec; + } + + @JsonIgnore + public Optional speed() { + return speed; + } + + @JsonIgnore + public Optional throttled() { + return throttled; + } + + @JsonIgnore + public Optional transcodeHwFullPipeline() { + return transcodeHwFullPipeline; + } + + @JsonIgnore + public Optional transcodeHwRequested() { + return transcodeHwRequested; + } + + public static Builder builder() { + return new Builder(); + } + + + public TranscodeSession withComplete(boolean complete) { + Utils.checkNotNull(complete, "complete"); + this.complete = Optional.ofNullable(complete); + return this; + } + + + public TranscodeSession withComplete(Optional complete) { + Utils.checkNotNull(complete, "complete"); + this.complete = complete; + return this; + } + + public TranscodeSession withContext(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + + public TranscodeSession withContext(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + public TranscodeSession withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + + public TranscodeSession withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public TranscodeSession withError(boolean error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + + public TranscodeSession withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + public TranscodeSession withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + + public TranscodeSession withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public TranscodeSession withProgress(double progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = Optional.ofNullable(progress); + return this; + } + + + public TranscodeSession withProgress(Optional progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = progress; + return this; + } + + public TranscodeSession withProtocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + + public TranscodeSession withProtocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + public TranscodeSession withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + + public TranscodeSession withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public TranscodeSession withSourceAudioCodec(String sourceAudioCodec) { + Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); + this.sourceAudioCodec = Optional.ofNullable(sourceAudioCodec); + return this; + } + + + public TranscodeSession withSourceAudioCodec(Optional sourceAudioCodec) { + Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); + this.sourceAudioCodec = sourceAudioCodec; + return this; + } + + public TranscodeSession withSourceVideoCodec(String sourceVideoCodec) { + Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); + this.sourceVideoCodec = Optional.ofNullable(sourceVideoCodec); + return this; + } + + + public TranscodeSession withSourceVideoCodec(Optional sourceVideoCodec) { + Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); + this.sourceVideoCodec = sourceVideoCodec; + return this; + } + + public TranscodeSession withSpeed(double speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = Optional.ofNullable(speed); + return this; + } + + + public TranscodeSession withSpeed(Optional speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = speed; + return this; + } + + public TranscodeSession withThrottled(boolean throttled) { + Utils.checkNotNull(throttled, "throttled"); + this.throttled = Optional.ofNullable(throttled); + return this; + } + + + public TranscodeSession withThrottled(Optional throttled) { + Utils.checkNotNull(throttled, "throttled"); + this.throttled = throttled; + return this; + } + + public TranscodeSession withTranscodeHwFullPipeline(boolean transcodeHwFullPipeline) { + Utils.checkNotNull(transcodeHwFullPipeline, "transcodeHwFullPipeline"); + this.transcodeHwFullPipeline = Optional.ofNullable(transcodeHwFullPipeline); + return this; + } + + + public TranscodeSession withTranscodeHwFullPipeline(Optional transcodeHwFullPipeline) { + Utils.checkNotNull(transcodeHwFullPipeline, "transcodeHwFullPipeline"); + this.transcodeHwFullPipeline = transcodeHwFullPipeline; + return this; + } + + public TranscodeSession withTranscodeHwRequested(boolean transcodeHwRequested) { + Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); + this.transcodeHwRequested = Optional.ofNullable(transcodeHwRequested); + return this; + } + + + public TranscodeSession withTranscodeHwRequested(Optional transcodeHwRequested) { + Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); + this.transcodeHwRequested = transcodeHwRequested; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranscodeSession other = (TranscodeSession) o; + return + Utils.enhancedDeepEquals(this.complete, other.complete) && + Utils.enhancedDeepEquals(this.context, other.context) && + Utils.enhancedDeepEquals(this.duration, other.duration) && + Utils.enhancedDeepEquals(this.error, other.error) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.progress, other.progress) && + Utils.enhancedDeepEquals(this.protocol, other.protocol) && + Utils.enhancedDeepEquals(this.size, other.size) && + Utils.enhancedDeepEquals(this.sourceAudioCodec, other.sourceAudioCodec) && + Utils.enhancedDeepEquals(this.sourceVideoCodec, other.sourceVideoCodec) && + Utils.enhancedDeepEquals(this.speed, other.speed) && + Utils.enhancedDeepEquals(this.throttled, other.throttled) && + Utils.enhancedDeepEquals(this.transcodeHwFullPipeline, other.transcodeHwFullPipeline) && + Utils.enhancedDeepEquals(this.transcodeHwRequested, other.transcodeHwRequested); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + complete, context, duration, + error, key, progress, + protocol, size, sourceAudioCodec, + sourceVideoCodec, speed, throttled, + transcodeHwFullPipeline, transcodeHwRequested); + } + + @Override + public String toString() { + return Utils.toString(TranscodeSession.class, + "complete", complete, + "context", context, + "duration", duration, + "error", error, + "key", key, + "progress", progress, + "protocol", protocol, + "size", size, + "sourceAudioCodec", sourceAudioCodec, + "sourceVideoCodec", sourceVideoCodec, + "speed", speed, + "throttled", throttled, + "transcodeHwFullPipeline", transcodeHwFullPipeline, + "transcodeHwRequested", transcodeHwRequested); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional complete = Optional.empty(); + + private Optional context = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional error = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional progress = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional sourceAudioCodec = Optional.empty(); + + private Optional sourceVideoCodec = Optional.empty(); + + private Optional speed = Optional.empty(); + + private Optional throttled = Optional.empty(); + + private Optional transcodeHwFullPipeline = Optional.empty(); + + private Optional transcodeHwRequested = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder complete(boolean complete) { + Utils.checkNotNull(complete, "complete"); + this.complete = Optional.ofNullable(complete); + return this; + } + + public Builder complete(Optional complete) { + Utils.checkNotNull(complete, "complete"); + this.complete = complete; + return this; + } + + + public Builder context(String context) { + Utils.checkNotNull(context, "context"); + this.context = Optional.ofNullable(context); + return this; + } + + public Builder context(Optional context) { + Utils.checkNotNull(context, "context"); + this.context = context; + return this; + } + + + public Builder duration(long 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 error(boolean error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + 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 progress(double progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = Optional.ofNullable(progress); + return this; + } + + public Builder progress(Optional progress) { + Utils.checkNotNull(progress, "progress"); + this.progress = progress; + return this; + } + + + public Builder protocol(String protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = Optional.ofNullable(protocol); + return this; + } + + public Builder protocol(Optional protocol) { + Utils.checkNotNull(protocol, "protocol"); + this.protocol = protocol; + return this; + } + + + public Builder size(long 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 sourceAudioCodec(String sourceAudioCodec) { + Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); + this.sourceAudioCodec = Optional.ofNullable(sourceAudioCodec); + return this; + } + + public Builder sourceAudioCodec(Optional sourceAudioCodec) { + Utils.checkNotNull(sourceAudioCodec, "sourceAudioCodec"); + this.sourceAudioCodec = sourceAudioCodec; + return this; + } + + + public Builder sourceVideoCodec(String sourceVideoCodec) { + Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); + this.sourceVideoCodec = Optional.ofNullable(sourceVideoCodec); + return this; + } + + public Builder sourceVideoCodec(Optional sourceVideoCodec) { + Utils.checkNotNull(sourceVideoCodec, "sourceVideoCodec"); + this.sourceVideoCodec = sourceVideoCodec; + return this; + } + + + public Builder speed(double speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = Optional.ofNullable(speed); + return this; + } + + public Builder speed(Optional speed) { + Utils.checkNotNull(speed, "speed"); + this.speed = speed; + return this; + } + + + public Builder throttled(boolean throttled) { + Utils.checkNotNull(throttled, "throttled"); + this.throttled = Optional.ofNullable(throttled); + return this; + } + + public Builder throttled(Optional throttled) { + Utils.checkNotNull(throttled, "throttled"); + this.throttled = throttled; + return this; + } + + + public Builder transcodeHwFullPipeline(boolean transcodeHwFullPipeline) { + Utils.checkNotNull(transcodeHwFullPipeline, "transcodeHwFullPipeline"); + this.transcodeHwFullPipeline = Optional.ofNullable(transcodeHwFullPipeline); + return this; + } + + public Builder transcodeHwFullPipeline(Optional transcodeHwFullPipeline) { + Utils.checkNotNull(transcodeHwFullPipeline, "transcodeHwFullPipeline"); + this.transcodeHwFullPipeline = transcodeHwFullPipeline; + return this; + } + + + public Builder transcodeHwRequested(boolean transcodeHwRequested) { + Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); + this.transcodeHwRequested = Optional.ofNullable(transcodeHwRequested); + return this; + } + + public Builder transcodeHwRequested(Optional transcodeHwRequested) { + Utils.checkNotNull(transcodeHwRequested, "transcodeHwRequested"); + this.transcodeHwRequested = transcodeHwRequested; + return this; + } + + public TranscodeSession build() { + + return new TranscodeSession( + complete, context, duration, + error, key, progress, + protocol, size, sourceAudioCodec, + sourceVideoCodec, speed, throttled, + transcodeHwFullPipeline, transcodeHwRequested); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/TranscodeType.java b/src/main/java/dev/plexapi/sdk/models/shared/TranscodeType.java new file mode 100644 index 00000000..641d6ac4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/TranscodeType.java @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum TranscodeType { + VIDEO("video"), + MUSIC("music"), + AUDIO("audio"), + SUBTITLES("subtitles"); + + @JsonValue + private final String value; + + TranscodeType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (TranscodeType o: TranscodeType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Type.java b/src/main/java/dev/plexapi/sdk/models/shared/Type.java new file mode 100644 index 00000000..c74721ff --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Type.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * Type + * + *

The type of the value of this setting + */ +public enum Type { + BOOL("bool"), + INT("int"), + TEXT("text"), + DOUBLE("double"); + + @JsonValue + private final String value; + + Type(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Type o: Type.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/shared/User.java b/src/main/java/dev/plexapi/sdk/models/shared/User.java new file mode 100644 index 00000000..d02688bd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/User.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +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.Optional; + +/** + * User + * + *

The user playing the content + */ +public class User { + /** + * The username + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + /** + * The id of the user + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * Thumb image to display for the user + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonCreator + public User( + @JsonProperty("title") Optional title, + @JsonProperty("id") Optional id, + @JsonProperty("thumb") Optional thumb) { + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(thumb, "thumb"); + this.title = title; + this.id = id; + this.thumb = thumb; + } + + public User() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The username + */ + @JsonIgnore + public Optional title() { + return title; + } + + /** + * The id of the user + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * Thumb image to display for the user + */ + @JsonIgnore + public Optional thumb() { + return thumb; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The username + */ + public User withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + + /** + * The username + */ + public User withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The id of the user + */ + public User withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * The id of the user + */ + public User withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Thumb image to display for the user + */ + public User withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + + /** + * Thumb image to display for the user + */ + public User withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User other = (User) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.thumb, other.thumb); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, id, thumb); + } + + @Override + public String toString() { + return Utils.toString(User.class, + "title", title, + "id", id, + "thumb", thumb); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional title = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The username + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * The username + */ + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The id of the user + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * The id of the user + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * Thumb image to display for the user + */ + public Builder thumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * Thumb image to display for the user + */ + public Builder thumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public User build() { + + return new User( + title, id, thumb); + } + + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/shared/Value.java b/src/main/java/dev/plexapi/sdk/models/shared/Value.java new file mode 100644 index 00000000..cdc04adf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/shared/Value.java @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import dev.plexapi.sdk.utils.OneOfDeserializer; +import dev.plexapi.sdk.utils.TypedObject; +import dev.plexapi.sdk.utils.Utils.JsonShape; +import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; + +/** + * Value + * + *

The current value of this setting + */ +@JsonDeserialize(using = Value._Deserializer.class) +public class Value { + + @JsonValue + private TypedObject value; + + private Value(TypedObject value) { + this.value = value; + } + + public static Value of(String value) { + Utils.checkNotNull(value, "value"); + return new Value(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static Value of(double value) { + Utils.checkNotNull(value, "value"); + return new Value(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static Value of(boolean value) { + Utils.checkNotNull(value, "value"); + return new Value(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + /** + * Returns an instance of one of these types: + *

    + *
  • {@code java.lang.String}
  • + *
  • {@code double}
  • + *
  • {@code boolean}
  • + *
+ * + *

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

+     * if (obj.value() instanceof String) {
+     *     String answer = (String) obj.value();
+     *     System.out.println("answer=" + answer);
+     * }
+     * 
+ * + * @return value of oneOf type + **/ + public java.lang.Object value() { + return value.value(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Value other = (Value) o; + return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); + } + + @Override + public int hashCode() { + return Utils.enhancedHash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends OneOfDeserializer { + + public _Deserializer() { + super(Value.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(Value.class, + "value", value); + } + +} + diff --git a/src/main/java/dev/plexapi/sdk/operations/AddCollectionItems.java b/src/main/java/dev/plexapi/sdk/operations/AddCollectionItems.java new file mode 100644 index 00000000..d89ddf56 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddCollectionItems.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddCollectionItemsRequest; +import dev.plexapi.sdk.models.operations.AddCollectionItemsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddCollectionItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addCollectionItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addCollectionItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addCollectionItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/collections/{collectionId}/items", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddCollectionItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddCollectionItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddCollectionItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddCollectionItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddCollectionItemsResponse.Builder resBuilder = + AddCollectionItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddCollectionItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddCollectionItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddCollectionItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddCollectionItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddCollectionItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddCollectionItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddCollectionItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddDevice.java b/src/main/java/dev/plexapi/sdk/operations/AddDevice.java new file mode 100644 index 00000000..29d38de4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddDevice.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddDeviceRequest; +import dev.plexapi.sdk.models.operations.AddDeviceResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddDevice { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addDevice", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addDevice", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addDevice", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/grabbers/devices"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddDeviceRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddDeviceRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddDeviceRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddDeviceResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddDeviceResponse.Builder resBuilder = + AddDeviceResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddDeviceResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithDevice out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddDeviceRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddDeviceRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddDeviceRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddDeviceResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddDeviceResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddDeviceResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithDevice out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddDeviceToDVR.java b/src/main/java/dev/plexapi/sdk/operations/AddDeviceToDVR.java new file mode 100644 index 00000000..81abf73c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddDeviceToDVR.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddDeviceToDVRRequest; +import dev.plexapi.sdk.models.operations.AddDeviceToDVRResponse; +import dev.plexapi.sdk.models.operations.AddDeviceToDVRResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddDeviceToDVR { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addDeviceToDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addDeviceToDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addDeviceToDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/dvrs/{dvrId}/devices/{deviceId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddDeviceToDVRRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddDeviceToDVRRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddDeviceToDVRRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddDeviceToDVRResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddDeviceToDVRResponse.Builder resBuilder = + AddDeviceToDVRResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddDeviceToDVRResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + AddDeviceToDVRResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddDeviceToDVRRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddDeviceToDVRRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddDeviceToDVRRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddDeviceToDVRResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddDeviceToDVRResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddDeviceToDVRResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + AddDeviceToDVRResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddDownloadQueueItems.java b/src/main/java/dev/plexapi/sdk/operations/AddDownloadQueueItems.java new file mode 100644 index 00000000..8ae2649c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddDownloadQueueItems.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddDownloadQueueItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/downloadQueue/{queueId}/add", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddDownloadQueueItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddDownloadQueueItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddDownloadQueueItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddDownloadQueueItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddDownloadQueueItemsResponse.Builder resBuilder = + AddDownloadQueueItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddDownloadQueueItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + AddDownloadQueueItemsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddDownloadQueueItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddDownloadQueueItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddDownloadQueueItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddDownloadQueueItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddDownloadQueueItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddDownloadQueueItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + AddDownloadQueueItemsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddExtras.java b/src/main/java/dev/plexapi/sdk/operations/AddExtras.java new file mode 100644 index 00000000..46859751 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddExtras.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddExtrasRequest; +import dev.plexapi.sdk.models.operations.AddExtrasResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddExtras { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addExtras", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addExtras", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addExtras", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/extras", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddExtrasRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddExtrasRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddExtrasRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddExtrasResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddExtrasResponse.Builder resBuilder = + AddExtrasResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddExtrasResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddExtrasRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddExtrasRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddExtrasRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddExtrasResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddExtrasResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddExtrasResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddLineup.java b/src/main/java/dev/plexapi/sdk/operations/AddLineup.java new file mode 100644 index 00000000..e7c4c619 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddLineup.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddLineupRequest; +import dev.plexapi.sdk.models.operations.AddLineupResponse; +import dev.plexapi.sdk.models.operations.AddLineupResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddLineup { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addLineup", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addLineup", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addLineup", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/dvrs/{dvrId}/lineups", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddLineupRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddLineupRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddLineupRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddLineupResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddLineupResponse.Builder resBuilder = + AddLineupResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddLineupResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + AddLineupResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddLineupRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddLineupRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddLineupRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddLineupResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddLineupResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddLineupResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + AddLineupResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddPlaylistContents.java b/src/main/java/dev/plexapi/sdk/operations/AddPlaylistContents.java deleted file mode 100644 index 7e57ee18..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/AddPlaylistContents.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.AddPlaylistContentsBadRequest; -import dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsRequest; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class AddPlaylistContents { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "addPlaylistContents", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "addPlaylistContents", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "addPlaylistContents", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/playlists/{playlistID}/items", - request, null); - HTTPRequest req = new HTTPRequest(url, "PUT"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(AddPlaylistContentsRequest request) throws Exception { - HttpRequest req = buildRequest(request, AddPlaylistContentsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(AddPlaylistContentsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public AddPlaylistContentsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - AddPlaylistContentsResponse.Builder resBuilder = - AddPlaylistContentsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - AddPlaylistContentsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - AddPlaylistContentsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - AddPlaylistContentsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - AddPlaylistContentsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(AddPlaylistContentsRequest request) throws Exception { - HttpRequest req = buildRequest(request, AddPlaylistContentsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(AddPlaylistContentsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.AddPlaylistContentsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.AddPlaylistContentsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.AddPlaylistContentsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - AddPlaylistContentsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.AddPlaylistContentsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.AddPlaylistContentsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddPlaylistItems.java b/src/main/java/dev/plexapi/sdk/operations/AddPlaylistItems.java new file mode 100644 index 00000000..49e4cc06 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddPlaylistItems.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.AddPlaylistItemsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddPlaylistItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addPlaylistItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addPlaylistItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addPlaylistItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playlists/{playlistId}/items", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddPlaylistItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddPlaylistItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddPlaylistItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddPlaylistItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddPlaylistItemsResponse.Builder resBuilder = + AddPlaylistItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddPlaylistItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddPlaylistItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddPlaylistItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddPlaylistItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddPlaylistItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddPlaylistItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddPlaylistItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddProvider.java b/src/main/java/dev/plexapi/sdk/operations/AddProvider.java new file mode 100644 index 00000000..e70cfe27 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddProvider.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddProviderRequest; +import dev.plexapi.sdk.models.operations.AddProviderResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddProvider { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addProvider", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addProvider", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addProvider", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/providers"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddProviderRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddProviderRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddProviderRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddProviderResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddProviderResponse.Builder resBuilder = + AddProviderResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddProviderResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddProviderRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddProviderRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddProviderRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddProviderResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddProviderResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddProviderResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddSection.java b/src/main/java/dev/plexapi/sdk/operations/AddSection.java new file mode 100644 index 00000000..64d3543b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddSection.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddSectionRequest; +import dev.plexapi.sdk.models.operations.AddSectionResponse; +import dev.plexapi.sdk.models.shared.SlashGetResponses200; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddSection { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addSection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addSection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addSection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/sections/all"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddSectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddSectionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddSectionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddSectionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddSectionResponse.Builder resBuilder = + AddSectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddSectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + SlashGetResponses200 out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withSlashGetResponses200(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddSectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddSectionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddSectionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddSectionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddSectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddSectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + SlashGetResponses200 out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withSlashGetResponses200(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddSubtitles.java b/src/main/java/dev/plexapi/sdk/operations/AddSubtitles.java new file mode 100644 index 00000000..a2a75f15 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddSubtitles.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddSubtitlesRequest; +import dev.plexapi.sdk.models.operations.AddSubtitlesResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddSubtitles { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addSubtitles", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addSubtitles", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addSubtitles", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/subtitles", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddSubtitlesRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddSubtitlesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddSubtitlesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddSubtitlesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddSubtitlesResponse.Builder resBuilder = + AddSubtitlesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddSubtitlesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddSubtitlesRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddSubtitlesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddSubtitlesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddSubtitlesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddSubtitlesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddSubtitlesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AddToPlayQueue.java b/src/main/java/dev/plexapi/sdk/operations/AddToPlayQueue.java new file mode 100644 index 00000000..23c7ff20 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AddToPlayQueue.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AddToPlayQueueRequest; +import dev.plexapi.sdk.models.operations.AddToPlayQueueResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AddToPlayQueue { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addToPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addToPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "addToPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playQueues/{playQueueId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AddToPlayQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddToPlayQueueRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AddToPlayQueueRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AddToPlayQueueResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AddToPlayQueueResponse.Builder resBuilder = + AddToPlayQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AddToPlayQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AddToPlayQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, AddToPlayQueueRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AddToPlayQueueRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AddToPlayQueueResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AddToPlayQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AddToPlayQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/AnalyzeMetadata.java b/src/main/java/dev/plexapi/sdk/operations/AnalyzeMetadata.java new file mode 100644 index 00000000..b80fd917 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/AnalyzeMetadata.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AnalyzeMetadataRequest; +import dev.plexapi.sdk.models.operations.AnalyzeMetadataResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class AnalyzeMetadata { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "analyzeMetadata", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "analyzeMetadata", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "analyzeMetadata", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/analyze", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AnalyzeMetadataRequest request) throws Exception { + HttpRequest req = buildRequest(request, AnalyzeMetadataRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AnalyzeMetadataRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AnalyzeMetadataResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AnalyzeMetadataResponse.Builder resBuilder = + AnalyzeMetadataResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AnalyzeMetadataResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AnalyzeMetadataRequest request) throws Exception { + HttpRequest req = buildRequest(request, AnalyzeMetadataRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AnalyzeMetadataRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AnalyzeMetadataResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AnalyzeMetadataResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AnalyzeMetadataResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ApplyUpdates.java b/src/main/java/dev/plexapi/sdk/operations/ApplyUpdates.java index 97a4d3b0..cf78bc64 100644 --- a/src/main/java/dev/plexapi/sdk/operations/ApplyUpdates.java +++ b/src/main/java/dev/plexapi/sdk/operations/ApplyUpdates.java @@ -6,11 +6,8 @@ package dev.plexapi.sdk.operations; import static dev.plexapi.sdk.operations.Operations.RequestOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest; -import dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized; import dev.plexapi.sdk.models.errors.SDKError; import dev.plexapi.sdk.models.operations.ApplyUpdatesRequest; import dev.plexapi.sdk.models.operations.ApplyUpdatesResponse; @@ -24,7 +21,6 @@ import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; import java.lang.Exception; -import java.lang.RuntimeException; import java.lang.String; import java.lang.Throwable; import java.net.http.HttpRequest; @@ -85,13 +81,14 @@ public class ApplyUpdates { this.baseUrl, "/updater/apply"); HTTPRequest req = new HTTPRequest(url, "PUT"); - req.addHeader("Accept", "application/json") + req.addHeader("Accept", "*/*") .addHeader("user-agent", SDKConfiguration.USER_AGENT); req.addQueryParams(Utils.getQueryParams( klass, request, - null)); + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -126,7 +123,7 @@ public class ApplyUpdates { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "500", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "500", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -159,43 +156,7 @@ public class ApplyUpdates { return res; } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - ApplyUpdatesBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - ApplyUpdatesUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { // no content throw new SDKError( response, @@ -247,7 +208,7 @@ public class ApplyUpdates { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "500", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "500", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -277,47 +238,7 @@ public class ApplyUpdates { return CompletableFuture.completedFuture(res); } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.ApplyUpdatesBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.ApplyUpdatesUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } diff --git a/src/main/java/dev/plexapi/sdk/operations/Autocomplete.java b/src/main/java/dev/plexapi/sdk/operations/Autocomplete.java new file mode 100644 index 00000000..f1ca0818 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/Autocomplete.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.AutocompleteRequest; +import dev.plexapi.sdk.models.operations.AutocompleteResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class Autocomplete { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "autocomplete", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "autocomplete", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "autocomplete", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/autocomplete", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(AutocompleteRequest request) throws Exception { + HttpRequest req = buildRequest(request, AutocompleteRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AutocompleteRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public AutocompleteResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AutocompleteResponse.Builder resBuilder = + AutocompleteResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AutocompleteResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(AutocompleteRequest request) throws Exception { + HttpRequest req = buildRequest(request, AutocompleteRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(AutocompleteRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.AutocompleteResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.AutocompleteResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.AutocompleteResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CancelActivity.java b/src/main/java/dev/plexapi/sdk/operations/CancelActivity.java new file mode 100644 index 00000000..55a5b7b5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CancelActivity.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CancelActivityRequest; +import dev.plexapi.sdk.models.operations.CancelActivityResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CancelActivity { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cancelActivity", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cancelActivity", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cancelActivity", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/activities/{activityId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(CancelActivityRequest request) throws Exception { + HttpRequest req = buildRequest(request, CancelActivityRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CancelActivityRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CancelActivityResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CancelActivityResponse.Builder resBuilder = + CancelActivityResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CancelActivityResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(CancelActivityRequest request) throws Exception { + HttpRequest req = buildRequest(request, CancelActivityRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CancelActivityRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CancelActivityResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CancelActivityResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CancelActivityResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CancelGrab.java b/src/main/java/dev/plexapi/sdk/operations/CancelGrab.java new file mode 100644 index 00000000..b393897e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CancelGrab.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CancelGrabRequest; +import dev.plexapi.sdk.models.operations.CancelGrabResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CancelGrab { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cancelGrab", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cancelGrab", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cancelGrab", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/grabbers/operations/{operationId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(CancelGrabRequest request) throws Exception { + HttpRequest req = buildRequest(request, CancelGrabRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CancelGrabRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CancelGrabResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CancelGrabResponse.Builder resBuilder = + CancelGrabResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CancelGrabResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(CancelGrabRequest request) throws Exception { + HttpRequest req = buildRequest(request, CancelGrabRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CancelGrabRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CancelGrabResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CancelGrabResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CancelGrabResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CancelRefresh.java b/src/main/java/dev/plexapi/sdk/operations/CancelRefresh.java new file mode 100644 index 00000000..9dbe6620 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CancelRefresh.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CancelRefreshRequest; +import dev.plexapi.sdk.models.operations.CancelRefreshResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CancelRefresh { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cancelRefresh", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cancelRefresh", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cancelRefresh", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/refresh", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(CancelRefreshRequest request) throws Exception { + HttpRequest req = buildRequest(request, CancelRefreshRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CancelRefreshRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CancelRefreshResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CancelRefreshResponse.Builder resBuilder = + CancelRefreshResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CancelRefreshResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(CancelRefreshRequest request) throws Exception { + HttpRequest req = buildRequest(request, CancelRefreshRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CancelRefreshRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CancelRefreshResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CancelRefreshResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CancelRefreshResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CancelServerActivities.java b/src/main/java/dev/plexapi/sdk/operations/CancelServerActivities.java deleted file mode 100644 index 81bba6e7..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/CancelServerActivities.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest; -import dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.CancelServerActivitiesRequest; -import dev.plexapi.sdk.models.operations.CancelServerActivitiesResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class CancelServerActivities { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "cancelServerActivities", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "cancelServerActivities", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "cancelServerActivities", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/activities/{activityUUID}", - request, null); - HTTPRequest req = new HTTPRequest(url, "DELETE"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(CancelServerActivitiesRequest request) throws Exception { - HttpRequest req = buildRequest(request, CancelServerActivitiesRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(CancelServerActivitiesRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public CancelServerActivitiesResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - CancelServerActivitiesResponse.Builder resBuilder = - CancelServerActivitiesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - CancelServerActivitiesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - CancelServerActivitiesBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - CancelServerActivitiesUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(CancelServerActivitiesRequest request) throws Exception { - HttpRequest req = buildRequest(request, CancelServerActivitiesRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(CancelServerActivitiesRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.CancelServerActivitiesResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.CancelServerActivitiesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.CancelServerActivitiesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.CancelServerActivitiesBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.CancelServerActivitiesUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/CheckForUpdates.java b/src/main/java/dev/plexapi/sdk/operations/CheckForUpdates.java deleted file mode 100644 index 6ce738e1..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/CheckForUpdates.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.CheckForUpdatesBadRequest; -import dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.CheckForUpdatesRequest; -import dev.plexapi.sdk.models.operations.CheckForUpdatesResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class CheckForUpdates { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "checkForUpdates", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "checkForUpdates", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "checkForUpdates", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/updater/check"); - HTTPRequest req = new HTTPRequest(url, "PUT"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(CheckForUpdatesRequest request) throws Exception { - HttpRequest req = buildRequest(request, CheckForUpdatesRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(CheckForUpdatesRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public CheckForUpdatesResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - CheckForUpdatesResponse.Builder resBuilder = - CheckForUpdatesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - CheckForUpdatesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - CheckForUpdatesBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - CheckForUpdatesUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(CheckForUpdatesRequest request) throws Exception { - HttpRequest req = buildRequest(request, CheckForUpdatesRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(CheckForUpdatesRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.CheckForUpdatesResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.CheckForUpdatesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.CheckForUpdatesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.CheckForUpdatesBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.CheckForUpdatesUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/CheckUpdates.java b/src/main/java/dev/plexapi/sdk/operations/CheckUpdates.java new file mode 100644 index 00000000..68582356 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CheckUpdates.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CheckUpdatesRequest; +import dev.plexapi.sdk.models.operations.CheckUpdatesResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CheckUpdates { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "checkUpdates", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "checkUpdates", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "checkUpdates", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/updater/check"); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(CheckUpdatesRequest request) throws Exception { + HttpRequest req = buildRequest(request, CheckUpdatesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CheckUpdatesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CheckUpdatesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CheckUpdatesResponse.Builder resBuilder = + CheckUpdatesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CheckUpdatesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(CheckUpdatesRequest request) throws Exception { + HttpRequest req = buildRequest(request, CheckUpdatesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CheckUpdatesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CheckUpdatesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CheckUpdatesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CheckUpdatesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CleanBundles.java b/src/main/java/dev/plexapi/sdk/operations/CleanBundles.java new file mode 100644 index 00000000..7d461437 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CleanBundles.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CleanBundlesResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CleanBundles { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cleanBundles", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cleanBundles", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "cleanBundles", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/clean/bundles"); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CleanBundlesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CleanBundlesResponse.Builder resBuilder = + CleanBundlesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CleanBundlesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CleanBundlesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CleanBundlesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CleanBundlesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ClearPlayQueue.java b/src/main/java/dev/plexapi/sdk/operations/ClearPlayQueue.java new file mode 100644 index 00000000..c86d103f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ClearPlayQueue.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ClearPlayQueueRequest; +import dev.plexapi.sdk.models.operations.ClearPlayQueueResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ClearPlayQueue { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "clearPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "clearPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "clearPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playQueues/{playQueueId}/items", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ClearPlayQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, ClearPlayQueueRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ClearPlayQueueRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ClearPlayQueueResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ClearPlayQueueResponse.Builder resBuilder = + ClearPlayQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ClearPlayQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ClearPlayQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, ClearPlayQueueRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ClearPlayQueueRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ClearPlayQueueResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ClearPlayQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ClearPlayQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ClearPlaylistContents.java b/src/main/java/dev/plexapi/sdk/operations/ClearPlaylistContents.java deleted file mode 100644 index 0343e161..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/ClearPlaylistContents.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.ClearPlaylistContentsBadRequest; -import dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.ClearPlaylistContentsRequest; -import dev.plexapi.sdk.models.operations.ClearPlaylistContentsResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class ClearPlaylistContents { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "clearPlaylistContents", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "clearPlaylistContents", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "clearPlaylistContents", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/playlists/{playlistID}/items", - request, null); - HTTPRequest req = new HTTPRequest(url, "DELETE"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(ClearPlaylistContentsRequest request) throws Exception { - HttpRequest req = buildRequest(request, ClearPlaylistContentsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(ClearPlaylistContentsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public ClearPlaylistContentsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - ClearPlaylistContentsResponse.Builder resBuilder = - ClearPlaylistContentsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - ClearPlaylistContentsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - ClearPlaylistContentsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - ClearPlaylistContentsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(ClearPlaylistContentsRequest request) throws Exception { - HttpRequest req = buildRequest(request, ClearPlaylistContentsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(ClearPlaylistContentsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.ClearPlaylistContentsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.ClearPlaylistContentsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.ClearPlaylistContentsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.ClearPlaylistContentsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.ClearPlaylistContentsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/ClearPlaylistItems.java b/src/main/java/dev/plexapi/sdk/operations/ClearPlaylistItems.java new file mode 100644 index 00000000..a8c2adc7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ClearPlaylistItems.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ClearPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.ClearPlaylistItemsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ClearPlaylistItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "clearPlaylistItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "clearPlaylistItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "clearPlaylistItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playlists/{playlistId}/items", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ClearPlaylistItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ClearPlaylistItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ClearPlaylistItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ClearPlaylistItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ClearPlaylistItemsResponse.Builder resBuilder = + ClearPlaylistItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ClearPlaylistItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ClearPlaylistItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ClearPlaylistItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ClearPlaylistItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ClearPlaylistItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ClearPlaylistItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ClearPlaylistItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ComputeChannelMap.java b/src/main/java/dev/plexapi/sdk/operations/ComputeChannelMap.java new file mode 100644 index 00000000..10c75184 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ComputeChannelMap.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ComputeChannelMapRequest; +import dev.plexapi.sdk.models.operations.ComputeChannelMapResponse; +import dev.plexapi.sdk.models.operations.ComputeChannelMapResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ComputeChannelMap { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "computeChannelMap", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "computeChannelMap", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "computeChannelMap", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/livetv/epg/channelmap"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ComputeChannelMapRequest request) throws Exception { + HttpRequest req = buildRequest(request, ComputeChannelMapRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ComputeChannelMapRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "500", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ComputeChannelMapResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ComputeChannelMapResponse.Builder resBuilder = + ComputeChannelMapResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ComputeChannelMapResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + ComputeChannelMapResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ComputeChannelMapRequest request) throws Exception { + HttpRequest req = buildRequest(request, ComputeChannelMapRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ComputeChannelMapRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "500", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ComputeChannelMapResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ComputeChannelMapResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ComputeChannelMapResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ComputeChannelMapResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ConnectWebSocket.java b/src/main/java/dev/plexapi/sdk/operations/ConnectWebSocket.java new file mode 100644 index 00000000..c2c0b2dd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ConnectWebSocket.java @@ -0,0 +1,270 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ConnectWebSocketRequest; +import dev.plexapi.sdk.models.operations.ConnectWebSocketResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ConnectWebSocket { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "connectWebSocket", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "connectWebSocket", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "connectWebSocket", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/:/websocket/notifications"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/octet-stream") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ConnectWebSocketRequest request) throws Exception { + HttpRequest req = buildRequest(request, ConnectWebSocketRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ConnectWebSocketRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ConnectWebSocketResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ConnectWebSocketResponse.Builder resBuilder = + ConnectWebSocketResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "application/octet-stream")) { + resBuilder.responseStream(response.body()); + } + + ConnectWebSocketResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/octet-stream")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ConnectWebSocketRequest request) throws Exception { + HttpRequest req = buildRequest(request, ConnectWebSocketRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ConnectWebSocketRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ConnectWebSocketResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ConnectWebSocketResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "application/octet-stream")) { + resBuilder.responseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.ConnectWebSocketResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/octet-stream")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CreateCollection.java b/src/main/java/dev/plexapi/sdk/operations/CreateCollection.java new file mode 100644 index 00000000..f52d02bf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CreateCollection.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CreateCollectionRequest; +import dev.plexapi.sdk.models.operations.CreateCollectionResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CreateCollection { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createCollection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createCollection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createCollection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/collections"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(CreateCollectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateCollectionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CreateCollectionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CreateCollectionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateCollectionResponse.Builder resBuilder = + CreateCollectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CreateCollectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(CreateCollectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateCollectionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CreateCollectionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CreateCollectionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CreateCollectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CreateCollectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CreateCustomHub.java b/src/main/java/dev/plexapi/sdk/operations/CreateCustomHub.java new file mode 100644 index 00000000..8d8bf795 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CreateCustomHub.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CreateCustomHubRequest; +import dev.plexapi.sdk.models.operations.CreateCustomHubResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CreateCustomHub { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createCustomHub", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createCustomHub", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createCustomHub", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/hubs/sections/{sectionId}/manage", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(CreateCustomHubRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateCustomHubRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CreateCustomHubRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CreateCustomHubResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateCustomHubResponse.Builder resBuilder = + CreateCustomHubResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CreateCustomHubResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(CreateCustomHubRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateCustomHubRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CreateCustomHubRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CreateCustomHubResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CreateCustomHubResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CreateCustomHubResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CreateDVR.java b/src/main/java/dev/plexapi/sdk/operations/CreateDVR.java new file mode 100644 index 00000000..83437769 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CreateDVR.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CreateDVRRequest; +import dev.plexapi.sdk.models.operations.CreateDVRResponse; +import dev.plexapi.sdk.models.shared.DvrRequestHandlerSlashGetResponses200; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CreateDVR { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/livetv/dvrs"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(CreateDVRRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateDVRRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CreateDVRRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CreateDVRResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateDVRResponse.Builder resBuilder = + CreateDVRResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CreateDVRResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + DvrRequestHandlerSlashGetResponses200 out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withDvrRequestHandlerSlashGetResponses200(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(CreateDVRRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateDVRRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CreateDVRRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CreateDVRResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CreateDVRResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CreateDVRResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + DvrRequestHandlerSlashGetResponses200 out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withDvrRequestHandlerSlashGetResponses200(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CreateDownloadQueue.java b/src/main/java/dev/plexapi/sdk/operations/CreateDownloadQueue.java new file mode 100644 index 00000000..82973624 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CreateDownloadQueue.java @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CreateDownloadQueueResponse; +import dev.plexapi.sdk.models.operations.CreateDownloadQueueResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CreateDownloadQueue { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createDownloadQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createDownloadQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createDownloadQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/downloadQueue"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CreateDownloadQueueResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateDownloadQueueResponse.Builder resBuilder = + CreateDownloadQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CreateDownloadQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + CreateDownloadQueueResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CreateDownloadQueueResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CreateDownloadQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CreateDownloadQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + CreateDownloadQueueResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CreateMarker.java b/src/main/java/dev/plexapi/sdk/operations/CreateMarker.java new file mode 100644 index 00000000..ec4494a5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CreateMarker.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CreateMarkerRequest; +import dev.plexapi.sdk.models.operations.CreateMarkerResponse; +import dev.plexapi.sdk.models.operations.CreateMarkerResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CreateMarker { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createMarker", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createMarker", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createMarker", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/marker", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(CreateMarkerRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateMarkerRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CreateMarkerRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CreateMarkerResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateMarkerResponse.Builder resBuilder = + CreateMarkerResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CreateMarkerResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + CreateMarkerResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(CreateMarkerRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateMarkerRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CreateMarkerRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CreateMarkerResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CreateMarkerResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CreateMarkerResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + CreateMarkerResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CreatePlayQueue.java b/src/main/java/dev/plexapi/sdk/operations/CreatePlayQueue.java new file mode 100644 index 00000000..48d85aa1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CreatePlayQueue.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CreatePlayQueueRequest; +import dev.plexapi.sdk.models.operations.CreatePlayQueueResponse; +import dev.plexapi.sdk.models.operations.CreatePlayQueueResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CreatePlayQueue { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/playQueues"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(CreatePlayQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreatePlayQueueRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CreatePlayQueueRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CreatePlayQueueResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreatePlayQueueResponse.Builder resBuilder = + CreatePlayQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CreatePlayQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + CreatePlayQueueResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(CreatePlayQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreatePlayQueueRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CreatePlayQueueRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CreatePlayQueueResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CreatePlayQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CreatePlayQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + CreatePlayQueueResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/CreatePlaylist.java b/src/main/java/dev/plexapi/sdk/operations/CreatePlaylist.java index e8eccd6d..da47ffaa 100644 --- a/src/main/java/dev/plexapi/sdk/operations/CreatePlaylist.java +++ b/src/main/java/dev/plexapi/sdk/operations/CreatePlaylist.java @@ -9,12 +9,10 @@ import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest; -import dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized; import dev.plexapi.sdk.models.errors.SDKError; import dev.plexapi.sdk.models.operations.CreatePlaylistRequest; import dev.plexapi.sdk.models.operations.CreatePlaylistResponse; -import dev.plexapi.sdk.models.operations.CreatePlaylistResponseBody; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Exceptions; import dev.plexapi.sdk.utils.HTTPClient; @@ -92,7 +90,8 @@ public class CreatePlaylist { req.addQueryParams(Utils.getQueryParams( klass, request, - null)); + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -127,7 +126,7 @@ public class CreatePlaylist { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -157,11 +156,11 @@ public class CreatePlaylist { if (Utils.statusCodeMatches(response.statusCode(), "200")) { if (Utils.contentTypeMatches(contentType, "application/json")) { - CreatePlaylistResponseBody out = Utils.mapper().readValue( + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( response.body(), new TypeReference<>() { }); - res.withObject(out); + res.withMediaContainerWithPlaylistMetadata(out); return res; } else { throw new SDKError( @@ -172,43 +171,7 @@ public class CreatePlaylist { } } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - CreatePlaylistBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - CreatePlaylistUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { // no content throw new SDKError( response, @@ -260,7 +223,7 @@ public class CreatePlaylist { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -289,11 +252,11 @@ public class CreatePlaylist { if (Utils.contentTypeMatches(contentType, "application/json")) { return response.body().toByteArray().thenApply(bodyBytes -> { try { - CreatePlaylistResponseBody out = Utils.mapper().readValue( + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( bodyBytes, new TypeReference<>() { }); - res.withObject(out); + res.withMediaContainerWithPlaylistMetadata(out); return res; } catch (Exception e) { throw new RuntimeException(e); @@ -304,47 +267,7 @@ public class CreatePlaylist { } } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.CreatePlaylistBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.CreatePlaylistUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } diff --git a/src/main/java/dev/plexapi/sdk/operations/CreateSubscription.java b/src/main/java/dev/plexapi/sdk/operations/CreateSubscription.java new file mode 100644 index 00000000..1a36433e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/CreateSubscription.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.CreateSubscriptionRequest; +import dev.plexapi.sdk.models.operations.CreateSubscriptionResponse; +import dev.plexapi.sdk.models.operations.CreateSubscriptionResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CreateSubscription { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/subscriptions"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(CreateSubscriptionRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateSubscriptionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CreateSubscriptionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "409", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public CreateSubscriptionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateSubscriptionResponse.Builder resBuilder = + CreateSubscriptionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CreateSubscriptionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + CreateSubscriptionResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "409", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(CreateSubscriptionRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateSubscriptionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CreateSubscriptionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "409", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.CreateSubscriptionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.CreateSubscriptionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.CreateSubscriptionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + CreateSubscriptionResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "409", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteCaches.java b/src/main/java/dev/plexapi/sdk/operations/DeleteCaches.java new file mode 100644 index 00000000..38865567 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteCaches.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteCachesResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteCaches { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCaches", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCaches", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCaches", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/caches"); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteCachesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteCachesResponse.Builder resBuilder = + DeleteCachesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteCachesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteCachesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteCachesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteCachesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteCollection.java b/src/main/java/dev/plexapi/sdk/operations/DeleteCollection.java new file mode 100644 index 00000000..cfd5da83 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteCollection.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteCollectionRequest; +import dev.plexapi.sdk.models.operations.DeleteCollectionResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteCollection { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCollection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCollection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCollection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/collection/{collectionId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteCollectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteCollectionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteCollectionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteCollectionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteCollectionResponse.Builder resBuilder = + DeleteCollectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteCollectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteCollectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteCollectionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteCollectionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteCollectionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteCollectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteCollectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteCollectionItem.java b/src/main/java/dev/plexapi/sdk/operations/DeleteCollectionItem.java new file mode 100644 index 00000000..d23a98c3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteCollectionItem.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteCollectionItemRequest; +import dev.plexapi.sdk.models.operations.DeleteCollectionItemResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteCollectionItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCollectionItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCollectionItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCollectionItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/collections/{collectionId}/items/{itemId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteCollectionItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteCollectionItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteCollectionItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteCollectionItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteCollectionItemResponse.Builder resBuilder = + DeleteCollectionItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteCollectionItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteCollectionItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteCollectionItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteCollectionItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteCollectionItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteCollectionItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteCollectionItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteCustomHub.java b/src/main/java/dev/plexapi/sdk/operations/DeleteCustomHub.java new file mode 100644 index 00000000..196663a5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteCustomHub.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteCustomHubRequest; +import dev.plexapi.sdk.models.operations.DeleteCustomHubResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteCustomHub { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCustomHub", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCustomHub", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteCustomHub", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/hubs/sections/{sectionId}/manage/{identifier}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteCustomHubRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteCustomHubRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteCustomHubRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteCustomHubResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteCustomHubResponse.Builder resBuilder = + DeleteCustomHubResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteCustomHubResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteCustomHubRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteCustomHubRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteCustomHubRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteCustomHubResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteCustomHubResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteCustomHubResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteDVR.java b/src/main/java/dev/plexapi/sdk/operations/DeleteDVR.java new file mode 100644 index 00000000..a776ec3b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteDVR.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteDVRRequest; +import dev.plexapi.sdk.models.operations.DeleteDVRResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteDVR { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/dvrs/{dvrId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteDVRRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteDVRRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteDVRRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteDVRResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteDVRResponse.Builder resBuilder = + DeleteDVRResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteDVRResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteDVRRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteDVRRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteDVRRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteDVRResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteDVRResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteDVRResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteHistory.java b/src/main/java/dev/plexapi/sdk/operations/DeleteHistory.java new file mode 100644 index 00000000..d9f5c92d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteHistory.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteHistoryRequest; +import dev.plexapi.sdk.models.operations.DeleteHistoryResponse; +import dev.plexapi.sdk.models.shared.MediaContainer; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteHistory { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteHistory", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteHistory", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteHistory", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/status/sessions/history/{historyId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteHistoryRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteHistoryRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteHistoryRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteHistoryResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteHistoryResponse.Builder resBuilder = + DeleteHistoryResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteHistoryResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainer out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainer(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteHistoryRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteHistoryRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteHistoryRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteHistoryResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteHistoryResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteHistoryResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainer out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainer(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteIndexes.java b/src/main/java/dev/plexapi/sdk/operations/DeleteIndexes.java new file mode 100644 index 00000000..899748fe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteIndexes.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteIndexesRequest; +import dev.plexapi.sdk.models.operations.DeleteIndexesResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteIndexes { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteIndexes", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteIndexes", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteIndexes", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/indexes", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteIndexesRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteIndexesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteIndexesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteIndexesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteIndexesResponse.Builder resBuilder = + DeleteIndexesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteIndexesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteIndexesRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteIndexesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteIndexesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteIndexesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteIndexesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteIndexesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteIntros.java b/src/main/java/dev/plexapi/sdk/operations/DeleteIntros.java new file mode 100644 index 00000000..e32a78df --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteIntros.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteIntrosRequest; +import dev.plexapi.sdk.models.operations.DeleteIntrosResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteIntros { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteIntros", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteIntros", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteIntros", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/intros", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteIntrosRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteIntrosRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteIntrosRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteIntrosResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteIntrosResponse.Builder resBuilder = + DeleteIntrosResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteIntrosResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteIntrosRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteIntrosRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteIntrosRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteIntrosResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteIntrosResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteIntrosResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteLibrary.java b/src/main/java/dev/plexapi/sdk/operations/DeleteLibrary.java deleted file mode 100644 index 172e2f62..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/DeleteLibrary.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest; -import dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.DeleteLibraryRequest; -import dev.plexapi.sdk.models.operations.DeleteLibraryResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class DeleteLibrary { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "deleteLibrary", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "deleteLibrary", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "deleteLibrary", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/sections/{sectionKey}", - request, null); - HTTPRequest req = new HTTPRequest(url, "DELETE"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(DeleteLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, DeleteLibraryRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(DeleteLibraryRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public DeleteLibraryResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - DeleteLibraryResponse.Builder resBuilder = - DeleteLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - DeleteLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - DeleteLibraryBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - DeleteLibraryUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(DeleteLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, DeleteLibraryRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(DeleteLibraryRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.DeleteLibraryResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.DeleteLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.DeleteLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.DeleteLibraryBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.DeleteLibraryUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteLibrarySection.java b/src/main/java/dev/plexapi/sdk/operations/DeleteLibrarySection.java new file mode 100644 index 00000000..4f1e407e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteLibrarySection.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteLibrarySectionRequest; +import dev.plexapi.sdk.models.operations.DeleteLibrarySectionResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteLibrarySection { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteLibrarySection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteLibrarySection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteLibrarySection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteLibrarySectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteLibrarySectionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteLibrarySectionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteLibrarySectionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteLibrarySectionResponse.Builder resBuilder = + DeleteLibrarySectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteLibrarySectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteLibrarySectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteLibrarySectionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteLibrarySectionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteLibrarySectionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteLibrarySectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteLibrarySectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteLineup.java b/src/main/java/dev/plexapi/sdk/operations/DeleteLineup.java new file mode 100644 index 00000000..86d36e5a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteLineup.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteLineupRequest; +import dev.plexapi.sdk.models.operations.DeleteLineupResponse; +import dev.plexapi.sdk.models.operations.DeleteLineupResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteLineup { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteLineup", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteLineup", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteLineup", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/dvrs/{dvrId}/lineups", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteLineupRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteLineupRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteLineupRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteLineupResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteLineupResponse.Builder resBuilder = + DeleteLineupResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteLineupResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + DeleteLineupResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteLineupRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteLineupRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteLineupRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteLineupResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteLineupResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteLineupResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + DeleteLineupResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteMarker.java b/src/main/java/dev/plexapi/sdk/operations/DeleteMarker.java new file mode 100644 index 00000000..38a84b1a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteMarker.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteMarkerRequest; +import dev.plexapi.sdk.models.operations.DeleteMarkerResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteMarker { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMarker", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMarker", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMarker", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/marker/{marker}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteMarkerRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteMarkerRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteMarkerRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteMarkerResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteMarkerResponse.Builder resBuilder = + DeleteMarkerResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteMarkerResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteMarkerRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteMarkerRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteMarkerRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteMarkerResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteMarkerResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteMarkerResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteMediaItem.java b/src/main/java/dev/plexapi/sdk/operations/DeleteMediaItem.java new file mode 100644 index 00000000..8c5155c5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteMediaItem.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteMediaItemRequest; +import dev.plexapi.sdk.models.operations.DeleteMediaItemResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteMediaItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMediaItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMediaItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMediaItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/media/{mediaItem}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteMediaItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteMediaItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteMediaItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteMediaItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteMediaItemResponse.Builder resBuilder = + DeleteMediaItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteMediaItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteMediaItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteMediaItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteMediaItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteMediaItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteMediaItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteMediaItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteMediaProvider.java b/src/main/java/dev/plexapi/sdk/operations/DeleteMediaProvider.java new file mode 100644 index 00000000..8bdc99d0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteMediaProvider.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteMediaProviderRequest; +import dev.plexapi.sdk.models.operations.DeleteMediaProviderResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteMediaProvider { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMediaProvider", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMediaProvider", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMediaProvider", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/providers/{provider}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteMediaProviderRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteMediaProviderRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteMediaProviderRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteMediaProviderResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteMediaProviderResponse.Builder resBuilder = + DeleteMediaProviderResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteMediaProviderResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteMediaProviderRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteMediaProviderRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteMediaProviderRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteMediaProviderResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteMediaProviderResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteMediaProviderResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteMetadataItem.java b/src/main/java/dev/plexapi/sdk/operations/DeleteMetadataItem.java new file mode 100644 index 00000000..9659e5c6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteMetadataItem.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteMetadataItemRequest; +import dev.plexapi.sdk.models.operations.DeleteMetadataItemResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteMetadataItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMetadataItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMetadataItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteMetadataItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteMetadataItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteMetadataItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteMetadataItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteMetadataItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteMetadataItemResponse.Builder resBuilder = + DeleteMetadataItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteMetadataItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteMetadataItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteMetadataItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteMetadataItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteMetadataItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteMetadataItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteMetadataItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeletePlayQueueItem.java b/src/main/java/dev/plexapi/sdk/operations/DeletePlayQueueItem.java new file mode 100644 index 00000000..60e1144e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeletePlayQueueItem.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeletePlayQueueItemRequest; +import dev.plexapi.sdk.models.operations.DeletePlayQueueItemResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeletePlayQueueItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deletePlayQueueItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deletePlayQueueItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deletePlayQueueItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playQueues/{playQueueId}/items/{playQueueItemId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeletePlayQueueItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeletePlayQueueItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeletePlayQueueItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeletePlayQueueItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeletePlayQueueItemResponse.Builder resBuilder = + DeletePlayQueueItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeletePlayQueueItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeletePlayQueueItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeletePlayQueueItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeletePlayQueueItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeletePlayQueueItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeletePlayQueueItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeletePlayQueueItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeletePlaylist.java b/src/main/java/dev/plexapi/sdk/operations/DeletePlaylist.java index c82baec9..40624f4a 100644 --- a/src/main/java/dev/plexapi/sdk/operations/DeletePlaylist.java +++ b/src/main/java/dev/plexapi/sdk/operations/DeletePlaylist.java @@ -6,11 +6,8 @@ package dev.plexapi.sdk.operations; import static dev.plexapi.sdk.operations.Operations.RequestOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.DeletePlaylistBadRequest; -import dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized; import dev.plexapi.sdk.models.errors.SDKError; import dev.plexapi.sdk.models.operations.DeletePlaylistRequest; import dev.plexapi.sdk.models.operations.DeletePlaylistResponse; @@ -24,7 +21,6 @@ import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; import java.lang.Exception; -import java.lang.RuntimeException; import java.lang.String; import java.lang.Throwable; import java.net.http.HttpRequest; @@ -84,11 +80,12 @@ public class DeletePlaylist { String url = Utils.generateURL( klass, this.baseUrl, - "/playlists/{playlistID}", - request, null); + "/playlists/{playlistId}", + request, this.sdkConfiguration.globals); HTTPRequest req = new HTTPRequest(url, "DELETE"); - req.addHeader("Accept", "application/json") + req.addHeader("Accept", "*/*") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -123,7 +120,7 @@ public class DeletePlaylist { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -156,43 +153,7 @@ public class DeletePlaylist { return res; } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - DeletePlaylistBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - DeletePlaylistUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { // no content throw new SDKError( response, @@ -244,7 +205,7 @@ public class DeletePlaylist { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -274,47 +235,7 @@ public class DeletePlaylist { return CompletableFuture.completedFuture(res); } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.DeletePlaylistBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.DeletePlaylistUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } diff --git a/src/main/java/dev/plexapi/sdk/operations/DeletePlaylistItem.java b/src/main/java/dev/plexapi/sdk/operations/DeletePlaylistItem.java new file mode 100644 index 00000000..91acd7ea --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeletePlaylistItem.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeletePlaylistItemRequest; +import dev.plexapi.sdk.models.operations.DeletePlaylistItemResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeletePlaylistItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deletePlaylistItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deletePlaylistItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deletePlaylistItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playlists/{playlistId}/items/{generatorId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeletePlaylistItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeletePlaylistItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeletePlaylistItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeletePlaylistItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeletePlaylistItemResponse.Builder resBuilder = + DeletePlaylistItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeletePlaylistItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeletePlaylistItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeletePlaylistItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeletePlaylistItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeletePlaylistItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeletePlaylistItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeletePlaylistItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteStream.java b/src/main/java/dev/plexapi/sdk/operations/DeleteStream.java new file mode 100644 index 00000000..df63076a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteStream.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteStreamRequest; +import dev.plexapi.sdk.models.operations.DeleteStreamResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteStream { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteStream", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteStream", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteStream", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/streams/{streamId}.{ext}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteStreamRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteStreamRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteStreamRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "4XX", "500", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteStreamResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteStreamResponse.Builder resBuilder = + DeleteStreamResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteStreamResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteStreamRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteStreamRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteStreamRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "4XX", "500", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteStreamResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteStreamResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteStreamResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DeleteSubscription.java b/src/main/java/dev/plexapi/sdk/operations/DeleteSubscription.java new file mode 100644 index 00000000..2ba8ee91 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DeleteSubscription.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DeleteSubscriptionRequest; +import dev.plexapi.sdk.models.operations.DeleteSubscriptionResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DeleteSubscription { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "deleteSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/subscriptions/{subscriptionId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DeleteSubscriptionRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteSubscriptionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DeleteSubscriptionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DeleteSubscriptionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteSubscriptionResponse.Builder resBuilder = + DeleteSubscriptionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DeleteSubscriptionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DeleteSubscriptionRequest request) throws Exception { + HttpRequest req = buildRequest(request, DeleteSubscriptionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DeleteSubscriptionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DeleteSubscriptionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DeleteSubscriptionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DeleteSubscriptionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DetectAds.java b/src/main/java/dev/plexapi/sdk/operations/DetectAds.java new file mode 100644 index 00000000..cae000db --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DetectAds.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DetectAdsRequest; +import dev.plexapi.sdk.models.operations.DetectAdsResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DetectAds { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectAds", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectAds", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectAds", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/addetect", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DetectAdsRequest request) throws Exception { + HttpRequest req = buildRequest(request, DetectAdsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DetectAdsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DetectAdsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DetectAdsResponse.Builder resBuilder = + DetectAdsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DetectAdsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DetectAdsRequest request) throws Exception { + HttpRequest req = buildRequest(request, DetectAdsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DetectAdsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DetectAdsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DetectAdsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DetectAdsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DetectCredits.java b/src/main/java/dev/plexapi/sdk/operations/DetectCredits.java new file mode 100644 index 00000000..6d545cdc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DetectCredits.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DetectCreditsRequest; +import dev.plexapi.sdk.models.operations.DetectCreditsResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DetectCredits { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectCredits", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectCredits", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectCredits", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/credits", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DetectCreditsRequest request) throws Exception { + HttpRequest req = buildRequest(request, DetectCreditsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DetectCreditsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DetectCreditsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DetectCreditsResponse.Builder resBuilder = + DetectCreditsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DetectCreditsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DetectCreditsRequest request) throws Exception { + HttpRequest req = buildRequest(request, DetectCreditsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DetectCreditsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DetectCreditsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DetectCreditsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DetectCreditsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DetectIntros.java b/src/main/java/dev/plexapi/sdk/operations/DetectIntros.java new file mode 100644 index 00000000..fa3187b1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DetectIntros.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DetectIntrosRequest; +import dev.plexapi.sdk.models.operations.DetectIntrosResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DetectIntros { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectIntros", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectIntros", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectIntros", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/intro", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DetectIntrosRequest request) throws Exception { + HttpRequest req = buildRequest(request, DetectIntrosRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DetectIntrosRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DetectIntrosResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DetectIntrosResponse.Builder resBuilder = + DetectIntrosResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DetectIntrosResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DetectIntrosRequest request) throws Exception { + HttpRequest req = buildRequest(request, DetectIntrosRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DetectIntrosRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DetectIntrosResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DetectIntrosResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DetectIntrosResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DetectVoiceActivity.java b/src/main/java/dev/plexapi/sdk/operations/DetectVoiceActivity.java new file mode 100644 index 00000000..d0ac3445 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DetectVoiceActivity.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DetectVoiceActivityRequest; +import dev.plexapi.sdk.models.operations.DetectVoiceActivityResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DetectVoiceActivity { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectVoiceActivity", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectVoiceActivity", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "detectVoiceActivity", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/voiceActivity", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(DetectVoiceActivityRequest request) throws Exception { + HttpRequest req = buildRequest(request, DetectVoiceActivityRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(DetectVoiceActivityRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DetectVoiceActivityResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DetectVoiceActivityResponse.Builder resBuilder = + DetectVoiceActivityResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DetectVoiceActivityResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(DetectVoiceActivityRequest request) throws Exception { + HttpRequest req = buildRequest(request, DetectVoiceActivityRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(DetectVoiceActivityRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DetectVoiceActivityResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DetectVoiceActivityResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DetectVoiceActivityResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/DiscoverDevices.java b/src/main/java/dev/plexapi/sdk/operations/DiscoverDevices.java new file mode 100644 index 00000000..999c759a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/DiscoverDevices.java @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.DiscoverDevicesResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class DiscoverDevices { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "discoverDevices", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "discoverDevices", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "discoverDevices", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/grabbers/devices/discover"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public DiscoverDevicesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DiscoverDevicesResponse.Builder resBuilder = + DiscoverDevicesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + DiscoverDevicesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithDevice out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.DiscoverDevicesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.DiscoverDevicesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.DiscoverDevicesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithDevice out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/EditMarker.java b/src/main/java/dev/plexapi/sdk/operations/EditMarker.java new file mode 100644 index 00000000..d1abe164 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/EditMarker.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.EditMarkerRequest; +import dev.plexapi.sdk.models.operations.EditMarkerResponse; +import dev.plexapi.sdk.models.shared.PostResponses200; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class EditMarker { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editMarker", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editMarker", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editMarker", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/marker/{marker}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(EditMarkerRequest request) throws Exception { + HttpRequest req = buildRequest(request, EditMarkerRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EditMarkerRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public EditMarkerResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EditMarkerResponse.Builder resBuilder = + EditMarkerResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EditMarkerResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + PostResponses200 out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withPostResponses200(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(EditMarkerRequest request) throws Exception { + HttpRequest req = buildRequest(request, EditMarkerRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EditMarkerRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.EditMarkerResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.EditMarkerResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.EditMarkerResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + PostResponses200 out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withPostResponses200(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/EditMetadataItem.java b/src/main/java/dev/plexapi/sdk/operations/EditMetadataItem.java new file mode 100644 index 00000000..86364937 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/EditMetadataItem.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.EditMetadataItemRequest; +import dev.plexapi.sdk.models.operations.EditMetadataItemResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class EditMetadataItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editMetadataItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editMetadataItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editMetadataItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(EditMetadataItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, EditMetadataItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EditMetadataItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public EditMetadataItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EditMetadataItemResponse.Builder resBuilder = + EditMetadataItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EditMetadataItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(EditMetadataItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, EditMetadataItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EditMetadataItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.EditMetadataItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.EditMetadataItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.EditMetadataItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/EditSection.java b/src/main/java/dev/plexapi/sdk/operations/EditSection.java new file mode 100644 index 00000000..2eaf9dd5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/EditSection.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.EditSectionRequest; +import dev.plexapi.sdk.models.operations.EditSectionResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class EditSection { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editSection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editSection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editSection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(EditSectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, EditSectionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EditSectionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public EditSectionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EditSectionResponse.Builder resBuilder = + EditSectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EditSectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(EditSectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, EditSectionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EditSectionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.EditSectionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.EditSectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.EditSectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/EditSubscriptionPreferences.java b/src/main/java/dev/plexapi/sdk/operations/EditSubscriptionPreferences.java new file mode 100644 index 00000000..52fe84d7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/EditSubscriptionPreferences.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.EditSubscriptionPreferencesRequest; +import dev.plexapi.sdk.models.operations.EditSubscriptionPreferencesResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class EditSubscriptionPreferences { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editSubscriptionPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editSubscriptionPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "editSubscriptionPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/subscriptions/{subscriptionId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(EditSubscriptionPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, EditSubscriptionPreferencesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EditSubscriptionPreferencesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public EditSubscriptionPreferencesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EditSubscriptionPreferencesResponse.Builder resBuilder = + EditSubscriptionPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EditSubscriptionPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithSubscription out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithSubscription(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(EditSubscriptionPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, EditSubscriptionPreferencesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EditSubscriptionPreferencesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.EditSubscriptionPreferencesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.EditSubscriptionPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.EditSubscriptionPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithSubscription out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithSubscription(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/EmptyTrash.java b/src/main/java/dev/plexapi/sdk/operations/EmptyTrash.java new file mode 100644 index 00000000..11f6feb7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/EmptyTrash.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.EmptyTrashRequest; +import dev.plexapi.sdk.models.operations.EmptyTrashResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class EmptyTrash { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "emptyTrash", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "emptyTrash", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "emptyTrash", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/emptyTrash", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(EmptyTrashRequest request) throws Exception { + HttpRequest req = buildRequest(request, EmptyTrashRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EmptyTrashRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public EmptyTrashResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EmptyTrashResponse.Builder resBuilder = + EmptyTrashResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EmptyTrashResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(EmptyTrashRequest request) throws Exception { + HttpRequest req = buildRequest(request, EmptyTrashRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EmptyTrashRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.EmptyTrashResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.EmptyTrashResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.EmptyTrashResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/EnablePaperTrail.java b/src/main/java/dev/plexapi/sdk/operations/EnablePaperTrail.java deleted file mode 100644 index b9ebefda..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/EnablePaperTrail.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest; -import dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.EnablePaperTrailResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class EnablePaperTrail { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "enablePaperTrail", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "enablePaperTrail", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "enablePaperTrail", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/log/networked"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public EnablePaperTrailResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - EnablePaperTrailResponse.Builder resBuilder = - EnablePaperTrailResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - EnablePaperTrailResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - EnablePaperTrailBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - EnablePaperTrailUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.EnablePaperTrailResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.EnablePaperTrailResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.EnablePaperTrailResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.EnablePaperTrailBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.EnablePaperTrailUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/EnablePapertrail.java b/src/main/java/dev/plexapi/sdk/operations/EnablePapertrail.java new file mode 100644 index 00000000..efae016b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/EnablePapertrail.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.EnablePapertrailRequest; +import dev.plexapi.sdk.models.operations.EnablePapertrailResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class EnablePapertrail { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "enablePapertrail", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "enablePapertrail", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "enablePapertrail", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/log/networked"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(EnablePapertrailRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnablePapertrailRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EnablePapertrailRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public EnablePapertrailResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EnablePapertrailResponse.Builder resBuilder = + EnablePapertrailResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EnablePapertrailResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(EnablePapertrailRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnablePapertrailRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EnablePapertrailRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.EnablePapertrailResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.EnablePapertrailResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.EnablePapertrailResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GenerateThumbs.java b/src/main/java/dev/plexapi/sdk/operations/GenerateThumbs.java new file mode 100644 index 00000000..18a5ad18 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GenerateThumbs.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GenerateThumbsRequest; +import dev.plexapi.sdk.models.operations.GenerateThumbsResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GenerateThumbs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "generateThumbs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "generateThumbs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "generateThumbs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/chapterThumbs", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GenerateThumbsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GenerateThumbsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GenerateThumbsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GenerateThumbsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GenerateThumbsResponse.Builder resBuilder = + GenerateThumbsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GenerateThumbsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GenerateThumbsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GenerateThumbsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GenerateThumbsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GenerateThumbsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GenerateThumbsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GenerateThumbsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetActorsLibrary.java b/src/main/java/dev/plexapi/sdk/operations/GetActorsLibrary.java deleted file mode 100644 index a0927037..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetActorsLibrary.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetActorsLibraryBadRequest; -import dev.plexapi.sdk.models.errors.GetActorsLibraryUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetActorsLibraryRequest; -import dev.plexapi.sdk.models.operations.GetActorsLibraryResponse; -import dev.plexapi.sdk.models.operations.GetActorsLibraryResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetActorsLibrary { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-actors-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-actors-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-actors-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/sections/{sectionKey}/actor", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetActorsLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetActorsLibraryRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetActorsLibraryRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "404", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetActorsLibraryResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetActorsLibraryResponse.Builder resBuilder = - GetActorsLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetActorsLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetActorsLibraryResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetActorsLibraryBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetActorsLibraryUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetActorsLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetActorsLibraryRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetActorsLibraryRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "404", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetActorsLibraryResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetActorsLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetActorsLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetActorsLibraryResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetActorsLibraryBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetActorsLibraryUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAlbums.java b/src/main/java/dev/plexapi/sdk/operations/GetAlbums.java new file mode 100644 index 00000000..76f9910d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetAlbums.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetAlbumsRequest; +import dev.plexapi.sdk.models.operations.GetAlbumsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetAlbums { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAlbums", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAlbums", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAlbums", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/albums", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetAlbumsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAlbumsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetAlbumsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetAlbumsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAlbumsResponse.Builder resBuilder = + GetAlbumsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetAlbumsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetAlbumsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAlbumsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetAlbumsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetAlbumsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetAlbumsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetAlbumsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAllHubs.java b/src/main/java/dev/plexapi/sdk/operations/GetAllHubs.java new file mode 100644 index 00000000..0f393a64 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetAllHubs.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetAllHubsRequest; +import dev.plexapi.sdk.models.operations.GetAllHubsResponse; +import dev.plexapi.sdk.models.operations.GetAllHubsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetAllHubs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/hubs"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetAllHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAllHubsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetAllHubsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetAllHubsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAllHubsResponse.Builder resBuilder = + GetAllHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetAllHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetAllHubsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetAllHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAllHubsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetAllHubsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetAllHubsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetAllHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetAllHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetAllHubsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAllItemLeaves.java b/src/main/java/dev/plexapi/sdk/operations/GetAllItemLeaves.java new file mode 100644 index 00000000..0a9d22ec --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetAllItemLeaves.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetAllItemLeavesRequest; +import dev.plexapi.sdk.models.operations.GetAllItemLeavesResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetAllItemLeaves { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllItemLeaves", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllItemLeaves", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllItemLeaves", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/allLeaves", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetAllItemLeavesRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAllItemLeavesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetAllItemLeavesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetAllItemLeavesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAllItemLeavesResponse.Builder resBuilder = + GetAllItemLeavesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetAllItemLeavesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetAllItemLeavesRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAllItemLeavesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetAllItemLeavesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetAllItemLeavesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetAllItemLeavesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetAllItemLeavesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAllLanguages.java b/src/main/java/dev/plexapi/sdk/operations/GetAllLanguages.java new file mode 100644 index 00000000..43c23222 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetAllLanguages.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetAllLanguagesResponse; +import dev.plexapi.sdk.models.operations.GetAllLanguagesResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetAllLanguages { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllLanguages", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllLanguages", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllLanguages", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/livetv/epg/languages"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetAllLanguagesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAllLanguagesResponse.Builder resBuilder = + GetAllLanguagesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetAllLanguagesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetAllLanguagesResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetAllLanguagesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetAllLanguagesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetAllLanguagesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetAllLanguagesResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAllLeaves.java b/src/main/java/dev/plexapi/sdk/operations/GetAllLeaves.java new file mode 100644 index 00000000..f88e74a0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetAllLeaves.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetAllLeavesRequest; +import dev.plexapi.sdk.models.operations.GetAllLeavesResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetAllLeaves { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllLeaves", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllLeaves", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllLeaves", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/allLeaves", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetAllLeavesRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAllLeavesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetAllLeavesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetAllLeavesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAllLeavesResponse.Builder resBuilder = + GetAllLeavesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetAllLeavesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetAllLeavesRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAllLeavesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetAllLeavesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetAllLeavesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetAllLeavesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetAllLeavesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAllLibraries.java b/src/main/java/dev/plexapi/sdk/operations/GetAllLibraries.java deleted file mode 100644 index e6676245..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetAllLibraries.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest; -import dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetAllLibrariesResponse; -import dev.plexapi.sdk.models.operations.GetAllLibrariesResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetAllLibraries { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-all-libraries", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-all-libraries", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-all-libraries", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/library/sections"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetAllLibrariesResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetAllLibrariesResponse.Builder resBuilder = - GetAllLibrariesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetAllLibrariesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetAllLibrariesResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetAllLibrariesBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetAllLibrariesUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetAllLibrariesResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetAllLibrariesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetAllLibrariesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetAllLibrariesResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetAllLibrariesBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetAllLibrariesUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAllPreferences.java b/src/main/java/dev/plexapi/sdk/operations/GetAllPreferences.java new file mode 100644 index 00000000..125be9db --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetAllPreferences.java @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetAllPreferencesResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithSettings; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetAllPreferences { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/:/prefs"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetAllPreferencesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAllPreferencesResponse.Builder resBuilder = + GetAllPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetAllPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithSettings out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithSettings(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetAllPreferencesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetAllPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetAllPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithSettings out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithSettings(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAllSubscriptions.java b/src/main/java/dev/plexapi/sdk/operations/GetAllSubscriptions.java new file mode 100644 index 00000000..e3498fa5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetAllSubscriptions.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetAllSubscriptionsRequest; +import dev.plexapi.sdk.models.operations.GetAllSubscriptionsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetAllSubscriptions { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllSubscriptions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllSubscriptions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAllSubscriptions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/subscriptions"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetAllSubscriptionsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAllSubscriptionsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetAllSubscriptionsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetAllSubscriptionsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAllSubscriptionsResponse.Builder resBuilder = + GetAllSubscriptionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetAllSubscriptionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithSubscription out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithSubscription(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetAllSubscriptionsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAllSubscriptionsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetAllSubscriptionsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetAllSubscriptionsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetAllSubscriptionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetAllSubscriptionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithSubscription out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithSubscription(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetArts.java b/src/main/java/dev/plexapi/sdk/operations/GetArts.java new file mode 100644 index 00000000..05ec4e95 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetArts.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetArtsRequest; +import dev.plexapi.sdk.models.operations.GetArtsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetArts { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getArts", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getArts", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getArts", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/arts", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetArtsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetArtsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetArtsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetArtsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetArtsResponse.Builder resBuilder = + GetArtsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetArtsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithArtwork out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithArtwork(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetArtsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetArtsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetArtsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetArtsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetArtsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetArtsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithArtwork out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithArtwork(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAugmentationStatus.java b/src/main/java/dev/plexapi/sdk/operations/GetAugmentationStatus.java new file mode 100644 index 00000000..e1478962 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetAugmentationStatus.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetAugmentationStatusRequest; +import dev.plexapi.sdk.models.operations.GetAugmentationStatusResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetAugmentationStatus { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAugmentationStatus", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAugmentationStatus", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAugmentationStatus", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/augmentations/{augmentationId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetAugmentationStatusRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAugmentationStatusRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetAugmentationStatusRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "401", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetAugmentationStatusResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAugmentationStatusResponse.Builder resBuilder = + GetAugmentationStatusResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetAugmentationStatusResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "401", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetAugmentationStatusRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAugmentationStatusRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetAugmentationStatusRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "401", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetAugmentationStatusResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetAugmentationStatusResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetAugmentationStatusResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "401", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAvailableClients.java b/src/main/java/dev/plexapi/sdk/operations/GetAvailableClients.java deleted file mode 100644 index 0388605d..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetAvailableClients.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest; -import dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse; -import dev.plexapi.sdk.models.operations.GetAvailableClientsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetAvailableClients { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getAvailableClients", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getAvailableClients", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getAvailableClients", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/clients"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetAvailableClientsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetAvailableClientsResponse.Builder resBuilder = - GetAvailableClientsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetAvailableClientsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetAvailableClientsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetAvailableClientsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetAvailableClientsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetAvailableClientsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetAvailableClientsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetAvailableClientsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetAvailableClientsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetAvailableClientsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetAvailableClientsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAvailableGrabbers.java b/src/main/java/dev/plexapi/sdk/operations/GetAvailableGrabbers.java new file mode 100644 index 00000000..e091425c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetAvailableGrabbers.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersRequest; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersResponse; +import dev.plexapi.sdk.models.operations.GetAvailableGrabbersResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetAvailableGrabbers { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAvailableGrabbers", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAvailableGrabbers", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAvailableGrabbers", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/grabbers"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetAvailableGrabbersRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAvailableGrabbersRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetAvailableGrabbersRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetAvailableGrabbersResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAvailableGrabbersResponse.Builder resBuilder = + GetAvailableGrabbersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetAvailableGrabbersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetAvailableGrabbersResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetAvailableGrabbersRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAvailableGrabbersRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetAvailableGrabbersRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetAvailableGrabbersResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetAvailableGrabbersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetAvailableGrabbersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetAvailableGrabbersResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetAvailableSorts.java b/src/main/java/dev/plexapi/sdk/operations/GetAvailableSorts.java new file mode 100644 index 00000000..fd137bb9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetAvailableSorts.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetAvailableSortsRequest; +import dev.plexapi.sdk.models.operations.GetAvailableSortsResponse; +import dev.plexapi.sdk.models.operations.GetAvailableSortsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetAvailableSorts { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAvailableSorts", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAvailableSorts", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getAvailableSorts", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/sorts", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetAvailableSortsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAvailableSortsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetAvailableSortsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetAvailableSortsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAvailableSortsResponse.Builder resBuilder = + GetAvailableSortsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetAvailableSortsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetAvailableSortsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetAvailableSortsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetAvailableSortsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetAvailableSortsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetAvailableSortsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetAvailableSortsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetAvailableSortsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetAvailableSortsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetBackgroundTasks.java b/src/main/java/dev/plexapi/sdk/operations/GetBackgroundTasks.java new file mode 100644 index 00000000..d70a354d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetBackgroundTasks.java @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetBackgroundTasksResponse; +import dev.plexapi.sdk.models.operations.GetBackgroundTasksResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetBackgroundTasks { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getBackgroundTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getBackgroundTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getBackgroundTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/status/sessions/background"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetBackgroundTasksResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetBackgroundTasksResponse.Builder resBuilder = + GetBackgroundTasksResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetBackgroundTasksResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetBackgroundTasksResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetBackgroundTasksResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetBackgroundTasksResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetBackgroundTasksResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetBackgroundTasksResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetBandwidthStatistics.java b/src/main/java/dev/plexapi/sdk/operations/GetBandwidthStatistics.java deleted file mode 100644 index c12151b4..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetBandwidthStatistics.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest; -import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsRequest; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponse; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetBandwidthStatistics { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getBandwidthStatistics", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getBandwidthStatistics", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getBandwidthStatistics", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/statistics/bandwidth"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetBandwidthStatisticsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetBandwidthStatisticsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetBandwidthStatisticsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetBandwidthStatisticsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetBandwidthStatisticsResponse.Builder resBuilder = - GetBandwidthStatisticsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetBandwidthStatisticsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetBandwidthStatisticsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetBandwidthStatisticsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetBandwidthStatisticsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetBandwidthStatisticsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetBandwidthStatisticsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetBandwidthStatisticsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetBandwidthStatisticsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetBandwidthStatisticsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetBandwidthStatisticsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetBandwidthStatisticsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetBandwidthStatisticsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetBandwidthStatisticsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetBannerImage.java b/src/main/java/dev/plexapi/sdk/operations/GetBannerImage.java deleted file mode 100644 index 42d7446c..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetBannerImage.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetBannerImageBadRequest; -import dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetBannerImageRequest; -import dev.plexapi.sdk.models.operations.GetBannerImageResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetBannerImage { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-banner-image", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-banner-image", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-banner-image", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/metadata/{ratingKey}/banner", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "image/jpeg") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetBannerImageRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetBannerImageRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetBannerImageRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetBannerImageResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetBannerImageResponse.Builder resBuilder = - GetBannerImageResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { - resBuilder.responseStream(response.body()); - } - - GetBannerImageResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - res.withHeaders(response.headers().map()); - if (Utils.contentTypeMatches(contentType, "image/jpeg")) { - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetBannerImageBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetBannerImageUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetBannerImageRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetBannerImageRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetBannerImageRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetBannerImageResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetBannerImageResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { - resBuilder.responseStream(response.body()); - } - - dev.plexapi.sdk.models.operations.async.GetBannerImageResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - res.withHeaders(response.headers().map()); - if (Utils.contentTypeMatches(contentType, "image/jpeg")) { - return CompletableFuture.completedFuture(res); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetBannerImageBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetBannerImageUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetButlerTasks.java b/src/main/java/dev/plexapi/sdk/operations/GetButlerTasks.java deleted file mode 100644 index cb3d9d5c..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetButlerTasks.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetButlerTasksBadRequest; -import dev.plexapi.sdk.models.errors.GetButlerTasksUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetButlerTasksResponse; -import dev.plexapi.sdk.models.operations.GetButlerTasksResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetButlerTasks { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getButlerTasks", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getButlerTasks", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getButlerTasks", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/butler"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetButlerTasksResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetButlerTasksResponse.Builder resBuilder = - GetButlerTasksResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetButlerTasksResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetButlerTasksResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetButlerTasksBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetButlerTasksUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetButlerTasksResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetButlerTasksResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetButlerTasksResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetButlerTasksResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetButlerTasksBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetButlerTasksUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCategories.java b/src/main/java/dev/plexapi/sdk/operations/GetCategories.java new file mode 100644 index 00000000..e5ef5136 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetCategories.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetCategoriesRequest; +import dev.plexapi.sdk.models.operations.GetCategoriesResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetCategories { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCategories", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCategories", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCategories", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/categories", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetCategoriesRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCategoriesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetCategoriesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetCategoriesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetCategoriesResponse.Builder resBuilder = + GetCategoriesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetCategoriesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithArtwork out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithArtwork(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetCategoriesRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCategoriesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetCategoriesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetCategoriesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetCategoriesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetCategoriesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithArtwork out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithArtwork(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetChannels.java b/src/main/java/dev/plexapi/sdk/operations/GetChannels.java new file mode 100644 index 00000000..c30cc2c6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetChannels.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetChannelsRequest; +import dev.plexapi.sdk.models.operations.GetChannelsResponse; +import dev.plexapi.sdk.models.operations.GetChannelsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetChannels { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getChannels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getChannels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getChannels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/livetv/epg/channels"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetChannelsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetChannelsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetChannelsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetChannelsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetChannelsResponse.Builder resBuilder = + GetChannelsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetChannelsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetChannelsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetChannelsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetChannelsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetChannelsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetChannelsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetChannelsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetChannelsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetChannelsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetChapterImage.java b/src/main/java/dev/plexapi/sdk/operations/GetChapterImage.java new file mode 100644 index 00000000..82369ba6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetChapterImage.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetChapterImageRequest; +import dev.plexapi.sdk.models.operations.GetChapterImageResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetChapterImage { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getChapterImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getChapterImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getChapterImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/media/{mediaId}/chapterImages/{chapter}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "image/jpeg") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetChapterImageRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetChapterImageRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetChapterImageRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetChapterImageResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetChapterImageResponse.Builder resBuilder = + GetChapterImageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.responseStream(response.body()); + } + + GetChapterImageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetChapterImageRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetChapterImageRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetChapterImageRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetChapterImageResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetChapterImageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.responseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.GetChapterImageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCluster.java b/src/main/java/dev/plexapi/sdk/operations/GetCluster.java new file mode 100644 index 00000000..2afd5575 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetCluster.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetClusterRequest; +import dev.plexapi.sdk.models.operations.GetClusterResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetCluster { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCluster", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCluster", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCluster", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/cluster", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetClusterRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetClusterRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetClusterRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetClusterResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetClusterResponse.Builder resBuilder = + GetClusterResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetClusterResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithArtwork out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithArtwork(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetClusterRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetClusterRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetClusterRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetClusterResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetClusterResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetClusterResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithArtwork out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithArtwork(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCollectionImage.java b/src/main/java/dev/plexapi/sdk/operations/GetCollectionImage.java new file mode 100644 index 00000000..4ed4f20d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetCollectionImage.java @@ -0,0 +1,272 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetCollectionImageRequest; +import dev.plexapi.sdk.models.operations.GetCollectionImageResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetCollectionImage { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCollectionImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCollectionImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCollectionImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/collections/{collectionId}/composite/{updatedAt}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "image/jpeg") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetCollectionImageRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCollectionImageRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetCollectionImageRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetCollectionImageResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetCollectionImageResponse.Builder resBuilder = + GetCollectionImageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.responseStream(response.body()); + } + + GetCollectionImageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetCollectionImageRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCollectionImageRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetCollectionImageRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetCollectionImageResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetCollectionImageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.responseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.GetCollectionImageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCollectionItems.java b/src/main/java/dev/plexapi/sdk/operations/GetCollectionItems.java new file mode 100644 index 00000000..23e40879 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetCollectionItems.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetCollectionItemsRequest; +import dev.plexapi.sdk.models.operations.GetCollectionItemsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetCollectionItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCollectionItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCollectionItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCollectionItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/collections/{collectionId}/items", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetCollectionItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCollectionItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetCollectionItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetCollectionItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetCollectionItemsResponse.Builder resBuilder = + GetCollectionItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetCollectionItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetCollectionItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCollectionItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetCollectionItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetCollectionItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetCollectionItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetCollectionItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCollections.java b/src/main/java/dev/plexapi/sdk/operations/GetCollections.java new file mode 100644 index 00000000..0217002f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetCollections.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetCollectionsRequest; +import dev.plexapi.sdk.models.operations.GetCollectionsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetCollections { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCollections", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCollections", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCollections", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/collections", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetCollectionsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCollectionsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetCollectionsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetCollectionsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetCollectionsResponse.Builder resBuilder = + GetCollectionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetCollectionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetCollectionsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCollectionsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetCollectionsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetCollectionsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetCollectionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetCollectionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetColors.java b/src/main/java/dev/plexapi/sdk/operations/GetColors.java new file mode 100644 index 00000000..5bce1d78 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetColors.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetColorsRequest; +import dev.plexapi.sdk.models.operations.GetColorsResponse; +import dev.plexapi.sdk.models.operations.GetColorsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetColors { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getColors", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getColors", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getColors", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/services/ultrablur/colors"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetColorsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetColorsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetColorsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "500", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetColorsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetColorsResponse.Builder resBuilder = + GetColorsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetColorsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetColorsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetColorsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetColorsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetColorsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "500", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetColorsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetColorsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetColorsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetColorsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCommon.java b/src/main/java/dev/plexapi/sdk/operations/GetCommon.java new file mode 100644 index 00000000..ed2780af --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetCommon.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetCommonRequest; +import dev.plexapi.sdk.models.operations.GetCommonResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetCommon { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCommon", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCommon", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCommon", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/common", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetCommonRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCommonRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetCommonRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetCommonResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetCommonResponse.Builder resBuilder = + GetCommonResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetCommonResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetCommonRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCommonRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetCommonRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetCommonResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetCommonResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetCommonResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCompanionsData.java b/src/main/java/dev/plexapi/sdk/operations/GetCompanionsData.java deleted file mode 100644 index fd6bedb2..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetCompanionsData.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest; -import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse; -import dev.plexapi.sdk.models.operations.ResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetCompanionsData { - - /** - * GET_COMPANIONS_DATA_SERVERS contains the list of server urls available to the SDK. - */ - public static final String[] GET_COMPANIONS_DATA_SERVERS = { - "https://plex.tv/api/v2", - }; - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration, Optional serverURL) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = serverURL - .filter(u -> !u.isBlank()) - .orElse(Utils.templateUrl( - GET_COMPANIONS_DATA_SERVERS[0], - Map.of())); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getCompanionsData", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getCompanionsData", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getCompanionsData", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/companions"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetCompanionsDataResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetCompanionsDataResponse.Builder resBuilder = - GetCompanionsDataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetCompanionsDataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - List out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withResponseBodies(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetCompanionsDataBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetCompanionsDataUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetCompanionsDataResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetCompanionsDataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetCompanionsDataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - List out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withResponseBodies(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetCompanionsDataBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetCompanionsDataUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetContinueWatching.java b/src/main/java/dev/plexapi/sdk/operations/GetContinueWatching.java new file mode 100644 index 00000000..6e5b7b93 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetContinueWatching.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetContinueWatchingRequest; +import dev.plexapi.sdk.models.operations.GetContinueWatchingResponse; +import dev.plexapi.sdk.models.operations.GetContinueWatchingResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetContinueWatching { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getContinueWatching", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getContinueWatching", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getContinueWatching", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/hubs/continueWatching"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetContinueWatchingRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetContinueWatchingRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetContinueWatchingRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetContinueWatchingResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetContinueWatchingResponse.Builder resBuilder = + GetContinueWatchingResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetContinueWatchingResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetContinueWatchingResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetContinueWatchingRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetContinueWatchingRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetContinueWatchingRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetContinueWatchingResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetContinueWatchingResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetContinueWatchingResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetContinueWatchingResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCountries.java b/src/main/java/dev/plexapi/sdk/operations/GetCountries.java new file mode 100644 index 00000000..9ec6a8fe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetCountries.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetCountriesResponse; +import dev.plexapi.sdk.models.operations.GetCountriesResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetCountries { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCountries", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCountries", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCountries", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/livetv/epg/countries"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetCountriesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetCountriesResponse.Builder resBuilder = + GetCountriesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetCountriesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetCountriesResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetCountriesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetCountriesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetCountriesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetCountriesResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCountriesLibrary.java b/src/main/java/dev/plexapi/sdk/operations/GetCountriesLibrary.java deleted file mode 100644 index 60790a42..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetCountriesLibrary.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetCountriesLibraryBadRequest; -import dev.plexapi.sdk.models.errors.GetCountriesLibraryUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryRequest; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryResponse; -import dev.plexapi.sdk.models.operations.GetCountriesLibraryResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetCountriesLibrary { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-countries-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-countries-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-countries-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/sections/{sectionKey}/country", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetCountriesLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetCountriesLibraryRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetCountriesLibraryRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "404", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetCountriesLibraryResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetCountriesLibraryResponse.Builder resBuilder = - GetCountriesLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetCountriesLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetCountriesLibraryResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetCountriesLibraryBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetCountriesLibraryUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetCountriesLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetCountriesLibraryRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetCountriesLibraryRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "404", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetCountriesLibraryResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetCountriesLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetCountriesLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetCountriesLibraryResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetCountriesLibraryBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetCountriesLibraryUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCountriesLineups.java b/src/main/java/dev/plexapi/sdk/operations/GetCountriesLineups.java new file mode 100644 index 00000000..e3b7f600 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetCountriesLineups.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetCountriesLineupsRequest; +import dev.plexapi.sdk.models.operations.GetCountriesLineupsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithLineup; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetCountriesLineups { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCountriesLineups", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCountriesLineups", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCountriesLineups", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/epg/countries/{country}/{epgId}/lineups", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetCountriesLineupsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCountriesLineupsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetCountriesLineupsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetCountriesLineupsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetCountriesLineupsResponse.Builder resBuilder = + GetCountriesLineupsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetCountriesLineupsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithLineup out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithLineup(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetCountriesLineupsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCountriesLineupsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetCountriesLineupsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetCountriesLineupsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetCountriesLineupsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetCountriesLineupsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithLineup out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithLineup(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetCountryRegions.java b/src/main/java/dev/plexapi/sdk/operations/GetCountryRegions.java new file mode 100644 index 00000000..f8bd7b07 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetCountryRegions.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetCountryRegionsRequest; +import dev.plexapi.sdk.models.operations.GetCountryRegionsResponse; +import dev.plexapi.sdk.models.operations.GetCountryRegionsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetCountryRegions { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCountryRegions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCountryRegions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getCountryRegions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/epg/countries/{country}/{epgId}/regions", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetCountryRegionsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCountryRegionsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetCountryRegionsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetCountryRegionsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetCountryRegionsResponse.Builder resBuilder = + GetCountryRegionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetCountryRegionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetCountryRegionsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetCountryRegionsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetCountryRegionsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetCountryRegionsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetCountryRegionsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetCountryRegionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetCountryRegionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetCountryRegionsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetDVR.java b/src/main/java/dev/plexapi/sdk/operations/GetDVR.java new file mode 100644 index 00000000..1ca8cb4f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetDVR.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetDVRRequest; +import dev.plexapi.sdk.models.operations.GetDVRResponse; +import dev.plexapi.sdk.models.operations.GetDVRResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetDVR { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/dvrs/{dvrId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetDVRRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDVRRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetDVRRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetDVRResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetDVRResponse.Builder resBuilder = + GetDVRResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetDVRResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetDVRResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetDVRRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDVRRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetDVRRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetDVRResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetDVRResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetDVRResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetDVRResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetDeviceDetails.java b/src/main/java/dev/plexapi/sdk/operations/GetDeviceDetails.java new file mode 100644 index 00000000..db6b2e78 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetDeviceDetails.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetDeviceDetailsRequest; +import dev.plexapi.sdk.models.operations.GetDeviceDetailsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetDeviceDetails { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDeviceDetails", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDeviceDetails", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDeviceDetails", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/grabbers/devices/{deviceId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetDeviceDetailsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDeviceDetailsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetDeviceDetailsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetDeviceDetailsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetDeviceDetailsResponse.Builder resBuilder = + GetDeviceDetailsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetDeviceDetailsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithDevice out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetDeviceDetailsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDeviceDetailsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetDeviceDetailsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetDeviceDetailsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetDeviceDetailsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetDeviceDetailsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithDevice out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetDevices.java b/src/main/java/dev/plexapi/sdk/operations/GetDevices.java deleted file mode 100644 index a6e68ec4..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetDevices.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetDevicesBadRequest; -import dev.plexapi.sdk.models.errors.GetDevicesUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetDevicesResponse; -import dev.plexapi.sdk.models.operations.GetDevicesResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetDevices { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getDevices", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getDevices", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getDevices", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/devices"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetDevicesResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetDevicesResponse.Builder resBuilder = - GetDevicesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetDevicesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetDevicesResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetDevicesBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetDevicesUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetDevicesResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetDevicesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetDevicesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetDevicesResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetDevicesBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetDevicesUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetDevicesChannels.java b/src/main/java/dev/plexapi/sdk/operations/GetDevicesChannels.java new file mode 100644 index 00000000..d7b7d633 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetDevicesChannels.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsRequest; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsResponse; +import dev.plexapi.sdk.models.operations.GetDevicesChannelsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetDevicesChannels { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDevicesChannels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDevicesChannels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDevicesChannels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/grabbers/devices/{deviceId}/channels", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetDevicesChannelsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDevicesChannelsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetDevicesChannelsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetDevicesChannelsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetDevicesChannelsResponse.Builder resBuilder = + GetDevicesChannelsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetDevicesChannelsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetDevicesChannelsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetDevicesChannelsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDevicesChannelsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetDevicesChannelsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetDevicesChannelsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetDevicesChannelsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetDevicesChannelsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetDevicesChannelsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetDownloadQueue.java b/src/main/java/dev/plexapi/sdk/operations/GetDownloadQueue.java new file mode 100644 index 00000000..3ff01023 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetDownloadQueue.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetDownloadQueueRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueResponse; +import dev.plexapi.sdk.models.operations.GetDownloadQueueResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetDownloadQueue { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDownloadQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDownloadQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDownloadQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/downloadQueue/{queueId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetDownloadQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDownloadQueueRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetDownloadQueueRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetDownloadQueueResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetDownloadQueueResponse.Builder resBuilder = + GetDownloadQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetDownloadQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetDownloadQueueResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetDownloadQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDownloadQueueRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetDownloadQueueRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetDownloadQueueResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetDownloadQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetDownloadQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetDownloadQueueResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetDownloadQueueItems.java b/src/main/java/dev/plexapi/sdk/operations/GetDownloadQueueItems.java new file mode 100644 index 00000000..b0993cb8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetDownloadQueueItems.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetDownloadQueueItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/downloadQueue/{queueId}/items/{itemId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetDownloadQueueItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDownloadQueueItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetDownloadQueueItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetDownloadQueueItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetDownloadQueueItemsResponse.Builder resBuilder = + GetDownloadQueueItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetDownloadQueueItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetDownloadQueueItemsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetDownloadQueueItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDownloadQueueItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetDownloadQueueItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetDownloadQueueItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetDownloadQueueItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetDownloadQueueItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetDownloadQueueItemsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetDownloadQueueMedia.java b/src/main/java/dev/plexapi/sdk/operations/GetDownloadQueueMedia.java new file mode 100644 index 00000000..a5c037cb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetDownloadQueueMedia.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaRequest; +import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetDownloadQueueMedia { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDownloadQueueMedia", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDownloadQueueMedia", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDownloadQueueMedia", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/downloadQueue/{queueId}/item/{itemId}/media", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetDownloadQueueMediaRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDownloadQueueMediaRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetDownloadQueueMediaRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "503", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetDownloadQueueMediaResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetDownloadQueueMediaResponse.Builder resBuilder = + GetDownloadQueueMediaResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetDownloadQueueMediaResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetDownloadQueueMediaRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDownloadQueueMediaRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetDownloadQueueMediaRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetDownloadQueueMediaResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetDownloadQueueMediaResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetDownloadQueueMediaResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetExtras.java b/src/main/java/dev/plexapi/sdk/operations/GetExtras.java new file mode 100644 index 00000000..807f7a7d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetExtras.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetExtrasRequest; +import dev.plexapi.sdk.models.operations.GetExtrasResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetExtras { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getExtras", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getExtras", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getExtras", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/extras", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetExtrasRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetExtrasRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetExtrasRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetExtrasResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetExtrasResponse.Builder resBuilder = + GetExtrasResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetExtrasResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetExtrasRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetExtrasRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetExtrasRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetExtrasResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetExtrasResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetExtrasResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetFile.java b/src/main/java/dev/plexapi/sdk/operations/GetFile.java new file mode 100644 index 00000000..d497b79f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetFile.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetFileRequest; +import dev.plexapi.sdk.models.operations.GetFileResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetFile { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getFile", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getFile", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getFile", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/file", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "audio/mpeg3;q=1, image/jpeg;q=0") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetFileRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetFileRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetFileRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetFileResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetFileResponse.Builder resBuilder = + GetFileResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "audio/mpeg3")) { + resBuilder.twoHundredAudioMpeg3ResponseStream(response.body()); + } + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.twoHundredImageJpegResponseStream(response.body()); + } + + GetFileResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "audio/mpeg3")) { + return res; + } else if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetFileRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetFileRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetFileRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetFileResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetFileResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "audio/mpeg3")) { + resBuilder.twoHundredAudioMpeg3ResponseStream(response.body()); + } + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.twoHundredImageJpegResponseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.GetFileResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "audio/mpeg3")) { + return CompletableFuture.completedFuture(res); + } else if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetFileHash.java b/src/main/java/dev/plexapi/sdk/operations/GetFileHash.java deleted file mode 100644 index 79ff564e..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetFileHash.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetFileHashBadRequest; -import dev.plexapi.sdk.models.errors.GetFileHashUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetFileHashRequest; -import dev.plexapi.sdk.models.operations.GetFileHashResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetFileHash { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getFileHash", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getFileHash", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getFileHash", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/library/hashes"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetFileHashRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetFileHashRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetFileHashRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetFileHashResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetFileHashResponse.Builder resBuilder = - GetFileHashResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetFileHashResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetFileHashBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetFileHashUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetFileHashRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetFileHashRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetFileHashRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetFileHashResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetFileHashResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetFileHashResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetFileHashBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetFileHashUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetFirstCharacters.java b/src/main/java/dev/plexapi/sdk/operations/GetFirstCharacters.java new file mode 100644 index 00000000..aec094e2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetFirstCharacters.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetFirstCharactersRequest; +import dev.plexapi.sdk.models.operations.GetFirstCharactersResponse; +import dev.plexapi.sdk.models.operations.GetFirstCharactersResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetFirstCharacters { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getFirstCharacters", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getFirstCharacters", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getFirstCharacters", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/firstCharacters", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetFirstCharactersRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetFirstCharactersRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetFirstCharactersRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetFirstCharactersResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetFirstCharactersResponse.Builder resBuilder = + GetFirstCharactersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetFirstCharactersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetFirstCharactersResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetFirstCharactersRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetFirstCharactersRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetFirstCharactersRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetFirstCharactersResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetFirstCharactersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetFirstCharactersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetFirstCharactersResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetFolders.java b/src/main/java/dev/plexapi/sdk/operations/GetFolders.java new file mode 100644 index 00000000..928baa0f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetFolders.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetFoldersRequest; +import dev.plexapi.sdk.models.operations.GetFoldersResponse; +import dev.plexapi.sdk.models.operations.GetFoldersResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetFolders { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getFolders", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getFolders", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getFolders", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/location", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetFoldersRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetFoldersRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetFoldersRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetFoldersResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetFoldersResponse.Builder resBuilder = + GetFoldersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetFoldersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetFoldersResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetFoldersRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetFoldersRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetFoldersRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetFoldersResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetFoldersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetFoldersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetFoldersResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetGenresLibrary.java b/src/main/java/dev/plexapi/sdk/operations/GetGenresLibrary.java deleted file mode 100644 index f10def1c..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetGenresLibrary.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetGenresLibraryBadRequest; -import dev.plexapi.sdk.models.errors.GetGenresLibraryUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetGenresLibraryRequest; -import dev.plexapi.sdk.models.operations.GetGenresLibraryResponse; -import dev.plexapi.sdk.models.operations.GetGenresLibraryResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetGenresLibrary { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-genres-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-genres-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-genres-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/sections/{sectionKey}/genre", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetGenresLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetGenresLibraryRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetGenresLibraryRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "404", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetGenresLibraryResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetGenresLibraryResponse.Builder resBuilder = - GetGenresLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetGenresLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetGenresLibraryResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetGenresLibraryBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetGenresLibraryUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetGenresLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetGenresLibraryRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetGenresLibraryRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "404", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetGenresLibraryResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetGenresLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetGenresLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetGenresLibraryResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetGenresLibraryBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetGenresLibraryUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetGeoData.java b/src/main/java/dev/plexapi/sdk/operations/GetGeoData.java deleted file mode 100644 index be99841a..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetGeoData.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetGeoDataBadRequest; -import dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetGeoDataGeoData; -import dev.plexapi.sdk.models.operations.GetGeoDataResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetGeoData { - - /** - * GET_GEO_DATA_SERVERS contains the list of server urls available to the SDK. - */ - public static final String[] GET_GEO_DATA_SERVERS = { - "https://plex.tv/api/v2", - }; - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration, Optional serverURL) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = serverURL - .filter(u -> !u.isBlank()) - .orElse(Utils.templateUrl( - GET_GEO_DATA_SERVERS[0], - Map.of())); - this.securitySource = null; - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getGeoData", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getGeoData", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getGeoData", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/geoip"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetGeoDataResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetGeoDataResponse.Builder resBuilder = - GetGeoDataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetGeoDataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetGeoDataGeoData out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withGeoData(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetGeoDataBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetGeoDataUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetGeoDataResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetGeoDataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetGeoDataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetGeoDataGeoData out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withGeoData(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetGeoDataBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetGeoDataUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetGlobalHubs.java b/src/main/java/dev/plexapi/sdk/operations/GetGlobalHubs.java deleted file mode 100644 index 42ef4770..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetGlobalHubs.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest; -import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetGlobalHubsRequest; -import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse; -import dev.plexapi.sdk.models.operations.GetGlobalHubsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetGlobalHubs { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getGlobalHubs", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getGlobalHubs", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getGlobalHubs", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/hubs"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetGlobalHubsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetGlobalHubsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetGlobalHubsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetGlobalHubsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetGlobalHubsResponse.Builder resBuilder = - GetGlobalHubsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetGlobalHubsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetGlobalHubsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetGlobalHubsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetGlobalHubsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetGlobalHubsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetGlobalHubsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetGlobalHubsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetGlobalHubsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetGlobalHubsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetGlobalHubsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetGlobalHubsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetGlobalHubsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetGlobalHubsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetHistoryItem.java b/src/main/java/dev/plexapi/sdk/operations/GetHistoryItem.java new file mode 100644 index 00000000..4eb5c9c5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetHistoryItem.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetHistoryItemRequest; +import dev.plexapi.sdk.models.operations.GetHistoryItemResponse; +import dev.plexapi.sdk.models.shared.HistoryAllGetResponses200; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetHistoryItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getHistoryItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getHistoryItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getHistoryItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/status/sessions/history/{historyId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetHistoryItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetHistoryItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetHistoryItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetHistoryItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetHistoryItemResponse.Builder resBuilder = + GetHistoryItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetHistoryItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + HistoryAllGetResponses200 out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withHistoryAllGetResponses200(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetHistoryItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetHistoryItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetHistoryItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetHistoryItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetHistoryItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetHistoryItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + HistoryAllGetResponses200 out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withHistoryAllGetResponses200(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetHomeData.java b/src/main/java/dev/plexapi/sdk/operations/GetHomeData.java deleted file mode 100644 index 93bdad78..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetHomeData.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetHomeDataBadRequest; -import dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetHomeDataResponse; -import dev.plexapi.sdk.models.operations.GetHomeDataResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetHomeData { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getHomeData", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getHomeData", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getHomeData", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/home"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetHomeDataResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetHomeDataResponse.Builder resBuilder = - GetHomeDataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetHomeDataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetHomeDataResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetHomeDataBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetHomeDataUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetHomeDataResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetHomeDataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetHomeDataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetHomeDataResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetHomeDataBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetHomeDataUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetHubItems.java b/src/main/java/dev/plexapi/sdk/operations/GetHubItems.java new file mode 100644 index 00000000..e2c271ff --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetHubItems.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetHubItemsRequest; +import dev.plexapi.sdk.models.operations.GetHubItemsResponse; +import dev.plexapi.sdk.models.operations.GetHubItemsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetHubItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getHubItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getHubItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getHubItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/hubs/items"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetHubItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetHubItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetHubItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetHubItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetHubItemsResponse.Builder resBuilder = + GetHubItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetHubItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetHubItemsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetHubItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetHubItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetHubItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetHubItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetHubItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetHubItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetHubItemsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetIdentity.java b/src/main/java/dev/plexapi/sdk/operations/GetIdentity.java new file mode 100644 index 00000000..b902e9ce --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetIdentity.java @@ -0,0 +1,275 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetIdentityResponse; +import dev.plexapi.sdk.models.operations.GetIdentityResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetIdentity { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = null; + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getIdentity", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getIdentity", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getIdentity", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/identity"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetIdentityResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetIdentityResponse.Builder resBuilder = + GetIdentityResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetIdentityResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetIdentityResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetIdentityResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetIdentityResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetIdentityResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetIdentityResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetImage.java b/src/main/java/dev/plexapi/sdk/operations/GetImage.java new file mode 100644 index 00000000..fbf8af60 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetImage.java @@ -0,0 +1,270 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetImageRequest; +import dev.plexapi.sdk.models.operations.GetImageResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetImage { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/services/ultrablur/image"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "image/png") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetImageRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetImageRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetImageRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetImageResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetImageResponse.Builder resBuilder = + GetImageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/png")) { + resBuilder.responseStream(response.body()); + } + + GetImageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "image/png")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetImageRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetImageRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetImageRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetImageResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetImageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/png")) { + resBuilder.responseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.GetImageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "image/png")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetImageFromBif.java b/src/main/java/dev/plexapi/sdk/operations/GetImageFromBif.java new file mode 100644 index 00000000..58063da8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetImageFromBif.java @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetImageFromBifRequest; +import dev.plexapi.sdk.models.operations.GetImageFromBifResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetImageFromBif { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getImageFromBif", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getImageFromBif", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getImageFromBif", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/parts/{partId}/indexes/{index}/{offset}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "image/jpeg") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetImageFromBifRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetImageFromBifRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetImageFromBifRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetImageFromBifResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetImageFromBifResponse.Builder resBuilder = + GetImageFromBifResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.responseStream(response.body()); + } + + GetImageFromBifResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetImageFromBifRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetImageFromBifRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetImageFromBifRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetImageFromBifResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetImageFromBifResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.responseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.GetImageFromBifResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetItemArtwork.java b/src/main/java/dev/plexapi/sdk/operations/GetItemArtwork.java new file mode 100644 index 00000000..cac4a833 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetItemArtwork.java @@ -0,0 +1,277 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetItemArtworkRequest; +import dev.plexapi.sdk.models.operations.GetItemArtworkResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetItemArtwork { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getItemArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getItemArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getItemArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/{element}/{timestamp}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "audio/mpeg3;q=1, image/jpeg;q=0") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetItemArtworkRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetItemArtworkRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetItemArtworkRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetItemArtworkResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetItemArtworkResponse.Builder resBuilder = + GetItemArtworkResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "audio/mpeg3")) { + resBuilder.twoHundredAudioMpeg3ResponseStream(response.body()); + } + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.twoHundredImageJpegResponseStream(response.body()); + } + + GetItemArtworkResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "audio/mpeg3")) { + return res; + } else if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetItemArtworkRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetItemArtworkRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetItemArtworkRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetItemArtworkResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetItemArtworkResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "audio/mpeg3")) { + resBuilder.twoHundredAudioMpeg3ResponseStream(response.body()); + } + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.twoHundredImageJpegResponseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.GetItemArtworkResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "audio/mpeg3")) { + return CompletableFuture.completedFuture(res); + } else if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetItemDecision.java b/src/main/java/dev/plexapi/sdk/operations/GetItemDecision.java new file mode 100644 index 00000000..0b05af34 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetItemDecision.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetItemDecisionRequest; +import dev.plexapi.sdk.models.operations.GetItemDecisionResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithDecision; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetItemDecision { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getItemDecision", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getItemDecision", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getItemDecision", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/downloadQueue/{queueId}/item/{itemId}/decision", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetItemDecisionRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetItemDecisionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetItemDecisionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetItemDecisionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetItemDecisionResponse.Builder resBuilder = + GetItemDecisionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetItemDecisionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithDecision out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithDecision(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetItemDecisionRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetItemDecisionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetItemDecisionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetItemDecisionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetItemDecisionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetItemDecisionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithDecision out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithDecision(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetItemTree.java b/src/main/java/dev/plexapi/sdk/operations/GetItemTree.java new file mode 100644 index 00000000..48a495aa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetItemTree.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetItemTreeRequest; +import dev.plexapi.sdk.models.operations.GetItemTreeResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithNestedMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetItemTree { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getItemTree", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getItemTree", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getItemTree", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/tree", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetItemTreeRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetItemTreeRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetItemTreeRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetItemTreeResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetItemTreeResponse.Builder resBuilder = + GetItemTreeResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetItemTreeResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithNestedMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithNestedMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetItemTreeRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetItemTreeRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetItemTreeRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetItemTreeResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetItemTreeResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetItemTreeResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithNestedMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithNestedMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetLibraryDetails.java b/src/main/java/dev/plexapi/sdk/operations/GetLibraryDetails.java index 870c7db1..90f78407 100644 --- a/src/main/java/dev/plexapi/sdk/operations/GetLibraryDetails.java +++ b/src/main/java/dev/plexapi/sdk/operations/GetLibraryDetails.java @@ -9,8 +9,6 @@ import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest; -import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized; import dev.plexapi.sdk.models.errors.SDKError; import dev.plexapi.sdk.models.operations.GetLibraryDetailsRequest; import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse; @@ -59,7 +57,7 @@ public class GetLibraryDetails { return new BeforeRequestContextImpl( this.sdkConfiguration, this.baseUrl, - "get-library-details", + "getLibraryDetails", java.util.Optional.of(java.util.List.of()), securitySource()); } @@ -68,7 +66,7 @@ public class GetLibraryDetails { return new AfterSuccessContextImpl( this.sdkConfiguration, this.baseUrl, - "get-library-details", + "getLibraryDetails", java.util.Optional.of(java.util.List.of()), securitySource()); } @@ -77,7 +75,7 @@ public class GetLibraryDetails { return new AfterErrorContextImpl( this.sdkConfiguration, this.baseUrl, - "get-library-details", + "getLibraryDetails", java.util.Optional.of(java.util.List.of()), securitySource()); } @@ -85,8 +83,8 @@ public class GetLibraryDetails { String url = Utils.generateURL( klass, this.baseUrl, - "/library/sections/{sectionKey}", - request, null); + "/library/sections/{sectionId}", + request, this.sdkConfiguration.globals); HTTPRequest req = new HTTPRequest(url, "GET"); req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); @@ -94,7 +92,8 @@ public class GetLibraryDetails { req.addQueryParams(Utils.getQueryParams( klass, request, - null)); + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -129,7 +128,7 @@ public class GetLibraryDetails { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -174,42 +173,6 @@ public class GetLibraryDetails { } } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibraryDetailsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibraryDetailsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { // no content throw new SDKError( @@ -262,7 +225,7 @@ public class GetLibraryDetails { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -306,46 +269,6 @@ public class GetLibraryDetails { } } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetLibraryDetailsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetLibraryDetailsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); diff --git a/src/main/java/dev/plexapi/sdk/operations/GetLibraryHubs.java b/src/main/java/dev/plexapi/sdk/operations/GetLibraryHubs.java deleted file mode 100644 index 18d87e33..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetLibraryHubs.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest; -import dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetLibraryHubsRequest; -import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse; -import dev.plexapi.sdk.models.operations.GetLibraryHubsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetLibraryHubs { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getLibraryHubs", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getLibraryHubs", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getLibraryHubs", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/hubs/sections/{sectionId}", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetLibraryHubsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetLibraryHubsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetLibraryHubsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetLibraryHubsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetLibraryHubsResponse.Builder resBuilder = - GetLibraryHubsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetLibraryHubsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibraryHubsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibraryHubsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibraryHubsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetLibraryHubsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetLibraryHubsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetLibraryHubsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetLibraryHubsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetLibraryHubsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetLibraryHubsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetLibraryHubsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetLibraryHubsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetLibraryHubsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetLibraryItems.java b/src/main/java/dev/plexapi/sdk/operations/GetLibraryItems.java index d4e52829..5fc53d6d 100644 --- a/src/main/java/dev/plexapi/sdk/operations/GetLibraryItems.java +++ b/src/main/java/dev/plexapi/sdk/operations/GetLibraryItems.java @@ -9,12 +9,10 @@ import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest; -import dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized; import dev.plexapi.sdk.models.errors.SDKError; import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest; import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse; -import dev.plexapi.sdk.models.operations.GetLibraryItemsResponseBody; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Exceptions; import dev.plexapi.sdk.utils.HTTPClient; @@ -59,7 +57,7 @@ public class GetLibraryItems { return new BeforeRequestContextImpl( this.sdkConfiguration, this.baseUrl, - "get-library-items", + "getLibraryItems", java.util.Optional.of(java.util.List.of()), securitySource()); } @@ -68,7 +66,7 @@ public class GetLibraryItems { return new AfterSuccessContextImpl( this.sdkConfiguration, this.baseUrl, - "get-library-items", + "getLibraryItems", java.util.Optional.of(java.util.List.of()), securitySource()); } @@ -77,16 +75,14 @@ public class GetLibraryItems { return new AfterErrorContextImpl( this.sdkConfiguration, this.baseUrl, - "get-library-items", + "getLibraryItems", java.util.Optional.of(java.util.List.of()), securitySource()); } HttpRequest buildRequest(T request, Class klass) throws Exception { String url = Utils.generateURL( - klass, this.baseUrl, - "/library/sections/{sectionKey}/{tag}", - request, null); + "/library/all"); HTTPRequest req = new HTTPRequest(url, "GET"); req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); @@ -94,7 +90,8 @@ public class GetLibraryItems { req.addQueryParams(Utils.getQueryParams( klass, request, - null)); + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -129,7 +126,7 @@ public class GetLibraryItems { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -158,12 +155,13 @@ public class GetLibraryItems { GetLibraryItemsResponse res = resBuilder.build(); if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibraryItemsResponseBody out = Utils.mapper().readValue( + MediaContainerWithMetadata out = Utils.mapper().readValue( response.body(), new TypeReference<>() { }); - res.withObject(out); + res.withMediaContainerWithMetadata(out); return res; } else { throw new SDKError( @@ -174,42 +172,6 @@ public class GetLibraryItems { } } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibraryItemsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibraryItemsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { // no content throw new SDKError( @@ -262,7 +224,7 @@ public class GetLibraryItems { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -288,14 +250,15 @@ public class GetLibraryItems { dev.plexapi.sdk.models.operations.async.GetLibraryItemsResponse res = resBuilder.build(); if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); if (Utils.contentTypeMatches(contentType, "application/json")) { return response.body().toByteArray().thenApply(bodyBytes -> { try { - GetLibraryItemsResponseBody out = Utils.mapper().readValue( + MediaContainerWithMetadata out = Utils.mapper().readValue( bodyBytes, new TypeReference<>() { }); - res.withObject(out); + res.withMediaContainerWithMetadata(out); return res; } catch (Exception e) { throw new RuntimeException(e); @@ -306,46 +269,6 @@ public class GetLibraryItems { } } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetLibraryItemsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetLibraryItemsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); diff --git a/src/main/java/dev/plexapi/sdk/operations/GetLibraryMatches.java b/src/main/java/dev/plexapi/sdk/operations/GetLibraryMatches.java new file mode 100644 index 00000000..aa7d54d5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetLibraryMatches.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetLibraryMatchesRequest; +import dev.plexapi.sdk.models.operations.GetLibraryMatchesResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetLibraryMatches { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLibraryMatches", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLibraryMatches", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLibraryMatches", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/matches"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetLibraryMatchesRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetLibraryMatchesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetLibraryMatchesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetLibraryMatchesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetLibraryMatchesResponse.Builder resBuilder = + GetLibraryMatchesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetLibraryMatchesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetLibraryMatchesRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetLibraryMatchesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetLibraryMatchesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetLibraryMatchesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetLibraryMatchesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetLibraryMatchesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetLibrarySectionsAll.java b/src/main/java/dev/plexapi/sdk/operations/GetLibrarySectionsAll.java deleted file mode 100644 index 612ef136..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetLibrarySectionsAll.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetLibrarySectionsAllBadRequest; -import dev.plexapi.sdk.models.errors.GetLibrarySectionsAllUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetLibrarySectionsAllRequest; -import dev.plexapi.sdk.models.operations.GetLibrarySectionsAllResponse; -import dev.plexapi.sdk.models.operations.GetLibrarySectionsAllResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetLibrarySectionsAll { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-library-sections-all", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-library-sections-all", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-library-sections-all", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/sections/{sectionKey}/all", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetLibrarySectionsAllRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetLibrarySectionsAllRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetLibrarySectionsAllRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "404", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetLibrarySectionsAllResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetLibrarySectionsAllResponse.Builder resBuilder = - GetLibrarySectionsAllResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetLibrarySectionsAllResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibrarySectionsAllResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibrarySectionsAllBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetLibrarySectionsAllUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetLibrarySectionsAllRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetLibrarySectionsAllRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetLibrarySectionsAllRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "404", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetLibrarySectionsAllResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetLibrarySectionsAllResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetLibrarySectionsAllResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetLibrarySectionsAllResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetLibrarySectionsAllBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetLibrarySectionsAllUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetLineup.java b/src/main/java/dev/plexapi/sdk/operations/GetLineup.java new file mode 100644 index 00000000..25b9b759 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetLineup.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetLineupRequest; +import dev.plexapi.sdk.models.operations.GetLineupResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetLineup { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLineup", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLineup", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLineup", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/livetv/epg/lineup"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetLineupRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetLineupRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetLineupRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "500", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetLineupResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetLineupResponse.Builder resBuilder = + GetLineupResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetLineupResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetLineupRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetLineupRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetLineupRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "500", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetLineupResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetLineupResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetLineupResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetLineupChannels.java b/src/main/java/dev/plexapi/sdk/operations/GetLineupChannels.java new file mode 100644 index 00000000..aecd1a76 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetLineupChannels.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetLineupChannelsRequest; +import dev.plexapi.sdk.models.operations.GetLineupChannelsResponse; +import dev.plexapi.sdk.models.operations.GetLineupChannelsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetLineupChannels { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLineupChannels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLineupChannels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLineupChannels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/livetv/epg/lineupchannels"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetLineupChannelsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetLineupChannelsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetLineupChannelsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetLineupChannelsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetLineupChannelsResponse.Builder resBuilder = + GetLineupChannelsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetLineupChannelsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetLineupChannelsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetLineupChannelsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetLineupChannelsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetLineupChannelsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetLineupChannelsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetLineupChannelsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetLineupChannelsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetLineupChannelsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetLiveTVSession.java b/src/main/java/dev/plexapi/sdk/operations/GetLiveTVSession.java new file mode 100644 index 00000000..41d4adaf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetLiveTVSession.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetLiveTVSessionRequest; +import dev.plexapi.sdk.models.operations.GetLiveTVSessionResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetLiveTVSession { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLiveTVSession", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLiveTVSession", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getLiveTVSession", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/sessions/{sessionId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetLiveTVSessionRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetLiveTVSessionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetLiveTVSessionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetLiveTVSessionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetLiveTVSessionResponse.Builder resBuilder = + GetLiveTVSessionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetLiveTVSessionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetLiveTVSessionRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetLiveTVSessionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetLiveTVSessionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetLiveTVSessionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetLiveTVSessionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetLiveTVSessionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetMediaArts.java b/src/main/java/dev/plexapi/sdk/operations/GetMediaArts.java deleted file mode 100644 index 811ad433..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetMediaArts.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetMediaArtsRequest; -import dev.plexapi.sdk.models.operations.GetMediaArtsResponse; -import dev.plexapi.sdk.models.operations.GetMediaArtsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetMediaArts { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-arts", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-arts", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-arts", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/metadata/{ratingKey}/arts", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetMediaArtsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetMediaArtsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetMediaArtsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetMediaArtsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetMediaArtsResponse.Builder resBuilder = - GetMediaArtsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetMediaArtsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMediaArtsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetMediaArtsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetMediaArtsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetMediaArtsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetMediaArtsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetMediaArtsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetMediaArtsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetMediaArtsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetMediaMetaData.java b/src/main/java/dev/plexapi/sdk/operations/GetMediaMetaData.java deleted file mode 100644 index f75d0e39..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetMediaMetaData.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetMediaMetaDataBadRequest; -import dev.plexapi.sdk.models.errors.GetMediaMetaDataUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequest; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponse; -import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetMediaMetaData { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-meta-data", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-meta-data", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-meta-data", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/metadata/{ratingKey}", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetMediaMetaDataRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetMediaMetaDataRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetMediaMetaDataRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "404", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetMediaMetaDataResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetMediaMetaDataResponse.Builder resBuilder = - GetMediaMetaDataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetMediaMetaDataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMediaMetaDataResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMediaMetaDataBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMediaMetaDataUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetMediaMetaDataRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetMediaMetaDataRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetMediaMetaDataRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "404", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetMediaMetaDataResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetMediaMetaDataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetMediaMetaDataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetMediaMetaDataResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetMediaMetaDataBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetMediaMetaDataUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetMediaPart.java b/src/main/java/dev/plexapi/sdk/operations/GetMediaPart.java new file mode 100644 index 00000000..03f539ca --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetMediaPart.java @@ -0,0 +1,258 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetMediaPartRequest; +import dev.plexapi.sdk.models.operations.GetMediaPartResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetMediaPart { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getMediaPart", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getMediaPart", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getMediaPart", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/parts/{partId}/{changestamp}/{filename}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetMediaPartRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetMediaPartRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetMediaPartRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "404", "4XX", "503", "509", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetMediaPartResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetMediaPartResponse.Builder resBuilder = + GetMediaPartResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetMediaPartResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "503", "509", "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetMediaPartRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetMediaPartRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetMediaPartRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "404", "4XX", "503", "509", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetMediaPartResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetMediaPartResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetMediaPartResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "503", "509", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetMediaPosters.java b/src/main/java/dev/plexapi/sdk/operations/GetMediaPosters.java deleted file mode 100644 index cfd32a92..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetMediaPosters.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetMediaPostersRequest; -import dev.plexapi.sdk.models.operations.GetMediaPostersResponse; -import dev.plexapi.sdk.models.operations.GetMediaPostersResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetMediaPosters { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-posters", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-posters", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-posters", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/metadata/{ratingKey}/posters", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetMediaPostersRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetMediaPostersRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetMediaPostersRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetMediaPostersResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetMediaPostersResponse.Builder resBuilder = - GetMediaPostersResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetMediaPostersResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMediaPostersResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetMediaPostersRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetMediaPostersRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetMediaPostersRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetMediaPostersResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetMediaPostersResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetMediaPostersResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetMediaPostersResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetMediaProviders.java b/src/main/java/dev/plexapi/sdk/operations/GetMediaProviders.java deleted file mode 100644 index cff7955b..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetMediaProviders.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest; -import dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetMediaProvidersRequest; -import dev.plexapi.sdk.models.operations.GetMediaProvidersResponse; -import dev.plexapi.sdk.models.operations.GetMediaProvidersResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetMediaProviders { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-providers", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-providers", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-media-providers", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/media/providers"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetMediaProvidersRequest request) throws Exception { - HttpRequest req = buildRequest(request); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetMediaProvidersRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetMediaProvidersResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetMediaProvidersResponse.Builder resBuilder = - GetMediaProvidersResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetMediaProvidersResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMediaProvidersResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMediaProvidersBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMediaProvidersUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetMediaProvidersRequest request) throws Exception { - HttpRequest req = buildRequest(request); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetMediaProvidersRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetMediaProvidersResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetMediaProvidersResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetMediaProvidersResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetMediaProvidersResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetMediaProvidersBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetMediaProvidersUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetMetadataChildren.java b/src/main/java/dev/plexapi/sdk/operations/GetMetadataChildren.java deleted file mode 100644 index 57aacd6a..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetMetadataChildren.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest; -import dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequest; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetMetadataChildren { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getMetadataChildren", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getMetadataChildren", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getMetadataChildren", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/metadata/{ratingKey}/children", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetMetadataChildrenRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetMetadataChildrenRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetMetadataChildrenRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetMetadataChildrenResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetMetadataChildrenResponse.Builder resBuilder = - GetMetadataChildrenResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetMetadataChildrenResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMetadataChildrenResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMetadataChildrenBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMetadataChildrenUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetMetadataChildrenRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetMetadataChildrenRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetMetadataChildrenRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetMetadataChildrenResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetMetadataChildrenResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetMetadataChildrenResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetMetadataChildrenResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetMetadataChildrenBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetMetadataChildrenUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetMetadataHubs.java b/src/main/java/dev/plexapi/sdk/operations/GetMetadataHubs.java new file mode 100644 index 00000000..4d2920a2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetMetadataHubs.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetMetadataHubsRequest; +import dev.plexapi.sdk.models.operations.GetMetadataHubsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithHubs; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetMetadataHubs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getMetadataHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getMetadataHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getMetadataHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/hubs/metadata/{metadataId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetMetadataHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetMetadataHubsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetMetadataHubsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetMetadataHubsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetMetadataHubsResponse.Builder resBuilder = + GetMetadataHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetMetadataHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithHubs out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithHubs(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetMetadataHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetMetadataHubsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetMetadataHubsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetMetadataHubsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetMetadataHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetMetadataHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithHubs out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithHubs(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetMetadataItem.java b/src/main/java/dev/plexapi/sdk/operations/GetMetadataItem.java new file mode 100644 index 00000000..efc2334d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetMetadataItem.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetMetadataItemRequest; +import dev.plexapi.sdk.models.operations.GetMetadataItemResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetMetadataItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getMetadataItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getMetadataItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getMetadataItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetMetadataItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetMetadataItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetMetadataItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetMetadataItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetMetadataItemResponse.Builder resBuilder = + GetMetadataItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetMetadataItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetMetadataItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetMetadataItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetMetadataItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetMetadataItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetMetadataItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetMetadataItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetMyPlexAccount.java b/src/main/java/dev/plexapi/sdk/operations/GetMyPlexAccount.java deleted file mode 100644 index fb7b3e09..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetMyPlexAccount.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest; -import dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponse; -import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetMyPlexAccount { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getMyPlexAccount", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getMyPlexAccount", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getMyPlexAccount", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/myplex/account"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetMyPlexAccountResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetMyPlexAccountResponse.Builder resBuilder = - GetMyPlexAccountResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetMyPlexAccountResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMyPlexAccountResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMyPlexAccountBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetMyPlexAccountUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetMyPlexAccountResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetMyPlexAccountResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetMyPlexAccountResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetMyPlexAccountResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetMyPlexAccountBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetMyPlexAccountUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetNotifications.java b/src/main/java/dev/plexapi/sdk/operations/GetNotifications.java new file mode 100644 index 00000000..5280b238 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetNotifications.java @@ -0,0 +1,270 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetNotificationsRequest; +import dev.plexapi.sdk.models.operations.GetNotificationsResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetNotifications { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getNotifications", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getNotifications", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getNotifications", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/:/eventsource/notifications"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/octet-stream") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetNotificationsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetNotificationsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetNotificationsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetNotificationsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetNotificationsResponse.Builder resBuilder = + GetNotificationsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "application/octet-stream")) { + resBuilder.responseStream(response.body()); + } + + GetNotificationsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/octet-stream")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetNotificationsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetNotificationsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetNotificationsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetNotificationsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetNotificationsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "application/octet-stream")) { + resBuilder.responseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.GetNotificationsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/octet-stream")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPartIndex.java b/src/main/java/dev/plexapi/sdk/operations/GetPartIndex.java new file mode 100644 index 00000000..c9cbfdbc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetPartIndex.java @@ -0,0 +1,272 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPartIndexRequest; +import dev.plexapi.sdk.models.operations.GetPartIndexResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetPartIndex { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPartIndex", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPartIndex", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPartIndex", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/parts/{partId}/indexes/{index}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/octet-stream") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetPartIndexRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPartIndexRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetPartIndexRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetPartIndexResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetPartIndexResponse.Builder resBuilder = + GetPartIndexResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "application/octet-stream")) { + resBuilder.responseStream(response.body()); + } + + GetPartIndexResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/octet-stream")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetPartIndexRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPartIndexRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetPartIndexRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetPartIndexResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetPartIndexResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "application/octet-stream")) { + resBuilder.responseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.GetPartIndexResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/octet-stream")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPerson.java b/src/main/java/dev/plexapi/sdk/operations/GetPerson.java new file mode 100644 index 00000000..3df52832 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetPerson.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPersonRequest; +import dev.plexapi.sdk.models.operations.GetPersonResponse; +import dev.plexapi.sdk.models.operations.GetPersonResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetPerson { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPerson", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPerson", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPerson", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/people/{personId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetPersonRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPersonRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetPersonRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetPersonResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetPersonResponse.Builder resBuilder = + GetPersonResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetPersonResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetPersonResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetPersonRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPersonRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetPersonRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetPersonResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetPersonResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetPersonResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetPersonResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPin.java b/src/main/java/dev/plexapi/sdk/operations/GetPin.java deleted file mode 100644 index eab1f9e1..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetPin.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetPinBadRequest; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetPinAuthPinContainer; -import dev.plexapi.sdk.models.operations.GetPinRequest; -import dev.plexapi.sdk.models.operations.GetPinResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetPin { - - /** - * GET_PIN_SERVERS contains the list of server urls available to the SDK. - */ - public static final String[] GET_PIN_SERVERS = { - "https://plex.tv/api/v2", - }; - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration, Optional serverURL) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = serverURL - .filter(u -> !u.isBlank()) - .orElse(Utils.templateUrl( - GET_PIN_SERVERS[0], - Map.of())); - this.securitySource = null; - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getPin", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getPin", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getPin", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/pins"); - HTTPRequest req = new HTTPRequest(url, "POST"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private HttpRequest onBuildRequest(GetPinRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetPinRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetPinRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetPinResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetPinResponse.Builder resBuilder = - GetPinResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetPinResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "201")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPinAuthPinContainer out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withAuthPinContainer(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPinBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private CompletableFuture onBuildRequest(GetPinRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetPinRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetPinRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetPinResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetPinResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetPinResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "201")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetPinAuthPinContainer out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withAuthPinContainer(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetPinBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPlayQueue.java b/src/main/java/dev/plexapi/sdk/operations/GetPlayQueue.java new file mode 100644 index 00000000..a3848fdf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetPlayQueue.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPlayQueueRequest; +import dev.plexapi.sdk.models.operations.GetPlayQueueResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetPlayQueue { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playQueues/{playQueueId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetPlayQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPlayQueueRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetPlayQueueRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetPlayQueueResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetPlayQueueResponse.Builder resBuilder = + GetPlayQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetPlayQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetPlayQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPlayQueueRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetPlayQueueRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetPlayQueueResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetPlayQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetPlayQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPlaylist.java b/src/main/java/dev/plexapi/sdk/operations/GetPlaylist.java index 63aa5cb3..62e70443 100644 --- a/src/main/java/dev/plexapi/sdk/operations/GetPlaylist.java +++ b/src/main/java/dev/plexapi/sdk/operations/GetPlaylist.java @@ -9,12 +9,10 @@ import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetPlaylistBadRequest; -import dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized; import dev.plexapi.sdk.models.errors.SDKError; import dev.plexapi.sdk.models.operations.GetPlaylistRequest; import dev.plexapi.sdk.models.operations.GetPlaylistResponse; -import dev.plexapi.sdk.models.operations.GetPlaylistResponseBody; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Exceptions; import dev.plexapi.sdk.utils.HTTPClient; @@ -85,11 +83,12 @@ public class GetPlaylist { String url = Utils.generateURL( klass, this.baseUrl, - "/playlists/{playlistID}", - request, null); + "/playlists/{playlistId}", + request, this.sdkConfiguration.globals); HTTPRequest req = new HTTPRequest(url, "GET"); req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -124,7 +123,7 @@ public class GetPlaylist { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -154,11 +153,11 @@ public class GetPlaylist { if (Utils.statusCodeMatches(response.statusCode(), "200")) { if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPlaylistResponseBody out = Utils.mapper().readValue( + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( response.body(), new TypeReference<>() { }); - res.withObject(out); + res.withMediaContainerWithPlaylistMetadata(out); return res; } else { throw new SDKError( @@ -169,43 +168,7 @@ public class GetPlaylist { } } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPlaylistBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPlaylistUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { // no content throw new SDKError( response, @@ -257,7 +220,7 @@ public class GetPlaylist { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -286,11 +249,11 @@ public class GetPlaylist { if (Utils.contentTypeMatches(contentType, "application/json")) { return response.body().toByteArray().thenApply(bodyBytes -> { try { - GetPlaylistResponseBody out = Utils.mapper().readValue( + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( bodyBytes, new TypeReference<>() { }); - res.withObject(out); + res.withMediaContainerWithPlaylistMetadata(out); return res; } catch (Exception e) { throw new RuntimeException(e); @@ -301,47 +264,7 @@ public class GetPlaylist { } } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetPlaylistBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetPlaylistUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPlaylistContents.java b/src/main/java/dev/plexapi/sdk/operations/GetPlaylistContents.java deleted file mode 100644 index 3483768d..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetPlaylistContents.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetPlaylistContentsBadRequest; -import dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsRequest; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetPlaylistContents { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getPlaylistContents", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getPlaylistContents", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getPlaylistContents", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/playlists/{playlistID}/items", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetPlaylistContentsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetPlaylistContentsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetPlaylistContentsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetPlaylistContentsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetPlaylistContentsResponse.Builder resBuilder = - GetPlaylistContentsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetPlaylistContentsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPlaylistContentsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPlaylistContentsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPlaylistContentsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetPlaylistContentsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetPlaylistContentsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetPlaylistContentsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetPlaylistContentsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetPlaylistContentsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetPlaylistContentsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetPlaylistContentsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetPlaylistContentsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetPlaylistContentsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPlaylistGenerator.java b/src/main/java/dev/plexapi/sdk/operations/GetPlaylistGenerator.java new file mode 100644 index 00000000..eb9e5325 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetPlaylistGenerator.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorResponse; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetPlaylistGenerator { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistGenerator", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistGenerator", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistGenerator", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playlists/{playlistId}/items/{generatorId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetPlaylistGeneratorRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPlaylistGeneratorRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetPlaylistGeneratorRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetPlaylistGeneratorResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetPlaylistGeneratorResponse.Builder resBuilder = + GetPlaylistGeneratorResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetPlaylistGeneratorResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetPlaylistGeneratorResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetPlaylistGeneratorRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPlaylistGeneratorRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetPlaylistGeneratorRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetPlaylistGeneratorResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPlaylistGeneratorItems.java b/src/main/java/dev/plexapi/sdk/operations/GetPlaylistGeneratorItems.java new file mode 100644 index 00000000..b3e6e4b8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetPlaylistGeneratorItems.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsResponse; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetPlaylistGeneratorItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistGeneratorItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistGeneratorItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistGeneratorItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playlists/{playlistId}/items/{generatorId}/items", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetPlaylistGeneratorItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPlaylistGeneratorItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetPlaylistGeneratorItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetPlaylistGeneratorItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetPlaylistGeneratorItemsResponse.Builder resBuilder = + GetPlaylistGeneratorItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetPlaylistGeneratorItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetPlaylistGeneratorItemsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetPlaylistGeneratorItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPlaylistGeneratorItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetPlaylistGeneratorItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetPlaylistGeneratorItemsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPlaylistGenerators.java b/src/main/java/dev/plexapi/sdk/operations/GetPlaylistGenerators.java new file mode 100644 index 00000000..ef21ec07 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetPlaylistGenerators.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsResponse; +import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetPlaylistGenerators { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistGenerators", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistGenerators", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistGenerators", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playlists/{playlistId}/generators", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetPlaylistGeneratorsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPlaylistGeneratorsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetPlaylistGeneratorsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetPlaylistGeneratorsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetPlaylistGeneratorsResponse.Builder resBuilder = + GetPlaylistGeneratorsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetPlaylistGeneratorsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetPlaylistGeneratorsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetPlaylistGeneratorsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPlaylistGeneratorsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetPlaylistGeneratorsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetPlaylistGeneratorsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetPlaylistGeneratorsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPlaylistItems.java b/src/main/java/dev/plexapi/sdk/operations/GetPlaylistItems.java new file mode 100644 index 00000000..8443e6d7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetPlaylistItems.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPlaylistItemsRequest; +import dev.plexapi.sdk.models.operations.GetPlaylistItemsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetPlaylistItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPlaylistItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playlists/{playlistId}/items", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetPlaylistItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPlaylistItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetPlaylistItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetPlaylistItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetPlaylistItemsResponse.Builder resBuilder = + GetPlaylistItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetPlaylistItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetPlaylistItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPlaylistItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetPlaylistItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetPlaylistItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetPlaylistItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetPlaylistItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPlaylists.java b/src/main/java/dev/plexapi/sdk/operations/GetPlaylists.java deleted file mode 100644 index a5a4e656..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetPlaylists.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest; -import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetPlaylistsRequest; -import dev.plexapi.sdk.models.operations.GetPlaylistsResponse; -import dev.plexapi.sdk.models.operations.GetPlaylistsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetPlaylists { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getPlaylists", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getPlaylists", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getPlaylists", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/playlists"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetPlaylistsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetPlaylistsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetPlaylistsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetPlaylistsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetPlaylistsResponse.Builder resBuilder = - GetPlaylistsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetPlaylistsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPlaylistsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPlaylistsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetPlaylistsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetPlaylistsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetPlaylistsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetPlaylistsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetPlaylistsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetPlaylistsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetPlaylistsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetPlaylistsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetPlaylistsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetPlaylistsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPostplayHubs.java b/src/main/java/dev/plexapi/sdk/operations/GetPostplayHubs.java new file mode 100644 index 00000000..866b18ce --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetPostplayHubs.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPostplayHubsRequest; +import dev.plexapi.sdk.models.operations.GetPostplayHubsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithHubs; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetPostplayHubs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPostplayHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPostplayHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPostplayHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/hubs/metadata/{metadataId}/postplay", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetPostplayHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPostplayHubsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetPostplayHubsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetPostplayHubsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetPostplayHubsResponse.Builder resBuilder = + GetPostplayHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetPostplayHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithHubs out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithHubs(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetPostplayHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPostplayHubsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetPostplayHubsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetPostplayHubsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetPostplayHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetPostplayHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithHubs out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithHubs(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPreference.java b/src/main/java/dev/plexapi/sdk/operations/GetPreference.java new file mode 100644 index 00000000..39d7e2d2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetPreference.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPreferenceRequest; +import dev.plexapi.sdk.models.operations.GetPreferenceResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithSettings; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetPreference { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPreference", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPreference", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPreference", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/:/prefs/get"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetPreferenceRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPreferenceRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetPreferenceRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetPreferenceResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetPreferenceResponse.Builder resBuilder = + GetPreferenceResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetPreferenceResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithSettings out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithSettings(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetPreferenceRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPreferenceRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetPreferenceRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetPreferenceResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetPreferenceResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetPreferenceResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithSettings out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithSettings(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetPromotedHubs.java b/src/main/java/dev/plexapi/sdk/operations/GetPromotedHubs.java new file mode 100644 index 00000000..20793aa8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetPromotedHubs.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPromotedHubsRequest; +import dev.plexapi.sdk.models.operations.GetPromotedHubsResponse; +import dev.plexapi.sdk.models.operations.GetPromotedHubsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetPromotedHubs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPromotedHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPromotedHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getPromotedHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/hubs/promoted"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetPromotedHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPromotedHubsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetPromotedHubsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetPromotedHubsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetPromotedHubsResponse.Builder resBuilder = + GetPromotedHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetPromotedHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetPromotedHubsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetPromotedHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetPromotedHubsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetPromotedHubsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetPromotedHubsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetPromotedHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetPromotedHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetPromotedHubsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetRandomArtwork.java b/src/main/java/dev/plexapi/sdk/operations/GetRandomArtwork.java new file mode 100644 index 00000000..46532eaa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetRandomArtwork.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetRandomArtworkRequest; +import dev.plexapi.sdk.models.operations.GetRandomArtworkResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetRandomArtwork { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getRandomArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getRandomArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getRandomArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/randomArtwork"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetRandomArtworkRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetRandomArtworkRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetRandomArtworkRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetRandomArtworkResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetRandomArtworkResponse.Builder resBuilder = + GetRandomArtworkResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetRandomArtworkResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithArtwork out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithArtwork(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetRandomArtworkRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetRandomArtworkRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetRandomArtworkRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetRandomArtworkResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetRandomArtworkResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetRandomArtworkResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithArtwork out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithArtwork(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetRecentlyAdded.java b/src/main/java/dev/plexapi/sdk/operations/GetRecentlyAdded.java deleted file mode 100644 index 565ff1c9..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetRecentlyAdded.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequest; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetRecentlyAdded { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-recently-added", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-recently-added", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-recently-added", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.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( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetRecentlyAddedRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetRecentlyAddedRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetRecentlyAddedRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetRecentlyAddedResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetRecentlyAddedResponse.Builder resBuilder = - GetRecentlyAddedResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetRecentlyAddedResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetRecentlyAddedResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetRecentlyAddedRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetRecentlyAddedRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetRecentlyAddedRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetRecentlyAddedResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetRecentlyAddedResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetRecentlyAddedResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetRecentlyAddedResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetRecentlyAddedLibrary.java b/src/main/java/dev/plexapi/sdk/operations/GetRecentlyAddedLibrary.java deleted file mode 100644 index 2e6873f7..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetRecentlyAddedLibrary.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryBadRequest; -import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRequest; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryResponse; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetRecentlyAddedLibrary { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-recently-added-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-recently-added-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-recently-added-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/library/recentlyAdded"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetRecentlyAddedLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetRecentlyAddedLibraryRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetRecentlyAddedLibraryRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetRecentlyAddedLibraryResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetRecentlyAddedLibraryResponse.Builder resBuilder = - GetRecentlyAddedLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetRecentlyAddedLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetRecentlyAddedLibraryResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetRecentlyAddedLibraryBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetRecentlyAddedLibraryUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetRecentlyAddedLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetRecentlyAddedLibraryRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetRecentlyAddedLibraryRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetRecentlyAddedLibraryResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetRecentlyAddedLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetRecentlyAddedLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetRecentlyAddedLibraryResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetRecentlyAddedLibraryBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetRecentlyAddedLibraryUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetRefreshLibraryMetadata.java b/src/main/java/dev/plexapi/sdk/operations/GetRefreshLibraryMetadata.java deleted file mode 100644 index 29a05feb..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetRefreshLibraryMetadata.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest; -import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataRequest; -import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetRefreshLibraryMetadata { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-refresh-library-metadata", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-refresh-library-metadata", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-refresh-library-metadata", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/sections/{sectionKey}/refresh", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetRefreshLibraryMetadataRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetRefreshLibraryMetadataRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetRefreshLibraryMetadataRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetRefreshLibraryMetadataResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetRefreshLibraryMetadataResponse.Builder resBuilder = - GetRefreshLibraryMetadataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetRefreshLibraryMetadataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetRefreshLibraryMetadataBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetRefreshLibraryMetadataUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetRefreshLibraryMetadataRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetRefreshLibraryMetadataRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetRefreshLibraryMetadataRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetRefreshLibraryMetadataResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetRefreshLibraryMetadataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetRefreshLibraryMetadataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetRefreshLibraryMetadataBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetRefreshLibraryMetadataUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetRelatedHubs.java b/src/main/java/dev/plexapi/sdk/operations/GetRelatedHubs.java new file mode 100644 index 00000000..17e643e2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetRelatedHubs.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetRelatedHubsRequest; +import dev.plexapi.sdk.models.operations.GetRelatedHubsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithHubs; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetRelatedHubs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getRelatedHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getRelatedHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getRelatedHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/hubs/metadata/{metadataId}/related", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetRelatedHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetRelatedHubsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetRelatedHubsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetRelatedHubsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetRelatedHubsResponse.Builder resBuilder = + GetRelatedHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetRelatedHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithHubs out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithHubs(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetRelatedHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetRelatedHubsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetRelatedHubsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetRelatedHubsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetRelatedHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetRelatedHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithHubs out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithHubs(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetRelatedItems.java b/src/main/java/dev/plexapi/sdk/operations/GetRelatedItems.java new file mode 100644 index 00000000..9d9e7d0a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetRelatedItems.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetRelatedItemsRequest; +import dev.plexapi.sdk.models.operations.GetRelatedItemsResponse; +import dev.plexapi.sdk.models.operations.GetRelatedItemsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetRelatedItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getRelatedItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getRelatedItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getRelatedItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/related", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetRelatedItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetRelatedItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetRelatedItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetRelatedItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetRelatedItemsResponse.Builder resBuilder = + GetRelatedItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetRelatedItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetRelatedItemsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetRelatedItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetRelatedItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetRelatedItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetRelatedItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetRelatedItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetRelatedItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetRelatedItemsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetResizedPhoto.java b/src/main/java/dev/plexapi/sdk/operations/GetResizedPhoto.java deleted file mode 100644 index 94d80bfb..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetResizedPhoto.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest; -import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetResizedPhotoRequest; -import dev.plexapi.sdk.models.operations.GetResizedPhotoResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetResizedPhoto { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getResizedPhoto", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getResizedPhoto", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getResizedPhoto", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/photo/:/transcode"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetResizedPhotoRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetResizedPhotoRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetResizedPhotoRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetResizedPhotoResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetResizedPhotoResponse.Builder resBuilder = - GetResizedPhotoResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetResizedPhotoResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetResizedPhotoBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetResizedPhotoUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetResizedPhotoRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetResizedPhotoRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetResizedPhotoRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetResizedPhotoResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetResizedPhotoResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetResizedPhotoResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetResizedPhotoBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetResizedPhotoUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetResourcesStatistics.java b/src/main/java/dev/plexapi/sdk/operations/GetResourcesStatistics.java deleted file mode 100644 index ceda902d..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetResourcesStatistics.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest; -import dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsRequest; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponse; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetResourcesStatistics { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getResourcesStatistics", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getResourcesStatistics", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getResourcesStatistics", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/statistics/resources"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetResourcesStatisticsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetResourcesStatisticsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetResourcesStatisticsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetResourcesStatisticsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetResourcesStatisticsResponse.Builder resBuilder = - GetResourcesStatisticsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetResourcesStatisticsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetResourcesStatisticsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetResourcesStatisticsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetResourcesStatisticsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetResourcesStatisticsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetResourcesStatisticsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetResourcesStatisticsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetResourcesStatisticsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetResourcesStatisticsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetResourcesStatisticsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetResourcesStatisticsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetResourcesStatisticsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetResourcesStatisticsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetScheduledRecordings.java b/src/main/java/dev/plexapi/sdk/operations/GetScheduledRecordings.java new file mode 100644 index 00000000..25028de7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetScheduledRecordings.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetScheduledRecordingsResponse; +import dev.plexapi.sdk.models.operations.GetScheduledRecordingsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetScheduledRecordings { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getScheduledRecordings", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getScheduledRecordings", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getScheduledRecordings", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/subscriptions/scheduled"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetScheduledRecordingsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetScheduledRecordingsResponse.Builder resBuilder = + GetScheduledRecordingsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetScheduledRecordingsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetScheduledRecordingsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetScheduledRecordingsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetScheduledRecordingsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetScheduledRecordingsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetScheduledRecordingsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSearchAllLibraries.java b/src/main/java/dev/plexapi/sdk/operations/GetSearchAllLibraries.java deleted file mode 100644 index 1397ec3b..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetSearchAllLibraries.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetSearchAllLibrariesBadRequest; -import dev.plexapi.sdk.models.errors.GetSearchAllLibrariesUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesRequest; -import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesResponse; -import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetSearchAllLibraries { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-search-all-libraries", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-search-all-libraries", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-search-all-libraries", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/library/search"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetSearchAllLibrariesRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetSearchAllLibrariesRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetSearchAllLibrariesRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetSearchAllLibrariesResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetSearchAllLibrariesResponse.Builder resBuilder = - GetSearchAllLibrariesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetSearchAllLibrariesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSearchAllLibrariesResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSearchAllLibrariesBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSearchAllLibrariesUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetSearchAllLibrariesRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetSearchAllLibrariesRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetSearchAllLibrariesRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetSearchAllLibrariesResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetSearchAllLibrariesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetSearchAllLibrariesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetSearchAllLibrariesResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSearchAllLibrariesBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSearchAllLibrariesUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSearchLibrary.java b/src/main/java/dev/plexapi/sdk/operations/GetSearchLibrary.java deleted file mode 100644 index 40f52187..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetSearchLibrary.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest; -import dev.plexapi.sdk.models.errors.GetSearchLibraryUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetSearchLibraryRequest; -import dev.plexapi.sdk.models.operations.GetSearchLibraryResponse; -import dev.plexapi.sdk.models.operations.GetSearchLibraryResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetSearchLibrary { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-search-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-search-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-search-library", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/sections/{sectionKey}/search", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetSearchLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetSearchLibraryRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetSearchLibraryRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetSearchLibraryResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetSearchLibraryResponse.Builder resBuilder = - GetSearchLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetSearchLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSearchLibraryResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSearchLibraryBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSearchLibraryUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetSearchLibraryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetSearchLibraryRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetSearchLibraryRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetSearchLibraryResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetSearchLibraryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetSearchLibraryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetSearchLibraryResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSearchLibraryBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSearchLibraryUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSearchResults.java b/src/main/java/dev/plexapi/sdk/operations/GetSearchResults.java deleted file mode 100644 index d343f502..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetSearchResults.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest; -import dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetSearchResultsRequest; -import dev.plexapi.sdk.models.operations.GetSearchResultsResponse; -import dev.plexapi.sdk.models.operations.GetSearchResultsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetSearchResults { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getSearchResults", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getSearchResults", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getSearchResults", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/search"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetSearchResultsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetSearchResultsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetSearchResultsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetSearchResultsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetSearchResultsResponse.Builder resBuilder = - GetSearchResultsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetSearchResultsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSearchResultsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSearchResultsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSearchResultsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetSearchResultsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetSearchResultsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetSearchResultsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetSearchResultsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetSearchResultsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetSearchResultsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetSearchResultsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSearchResultsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSearchResultsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSectionFilters.java b/src/main/java/dev/plexapi/sdk/operations/GetSectionFilters.java new file mode 100644 index 00000000..0af731f4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSectionFilters.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSectionFiltersRequest; +import dev.plexapi.sdk.models.operations.GetSectionFiltersResponse; +import dev.plexapi.sdk.models.operations.GetSectionFiltersResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSectionFilters { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionFilters", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionFilters", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionFilters", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/filters", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetSectionFiltersRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSectionFiltersRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetSectionFiltersRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSectionFiltersResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSectionFiltersResponse.Builder resBuilder = + GetSectionFiltersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSectionFiltersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetSectionFiltersResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetSectionFiltersRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSectionFiltersRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetSectionFiltersRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSectionFiltersResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSectionFiltersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSectionFiltersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetSectionFiltersResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSectionHubs.java b/src/main/java/dev/plexapi/sdk/operations/GetSectionHubs.java new file mode 100644 index 00000000..ff29b3a6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSectionHubs.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSectionHubsRequest; +import dev.plexapi.sdk.models.operations.GetSectionHubsResponse; +import dev.plexapi.sdk.models.operations.GetSectionHubsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSectionHubs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/hubs/sections/{sectionId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetSectionHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSectionHubsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetSectionHubsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSectionHubsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSectionHubsResponse.Builder resBuilder = + GetSectionHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSectionHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetSectionHubsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetSectionHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSectionHubsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetSectionHubsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSectionHubsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSectionHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSectionHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetSectionHubsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSectionImage.java b/src/main/java/dev/plexapi/sdk/operations/GetSectionImage.java new file mode 100644 index 00000000..89a6be39 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSectionImage.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSectionImageRequest; +import dev.plexapi.sdk.models.operations.GetSectionImageResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSectionImage { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/composite/{updatedAt}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetSectionImageRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSectionImageRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetSectionImageRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSectionImageResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSectionImageResponse.Builder resBuilder = + GetSectionImageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSectionImageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetSectionImageRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSectionImageRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetSectionImageRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSectionImageResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSectionImageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSectionImageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSectionPreferences.java b/src/main/java/dev/plexapi/sdk/operations/GetSectionPreferences.java new file mode 100644 index 00000000..0398cac5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSectionPreferences.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSectionPreferencesRequest; +import dev.plexapi.sdk.models.operations.GetSectionPreferencesResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithSettings; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSectionPreferences { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/prefs", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetSectionPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSectionPreferencesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetSectionPreferencesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSectionPreferencesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSectionPreferencesResponse.Builder resBuilder = + GetSectionPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSectionPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithSettings out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithSettings(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetSectionPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSectionPreferencesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetSectionPreferencesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSectionPreferencesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSectionPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSectionPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithSettings out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithSettings(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSections.java b/src/main/java/dev/plexapi/sdk/operations/GetSections.java new file mode 100644 index 00000000..ecd44727 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSections.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSectionsResponse; +import dev.plexapi.sdk.models.operations.GetSectionsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSections { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSections", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSections", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSections", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/sections/all"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSectionsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSectionsResponse.Builder resBuilder = + GetSectionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSectionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetSectionsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSectionsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSectionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSectionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetSectionsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSectionsPrefs.java b/src/main/java/dev/plexapi/sdk/operations/GetSectionsPrefs.java new file mode 100644 index 00000000..cf7f9871 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSectionsPrefs.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSectionsPrefsRequest; +import dev.plexapi.sdk.models.operations.GetSectionsPrefsResponse; +import dev.plexapi.sdk.models.shared.RequestHandlerSlashGetResponses200; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSectionsPrefs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionsPrefs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionsPrefs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSectionsPrefs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/sections/prefs"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetSectionsPrefsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSectionsPrefsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetSectionsPrefsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSectionsPrefsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSectionsPrefsResponse.Builder resBuilder = + GetSectionsPrefsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSectionsPrefsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + RequestHandlerSlashGetResponses200 out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withRequestHandlerSlashGetResponses200(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetSectionsPrefsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSectionsPrefsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetSectionsPrefsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSectionsPrefsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSectionsPrefsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSectionsPrefsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + RequestHandlerSlashGetResponses200 out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withRequestHandlerSlashGetResponses200(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetServerActivities.java b/src/main/java/dev/plexapi/sdk/operations/GetServerActivities.java deleted file mode 100644 index ee3237bf..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetServerActivities.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetServerActivitiesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerActivitiesUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetServerActivitiesResponse; -import dev.plexapi.sdk.models.operations.GetServerActivitiesResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetServerActivities { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerActivities", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerActivities", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerActivities", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/activities"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetServerActivitiesResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetServerActivitiesResponse.Builder resBuilder = - GetServerActivitiesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetServerActivitiesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerActivitiesResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerActivitiesBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerActivitiesUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetServerActivitiesResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetServerActivitiesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetServerActivitiesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetServerActivitiesResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerActivitiesBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerActivitiesUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetServerCapabilities.java b/src/main/java/dev/plexapi/sdk/operations/GetServerCapabilities.java deleted file mode 100644 index 7c47dee5..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetServerCapabilities.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetServerCapabilities { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerCapabilities", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerCapabilities", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerCapabilities", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetServerCapabilitiesResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetServerCapabilitiesResponse.Builder resBuilder = - GetServerCapabilitiesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetServerCapabilitiesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerCapabilitiesResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerCapabilitiesBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerCapabilitiesUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetServerCapabilitiesResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetServerCapabilitiesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetServerCapabilitiesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetServerCapabilitiesResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerCapabilitiesBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerCapabilitiesUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetServerIdentity.java b/src/main/java/dev/plexapi/sdk/operations/GetServerIdentity.java deleted file mode 100644 index a359e950..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetServerIdentity.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetServerIdentityResponse; -import dev.plexapi.sdk.models.operations.GetServerIdentityResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetServerIdentity { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = null; - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-server-identity", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-server-identity", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-server-identity", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/identity"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "408", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetServerIdentityResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetServerIdentityResponse.Builder resBuilder = - GetServerIdentityResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetServerIdentityResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerIdentityResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "408")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerIdentityRequestTimeout out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "408", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetServerIdentityResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetServerIdentityResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetServerIdentityResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetServerIdentityResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "408")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerIdentityRequestTimeout out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetServerInfo.java b/src/main/java/dev/plexapi/sdk/operations/GetServerInfo.java new file mode 100644 index 00000000..7e8b6c28 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetServerInfo.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetServerInfoRequest; +import dev.plexapi.sdk.models.operations.GetServerInfoResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithDirectory; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetServerInfo { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getServerInfo", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getServerInfo", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getServerInfo", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetServerInfoRequest request) throws Exception { + HttpRequest req = buildRequest(request); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetServerInfoRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetServerInfoResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetServerInfoResponse.Builder resBuilder = + GetServerInfoResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetServerInfoResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithDirectory out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithDirectory(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetServerInfoRequest request) throws Exception { + HttpRequest req = buildRequest(request); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetServerInfoRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetServerInfoResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetServerInfoResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetServerInfoResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithDirectory out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithDirectory(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetServerList.java b/src/main/java/dev/plexapi/sdk/operations/GetServerList.java deleted file mode 100644 index c637d8c2..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetServerList.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetServerListBadRequest; -import dev.plexapi.sdk.models.errors.GetServerListUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetServerListResponse; -import dev.plexapi.sdk.models.operations.GetServerListResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetServerList { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerList", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerList", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerList", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/servers"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetServerListResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetServerListResponse.Builder resBuilder = - GetServerListResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetServerListResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerListResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerListBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerListUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetServerListResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetServerListResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetServerListResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetServerListResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerListBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerListUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetServerPreferences.java b/src/main/java/dev/plexapi/sdk/operations/GetServerPreferences.java deleted file mode 100644 index 0eccf367..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetServerPreferences.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetServerPreferencesResponse; -import dev.plexapi.sdk.models.operations.GetServerPreferencesResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetServerPreferences { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerPreferences", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerPreferences", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getServerPreferences", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/:/prefs"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetServerPreferencesResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetServerPreferencesResponse.Builder resBuilder = - GetServerPreferencesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetServerPreferencesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerPreferencesResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerPreferencesBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerPreferencesUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetServerPreferencesResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetServerPreferencesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetServerPreferencesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetServerPreferencesResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerPreferencesBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerPreferencesUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetServerResources.java b/src/main/java/dev/plexapi/sdk/operations/GetServerResources.java deleted file mode 100644 index ae30295f..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetServerResources.java +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest; -import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetServerResourcesRequest; -import dev.plexapi.sdk.models.operations.GetServerResourcesResponse; -import dev.plexapi.sdk.models.operations.PlexDevice; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetServerResources { - - /** - * GET_SERVER_RESOURCES_SERVERS contains the list of server urls available to the SDK. - */ - public static final String[] GET_SERVER_RESOURCES_SERVERS = { - "https://plex.tv/api/v2", - }; - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration, Optional serverURL) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = serverURL - .filter(u -> !u.isBlank()) - .orElse(Utils.templateUrl( - GET_SERVER_RESOURCES_SERVERS[0], - Map.of())); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-server-resources", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-server-resources", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-server-resources", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/resources"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private HttpRequest onBuildRequest(GetServerResourcesRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetServerResourcesRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetServerResourcesRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetServerResourcesResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetServerResourcesResponse.Builder resBuilder = - GetServerResourcesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetServerResourcesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - List out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withPlexDevices(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerResourcesBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetServerResourcesUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private CompletableFuture onBuildRequest(GetServerResourcesRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetServerResourcesRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetServerResourcesRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetServerResourcesResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetServerResourcesResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetServerResourcesResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - List out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withPlexDevices(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerResourcesBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetServerResourcesUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSessionHistory.java b/src/main/java/dev/plexapi/sdk/operations/GetSessionHistory.java deleted file mode 100644 index f440ce1a..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetSessionHistory.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetSessionHistoryBadRequest; -import dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetSessionHistoryRequest; -import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse; -import dev.plexapi.sdk.models.operations.GetSessionHistoryResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetSessionHistory { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getSessionHistory", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getSessionHistory", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getSessionHistory", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/status/sessions/history/all"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetSessionHistoryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetSessionHistoryRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetSessionHistoryRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetSessionHistoryResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetSessionHistoryResponse.Builder resBuilder = - GetSessionHistoryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetSessionHistoryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSessionHistoryResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSessionHistoryBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSessionHistoryUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetSessionHistoryRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetSessionHistoryRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetSessionHistoryRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetSessionHistoryResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetSessionHistoryResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetSessionHistoryResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetSessionHistoryResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSessionHistoryBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSessionHistoryUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSessionPlaylistIndex.java b/src/main/java/dev/plexapi/sdk/operations/GetSessionPlaylistIndex.java new file mode 100644 index 00000000..0a023ec7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSessionPlaylistIndex.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexRequest; +import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSessionPlaylistIndex { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSessionPlaylistIndex", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSessionPlaylistIndex", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSessionPlaylistIndex", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/sessions/{sessionId}/{consumerId}/index.m3u8", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetSessionPlaylistIndexRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSessionPlaylistIndexRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetSessionPlaylistIndexRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSessionPlaylistIndexResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSessionPlaylistIndexResponse.Builder resBuilder = + GetSessionPlaylistIndexResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSessionPlaylistIndexResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetSessionPlaylistIndexRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSessionPlaylistIndexRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetSessionPlaylistIndexRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSessionPlaylistIndexResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSessionPlaylistIndexResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSessionPlaylistIndexResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSessionSegment.java b/src/main/java/dev/plexapi/sdk/operations/GetSessionSegment.java new file mode 100644 index 00000000..90647100 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSessionSegment.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSessionSegmentRequest; +import dev.plexapi.sdk.models.operations.GetSessionSegmentResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSessionSegment { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSessionSegment", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSessionSegment", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSessionSegment", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/sessions/{sessionId}/{consumerId}/{segmentId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetSessionSegmentRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSessionSegmentRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetSessionSegmentRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSessionSegmentResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSessionSegmentResponse.Builder resBuilder = + GetSessionSegmentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSessionSegmentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetSessionSegmentRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSessionSegmentRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetSessionSegmentRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSessionSegmentResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSessionSegmentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSessionSegmentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSessions.java b/src/main/java/dev/plexapi/sdk/operations/GetSessions.java index 075ae688..c2847a67 100644 --- a/src/main/java/dev/plexapi/sdk/operations/GetSessions.java +++ b/src/main/java/dev/plexapi/sdk/operations/GetSessions.java @@ -9,11 +9,9 @@ import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetSessionsBadRequest; -import dev.plexapi.sdk.models.errors.GetSessionsUnauthorized; import dev.plexapi.sdk.models.errors.SDKError; import dev.plexapi.sdk.models.operations.GetSessionsResponse; -import dev.plexapi.sdk.models.operations.GetSessionsResponseBody; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Exceptions; import dev.plexapi.sdk.utils.HTTPClient; @@ -83,7 +81,7 @@ public class GetSessions { HttpRequest buildRequest() throws Exception { String url = Utils.generateURL( this.baseUrl, - "/status/sessions"); + "/livetv/sessions"); HTTPRequest req = new HTTPRequest(url, "GET"); req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); @@ -121,7 +119,7 @@ public class GetSessions { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -150,12 +148,13 @@ public class GetSessions { GetSessionsResponse res = resBuilder.build(); if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSessionsResponseBody out = Utils.mapper().readValue( + MediaContainerWithMetadata out = Utils.mapper().readValue( response.body(), new TypeReference<>() { }); - res.withObject(out); + res.withMediaContainerWithMetadata(out); return res; } else { throw new SDKError( @@ -166,42 +165,6 @@ public class GetSessions { } } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSessionsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSessionsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { // no content throw new SDKError( @@ -254,7 +217,7 @@ public class GetSessions { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -280,14 +243,15 @@ public class GetSessions { dev.plexapi.sdk.models.operations.async.GetSessionsResponse res = resBuilder.build(); if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); if (Utils.contentTypeMatches(contentType, "application/json")) { return response.body().toByteArray().thenApply(bodyBytes -> { try { - GetSessionsResponseBody out = Utils.mapper().readValue( + MediaContainerWithMetadata out = Utils.mapper().readValue( bodyBytes, new TypeReference<>() { }); - res.withObject(out); + res.withMediaContainerWithMetadata(out); return res; } catch (Exception e) { throw new RuntimeException(e); @@ -298,46 +262,6 @@ public class GetSessions { } } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSessionsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSessionsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSonicPath.java b/src/main/java/dev/plexapi/sdk/operations/GetSonicPath.java new file mode 100644 index 00000000..a37acdca --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSonicPath.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSonicPathRequest; +import dev.plexapi.sdk.models.operations.GetSonicPathResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSonicPath { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSonicPath", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSonicPath", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSonicPath", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/computePath", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetSonicPathRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSonicPathRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetSonicPathRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSonicPathResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSonicPathResponse.Builder resBuilder = + GetSonicPathResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSonicPathResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetSonicPathRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSonicPathRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetSonicPathRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSonicPathResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSonicPathResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSonicPathResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSonicallySimilar.java b/src/main/java/dev/plexapi/sdk/operations/GetSonicallySimilar.java new file mode 100644 index 00000000..bee6bbd8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSonicallySimilar.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSonicallySimilarRequest; +import dev.plexapi.sdk.models.operations.GetSonicallySimilarResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSonicallySimilar { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSonicallySimilar", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSonicallySimilar", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSonicallySimilar", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/nearest", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetSonicallySimilarRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSonicallySimilarRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetSonicallySimilarRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSonicallySimilarResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSonicallySimilarResponse.Builder resBuilder = + GetSonicallySimilarResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSonicallySimilarResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetSonicallySimilarRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSonicallySimilarRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetSonicallySimilarRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSonicallySimilarResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSonicallySimilarResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSonicallySimilarResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSourceConnectionInformation.java b/src/main/java/dev/plexapi/sdk/operations/GetSourceConnectionInformation.java index f084eb5f..cc96bae5 100644 --- a/src/main/java/dev/plexapi/sdk/operations/GetSourceConnectionInformation.java +++ b/src/main/java/dev/plexapi/sdk/operations/GetSourceConnectionInformation.java @@ -9,11 +9,10 @@ import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationBadRequest; -import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized; import dev.plexapi.sdk.models.errors.SDKError; import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequest; import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse; +import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponseBody; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Exceptions; import dev.plexapi.sdk.utils.HTTPClient; @@ -91,7 +90,8 @@ public class GetSourceConnectionInformation { req.addQueryParams(Utils.getQueryParams( klass, request, - null)); + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -126,7 +126,7 @@ public class GetSourceConnectionInformation { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -155,19 +155,13 @@ public class GetSourceConnectionInformation { GetSourceConnectionInformationResponse res = resBuilder.build(); if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSourceConnectionInformationBadRequest out = Utils.mapper().readValue( + GetSourceConnectionInformationResponseBody out = Utils.mapper().readValue( response.body(), new TypeReference<>() { }); - out.withRawResponse(response); - - throw out; + res.withObject(out); + return res; } else { throw new SDKError( response, @@ -177,25 +171,7 @@ public class GetSourceConnectionInformation { } } - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetSourceConnectionInformationUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "4XX")) { // no content throw new SDKError( response, @@ -247,7 +223,7 @@ public class GetSourceConnectionInformation { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -273,51 +249,25 @@ public class GetSourceConnectionInformation { dev.plexapi.sdk.models.operations.async.GetSourceConnectionInformationResponse res = resBuilder.build(); if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { if (Utils.contentTypeMatches(contentType, "application/json")) { return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSourceConnectionInformationBadRequest out; try { - out = Utils.mapper().readValue( + GetSourceConnectionInformationResponseBody out = Utils.mapper().readValue( bodyBytes, new TypeReference<>() { }); - out.withRawResponse(response); + res.withObject(out); + return res; } catch (Exception e) { throw new RuntimeException(e); } - throw out; }); } else { return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); } } - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetSourceConnectionInformationUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } diff --git a/src/main/java/dev/plexapi/sdk/operations/GetStatistics.java b/src/main/java/dev/plexapi/sdk/operations/GetStatistics.java deleted file mode 100644 index 823cda6b..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetStatistics.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetStatisticsBadRequest; -import dev.plexapi.sdk.models.errors.GetStatisticsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetStatisticsRequest; -import dev.plexapi.sdk.models.operations.GetStatisticsResponse; -import dev.plexapi.sdk.models.operations.GetStatisticsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetStatistics { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getStatistics", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getStatistics", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getStatistics", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/statistics/media"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetStatisticsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetStatisticsRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetStatisticsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetStatisticsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetStatisticsResponse.Builder resBuilder = - GetStatisticsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetStatisticsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetStatisticsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetStatisticsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetStatisticsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetStatisticsRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetStatisticsRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetStatisticsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetStatisticsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetStatisticsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetStatisticsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetStatisticsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetStatisticsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetStatisticsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetStream.java b/src/main/java/dev/plexapi/sdk/operations/GetStream.java new file mode 100644 index 00000000..7a8a9af5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetStream.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetStreamRequest; +import dev.plexapi.sdk.models.operations.GetStreamResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetStream { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getStream", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getStream", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getStream", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/streams/{streamId}.{ext}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetStreamRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetStreamRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetStreamRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "404", "4XX", "501", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetStreamResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetStreamResponse.Builder resBuilder = + GetStreamResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetStreamResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "501", "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetStreamRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetStreamRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetStreamRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "404", "4XX", "501", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetStreamResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetStreamResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetStreamResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "501", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetStreamLevels.java b/src/main/java/dev/plexapi/sdk/operations/GetStreamLevels.java new file mode 100644 index 00000000..ff3a4ae8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetStreamLevels.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetStreamLevelsRequest; +import dev.plexapi.sdk.models.operations.GetStreamLevelsResponse; +import dev.plexapi.sdk.models.operations.GetStreamLevelsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetStreamLevels { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getStreamLevels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getStreamLevels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getStreamLevels", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/streams/{streamId}/levels", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetStreamLevelsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetStreamLevelsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetStreamLevelsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetStreamLevelsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetStreamLevelsResponse.Builder resBuilder = + GetStreamLevelsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetStreamLevelsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetStreamLevelsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetStreamLevelsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetStreamLevelsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetStreamLevelsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetStreamLevelsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetStreamLevelsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetStreamLevelsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetStreamLevelsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetStreamLoudness.java b/src/main/java/dev/plexapi/sdk/operations/GetStreamLoudness.java new file mode 100644 index 00000000..89a7108e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetStreamLoudness.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetStreamLoudnessRequest; +import dev.plexapi.sdk.models.operations.GetStreamLoudnessResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetStreamLoudness { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getStreamLoudness", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getStreamLoudness", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getStreamLoudness", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/streams/{streamId}/loudness", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "text/plain") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetStreamLoudnessRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetStreamLoudnessRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetStreamLoudnessRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetStreamLoudnessResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetStreamLoudnessResponse.Builder resBuilder = + GetStreamLoudnessResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetStreamLoudnessResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "text/plain")) { + String out = Utils.toUtf8AndClose(response.body()); + res.withRes(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetStreamLoudnessRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetStreamLoudnessRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetStreamLoudnessRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetStreamLoudnessResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetStreamLoudnessResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetStreamLoudnessResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "text/plain")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + String out = new String(bodyBytes, StandardCharsets.UTF_8); + res.withRes(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetSubscription.java b/src/main/java/dev/plexapi/sdk/operations/GetSubscription.java new file mode 100644 index 00000000..ff85c0e1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetSubscription.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetSubscriptionRequest; +import dev.plexapi.sdk.models.operations.GetSubscriptionResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetSubscription { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/subscriptions/{subscriptionId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetSubscriptionRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSubscriptionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetSubscriptionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetSubscriptionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSubscriptionResponse.Builder resBuilder = + GetSubscriptionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetSubscriptionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithSubscription out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithSubscription(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetSubscriptionRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetSubscriptionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetSubscriptionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetSubscriptionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetSubscriptionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetSubscriptionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithSubscription out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithSubscription(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetTags.java b/src/main/java/dev/plexapi/sdk/operations/GetTags.java new file mode 100644 index 00000000..18360fe8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetTags.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetTagsRequest; +import dev.plexapi.sdk.models.operations.GetTagsResponse; +import dev.plexapi.sdk.models.operations.GetTagsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetTags { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getTags", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getTags", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getTags", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/tags"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetTagsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetTagsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetTagsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetTagsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetTagsResponse.Builder resBuilder = + GetTagsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetTagsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetTagsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetTagsRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetTagsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetTagsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetTagsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetTagsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetTagsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetTagsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetTasks.java b/src/main/java/dev/plexapi/sdk/operations/GetTasks.java new file mode 100644 index 00000000..de95a3b4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetTasks.java @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetTasksResponse; +import dev.plexapi.sdk.models.operations.GetTasksResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetTasks { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/butler"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetTasksResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetTasksResponse.Builder resBuilder = + GetTasksResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetTasksResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetTasksResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetTasksResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetTasksResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetTasksResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetTasksResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetTemplate.java b/src/main/java/dev/plexapi/sdk/operations/GetTemplate.java new file mode 100644 index 00000000..de0fdb18 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetTemplate.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetTemplateRequest; +import dev.plexapi.sdk.models.operations.GetTemplateResponse; +import dev.plexapi.sdk.models.operations.GetTemplateResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetTemplate { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getTemplate", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getTemplate", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getTemplate", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/subscriptions/template"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetTemplateRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetTemplateRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetTemplateRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetTemplateResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetTemplateResponse.Builder resBuilder = + GetTemplateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetTemplateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetTemplateResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetTemplateRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetTemplateRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetTemplateRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetTemplateResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetTemplateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetTemplateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetTemplateResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetThumb.java b/src/main/java/dev/plexapi/sdk/operations/GetThumb.java new file mode 100644 index 00000000..cafa9f66 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetThumb.java @@ -0,0 +1,261 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetThumbRequest; +import dev.plexapi.sdk.models.operations.GetThumbResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetThumb { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getThumb", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getThumb", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getThumb", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/grabbers/devices/{deviceId}/thumb/{version}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(GetThumbRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetThumbRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetThumbRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetThumbResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetThumbResponse.Builder resBuilder = + GetThumbResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetThumbResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "301")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(GetThumbRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetThumbRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetThumbRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetThumbResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetThumbResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetThumbResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "301")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetThumbImage.java b/src/main/java/dev/plexapi/sdk/operations/GetThumbImage.java deleted file mode 100644 index 446c78d6..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetThumbImage.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetThumbImageBadRequest; -import dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetThumbImageRequest; -import dev.plexapi.sdk.models.operations.GetThumbImageResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetThumbImage { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-thumb-image", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-thumb-image", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-thumb-image", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/metadata/{ratingKey}/thumb", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "image/jpeg") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetThumbImageRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetThumbImageRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetThumbImageRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetThumbImageResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetThumbImageResponse.Builder resBuilder = - GetThumbImageResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { - resBuilder.responseStream(response.body()); - } - - GetThumbImageResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - res.withHeaders(response.headers().map()); - if (Utils.contentTypeMatches(contentType, "image/jpeg")) { - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetThumbImageBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetThumbImageUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetThumbImageRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetThumbImageRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetThumbImageRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetThumbImageResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetThumbImageResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { - resBuilder.responseStream(response.body()); - } - - dev.plexapi.sdk.models.operations.async.GetThumbImageResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - res.withHeaders(response.headers().map()); - if (Utils.contentTypeMatches(contentType, "image/jpeg")) { - return CompletableFuture.completedFuture(res); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetThumbImageBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetThumbImageUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetTimeline.java b/src/main/java/dev/plexapi/sdk/operations/GetTimeline.java deleted file mode 100644 index 8fd95a4f..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetTimeline.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetTimelineBadRequest; -import dev.plexapi.sdk.models.errors.GetTimelineUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetTimelineRequest; -import dev.plexapi.sdk.models.operations.GetTimelineResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetTimeline { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTimeline", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTimeline", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTimeline", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/:/timeline"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetTimelineRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetTimelineRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetTimelineRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetTimelineResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetTimelineResponse.Builder resBuilder = - GetTimelineResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetTimelineResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTimelineBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTimelineUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetTimelineRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetTimelineRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetTimelineRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetTimelineResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetTimelineResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetTimelineResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTimelineBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTimelineUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetTokenByPinId.java b/src/main/java/dev/plexapi/sdk/operations/GetTokenByPinId.java deleted file mode 100644 index 2bcb25f8..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetTokenByPinId.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest; -import dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdAuthPinContainer; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdRequest; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetTokenByPinId { - - /** - * GET_TOKEN_BY_PIN_ID_SERVERS contains the list of server urls available to the SDK. - */ - public static final String[] GET_TOKEN_BY_PIN_ID_SERVERS = { - "https://plex.tv/api/v2", - }; - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration, Optional serverURL) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = serverURL - .filter(u -> !u.isBlank()) - .orElse(Utils.templateUrl( - GET_TOKEN_BY_PIN_ID_SERVERS[0], - Map.of())); - this.securitySource = null; - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTokenByPinId", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTokenByPinId", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTokenByPinId", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/pins/{pinID}", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private HttpRequest onBuildRequest(GetTokenByPinIdRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetTokenByPinIdRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetTokenByPinIdRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetTokenByPinIdResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetTokenByPinIdResponse.Builder resBuilder = - GetTokenByPinIdResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetTokenByPinIdResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTokenByPinIdAuthPinContainer out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withAuthPinContainer(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTokenByPinIdBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTokenByPinIdResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private CompletableFuture onBuildRequest(GetTokenByPinIdRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetTokenByPinIdRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetTokenByPinIdRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetTokenByPinIdResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetTokenByPinIdResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetTokenByPinIdResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetTokenByPinIdAuthPinContainer out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withAuthPinContainer(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTokenByPinIdBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "404")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTokenByPinIdResponseBody out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetTokenDetails.java b/src/main/java/dev/plexapi/sdk/operations/GetTokenDetails.java deleted file mode 100644 index ca9cebc7..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetTokenDetails.java +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest; -import dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse; -import dev.plexapi.sdk.models.operations.GetTokenDetailsUserPlexAccount; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetTokenDetails { - - /** - * GET_TOKEN_DETAILS_SERVERS contains the list of server urls available to the SDK. - */ - public static final String[] GET_TOKEN_DETAILS_SERVERS = { - "https://plex.tv/api/v2", - }; - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration, Optional serverURL) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = serverURL - .filter(u -> !u.isBlank()) - .orElse(Utils.templateUrl( - GET_TOKEN_DETAILS_SERVERS[0], - Map.of())); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTokenDetails", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTokenDetails", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTokenDetails", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/user"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetTokenDetailsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetTokenDetailsResponse.Builder resBuilder = - GetTokenDetailsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetTokenDetailsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTokenDetailsUserPlexAccount out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withUserPlexAccount(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTokenDetailsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTokenDetailsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetTokenDetailsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetTokenDetailsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetTokenDetailsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetTokenDetailsUserPlexAccount out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withUserPlexAccount(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTokenDetailsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTokenDetailsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetTopWatchedContent.java b/src/main/java/dev/plexapi/sdk/operations/GetTopWatchedContent.java deleted file mode 100644 index 8a981a3b..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetTopWatchedContent.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetTopWatchedContentBadRequest; -import dev.plexapi.sdk.models.errors.GetTopWatchedContentUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentRequest; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetTopWatchedContent { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTopWatchedContent", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTopWatchedContent", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTopWatchedContent", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/library/all/top"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(GetTopWatchedContentRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetTopWatchedContentRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetTopWatchedContentRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetTopWatchedContentResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetTopWatchedContentResponse.Builder resBuilder = - GetTopWatchedContentResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetTopWatchedContentResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTopWatchedContentResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTopWatchedContentBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTopWatchedContentUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(GetTopWatchedContentRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetTopWatchedContentRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetTopWatchedContentRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetTopWatchedContentResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetTopWatchedContentResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetTopWatchedContentResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetTopWatchedContentResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTopWatchedContentBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTopWatchedContentUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetTranscodeSessions.java b/src/main/java/dev/plexapi/sdk/operations/GetTranscodeSessions.java deleted file mode 100644 index b4d604e7..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetTranscodeSessions.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetTranscodeSessionsBadRequest; -import dev.plexapi.sdk.models.errors.GetTranscodeSessionsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponse; -import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetTranscodeSessions { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTranscodeSessions", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTranscodeSessions", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getTranscodeSessions", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/transcode/sessions"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetTranscodeSessionsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetTranscodeSessionsResponse.Builder resBuilder = - GetTranscodeSessionsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetTranscodeSessionsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTranscodeSessionsResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTranscodeSessionsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTranscodeSessionsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetTranscodeSessionsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetTranscodeSessionsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetTranscodeSessionsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetTranscodeSessionsResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTranscodeSessionsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTranscodeSessionsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetTransientToken.java b/src/main/java/dev/plexapi/sdk/operations/GetTransientToken.java index 804c4792..fabe2e00 100644 --- a/src/main/java/dev/plexapi/sdk/operations/GetTransientToken.java +++ b/src/main/java/dev/plexapi/sdk/operations/GetTransientToken.java @@ -9,11 +9,10 @@ import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest; -import dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized; import dev.plexapi.sdk.models.errors.SDKError; import dev.plexapi.sdk.models.operations.GetTransientTokenRequest; import dev.plexapi.sdk.models.operations.GetTransientTokenResponse; +import dev.plexapi.sdk.models.operations.GetTransientTokenResponseBody; import dev.plexapi.sdk.utils.Blob; import dev.plexapi.sdk.utils.Exceptions; import dev.plexapi.sdk.utils.HTTPClient; @@ -84,14 +83,15 @@ public class GetTransientToken { String url = Utils.generateURL( this.baseUrl, "/security/token"); - HTTPRequest req = new HTTPRequest(url, "GET"); + HTTPRequest req = new HTTPRequest(url, "POST"); req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); req.addQueryParams(Utils.getQueryParams( klass, request, - null)); + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -126,7 +126,7 @@ public class GetTransientToken { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -155,19 +155,13 @@ public class GetTransientToken { GetTransientTokenResponse res = resBuilder.build(); if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTransientTokenBadRequest out = Utils.mapper().readValue( + GetTransientTokenResponseBody out = Utils.mapper().readValue( response.body(), new TypeReference<>() { }); - out.withRawResponse(response); - - throw out; + res.withObject(out); + return res; } else { throw new SDKError( response, @@ -177,25 +171,7 @@ public class GetTransientToken { } } - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetTransientTokenUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "4XX")) { // no content throw new SDKError( response, @@ -247,7 +223,7 @@ public class GetTransientToken { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -273,51 +249,25 @@ public class GetTransientToken { dev.plexapi.sdk.models.operations.async.GetTransientTokenResponse res = resBuilder.build(); if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { if (Utils.contentTypeMatches(contentType, "application/json")) { return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTransientTokenBadRequest out; try { - out = Utils.mapper().readValue( + GetTransientTokenResponseBody out = Utils.mapper().readValue( bodyBytes, new TypeReference<>() { }); - out.withRawResponse(response); + res.withObject(out); + return res; } catch (Exception e) { throw new RuntimeException(e); } - throw out; }); } else { return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); } } - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetTransientTokenUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } diff --git a/src/main/java/dev/plexapi/sdk/operations/GetUpdateStatus.java b/src/main/java/dev/plexapi/sdk/operations/GetUpdateStatus.java deleted file mode 100644 index 65a7d002..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetUpdateStatus.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetUpdateStatusBadRequest; -import dev.plexapi.sdk.models.errors.GetUpdateStatusUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetUpdateStatusResponse; -import dev.plexapi.sdk.models.operations.GetUpdateStatusResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetUpdateStatus { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getUpdateStatus", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getUpdateStatus", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getUpdateStatus", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/updater/status"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetUpdateStatusResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetUpdateStatusResponse.Builder resBuilder = - GetUpdateStatusResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetUpdateStatusResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetUpdateStatusResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetUpdateStatusBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetUpdateStatusUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetUpdateStatusResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetUpdateStatusResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetUpdateStatusResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetUpdateStatusResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetUpdateStatusBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetUpdateStatusUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetUpdatesStatus.java b/src/main/java/dev/plexapi/sdk/operations/GetUpdatesStatus.java new file mode 100644 index 00000000..05f1f08d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/GetUpdatesStatus.java @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetUpdatesStatusResponse; +import dev.plexapi.sdk.models.operations.GetUpdatesStatusResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetUpdatesStatus { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getUpdatesStatus", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getUpdatesStatus", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getUpdatesStatus", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/updater/status"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public GetUpdatesStatusResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetUpdatesStatusResponse.Builder resBuilder = + GetUpdatesStatusResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetUpdatesStatusResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetUpdatesStatusResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.GetUpdatesStatusResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.GetUpdatesStatusResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.GetUpdatesStatusResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetUpdatesStatusResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetUserFriends.java b/src/main/java/dev/plexapi/sdk/operations/GetUserFriends.java deleted file mode 100644 index 33af8b4d..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetUserFriends.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetUserFriendsBadRequest; -import dev.plexapi.sdk.models.errors.GetUserFriendsUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.Friend; -import dev.plexapi.sdk.models.operations.GetUserFriendsResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetUserFriends { - - /** - * GET_USER_FRIENDS_SERVERS contains the list of server urls available to the SDK. - */ - public static final String[] GET_USER_FRIENDS_SERVERS = { - "https://plex.tv/api/v2", - }; - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration, Optional serverURL) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = serverURL - .filter(u -> !u.isBlank()) - .orElse(Utils.templateUrl( - GET_USER_FRIENDS_SERVERS[0], - Map.of())); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getUserFriends", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getUserFriends", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "getUserFriends", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/friends"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetUserFriendsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetUserFriendsResponse.Builder resBuilder = - GetUserFriendsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetUserFriendsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - List out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withFriends(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetUserFriendsBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetUserFriendsUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetUserFriendsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetUserFriendsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetUserFriendsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - List out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withFriends(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetUserFriendsBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetUserFriendsUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetUsers.java b/src/main/java/dev/plexapi/sdk/operations/GetUsers.java deleted file mode 100644 index 821680d7..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetUsers.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetUsersBadRequest; -import dev.plexapi.sdk.models.errors.GetUsersUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetUsersRequest; -import dev.plexapi.sdk.models.operations.GetUsersResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetUsers { - - /** - * GET_USERS_SERVERS contains the list of server urls available to the SDK. - */ - public static final String[] GET_USERS_SERVERS = { - "https://plex.tv/api", - }; - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration, Optional serverURL) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = serverURL - .filter(u -> !u.isBlank()) - .orElse(Utils.templateUrl( - GET_USERS_SERVERS[0], - Map.of())); - this.securitySource = null; - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-users", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-users", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-users", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/users"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/xml") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private HttpRequest onBuildRequest(GetUsersRequest request) throws Exception { - HttpRequest req = buildRequest(request); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetUsersRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetUsersResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetUsersResponse.Builder resBuilder = - GetUsersResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetUsersResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/xml")) { - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetUsersBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetUsersUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private CompletableFuture onBuildRequest(GetUsersRequest request) throws Exception { - HttpRequest req = buildRequest(request); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetUsersRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetUsersResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetUsersResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetUsersResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/xml")) { - return CompletableFuture.completedFuture(res); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetUsersBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetUsersUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/GetWatchList.java b/src/main/java/dev/plexapi/sdk/operations/GetWatchList.java deleted file mode 100644 index bf2083ff..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/GetWatchList.java +++ /dev/null @@ -1,377 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.GetWatchListBadRequest; -import dev.plexapi.sdk.models.errors.GetWatchListUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.GetWatchListRequest; -import dev.plexapi.sdk.models.operations.GetWatchListResponse; -import dev.plexapi.sdk.models.operations.GetWatchListResponseBody; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class GetWatchList { - - /** - * GET_WATCH_LIST_SERVERS contains the list of server urls available to the SDK. - */ - public static final String[] GET_WATCH_LIST_SERVERS = { - /** - * The plex discover provider server - */ - "https://discover.provider.plex.tv", - }; - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration, Optional serverURL) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = serverURL - .filter(u -> !u.isBlank()) - .orElse(Utils.templateUrl( - GET_WATCH_LIST_SERVERS[0], - Map.of())); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-watch-list", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-watch-list", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "get-watch-list", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/sections/watchlist/{filter}", - request, null); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private HttpRequest onBuildRequest(GetWatchListRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetWatchListRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(GetWatchListRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public GetWatchListResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - GetWatchListResponse.Builder resBuilder = - GetWatchListResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - GetWatchListResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetWatchListResponseBody out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withObject(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetWatchListBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - GetWatchListUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private CompletableFuture onBuildRequest(GetWatchListRequest request) throws Exception { - HttpRequest req = buildRequest(request, GetWatchListRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(GetWatchListRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.GetWatchListResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.GetWatchListResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.GetWatchListResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - GetWatchListResponseBody out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withObject(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetWatchListBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.GetWatchListUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/IngestTransientItem.java b/src/main/java/dev/plexapi/sdk/operations/IngestTransientItem.java new file mode 100644 index 00000000..7ff25035 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/IngestTransientItem.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.IngestTransientItemRequest; +import dev.plexapi.sdk.models.operations.IngestTransientItemResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class IngestTransientItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ingestTransientItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ingestTransientItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ingestTransientItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/file"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(IngestTransientItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, IngestTransientItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(IngestTransientItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public IngestTransientItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + IngestTransientItemResponse.Builder resBuilder = + IngestTransientItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + IngestTransientItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(IngestTransientItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, IngestTransientItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(IngestTransientItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.IngestTransientItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.IngestTransientItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.IngestTransientItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListActivities.java b/src/main/java/dev/plexapi/sdk/operations/ListActivities.java new file mode 100644 index 00000000..497d5b6e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListActivities.java @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListActivitiesResponse; +import dev.plexapi.sdk.models.operations.ListActivitiesResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListActivities { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listActivities", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listActivities", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listActivities", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/activities"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListActivitiesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListActivitiesResponse.Builder resBuilder = + ListActivitiesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListActivitiesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + ListActivitiesResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListActivitiesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListActivitiesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListActivitiesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ListActivitiesResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListContent.java b/src/main/java/dev/plexapi/sdk/operations/ListContent.java new file mode 100644 index 00000000..1a550d5c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListContent.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListContentRequest; +import dev.plexapi.sdk.models.operations.ListContentResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListContent { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listContent", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listContent", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listContent", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/all", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListContentRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListContentRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListContentRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListContentResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListContentResponse.Builder resBuilder = + ListContentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListContentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListContentRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListContentRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListContentRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListContentResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListContentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListContentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListDVRs.java b/src/main/java/dev/plexapi/sdk/operations/ListDVRs.java new file mode 100644 index 00000000..6e599611 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListDVRs.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListDVRsResponse; +import dev.plexapi.sdk.models.operations.ListDVRsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListDVRs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listDVRs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listDVRs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listDVRs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/livetv/dvrs"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListDVRsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListDVRsResponse.Builder resBuilder = + ListDVRsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListDVRsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + ListDVRsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListDVRsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListDVRsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListDVRsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ListDVRsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListDevices.java b/src/main/java/dev/plexapi/sdk/operations/ListDevices.java new file mode 100644 index 00000000..5213f8b1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListDevices.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListDevicesResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListDevices { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listDevices", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listDevices", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listDevices", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/grabbers/devices"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListDevicesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListDevicesResponse.Builder resBuilder = + ListDevicesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListDevicesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithDevice out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListDevicesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListDevicesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListDevicesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithDevice out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListDownloadQueueItems.java b/src/main/java/dev/plexapi/sdk/operations/ListDownloadQueueItems.java new file mode 100644 index 00000000..b84e96d6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListDownloadQueueItems.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsResponse; +import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListDownloadQueueItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/downloadQueue/{queueId}/items", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListDownloadQueueItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListDownloadQueueItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListDownloadQueueItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListDownloadQueueItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListDownloadQueueItemsResponse.Builder resBuilder = + ListDownloadQueueItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListDownloadQueueItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + ListDownloadQueueItemsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListDownloadQueueItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListDownloadQueueItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListDownloadQueueItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListDownloadQueueItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListDownloadQueueItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListDownloadQueueItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ListDownloadQueueItemsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListHubs.java b/src/main/java/dev/plexapi/sdk/operations/ListHubs.java new file mode 100644 index 00000000..ba6c7279 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListHubs.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListHubsRequest; +import dev.plexapi.sdk.models.operations.ListHubsResponse; +import dev.plexapi.sdk.models.operations.ListHubsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListHubs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/hubs/sections/{sectionId}/manage", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListHubsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListHubsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListHubsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListHubsResponse.Builder resBuilder = + ListHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + ListHubsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListHubsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListHubsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListHubsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ListHubsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListLineups.java b/src/main/java/dev/plexapi/sdk/operations/ListLineups.java new file mode 100644 index 00000000..69509471 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListLineups.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListLineupsRequest; +import dev.plexapi.sdk.models.operations.ListLineupsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithLineup; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListLineups { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listLineups", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listLineups", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listLineups", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/epg/countries/{country}/{epgId}/regions/{region}/lineups", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListLineupsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListLineupsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListLineupsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListLineupsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListLineupsResponse.Builder resBuilder = + ListLineupsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListLineupsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithLineup out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithLineup(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListLineupsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListLineupsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListLineupsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListLineupsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListLineupsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListLineupsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithLineup out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithLineup(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListMatches.java b/src/main/java/dev/plexapi/sdk/operations/ListMatches.java new file mode 100644 index 00000000..d37b53e8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListMatches.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListMatchesRequest; +import dev.plexapi.sdk.models.operations.ListMatchesResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListMatches { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listMatches", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listMatches", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listMatches", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/matches", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListMatchesRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListMatchesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListMatchesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListMatchesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListMatchesResponse.Builder resBuilder = + ListMatchesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListMatchesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListMatchesRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListMatchesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListMatchesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListMatchesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListMatchesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListMatchesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListMoments.java b/src/main/java/dev/plexapi/sdk/operations/ListMoments.java new file mode 100644 index 00000000..9c6dc482 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListMoments.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListMomentsRequest; +import dev.plexapi.sdk.models.operations.ListMomentsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithArtwork; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListMoments { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listMoments", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listMoments", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listMoments", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/moment", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListMomentsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListMomentsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListMomentsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListMomentsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListMomentsResponse.Builder resBuilder = + ListMomentsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListMomentsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithArtwork out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithArtwork(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListMomentsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListMomentsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListMomentsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListMomentsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListMomentsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListMomentsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithArtwork out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithArtwork(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListPersonMedia.java b/src/main/java/dev/plexapi/sdk/operations/ListPersonMedia.java new file mode 100644 index 00000000..df010b1b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListPersonMedia.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListPersonMediaRequest; +import dev.plexapi.sdk.models.operations.ListPersonMediaResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListPersonMedia { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listPersonMedia", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listPersonMedia", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listPersonMedia", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/people/{personId}/media", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListPersonMediaRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListPersonMediaRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListPersonMediaRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListPersonMediaResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListPersonMediaResponse.Builder resBuilder = + ListPersonMediaResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListPersonMediaResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListPersonMediaRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListPersonMediaRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListPersonMediaRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListPersonMediaResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListPersonMediaResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListPersonMediaResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListPlaybackHistory.java b/src/main/java/dev/plexapi/sdk/operations/ListPlaybackHistory.java new file mode 100644 index 00000000..9ee3eead --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListPlaybackHistory.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryRequest; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryResponse; +import dev.plexapi.sdk.models.operations.ListPlaybackHistoryResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListPlaybackHistory { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listPlaybackHistory", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listPlaybackHistory", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listPlaybackHistory", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/status/sessions/history/all"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListPlaybackHistoryRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListPlaybackHistoryRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListPlaybackHistoryRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListPlaybackHistoryResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListPlaybackHistoryResponse.Builder resBuilder = + ListPlaybackHistoryResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListPlaybackHistoryResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + ListPlaybackHistoryResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListPlaybackHistoryRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListPlaybackHistoryRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListPlaybackHistoryRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListPlaybackHistoryResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListPlaybackHistoryResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListPlaybackHistoryResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ListPlaybackHistoryResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListPlaylists.java b/src/main/java/dev/plexapi/sdk/operations/ListPlaylists.java new file mode 100644 index 00000000..2185f275 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListPlaylists.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListPlaylistsRequest; +import dev.plexapi.sdk.models.operations.ListPlaylistsResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListPlaylists { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listPlaylists", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listPlaylists", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listPlaylists", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/playlists"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListPlaylistsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListPlaylistsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListPlaylistsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListPlaylistsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListPlaylistsResponse.Builder resBuilder = + ListPlaylistsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListPlaylistsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListPlaylistsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListPlaylistsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListPlaylistsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListPlaylistsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListPlaylistsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListPlaylistsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListProviders.java b/src/main/java/dev/plexapi/sdk/operations/ListProviders.java new file mode 100644 index 00000000..b8d06035 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListProviders.java @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListProvidersResponse; +import dev.plexapi.sdk.models.operations.ListProvidersResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListProviders { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listProviders", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listProviders", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listProviders", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/providers"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListProvidersResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListProvidersResponse.Builder resBuilder = + ListProvidersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListProvidersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + ListProvidersResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListProvidersResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListProvidersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListProvidersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ListProvidersResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListSessions.java b/src/main/java/dev/plexapi/sdk/operations/ListSessions.java new file mode 100644 index 00000000..0fdaa8cc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListSessions.java @@ -0,0 +1,278 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListSessionsResponse; +import dev.plexapi.sdk.models.operations.ListSessionsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListSessions { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listSessions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listSessions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listSessions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/status/sessions"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListSessionsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListSessionsResponse.Builder resBuilder = + ListSessionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListSessionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + ListSessionsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListSessionsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListSessionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListSessionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ListSessionsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListSimilar.java b/src/main/java/dev/plexapi/sdk/operations/ListSimilar.java new file mode 100644 index 00000000..69351df0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListSimilar.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListSimilarRequest; +import dev.plexapi.sdk.models.operations.ListSimilarResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListSimilar { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listSimilar", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listSimilar", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listSimilar", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/similar", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListSimilarRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListSimilarRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListSimilarRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListSimilarResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListSimilarResponse.Builder resBuilder = + ListSimilarResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListSimilarResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListSimilarRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListSimilarRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListSimilarRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListSimilarResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListSimilarResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListSimilarResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListSonicallySimilar.java b/src/main/java/dev/plexapi/sdk/operations/ListSonicallySimilar.java new file mode 100644 index 00000000..9c0fcff2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListSonicallySimilar.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListSonicallySimilarRequest; +import dev.plexapi.sdk.models.operations.ListSonicallySimilarResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListSonicallySimilar { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listSonicallySimilar", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listSonicallySimilar", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listSonicallySimilar", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/nearest", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListSonicallySimilarRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListSonicallySimilarRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListSonicallySimilarRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListSonicallySimilarResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListSonicallySimilarResponse.Builder resBuilder = + ListSonicallySimilarResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListSonicallySimilarResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListSonicallySimilarRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListSonicallySimilarRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListSonicallySimilarRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListSonicallySimilarResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListSonicallySimilarResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListSonicallySimilarResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ListTopUsers.java b/src/main/java/dev/plexapi/sdk/operations/ListTopUsers.java new file mode 100644 index 00000000..ad82a703 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ListTopUsers.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ListTopUsersRequest; +import dev.plexapi.sdk.models.operations.ListTopUsersResponse; +import dev.plexapi.sdk.models.operations.ListTopUsersResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ListTopUsers { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listTopUsers", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listTopUsers", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "listTopUsers", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/users/top", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ListTopUsersRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListTopUsersRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ListTopUsersRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ListTopUsersResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListTopUsersResponse.Builder resBuilder = + ListTopUsersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListTopUsersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + ListTopUsersResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ListTopUsersRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListTopUsersRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ListTopUsersRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ListTopUsersResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ListTopUsersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ListTopUsersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ListTopUsersResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/LogLine.java b/src/main/java/dev/plexapi/sdk/operations/LogLine.java deleted file mode 100644 index 2bf98558..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/LogLine.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.LogLineBadRequest; -import dev.plexapi.sdk.models.errors.LogLineUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.LogLineRequest; -import dev.plexapi.sdk.models.operations.LogLineResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class LogLine { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "logLine", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "logLine", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "logLine", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/log"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(LogLineRequest request) throws Exception { - HttpRequest req = buildRequest(request, LogLineRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(LogLineRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public LogLineResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - LogLineResponse.Builder resBuilder = - LogLineResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - LogLineResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - LogLineBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - LogLineUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(LogLineRequest request) throws Exception { - HttpRequest req = buildRequest(request, LogLineRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(LogLineRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.LogLineResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.LogLineResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.LogLineResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.LogLineBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.LogLineUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/LogMultiLine.java b/src/main/java/dev/plexapi/sdk/operations/LogMultiLine.java deleted file mode 100644 index ef3b5466..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/LogMultiLine.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.LogMultiLineBadRequest; -import dev.plexapi.sdk.models.errors.LogMultiLineUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.LogMultiLineResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.SerializedBody; -import dev.plexapi.sdk.utils.Utils.JsonShape; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.Object; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class LogMultiLine { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "logMultiLine", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "logMultiLine", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "logMultiLine", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/log"); - HTTPRequest req = new HTTPRequest(url, "POST"); - Object convertedRequest = Utils.convertToShape( - request, - JsonShape.DEFAULT, - typeReference); - SerializedBody serializedRequestBody = Utils.serializeRequestBody( - convertedRequest, - "request", - "string", - false); - if (serializedRequestBody == null) { - throw new Exception("Request body is required"); - } - req.setBody(Optional.ofNullable(serializedRequestBody)); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(String request) throws Exception { - HttpRequest req = buildRequest(request, new TypeReference() {}); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(String request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public LogMultiLineResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - LogMultiLineResponse.Builder resBuilder = - LogMultiLineResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - LogMultiLineResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - LogMultiLineBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - LogMultiLineUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(String request) throws Exception { - HttpRequest req = buildRequest(request, new TypeReference() {}); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(String request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.LogMultiLineResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.LogMultiLineResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.LogMultiLineResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.LogMultiLineBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.LogMultiLineUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/MakeDecision.java b/src/main/java/dev/plexapi/sdk/operations/MakeDecision.java new file mode 100644 index 00000000..6274e33c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/MakeDecision.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.MakeDecisionRequest; +import dev.plexapi.sdk.models.operations.MakeDecisionResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithDecision; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class MakeDecision { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "makeDecision", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "makeDecision", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "makeDecision", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/{transcodeType}/:/transcode/universal/decision", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(MakeDecisionRequest request) throws Exception { + HttpRequest req = buildRequest(request, MakeDecisionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(MakeDecisionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public MakeDecisionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + MakeDecisionResponse.Builder resBuilder = + MakeDecisionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + MakeDecisionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithDecision out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithDecision(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(MakeDecisionRequest request) throws Exception { + HttpRequest req = buildRequest(request, MakeDecisionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(MakeDecisionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.MakeDecisionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.MakeDecisionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.MakeDecisionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithDecision out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithDecision(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/MarkPlayed.java b/src/main/java/dev/plexapi/sdk/operations/MarkPlayed.java index 476a4f3c..9d17f753 100644 --- a/src/main/java/dev/plexapi/sdk/operations/MarkPlayed.java +++ b/src/main/java/dev/plexapi/sdk/operations/MarkPlayed.java @@ -6,11 +6,8 @@ package dev.plexapi.sdk.operations; import static dev.plexapi.sdk.operations.Operations.RequestOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.MarkPlayedBadRequest; -import dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized; import dev.plexapi.sdk.models.errors.SDKError; import dev.plexapi.sdk.models.operations.MarkPlayedRequest; import dev.plexapi.sdk.models.operations.MarkPlayedResponse; @@ -24,7 +21,6 @@ import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; import java.lang.Exception; -import java.lang.RuntimeException; import java.lang.String; import java.lang.Throwable; import java.net.http.HttpRequest; @@ -84,14 +80,15 @@ public class MarkPlayed { String url = Utils.generateURL( this.baseUrl, "/:/scrobble"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") .addHeader("user-agent", SDKConfiguration.USER_AGENT); req.addQueryParams(Utils.getQueryParams( klass, request, - null)); + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -126,7 +123,7 @@ public class MarkPlayed { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -159,43 +156,7 @@ public class MarkPlayed { return res; } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - MarkPlayedBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - MarkPlayedUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { // no content throw new SDKError( response, @@ -247,7 +208,7 @@ public class MarkPlayed { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -277,47 +238,7 @@ public class MarkPlayed { return CompletableFuture.completedFuture(res); } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.MarkPlayedBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.MarkPlayedUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } diff --git a/src/main/java/dev/plexapi/sdk/operations/MarkUnplayed.java b/src/main/java/dev/plexapi/sdk/operations/MarkUnplayed.java deleted file mode 100644 index 9650d92d..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/MarkUnplayed.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.MarkUnplayedBadRequest; -import dev.plexapi.sdk.models.errors.MarkUnplayedUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.MarkUnplayedRequest; -import dev.plexapi.sdk.models.operations.MarkUnplayedResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class MarkUnplayed { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "markUnplayed", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "markUnplayed", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "markUnplayed", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/:/unscrobble"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(MarkUnplayedRequest request) throws Exception { - HttpRequest req = buildRequest(request, MarkUnplayedRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(MarkUnplayedRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public MarkUnplayedResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - MarkUnplayedResponse.Builder resBuilder = - MarkUnplayedResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - MarkUnplayedResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - MarkUnplayedBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - MarkUnplayedUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(MarkUnplayedRequest request) throws Exception { - HttpRequest req = buildRequest(request, MarkUnplayedRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(MarkUnplayedRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.MarkUnplayedResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.MarkUnplayedResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.MarkUnplayedResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.MarkUnplayedBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.MarkUnplayedUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/MatchItem.java b/src/main/java/dev/plexapi/sdk/operations/MatchItem.java new file mode 100644 index 00000000..a5a56964 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/MatchItem.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.MatchItemRequest; +import dev.plexapi.sdk.models.operations.MatchItemResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class MatchItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "matchItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "matchItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "matchItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/match", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(MatchItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, MatchItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(MatchItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public MatchItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + MatchItemResponse.Builder resBuilder = + MatchItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + MatchItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(MatchItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, MatchItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(MatchItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.MatchItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.MatchItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.MatchItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/MergeItems.java b/src/main/java/dev/plexapi/sdk/operations/MergeItems.java new file mode 100644 index 00000000..10480911 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/MergeItems.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.MergeItemsRequest; +import dev.plexapi.sdk.models.operations.MergeItemsResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class MergeItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "mergeItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "mergeItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "mergeItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/merge", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(MergeItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, MergeItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(MergeItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public MergeItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + MergeItemsResponse.Builder resBuilder = + MergeItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + MergeItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(MergeItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, MergeItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(MergeItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.MergeItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.MergeItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.MergeItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ModifyDevice.java b/src/main/java/dev/plexapi/sdk/operations/ModifyDevice.java new file mode 100644 index 00000000..b46cb2bf --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ModifyDevice.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ModifyDeviceRequest; +import dev.plexapi.sdk.models.operations.ModifyDeviceResponse; +import dev.plexapi.sdk.models.operations.ModifyDeviceResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ModifyDevice { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "modifyDevice", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "modifyDevice", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "modifyDevice", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/grabbers/devices/{deviceId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ModifyDeviceRequest request) throws Exception { + HttpRequest req = buildRequest(request, ModifyDeviceRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ModifyDeviceRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ModifyDeviceResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ModifyDeviceResponse.Builder resBuilder = + ModifyDeviceResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ModifyDeviceResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + ModifyDeviceResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ModifyDeviceRequest request) throws Exception { + HttpRequest req = buildRequest(request, ModifyDeviceRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ModifyDeviceRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ModifyDeviceResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ModifyDeviceResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ModifyDeviceResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ModifyDeviceResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/MoveCollectionItem.java b/src/main/java/dev/plexapi/sdk/operations/MoveCollectionItem.java new file mode 100644 index 00000000..c21ac1da --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/MoveCollectionItem.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.MoveCollectionItemRequest; +import dev.plexapi.sdk.models.operations.MoveCollectionItemResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class MoveCollectionItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "moveCollectionItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "moveCollectionItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "moveCollectionItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/collections/{collectionId}/items/{itemId}/move", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(MoveCollectionItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, MoveCollectionItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(MoveCollectionItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public MoveCollectionItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + MoveCollectionItemResponse.Builder resBuilder = + MoveCollectionItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + MoveCollectionItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(MoveCollectionItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, MoveCollectionItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(MoveCollectionItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.MoveCollectionItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.MoveCollectionItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.MoveCollectionItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/MoveHub.java b/src/main/java/dev/plexapi/sdk/operations/MoveHub.java new file mode 100644 index 00000000..6b480ed6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/MoveHub.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.MoveHubRequest; +import dev.plexapi.sdk.models.operations.MoveHubResponse; +import dev.plexapi.sdk.models.shared.GetResponses200; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class MoveHub { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "moveHub", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "moveHub", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "moveHub", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/hubs/sections/{sectionId}/manage/move", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(MoveHubRequest request) throws Exception { + HttpRequest req = buildRequest(request, MoveHubRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(MoveHubRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public MoveHubResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + MoveHubResponse.Builder resBuilder = + MoveHubResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + MoveHubResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + GetResponses200 out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withGetResponses200(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(MoveHubRequest request) throws Exception { + HttpRequest req = buildRequest(request, MoveHubRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(MoveHubRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.MoveHubResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.MoveHubResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.MoveHubResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + GetResponses200 out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withGetResponses200(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/MovePlayQueueItem.java b/src/main/java/dev/plexapi/sdk/operations/MovePlayQueueItem.java new file mode 100644 index 00000000..ebcef7e4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/MovePlayQueueItem.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.MovePlayQueueItemRequest; +import dev.plexapi.sdk.models.operations.MovePlayQueueItemResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class MovePlayQueueItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "movePlayQueueItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "movePlayQueueItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "movePlayQueueItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playQueues/{playQueueId}/items/{playQueueItemId}/move", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(MovePlayQueueItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, MovePlayQueueItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(MovePlayQueueItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public MovePlayQueueItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + MovePlayQueueItemResponse.Builder resBuilder = + MovePlayQueueItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + MovePlayQueueItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(MovePlayQueueItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, MovePlayQueueItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(MovePlayQueueItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.MovePlayQueueItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.MovePlayQueueItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.MovePlayQueueItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/MovePlaylistItem.java b/src/main/java/dev/plexapi/sdk/operations/MovePlaylistItem.java new file mode 100644 index 00000000..d2bf7cbd --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/MovePlaylistItem.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.MovePlaylistItemRequest; +import dev.plexapi.sdk.models.operations.MovePlaylistItemResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class MovePlaylistItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "movePlaylistItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "movePlaylistItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "movePlaylistItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playlists/{playlistId}/items/{playlistItemId}/move", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(MovePlaylistItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, MovePlaylistItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(MovePlaylistItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public MovePlaylistItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + MovePlaylistItemResponse.Builder resBuilder = + MovePlaylistItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + MovePlaylistItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(MovePlaylistItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, MovePlaylistItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(MovePlaylistItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.MovePlaylistItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.MovePlaylistItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.MovePlaylistItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/OptimizeDatabase.java b/src/main/java/dev/plexapi/sdk/operations/OptimizeDatabase.java new file mode 100644 index 00000000..2794576f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/OptimizeDatabase.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.OptimizeDatabaseRequest; +import dev.plexapi.sdk.models.operations.OptimizeDatabaseResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class OptimizeDatabase { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "optimizeDatabase", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "optimizeDatabase", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "optimizeDatabase", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/optimize"); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(OptimizeDatabaseRequest request) throws Exception { + HttpRequest req = buildRequest(request, OptimizeDatabaseRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(OptimizeDatabaseRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public OptimizeDatabaseResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + OptimizeDatabaseResponse.Builder resBuilder = + OptimizeDatabaseResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + OptimizeDatabaseResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(OptimizeDatabaseRequest request) throws Exception { + HttpRequest req = buildRequest(request, OptimizeDatabaseRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(OptimizeDatabaseRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.OptimizeDatabaseResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.OptimizeDatabaseResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.OptimizeDatabaseResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/PerformSearch.java b/src/main/java/dev/plexapi/sdk/operations/PerformSearch.java deleted file mode 100644 index 99ae86f7..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/PerformSearch.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.PerformSearchBadRequest; -import dev.plexapi.sdk.models.errors.PerformSearchUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.PerformSearchRequest; -import dev.plexapi.sdk.models.operations.PerformSearchResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class PerformSearch { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "performSearch", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "performSearch", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "performSearch", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/hubs/search"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(PerformSearchRequest request) throws Exception { - HttpRequest req = buildRequest(request, PerformSearchRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(PerformSearchRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public PerformSearchResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - PerformSearchResponse.Builder resBuilder = - PerformSearchResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - PerformSearchResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - PerformSearchBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - PerformSearchUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(PerformSearchRequest request) throws Exception { - HttpRequest req = buildRequest(request, PerformSearchRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(PerformSearchRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.PerformSearchResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.PerformSearchResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.PerformSearchResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.PerformSearchBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.PerformSearchUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/PerformVoiceSearch.java b/src/main/java/dev/plexapi/sdk/operations/PerformVoiceSearch.java deleted file mode 100644 index 49f324ee..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/PerformVoiceSearch.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.PerformVoiceSearchBadRequest; -import dev.plexapi.sdk.models.errors.PerformVoiceSearchUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.PerformVoiceSearchRequest; -import dev.plexapi.sdk.models.operations.PerformVoiceSearchResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class PerformVoiceSearch { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "performVoiceSearch", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "performVoiceSearch", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "performVoiceSearch", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/hubs/search/voice"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(PerformVoiceSearchRequest request) throws Exception { - HttpRequest req = buildRequest(request, PerformVoiceSearchRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(PerformVoiceSearchRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public PerformVoiceSearchResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - PerformVoiceSearchResponse.Builder resBuilder = - PerformVoiceSearchResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - PerformVoiceSearchResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - PerformVoiceSearchBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - PerformVoiceSearchUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(PerformVoiceSearchRequest request) throws Exception { - HttpRequest req = buildRequest(request, PerformVoiceSearchRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(PerformVoiceSearchRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.PerformVoiceSearchResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.PerformVoiceSearchResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.PerformVoiceSearchResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.PerformVoiceSearchBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.PerformVoiceSearchUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/PostMediaArts.java b/src/main/java/dev/plexapi/sdk/operations/PostMediaArts.java deleted file mode 100644 index b547b40c..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/PostMediaArts.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.PostMediaArtsRequest; -import dev.plexapi.sdk.models.operations.PostMediaArtsResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.SerializedBody; -import dev.plexapi.sdk.utils.Utils.JsonShape; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.Object; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class PostMediaArts { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "post-media-arts", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "post-media-arts", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "post-media-arts", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/metadata/{ratingKey}/arts", - request, null); - HTTPRequest req = new HTTPRequest(url, "POST"); - Object convertedRequest = Utils.convertToShape( - request, - JsonShape.DEFAULT, - typeReference); - SerializedBody serializedRequestBody = Utils.serializeRequestBody( - convertedRequest, - "requestBody", - "raw", - false); - req.setBody(Optional.ofNullable(serializedRequestBody)); - req.addHeader("Accept", "*/*") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(PostMediaArtsRequest request) throws Exception { - HttpRequest req = buildRequest(request, PostMediaArtsRequest.class, new TypeReference() {}); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(PostMediaArtsRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public PostMediaArtsResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - PostMediaArtsResponse.Builder resBuilder = - PostMediaArtsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - PostMediaArtsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(PostMediaArtsRequest request) throws Exception { - HttpRequest req = buildRequest(request, PostMediaArtsRequest.class, new TypeReference() {}); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(PostMediaArtsRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.PostMediaArtsResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.PostMediaArtsResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.PostMediaArtsResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/PostMediaPoster.java b/src/main/java/dev/plexapi/sdk/operations/PostMediaPoster.java deleted file mode 100644 index af26cea5..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/PostMediaPoster.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.PostMediaPosterRequest; -import dev.plexapi.sdk.models.operations.PostMediaPosterResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.SerializedBody; -import dev.plexapi.sdk.utils.Utils.JsonShape; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.Object; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class PostMediaPoster { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "post-media-poster", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "post-media-poster", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "post-media-poster", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/library/metadata/{ratingKey}/posters", - request, null); - HTTPRequest req = new HTTPRequest(url, "POST"); - Object convertedRequest = Utils.convertToShape( - request, - JsonShape.DEFAULT, - typeReference); - SerializedBody serializedRequestBody = Utils.serializeRequestBody( - convertedRequest, - "requestBody", - "raw", - false); - req.setBody(Optional.ofNullable(serializedRequestBody)); - req.addHeader("Accept", "*/*") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(PostMediaPosterRequest request) throws Exception { - HttpRequest req = buildRequest(request, PostMediaPosterRequest.class, new TypeReference() {}); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(PostMediaPosterRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public PostMediaPosterResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - PostMediaPosterResponse.Builder resBuilder = - PostMediaPosterResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - PostMediaPosterResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(PostMediaPosterRequest request) throws Exception { - HttpRequest req = buildRequest(request, PostMediaPosterRequest.class, new TypeReference() {}); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(PostMediaPosterRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.PostMediaPosterResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.PostMediaPosterResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.PostMediaPosterResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/PostUsersSignInData.java b/src/main/java/dev/plexapi/sdk/operations/PostUsersSignInData.java deleted file mode 100644 index 0ad17a58..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/PostUsersSignInData.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.PostUsersSignInDataBadRequest; -import dev.plexapi.sdk.models.errors.PostUsersSignInDataUnauthorized; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataUserPlexAccount; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.SerializedBody; -import dev.plexapi.sdk.utils.Utils.JsonShape; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.Object; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class PostUsersSignInData { - - /** - * POST_USERS_SIGN_IN_DATA_SERVERS contains the list of server urls available to the SDK. - */ - public static final String[] POST_USERS_SIGN_IN_DATA_SERVERS = { - "https://plex.tv/api/v2", - }; - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration, Optional serverURL) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = serverURL - .filter(u -> !u.isBlank()) - .orElse(Utils.templateUrl( - POST_USERS_SIGN_IN_DATA_SERVERS[0], - Map.of())); - this.securitySource = null; - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "post-users-sign-in-data", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "post-users-sign-in-data", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "post-users-sign-in-data", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/users/signin"); - HTTPRequest req = new HTTPRequest(url, "POST"); - Object convertedRequest = Utils.convertToShape( - request, - JsonShape.DEFAULT, - typeReference); - SerializedBody serializedRequestBody = Utils.serializeRequestBody( - convertedRequest, - "requestBody", - "form", - false); - req.setBody(Optional.ofNullable(serializedRequestBody)); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private HttpRequest onBuildRequest(PostUsersSignInDataRequest request) throws Exception { - HttpRequest req = buildRequest(request, new TypeReference() {}); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(PostUsersSignInDataRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public PostUsersSignInDataResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - PostUsersSignInDataResponse.Builder resBuilder = - PostUsersSignInDataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - PostUsersSignInDataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "201")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - PostUsersSignInDataUserPlexAccount out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - res.withUserPlexAccount(out); - return res; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - PostUsersSignInDataBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - PostUsersSignInDataUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration, Optional serverURL) { - super(sdkConfiguration, serverURL); - } - - private CompletableFuture onBuildRequest(PostUsersSignInDataRequest request) throws Exception { - HttpRequest req = buildRequest(request, new TypeReference() {}); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(PostUsersSignInDataRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.PostUsersSignInDataResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.PostUsersSignInDataResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.PostUsersSignInDataResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "201")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - try { - PostUsersSignInDataUserPlexAccount out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - res.withUserPlexAccount(out); - return res; - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.PostUsersSignInDataBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.PostUsersSignInDataUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/ProcessSubscriptions.java b/src/main/java/dev/plexapi/sdk/operations/ProcessSubscriptions.java new file mode 100644 index 00000000..db099f80 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ProcessSubscriptions.java @@ -0,0 +1,249 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ProcessSubscriptionsResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ProcessSubscriptions { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "processSubscriptions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "processSubscriptions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "processSubscriptions", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/subscriptions/process"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ProcessSubscriptionsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ProcessSubscriptionsResponse.Builder resBuilder = + ProcessSubscriptionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ProcessSubscriptionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ProcessSubscriptionsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ProcessSubscriptionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ProcessSubscriptionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/RefreshItemsMetadata.java b/src/main/java/dev/plexapi/sdk/operations/RefreshItemsMetadata.java new file mode 100644 index 00000000..7296361a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/RefreshItemsMetadata.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.RefreshItemsMetadataRequest; +import dev.plexapi.sdk.models.operations.RefreshItemsMetadataResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class RefreshItemsMetadata { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshItemsMetadata", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshItemsMetadata", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshItemsMetadata", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/refresh", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(RefreshItemsMetadataRequest request) throws Exception { + HttpRequest req = buildRequest(request, RefreshItemsMetadataRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(RefreshItemsMetadataRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public RefreshItemsMetadataResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RefreshItemsMetadataResponse.Builder resBuilder = + RefreshItemsMetadataResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RefreshItemsMetadataResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(RefreshItemsMetadataRequest request) throws Exception { + HttpRequest req = buildRequest(request, RefreshItemsMetadataRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(RefreshItemsMetadataRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.RefreshItemsMetadataResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.RefreshItemsMetadataResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.RefreshItemsMetadataResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/RefreshPlaylist.java b/src/main/java/dev/plexapi/sdk/operations/RefreshPlaylist.java new file mode 100644 index 00000000..da75ee76 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/RefreshPlaylist.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.RefreshPlaylistRequest; +import dev.plexapi.sdk.models.operations.RefreshPlaylistResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class RefreshPlaylist { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshPlaylist", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshPlaylist", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshPlaylist", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playlists/{playlistId}/items/{generatorId}/{metadataId}/{action}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(RefreshPlaylistRequest request) throws Exception { + HttpRequest req = buildRequest(request, RefreshPlaylistRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(RefreshPlaylistRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public RefreshPlaylistResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RefreshPlaylistResponse.Builder resBuilder = + RefreshPlaylistResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RefreshPlaylistResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(RefreshPlaylistRequest request) throws Exception { + HttpRequest req = buildRequest(request, RefreshPlaylistRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(RefreshPlaylistRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.RefreshPlaylistResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.RefreshPlaylistResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.RefreshPlaylistResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/RefreshProviders.java b/src/main/java/dev/plexapi/sdk/operations/RefreshProviders.java new file mode 100644 index 00000000..378d3a1e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/RefreshProviders.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.RefreshProvidersResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class RefreshProviders { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshProviders", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshProviders", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshProviders", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/media/providers/refresh"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public RefreshProvidersResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RefreshProvidersResponse.Builder resBuilder = + RefreshProvidersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RefreshProvidersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.RefreshProvidersResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.RefreshProvidersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.RefreshProvidersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/RefreshSection.java b/src/main/java/dev/plexapi/sdk/operations/RefreshSection.java new file mode 100644 index 00000000..d3b94303 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/RefreshSection.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.RefreshSectionRequest; +import dev.plexapi.sdk.models.operations.RefreshSectionResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class RefreshSection { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshSection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshSection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshSection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/refresh", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(RefreshSectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, RefreshSectionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(RefreshSectionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public RefreshSectionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RefreshSectionResponse.Builder resBuilder = + RefreshSectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RefreshSectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(RefreshSectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, RefreshSectionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(RefreshSectionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.RefreshSectionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.RefreshSectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.RefreshSectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/RefreshSectionsMetadata.java b/src/main/java/dev/plexapi/sdk/operations/RefreshSectionsMetadata.java new file mode 100644 index 00000000..11de8640 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/RefreshSectionsMetadata.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataRequest; +import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class RefreshSectionsMetadata { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshSectionsMetadata", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshSectionsMetadata", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "refreshSectionsMetadata", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/sections/refresh"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(RefreshSectionsMetadataRequest request) throws Exception { + HttpRequest req = buildRequest(request, RefreshSectionsMetadataRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(RefreshSectionsMetadataRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "503", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public RefreshSectionsMetadataResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RefreshSectionsMetadataResponse.Builder resBuilder = + RefreshSectionsMetadataResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RefreshSectionsMetadataResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "503", "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(RefreshSectionsMetadataRequest request) throws Exception { + HttpRequest req = buildRequest(request, RefreshSectionsMetadataRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(RefreshSectionsMetadataRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.RefreshSectionsMetadataResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.RefreshSectionsMetadataResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.RefreshSectionsMetadataResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "503", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ReloadGuide.java b/src/main/java/dev/plexapi/sdk/operations/ReloadGuide.java new file mode 100644 index 00000000..037a08e1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ReloadGuide.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ReloadGuideRequest; +import dev.plexapi.sdk.models.operations.ReloadGuideResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ReloadGuide { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "reloadGuide", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "reloadGuide", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "reloadGuide", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/dvrs/{dvrId}/reloadGuide", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ReloadGuideRequest request) throws Exception { + HttpRequest req = buildRequest(request, ReloadGuideRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ReloadGuideRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ReloadGuideResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ReloadGuideResponse.Builder resBuilder = + ReloadGuideResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ReloadGuideResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ReloadGuideRequest request) throws Exception { + HttpRequest req = buildRequest(request, ReloadGuideRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ReloadGuideRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ReloadGuideResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ReloadGuideResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ReloadGuideResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/RemoveDevice.java b/src/main/java/dev/plexapi/sdk/operations/RemoveDevice.java new file mode 100644 index 00000000..e26504d0 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/RemoveDevice.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.RemoveDeviceRequest; +import dev.plexapi.sdk.models.operations.RemoveDeviceResponse; +import dev.plexapi.sdk.models.operations.RemoveDeviceResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class RemoveDevice { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "removeDevice", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "removeDevice", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "removeDevice", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/grabbers/devices/{deviceId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(RemoveDeviceRequest request) throws Exception { + HttpRequest req = buildRequest(request, RemoveDeviceRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(RemoveDeviceRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public RemoveDeviceResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RemoveDeviceResponse.Builder resBuilder = + RemoveDeviceResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RemoveDeviceResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + RemoveDeviceResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(RemoveDeviceRequest request) throws Exception { + HttpRequest req = buildRequest(request, RemoveDeviceRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(RemoveDeviceRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.RemoveDeviceResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.RemoveDeviceResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.RemoveDeviceResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + RemoveDeviceResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/RemoveDeviceFromDVR.java b/src/main/java/dev/plexapi/sdk/operations/RemoveDeviceFromDVR.java new file mode 100644 index 00000000..3c562394 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/RemoveDeviceFromDVR.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRRequest; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRResponse; +import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class RemoveDeviceFromDVR { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "removeDeviceFromDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "removeDeviceFromDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "removeDeviceFromDVR", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/dvrs/{dvrId}/devices/{deviceId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(RemoveDeviceFromDVRRequest request) throws Exception { + HttpRequest req = buildRequest(request, RemoveDeviceFromDVRRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(RemoveDeviceFromDVRRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public RemoveDeviceFromDVRResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RemoveDeviceFromDVRResponse.Builder resBuilder = + RemoveDeviceFromDVRResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RemoveDeviceFromDVRResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + RemoveDeviceFromDVRResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(RemoveDeviceFromDVRRequest request) throws Exception { + HttpRequest req = buildRequest(request, RemoveDeviceFromDVRRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(RemoveDeviceFromDVRRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.RemoveDeviceFromDVRResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.RemoveDeviceFromDVRResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.RemoveDeviceFromDVRResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + RemoveDeviceFromDVRResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/RemoveDownloadQueueItems.java b/src/main/java/dev/plexapi/sdk/operations/RemoveDownloadQueueItems.java new file mode 100644 index 00000000..35612900 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/RemoveDownloadQueueItems.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class RemoveDownloadQueueItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "removeDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "removeDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "removeDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/downloadQueue/{queueId}/items/{itemId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(RemoveDownloadQueueItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, RemoveDownloadQueueItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(RemoveDownloadQueueItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public RemoveDownloadQueueItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RemoveDownloadQueueItemsResponse.Builder resBuilder = + RemoveDownloadQueueItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RemoveDownloadQueueItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(RemoveDownloadQueueItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, RemoveDownloadQueueItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(RemoveDownloadQueueItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.RemoveDownloadQueueItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.RemoveDownloadQueueItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.RemoveDownloadQueueItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ReorderSubscription.java b/src/main/java/dev/plexapi/sdk/operations/ReorderSubscription.java new file mode 100644 index 00000000..d78523b9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ReorderSubscription.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ReorderSubscriptionRequest; +import dev.plexapi.sdk.models.operations.ReorderSubscriptionResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithSubscription; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ReorderSubscription { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "reorderSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "reorderSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "reorderSubscription", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/subscriptions/{subscriptionId}/move", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ReorderSubscriptionRequest request) throws Exception { + HttpRequest req = buildRequest(request, ReorderSubscriptionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ReorderSubscriptionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ReorderSubscriptionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ReorderSubscriptionResponse.Builder resBuilder = + ReorderSubscriptionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ReorderSubscriptionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithSubscription out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithSubscription(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ReorderSubscriptionRequest request) throws Exception { + HttpRequest req = buildRequest(request, ReorderSubscriptionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ReorderSubscriptionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ReorderSubscriptionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ReorderSubscriptionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ReorderSubscriptionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithSubscription out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithSubscription(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/Report.java b/src/main/java/dev/plexapi/sdk/operations/Report.java new file mode 100644 index 00000000..b6d5a2dc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/Report.java @@ -0,0 +1,283 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ReportRequest; +import dev.plexapi.sdk.models.operations.ReportResponse; +import dev.plexapi.sdk.models.operations.ReportResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class Report { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "report", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "report", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "report", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/:/timeline"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ReportRequest request) throws Exception { + HttpRequest req = buildRequest(request, ReportRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ReportRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ReportResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ReportResponse.Builder resBuilder = + ReportResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ReportResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + ReportResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ReportRequest request) throws Exception { + HttpRequest req = buildRequest(request, ReportRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ReportRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ReportResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ReportResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ReportResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + ReportResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ResetPlayQueue.java b/src/main/java/dev/plexapi/sdk/operations/ResetPlayQueue.java new file mode 100644 index 00000000..7e4dd9b6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ResetPlayQueue.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ResetPlayQueueRequest; +import dev.plexapi.sdk.models.operations.ResetPlayQueueResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ResetPlayQueue { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "resetPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "resetPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "resetPlayQueue", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playQueues/{playQueueId}/reset", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ResetPlayQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, ResetPlayQueueRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ResetPlayQueueRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ResetPlayQueueResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ResetPlayQueueResponse.Builder resBuilder = + ResetPlayQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ResetPlayQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ResetPlayQueueRequest request) throws Exception { + HttpRequest req = buildRequest(request, ResetPlayQueueRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ResetPlayQueueRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ResetPlayQueueResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ResetPlayQueueResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ResetPlayQueueResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/ResetSectionDefaults.java b/src/main/java/dev/plexapi/sdk/operations/ResetSectionDefaults.java new file mode 100644 index 00000000..5255d58f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/ResetSectionDefaults.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ResetSectionDefaultsRequest; +import dev.plexapi.sdk.models.operations.ResetSectionDefaultsResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class ResetSectionDefaults { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "resetSectionDefaults", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "resetSectionDefaults", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "resetSectionDefaults", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/hubs/sections/{sectionId}/manage", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ResetSectionDefaultsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ResetSectionDefaultsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ResetSectionDefaultsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ResetSectionDefaultsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ResetSectionDefaultsResponse.Builder resBuilder = + ResetSectionDefaultsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ResetSectionDefaultsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ResetSectionDefaultsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ResetSectionDefaultsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ResetSectionDefaultsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ResetSectionDefaultsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ResetSectionDefaultsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ResetSectionDefaultsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/RestartProcessingDownloadQueueItems.java b/src/main/java/dev/plexapi/sdk/operations/RestartProcessingDownloadQueueItems.java new file mode 100644 index 00000000..b82b5f15 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/RestartProcessingDownloadQueueItems.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsRequest; +import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class RestartProcessingDownloadQueueItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "restartProcessingDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "restartProcessingDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "restartProcessingDownloadQueueItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/downloadQueue/{queueId}/items/{itemId}/restart", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(RestartProcessingDownloadQueueItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, RestartProcessingDownloadQueueItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(RestartProcessingDownloadQueueItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public RestartProcessingDownloadQueueItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RestartProcessingDownloadQueueItemsResponse.Builder resBuilder = + RestartProcessingDownloadQueueItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RestartProcessingDownloadQueueItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(RestartProcessingDownloadQueueItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, RestartProcessingDownloadQueueItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(RestartProcessingDownloadQueueItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.RestartProcessingDownloadQueueItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.RestartProcessingDownloadQueueItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.RestartProcessingDownloadQueueItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/Scan.java b/src/main/java/dev/plexapi/sdk/operations/Scan.java new file mode 100644 index 00000000..775ff99b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/Scan.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ScanRequest; +import dev.plexapi.sdk.models.operations.ScanResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class Scan { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "scan", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "scan", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "scan", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/grabbers/devices/{deviceId}/scan", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ScanRequest request) throws Exception { + HttpRequest req = buildRequest(request, ScanRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ScanRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ScanResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ScanResponse.Builder resBuilder = + ScanResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ScanResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithDevice out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ScanRequest request) throws Exception { + HttpRequest req = buildRequest(request, ScanRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ScanRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ScanResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ScanResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ScanResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithDevice out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SearchHubs.java b/src/main/java/dev/plexapi/sdk/operations/SearchHubs.java new file mode 100644 index 00000000..a68589ed --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SearchHubs.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SearchHubsRequest; +import dev.plexapi.sdk.models.operations.SearchHubsResponse; +import dev.plexapi.sdk.models.operations.SearchHubsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SearchHubs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "searchHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "searchHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "searchHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/hubs/search"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SearchHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, SearchHubsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SearchHubsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SearchHubsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SearchHubsResponse.Builder resBuilder = + SearchHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SearchHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + SearchHubsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SearchHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, SearchHubsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SearchHubsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SearchHubsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SearchHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SearchHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + SearchHubsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SetChannelmap.java b/src/main/java/dev/plexapi/sdk/operations/SetChannelmap.java new file mode 100644 index 00000000..48779ed8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SetChannelmap.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SetChannelmapRequest; +import dev.plexapi.sdk.models.operations.SetChannelmapResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SetChannelmap { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setChannelmap", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setChannelmap", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setChannelmap", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/grabbers/devices/{deviceId}/channelmap", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SetChannelmapRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetChannelmapRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SetChannelmapRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SetChannelmapResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SetChannelmapResponse.Builder resBuilder = + SetChannelmapResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SetChannelmapResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithDevice out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SetChannelmapRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetChannelmapRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SetChannelmapRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SetChannelmapResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SetChannelmapResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SetChannelmapResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithDevice out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SetDVRPreferences.java b/src/main/java/dev/plexapi/sdk/operations/SetDVRPreferences.java new file mode 100644 index 00000000..2342e0c4 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SetDVRPreferences.java @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesResponse; +import dev.plexapi.sdk.models.operations.SetDVRPreferencesResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SetDVRPreferences { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setDVRPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setDVRPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setDVRPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/dvrs/{dvrId}/prefs", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SetDVRPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetDVRPreferencesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SetDVRPreferencesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SetDVRPreferencesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SetDVRPreferencesResponse.Builder resBuilder = + SetDVRPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SetDVRPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + SetDVRPreferencesResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SetDVRPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetDVRPreferencesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SetDVRPreferencesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SetDVRPreferencesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SetDVRPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SetDVRPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + SetDVRPreferencesResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SetDevicePreferences.java b/src/main/java/dev/plexapi/sdk/operations/SetDevicePreferences.java new file mode 100644 index 00000000..a5199fb9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SetDevicePreferences.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SetDevicePreferencesRequest; +import dev.plexapi.sdk.models.operations.SetDevicePreferencesResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SetDevicePreferences { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setDevicePreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setDevicePreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setDevicePreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/grabbers/devices/{deviceId}/prefs", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SetDevicePreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetDevicePreferencesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SetDevicePreferencesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SetDevicePreferencesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SetDevicePreferencesResponse.Builder resBuilder = + SetDevicePreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SetDevicePreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SetDevicePreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetDevicePreferencesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SetDevicePreferencesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SetDevicePreferencesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SetDevicePreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SetDevicePreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SetItemArtwork.java b/src/main/java/dev/plexapi/sdk/operations/SetItemArtwork.java new file mode 100644 index 00000000..b73b616d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SetItemArtwork.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SetItemArtworkRequest; +import dev.plexapi.sdk.models.operations.SetItemArtworkResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SetItemArtwork { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setItemArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setItemArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setItemArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/{element}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SetItemArtworkRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetItemArtworkRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SetItemArtworkRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SetItemArtworkResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SetItemArtworkResponse.Builder resBuilder = + SetItemArtworkResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SetItemArtworkResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SetItemArtworkRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetItemArtworkRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SetItemArtworkRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SetItemArtworkResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SetItemArtworkResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SetItemArtworkResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SetItemPreferences.java b/src/main/java/dev/plexapi/sdk/operations/SetItemPreferences.java new file mode 100644 index 00000000..6723428c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SetItemPreferences.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SetItemPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetItemPreferencesResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SetItemPreferences { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setItemPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setItemPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setItemPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/prefs", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SetItemPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetItemPreferencesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SetItemPreferencesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SetItemPreferencesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SetItemPreferencesResponse.Builder resBuilder = + SetItemPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SetItemPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SetItemPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetItemPreferencesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SetItemPreferencesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SetItemPreferencesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SetItemPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SetItemPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SetPreferences.java b/src/main/java/dev/plexapi/sdk/operations/SetPreferences.java new file mode 100644 index 00000000..5c7b7dc1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SetPreferences.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SetPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetPreferencesResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SetPreferences { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/:/prefs"); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SetPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetPreferencesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SetPreferencesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SetPreferencesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SetPreferencesResponse.Builder resBuilder = + SetPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SetPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SetPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetPreferencesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SetPreferencesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SetPreferencesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SetPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SetPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SetRating.java b/src/main/java/dev/plexapi/sdk/operations/SetRating.java new file mode 100644 index 00000000..adaad10f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SetRating.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SetRatingRequest; +import dev.plexapi.sdk.models.operations.SetRatingResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SetRating { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setRating", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setRating", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setRating", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/:/rate"); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SetRatingRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetRatingRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SetRatingRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SetRatingResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SetRatingResponse.Builder resBuilder = + SetRatingResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SetRatingResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SetRatingRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetRatingRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SetRatingRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SetRatingResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SetRatingResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SetRatingResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SetSectionPreferences.java b/src/main/java/dev/plexapi/sdk/operations/SetSectionPreferences.java new file mode 100644 index 00000000..f3fcec27 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SetSectionPreferences.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SetSectionPreferencesRequest; +import dev.plexapi.sdk.models.operations.SetSectionPreferencesResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SetSectionPreferences { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setSectionPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setSectionPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setSectionPreferences", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/prefs", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SetSectionPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetSectionPreferencesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SetSectionPreferencesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SetSectionPreferencesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SetSectionPreferencesResponse.Builder resBuilder = + SetSectionPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SetSectionPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SetSectionPreferencesRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetSectionPreferencesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SetSectionPreferencesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SetSectionPreferencesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SetSectionPreferencesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SetSectionPreferencesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SetStreamOffset.java b/src/main/java/dev/plexapi/sdk/operations/SetStreamOffset.java new file mode 100644 index 00000000..b01b7f3d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SetStreamOffset.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SetStreamOffsetRequest; +import dev.plexapi.sdk.models.operations.SetStreamOffsetResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SetStreamOffset { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setStreamOffset", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setStreamOffset", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setStreamOffset", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/streams/{streamId}.{ext}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SetStreamOffsetRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetStreamOffsetRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SetStreamOffsetRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SetStreamOffsetResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SetStreamOffsetResponse.Builder resBuilder = + SetStreamOffsetResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SetStreamOffsetResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SetStreamOffsetRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetStreamOffsetRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SetStreamOffsetRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SetStreamOffsetResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SetStreamOffsetResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SetStreamOffsetResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SetStreamSelection.java b/src/main/java/dev/plexapi/sdk/operations/SetStreamSelection.java new file mode 100644 index 00000000..0d5d2b03 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SetStreamSelection.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SetStreamSelectionRequest; +import dev.plexapi.sdk.models.operations.SetStreamSelectionResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SetStreamSelection { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setStreamSelection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setStreamSelection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "setStreamSelection", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/parts/{partId}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SetStreamSelectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetStreamSelectionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SetStreamSelectionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SetStreamSelectionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SetStreamSelectionResponse.Builder resBuilder = + SetStreamSelectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SetStreamSelectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SetStreamSelectionRequest request) throws Exception { + HttpRequest req = buildRequest(request, SetStreamSelectionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SetStreamSelectionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SetStreamSelectionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SetStreamSelectionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SetStreamSelectionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/Shuffle.java b/src/main/java/dev/plexapi/sdk/operations/Shuffle.java new file mode 100644 index 00000000..51563366 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/Shuffle.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.ShuffleRequest; +import dev.plexapi.sdk.models.operations.ShuffleResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class Shuffle { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "shuffle", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "shuffle", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "shuffle", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playQueues/{playQueueId}/shuffle", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(ShuffleRequest request) throws Exception { + HttpRequest req = buildRequest(request, ShuffleRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ShuffleRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public ShuffleResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ShuffleResponse.Builder resBuilder = + ShuffleResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ShuffleResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(ShuffleRequest request) throws Exception { + HttpRequest req = buildRequest(request, ShuffleRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(ShuffleRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.ShuffleResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.ShuffleResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.ShuffleResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/SplitItem.java b/src/main/java/dev/plexapi/sdk/operations/SplitItem.java new file mode 100644 index 00000000..ca35748c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/SplitItem.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.SplitItemRequest; +import dev.plexapi.sdk.models.operations.SplitItemResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class SplitItem { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "splitItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "splitItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "splitItem", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/split", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(SplitItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, SplitItemRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SplitItemRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public SplitItemResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SplitItemResponse.Builder resBuilder = + SplitItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SplitItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(SplitItemRequest request) throws Exception { + HttpRequest req = buildRequest(request, SplitItemRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SplitItemRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.SplitItemResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.SplitItemResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.SplitItemResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/StartAllTasks.java b/src/main/java/dev/plexapi/sdk/operations/StartAllTasks.java deleted file mode 100644 index 136d729e..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/StartAllTasks.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.errors.StartAllTasksBadRequest; -import dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized; -import dev.plexapi.sdk.models.operations.StartAllTasksResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class StartAllTasks { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "startAllTasks", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "startAllTasks", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "startAllTasks", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/butler"); - HTTPRequest req = new HTTPRequest(url, "POST"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public StartAllTasksResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - StartAllTasksResponse.Builder resBuilder = - StartAllTasksResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - StartAllTasksResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StartAllTasksBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StartAllTasksUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.StartAllTasksResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.StartAllTasksResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.StartAllTasksResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StartAllTasksBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StartAllTasksUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/StartAnalysis.java b/src/main/java/dev/plexapi/sdk/operations/StartAnalysis.java new file mode 100644 index 00000000..59fda079 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/StartAnalysis.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.StartAnalysisRequest; +import dev.plexapi.sdk.models.operations.StartAnalysisResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class StartAnalysis { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startAnalysis", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startAnalysis", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startAnalysis", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/analyze", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(StartAnalysisRequest request) throws Exception { + HttpRequest req = buildRequest(request, StartAnalysisRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(StartAnalysisRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public StartAnalysisResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + StartAnalysisResponse.Builder resBuilder = + StartAnalysisResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + StartAnalysisResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(StartAnalysisRequest request) throws Exception { + HttpRequest req = buildRequest(request, StartAnalysisRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(StartAnalysisRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.StartAnalysisResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.StartAnalysisResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.StartAnalysisResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/StartBifGeneration.java b/src/main/java/dev/plexapi/sdk/operations/StartBifGeneration.java new file mode 100644 index 00000000..980b5b81 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/StartBifGeneration.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.StartBifGenerationRequest; +import dev.plexapi.sdk.models.operations.StartBifGenerationResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class StartBifGeneration { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startBifGeneration", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startBifGeneration", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startBifGeneration", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/index", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(StartBifGenerationRequest request) throws Exception { + HttpRequest req = buildRequest(request, StartBifGenerationRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(StartBifGenerationRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public StartBifGenerationResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + StartBifGenerationResponse.Builder resBuilder = + StartBifGenerationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + StartBifGenerationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(StartBifGenerationRequest request) throws Exception { + HttpRequest req = buildRequest(request, StartBifGenerationRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(StartBifGenerationRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.StartBifGenerationResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.StartBifGenerationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.StartBifGenerationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/StartTask.java b/src/main/java/dev/plexapi/sdk/operations/StartTask.java index 493eadb0..cd9c0657 100644 --- a/src/main/java/dev/plexapi/sdk/operations/StartTask.java +++ b/src/main/java/dev/plexapi/sdk/operations/StartTask.java @@ -6,12 +6,9 @@ package dev.plexapi.sdk.operations; import static dev.plexapi.sdk.operations.Operations.RequestOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.errors.StartTaskBadRequest; -import dev.plexapi.sdk.models.errors.StartTaskUnauthorized; import dev.plexapi.sdk.models.operations.StartTaskRequest; import dev.plexapi.sdk.models.operations.StartTaskResponse; import dev.plexapi.sdk.utils.Blob; @@ -24,7 +21,6 @@ import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; import java.lang.Exception; -import java.lang.RuntimeException; import java.lang.String; import java.lang.Throwable; import java.net.http.HttpRequest; @@ -84,11 +80,12 @@ public class StartTask { String url = Utils.generateURL( klass, this.baseUrl, - "/butler/{taskName}", - request, null); + "/butler/{task}", + request, this.sdkConfiguration.globals); HTTPRequest req = new HTTPRequest(url, "POST"); - req.addHeader("Accept", "application/json") + req.addHeader("Accept", "*/*") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -123,7 +120,7 @@ public class StartTask { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -156,43 +153,7 @@ public class StartTask { return res; } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StartTaskBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StartTaskUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { // no content throw new SDKError( response, @@ -244,7 +205,7 @@ public class StartTask { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -274,47 +235,7 @@ public class StartTask { return CompletableFuture.completedFuture(res); } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StartTaskBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StartTaskUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } diff --git a/src/main/java/dev/plexapi/sdk/operations/StartTasks.java b/src/main/java/dev/plexapi/sdk/operations/StartTasks.java new file mode 100644 index 00000000..7b02a272 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/StartTasks.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.StartTasksResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class StartTasks { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/butler"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public StartTasksResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + StartTasksResponse.Builder resBuilder = + StartTasksResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + StartTasksResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.StartTasksResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.StartTasksResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.StartTasksResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/StartTranscodeSession.java b/src/main/java/dev/plexapi/sdk/operations/StartTranscodeSession.java new file mode 100644 index 00000000..bb901099 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/StartTranscodeSession.java @@ -0,0 +1,272 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.StartTranscodeSessionRequest; +import dev.plexapi.sdk.models.operations.StartTranscodeSessionResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class StartTranscodeSession { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startTranscodeSession", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startTranscodeSession", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "startTranscodeSession", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/{transcodeType}/:/transcode/universal/start.{extension}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "video/x-matroska") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(StartTranscodeSessionRequest request) throws Exception { + HttpRequest req = buildRequest(request, StartTranscodeSessionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(StartTranscodeSessionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public StartTranscodeSessionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + StartTranscodeSessionResponse.Builder resBuilder = + StartTranscodeSessionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "video/x-matroska")) { + resBuilder.responseStream(response.body()); + } + + StartTranscodeSessionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "video/x-matroska")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(StartTranscodeSessionRequest request) throws Exception { + HttpRequest req = buildRequest(request, StartTranscodeSessionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(StartTranscodeSessionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.StartTranscodeSessionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.StartTranscodeSessionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "video/x-matroska")) { + resBuilder.responseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.StartTranscodeSessionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "video/x-matroska")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/StartUniversalTranscode.java b/src/main/java/dev/plexapi/sdk/operations/StartUniversalTranscode.java deleted file mode 100644 index ceb2c9d2..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/StartUniversalTranscode.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest; -import dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class StartUniversalTranscode { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "startUniversalTranscode", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "startUniversalTranscode", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "startUniversalTranscode", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/video/:/transcode/universal/start.mpd"); - HTTPRequest req = new HTTPRequest(url, "GET"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(StartUniversalTranscodeRequest request) throws Exception { - HttpRequest req = buildRequest(request, StartUniversalTranscodeRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(StartUniversalTranscodeRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public StartUniversalTranscodeResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - StartUniversalTranscodeResponse.Builder resBuilder = - StartUniversalTranscodeResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - StartUniversalTranscodeResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StartUniversalTranscodeBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StartUniversalTranscodeUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(StartUniversalTranscodeRequest request) throws Exception { - HttpRequest req = buildRequest(request, StartUniversalTranscodeRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(StartUniversalTranscodeRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.StartUniversalTranscodeResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.StartUniversalTranscodeResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.StartUniversalTranscodeResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StartUniversalTranscodeBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StartUniversalTranscodeUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/StopAllRefreshes.java b/src/main/java/dev/plexapi/sdk/operations/StopAllRefreshes.java new file mode 100644 index 00000000..e43ce543 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/StopAllRefreshes.java @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.StopAllRefreshesResponse; +import dev.plexapi.sdk.models.shared.RequestHandlerSlashGetResponses200; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class StopAllRefreshes { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopAllRefreshes", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopAllRefreshes", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopAllRefreshes", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/library/sections/all/refresh"); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public StopAllRefreshesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + StopAllRefreshesResponse.Builder resBuilder = + StopAllRefreshesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + StopAllRefreshesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + RequestHandlerSlashGetResponses200 out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withRequestHandlerSlashGetResponses200(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.StopAllRefreshesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.StopAllRefreshesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.StopAllRefreshesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + RequestHandlerSlashGetResponses200 out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withRequestHandlerSlashGetResponses200(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/StopAllTasks.java b/src/main/java/dev/plexapi/sdk/operations/StopAllTasks.java deleted file mode 100644 index 8771f6b0..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/StopAllTasks.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.errors.StopAllTasksBadRequest; -import dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized; -import dev.plexapi.sdk.models.operations.StopAllTasksResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class StopAllTasks { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "stopAllTasks", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "stopAllTasks", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "stopAllTasks", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest() throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/butler"); - HTTPRequest req = new HTTPRequest(url, "DELETE"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestlessOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest() throws Exception { - HttpRequest r = onBuildRequest(); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public StopAllTasksResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - StopAllTasksResponse.Builder resBuilder = - StopAllTasksResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - StopAllTasksResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StopAllTasksBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StopAllTasksUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestlessOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest() throws Exception { - HttpRequest req = buildRequest(); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest() { - return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.StopAllTasksResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.StopAllTasksResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.StopAllTasksResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StopAllTasksBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StopAllTasksUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/StopDVRReload.java b/src/main/java/dev/plexapi/sdk/operations/StopDVRReload.java new file mode 100644 index 00000000..4c2813ce --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/StopDVRReload.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.StopDVRReloadRequest; +import dev.plexapi.sdk.models.operations.StopDVRReloadResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class StopDVRReload { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopDVRReload", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopDVRReload", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopDVRReload", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/dvrs/{dvrId}/reloadGuide", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(StopDVRReloadRequest request) throws Exception { + HttpRequest req = buildRequest(request, StopDVRReloadRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(StopDVRReloadRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public StopDVRReloadResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + StopDVRReloadResponse.Builder resBuilder = + StopDVRReloadResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + StopDVRReloadResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(StopDVRReloadRequest request) throws Exception { + HttpRequest req = buildRequest(request, StopDVRReloadRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(StopDVRReloadRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.StopDVRReloadResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.StopDVRReloadResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.StopDVRReloadResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/StopScan.java b/src/main/java/dev/plexapi/sdk/operations/StopScan.java new file mode 100644 index 00000000..d6b9a013 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/StopScan.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.StopScanRequest; +import dev.plexapi.sdk.models.operations.StopScanResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithDevice; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class StopScan { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopScan", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopScan", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopScan", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/media/grabbers/devices/{deviceId}/scan", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(StopScanRequest request) throws Exception { + HttpRequest req = buildRequest(request, StopScanRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(StopScanRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public StopScanResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + StopScanResponse.Builder resBuilder = + StopScanResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + StopScanResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithDevice out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(StopScanRequest request) throws Exception { + HttpRequest req = buildRequest(request, StopScanRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(StopScanRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.StopScanResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.StopScanResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.StopScanResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithDevice out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithDevice(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/StopTask.java b/src/main/java/dev/plexapi/sdk/operations/StopTask.java index 30a5a6db..1d174e3a 100644 --- a/src/main/java/dev/plexapi/sdk/operations/StopTask.java +++ b/src/main/java/dev/plexapi/sdk/operations/StopTask.java @@ -6,12 +6,9 @@ package dev.plexapi.sdk.operations; import static dev.plexapi.sdk.operations.Operations.RequestOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.errors.StopTaskBadRequest; -import dev.plexapi.sdk.models.errors.StopTaskUnauthorized; import dev.plexapi.sdk.models.operations.StopTaskRequest; import dev.plexapi.sdk.models.operations.StopTaskResponse; import dev.plexapi.sdk.utils.Blob; @@ -24,7 +21,6 @@ import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; import java.lang.Exception; -import java.lang.RuntimeException; import java.lang.String; import java.lang.Throwable; import java.net.http.HttpRequest; @@ -84,11 +80,12 @@ public class StopTask { String url = Utils.generateURL( klass, this.baseUrl, - "/butler/{taskName}", - request, null); + "/butler/{task}", + request, this.sdkConfiguration.globals); HTTPRequest req = new HTTPRequest(url, "DELETE"); - req.addHeader("Accept", "application/json") + req.addHeader("Accept", "*/*") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -123,7 +120,7 @@ public class StopTask { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "404", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -156,42 +153,6 @@ public class StopTask { return res; } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StopTaskBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StopTaskUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { // no content throw new SDKError( @@ -244,7 +205,7 @@ public class StopTask { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "404", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -274,46 +235,6 @@ public class StopTask { return CompletableFuture.completedFuture(res); } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StopTaskBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StopTaskUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); diff --git a/src/main/java/dev/plexapi/sdk/operations/StopTasks.java b/src/main/java/dev/plexapi/sdk/operations/StopTasks.java new file mode 100644 index 00000000..993bb3a7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/StopTasks.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestlessOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestlessOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.StopTasksResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class StopTasks { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "stopTasks", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/butler"); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() throws Exception { + HttpRequest r = onBuildRequest(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public StopTasksResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + StopTasksResponse.Builder resBuilder = + StopTasksResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + StopTasksResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestlessOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest() { + return Exceptions.unchecked(() -> onBuildRequest()).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.StopTasksResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.StopTasksResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.StopTasksResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/StopTranscodeSession.java b/src/main/java/dev/plexapi/sdk/operations/StopTranscodeSession.java deleted file mode 100644 index cc2f553b..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/StopTranscodeSession.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest; -import dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized; -import dev.plexapi.sdk.models.operations.StopTranscodeSessionRequest; -import dev.plexapi.sdk.models.operations.StopTranscodeSessionResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class StopTranscodeSession { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "stopTranscodeSession", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "stopTranscodeSession", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "stopTranscodeSession", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - klass, - this.baseUrl, - "/transcode/sessions/{sessionKey}", - request, null); - HTTPRequest req = new HTTPRequest(url, "DELETE"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(StopTranscodeSessionRequest request) throws Exception { - HttpRequest req = buildRequest(request, StopTranscodeSessionRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(StopTranscodeSessionRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public StopTranscodeSessionResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - StopTranscodeSessionResponse.Builder resBuilder = - StopTranscodeSessionResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - StopTranscodeSessionResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "204")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StopTranscodeSessionBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - StopTranscodeSessionUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(StopTranscodeSessionRequest request) throws Exception { - HttpRequest req = buildRequest(request, StopTranscodeSessionRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(StopTranscodeSessionRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.StopTranscodeSessionResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.StopTranscodeSessionResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.StopTranscodeSessionResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "204")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StopTranscodeSessionBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.StopTranscodeSessionUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/TerminateSession.java b/src/main/java/dev/plexapi/sdk/operations/TerminateSession.java new file mode 100644 index 00000000..6dfad34c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/TerminateSession.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.TerminateSessionRequest; +import dev.plexapi.sdk.models.operations.TerminateSessionResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class TerminateSession { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "terminateSession", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "terminateSession", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "terminateSession", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/status/sessions/terminate"); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(TerminateSessionRequest request) throws Exception { + HttpRequest req = buildRequest(request, TerminateSessionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(TerminateSessionRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "401", "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public TerminateSessionResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + TerminateSessionResponse.Builder resBuilder = + TerminateSessionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + TerminateSessionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "401", "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(TerminateSessionRequest request) throws Exception { + HttpRequest req = buildRequest(request, TerminateSessionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(TerminateSessionRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "401", "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.TerminateSessionResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.TerminateSessionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.TerminateSessionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "401", "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/TranscodeImage.java b/src/main/java/dev/plexapi/sdk/operations/TranscodeImage.java new file mode 100644 index 00000000..adcb1e44 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/TranscodeImage.java @@ -0,0 +1,290 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.TranscodeImageRequest; +import dev.plexapi.sdk.models.operations.TranscodeImageResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class TranscodeImage { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "transcodeImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "transcodeImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "transcodeImage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/photo/:/transcode"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "image/jpeg;q=1, image/png;q=0.7, image/x-portable-pixmap;q=0") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(TranscodeImageRequest request) throws Exception { + HttpRequest req = buildRequest(request, TranscodeImageRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(TranscodeImageRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public TranscodeImageResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + TranscodeImageResponse.Builder resBuilder = + TranscodeImageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.twoHundredImageJpegResponseStream(response.body()); + } + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/png")) { + resBuilder.twoHundredImagePngResponseStream(response.body()); + } + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/x-portable-pixmap")) { + resBuilder.twoHundredImageXPortablePixmapResponseStream(response.body()); + } + + TranscodeImageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return res; + } else if (Utils.contentTypeMatches(contentType, "image/png")) { + return res; + } else if (Utils.contentTypeMatches(contentType, "image/x-portable-pixmap")) { + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(TranscodeImageRequest request) throws Exception { + HttpRequest req = buildRequest(request, TranscodeImageRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(TranscodeImageRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.TranscodeImageResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.TranscodeImageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/jpeg")) { + resBuilder.twoHundredImageJpegResponseStream(response.body()); + } + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/png")) { + resBuilder.twoHundredImagePngResponseStream(response.body()); + } + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "image/x-portable-pixmap")) { + resBuilder.twoHundredImageXPortablePixmapResponseStream(response.body()); + } + + dev.plexapi.sdk.models.operations.async.TranscodeImageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "image/jpeg")) { + return CompletableFuture.completedFuture(res); + } else if (Utils.contentTypeMatches(contentType, "image/png")) { + return CompletableFuture.completedFuture(res); + } else if (Utils.contentTypeMatches(contentType, "image/x-portable-pixmap")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/TranscodeSubtitles.java b/src/main/java/dev/plexapi/sdk/operations/TranscodeSubtitles.java new file mode 100644 index 00000000..fb4b367d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/TranscodeSubtitles.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.TranscodeSubtitlesRequest; +import dev.plexapi.sdk.models.operations.TranscodeSubtitlesResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class TranscodeSubtitles { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "transcodeSubtitles", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "transcodeSubtitles", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "transcodeSubtitles", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/{transcodeType}/:/transcode/universal/subtitles", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(TranscodeSubtitlesRequest request) throws Exception { + HttpRequest req = buildRequest(request, TranscodeSubtitlesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(TranscodeSubtitlesRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public TranscodeSubtitlesResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + TranscodeSubtitlesResponse.Builder resBuilder = + TranscodeSubtitlesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + TranscodeSubtitlesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(TranscodeSubtitlesRequest request) throws Exception { + HttpRequest req = buildRequest(request, TranscodeSubtitlesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(TranscodeSubtitlesRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.TranscodeSubtitlesResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.TranscodeSubtitlesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.TranscodeSubtitlesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/TriggerFallback.java b/src/main/java/dev/plexapi/sdk/operations/TriggerFallback.java new file mode 100644 index 00000000..171c994f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/TriggerFallback.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.TriggerFallbackRequest; +import dev.plexapi.sdk.models.operations.TriggerFallbackResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class TriggerFallback { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "triggerFallback", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "triggerFallback", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "triggerFallback", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/{transcodeType}/:/transcode/universal/fallback", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(TriggerFallbackRequest request) throws Exception { + HttpRequest req = buildRequest(request, TriggerFallbackRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(TriggerFallbackRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "412", "4XX", "500", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public TriggerFallbackResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + TriggerFallbackResponse.Builder resBuilder = + TriggerFallbackResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + TriggerFallbackResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "412", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(TriggerFallbackRequest request) throws Exception { + HttpRequest req = buildRequest(request, TriggerFallbackRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(TriggerFallbackRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "404", "412", "4XX", "500", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.TriggerFallbackResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.TriggerFallbackResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.TriggerFallbackResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "404", "412", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/TuneChannel.java b/src/main/java/dev/plexapi/sdk/operations/TuneChannel.java new file mode 100644 index 00000000..9bc24582 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/TuneChannel.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.TuneChannelRequest; +import dev.plexapi.sdk.models.operations.TuneChannelResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class TuneChannel { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "tuneChannel", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "tuneChannel", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "tuneChannel", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/livetv/dvrs/{dvrId}/channels/{channel}/tune", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(TuneChannelRequest request) throws Exception { + HttpRequest req = buildRequest(request, TuneChannelRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(TuneChannelRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "500", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public TuneChannelResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + TuneChannelResponse.Builder resBuilder = + TuneChannelResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + TuneChannelResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(TuneChannelRequest request) throws Exception { + HttpRequest req = buildRequest(request, TuneChannelRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(TuneChannelRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "500", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.TuneChannelResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.TuneChannelResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.TuneChannelResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/Unmatch.java b/src/main/java/dev/plexapi/sdk/operations/Unmatch.java new file mode 100644 index 00000000..d8304d06 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/Unmatch.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.UnmatchRequest; +import dev.plexapi.sdk.models.operations.UnmatchResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class Unmatch { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "unmatch", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "unmatch", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "unmatch", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/unmatch", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(UnmatchRequest request) throws Exception { + HttpRequest req = buildRequest(request, UnmatchRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(UnmatchRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public UnmatchResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UnmatchResponse.Builder resBuilder = + UnmatchResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + UnmatchResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(UnmatchRequest request) throws Exception { + HttpRequest req = buildRequest(request, UnmatchRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(UnmatchRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.UnmatchResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.UnmatchResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.UnmatchResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/Unscrobble.java b/src/main/java/dev/plexapi/sdk/operations/Unscrobble.java new file mode 100644 index 00000000..a0538cd2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/Unscrobble.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.UnscrobbleRequest; +import dev.plexapi.sdk.models.operations.UnscrobbleResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class Unscrobble { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "unscrobble", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "unscrobble", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "unscrobble", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/:/unscrobble"); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(UnscrobbleRequest request) throws Exception { + HttpRequest req = buildRequest(request, UnscrobbleRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(UnscrobbleRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public UnscrobbleResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UnscrobbleResponse.Builder resBuilder = + UnscrobbleResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + UnscrobbleResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(UnscrobbleRequest request) throws Exception { + HttpRequest req = buildRequest(request, UnscrobbleRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(UnscrobbleRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.UnscrobbleResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.UnscrobbleResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.UnscrobbleResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/Unshuffle.java b/src/main/java/dev/plexapi/sdk/operations/Unshuffle.java new file mode 100644 index 00000000..824379e9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/Unshuffle.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.UnshuffleRequest; +import dev.plexapi.sdk.models.operations.UnshuffleResponse; +import dev.plexapi.sdk.models.shared.MediaContainerWithPlaylistMetadata; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class Unshuffle { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "unshuffle", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "unshuffle", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "unshuffle", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/playQueues/{playQueueId}/unshuffle", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(UnshuffleRequest request) throws Exception { + HttpRequest req = buildRequest(request, UnshuffleRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(UnshuffleRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public UnshuffleResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UnshuffleResponse.Builder resBuilder = + UnshuffleResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + UnshuffleResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(UnshuffleRequest request) throws Exception { + HttpRequest req = buildRequest(request, UnshuffleRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(UnshuffleRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.UnshuffleResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.UnshuffleResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.UnshuffleResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + MediaContainerWithPlaylistMetadata out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withMediaContainerWithPlaylistMetadata(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/UpdateHubVisibility.java b/src/main/java/dev/plexapi/sdk/operations/UpdateHubVisibility.java new file mode 100644 index 00000000..2789f10e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/UpdateHubVisibility.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.UpdateHubVisibilityRequest; +import dev.plexapi.sdk.models.operations.UpdateHubVisibilityResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class UpdateHubVisibility { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "updateHubVisibility", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "updateHubVisibility", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "updateHubVisibility", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/hubs/sections/{sectionId}/manage/{identifier}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(UpdateHubVisibilityRequest request) throws Exception { + HttpRequest req = buildRequest(request, UpdateHubVisibilityRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(UpdateHubVisibilityRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "404", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public UpdateHubVisibilityResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UpdateHubVisibilityResponse.Builder resBuilder = + UpdateHubVisibilityResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + UpdateHubVisibilityResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(UpdateHubVisibilityRequest request) throws Exception { + HttpRequest req = buildRequest(request, UpdateHubVisibilityRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(UpdateHubVisibilityRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "403", "404", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.UpdateHubVisibilityResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.UpdateHubVisibilityResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.UpdateHubVisibilityResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "403", "404", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/UpdateItemArtwork.java b/src/main/java/dev/plexapi/sdk/operations/UpdateItemArtwork.java new file mode 100644 index 00000000..53f996ba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/UpdateItemArtwork.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.UpdateItemArtworkRequest; +import dev.plexapi.sdk.models.operations.UpdateItemArtworkResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class UpdateItemArtwork { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "updateItemArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "updateItemArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "updateItemArtwork", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/metadata/{ids}/{element}", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(UpdateItemArtworkRequest request) throws Exception { + HttpRequest req = buildRequest(request, UpdateItemArtworkRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(UpdateItemArtworkRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public UpdateItemArtworkResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UpdateItemArtworkResponse.Builder resBuilder = + UpdateItemArtworkResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + UpdateItemArtworkResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(UpdateItemArtworkRequest request) throws Exception { + HttpRequest req = buildRequest(request, UpdateItemArtworkRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(UpdateItemArtworkRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.UpdateItemArtworkResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.UpdateItemArtworkResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.UpdateItemArtworkResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/UpdateItems.java b/src/main/java/dev/plexapi/sdk/operations/UpdateItems.java new file mode 100644 index 00000000..0b4a1040 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/UpdateItems.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.UpdateItemsRequest; +import dev.plexapi.sdk.models.operations.UpdateItemsResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class UpdateItems { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "updateItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "updateItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "updateItems", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/library/sections/{sectionId}/all", + request, this.sdkConfiguration.globals); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(UpdateItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, UpdateItemsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(UpdateItemsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "404", "409", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public UpdateItemsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UpdateItemsResponse.Builder resBuilder = + UpdateItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + UpdateItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "409", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(UpdateItemsRequest request) throws Exception { + HttpRequest req = buildRequest(request, UpdateItemsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(UpdateItemsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "404", "409", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.UpdateItemsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.UpdateItemsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.UpdateItemsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "404", "409", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/UpdatePlayProgress.java b/src/main/java/dev/plexapi/sdk/operations/UpdatePlayProgress.java deleted file mode 100644 index 76a5dc4f..00000000 --- a/src/main/java/dev/plexapi/sdk/operations/UpdatePlayProgress.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package dev.plexapi.sdk.operations; - -import static dev.plexapi.sdk.operations.Operations.RequestOperation; -import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; - -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.SDKConfiguration; -import dev.plexapi.sdk.SecuritySource; -import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest; -import dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized; -import dev.plexapi.sdk.models.operations.UpdatePlayProgressRequest; -import dev.plexapi.sdk.models.operations.UpdatePlayProgressResponse; -import dev.plexapi.sdk.utils.Blob; -import dev.plexapi.sdk.utils.Exceptions; -import dev.plexapi.sdk.utils.HTTPClient; -import dev.plexapi.sdk.utils.HTTPRequest; -import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; -import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; -import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; -import dev.plexapi.sdk.utils.Utils; -import java.io.InputStream; -import java.lang.Exception; -import java.lang.RuntimeException; -import java.lang.String; -import java.lang.Throwable; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; - - -public class UpdatePlayProgress { - - static abstract class Base { - final SDKConfiguration sdkConfiguration; - final String baseUrl; - final SecuritySource securitySource; - final HTTPClient client; - - public Base(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - this.baseUrl = Utils.templateUrl( - this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); - this.securitySource = this.sdkConfiguration.securitySource(); - this.client = this.sdkConfiguration.client(); - } - - Optional securitySource() { - return Optional.ofNullable(this.securitySource); - } - - BeforeRequestContextImpl createBeforeRequestContext() { - return new BeforeRequestContextImpl( - this.sdkConfiguration, - this.baseUrl, - "updatePlayProgress", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterSuccessContextImpl createAfterSuccessContext() { - return new AfterSuccessContextImpl( - this.sdkConfiguration, - this.baseUrl, - "updatePlayProgress", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - - AfterErrorContextImpl createAfterErrorContext() { - return new AfterErrorContextImpl( - this.sdkConfiguration, - this.baseUrl, - "updatePlayProgress", - java.util.Optional.of(java.util.List.of()), - securitySource()); - } - HttpRequest buildRequest(T request, Class klass) throws Exception { - String url = Utils.generateURL( - this.baseUrl, - "/:/progress"); - HTTPRequest req = new HTTPRequest(url, "POST"); - req.addHeader("Accept", "application/json") - .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); - - return req.build(); - } - } - - public static class Sync extends Base - implements RequestOperation { - public Sync(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private HttpRequest onBuildRequest(UpdatePlayProgressRequest request) throws Exception { - HttpRequest req = buildRequest(request, UpdatePlayProgressRequest.class); - return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); - } - - private HttpResponse onError(HttpResponse response, Exception error) throws Exception { - return sdkConfiguration.hooks().afterError( - createAfterErrorContext(), - Optional.ofNullable(response), - Optional.ofNullable(error)); - } - - private HttpResponse onSuccess(HttpResponse response) throws Exception { - return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public HttpResponse doRequest(UpdatePlayProgressRequest request) throws Exception { - HttpRequest r = onBuildRequest(request); - HttpResponse httpRes; - try { - httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { - httpRes = onError(httpRes, null); - } else { - httpRes = onSuccess(httpRes); - } - } catch (Exception e) { - httpRes = onError(null, e); - } - - return httpRes; - } - - - @Override - public UpdatePlayProgressResponse handleResponse(HttpResponse response) throws Exception { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - UpdatePlayProgressResponse.Builder resBuilder = - UpdatePlayProgressResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - UpdatePlayProgressResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return res; - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - UpdatePlayProgressBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - UpdatePlayProgressUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - throw new SDKError( - response, - response.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(response)); - } - - throw new SDKError( - response, - response.statusCode(), - "Unexpected status code received: " + response.statusCode(), - Utils.extractByteArrayFromBody(response)); - } - } - public static class Async extends Base - implements AsyncRequestOperation { - - public Async(SDKConfiguration sdkConfiguration) { - super(sdkConfiguration); - } - - private CompletableFuture onBuildRequest(UpdatePlayProgressRequest request) throws Exception { - HttpRequest req = buildRequest(request, UpdatePlayProgressRequest.class); - return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); - } - - private CompletableFuture> onError(HttpResponse response, Throwable error) { - return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); - } - - private CompletableFuture> onSuccess(HttpResponse response) { - return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); - } - - @Override - public CompletableFuture> doRequest(UpdatePlayProgressRequest request) { - return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) - .handle((resp, err) -> { - if (err != null) { - return onError(null, err); - } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { - return onError(resp, null); - } - return CompletableFuture.completedFuture(resp); - }) - .thenCompose(Function.identity()) - .thenCompose(this::onSuccess); - } - - @Override - public CompletableFuture handleResponse( - HttpResponse response) { - String contentType = response - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - dev.plexapi.sdk.models.operations.async.UpdatePlayProgressResponse.Builder resBuilder = - dev.plexapi.sdk.models.operations.async.UpdatePlayProgressResponse - .builder() - .contentType(contentType) - .statusCode(response.statusCode()) - .rawResponse(response); - - dev.plexapi.sdk.models.operations.async.UpdatePlayProgressResponse res = resBuilder.build(); - - if (Utils.statusCodeMatches(response.statusCode(), "200")) { - // no content - return CompletableFuture.completedFuture(res); - } - - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.UpdatePlayProgressBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.UpdatePlayProgressUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { - // no content - return Utils.createAsyncApiError(response, "API error occurred"); - } - - return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); - } - } -} diff --git a/src/main/java/dev/plexapi/sdk/operations/UpdatePlaylist.java b/src/main/java/dev/plexapi/sdk/operations/UpdatePlaylist.java index 46885d1e..45e40227 100644 --- a/src/main/java/dev/plexapi/sdk/operations/UpdatePlaylist.java +++ b/src/main/java/dev/plexapi/sdk/operations/UpdatePlaylist.java @@ -6,12 +6,9 @@ package dev.plexapi.sdk.operations; import static dev.plexapi.sdk.operations.Operations.RequestOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.errors.UpdatePlaylistBadRequest; -import dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized; import dev.plexapi.sdk.models.operations.UpdatePlaylistRequest; import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse; import dev.plexapi.sdk.utils.Blob; @@ -24,7 +21,6 @@ import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; import java.lang.Exception; -import java.lang.RuntimeException; import java.lang.String; import java.lang.Throwable; import java.net.http.HttpRequest; @@ -84,16 +80,12 @@ public class UpdatePlaylist { String url = Utils.generateURL( klass, this.baseUrl, - "/playlists/{playlistID}", - request, null); + "/playlists/{playlistId}", + request, this.sdkConfiguration.globals); HTTPRequest req = new HTTPRequest(url, "PUT"); - req.addHeader("Accept", "application/json") + req.addHeader("Accept", "*/*") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - - req.addQueryParams(Utils.getQueryParams( - klass, - request, - null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -128,7 +120,7 @@ public class UpdatePlaylist { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "404", "4XX", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -156,48 +148,12 @@ public class UpdatePlaylist { UpdatePlaylistResponse res = resBuilder.build(); - if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.statusCodeMatches(response.statusCode(), "204")) { // no content return res; } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - UpdatePlaylistBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - UpdatePlaylistUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { // no content throw new SDKError( response, @@ -249,7 +205,7 @@ public class UpdatePlaylist { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "404", "4XX", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -274,52 +230,12 @@ public class UpdatePlaylist { dev.plexapi.sdk.models.operations.async.UpdatePlaylistResponse res = resBuilder.build(); - if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.statusCodeMatches(response.statusCode(), "204")) { // no content return CompletableFuture.completedFuture(res); } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.UpdatePlaylistBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.UpdatePlaylistUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "404", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } diff --git a/src/main/java/dev/plexapi/sdk/operations/UploadPlaylist.java b/src/main/java/dev/plexapi/sdk/operations/UploadPlaylist.java index 54d18589..c40b6216 100644 --- a/src/main/java/dev/plexapi/sdk/operations/UploadPlaylist.java +++ b/src/main/java/dev/plexapi/sdk/operations/UploadPlaylist.java @@ -6,12 +6,9 @@ package dev.plexapi.sdk.operations; import static dev.plexapi.sdk.operations.Operations.RequestOperation; import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; -import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.SDKConfiguration; import dev.plexapi.sdk.SecuritySource; import dev.plexapi.sdk.models.errors.SDKError; -import dev.plexapi.sdk.models.errors.UploadPlaylistBadRequest; -import dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized; import dev.plexapi.sdk.models.operations.UploadPlaylistRequest; import dev.plexapi.sdk.models.operations.UploadPlaylistResponse; import dev.plexapi.sdk.utils.Blob; @@ -24,7 +21,6 @@ import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; import java.lang.Exception; -import java.lang.RuntimeException; import java.lang.String; import java.lang.Throwable; import java.net.http.HttpRequest; @@ -85,13 +81,14 @@ public class UploadPlaylist { this.baseUrl, "/playlists/upload"); HTTPRequest req = new HTTPRequest(url, "POST"); - req.addHeader("Accept", "application/json") + req.addHeader("Accept", "*/*") .addHeader("user-agent", SDKConfiguration.USER_AGENT); req.addQueryParams(Utils.getQueryParams( klass, request, - null)); + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); return req.build(); @@ -126,7 +123,7 @@ public class UploadPlaylist { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "4XX", "500", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -159,43 +156,7 @@ public class UploadPlaylist { return res; } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - UploadPlaylistBadRequest out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - UploadPlaylistUnauthorized out = Utils.mapper().readValue( - response.body(), - new TypeReference<>() { - }); - out.withRawResponse(response); - - throw out; - } else { - throw new SDKError( - response, - response.statusCode(), - "Unexpected content-type received: " + contentType, - Utils.extractByteArrayFromBody(response)); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { // no content throw new SDKError( response, @@ -204,7 +165,7 @@ public class UploadPlaylist { Utils.extractByteArrayFromBody(response)); } - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { // no content throw new SDKError( response, @@ -247,7 +208,7 @@ public class UploadPlaylist { if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "4XX", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "403", "4XX", "500", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -277,52 +238,12 @@ public class UploadPlaylist { return CompletableFuture.completedFuture(res); } - if (Utils.statusCodeMatches(response.statusCode(), "400")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.UploadPlaylistBadRequest out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "401")) { - if (Utils.contentTypeMatches(contentType, "application/json")) { - return response.body().toByteArray().thenApply(bodyBytes -> { - dev.plexapi.sdk.models.errors.async.UploadPlaylistUnauthorized out; - try { - out = Utils.mapper().readValue( - bodyBytes, - new TypeReference<>() { - }); - out.withRawResponse(response); - } catch (Exception e) { - throw new RuntimeException(e); - } - throw out; - }); - } else { - return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); - } - } - - if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } - if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { // no content return Utils.createAsyncApiError(response, "API error occurred"); } diff --git a/src/main/java/dev/plexapi/sdk/operations/VoiceSearchHubs.java b/src/main/java/dev/plexapi/sdk/operations/VoiceSearchHubs.java new file mode 100644 index 00000000..52b64ecc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/VoiceSearchHubs.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsRequest; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsResponse; +import dev.plexapi.sdk.models.operations.VoiceSearchHubsResponseBody; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.RuntimeException; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class VoiceSearchHubs { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "voiceSearchHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "voiceSearchHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "voiceSearchHubs", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/hubs/search/voice"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(VoiceSearchHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, VoiceSearchHubsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(VoiceSearchHubsRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public VoiceSearchHubsResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + VoiceSearchHubsResponse.Builder resBuilder = + VoiceSearchHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + VoiceSearchHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + VoiceSearchHubsResponseBody out = Utils.mapper().readValue( + response.body(), + new TypeReference<>() { + }); + res.withObject(out); + return res; + } else { + throw new SDKError( + response, + response.statusCode(), + "Unexpected content-type received: " + contentType, + Utils.extractByteArrayFromBody(response)); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(VoiceSearchHubsRequest request) throws Exception { + HttpRequest req = buildRequest(request, VoiceSearchHubsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(VoiceSearchHubsRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.VoiceSearchHubsResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.VoiceSearchHubsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.VoiceSearchHubsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return response.body().toByteArray().thenApply(bodyBytes -> { + try { + VoiceSearchHubsResponseBody out = Utils.mapper().readValue( + bodyBytes, + new TypeReference<>() { + }); + res.withObject(out); + return res; + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/WriteLog.java b/src/main/java/dev/plexapi/sdk/operations/WriteLog.java new file mode 100644 index 00000000..d7aaa816 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/WriteLog.java @@ -0,0 +1,264 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.WriteLogResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.SerializedBody; +import dev.plexapi.sdk.utils.Utils.JsonShape; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class WriteLog { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "writeLog", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "writeLog", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "writeLog", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/log"); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "request", + "raw", + false); + if (serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(byte[] request) throws Exception { + HttpRequest req = buildRequest(request, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(byte[] request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public WriteLogResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + WriteLogResponse.Builder resBuilder = + WriteLogResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + WriteLogResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(byte[] request) throws Exception { + HttpRequest req = buildRequest(request, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(byte[] request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.WriteLogResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.WriteLogResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.WriteLogResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "400", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/dev/plexapi/sdk/operations/WriteMessage.java b/src/main/java/dev/plexapi/sdk/operations/WriteMessage.java new file mode 100644 index 00000000..cb26ce30 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/operations/WriteMessage.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package dev.plexapi.sdk.operations; + +import static dev.plexapi.sdk.operations.Operations.RequestOperation; +import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation; + +import dev.plexapi.sdk.SDKConfiguration; +import dev.plexapi.sdk.SecuritySource; +import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.WriteMessageRequest; +import dev.plexapi.sdk.models.operations.WriteMessageResponse; +import dev.plexapi.sdk.utils.Blob; +import dev.plexapi.sdk.utils.Exceptions; +import dev.plexapi.sdk.utils.HTTPClient; +import dev.plexapi.sdk.utils.HTTPRequest; +import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl; +import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; +import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class WriteMessage { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + + public Base(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "writeMessage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "writeMessage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "writeMessage", + java.util.Optional.of(java.util.List.of()), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/log"); + HTTPRequest req = new HTTPRequest(url, "PUT"); + req.addHeader("Accept", "*/*") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.sdkConfiguration.globals)); + req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private HttpRequest onBuildRequest(WriteMessageRequest request) throws Exception { + HttpRequest req = buildRequest(request, WriteMessageRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(WriteMessageRequest request) throws Exception { + HttpRequest r = onBuildRequest(request); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = onError(null, e); + } + + return httpRes; + } + + + @Override + public WriteMessageResponse handleResponse(HttpResponse response) throws Exception { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + WriteMessageResponse.Builder resBuilder = + WriteMessageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + WriteMessageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return res; + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw new SDKError( + response, + response.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(response)); + } + + throw new SDKError( + response, + response.statusCode(), + "Unexpected status code received: " + response.statusCode(), + Utils.extractByteArrayFromBody(response)); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration) { + super(sdkConfiguration); + } + + private CompletableFuture onBuildRequest(WriteMessageRequest request) throws Exception { + HttpRequest req = buildRequest(request, WriteMessageRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(WriteMessageRequest request) { + return Exceptions.unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + dev.plexapi.sdk.models.operations.async.WriteMessageResponse.Builder resBuilder = + dev.plexapi.sdk.models.operations.async.WriteMessageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + dev.plexapi.sdk.models.operations.async.WriteMessageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + // no content + return CompletableFuture.completedFuture(res); + } + + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +}